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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: xuls
$Date: 2015-2-3 下午3:18:43
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure/>
<a:view>
<a:link id="csh711_write_off_detail_link" url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_receipt_write_off_detail_query.lview"/>
<a:link id="csh711_reverse_link" model="csh.CSH711.reverse_csh_transaction" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function csh711_openWindow_writeoff(url) {
new Leaf.Window({
id: 'csh_write_off_reverse_detail_link_winid',
params: {
winId: 'csh_write_off_reverse_detail_link_winid'
},
url: url,
title: '${l:CSH301.CSH_WRITE_OFF_DETAIL}',
fullScreen: true
});
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
if (name == 'deduction_amount') {
var url;
url = $('csh711_write_off_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type');
return '<a href="javascript:csh711_openWindow_writeoff(\'' + url + '\');">' + Leaf.formatMoney(value) + '</a>';
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction');
var csh_ds = $(ds_id);
var records = csh_ds.getSelected();
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return;
}
if (csh_ds.validate()){
Leaf.showConfirm('${l:PROMPT}', '是否反冲?', function() {
var reverse_data = [];
for (var i = 0;i < records.length;i++) {
records[i].set('_status', 'update');
reverse_data.push(records[i].data);
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('csh711_reverse_link').getUrl(),
para: reverse_data,
success: function() {
Leaf.Masker.unmask(Ext.getBody());
csh_ds.query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, function() {
return;
}, null, null);
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>