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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhuxianfei
$Date: 2017年8月17日 下午3:55:06
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<!-- <a:init-procedure>
<a:model-query fetchAll="true" model="cont.CON506.get_sys_role_code" rootPath="role_path"/>
</a:init-procedure>-->
<a:view>
<a:link id="ds_abc_trans_confirm_link"
url="${/request/@context_path}/modules/ccb/CCB503/ds_abc_trans_confirm.lview"/>
<a:link id="ds_abc_trans_link"
url="${/request/@context_path}/modules/ccb/CCB503/ds_abc_transaction_detail.lview"/>
<a:link id="init_abc_inteface_link" model="ccb.CCB503.ds_abc_trans_update" modelaction="insert"/>
<a:link id="ds_abc_upload_txt_link"
url="${/request/@context_path}/modules/ccb/CCB503/ds_abc_import_txt.lview"/>
<a:link id="ds_abc_download_txt_link"
url="${/request/@context_path}/modules/ccb/CCB503/ds_abc_download_txt.lsc"/>
<script type="text/javascript"><![CDATA[
function ccb503_abc_query() {
$('csh_abc_result_ds').query();
}
function ccb503_abc_reset() {
$('csh_abc_query_ds').reset();
}
function ds_abc_detail_open(head_id) {
var win = new Leaf.Window({
id: 'ds_abc_transaction_detail_link_winId',
url: $('ds_abc_trans_confirm_link').getUrl(),
params: {
head_id: head_id,
winId: 'ds_abc_transaction_detail_link_winId'
},
title: '扣款详细信息',
fullScreen: true,
draggable: true
});
win.on('close', function () {
ccb503_abc_query();
});
}
function ds_abc_detail_render(value, record, name) {
return '<a href="javascript:ds_abc_detail_open(' + record.get('head_id') + ')">' + value + '</a>';
}
var check_flag = 'N';
var str = '';
function ccb503_abc_add() {
var records = $('csh_abc_result_ds').getAll();
if (records.length > 0) {
for (var i = 0; i < records.length; i++) {
if (records[i].get('status') == 'NEW') {
check_flag = 'N';
} else {
check_flag = 'Y'
}
str = str + check_flag;
}
}
if (str.indexOf('N') != -1) {
Leaf.showMessage('提示', '存在还未回盘的文件,不可再次生成代扣文件!');
return;
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('init_abc_inteface_link').getUrl(),
para: {
'session_id': '${/session/@session_id}',
'user_id': '${/session/@user_id}'
},
success: function () {
Leaf.Masker.unmask(Ext.getBody());
open_csh_trans_detail();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function open_csh_trans_detail() {
var win = new Leaf.Window({
id: 'ds_abc_trans_link_winId',
url: $('ds_abc_trans_link').getUrl(),
params: {
winId: 'ds_abc_trans_link_winId'
},
title: '生成代扣数据',
fullScreen: true
});
win.on('close', function () {
$('csh_abc_result_ds').query();
});
}
function ccb503_abc_import() {
var record = $('csh_abc_result_ds').getCurrentRecord();
if (record.get('status') != 'NEW') {
Leaf.showMessage('提示', '该数据不是新建状态,不可操作');
return;
}
var win = new Leaf.Window({
id: 'ds_abc_upload_link_winId',
url: $('ds_abc_upload_txt_link').getUrl() + '?header_number=' + record.get('header_number'),
params: {
winId: 'ds_abc_upload_link_winId'
},
title: '扣款文件上传',
width: 420,
height: 275
});
win.on('close', function () {
$('csh_abc_result_ds').query();
});
}
function fileDownload_render(value, record, name) {
var url = $('ds_abc_download_txt_link').getUrl();
return '<a href="' + url + '?header_number=' + record.get('header_number') + '">' + '下载' + '</a>';
}
]]></script>
<a:dataSets>
<a:dataSet id="hd_status_ds" lookupCode="DS_ABC_STATUS"/>
<a:dataSet id="csh_abc_query_ds" autoCreate="true">
<a:fields>
<a:field name="due_date_from"/>
<a:field name="due_date_to"/>
<a:field name="user_name" lovGridHeight="350" lovHeight="500" lovService="rsc.RSC710.sys_user_lov"
lovWidth="500">
<a:mapping>
<a:map from="user_id" to="user_id"/>
<a:map from="description" to="user_name"/>
</a:mapping>
</a:field>
<a:field name="status_desc" displayField="code_value_name" options="hd_status_ds"
returnField="status" valueField="code_value"/>
<a:field name="status"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_abc_result_ds" autoPageSize="true" autoQuery="true"
model="ccb.CCB503.ds_abc_transaction_query" queryDataSet="csh_abc_query_ds" selectable="true"
selectionModel="single">
<a:fields>
<a:field name="header_number"/>
<a:field name="due_date"/>
<a:field name="row_count"/>
<a:field name="amount_total"/>
<a:field name="user_name"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="ccb503_abc_query" text="HLS.QUERY"/>
<a:gridButton click="ccb503_abc_reset" text="HLS.RESET"/>
<a:gridButton click="ccb503_abc_add" text="生成代扣单"/>
<a:gridButton click="ccb503_abc_import" text="导入回盘文件"/>
</a:screenTopToolbar>
<a:form column="5" labelWidth="100" marginWidth="50" row="1" title="查询">
<a:textField name="header_number" bindTarget="csh_abc_query_ds" prompt="文件名"/>
<a:datePicker name="due_date_from" bindTarget="csh_abc_query_ds" prompt="扣款日期从"/>
<a:datePicker name="due_date_to" bindTarget="csh_abc_query_ds" prompt="扣款日期到"/>
<a:comboBox name="status_desc" bindTarget="csh_abc_query_ds" prompt="文件状态"/>
<a:lov name="user_name" bindTarget="csh_abc_query_ds" prompt="操作者"/>
</a:form>
<a:grid id="csh_abc_grid" bindTarget="csh_abc_result_ds" marginHeight="210" marginWidth="50" navBar="true">
<a:columns>
<a:column name="header_number" align="center" prompt="文件名" renderer="ds_abc_detail_render"
width="150"/>
<a:column name="due_date" align="center" prompt="扣款日期" renderer="Leaf.formatDate"/>
<a:column name="row_count" align="right" prompt="应扣款条数"/>
<a:column name="amount_total" align="right" prompt="应扣款总额" renderer="Leaf.formatMoney"
width="150"/>
<a:column name="succe_count_total" align="right" prompt="扣款成功条数"/>
<a:column name="succe_amount_total" align="right" prompt="扣款成功金额" width="150"/>
<a:column name="fail_count_total" align="right" prompt="扣款失败条数"/>
<a:column name="fail_amount_total" align="right" prompt="扣款失败金额" width="150"/>
<!--<a:column name="write_off_error_total" align="right" prompt="自动核销失败条数"/>
<a:column name="write_off_error_amount" align="right" prompt="自动核销失败总额" width="150"/>-->
<a:column align="center" prompt="CSH533.DOWNLOAD_FILE" renderer="fileDownload_render" width="80"/>
<a:column name="status_n" align="center" prompt="文件状态" width="130"/>
<a:column name="user_name" align="center" prompt="操作人" width="120"/>
<a:column name="job_status_n" align="center" prompt="核销下账状态" width="120"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>