Commit d6394128 authored by 25484's avatar 25484

[feat]进项发票导入完善

parent e1e94066
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhuxianfei
$Date: 2018/7/26 14:11
$Revision: 1.0
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acp_invoice_import_pkg.acp_invoice_import(p_invoice_type => ${@invoice_type},
p_invoice_code => ${@invoice_code},
p_invoice_number => ${@invoice_number},
p_net_amount => ${@net_amount},
p_invoice_date => ${@invoice_date},
p_last_updated_by => ${/session/@user_id},
p_contract_id => ${@contract_id},
p_invoice_line_id => ${@invoice_line_id});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
var override_queryfields = [
];
var add_datafilters = [ {
name : 'confirmation_status',
expression : "t1.confirmation_status is not null"
} ];
add_datafilter();
override();
var override_queryfields = [
];
var add_datafilters = [ {
name : 'confirmation_status',
expression : "t1.confirmation_status is null"
} ];
add_datafilter();
override();
var override_queryfields = [
];
var add_datafilters = [ {
name : 'confirmation_status',
expression : "t1.confirmation_status is not null"
} ];
add_datafilter();
override();
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:view>
<a:link id="ap_invoice_import_scanning_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_scanning.lview"/>
<script><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var url = $('ap_invoice_import_scanning_link').getUrl();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
var rs = $(ds_id).getSelected();
var contract_id = rs[0].get('contract_id');
var invoice_line_id = rs[0].get('invoice_line_id');
Leaf.Window({
id: 'ap_invoice_import_scanning',
url: url,
params: {
contract_id: contract_id,
invoice_line_id: invoice_line_id
},
title:'${l:HLS.SUPPORTING_DOCUMENT}',
width: 300,
height:100
}).on('close', function() {
$('AP_INVOICE_IMPORT_DETAIL_G_AP_acp_invoice_ln_ds').query();
});
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view>
<a:link id="acp_invoice_inf_import_link" model="acp.ACP522.acp_invoice_inf_import" modelaction="update"/>
<script><![CDATA[
function invoice_inf_process(dataset, record, name, value, oldvalue) {
debugger;
var test = $('acp522_acp_invoice_import_ds').getAt(0).get('invoice');
var strs = new Array();
strs = test.split(',');
var invoice_type = strs[1];
var invoice_code = strs[2];
var invoice_number = strs[3];
var net_amount = strs[4];
var invoice_date = strs[5];
if (strs.length == 8) {
Leaf.request({
url: $('acp_invoice_inf_import_link').getUrl(),
para: {
invoice_type: invoice_type,
invoice_code: invoice_code,
invoice_number: invoice_number,
net_amount: net_amount,
invoice_date: invoice_date,
contract_id: '${/parameter/@contract_id}',
invoice_line_id: '${/parameter/@invoice_line_id}'
},
success: function (res) {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
});
},
scope: this
});
$('ap_invoice_import_scanning').close();
} else {
// $('acp600_acp_invoice_hd_ds').getAt(0).setReadOnly(true);
Leaf.showMessage('提示', '发票信息误!');
}
}
]]></script>
<a:dataSets>
<a:dataSet id="acp522_acp_invoice_import_ds">
<a:fields>
<a:field name="invoice" required="true"/>
</a:fields>
<a:events>
<a:event name="update" handler="invoice_inf_process"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:form title="请扫描发票二维码">
<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds"/>
</a:form>
</a:screenBody>
</a:view>
</a:screen>
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