Commit ad586c05 authored by niminmin's avatar niminmin

Merge branch 'feature/租后变更开发' into develop

parents a5ca20fd b9469930
Pipeline #6761 canceled with stages
......@@ -47,10 +47,12 @@
};
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
if('${/parameter/@layout_code}'=='CON_REPO001D') {
if('${/parameter/@function_code}'=='CON_REPO001D') {
var repurchase_types = record.get('repurchase_types');
if (repurchase_types == 'ONE_TIME_REPURCHASE') {
record.set('payment_period', 1);
record.getField('payment_period').setReadOnly(true);
record.getField('price_list').setReadOnly(true);
record.getField('price_list_n').setReadOnly(true);
} else {
......@@ -220,7 +222,7 @@
record.set('repurchase_count_amount', minus(repurchase_tatal_amount, depoist_remaining_amount));
}
// 手续费
if (name == 'repurchase_service_charges'&&value) {
if (name == 'repurchase_service_charges'&&value>=0) {
var repurchase_count_amount = plus(plus(plus(record.get('sum_overdue_amount') || 0, record.get('ccr_due_amount') || 0), record.get('sum_unreceived_principal') || 0)
, record.get('residual_value') || 0);
var repurchase_tatal_amount = plus(plus(repurchase_count_amount, value || 0), record.get('fund_possession_cost') || 0);
......@@ -228,7 +230,7 @@
record.set('repurchase_count_amount', minus(repurchase_tatal_amount, depoist_remaining_amount));
}
// 资金占用费value
if (name == 'fund_possession_cost'&&value) {
if (name == 'fund_possession_cost'&&value>=0) {
var repurchase_count_amount = plus(plus(plus(record.get('sum_overdue_amount') || 0, record.get('ccr_due_amount') || 0), record.get('sum_unreceived_principal') || 0)
, record.get('residual_value') || 0);
var repurchase_tatal_amount = plus(plus(repurchase_count_amount, record.get('repurchase_service_charges') || 0), value || 0);
......@@ -268,7 +270,7 @@
record.set('due_amount', res.result.due_amount || 0);
record.set('ccr_due_amount', res.result.due_amount || 0);
record.set('offset_flag', 'N');
record.set('fund_possession_cost', res.result.fund_possession_cost || 0);
//record.set('fund_possession_cost', res.result.fund_possession_cost || 0);
},
failure: function () {
record.set('last_rent_due_date', '');
......@@ -279,7 +281,7 @@
record.set('sum_unreceived_principal', '');
record.set('due_amount', '');
record.set('ccr_due_amount', '');
record.set('fund_possession_cost', 0);
// record.set('fund_possession_cost', 0);
},
error: function () {
record.set('repurchase_date', '');
......@@ -290,7 +292,7 @@
record.set('sum_unreceived_principal', '');
record.set('due_amount', '');
record.set('ccr_due_amount', '');
record.set('fund_possession_cost', 0);
// record.set('fund_possession_cost', 0);
},
scope: this
});
......
......@@ -1126,6 +1126,66 @@
//不均等
function hls_hls500_NJD() {
debugger;
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_NJD_new, 'CALC');
......@@ -1435,16 +1495,27 @@ debugger;
}
}
}
var hd_records=$('hls_fin_calculator_hd_ds').getAll();
var hd1_records=$('hd_formula_ds').getAll();
for (var i = 0;i < hd_records.length;i++) {
//headRecords[i].set('input_mode','READONLY');
//headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_code').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
// var records=$('calc_button_ds').getAll();
// for (var i = 0;i < records.length;i++) {
// var record=records[i];
// if(record.get('button_code')=='RE_CALC'){
//
// }
//
// }
}
// var hd_records=$('hls_fin_calculator_hd_ds').getAll();
// var hd1_records=$('hd_formula_ds').getAll();
// for (var i = 0;i < hd_records.length;i++) {
// //headRecords[i].set('input_mode','READONLY');
// //headRecords[i].set('readonly_input_mode','TRUE');
// headRecords[i].getField('column_value').setReadOnly(true);
// headRecords[i].getField('column_code').setReadOnly(true);
// headRecords[i].getField('column_value_c').setReadOnly(true);
//
// }
});
]]></script>
</a:hBox>
......@@ -1504,11 +1575,11 @@ debugger;
<a:gridButton id="hls_hls500_calc_id" click="hls_hls500_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="RE_CALC">
<c:process-config>
<a:gridButton id="hls_hls500_re_calc_id" click="hls_hls500_re_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<!-- <p:case value="RE_CALC">-->
<!-- <c:process-config>-->
<!-- <a:gridButton id="hls_hls500_re_calc_id" click="hls_hls500_re_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>-->
<!-- </c:process-config>-->
<!-- </p:case>-->
<p:case value="SAVE_QUOTATION">
<c:process-config>
<a:gridButton id="hls_hls500_quotation_id" click="hls_hls500_quotation" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
......@@ -1519,21 +1590,21 @@ debugger;
<a:gridButton id="hls_hls500_export_id" click="hls_hls500_export" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="IMPORT">
<c:process-config>
<a:gridButton id="hls_hls500_import_id" click="hls_hls500_import" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="RESTRUCTURE">
<c:process-config>
<a:gridButton id="hls_hls500_restructure_id" click="hls_hls500_restructure" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SHOW_COL">
<c:process-config>
<a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<!-- <p:case value="IMPORT">-->
<!-- <c:process-config>-->
<!-- <a:gridButton id="hls_hls500_import_id" click="hls_hls500_import" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>-->
<!-- </c:process-config>-->
<!-- </p:case>-->
<!-- <p:case value="RESTRUCTURE">-->
<!-- <c:process-config>-->
<!-- <a:gridButton id="hls_hls500_restructure_id" click="hls_hls500_restructure" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>-->
<!-- </c:process-config>-->
<!-- </p:case>-->
<!-- <p:case value="SHOW_COL">-->
<!-- <c:process-config>-->
<!-- <a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>-->
<!-- </c:process-config>-->
<!-- </p:case>-->
<!--<p:case value="USER_BUTTON1">-->
<!--<c:process-config>-->
<!--<a:gridButton id="hls_hls500_user_button1_col_id" click="hls_hls500_user_button1" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>-->
......@@ -1561,11 +1632,11 @@ debugger;
<a:gridButton id="hls_hls500_user_button3_col_id" click="hls_hls500_3JD" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="*">
<c:process-config>
<a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<!-- <p:case value="*">-->
<!-- <c:process-config>-->
<!-- <a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>-->
<!-- </c:process-config>-->
<!-- </p:case>-->
</p:switch>
</p:loop>
</c:create-config>
......
......@@ -1687,7 +1687,8 @@ debugger;
recreate_H_formula = 'N';
recreate_L_formula = 'N';
//open_after_save_execute();
hls_hls500_user_button2();
//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