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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<?xml version="1.0" encoding="UTF-8"?>
<!--
:Think
: 1.0
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view template="default" package="leaf.ui.std">
<!--<meta name="_csrf" content="${/session/@_csrf.token}"/>-->
<!--<meta name="_csrf_header" content="X-CSRF-TOKEN" />-->
<a:link id="widget_csh_payment_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="widget_csh_payment_req_link_id"
url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req.lview"/>
<a:link id="widget_csh_receipt_return_maintain_link"
url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_receipt_detail_query.lview"/>
<a:link id="widget_csh_transaction_returned_detail_link"
url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_returned_detail_query.lview"/>
<a:link id="widget_csh_transaction_payment_detail_link"
url="${/request/@context_path}/modules/csh/CSH301/csh_payment_req_pay_detail.lview"/>
<style>
html, body {
width: 1128px;
height: 589px;
margin: 0;
padding: 0;
}
.widget-csh-payment {
width: 1126px;
height: 587px;
background: #FFFFFF;
border: 1px solid #F0F0F3;
}
.widget-csh-payment .widget_label {
position: absolute;
width: 40px;
height: 4px;
top: 0;
left: 16px;
background-color: #5A7FFF;
}
.widget-csh-payment .row1 {
position: relative;
padding: 16px 0 12px 16px;
font-size: 14px;
color: rgba(75, 80, 90, 0.85);
letter-spacing: 0;
border-bottom: 1px solid #F0F0F3;
}
.widget-csh-payment .row2 {
box-sizing: border-box;
height: 109px;
padding: 26px 40px 22px 16px;
border-bottom: 1px solid #F0F0F3;
}
.widget-csh-payment .asset_query_form div {
height: 24px;
line-height: 24px;
}
.widget-csh-payment .asset_query_form div:first-child {
margin-bottom: 18px;
}
.widget-csh-payment .asset_query_form .label {
display: inline-block;
font-size: 14px;
color: #4B505A;
min-width: 60px;
width: 60px;
}
.widget-csh-payment .asset_query_form .clickable {
box-sizing: border-box;
width: 88px;
height: 26px;
line-height: 26px;
display: inline-block;
padding: 0 5px;
margin: 0 13px;
border-radius: 2px;
cursor: pointer;
text-align: center;
}
.widget-csh-payment .asset_query_form input {
box-sizing: border-box;
width: 200px;
height: 24px;
margin: 0 30px 0 16px;
padding-left: 8px;
display: inline-block;
border: 1px solid rgba(83, 93, 127, 0.60);
border-radius: 2px;
font-size: 12px;
color: rgba(75, 80, 90, 0.85);
}
.widget-csh-payment .asset_query_form #submit {
background: #5A7FFF;
color: #fff;
}
.widget-csh-payment .asset_query_form .asset_query_currency {
border: 1px solid rgba(83, 93, 127, 0.50);
color: #535D7F;
}
.widget-csh-payment .asset_query_form .asset_query_currency_active {
border-color: #5A7FFF;
color: #5A7FFF;
}
.widget-csh-payment .hls-pagging-grid {
width: 100%;
height: 382px;
-webkit-box-shadow: none;
box-shadow: none;
}
.widget-csh-payment .hls-pagging-grid .grid-title {
display: none;
}
.widget-csh-payment .hls-pagging-grid .grid-body {
padding: 0 0px;
}
.widget-csh-payment .hls-pagging-grid .hls-table tr td {
text-align: center;
}
/*表头*/
.widget-csh-payment .hls-pagging-grid .grid-body table > tr {
height: 45px;
border-bottom: 1px solid #F0F0F3;
font-size: 14px;
color: rgba(83, 93, 127, 1);
}
.widget-csh-payment .hls-pagging-grid .hls-table tr td:nth-child(1),
.widget-csh-payment .hls-pagging-grid .hls-table tr td:nth-child(5) {
text-align: left;
}
.widget-csh-payment .hls-pagging-grid .grid-body table > tr > td:first-child span {
margin-left: 16px;
}
.widget-csh-payment .hls-pagging-grid .grid-body table > tr > td:last-child span {
margin-right: 16px;
}
.widget-csh-payment .hls-pagging-grid .hls-table tbody tr {
height: 48px;
font-size: 12px;
color: rgba(0, 0, 0, 0.65);
letter-spacing: 0;
border-bottom: 1px solid #F0F0F3;
}
.widget-csh-payment .hls-pagging-grid .grid-body table tbody tr:first-child {
height: 48px;
}
.widget-csh-payment .hls-pagging-grid .hls-table tbody td {
max-width: 13em;
text-align: center;
}
.widget-csh-payment .hls-pagging-grid .hls-table tbody td:first-child div {
margin-left: 16px;
}
.widget-csh-payment .hls-pagging-grid .hls-table tbody td:last-child div {
margin-right: 16px;
}
.widget-csh-payment .hls-pagging-grid .hls-table tbody td div p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.widget-csh-payment .hls-pagging-grid .hls-table tbody tr:hover {
background: rgba(90, 127, 255, 0.08);
}
.widget-csh-payment .hls-table-active {
background-color: rgba(90, 127, 255, 0.08);
}
.widget-csh-payment .hls-pagging-grid .icon {
cursor: pointer;
width: 16px;
height: 16px;
}
.widget-csh-payment .switch {
width: 100%;
height: 26px;
cursor: pointer;
padding-bottom: 11px;
margin-top: 11px;
border-bottom: 1px solid #F0F0F3;
}
.widget-csh-payment .switch .switch_approve {
display: block;
width: 88px;
float: left;
font-size: 12px;
text-align: center;
border: 1px solid rgba(75, 80, 90, 0.15);
line-height: 22px;
color: rgba(75, 80, 90, 0.75);
}
.widget-csh-payment .switch #widget_switch_unapprove_id {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
margin-left: 16px;
}
.widget-csh-payment .switch #widget_switch_approved_id {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
margin-left: -1px;
}
.widget-csh-payment #widget_csh_payment_grid-wraper {
display: block;
}
.widget-csh-payment #widget_csh_transaction_grid-wraper {
display: none;
}
.widget-csh-payment #widget_csh_transaction_grid tbody {
text-align: center !important;
}
.widget-csh-payment #widget_csh_transaction_grid tbody .grid_no_date {
margin-left: 0 !important;
position: relative !important;
}
</style>
<script><![CDATA[
function csh_payment_detail_renderer(record, index) {
return "<img onclick='winOpen_req_pay(\"" + record.id + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
}
function winOpen_req_pay(record_id) {
var record = $('widget_csh_payment_ds').findById(record_id);
var param = {};
param['function_usage'] = 'UPDATE';
param['payment_req_id'] = record.get('payment_req_id');
param['document_category'] = record.get('document_category');
param['business_type'] = record.get('business_type');
if (record.get('business_type') == 'PAYMENT') {
param['function_code'] = 'CSH501D';
} else if (record.get('business_type') == 'PREPAYMENT') {
param['function_code'] = 'CSH501_PRE_D';
}
param['winid'] = 'csh_payment_update_window';
param['url_title'] = '付款申请';
hls_doc_get_layout_code('widget_csh_payment_get_layout_code_link_id', param, 'widget_csh_payment_req_link_id', 'widget_csh_payment_ds');
}
function csh_transaction_detail_renderer(record, index) {
if (record.get('transaction_id')) {
var url;
if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') != 'RETURN') {
url = $('widget_csh_receipt_return_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return "<img onclick='openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
} else if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') == 'RETURN') {
url = $('widget_csh_transaction_returned_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
//return '<a href="javascript:RETURN_openWindow(\'' + url + '\');">' + value + '</a>';
return "<img onclick='RETURN_openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
} else if (record.get('transaction_type') == 'PAYMENT') {
url = $('widget_csh_transaction_payment_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
//return '<a href="javascript:payment_openWindow(\'' + url + '\');">' + value + '</a>';
return "<img onclick='payment_openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
} else if (record.get('transaction_type') == 'PREPAYMENT' || record.get('transaction_type') == 'DEDUCTION') {
url = $('widget_csh_transaction_payment_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
//return '<a href="javascript:payment_openWindow(\'' + url + '\');">' + value + '</a>';
return "<img onclick='payment_openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
} else if (record.get('transaction_type') == 'ADVANCE_RECEIPT') {
url = $('widget_csh_receipt_return_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
//return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
return "<img onclick='openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
} else {
//return value;
return "<img class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
}
}
}
function csh_format_money(record, index) {
var html;
if (record.get('apply_amount')) {
var money = Leaf.formatMoney(record.get('apply_amount'))
html = '<div>' + money + '</div>';
} else {
var money = Leaf.formatMoney(record.get('transaction_amount'))
html = '<div>' + money + '</div>';
}
return html;
}
function openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
},
url: url,
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
}
function RETURN_openWindow(url) {
new Leaf.Window({
id: 'widget_csh_transaction_returned_detail_link_winid',
params: {
winId: 'widget_csh_transaction_returned_detail_link_winid'
},
url: url,
title: '${l:CSH515.CSH_REFUND_DETAILS}',
fullScreen: true
});
}
function payment_openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_payment_link_winid',
params: {
winId: 'csh_transaction_payment_link_winid'
},
url: url,
title: '付款明细',
fullScreen: true
});
}
function clickCshPayment() {
document.getElementById('widget_switch_unapprove_id').style.border = '1px solid #5A7FFF';
document.getElementById('widget_switch_unapprove_id').style.color = '#5A7FFF';
document.getElementById('widget_csh_payment_grid-wraper').style.display = "block";
document.getElementById('widget_switch_approved_id').style.border = "1px solid #D9D9D9";
document.getElementById('widget_switch_approved_id').style.color = "rgba(0,0,0,0.65)";
document.getElementById('widget_csh_transaction_grid-wraper').style.display = "none";
}
function clickCshTransaction() {
//已办grid等
document.getElementById('widget_switch_approved_id').style.border = "1px solid #5A7FFF";
document.getElementById('widget_switch_approved_id').style.color = "rgba(90,127,255,1)";
document.getElementById('widget_csh_transaction_grid-wraper').style.display = "block";
document.getElementById('widget_switch_unapprove_id').style.border = "1px solid #D9D9D9";
document.getElementById('widget_switch_unapprove_id').style.color = "rgba(0,0,0,0.65)";
document.getElementById('widget_csh_payment_grid-wraper').style.display = "none";
}
function cshQuery() {
var csh_payment_req_number = $jq('[name="csh_payment_req_number"]').val();
var csh_bp_code = $jq('[name="csh_bp_code"]').val();
var csh_bp_name = $jq('[name="csh_bp_name"]').val();
var csh_apply_amount = $jq('[name="csh_apply_amount"]').val();
var cshparams = {
'payment_req_number': csh_payment_req_number,
"ln_bp_code": csh_bp_code,
"ln_bp_name": csh_bp_name,
"apply_amount": csh_apply_amount
}
var traprams = {
'transaction_num': csh_payment_req_number,
"bp_code": csh_bp_code,
"bp_name": csh_bp_name,
"transaction_amount": csh_apply_amount
}
$("widget_csh_payment_ds").qpara = cshparams;
$("widget_csh_payment_ds").query();
$("csh_transaction_result_ds").qpara = traprams;
$("csh_transaction_result_ds").query();
}
]]>
</script>
<a:dataSets>
<a:dataSet id="widget_csh_payment_ds" autoQuery="true" pageSize="5"
model="csh.CSH504.csh_payment_maintain_query">
<a:fields>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_result_ds" autoQuery="true" pageSize="5"
queryUrl="${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_query/query?transaction_category=BUSINESS">
<a:fields>
</a:fields>
</a:dataSet>
</a:dataSets>
<div class="widget-csh-payment">
<span class="widget_label"> </span>
<div class="row1">付款查询</div>
<div class="row2 asset_query_form">
<div>
<span class="label">申请单号</span>
<input type="text" id="csh_payment_req_number" name="csh_payment_req_number"
placeholder="申请单号/交易单号"/>
<span class="label">付款对象</span>
<input type="text" id="csh_bp_code" name="csh_bp_code" placeholder="付款对象/交易对象"/>
<span class="label">对象名称</span>
<input type="text" id="csh_bp_name" name="csh_bp_name" placeholder="对象名称"/>
<span class="clickable" id="submit" onclick="cshQuery()">查询</span>
</div>
<div>
<span class="label">申请金额</span>
<input type="number" id="csh_apply_amount" name="csh_apply_amount" placeholder="申请金额/交易金额"/>
</div>
</div>
<div class="switch">
<div class="switch_approve" id="widget_switch_unapprove_id" onclick="clickCshPayment()">待支付清单</div>
<div class="switch_approve" id="widget_switch_approved_id" onclick="clickCshTransaction()">已支付清单</div>
</div>
<a:hapGrid id="widget_csh_payment_grid" bindTarget="widget_csh_payment_ds" canWheel="true">
<a:columns>
<a:column name="payment_req_number" prompt="申请单号"/>
<a:column name="req_date" prompt="申请日期"/>
<a:column name="document_type_dis" prompt="申请类型"/>
<a:column name="ln_bp_code" prompt="付款对象"/>
<a:column name="ln_bp_name" prompt="对象名称"/>
<a:column name="ln_bp_category_name" prompt="对象类别"/>
<a:column template="csh_format_money" prompt="申请总金额"/>
<a:column name="currency_name" prompt="币种"/>
<a:column template="csh_payment_detail_renderer" prompt="明细"/>
</a:columns>
</a:hapGrid>
<a:hapGrid id="widget_csh_transaction_grid" bindTarget="csh_transaction_result_ds" canWheel="true">
<a:columns>
<a:column name="transaction_num" prompt="交易编号"/>
<a:column name="transaction_date" prompt="交易日期"/>
<a:column name="transaction_type_desc" prompt="交易类型"/>
<a:column name="bp_code" prompt="交易对象"/>
<a:column name="bp_name" prompt="对象名称"/>
<a:column name="bank_account_num" prompt="银行账号"/>
<a:column name="bank_account_name" prompt="账户名"/>
<a:column template="csh_format_money" prompt="交易金额"/>
<a:column name="currency_name" prompt="币种"/>
<a:column template="csh_transaction_detail_renderer" prompt="明细"/>
</a:columns>
</a:hapGrid>
</div>
<a:screenBody style="display:none">
</a:screenBody>
<!--<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=PAYMENT_REQ&function_code=CSH504&custom_code=CSH504"/>
<script>
Leaf.onReady(function () {
document.getElementById('widget_switch_unapprove_id').style.border = '1px solid #5A7FFF';
document.getElementById('widget_switch_unapprove_id').style.color = '#5A7FFF';
})
</script>
</a:view>
</a:screen>