Commit d10eb32c authored by stone's avatar stone

【fix】付款申请书修改

parent 00479ad3
......@@ -206,7 +206,7 @@
hdrecord.set('currency_code', currency_code);
hdrecord.set('currency_name', currency_name);
record.set('act_amount', minus(record.get('amount'), record.get('sum_ddct_amount') || 0));
} else if(name=='amount_vender'&& value){
} else if(name=='amount_vender'){
var due_amount=record.get('due_amount');
var other_payment2=record.get('other_payment2');
var amount_agent=minus(minus(due_amount,other_payment2),value);
......@@ -443,22 +443,9 @@
function csh501_print() {
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 records_l = $(lnds_id).getAll();
var hd_record = $(hdds_id).getCurrentRecord();
//add by st
var url;
/* url = $('tre_loan_con_print_excel_link_id').getUrl() + '?payment_req_id=' +hd_record.get('payment_req_id');
window.open(href = url);*/
var templet_code = 'CSH_PAYMENT_REQ';
// 根据不同的厂商调用不用的模板
if(hd_record.get('vender_name').indexOf('永立')>=0){
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ_YL&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
}else{
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
}
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '&document_table=CSH_PAYMENT_REQ&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
......@@ -774,13 +761,16 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
console.log('${/parameter/@division}');
var total_amount_agent=0;
var total_amount_vender=0;
var total_apply_amount=0;
//检验输入的数据是否符合要求
var check_due_amount_flag=true;
var line_datas=$(ds_line_id).data;
var head_record=$(ds_id).getAt(0);
//高空作业车个数
var gk_contract_num=0;
for(var i=0;i<line_datas.length;i++){
var line_data=line_datas[i];
//应付我司金额
......@@ -796,6 +786,10 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//买断机合同 个数
if(amount_vender==0 || '${/parameter/@division}'==30){
gk_contract_num=gk_contract_num+1;
}
//根据金额判断代理店和厂商不能为空
if(amount_agent>0 &&!bp_bank_account_id){
......@@ -805,7 +799,7 @@
}
if(amount_vender>0 &&!vender_bank_account_id){
$L.showErrorMessage("提示",'请选择厂商账号信息!');
$L.showErrorMessage("提示",'请选择委托付款金额不为0的厂商账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
......@@ -823,10 +817,10 @@
total_amount_vender=plus(total_amount_vender,amount_vender);
}
//取消提示
/* if(!check_due_amount_flag){
$L.showInfoMessage("提示",'应付金额应等于应付我司金额,委托付款金额和首付款抵充金额之和!');
}*/
if(gk_contract_num<line_datas.length&&gk_contract_num!=0){
$L.showErrorMessage("提示",'买断机合同(即厂商的付款金额为0)不可与其他正常合同同时进行付款申请支付');
return false;
}
//给头表赋值
$(ds_id).getAt(0).set('amount_agent_total',total_amount_agent);
$(ds_id).getAt(0).set('amount_vender_total',total_amount_vender);
......
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