Commit 5025e22d authored by stone's avatar stone

[fix] 增加付款条件的控制

parent 479b66dd
......@@ -728,12 +728,15 @@
//检验输入的数据是否符合要求
var check_due_amount_flag=true;
var line_datas=$(ds_line_id).data;
debugger
for(var i=0;i<line_datas.length;i++){
var line_data=line_datas[i];
//应付我司金额
var amount_agent=line_data.get('amount_agent');
var amount_vender= line_data.get('amount_vender');
var due_amount= line_data.get('due_amount');
var bp_bank_account_id=line_data.get('bp_bank_account_id');
var vender_bank_account_id=line_data.get('vender_bank_account_id');
//首付款抵充金额
var other_payment2=line_data.get('other_payment2');
if(amount_agent<0||amount_vender<0){
......@@ -741,6 +744,19 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//根据金额判断代理店和厂商不能为空
if(amount_agent>0 &&!vender_bank_account_id){
$L.showErrorMessage("提示",'请选择代理店账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(amount_vender>0 &&!bp_bank_account_id){
$L.showErrorMessage("提示",'请选择厂商账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){
$L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!');
......@@ -773,8 +789,8 @@
//确认保存
var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
//console.log( $(ds_id));
// console.log( $(ds_line_id));
if (payment_req_id) {
Leaf.request({
......
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