Commit 15b4faf0 authored by 陆正友's avatar 陆正友

Merge remote-tracking branch 'origin/remote_dev' into remote_dev

parents 9d0fa6ad 75692bd1
<?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
csh_payment_asset_req_pkg.req_acp_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_payment_req_id => ${@payment_req_id},
p_user_id => ${/session/@user_id}
);
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2024/1/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
csh_payment_asset_req_pkg.req_acp_import_total(
p_invoice_type => ${@invoice_type},
p_invoice_code => ${@invoice_code},
p_invoice_number => ${@invoice_number},
p_total_amount => ${@total_amount},
p_invoice_date => ${@invoice_date},
p_payment_req_id => ${@payment_req_id},
p_user_id => ${/session/@user_id}
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
function detail_link(id, name, query_only) { function detail_link(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var param = {}; var param = {};
param['payment_req_id'] = record.get('payment_req_id'); param['payment_req_id'] = record.get('payment_req_id');
param['bp_id'] = record.get('bp_id_agent_level1');
param['business_type'] = record.get('business_type'); param['business_type'] = record.get('business_type');
if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') { if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') {
param['function_usage'] = 'UPDATE'; param['function_usage'] = 'UPDATE';
......
...@@ -29,25 +29,24 @@ ...@@ -29,25 +29,24 @@
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/>
<a:link id="csh_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="csh_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="csh_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="acp_invoice_inf_import_link" model="acp.ACP522.acp_invoice_inf_import" modelaction="update"/> <a:link id="csh_invoice_inf_import_link" model="csh.CSH501C.req_acp_inf_import" modelaction="update"/>
<a:link id="acp_invoice_inf_import_total_link" model="acp.ACP522.acp_invoice_inf_import_total" modelaction="update"/> <a:link id="csh_invoice_inf_import_total_link" model="csh.CSH501C.req_acp_inf_import_total" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
//var con_business_type='${/parameter/@con_business_type}'||'${/model/loan_flag_path/record/@business_type}'||'LEASE'; function get_current_amount(amt) {
function get_current_amount(amt) {
if (!Ext.isEmpty(amt)) { if (!Ext.isEmpty(amt)) {
return parseFloat(amt).toFixed(2); return parseFloat(amt).toFixed(2);
} else { } else {
return 0; return 0;
} }
} }
//如果头id 不为空,就使用自在定义的ds进行查询
Leaf.onReady(function () { Leaf.onReady(function () {
if ('${/parameter/@source_type}' == 'WFL'||'${/parameter/@source_type}' == 'WFL_N'||'${/parameter/@source_type}' == 'WFL_ACCT') { if ('${/parameter/@source_type}' == 'WFL'||'${/parameter/@source_type}' == 'WFL_N'||'${/parameter/@source_type}' == 'WFL_ACCT') {
if(document.getElementById('${/parameter/@layout_code}_save')){ if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
} }
} }
//进项发票信息 //进项发票信息
var first = document.getElementsByClassName("item-input-wrap"); var first = document.getElementsByClassName("item-input-wrap");
...@@ -65,9 +64,7 @@ ...@@ -65,9 +64,7 @@
record.getField('bp_bank_account_num').setReadOnly(true); record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_num_n').setReadOnly(true); record.getField('bp_bank_account_num_n').setReadOnly(true);
record.getField('req_date').setReadOnly(true); record.getField('req_date').setReadOnly(true);
}
}
} }
} }
...@@ -111,163 +108,161 @@ ...@@ -111,163 +108,161 @@
} }
} }
//进项票
} var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hl_req_payment_acp');
//进项票 if (name == 'invoice' && value) {
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hl_req_payment_acp'); var payment_req_id = hdrecord.get('payment_req_id');
if (name == 'invoice' && value && hdrecord.get('contract_id')) { var strs = value.split(',');
var contract_id = hdrecord.get('contract_id'); var invoice_type = strs[1];
var strs = value.split(','); var invoice_code = strs[2];
var invoice_type = strs[1]; var invoice_number = strs[3];
var invoice_code = strs[2]; var net_amount = strs[4];
var invoice_number = strs[3]; var invoice_date = strs[5];
var net_amount = strs[4]; var total_amount =strs[4];
var invoice_date = strs[5]; if (strs.length == 9) {
var total_amount =strs[4]; //校验重复发票号码 add by 26887cz 2021-09-07
//检验设备价格需要大于不含税金额 var acr_records = $(acp_ds_id).getAll();
if (strs.length == 9) { for (var i = 0; i < acr_records.length; i++) {
//校验重复发票号码 add by 26887cz 2021-09-07 if (acr_records[i].get("invoice_number") == invoice_number) {
var acr_records = $(acp_ds_id).getAll(); Leaf.showMessage('提示', '发票号码重复,请重新扫描!');
for (var i = 0; i < acr_records.length; i++) { setTimeout(function () {
if (acr_records[i].get("invoice_number") == invoice_number) { record.set('invoice', '');
Leaf.showMessage('提示', '发票号码重复,请重新扫描!'); }, 50);
setTimeout(function () { return;
record.set('invoice', ''); }
}, 50);
return;
} }
} Leaf.request({
Leaf.request({ url: $('csh_invoice_inf_import_link').getUrl(),
url: $('acp_invoice_inf_import_link').getUrl(), para: {
para: { invoice_type: invoice_type,
invoice_type: invoice_type, invoice_code: invoice_code,
invoice_code: invoice_code, invoice_number: invoice_number,
invoice_number: invoice_number, net_amount: net_amount,
net_amount: net_amount, invoice_date: invoice_date,
invoice_date: invoice_date, payment_req_id:payment_req_id
contract_id: contract_id
}, },
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '导入成功', msg: '导入成功',
duration: 2000 duration: 2000
} }
); );
setTimeout(function () { setTimeout(function () {
record.set('invoice', ''); record.set('invoice', '');
}, 50); }, 50);
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); $(acp_ds_id).query();
$(acp_ds_id).query(); }, failure: function () {
}, failure: function () { setTimeout(function () {
setTimeout(function () { record.set('invoice', '');
record.set('invoice', ''); }, 50);
}, 50); },
}, error: function () {
error: function () { setTimeout(function () {
setTimeout(function () { record.set('invoice', '');
record.set('invoice', ''); }, 50);
}, 50); },
}, scope: this
scope: this });
}); } else if (strs.length == 8) {
} else if (strs.length == 8) { //校验重复发票号码 add by 26887cz 2021-09-07
//校验重复发票号码 add by 26887cz 2021-09-07 var acr_records = $(acp_ds_id).getAll();
var acr_records = $(acp_ds_id).getAll(); for (var i = 0; i < acr_records.length; i++) {
for (var i = 0; i < acr_records.length; i++) { if (acr_records[i].get("invoice_number") == invoice_number) {
if (acr_records[i].get("invoice_number") == invoice_number) { Leaf.showMessage('提示', '发票号码重复,请重新扫描!');
Leaf.showMessage('提示', '发票号码重复,请重新扫描!'); setTimeout(function () {
setTimeout(function () { record.set('invoice', '');
record.set('invoice', ''); }, 50);
}, 50); return;
return; }
} }
} Leaf.request({
Leaf.request({ url: $('csh_invoice_inf_import_total_link').getUrl(),
url: $('acp_invoice_inf_import_total_link').getUrl(), para: {
para: { invoice_type: invoice_type,
invoice_type: invoice_type, invoice_code: invoice_code,
invoice_code: invoice_code, invoice_number: invoice_number,
invoice_number: invoice_number, total_amount: total_amount,
total_amount: total_amount, invoice_date: invoice_date,
invoice_date: invoice_date, payment_req_id:payment_req_id
contract_id: contract_id },
}, success: function () {
success: function () { Leaf.SideBar.show({
Leaf.SideBar.show({ msg: '导入成功',
msg: '导入成功', duration: 2000
duration: 2000 }
} );
); setTimeout(function () {
setTimeout(function () { record.set('invoice', '');
record.set('invoice', ''); }, 50);
}, 50); $(acp_ds_id).query();
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); }, failure: function () {
$(acp_ds_id).query(); setTimeout(function () {
}, failure: function () { record.set('invoice', '');
setTimeout(function () { }, 50);
record.set('invoice', ''); },
}, 50); error: function () {
}, setTimeout(function () {
error: function () { record.set('invoice', '');
setTimeout(function () { }, 50);
record.set('invoice', ''); },
}, 50); scope: this
}, });
scope: this } else if (strs.length == 7) {
}); //校验重复发票号码 add by 26887cz 2021-09-07
} else if (strs.length == 7) { var acr_records = $(acp_ds_id).getAll();
//校验重复发票号码 add by 26887cz 2021-09-07 for (var i = 0; i < acr_records.length; i++) {
var acr_records = $(acp_ds_id).getAll(); if (acr_records[i].get("invoice_number") == invoice_number) {
for (var i = 0; i < acr_records.length; i++) { Leaf.showMessage('提示', '发票号码重复,请重新扫描!');
if (acr_records[i].get("invoice_number") == invoice_number) { setTimeout(function () {
Leaf.showMessage('提示', '发票号码重复,请重新扫描!'); record.set('invoice', '');
setTimeout(function () { }, 50);
record.set('invoice', ''); return;
}, 50); }
return;
} }
Leaf.request({
url: $('csh_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,
payment_req_id:payment_req_id
},
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
}
);
setTimeout(function () {
record.set('invoice', '');
}, 50);
$(acp_ds_id).query();
}, failure: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
error: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
scope: this
});
}else {
Leaf.showMessage('提示', '发票信息有错误,请重新扫描!');
setTimeout(function () {
record.set('invoice', '');
}, 50);
} }
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: contract_id
},
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
}
);
setTimeout(function () {
record.set('invoice', '');
}, 50);
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(acp_ds_id).query();
}, failure: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
error: function () {
setTimeout(function () {
record.set('invoice', '');
}, 50);
},
scope: this
});
}else {
Leaf.showMessage('提示', '发票信息有错误,请重新扫描!');
setTimeout(function () {
record.set('invoice', '');
}, 50);
} }
}
}
}; };
......
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
param['screen_height'] = '600'; param['screen_height'] = '600';
param['maintain_type'] = 'UPDATE'; param['maintain_type'] = 'UPDATE';
param['winid'] = 'open_asset_create_window'; param['winid'] = 'open_asset_create_window';
param['url_title'] = '资产管理费明细页面'; param['url_title'] = '资产管理费组合利率定义';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}asset_management_link',ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}asset_management_link',ds_id);
} }
......
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
param['screen_height'] = '600'; param['screen_height'] = '600';
param['maintain_type'] = 'UPDATE'; param['maintain_type'] = 'UPDATE';
param['winid'] = 'open_asset_create_window'; param['winid'] = 'open_asset_create_window';
param['url_title'] = '资产管理费明细页面'; param['url_title'] = '资产管理费组合利率定义';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'asset_management_link_id',ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'asset_management_link_id',ds_id);
} }
......
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