Commit 8ed69eec authored by niminmin's avatar niminmin

[fix]报价校验调整,回购查询条件调整

parent b465c16a
Pipeline #6907 failed with stages
......@@ -58,10 +58,11 @@ var override_queryfields = [
}, {
field: 'division',
queryoperator: "="
}, {
field: 'change_created_by_n',
queryoperator: "exists (select 1 from sys_user hr where hr.user_id=t1.created_by and hr.user_name like ${@change_created_by_n})"
},
// {
// field: 'change_created_by_n',
// queryoperator: "exists (select 1 from sys_user hr where hr.user_id=t1.created_by and hr.user_name like ${@change_created_by_n})"
// },
{
name: 'repurchase_date_from',
queryexpression: "t1.repurchase_date between to_date(${@repurchase_date_from},'yyyy-mm-dd') and nvl(to_date(${@repurchase_date_to},'yyyy-mm-dd'),t1.repurchase_date)"
......
......@@ -279,7 +279,7 @@
function hls_hls500_re_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'RE_CALC');
hls_hls500_save_new(calc_execute, 'RE_CALC');
}
function open_after_save_execute() {
......@@ -1382,6 +1382,67 @@
//均等计算合并计算按钮一起
function hls_hls500_JD() {
var temp_head_records = $('hls_fin_calculator_ln_ds').getAll();
//一、报价器加校验:1.如果用户把所有租金都手填,则报校验“禁止手填所有期数租金!”;
// 2.如果用户手动修改租金以后,只有最后一期租金大于零,则报校验“目前不支持只有一期租金的报价!”
var count=temp_head_records.length-1;
var calc_temp=parseFloat(0);
var before_calc_count=parseFloat(0);
var last_calc_count=parseFloat(0);
var zero_calc_count=parseFloat(0);
var null_calc_count=parseFloat(0);
var last_null_calc_count=parseFloat(0);
var last_zero_calc_count=parseFloat(0);
for (var i = 0;i < temp_head_records.length;i++) {
if(temp_head_records[i].get('times')>0){
if(temp_head_records[i].get('principal_eq_pymt_adj')!==''&&temp_head_records[i].get('principal_eq_pymt_adj')>=0){
calc_temp = plus(calc_temp,parseFloat(1));
}
if(temp_head_records[i].get('principal_eq_pymt_adj')!==''&&temp_head_records[i].get('principal_eq_pymt_adj')===0){
before_calc_count = plus(before_calc_count,parseFloat(1));
}
if(temp_head_records[i].get('principal_eq_pymt_adj')!==''&&temp_head_records[i].get('principal_eq_pymt_adj')===0){
zero_calc_count = plus(zero_calc_count,parseFloat(1));
}
if(typeof(temp_head_records[i].get('principal_eq_pymt_adj')) == 'undefined'||temp_head_records[i].get('principal_eq_pymt_adj')===''){
null_calc_count = plus(null_calc_count,parseFloat(1));
}
}
if(temp_head_records[i].get('times')===count){
if(!temp_head_records[i].get('principal_eq_pymt_adj')||temp_head_records[i].get('principal_eq_pymt_adj')===''){
last_calc_count = plus(last_calc_count,parseFloat(1));
}
if(typeof(temp_head_records[i].get('principal_eq_pymt_adj')) == 'undefined'||temp_head_records[i].get('principal_eq_pymt_adj')===''){
last_null_calc_count = plus(last_null_calc_count,parseFloat(1));
}
if(temp_head_records[i].get('principal_eq_pymt_adj')!==''&&temp_head_records[i].get('principal_eq_pymt_adj')===0){
last_zero_calc_count = plus(last_zero_calc_count,parseFloat(1));
}
}
}
if(calc_temp==count){
Leaf.showMessage('${l:PROMPT}', '请保证一期以上的的调整租金为空!');
return false;
}
if(last_null_calc_count==1&&zero_calc_count==count-1){
Leaf.showMessage('${l:PROMPT}', '系统暂不支持所有租金集中在最后一期支付!');
return false;
}
// if(null_calc_count==1&&zero_calc_count==count-1){
// Leaf.showMessage('${l:PROMPT}', '目前不支持只有一期租金的报价!');
// return false;
// }
if(last_zero_calc_count==1){
Leaf.showMessage('${l:PROMPT}', '系统不支持最后一期租金为0的情况!');
return false;
}
hls_hls500_save_new(calc_execute_JD_new, 'CALC');
}
......@@ -1432,14 +1493,14 @@ debugger;
}
}
}
// if(calc_temp==count){
// Leaf.showMessage('${l:PROMPT}', '请保证一期以上的的调整租金为空!');
// return false;
// }
if(last_null_calc_count==1&&zero_calc_count==count-1){
Leaf.showMessage('${l:PROMPT}', '系统暂不支持所有租金集中在最后一期支付!');
if(calc_temp==count){
Leaf.showMessage('${l:PROMPT}', '请保证一期以上的的调整租金为空!');
return false;
}
// if(last_null_calc_count==1&&zero_calc_count==count-1){
// Leaf.showMessage('${l:PROMPT}', '系统暂不支持所有租金集中在最后一期支付!');
// return false;
// }
// if(null_calc_count==1&&zero_calc_count==count-1){
// Leaf.showMessage('${l:PROMPT}', '目前不支持只有一期租金的报价!');
// return false;
......@@ -1477,14 +1538,17 @@ debugger;
// }
if(H1>51){
Leaf.showMessage('${l:PROMPT}', '还款期数应小于51期');
unlock_calc_current_window();
return false;
}
if(H54<0){
Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75');
unlock_calc_current_window();
return false;
}
if(H1==1&&(H159=='HL_PRICR_NTEST'||H159=='HL_PRICR_TEST')){
Leaf.showMessage('${l:PROMPT}', '均等还款期数应大于1期');
unlock_calc_current_window();
return false;
}
......@@ -1698,8 +1762,8 @@ debugger;
recreate_H_formula = 'N';
recreate_L_formula = 'N';
//open_after_save_execute();
//hls_hls500_user_button2();
unlock_calc_current_window();
hls_hls500_user_button2();
// unlock_calc_current_window();
},
failure: function() {
unlock_calc_current_window();
......
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