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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author:
$Date: 2014-8-4 下午01:58:31
$Revision: 1.0
$Purpose: 商业伙伴查询
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="leg.LEG600.get_sysdate" rootPath="sysdate"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="get_law_number_link_id" model="leg.LEG100.leg_get_law_number" modelaction="execute"/>
<a:link id="pageLink_bpQueryScreen_welcome" url="${/request/@context_path}/welcome.lview"/>
<a:link id="con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON301/con_contract_query_n.lview"/>
<a:link id="leg400_print_link_id" url="${/request/@context_path}/modules/leg/LEG400/leg_content_print_detail.lview"/>
<a:link id="leg400_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[
function open_bp_modify_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
}
function sum_gather(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
var rental_gather = 0;
var overdue_gather = 0;
var law_fee_gather = 0;
var legal_deposit = 0;
if (!isNaN(param['rental_gather'])) {
rental_gather = parseInt(param['rental_gather'] == '' ? 0 : param['rental_gather']);
}
if (!isNaN(param['overdue_gather'])) {
overdue_gather = parseInt(param['overdue_gather'] == '' ? 0 : param['overdue_gather']);
}
if (!isNaN(param['law_fee_gather'])) {
law_fee_gather = parseInt(param['law_fee_gather'] == '' ? 0 : param['law_fee_gather']);
}
//legal_deposit
if (!isNaN(param['legal_deposit'])) {
legal_deposit = parseInt(param['legal_deposit'] == '' ? 0 : param['legal_deposit']);
}
var sum = rental_gather + overdue_gather + law_fee_gather + legal_deposit;
record.set('gather_sum', sum);
}
function sum_mitigate(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
var rental_mitigate = 0;
var overdue_mitigate = 0;
var law_fee_mitigate = 0;
if (!isNaN(param['rental_mitigate'])) {
rental_mitigate = parseInt(param['rental_mitigate'] == '' ? 0 : param['rental_mitigate']);
}
if (!isNaN(param['overdue_mitigate'])) {
overdue_mitigate = parseInt(param['overdue_mitigate'] == '' ? 0 : param['overdue_mitigate']);
}
if (!isNaN(param['law_fee_mitigate'])) {
law_fee_mitigate = parseInt(param['law_fee_mitigate'] == '' ? 0 : param['law_fee_mitigate']);
}
var sum = rental_mitigate + overdue_mitigate + law_fee_mitigate;
record.set('mitigate_sum', sum);
}
function open_attachment_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
var url_id = 'leg400_downloadFile_id';
var url = $(url_id).getUrl() + '?table_name=LEG_LEGAL_LETTER&header_id=' + param['legal_letter_id'];
new Leaf.Window({
url: url,
title: '附件',
id: 'leg_legal_letter_id',
width: 850,
height: 400
});
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'contract_number') {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}
if (name == 'attachment') {
return '<a href="javascript:open_attachment_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + '附件' + '</a>';
}
return value;
};
//更新时调用
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if (name == 'rental_gather') {
sum_gather(record.ds.id, record.id);
}
if (name == 'overdue_gather') {
sum_gather(record.ds.id, record.id);
}
if (name == 'law_fee_gather') {
sum_gather(record.ds.id, record.id);
}
if (name == 'legal_deposit') {
sum_gather(record.ds.id, record.id);
}
if (name == 'rental_mitigate') {
sum_mitigate(record.ds.id, record.id);
}
if (name == 'overdue_mitigate') {
sum_mitigate(record.ds.id, record.id);
}
if (name == 'law_fee_mitigate') {
sum_mitigate(record.ds.id, record.id);
}
};
//合同明细
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 record = $(ds_id).getCurrentRecord();
//var contract_id = record.get('contract_id');
var param = new Object();
param['contract_id'] = ${/parameter/@contract_id};
maintain_type = 'READONLY';
param['function_code'] = 'CON301R';
param['function_usage'] = 'MODIFY';
param['url_title'] = '合同明细';
url_l = 'con_contract_update_link_id';
param['maintain_type'] = maintain_type;
//
new Leaf.Window({
id: 'con_get_layout_code_winid',
params: param,
url: $('con_contract_update_link_id').getUrl(),
title: param['url_title'] + '(' + 'CONTRACT_QUERY' + ')',
fullScreen: true,
draggable: true
});
// hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url_l);
};
//打印
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_law');
var record = $(ds_id).getCurrentRecord();
var param = new Object();
param['law_id'] = record.get('law_id');
param['contract_id'] = record.get('contract_id');
param['function'] = 'LEG104';
param['winid'] = 'leg_print_detail_winid';
// param['clause_usage'] ='LAW';
// param['clause_usage'] ='%28%27LAW%27%2C%27LAW%27%2C%27LAW%27%2C%27LAW%27%29';
new Leaf.Window({
id: 'leg_print_detail_winid',
params: param,
url: $('leg400_print_link_id').getUrl(),
title: '法务文本打印',
width: 900,
height: 450
});
};
//提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'CON_CONTRACT_LAW');
var record = $(ds_id).getCurrentRecord();
var law_id = record.get('law_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/leg.LEG100.leg_contract_law/update',
para: {
law_id: law_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}_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.id == ds_id) {
qpara['contract_id'] = ${/parameter/@contract_id};
aut_authority_list_validate_query(ds, qpara);
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=LEGAL_ACTION&function_code=LEG101&custom_code=LEG102"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>