Commit 94696bd3 authored by 18083's avatar 18083

提前结清、解约回购保证金抵扣

parent b8bff971
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
p_fund_possession_rate=>${@fund_possession_rate}, p_fund_possession_rate=>${@fund_possession_rate},
p_last_rent_due_date=>${@last_rent_due_date}, p_last_rent_due_date=>${@last_rent_due_date},
p_residual_value=>${@residual_value}, p_residual_value=>${@residual_value},
p_deposit_deduction=>${@deposit_deduction},
p_user_id => ${/session/@user_id}); p_user_id => ${/session/@user_id});
END; END;
]]> ]]>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm"> <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations> <bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select division from con_contract t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute"> <bm:operation name="execute">
<bm:parameters> <bm:parameters>
<bm:parameter name="change_req_id" dataType="java.lang.Long" input="false" output="true" outputPath="@change_req_id"/> <bm:parameter name="change_req_id" dataType="java.lang.Long" input="false" output="true" outputPath="@change_req_id"/>
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
<a:init-procedure> <a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="wx.WX100.sys_pilot_run_user" rootPath="pilot_run_user"/> <a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="wx.WX100.sys_pilot_run_user" rootPath="pilot_run_user"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.con_get_contract_status" rootPath="get_contract_status"/> <a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.con_get_contract_status" rootPath="get_contract_status"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.create_change_req" rootPath="get_contract_division"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_repo_detail_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_repo_detail_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -56,6 +58,17 @@ ...@@ -56,6 +58,17 @@
if ('${/model/pilot_run_user/record/@pilot_run_flag}' != 'Y'){ if ('${/model/pilot_run_user/record/@pilot_run_flag}' != 'Y'){
$('${/parameter/@layout_code}_user_button4').hide(); $('${/parameter/@layout_code}_user_button4').hide();
} }
//铁甲业务合同展示保证金字段 18083 2023/5/11
if('${/model/get_contract_division/record/@division}' !='70' && '${/model/get_contract_division/record/@division}' != ''){
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE").style.display = "none";
}
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION").style.display = "none";
}
}
}); });
var calc_flag='N'; var calc_flag='N';
//新增和加载时调用form //新增和加载时调用form
...@@ -67,7 +80,11 @@ ...@@ -67,7 +80,11 @@
record.getField('signer_n').setRequired(false); record.getField('signer_n').setRequired(false);
record.set('signer_n',''); record.set('signer_n','');
} }
if(record.get('division') == '70'){
record.getField('deposit_deduction').setRequired(true);
}
} }
}; };
var clc_flag = 'N'; var clc_flag = 'N';
...@@ -79,11 +96,13 @@ ...@@ -79,11 +96,13 @@
calc_flag='N'; calc_flag='N';
record.set('calc_flag','N'); record.set('calc_flag','N');
} }
//调整后提前结清手续费
if (name == 'et_fee') { if (name == 'et_fee') {
var et_total_amount=record.get('et_total_amount')||0; var et_total_amount=record.get('et_total_amount')||0;
var old_et_fee=old_value||0; var old_et_fee=old_value||0;
record.set('et_total_amount', plus(minus(et_total_amount,old_et_fee),value||0)); record.set('et_total_amount', plus(minus(et_total_amount,old_et_fee),value||0));
} }
//调整后逾期罚息
if (name == 'ccr_penalty') { if (name == 'ccr_penalty') {
var et_total_amount=record.get('et_total_amount')||0; var et_total_amount=record.get('et_total_amount')||0;
var due_amount = record.get('penalty') || 0; var due_amount = record.get('penalty') || 0;
...@@ -101,8 +120,40 @@ ...@@ -101,8 +120,40 @@
}, 5); }, 5);
return; return;
} }
record.set('et_total_amount', 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),value)); record.set('et_total_amount',minus(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),value),record.get('deposit_deduction')||0));
}
//铁甲业务计算保证金抵扣金额 18083 2023/5/12
if('${/model/get_contract_division/record/@division}' =='70' && '${/model/get_contract_division/record/@division}' != ''){
if (name == 'deposit_deduction') {
var et_total_amount=record.get('et_total_amount')||0;
var deposit_balance = record.get('deposit_balance') || 0;
var old_deposit_balance=old_value||0;
if (deposit_balance < value) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的保证金抵扣金额必须小于等于保证金余额!');
setTimeout(function () {
record.set('deposit_balance', 0);
}, 5);
return;
}
if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的保证金抵扣金额应大于等于0!');
setTimeout(function () {
record.set('deposit_deduction', 0);
}, 5);
return;
}
//调整后的保证金余额应小于支付总额
if (value > et_total_amount) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的保证金抵扣金额应小于支付总额!');
setTimeout(function () {
record.set('deposit_deduction', 0);
}, 5);
return;
}
record.set('et_total_amount', minus(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')||0),value));
}
} }
if (name == 'termination_date'&&value) { if (name == 'termination_date'&&value) {
...@@ -118,7 +169,9 @@ ...@@ -118,7 +169,9 @@
/**提前结清利率**/ /**提前结清利率**/
et_interest_rate: record.get('et_interest_rate'), et_interest_rate: record.get('et_interest_rate'),
/**留购价**/ /**留购价**/
residual_value: record.get('ccr_residual_value') //update by xsh35973 20220613 residual_value: record.get('ccr_residual_value'), //update by xsh35973 20220613
/**保证金抵扣金额**/
deposit_deduction: record.get('deposit_deduction')||0 //update by 18083 2023/5/12
}, },
success: function (res) { success: function (res) {
clc_flag = 'Y'; clc_flag = 'Y';
...@@ -166,6 +219,7 @@ ...@@ -166,6 +219,7 @@
}); });
} }
//add by xsh35973 添加修改调整后资源占用费提前结清租金跟随变动 //add by xsh35973 添加修改调整后资源占用费提前结清租金跟随变动
//调整后资金占用费
if(name == 'fund_possession_cost'&& clc_flag =='N'){ 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!');
...@@ -188,9 +242,10 @@ ...@@ -188,9 +242,10 @@
}, 5); }, 5);
return; return;
} }
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=minus(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.get('deposit_deduction') || 0);
record.set('et_total_amount',et_total_amount_result); record.set('et_total_amount',et_total_amount_result);
} }
//提前结清租金
if(name == 'et_due_amount'&& clc_flag =='N'){ 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!');
...@@ -199,10 +254,11 @@ ...@@ -199,10 +254,11 @@
}, 5); }, 5);
return; return;
} }
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=minus(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.get('deposit_deduction') || 0);
record.set('et_total_amount',et_total_amount_result); record.set('et_total_amount',et_total_amount_result);
} }
} }
}; };
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = 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