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
109
110
111
<?xml version="1.0" encoding="UTF-8"?>
<!--
create by nyl 2014-12-3
for contract context create
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.specify_code='CON_GPS_APPROVER'" model="cont.CON543.cus_hls_specify_define" rootPath="hls_specify_define_info"/>
</a:init-procedure>
<a:view>
<a:link id="con638_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con625_prj_secify_approver_link" url="${/request/@context_path}/modules/prj/PRJ501N/cus_hls_specify_approver.lview"/>
<script type="text/javascript"><![CDATA[
//导出
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var grid_id = ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export('xls', '${/model/default_function_name/record/@function_name}');
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'cus_con_contract_gps');
var record = $(ds_id).getCurrentRecord();
var gps_service_id = record.get('gps_service_id');
var contract_id = record.get('contract_id');
if ($(ds_id).validate() && !record.dirty) {
var document_id = gps_service_id;
var document_table = 'CUS_CON_CONTRACT_GPS';
var title = '${/model/hls_specify_define_info/record/@description}';
var win = new Leaf.Window({
id: 'cus_prj_secify_approver_screen',
url: $('con625_prj_secify_approver_link').getUrl(),
params: {
document_id: document_id,
specify_code: 'CON_GPS_APPROVER'
},
title: title,
width: 550,
heigh: 650
});
win.on('close', function() {
ajax_flag = 'Y';
/* parent.Leaf.SideBar.enable = true;
parent.Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
}); */
Leaf.request({
url: '${/request/@context_path}/autocrud/cus.CUS100.cus_con_gps_service_submit/update',
para: {
gps_service_id: gps_service_id,
contract_id: contract_id
},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
parent.Leaf.SideBar.enable = true;
parent.Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
//history.go(-1);
$('${/parameter/@winid}').close();
},
scope: this
});
});
} else {
Leaf.showMessage('提示', '请先保存再提交审批!', null, 350);
}
};
//提交审批
/* window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'cus_con_contract_gps');
var record = $(ds_id).getCurrentRecord();
var gps_service_id = record.get('gps_service_id');
var contract_id = record.get('contract_id');
if (record.dirty != true) {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: '${/request/@context_path}/autocrud/cus.CUS100.cus_con_gps_service_submit/update',
para: {
gps_service_id: gps_service_id,
contract_id: contract_id
},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
parent.Leaf.SideBar.enable = true;
parent.Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
//history.go(-1);
$('${/parameter/@winid}').close();
},
scope: this
});
} else {
Leaf.showMessage('提示', '请先保存再提交审批!', null, 350);
}
}; */
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>