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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: yimeng
$Date: 2014-11-24 下午05:25:12
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query model="acr.acr_get_sys_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="ACRIMPORT" user_id="${/session/@user_id}"/>
<a:model-query defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = 'ACRIMPORT'" model="acr.acr_plan_import_get_header_status" rootPath="status"/>
<a:model-query autoCount="false" defaultWhereClause="header_id=${/model/header/record/@header_id} order by line_id" fetchAll="true" model="acr.acr_plan_import_get_fnd_data" rootPath="importData"/>
</a:init-procedure>
<a:view>
<a:link id="csh_create_receipt_trx_link" url="${/request/@context_path}/modules/csh/CSH533N/csh_create_receipt_trx.lview"/>
<!-- <a:link id="csh_trx_delete_link" model="csh.CSH531N.csh_trx_batch_interface" modelaction="delete"/> -->
<a:link id="csh_excel_result_link" model="csh.CSH533N.csh_excel_result" modelaction="update"/>
<script type="text/javascript"><![CDATA[
function submmit(){
Leaf.request({
url: $('csh_excel_result_link').getUrl(),
para: {header_id :'${/parameter/@header_id}',
batch_id :'${/model/header/record/@header_id}',
type:'${/parameter/@type}'},
success: function(res) {
parent.Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '导入成功',
duration: 5000
});
setTimeout(function(){window.location.href = $('csh_create_receipt_trx_link').getUrl();},'500');
},
failure:function(){
Leaf.showMessage('${l:PROMPT}','导入出错!',function(){
location.href = $('csh_create_receipt_trx_link').getUrl();
});
},
error:function(){
Leaf.showMessage('${l:PROMPT}','导入出错!',function(){
location.href = $('csh_create_receipt_trx_link').getUrl();
});
},
scope: this
});
}
]]></script>
<script type="text/javascript"><![CDATA[
Leaf.onReady(submmit());
]]></script>
</a:view>
</a:screen>