Commit a36032c7 authored by lizhe's avatar lizhe

提前结清计算问题

parent cc6eeafe
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
} }
}; };
var clc_flag = 'N';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
debugger; debugger;
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req'); var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
...@@ -150,6 +151,7 @@ ...@@ -150,6 +151,7 @@
residual_value: record.get('ccr_residual_value') //update by xsh35973 20220613 residual_value: record.get('ccr_residual_value') //update by xsh35973 20220613
}, },
success: function (res) { success: function (res) {
clc_flag = 'Y';
//record.set('et_fee', res.result.et_fee); //record.set('et_fee', res.result.et_fee);
var deposit_deduct =record.get('deposit_deduct')||0; var deposit_deduct =record.get('deposit_deduct')||0;
record.set('et_total_amount', minus(res.result.et_total_amount,deposit_deduct)); record.set('et_total_amount', minus(res.result.et_total_amount,deposit_deduct));
...@@ -163,6 +165,7 @@ ...@@ -163,6 +165,7 @@
record.set('fund_possession_rate', res.result.fund_possession_rate); record.set('fund_possession_rate', res.result.fund_possession_rate);
record.set('last_rent_due_date', res.result.last_rent_due_date); record.set('last_rent_due_date', res.result.last_rent_due_date);
record.set('sum_unreceived_principal', res.result.sum_unreceived_principal); record.set('sum_unreceived_principal', res.result.sum_unreceived_principal);
clc_flag = 'N';
}, },
failure: function () { failure: function () {
record.set('termination_date', ''); record.set('termination_date', '');
...@@ -194,7 +197,7 @@ ...@@ -194,7 +197,7 @@
}); });
} }
//add by xsh35973 添加修改调整后资源占用费提前结清租金跟随变动 //add by xsh35973 添加修改调整后资源占用费提前结清租金跟随变动
if(name == 'fund_possession_cost'){ if(name == 'fund_possession_cost' && clc_flag =='N'){
if (value < 0 || value == NaN || value == undefined) { if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的资金占用费金额应大于等于0!'); Leaf.showMessage('${l:HLS.PROMPT}', '调整后的资金占用费金额应大于等于0!');
setTimeout(function () { setTimeout(function () {
...@@ -208,7 +211,7 @@ ...@@ -208,7 +211,7 @@
record.set('et_due_amount', et_due_amount_result); record.set('et_due_amount', et_due_amount_result);
} }
} }
if(name == 'residual_value'){ if(name == 'residual_value' && clc_flag =='N'){
if (value < 0 || value == NaN || value == undefined) { if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的留购金金额应大于等于0!'); Leaf.showMessage('${l:HLS.PROMPT}', '调整后的留购金金额应大于等于0!');
setTimeout(function () { setTimeout(function () {
...@@ -219,7 +222,7 @@ ...@@ -219,7 +222,7 @@
var et_total_amount_result=plus(plus(plus(plus(record.get('et_due_amount') || 0, record.get('et_fee') || 0), record.get('residual_value') || 0), record.get('overdue_amount') || 0), record.get('ccr_penalty')); var et_total_amount_result=plus(plus(plus(plus(record.get('et_due_amount') || 0, record.get('et_fee') || 0), record.get('residual_value') || 0), record.get('overdue_amount') || 0), record.get('ccr_penalty'));
record.set('et_total_amount',et_total_amount_result); record.set('et_total_amount',et_total_amount_result);
} }
if(name == 'et_due_amount'){ if(name == 'et_due_amount' && clc_flag =='N'){
if (value < 0 || value == NaN || value == undefined) { if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的提前结清租金金额应大于等于0!'); Leaf.showMessage('${l:HLS.PROMPT}', '调整后的提前结清租金金额应大于等于0!');
setTimeout(function () { setTimeout(function () {
......
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