Commit e2d04fff authored by stone's avatar stone

[feat] 完成付款申请书功能 [fix]修改收款申请bug

parent c5a010e9
...@@ -204,8 +204,8 @@ ...@@ -204,8 +204,8 @@
<bm:field name="tax_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="tax_code"/> <bm:field name="tax_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="tax_code"/>
<bm:field name="tax_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="tax_msg"/> <bm:field name="tax_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="tax_msg"/>
<bm:field name="error_code" expression="(select aeih.error_code from acr_ele_invoice_hd aeih where aeih.invoice_hd_id = t1.invoice_hd_id)"/> <!--<bm:field name="error_code" expression="(select aeih.error_code from acr_ele_invoice_hd aeih where aeih.invoice_hd_id = t1.invoice_hd_id)"/>
<bm:field name="error_message" expression="(select aeih.error_message from acr_ele_invoice_hd aeih where aeih.invoice_hd_id = t1.invoice_hd_id)"/> <bm:field name="error_message" expression="(select aeih.error_message from acr_ele_invoice_hd aeih where aeih.invoice_hd_id = t1.invoice_hd_id)"/>-->
<bm:field name="ele_invoice_status" <bm:field name="ele_invoice_status"
expression="nvl((select nvl(aeih.status, 'NEW') from acr_ele_invoice_hd aeih where aeih.invoice_hd_id = t1.invoice_hd_id),'NEW')"/> expression="nvl((select nvl(aeih.status, 'NEW') from acr_ele_invoice_hd aeih where aeih.invoice_hd_id = t1.invoice_hd_id),'NEW')"/>
......
...@@ -9,11 +9,24 @@ ...@@ -9,11 +9,24 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * select rownum, v.*
from (select c.contract_number, from (select c.contract_number,
c.contract_name, c.contract_name,
c.contract_id,
(select hli.pattern
from con_contract_lease_item ccli, hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id) pattern,
(select hli.machine_number
from con_contract_lease_item ccli, hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id) machine_number,
--add 添加预付款的时间
(select hbm.bp_name
from hls_bp_master hbm
where hbm.bp_id = c.bp_id_tenant) bp_id_tenant_n,
hbm.bp_name, hbm.bp_name,
cpr.apply_pay_date, to_char(cpr.apply_pay_date,'yyyy-mm-dd') apply_pay_date,
cpr.bp_bank_account_id, cpr.bp_bank_account_id,
(select cph.payment_req_number (select cph.payment_req_number
from csh_payment_req_hd cph from csh_payment_req_hd cph
...@@ -40,7 +53,6 @@ ...@@ -40,7 +53,6 @@
and c.source_doc_id = cpr.payment_req_id and c.source_doc_id = cpr.payment_req_id
and c.transaction_type = 'PAYMENT') bank_slip_num,*/ and c.transaction_type = 'PAYMENT') bank_slip_num,*/
(select bp_name (select bp_name
from hls_bp_master hbm from hls_bp_master hbm
where hbm.bp_id = cpr.bp_id) BP_ID_AGENT_N, where hbm.bp_id = cpr.bp_id) BP_ID_AGENT_N,
...@@ -48,6 +60,9 @@ ...@@ -48,6 +60,9 @@
(select hbm.bank_account_num (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.bp_bank_account_id) BP_BANK_ACCOUNT_NUM, where hbm.bank_account_id = cpr.bp_bank_account_id) BP_BANK_ACCOUNT_NUM,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.bp_bank_account_id) BP_BANK_ACCOUNT_NUM_N,
(select hbm.bank_account_name (select hbm.bank_account_name
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
...@@ -63,17 +78,18 @@ ...@@ -63,17 +78,18 @@
(select bp_name (select bp_name
from hls_bp_master hbm from hls_bp_master hbm
where hbm.bp_id = where hbm.bp_id =
(select ccli.vender_id (select bp_id
from con_contract_lease_item ccli, from hls_bp_master_bank_account t
hls_lease_item hli where t.bank_account_id = cpr.vender_bank_account_id)) vender_name,
where ccli.lease_item_id = hli.lease_item_id
and ccli.contract_id = c.contract_id)) vender_name,
(select hbm.bank_account_name (select hbm.bank_account_name
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_ID, where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_ID,
(select hbm.bank_account_num (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_number, where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_number,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_number_n,
cpr.amount, cpr.amount,
--首付款抵充金额 --首付款抵充金额
(select nvl(hd.other_payment2, 0) (select nvl(hd.other_payment2, 0)
......
...@@ -32,8 +32,8 @@ var override_queryfields = [ ...@@ -32,8 +32,8 @@ var override_queryfields = [
name: 'lease_execution_date_to', name: 'lease_execution_date_to',
queryexpression: "trunc(t1.lease_execution_date)<=to_date(${@lease_execution_date_to},'yyyy-mm-dd')" queryexpression: "trunc(t1.lease_execution_date)<=to_date(${@lease_execution_date_to},'yyyy-mm-dd')"
}, },
{custtelephone {//custtelephone',
name: 'total_amount_from', name : 'total_amount_from',
queryexpression: "t1.total_amount>=${@total_amount_from}" queryexpression: "t1.total_amount>=${@total_amount_from}"
}, },
{ {
......
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
flag = flag + 1; flag = flag + 1;
} }
} }
//一次只能对同一个合同进行确认
if (flag > 0) { if (flag > 0) {
Leaf.showErrorMessage('${l:PROMPT}', '请选择同一条合同'); Leaf.showErrorMessage('${l:PROMPT}', '请选择同一条合同');
return; return;
......
...@@ -696,8 +696,8 @@ ...@@ -696,8 +696,8 @@
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="acr515_invoice_query" text="HLS.QUERY"/> <a:gridButton click="acr515_invoice_query" text="HLS.QUERY"/>
<a:gridButton click="acr515_invoice_reset" text="HLS.RESET"/> <a:gridButton click="acr515_invoice_reset" text="HLS.RESET"/>
<!--<a:gridButton click="acr515_invoice_post" text="开票"/>--> <a:gridButton click="acr515_invoice_post" text="开票"/>
<!--<a:gridButton click="acr515_invoice_import" text="导入开票结果"/>--> <a:gridButton click="acr515_invoice_import" text="导入开票结果"/>
<a:gridButton click="acr515_invoice_post_interface" text="传入电子金税接口"/> <a:gridButton click="acr515_invoice_post_interface" text="传入电子金税接口"/>
<a:gridButton click="acr515_invoice_download_interface" text="下载电子发票"/> <a:gridButton click="acr515_invoice_download_interface" text="下载电子发票"/>
<!-- <a:gridButton click="acr515_vat_pause" text="暂挂"/> <!-- <a:gridButton click="acr515_vat_pause" text="暂挂"/>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
var records = $(ds_id).getSelected(); var records = $(ds_id).getSelected();
var param = {}; var param = {};
var datas = []; var datas = [];
var win = Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.DELETE_CONFIRM}', function okFun() { var win = Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消该笔申请?', function okFun() {
if (!records.length) { if (!records.length) {
Leaf.showMessage('提示', '请至少选择一条数据!'); Leaf.showMessage('提示', '请至少选择一条数据!');
} else { } else {
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
var records = $(ds_id).getSelected(); var records = $(ds_id).getSelected();
var param = {}; var param = {};
var datas = []; var datas = [];
var win = Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.DELETE_CONFIRM}', function okFun() { var win = Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消该笔申请?', function okFun() {
if (!records.length) { if (!records.length) {
Leaf.showMessage('提示', '请至少选择一条数据!'); Leaf.showMessage('提示', '请至少选择一条数据!');
} else { } else {
...@@ -123,57 +123,56 @@ ...@@ -123,57 +123,56 @@
}); });
} }
// //删除 // //删除
// window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () { // window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
// 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 records = $(ds_id).getSelected();
// var records = $(ds_id).getSelected(); // var param = {};
// var param = {}; // var datas = [];
// var datas = []; // var win = Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.DELETE_CONFIRM}', function okFun() {
// var win = Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.DELETE_CONFIRM}', function okFun() { // if (!records.length) {
// if (!records.length) { // Leaf.showMessage('提示', '请至少选择一条数据!');
// Leaf.showMessage('提示', '请至少选择一条数据!'); // } else {
// } else { // for (var i = 0; i < records.length; i++) {
// for (var i = 0; i < records.length; i++) { // if (records[i].get('payment_req_id')) {
// if (records[i].get('payment_req_id')) { // if (records[i].get('approval_status') != 'NEW'&& records[i].get('approval_status') != 'RETURN') {
// if (records[i].get('approval_status') != 'NEW'&& records[i].get('approval_status') != 'RETURN') { // Leaf.showWarningMessage('${l:HLS.PROMPT}', '该付款申请状态不是新建或退回,不能删除!');
// Leaf.showWarningMessage('${l:HLS.PROMPT}', '该付款申请状态不是新建或退回,不能删除!'); // return;
// return; // }
// } // data = {};
// data = {}; // data['payment_req_id'] = records[i].get('payment_req_id');
// data['payment_req_id'] = records[i].get('payment_req_id'); // data['_status'] = 'update';
// data['_status'] = 'update'; // datas.push(data);
// datas.push(data); //
// // }
// } // }
// } // param['details'] = datas;
// param['details'] = datas; // var url_l = $('delete_payment_req_link_id').getUrl();
// var url_l = $('delete_payment_req_link_id').getUrl(); // Leaf.request({
// Leaf.request({ // url: url_l,
// url: url_l, // para: datas,
// para: datas, // success: function () {
// success: function () { // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // $(ds_id).query();
// $(ds_id).query(); // },
// }, // error: function () {
// error: function () { // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // },
// }, // failure: function () {
// failure: function () { // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // },
// }, // scope: this
// scope: this // });
// }); // }
// } // }, function cancelFun() {
// }, function cancelFun() { // Leaf.SideBar.enable = true;
// Leaf.SideBar.enable = true; // window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // });
// }); // win.on('close', function () {
// win.on('close', function () { // Leaf.SideBar.enable = true;
// Leaf.SideBar.enable = true; // });
// }); //
// // };
// };
function detail_link(id, name, query_only) { function detail_link(id, name, query_only) {
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
<a:model-query fetchAll="true" model="csh.CSH501.get_loan_flag" rootPath="loan_flag_path"/> <a:model-query fetchAll="true" model="csh.CSH501.get_loan_flag" rootPath="loan_flag_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="cont811_con_sale_contract_info_print_link"
url="${/request/@context_path}/modules/csh/CSH501/payment_req_apply_print.lview"/>
<a:link id="csh_req_ddct_link" <a:link id="csh_req_ddct_link"
url="${/request/@context_path}/modules/csh/CSH504/csh_payment_req_ln_ddct.lview"/> url="${/request/@context_path}/modules/csh/CSH504/csh_payment_req_ln_ddct.lview"/>
<a:link id="csh_payment_prepayment_dk" <a:link id="csh_payment_prepayment_dk"
...@@ -70,9 +72,10 @@ ...@@ -70,9 +72,10 @@
<a:link id="csh501_confirm_invoice_link_id" <a:link id="csh501_confirm_invoice_link_id"
url="${/request/@context_path}/modules/acp/ACP517/acp_invoice_entrance.lview"/> url="${/request/@context_path}/modules/acp/ACP517/acp_invoice_entrance.lview"/>
<a:link id="get_xml" model="cont.CON501.con_change_case_submit" modelaction="execute"/> <a:link id="get_xml" model="cont.CON501.con_change_case_submit" modelaction="execute"/>
<a:link id="attachment_uploadFile_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd" modelaction="query" /> <!-- 生成Excel文件-->
<a:link id="tre_loan_con_print_excel_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_contract_export.lsc"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
//如果头id 不为空,就使用自在定义的ds进行查询 //如果头id 不为空,就使用自在定义的ds进行查询
...@@ -111,7 +114,7 @@ ...@@ -111,7 +114,7 @@
lineRecords = ln_ds.getAll(); lineRecords = ln_ds.getAll();
} }
if (hdds_id && ds.id == hdds_id) { if (hdds_id && ds.id == hdds_id) {
// //
if (name == 'first_payment_date') { if (name == 'first_payment_date') {
var first_payment_date = hdrecord.get('first_payment_date'); var first_payment_date = hdrecord.get('first_payment_date');
if (first_payment_date.getDate() != '5' && first_payment_date.getDate() != '10' && first_payment_date.getDate() != '15' && first_payment_date.getDate() != '20' && first_payment_date.getDate() != '25' && first_payment_date.getDate() != '30') { if (first_payment_date.getDate() != '5' && first_payment_date.getDate() != '10' && first_payment_date.getDate() != '15' && first_payment_date.getDate() != '20' && first_payment_date.getDate() != '25' && first_payment_date.getDate() != '30') {
...@@ -227,7 +230,7 @@ ...@@ -227,7 +230,7 @@
} }
if (ds.getAll().length == 1) { if (ds.getAll().length == 1) {
first_load_flag = 'Y'; first_load_flag = 'Y';
// //
hdrecord.set('bp_id', record.get('bp_id')); hdrecord.set('bp_id', record.get('bp_id'));
hdrecord.set('bp_id_n', record.get('bp_code')); hdrecord.set('bp_id_n', record.get('bp_code'));
hdrecord.set('bp_name', record.get('bp_name')); hdrecord.set('bp_name', record.get('bp_name'));
...@@ -254,7 +257,9 @@ ...@@ -254,7 +257,9 @@
var record = records[i]; var record = records[i];
if (!record.get('apply_pay_date')) { if (!record.get('apply_pay_date')) {
record.set('apply_pay_date', Leaf.formatDate(new Date())); //添加时间为预定的每月20号
var pre_date= [new Date().getFullYear(),new Date().getMonth()+1,20].join('-');
record.set('apply_pay_date',pre_date);
} }
$(lnds_id).create(Ext.apply({}, record.data)); $(lnds_id).create(Ext.apply({}, record.data));
} }
...@@ -394,32 +399,41 @@ ...@@ -394,32 +399,41 @@
//打印 //打印
function csh501_print() { function csh501_print() {
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records_l = $(lnds_id).getAll(); var records_l = $(lnds_id).getAll();
console.log(records_l);
var hd_record = $(hdds_id).getCurrentRecord(); var hd_record = $(hdds_id).getCurrentRecord();
if (records_l.length > 0) { //add by st
// var birt_print_path = '${/parameter/@birt_print_path}'; var url;
var birt_print_path = '${/request/@context_path}/reports'; /* url = $('tre_loan_con_print_excel_link_id').getUrl() + '?payment_req_id=' +hd_record.get('payment_req_id');
// var url_1 = 'http://199.10.10.65:8180/reportapp/frameset?__report=reports/req/new/' + 'con_payment_req.rptdesign' + '&&__format=PDF'; window.open(href = url);*/
var url_1 = birt_print_path + '?__report=reports/req/new/' + 'con_payment_req.rptdesign' + '&&__format=PDF'; debugger
var url_1_param = '&&batch_id=' + ${/session/@session_id} +'&&payment_req_id=' + hd_record.get('payment_req_id'); /*var sale_id = record[0].get('sale_id');
window.open(url_1 + url_1_param); var sale_code = record[0].get('sale_code');*/
} var template_name = 'payment_apply_content.xml';
// var template_name = '1.xml';
var file_name = '付款申请书.doc';
var url = $('cont811_con_sale_contract_info_print_link').getUrl() + '?template_name=' + template_name + '&payment_req_id=' + hd_record.get('payment_req_id') + '&file_name=' + encodeURI(file_name);
window.location.href = encodeURI(url);
} }
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
Leaf.SideBar.enable = false; Leaf.SideBar.enable = false;
//提交之前必须要保存 //提交之前必须要保存
/* var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); /* var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getCurrentRecord(); var hd_record = $(hdds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id'); var payment_req_id = hd_record.get('payment_req_id');
if(payment_req_id){ if(payment_req_id){
$L.showInfoMessage("提示",'请先保存数据!'); $L.showInfoMessage("提示",'请先保存数据!');
return; return;
}*/ }*/
window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](csh_payment_req_submit_finally); window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](csh_payment_req_submit_finally);
}; };
...@@ -429,12 +443,15 @@ ...@@ -429,12 +443,15 @@
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var hd_ds = $(hdds_id), var hd_ds = $(hdds_id),
ln_ds = $(lnds_id); ln_ds = $(lnds_id);
var hd_record = hd_ds.getCurrentRecord(), var hd_record = hd_ds.getCurrentRecord(),
ln_records = ln_ds.getAll(); ln_records = ln_ds.getAll();
if (ln_records.length > 0 && !ln_records[0].get('payment_req_ln_id')) { if (ln_records.length > 0 && !ln_records[0].get('payment_req_ln_id')) {
Leaf.showMessage('${HLS.PROMPT}', '请先保存!'); Leaf.showMessage('${HLS.PROMPT}', '请先保存!');
} else { }else{
csh501_print();
}
/*else {
Leaf.request({ Leaf.request({
url: '${/request/@context_path}/autocrud/csh.CSH504.csh_payment_print/execute', url: '${/request/@context_path}/autocrud/csh.CSH504.csh_payment_print/execute',
...@@ -457,7 +474,7 @@ ...@@ -457,7 +474,7 @@
}, Leaf.Masker.unmask(Ext.getBody())); }, Leaf.Masker.unmask(Ext.getBody()));
} }*/
}; };
// //车辆信息 // //车辆信息
...@@ -493,7 +510,7 @@ ...@@ -493,7 +510,7 @@
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var hd_ds = $(hdds_id), var hd_ds = $(hdds_id),
ln_ds = $(lnds_id); ln_ds = $(lnds_id);
var Array = ln_ds.getSelected(); var Array = ln_ds.getSelected();
if (Array.length < 1) { if (Array.length < 1) {
Leaf.showMessage('${l:PROMPT}', '${l:CHOOSE_ONE_RECORD}'); Leaf.showMessage('${l:PROMPT}', '${l:CHOOSE_ONE_RECORD}');
...@@ -505,7 +522,7 @@ ...@@ -505,7 +522,7 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var hdrecord = hd_ds.getCurrentRecord(); var hdrecord = hd_ds.getCurrentRecord();
for (var i = 0, for (var i = 0,
length = Array.length; i < length; i++) { length = Array.length; i < length; i++) {
if (Array[i].isNew) { if (Array[i].isNew) {
ln_ds.removeLocal(Array[i]); ln_ds.removeLocal(Array[i]);
hdrecord.set('amount', minus(hdrecord.get('amount') || 0, Array[i].act_amount || 0)); hdrecord.set('amount', minus(hdrecord.get('amount') || 0, Array[i].act_amount || 0));
...@@ -604,11 +621,11 @@ ...@@ -604,11 +621,11 @@
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'), var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'),
lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var hd_ds = $(hdds_id), var hd_ds = $(hdds_id),
ln_ds = $(lnds_id); ln_ds = $(lnds_id);
var hd_record = hd_ds.getCurrentRecord(), var hd_record = hd_ds.getCurrentRecord(),
line_records = ln_ds.getSelected(); line_records = ln_ds.getSelected();
var payment_req_id = hd_record.get('payment_req_id'); var payment_req_id = hd_record.get('payment_req_id');
if (line_records.length == 0) { if (line_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条单据进行确认!'); Leaf.showMessage('${l:PROMPT}', '请选择一条单据进行确认!');
...@@ -643,8 +660,8 @@ ...@@ -643,8 +660,8 @@
//支付金额为应付代理店 //支付金额为应付代理店
var this_pay_amount=plus(line_record.get('residual_agent_amount'),line_record.get('residual_vender_amount')); var this_pay_amount=plus(line_record.get('residual_agent_amount'),line_record.get('residual_vender_amount'));
if (this_pay_amount <=0) { if (this_pay_amount <=0) {
Leaf.showMessage('${l:PROMPT}', '本次支付金额为空!'); Leaf.showMessage('${l:PROMPT}', '本次支付金额为空!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return; return;
...@@ -659,6 +676,7 @@ ...@@ -659,6 +676,7 @@
bp_bank_account_code = line_record.get('bp_bank_account_code'); bp_bank_account_code = line_record.get('bp_bank_account_code');
bp_bank_account_num = line_record.get('bp_bank_account_num'); bp_bank_account_num = line_record.get('bp_bank_account_num');
var vender_bank_account_num=line_record.get('vender_bank_account_number');
bp_bank_account_name = line_record.get('bp_bank_account_name'); bp_bank_account_name = line_record.get('bp_bank_account_name');
bp_bank_account_code_n = line_record.get('bp_bank_account_code_n'); bp_bank_account_code_n = line_record.get('bp_bank_account_code_n');
bp_bank_account_id = line_record.get('bp_bank_account_id'); bp_bank_account_id = line_record.get('bp_bank_account_id');
...@@ -666,29 +684,27 @@ ...@@ -666,29 +684,27 @@
line_record.set('loan_date',hd_record.get('loan_date')); line_record.set('loan_date',hd_record.get('loan_date'));
line_record.set('hdds_id',hdds_id); line_record.set('hdds_id',hdds_id);
line_record.set('lnds_id',lnds_id); line_record.set('lnds_id',lnds_id);
line_record.set('vender_bank_account_num',vender_bank_account_num);
line_record.set('winid','csh_payment_req_pay_win'); line_record.set('winid','csh_payment_req_pay_win');
var data=[];
data.push(line_record);
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'csh_payment_req_pay_win', id: 'csh_payment_req_pay_win',
url: $('csh_payment_req_pay_win_link').getUrl(), url: $('csh_payment_req_pay_win_link').getUrl(),
params:line_record.data, params:line_record.data,
/* { /* {
payment_req_id: payment_req_id, payment_req_id: payment_req_id,
winid: 'csh_payment_req_pay_win', winid: 'csh_payment_req_pay_win',
hdds_id: hdds_id, hdds_id: hdds_id,
lnds_id: lnds_id, lnds_id: lnds_id,
bp_bank_account_code: bp_bank_account_code, bp_bank_account_code: bp_bank_account_code,
bp_bank_account_num: bp_bank_account_num, bp_bank_account_num: bp_bank_account_num,
bp_bank_account_name: bp_bank_account_name, bp_bank_account_name: bp_bank_account_name,
bp_bank_account_code_n: bp_bank_account_code_n, bp_bank_account_code_n: bp_bank_account_code_n,
bp_bank_account_id: bp_bank_account_id, bp_bank_account_id: bp_bank_account_id,
contract_id: contract_id, contract_id: contract_id,
loan_date: hd_record.get('loan_date') loan_date: hd_record.get('loan_date')
//first_contract_day: hd_record.get('first_contract_day') //first_contract_day: hd_record.get('first_contract_day')
// ,first_repayment_flag: first_repayment_flag // ,first_repayment_flag: first_repayment_flag
},*/ },*/
title: '${l:CSH502.CSH_PAYMENT_REQ_PAY}', title: '${l:CSH502.CSH_PAYMENT_REQ_PAY}',
fullScreen: true fullScreen: true
}); });
...@@ -710,39 +726,39 @@ ...@@ -710,39 +726,39 @@
var total_apply_amount=0; var total_apply_amount=0;
//检验输入的数据是否符合要求 //检验输入的数据是否符合要求
var check_due_amount_flag=true; var check_due_amount_flag=true;
var line_datas=$(ds_line_id).data; var line_datas=$(ds_line_id).data;
for(var i=0;i<line_datas.length;i++){ for(var i=0;i<line_datas.length;i++){
var line_data=line_datas[i]; var line_data=line_datas[i];
//应付我司金额 //应付我司金额
var amount_agent=line_data.get('amount_agent'); var amount_agent=line_data.get('amount_agent');
var amount_vender= line_data.get('amount_vender'); var amount_vender= line_data.get('amount_vender');
var due_amount= line_data.get('due_amount'); var due_amount= line_data.get('due_amount');
//首付款抵充金额 //首付款抵充金额
var other_payment2=line_data.get('other_payment2'); var other_payment2=line_data.get('other_payment2');
if(amount_agent<0||amount_vender<0){ if(amount_agent<0||amount_vender<0){
$L.showErrorMessage("提示",'应付我司金额和首付款抵充金额不能为负数!'); $L.showErrorMessage("提示",'应付我司金额和首付款抵充金额不能为负数!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){ if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){
$L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!'); $L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
//本次申请金额等于委托加我司 //本次申请金额等于委托加我司
var this_apply_amount=plus(amount_agent,amount_vender); var this_apply_amount=plus(amount_agent,amount_vender);
total_apply_amount=plus(total_apply_amount,this_apply_amount); total_apply_amount=plus(total_apply_amount,this_apply_amount);
line_data.set('amount',this_apply_amount); line_data.set('amount',this_apply_amount);
total_amount_agent=plus(total_amount_agent,amount_agent); total_amount_agent=plus(total_amount_agent,amount_agent);
total_amount_vender=plus(total_amount_vender,amount_vender); total_amount_vender=plus(total_amount_vender,amount_vender);
} }
//取消提示 //取消提示
/* if(!check_due_amount_flag){ /* if(!check_due_amount_flag){
$L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!'); $L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!');
}*/ }*/
//给头表赋值 //给头表赋值
$(ds_id).getAt(0).set('amount_agent_total',total_amount_agent); $(ds_id).getAt(0).set('amount_agent_total',total_amount_agent);
$(ds_id).getAt(0).set('amount_vender_total',total_amount_vender); $(ds_id).getAt(0).set('amount_vender_total',total_amount_vender);
$(ds_id).getAt(0).set('amount',total_apply_amount); $(ds_id).getAt(0).set('amount',total_apply_amount);
...@@ -753,43 +769,43 @@ ...@@ -753,43 +769,43 @@
$(ds_id).getAt(0).set('document_category','PAYMENT_REQ'); $(ds_id).getAt(0).set('document_category','PAYMENT_REQ');
//确认保存 //确认保存
var hd_record = $(ds_id).getCurrentRecord(); var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id'); var payment_req_id = hd_record.get('payment_req_id');
//console.log( $(ds_id)); //console.log( $(ds_id));
// console.log( $(ds_line_id)); // console.log( $(ds_line_id));
if (payment_req_id) { if (payment_req_id) {
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}csh511_csh_payment_req_hd_query').getUrl(), url: $('${/parameter/@layout_code}csh511_csh_payment_req_hd_query').getUrl(),
para: { para: {
payment_req_id: payment_req_id, payment_req_id: payment_req_id,
}, },
success: function (res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.record.submitted_flag == 'Y') { if (res.result.record.submitted_flag == 'Y') {
Leaf.showMessage('${l:PROMPT}', '该单据已经提交'); Leaf.showMessage('${l:PROMPT}', '该单据已经提交');
check_flag = false;
} else {
check_flag = true;
}
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false; check_flag = false;
}, } else {
sync: true, check_flag = true;
scope: this }
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); },
} else { error: function () {
check_flag = true; window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} check_flag = false;
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
check_flag = false;
},
sync: true,
scope: this
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} else {
check_flag = true;
}
return check_flag||false; return check_flag||false;
...@@ -907,9 +923,9 @@ ...@@ -907,9 +923,9 @@
return; return;
} }
var payment_req_ln_id = record.get('payment_req_ln_id'), var payment_req_ln_id = record.get('payment_req_ln_id'),
apply_amount = record.get('amount'), apply_amount = record.get('amount'),
contract_number = record.get('contract_number'), contract_number = record.get('contract_number'),
ref_doc_id = record.get('ref_doc_id'); ref_doc_id = record.get('ref_doc_id');
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'csh_req_ddct_link_winid', id: 'csh_req_ddct_link_winid',
url: $('csh_req_ddct_link').getUrl(), url: $('csh_req_ddct_link').getUrl(),
...@@ -1059,7 +1075,7 @@ ...@@ -1059,7 +1075,7 @@
//合同编号超链接 //合同编号超链接
function open_con_contract_readonly_win(record_id, ds_id) { function open_con_contract_readonly_win(record_id, ds_id) {
// //
//创建明细页面根据条件表TBL_LA11字段 function_code、bp_class匹配布局代码layout_code BCML_CONTRACT_NP_MAINTAIN、BCML_CONTRACT_ORG_MAINTAIN //创建明细页面根据条件表TBL_LA11字段 function_code、bp_class匹配布局代码layout_code BCML_CONTRACT_NP_MAINTAIN、BCML_CONTRACT_ORG_MAINTAIN
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var division = record.get('division'); var division = record.get('division');
...@@ -1156,10 +1172,10 @@ ...@@ -1156,10 +1172,10 @@
// }; // };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
/* debugger /* debugger
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd'); var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hd_record = $(hdds_id).getAt(0); var hd_record = $(hdds_id).getAt(0);
qpara['payment_req_id'] = hd_record.get('payment_req_id');*/ qpara['payment_req_id'] = hd_record.get('payment_req_id');*/
/*if (hd_record.get('bp_id_vender_n')) { /*if (hd_record.get('bp_id_vender_n')) {
qpara['bp_id_vender_n'] = hd_record.get('bp_id_vender_n'); qpara['bp_id_vender_n'] = hd_record.get('bp_id_vender_n');
}*/ }*/
...@@ -1250,6 +1266,7 @@ ...@@ -1250,6 +1266,7 @@
}; };
]]></script> ]]></script>
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd" modelaction="query" />
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets> <a:dataSets>
<a:dataSet id="csh_payment_req_temp_ln_ds" autoQuery="true" fetchAll="true" <a:dataSet id="csh_payment_req_temp_ln_ds" autoQuery="true" fetchAll="true"
......
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
<!-- <a:gridButton click="csh502_payment_doc_print_d" text="汇签单"/>--> <!-- <a:gridButton click="csh502_payment_doc_print_d" text="汇签单"/>-->
<!-- <div style="margin-left:30px;margin-top:13px"><![CDATA[注:汇签单打印之后请重新点击查询按钮以获取最新数据后进行其它操作]]></div>--> <!-- <div style="margin-left:30px;margin-top:13px"><![CDATA[注:汇签单打印之后请重新点击查询按钮以获取最新数据后进行其它操作]]></div>-->
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="3" labelWidth="130" marginWidth="35" title="CSH502.CSH_PAYMENT_REQ_PAY"> <a:form column="4" labelWidth="130" marginWidth="35" title="CSH502.CSH_PAYMENT_REQ_PAY">
<a:textField name="payment_req_number" bindTarget="csh_payment_req_query_ds" prompt="申请单号"/> <a:textField name="payment_req_number" bindTarget="csh_payment_req_query_ds" prompt="申请单号"/>
<!-- <a:textField name="bp_id_tenant_n" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称"/>--> <!-- <a:textField name="bp_id_tenant_n" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称"/>-->
<!-- <a:datePicker name="approval_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_FROM" width="150"/>--> <!-- <a:datePicker name="approval_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_FROM" width="150"/>-->
...@@ -354,9 +354,11 @@ ...@@ -354,9 +354,11 @@
<a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="合同编号"/> <a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="合同编号"/>
<a:datePicker name="req_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_FROM" width="150"/> <a:datePicker name="req_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_FROM" width="150"/>
<a:datePicker name="req_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_TO" width="150"/> <a:datePicker name="req_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_TO" width="150"/>
<a:textField name="amount_from" bindTarget="csh_payment_req_query_ds" prompt="应付金额从"/>
<a:textField name="amount_to" bindTarget="csh_payment_req_query_ds" prompt="应付金额到"/>
<!-- <a:lov name="user_name" bindTarget="csh_payment_req_query_ds" prompt="提交人帐号" width="150"/> --> <!-- <a:lov name="user_name" bindTarget="csh_payment_req_query_ds" prompt="提交人帐号" width="150"/> -->
<!-- <a:textField name="employee_name" bindTarget="csh_payment_req_query_ds" prompt="提交人姓名" readOnly="true" width="150"/> --> <!-- <a:textField name="employee_name" bindTarget="csh_payment_req_query_ds" prompt="提交人姓名" readOnly="true" width="150"/> -->
<a:textField name="user_name" bindTarget="csh_payment_req_query_ds" prompt="申请人" width="150"/> <!-- <a:textField name="user_name" bindTarget="csh_payment_req_query_ds" prompt="申请人" width="150"/>-->
<!-- <a:comboBox name="print_flag_des" bindTarget="csh_payment_req_query_ds" prompt="汇签单" width="150"/>--> <!-- <a:comboBox name="print_flag_des" bindTarget="csh_payment_req_query_ds" prompt="汇签单" width="150"/>-->
<!-- <a:comboBox name="approval_status_desc" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_STATE" width="150"/> --> <!-- <a:comboBox name="approval_status_desc" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_STATE" width="150"/> -->
<!-- <a:textField name="submitted_flag" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_SUBMIT_STATE" width="150"/> --> <!-- <a:textField name="submitted_flag" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_SUBMIT_STATE" width="150"/> -->
......
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
<a:gridButton click="csh503_payment_reset" text="HLS.RESET"/> <a:gridButton click="csh503_payment_reset" text="HLS.RESET"/>
<a:gridButton click="csh503_payment_reverse" text="HLS.REVERSE"/> <a:gridButton click="csh503_payment_reverse" text="HLS.REVERSE"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="4" labelWidth="100" title="CSH502.CSH_PAYMENT_REVERSE_QUERY"> <a:form column="4" labelWidth="100" title="CSH502.CSH_PAYMENT_REVERSE_QUERY" width="1310">
<!-- <a:textField name="payment_req_number_from" bindTarget="csh_payment_reverse_query_ds" prompt="申请单号从" width="150"/> <!-- <a:textField name="payment_req_number_from" bindTarget="csh_payment_reverse_query_ds" prompt="申请单号从" width="150"/>
<a:textField name="payment_req_number_to" bindTarget="csh_payment_reverse_query_ds" prompt="申请单号到" width="150"/> --> <a:textField name="payment_req_number_to" bindTarget="csh_payment_reverse_query_ds" prompt="申请单号到" width="150"/> -->
<a:textField name="transaction_num_from" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_TRANSACTION.TRANSACTION_NUM_FROM" width="150"/> <a:textField name="transaction_num_from" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_TRANSACTION.TRANSACTION_NUM_FROM" width="150"/>
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
}) })
} }
//新增申请按钮 //新增申请按钮
function csh510_csh_trx_bank_apply_new() { function csh510_csh_trx_bank_apply_new() {
$('csh510_csh_trx_bank_apply_new').disable(); $('csh510_csh_trx_bank_apply_new').disable();
var datas = $('csh_transaction_receipt_maintain_result_ds').selected; var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
...@@ -103,11 +103,13 @@ ...@@ -103,11 +103,13 @@
var bp_name=datas[i].get('bp_name'); var bp_name=datas[i].get('bp_name');
if(bp_name==''||bp_name==undefined){ if(bp_name==''||bp_name==undefined){
$L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null); $L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null);
$('csh510_csh_trx_bank_apply_new').enable();
return; return;
} }
//不是新增就报错 //不是新增就报错
if (confirmed_flag != 'NEW' && confirmed_flag != undefined) { if (confirmed_flag != 'NEW' && confirmed_flag != undefined) {
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null); $L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
$('csh510_csh_trx_bank_apply_new').enable();
return; return;
} }
...@@ -144,6 +146,8 @@ ...@@ -144,6 +146,8 @@
}, },
scope: this scope: this
}); });
},function(){
$('csh510_csh_trx_bank_apply_new').enable();
}); });
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true"> <a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="zx.ZX5020.zx_query_excel" rootPath="/model/datasource"/> <a:model-query fetchAll="true" model="zx.ZX5020.zx_query_excel" rootPath="/model/datasource"/>
<dr:excel-report enableTask="false" filename="征信查询清单.xlsx"> <dr:excel-report enableTask="false" filename="征信查询清单.xlsx">
......
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