1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2023-8-27 下午01:54:29
$Revision: 1.0
$Purpose: 租赁物维护(经营性租赁)入口
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<a:link id="prj2000_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="prj_project_link" model="prj.PRJ2000.pur_order_wfl" modelaction="execute"/>
<a:link id="prj2000_pur_order_deteail_link_id" url="${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"></a:link>
<script type="text/javascript"><![CDATA[
//查询时调用(grid)
/* window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
}
};*/
//新建
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var param = {};
param['function_code'] = 'PRJ2000D';
param['function_usage'] = 'CREATE';
param['url_title'] = '采购申请单维护';
//param['default_value_dsid']=ds_id;
hls_doc_get_layout_code('prj2000_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', ds_id, '${/parameter/@layout_code}');
};
//取消
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var records = $(ds_id).getSelected();
var projectId = records[0].data.project_id;
if(records[0].data.project_status=='APPROVING' || records[0].data.project_status=='APPROVED' || records[0].data.project_status=='CANCEL'){
Leaf.showMessage('${l:PROMPT}', '请选择新建或审批退回的采购单进行取消操作!');
return;
};
Leaf.showConfirm('${l:PROMPT}', '是否确定取消该单据?', function () {
Leaf.request({
url: $('prj_project_link').getUrl(),
para:{project_id:projectId},
success: function () {
Leaf.SideBar.show({
msg: '取消成功',
duration: 2000
});
$(ds_id).query();
},
scope: this
});
}, function () {
}, null, null);
};
//租赁物导出
window['${/parameter/@layout_code}_G_PUR_ORDER_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var grid_id = lease_item_ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export();
};
function prj2000d_get_detail(id, name, query_only){
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var project_id=record.get('project_id');
var projectStatus=record.get('project_status');
var param = {};
if(projectStatus=='NEW' || projectStatus=='APPROVED_RETURN'){
param['function_code'] = 'PRJ2000D';
param['function_usage'] = 'MODIFY';
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
}
if(projectStatus=='APPROVING' || projectStatus=='CANCEL' || projectStatus=='APPROVED'){
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
}
hls_doc_get_layout_code('prj2000_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', ds_id, '${/parameter/@layout_code}');
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'project_number') {
link_function = 'prj2000d_get_detail';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' +value + '</a>';
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<!--<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CON501&function_code=PRJ501N"/>-->
</a:view>
</a:screen>