Commit 27f84e50 authored by 陆正友's avatar 陆正友

经租进项发票工作流页面判断

parent 3b16a466
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
acp_invoice_import_pkg.submit_wfl( p_contract_id => ${@contract_id}, acp_invoice_import_pkg.submit_wfl( p_contract_id => ${@contract_id},
p_business_type => ${@business_type},
p_user_id => ${/session/@user_id}, p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id}); p_company_id => ${/session/@company_id});
end; end;
......
...@@ -64,21 +64,20 @@ ...@@ -64,21 +64,20 @@
} }
function acp522_save() { function acp522_save() {
var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord(); var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord();
if(record.get('business_type')=='LEASE'){ if(record.get('business_type_n')=='经营性租赁'){
if($('acp522_acp_invoice_import_detail_ds').validate()){ if($('acp522_acp_invoice_import_detail_ds').validate()){
$('ap_invoice_import_scanning').close(); $('ap_invoice_import_scanning').close();
var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord(); var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord();
var record_id=record.id; var record_id=record.id;
var ds_id=record.ds.id; var ds_id=record.ds.id;
console.log(record.get('business_type'));
var param = record.data; var param = record.data;
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['function_code'] = 'ACP522I'; param['function_code'] = 'ACP522J';
param['contract_id'] = record.get('contract_id'); param['contract_id'] = record.get('contract_id');
//param['business_type'] = record.get('business_type'); //param['business_type'] = record.get('business_type');
param['url_title'] = '进项发票详情'; param['url_title'] = '进项发票详情(经租)';
param['winId'] = 'aaaaa'; param['winId'] = 'bbbbb';
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link1', ds_id); hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'jz_invoice_import_detail_link1', ds_id);
} }
}else{ }else{
if($('acp522_acp_invoice_import_detail_ds').validate()){ if($('acp522_acp_invoice_import_detail_ds').validate()){
...@@ -86,14 +85,15 @@ ...@@ -86,14 +85,15 @@
var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord(); var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord();
var record_id=record.id; var record_id=record.id;
var ds_id=record.ds.id; var ds_id=record.ds.id;
console.log(record.get('business_type'));
var param = record.data; var param = record.data;
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['function_code'] = 'ACP522J'; param['function_code'] = 'ACP522I';
param['contract_id'] = record.get('contract_id'); param['contract_id'] = record.get('contract_id');
//param['business_type'] = record.get('business_type'); //param['business_type'] = record.get('business_type');
param['url_title'] = '进项发票详情(经租)'; param['url_title'] = '进项发票详情';
param['winId'] = 'bbbbb'; param['winId'] = 'aaaaa';
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'jz_invoice_import_detail_link1', ds_id); hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link1', ds_id);
} }
} }
} }
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<a:map from="contract_number" to="contract_number"/> <a:map from="contract_number" to="contract_number"/>
<a:map from="contract_name" to="contract_name"/> <a:map from="contract_name" to="contract_name"/>
<a:map from="contract_id" to="contract_id"/> <a:map from="contract_id" to="contract_id"/>
<a:map from="business_type" to="business_type"/> <a:map from="business_type_n" to="business_type_n"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
</a:fields> </a:fields>
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
var hd_record = $(hd_id).getAt(0); var hd_record = $(hd_id).getAt(0);
var lease_item_amount = hd_record.get('lease_item_amount'); var lease_item_amount = hd_record.get('lease_item_amount');
var business_type = hd_record.get('business_type');
console.log(business_type);
if ($(ds_id).getAll().dirty) { if ($(ds_id).getAll().dirty) {
return; return;
} }
...@@ -59,10 +61,10 @@ ...@@ -59,10 +61,10 @@
} }
var tempa = records[i].get('total_amount') || 0; var tempa = records[i].get('total_amount') || 0;
var tempb = plus((records[i].get('net_amount') || 0), (records[i].get('tax_amount') || 0)); var tempb = plus((records[i].get('net_amount') || 0), (records[i].get('tax_amount') || 0));
if (tempa != tempb) { // if (tempa != tempb) {
Leaf.showMessage('提示', '发票明细行存在价税合计不等于不含税金额和税额之和!'); // Leaf.showMessage('提示', '发票明细行存在价税合计不等于不含税金额和税额之和!');
return; // return;
} // }
var r = records[i]; var r = records[i];
var d = r.get(name); var d = r.get(name);
var n = records[i].get('total_amount') || 0; var n = records[i].get('total_amount') || 0;
...@@ -82,10 +84,10 @@ ...@@ -82,10 +84,10 @@
} }
} }
} }
if (sum != lease_item_amount) { // if (sum != lease_item_amount) {
Leaf.showMessage('提示', '本次发票明细含税总计不等于该合同设备价!'); // Leaf.showMessage('提示', '本次发票明细含税总计不等于该合同设备价!');
return; // return;
} // }
var diff = ((net_lease_item_amount + sum_tax - lease_item_amount) > 0 ? (net_lease_item_amount + sum_tax - lease_item_amount) : (lease_item_amount - sum_tax - net_lease_item_amount)); var diff = ((net_lease_item_amount + sum_tax - lease_item_amount) > 0 ? (net_lease_item_amount + sum_tax - lease_item_amount) : (lease_item_amount - sum_tax - net_lease_item_amount));
// if (diff > 1) { // if (diff > 1) {
...@@ -97,7 +99,8 @@ ...@@ -97,7 +99,8 @@
Leaf.request({ Leaf.request({
url: $('acp_invoice_inf_import_submit_link').getUrl(), url: $('acp_invoice_inf_import_submit_link').getUrl(),
para: { para: {
contract_id: hd_record.get('contract_id') contract_id: hd_record.get('contract_id'),
business_type: hd_record.get('business_type')
}, },
success: function (res) { success: function (res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......
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