Commit c989d8e1 authored by chenzhuo's avatar chenzhuo

收款自动导入

parent d7748e0f
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh509_import_pkg.delete_vat_tmp(
p_batch_id => ${/session/@session_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
csh509_import_pkg.csh509_import_confirm(p_header_id => ${/session/@session_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter inputPath="/session/@user_id"/>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-09-05 下午2:22:44
$Revision: 1.0
$Purpose: 导入提示信息
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select c.transaction_num,
decode(c.transaction_date_flag,'Y','是','否') transaction_date_flag,
decode(c.transaction_amount_flag,'Y','是','否') transaction_amount_flag,
decode(c.bank_account_name_flag,'Y','是','否') bank_account_name_flag
from csh509_import_history c
WHERE batch_id = ${/session/@session_id}
and nvl(matching_flag, 'N') = 'N'
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure outputPath="/parameter">
<a:model-execute model="csh.CSH509.csh509_delete_vat_tmp"/>
<a:import-excel header_id="${/session/@session_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="CSH509_TRANS_IMPORT" user_id="${/session/@user_id}"/>
<a:model-execute model="csh.CSH509.csh509_import_confirm"/>
</a:init-procedure>
<a:view>
<a:link id="csh509_confirm_link" url="${/request/@context_path}/modules/csh/CSH509/csh_transaction_receipt_confirm.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.Masker.unmask(Ext.getBody());
window.location.href = $('csh509_confirm_link').getUrl()+'?kind=import';
]]></script>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-09-10 下午13:55:42
$Revision: 1.0
$Purpose: 导出结果展示
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure><![CDATA[
]]></a:init-procedure>
<a:view template="default">
<script><![CDATA[
function match_result_return() {
$('${/parameter/@winId}').close();
}
]]></script>
<a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="match_result_ds" autoQuery="true" fetchAll="true" model="csh.CSH509.csh509_information" pageSize="18">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton bind="match_result_grid" type="excel"/>
<a:gridButton click="match_result_return" text="返回"/>
</a:screenTopToolbar>
<a:grid id="match_result_grid" bindTarget="match_result_ds" Height="250" Width="680">
<a:columns>
<a:column name="transaction_num" align="center" prompt="现金事务编号" width="200"/>
<a:column name="transaction_date_flag" align="center" prompt="收款日期是否一致" width="150"/>
<a:column name="transaction_amount_flag" align="center" prompt="收款金额是否一致" width="150"/>
<a:column name="bank_account_name_flag" align="center" prompt="对方账户名是否一致" width="150"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: copy from hec
$Date: 2011-7-29 下午04:08:50
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view>
<script type="text/javascript"><![CDATA[
function saveClick(){
if (document.getElementById('importFile').value){
var fileName = document.getElementById('importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
if (fileType != '.xls'&&fileType != '.xlsx'){
alert('请选择正确的导入文件!');
} else {
//锁屏
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
document.getElementById('importForm').submit();
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="label_ds" autoCreate="true">
<a:fields>
<a:field name="label2" defaultValue="1、 严格按照导入模板整理数据,检查必输事项是否缺少数据。"/>
<a:field name="label3" defaultValue="2、 关闭Excel文件后,方可进行产品主数据导入。"/>
<a:field name="label4" defaultValue="3、 本导入程序只支持Office Excel。"/>
<a:field name="label5" defaultValue="仔细阅读上述事项,并检查确认无误。"/>
<a:field name="label6" defaultValue="导入完毕后,请在系统内核实数据是否导入成功。"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入注意事项" width="400">
<a:label name="label2" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label3" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label4" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label5" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
<a:label name="label6" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="importForm" action="csh509_import_trans_upload.lview?session_id=${/parameter/@session_id}&amp;_csrf=${/session/@_csrf.token}" enctype="multipart/form-data" method="post">
<label style="margin-left:10px;margin-top:10px;"><![CDATA[请选择文件:]]></label>
<input name="CONTENT" id="importFile" style="margin-bottom:4px;width:160px;height:22px;" type="file"/>
<input onclick="saveClick()" style="margin-left:50px;margin-top:10px;width:60px;" type="button" value="导入"/>
</form>
</a:fieldSet>
</a:view>
</a:screen>
......@@ -45,6 +45,8 @@
<a:link id="csh510_csh_transaction_import_link"
url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<a:link id="csh509_csh_transaction_upload_link" url="${/request/@context_path}/modules/csh/CSH509/csh509_transaction_upload.lview"/>
<a:link id="csh509_match_result_link" url="${/request/@context_path}/modules/csh/CSH509/csh509_match_result.lview"/>
<script type="text/javascript"><![CDATA[
//添加一个全局变量,该变量用于判断是债权内勤还是会计担当进行确认
......@@ -548,6 +550,48 @@
$('csh_transaction_receipt_maintain_grid_ds')._export(null, '收款维护');
}
//add by 26887cz 2021-08-31 收款单导入匹配
function csh510_receipt_import() {
new Leaf.Window({
id: 'upload_window',
url: $('csh509_csh_transaction_upload_link').getUrl(),
title: '${l:PROMPT.LOADDATA}',
width: 420,
height: 280
});
}
window.onload = function() {
var kind = '${/parameter/@kind}';
if(kind == 'import'){
Leaf.request({
url: '${/request/@context_path}/autocrud/csh.CSH509.csh509_information/query',
para: '',
success: function (data) {
if (data.result.record) {
var win = new Leaf.Window({
id: 'csh509_match_result_window_id',
url: $('csh509_match_result_link').getUrl(),
params: {
winId: 'csh509_match_result_window_id'
},
title: '导入不匹配信息',
height: 350,
width: 700
});
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
]]></script>
<a:dataSets>
<a:dataSet id="position_code_ds">
......@@ -804,6 +848,7 @@
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
<!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
<a:gridButton click="csh510_receipt_import" text="导入"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
title="收款核销" style="margin-left:20px">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment