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

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

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