Commit e44335b9 authored by gzj34291's avatar gzj34291

违约金减免校验

parent 34da4893
......@@ -38,7 +38,6 @@
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).query();
debugger
var records2 = $(ds_id2).getAll();
if (records2 && records2.length != 0) {
var param_list = [];
......@@ -226,9 +225,11 @@
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
if (value != old_value) {
if (update_falg != 'Y') {
if (name == 'reduce_amount_total') {
// record.set('reduce_amount_total',value>record.get('unreceived_overdue_amount') ?record.get('unreceived_overdue_amount'):value);
......@@ -241,7 +242,6 @@
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('total_overdue_amount')), 4));
// update_falg = 'Y';
record.set('reduce_amount_total_ratio', ratio);
}
......@@ -251,6 +251,8 @@
record.set('reduce_amount_total', amount);
}*/
} else {
update_falg = 'N';
}
......@@ -268,9 +270,23 @@
return false;
}
}
var penalty_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
var records_penalty = $(penalty_ds_id).getCurrentRecord();
var reduce_amount_total= records_penalty.get('reduce_amount_total');
var gld_received_amount= records_penalty.get('gld_received_amount');
var remaining_amount =minus(records_penalty.get('total_overdue_amount'), reduce_amount_total);
if(remaining_amount<gld_received_amount){
$L.showErrorMessage('提示','营业确认违约金需要大于等于会计确认的违约金!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
return true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//add by lihh 20210323
window['${/parameter/@layout_code}_con500_cdd_attachtment_upload'] = function(id, name, query_only) {
......
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