Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
af390dab
Commit
af390dab
authored
Jun 15, 2023
by
18083
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提前结清、解约回购保证金抵扣
parent
4bbbacdd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
212 additions
and
161 deletions
+212
-161
calc_et_date_amount.lwm
...pp/WEB-INF/classes/cont/CON_ET001/calc_et_date_amount.lwm
+2
-4
create_change_req.lwm
...bapp/WEB-INF/classes/cont/CON_ET001/create_change_req.lwm
+5
-0
con_early_termination_et_detail.lview
...ules/cont/CON_ET001/con_early_termination_et_detail.lview
+205
-157
No files found.
src/main/webapp/WEB-INF/classes/cont/CON_ET001/calc_et_date_amount.lwm
View file @
af390dab
...
@@ -19,9 +19,8 @@
...
@@ -19,9 +19,8 @@
cus_con_et_pkg.calc_et_date_amount(p_change_req_id =>
${@change_req_id},
cus_con_et_pkg.calc_et_date_amount(p_change_req_id =>
${@change_req_id},
p_contract_id => ${@contract_id},
p_contract_id => ${@contract_id},
p_et_date => TO_DATE(${@termination_date},'yyyy-mm-dd'),
p_et_date => TO_DATE(${@termination_date},'yyyy-mm-dd'),
p_ET_FEE => ${@et_fee},
p_ET_FEE => ${@et_fee},
p_et_interest_rate => ${@et_interest_rate},
p_et_interest_rate => ${@et_interest_rate},
p_et_total_amount => ${@et_total_amount},
p_et_total_amount => ${@et_total_amount},
p_et_due_amount => ${@et_due_amount},
p_et_due_amount => ${@et_due_amount},
p_overdue_amount => ${@overdue_amount},
p_overdue_amount => ${@overdue_amount},
...
@@ -31,9 +30,8 @@
...
@@ -31,9 +30,8 @@
p_sum_unreceived_principal => ${@sum_unreceived_principal},
p_sum_unreceived_principal => ${@sum_unreceived_principal},
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;
]]>
]]>
...
...
src/main/webapp/WEB-INF/classes/cont/CON_ET001/create_change_req.lwm
View file @
af390dab
<?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"
/>
...
...
src/main/webapp/modules/cont/CON_ET001/con_early_termination_et_detail.lview
View file @
af390dab
...
@@ -6,16 +6,16 @@
...
@@ -6,16 +6,16 @@
<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"
<a:link
id=
"con_contract_repo_detail_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
modelaction=
"update"
/>
<a:link
id=
"con_et002_submit_link"
model=
"cont.CON_ET001.submit_change_req"
modelaction=
"execute"
/>
<a:link
id=
"con_et002_submit_link"
model=
"cont.CON_ET001.submit_change_req"
modelaction=
"execute"
/>
<a:link
id=
"con_et002_cancel_link"
model=
"cont.CON731.cancel_change_req"
modelaction=
"execute"
/>
<a:link
id=
"con_et002_cancel_link"
model=
"cont.CON731.cancel_change_req"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_cashflow_link"
model=
"cont.CON_ET001.calc_cashflow"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_cashflow_link"
model=
"cont.CON_ET001.calc_cashflow"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_cashflow_link1"
model=
"cont.CON_ET001.insert_calc_cashflow"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_cashflow_link1"
model=
"cont.CON_ET001.insert_calc_cashflow"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_et_date_amount_link"
model=
"cont.CON_ET001.calc_et_date_amount"
<a:link
id=
"con_et001_calc_et_date_amount_link"
model=
"cont.CON_ET001.calc_et_date_amount"
modelaction=
"execute"
/>
modelaction=
"execute"
/>
<a:link
id=
"con731_cancel_link"
model=
"cont.CON731.cancel_change_req"
modelaction=
"execute"
/>
<a:link
id=
"con731_cancel_link"
model=
"cont.CON731.cancel_change_req"
modelaction=
"execute"
/>
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_uploadFile_id"
<a:link
id=
"${/parameter/@layout_code}_prj500_cdd_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
url=
"${/request/@context_path}/uploadFile.lview"
/>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
url=
"${/request/@context_path}/modules/wx/WX100/wx_ele_verify_operator.lsc"
/>
url=
"${/request/@context_path}/modules/wx/WX100/wx_ele_verify_operator.lsc"
/>
<a:link
id=
"${/parameter/@layout_code}_con_ele_sign_cancel_link_id"
<a:link
id=
"${/parameter/@layout_code}_con_ele_sign_cancel_link_id"
url=
"${/request/@context_path}/modules/cont/CON505/con_ele_sign_cancel.lsc"
/>
url=
"${/request/@context_path}/modules/cont/CON505/con_ele_sign_cancel.lsc"
/>
<a:link
id=
"con_lease_org_print_link"
<a:link
id=
"con_lease_org_print_link"
url=
"${/request/@context_path}/modules/cont/CON_ET001/create_content_for_con_et.lsc"
/>
url=
"${/request/@context_path}/modules/cont/CON_ET001/create_content_for_con_et.lsc"
/>
<script
src=
"${/request/@context_path}/javascripts/lightbox.js"
type=
"text/javascript"
/>
<script
src=
"${/request/@context_path}/javascripts/lightbox.js"
type=
"text/javascript"
/>
<link
href=
"${/request/@context_path}/css/lightbox.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
href=
"${/request/@context_path}/css/lightbox.css"
rel=
"stylesheet"
type=
"text/css"
/>
...
@@ -39,57 +39,72 @@
...
@@ -39,57 +39,72 @@
$(ds_con_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(ds_con_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(ds_con_id).query();
$(ds_con_id).query();
}
}
if ('${/model/pilot_run_user/record/@pilot_run_flag}' != 'Y') {
if ('${/parameter/@simulation_flag}' == 'Y') {
if ('${/parameter/@simulation_flag}' == 'Y') {
if (document.getElementById('${/parameter/@layout_code}_submit_approval')) {
if (document.getElementById('${/parameter/@layout_code}_submit_approval')) {
document.getElementById('${/parameter/@layout_code}_submit_approval').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_submit_approval').style.display = 'none';
}
}
if (document.getElementById('${/parameter/@layout_code}_user_button3')) {
if (document.getElementById('${/parameter/@layout_code}_user_button3')) {
document.getElementById('${/parameter/@layout_code}_user_button3').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_user_button3').style.display = 'none';
}
if (document.getElementById('${/parameter/@layout_code}_user_button4')) {
document.getElementById('${/parameter/@layout_code}_user_button4').style.display = 'none';
}
} else {
if (document.getElementById('${/parameter/@layout_code}_user_button5')) {
document.getElementById('${/parameter/@layout_code}_user_button5').style.display = 'none';
}
}
}
if (
'${/model/pilot_run_user/record/@pilot_run_flag}' == 'N'
) {
if (
document.getElementById('${/parameter/@layout_code}_user_button4')
) {
$('${/parameter/@layout_code}_user_button4').hide()
;
document.getElementById('${/parameter/@layout_code}_user_button4').style.display = 'none'
;
}
}
}
}
}
else{
if (document.getElementById('${/parameter/@layout_code}_user_button5')) {
document.getElementById('${/parameter/@layout_code}_user_button5').style.display = 'none';
}
}
if ('${/model/pilot_run_user/record/@pilot_run_flag}' != 'Y'){
$('${/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
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
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');
if (ds_id == ds.id && ds_id) {
if (ds_id == ds.id && ds_id) {
if(record.get('bp_class') == 'NP'){
if(record.get('bp_class') == 'NP'){
record.getField('signer_n').setReadOnly(true);
record.getField('signer_n').setReadOnly(true);
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';
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
debugger;
var clc_flag = 'N';
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
debugger;
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ds == $(ds_id)) {
if (ds == $(ds_id)) {
if
(value != old_value)
{
if
(value!=old_value)
{
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;
if (due_amount < value) {
if (due_amount < value) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的罚息必须小于等于逾期罚息!');
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的罚息必须小于等于逾期罚息!');
...
@@ -105,75 +120,107 @@
...
@@ -105,75 +120,107 @@
}, 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) {
// 根据结清日计算结清相关金额字段
// 根据结清日计算结清相关金额字段
Leaf.request({
Leaf.request({
url: $('con_et001_calc_et_date_amount_link').getUrl(),
url: $('con_et001_calc_et_date_amount_link').getUrl(),
para: {
para: {
/****/
change_req_id:record.get('change_req_id'),
change_req_id: record.get('change_req_id'),
/**合同id**/
contract_id: record.get('contract_id'),
contract_id: record.get('contract_id'),
/**提前结清日**/
termination_date: value,
termination_date: value,
/**提前结清手续费**/
/**提前结清手续费**/
et_fee: record.get('et_fee') || 0,
et_fee: record.get('et_fee') || 0,
/**提前结清利率**/
/**提前结清利率**/
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';
//record.set('et_fee', res.result.et_fee);
//record.set('et_fee', res.result.et_fee);
record.set('et_total_amount', res.result.et_total_amount);
record.set('et_total_amount', res.result.et_total_amount);
record.set('et_due_amount', res.result.et_due_amount);
record.set('et_due_amount', res.result.et_due_amount);
record.set('overdue_amount', res.result.overdue_amount
||
0);
record.set('overdue_amount', res.result.overdue_amount
||
0);
record.set('penalty', res.result.penalty
||
0);
record.set('penalty', res.result.penalty
||
0);
record.set('ccr_penalty', res.result.penalty
||
0);
record.set('ccr_penalty', res.result.penalty
||
0);
record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_cost', res.result.fund_possession_cost);
record.set('fund_possession_cost', res.result.fund_possession_cost);
record.set('ccr_fund_possession_cost', res.result.fund_possession_cost); //add by xsh35973 20220610
record.set('ccr_fund_possession_cost', res.result.fund_possession_cost); //add by xsh35973 20220610
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';
clc_flag = 'N';
},
},
failure: function () {
failure: function () {
record.set('termination_date',
'');
record.set('termination_date','');
record.set('et_total_amount',
'');
record.set('et_total_amount','');
record.set('et_due_amount',
'');
record.set('et_due_amount','');
record.set('overdue_amount', '');
record.set('overdue_amount', '');
record.set('penalty', '');
record.set('penalty', '');
record.set('ccr_penalty', '');
record.set('ccr_penalty', '');
record.set('fund_possession_time',
'');
record.set('fund_possession_time','');
record.set('fund_possession_cost',
'');
record.set('fund_possession_cost','');
//record.set('fund_possession_rate','');
//record.set('fund_possession_rate','');
record.set('last_rent_due_date',
'');
record.set('last_rent_due_date','');
record.set('sum_unreceived_principal',
'');
record.set('sum_unreceived_principal','');
},
},
error: function () {
error: function () {
record.set('termination_date',
'');
record.set('termination_date','');
record.set('et_total_amount',
'');
record.set('et_total_amount','');
record.set('et_due_amount',
'');
record.set('et_due_amount','');
record.set('overdue_amount', '');
record.set('overdue_amount', '');
record.set('penalty', '');
record.set('penalty', '');
record.set('ccr_penalty', '');
record.set('ccr_penalty', '');
record.set('fund_possession_time',
'');
record.set('fund_possession_time','');
record.set('fund_possession_cost',
'');
record.set('fund_possession_cost','');
//record.set('fund_possession_rate','');
//record.set('fund_possession_rate','');
record.set('last_rent_due_date',
'');
record.set('last_rent_due_date','');
record.set('sum_unreceived_principal',
'');
record.set('sum_unreceived_principal','');
},
},
scope: this
scope: this
});
});
}
}
//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!');
setTimeout(function
()
{
setTimeout(function
()
{
...
@@ -187,7 +234,7 @@
...
@@ -187,7 +234,7 @@
record.set('et_due_amount',
et_due_amount_result);
record.set('et_due_amount',
et_due_amount_result);
}
}
}
}
if(name == 'residual_value'
&& clc_flag =='N'){
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
()
{
...
@@ -195,10 +242,11 @@
...
@@ -195,10 +242,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);
}
}
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!');
setTimeout(function
()
{
setTimeout(function
()
{
...
@@ -206,38 +254,39 @@
...
@@ -206,38 +254,39 @@
},
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()
{
$('${/parameter/@layout_code}_submit_approval').disable();
$('${/parameter/@layout_code}_submit_approval').disable();
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var
req_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASE_01',
'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
var
req_record =
$(req_ds_id).getAt(0);
var case_type = '';
var
case_type =
''
;
var document_type = '${/parameter/@document_type}';
var
document_type =
'${/parameter/@document_type}'
;
var calc_session_id = req_record.get('calc_session_id');
var
calc_session_id =
req_record.get('calc_session_id');
calc_flag
=
req_record.get('calc_flag');
calc_flag
=
req_record.get('calc_flag');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
//
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable())) {
if
($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable()))
{
if (req_record.dirty) {
if
(req_record.dirty)
{
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
Leaf.showMessage('${l:HLS.PROMPT}',
'${l:HLS.EXECUTE_AFTER_SAVE}');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
//
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
return;
}
}
if (calc_flag ==
'N') {
if
(
calc_flag=
=
'N')
{
Leaf.showMessage('${l:HLS.PROMPT}', '请先计算!');
Leaf.showMessage('${l:HLS.PROMPT}',
'请先计算!');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
//
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
return;
}
}
//$('${/parameter/@layout_code}_submit_approval').disable();
//$('${/parameter/@layout_code}_submit_approval').disable();
//$('${/parameter/@layout_code}_save').disable();
//$('${/parameter/@layout_code}_save').disable();
// $('${/parameter/@layout_code}_user_button1').disable();
//
$('${/parameter/@layout_code}_user_button1').disable();
// $('${/parameter/@layout_code}_user_button3').disable();
//
$('${/parameter/@layout_code}_user_button3').disable();
//setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000);
//setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit),
2000);
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit);
//
window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit);
//解约回购合同增加提交审批前是否完全核销校验
add
by
xsh35973
//解约回购合同增加提交审批前是否完全核销校验
add
by
xsh35973
if('${/model/get_contract_status/record/@contract_status}'
=='REPURING'){
if('${/model/get_contract_status/record/@contract_status}'
=='REPURING'){
Leaf.request({
Leaf.request({
...
@@ -260,28 +309,27 @@
...
@@ -260,28 +309,27 @@
}else
{
}else
{
con_repo001_submit();
con_repo001_submit();
};
};
} else {
}
else
{
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
}
};
};
function
con_repo001_submit()
{
function
con_repo001_submit()
{
Leaf.showConfirm('${l:HLS.PROMPT}',
'是否确认提交审批?',
function
()
{
Leaf.showConfirm('${l:HLS.PROMPT}',
'是否确认提交审批?',
function
()
{
$('${/parameter/@layout_code}_submit_approval').disable();
$('${/parameter/@layout_code}_submit_approval').disable();
//$('${/parameter/@layout_code}_save').disable();
//$('${/parameter/@layout_code}_save').disable();
//
$('${/parameter/@layout_code}_user_button1').disable();
//
$('${/parameter/@layout_code}_user_button1').disable();
//
$('${/parameter/@layout_code}_user_button3').disable();
//
$('${/parameter/@layout_code}_user_button3').disable();
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var
req_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASE_01',
'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
var
req_record =
$(req_ds_id).getAt(0);
var sign_type = req_record.get('sign_type');
var
sign_type =
req_record.get('sign_type');
var flow_count = req_record.get('flow_count');
var
flow_count =
req_record.get('flow_count');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
//
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if
(
sign_type =
=
'ELE_SIGN'
&&
flow_count
>
0){
if
(
sign_type =
=
'ELE_SIGN'
&&
flow_count
>
0){
Leaf.showConfirm('${l:HLS.PROMPT}', '您发起的电子签署还未完成,如此时提交,将会转为纸质签署,请确认。', function (){
Leaf.showConfirm('${l:HLS.PROMPT}', '您发起的电子签署还未完成,如此时提交,将会转为纸质签署,请确认。', function (){
Leaf.request({
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: {
para: {
contract_id:
'${/parameter/@change_req_id}'
contract_id:
${/parameter/@change_req_id}
},
},
scope: this,
scope: this,
success: function (res) {
success: function (res) {
...
@@ -296,7 +344,7 @@
...
@@ -296,7 +344,7 @@
Leaf.request({
Leaf.request({
url: $('con_et002_submit_link').getUrl(),
url: $('con_et002_submit_link').getUrl(),
para: {
para: {
change_req_id:
'${/parameter/@change_req_id}'
,
change_req_id:
${/parameter/@change_req_id}
,
layout_code: '${/parameter/@layout_code}'
layout_code: '${/parameter/@layout_code}'
},
},
success: function(res) {
success: function(res) {
...
@@ -307,21 +355,21 @@
...
@@ -307,21 +355,21 @@
$('${/parameter/@layout_code}_user_button3').enable();
$('${/parameter/@layout_code}_user_button3').enable();
$('${/parameter/@winid}').close();
$('${/parameter/@winid}').close();
},
},
failure: function
() {
failure: function
() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button3').enable();
$('${/parameter/@layout_code}_user_button3').enable();
},
},
error: function
() {
error: function
() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button3').enable();
$('${/parameter/@layout_code}_user_button3').enable();
},
},
scope: this
scope: this
...
@@ -348,7 +396,7 @@
...
@@ -348,7 +396,7 @@
Leaf.request({
Leaf.request({
url: $('con_et002_submit_link').getUrl(),
url: $('con_et002_submit_link').getUrl(),
para: {
para: {
change_req_id:
'${/parameter/@change_req_id}'
,
change_req_id:
${/parameter/@change_req_id}
,
layout_code: '${/parameter/@layout_code}'
layout_code: '${/parameter/@layout_code}'
},
},
success: function(res) {
success: function(res) {
...
@@ -383,22 +431,22 @@
...
@@ -383,22 +431,22 @@
}
}
//保存submitsuccess调用
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function
(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
var ca_ds_id_s = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_QUOTATION_03', 'con_contract_cashflow');
var ca_ds_id_s = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_03', 'con_contract_cashflow');
if (ca_ds_id_s) {
if (ca_ds_id_s) {
$(ca_ds_id_s).query();
$(ca_ds_id_s).query();
}
}
var ca_ds_id_c = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_QUOTATION_04', 'con_contract_cashflow');
var ca_ds_id_c = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_04', 'con_contract_cashflow');
if (ca_ds_id_c) {
if (ca_ds_id_c) {
$(ca_ds_id_c).query();
$(ca_ds_id_c).query();
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
};
//报价计算
//报价计算
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function
() {
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用
$('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var con_contract_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASE_01', 'con_contract_change_req');
var con_contract_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
var con_record = $(con_contract_ds_id).getAt(0);
var con_record = $(con_contract_ds_id).getAt(0);
if ($(con_contract_ds_id).validate()) {
if ($(con_contract_ds_id).validate()) {
if (con_record.dirty) {
if (con_record.dirty) {
...
@@ -407,38 +455,38 @@
...
@@ -407,38 +455,38 @@
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
return;
return;
}
}
clac();
clac();
} else {
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
}
}
};
};
function clac()
{
function clac(){
Leaf.request({
Leaf.request({
url: $('con_et001_calc_cashflow_link1').getUrl(),
url: $('con_et001_calc_cashflow_link1').getUrl(),
para: {
para: {
change_req_id: '${/parameter/@change_req_id}',
change_req_id: '${/parameter/@change_req_id}',
},
},
success: function
(res) {
success: function(res) {
Leaf.SideBar.enable = true;
Leaf.SideBar.enable = true;
Leaf.SideBar.show({msg: '计算成功!',
duration: 2000});
Leaf.SideBar.show({msg: '计算成功!',duration: 2000});
calc_flag
=
'Y';
calc_flag
=
'Y';
//con_record.getField('ccr_start_times').setReadOnly(true);
//con_record.getField('ccr_start_times').setReadOnly(true);
var ca_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'G_QUOTATION_02', 'con_contract_cashflow');
var ca_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_02', 'con_contract_cashflow');
var con_contract_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASE_01', 'con_contract_change_req');
var con_contract_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ca_ds_id
&&
con_contract_ds_id) {
if (ca_ds_id
&&
con_contract_ds_id) {
$(ca_ds_id).query();
$(ca_ds_id).query();
$(con_contract_ds_id).query();
$(con_contract_ds_id).query();
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
},
failure: function
() {
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
},
error: function
() {
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
},
...
@@ -447,15 +495,15 @@
...
@@ -447,15 +495,15 @@
}
}
//取消变更
//取消变更
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function
() {
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function
() {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function() {
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: {
para: {
contract_id:
'${/parameter/@change_req_id}'
contract_id:
${/parameter/@change_req_id}
},
},
scope: this,
scope: this,
success: function (res) {
success: function (res) {
...
@@ -467,7 +515,7 @@
...
@@ -467,7 +515,7 @@
Leaf.request({
Leaf.request({
url: $('con_et002_cancel_link').getUrl(),
url: $('con_et002_cancel_link').getUrl(),
para: {
para: {
change_req_id:
'${/parameter/@change_req_id}'
change_req_id:
${/parameter/@change_req_id}
},
},
success: function(res) {
success: function(res) {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
...
@@ -507,10 +555,10 @@
...
@@ -507,10 +555,10 @@
var signer = req_record.get('signer');
var signer = req_record.get('signer');
var bussiness_type = req_record.get('business_type');
var bussiness_type = req_record.get('business_type');
var bp_tenant_class = req_record.get('bp_class');
var bp_tenant_class = req_record.get('bp_class');
/* if (req_status != 'NEW') {
/* if (req_status != 'NEW') {
Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约');
Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约');
return;
return;
}*/
}*/
//解约回购的合同发起提前结清时,不能发起电子签约 add by xsh35973
//解约回购的合同发起提前结清时,不能发起电子签约 add by xsh35973
if('${/model/get_contract_status/record/@contract_status}' =='REPURING'){
if('${/model/get_contract_status/record/@contract_status}' =='REPURING'){
Leaf.showMessage('${l:PROMPT}', '解约回购的合同发起提前结清时,不能发起电子签约');
Leaf.showMessage('${l:PROMPT}', '解约回购的合同发起提前结清时,不能发起电子签约');
...
@@ -639,7 +687,7 @@
...
@@ -639,7 +687,7 @@
};
};
//图片渲染
//图片渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function
(record, name, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
var result = name.match(/(.*)_pic$/);
var result = name.match(/(.*)_pic$/);
if (result) {
if (result) {
var pic_value = record.get(result[1]);
var pic_value = record.get(result[1]);
...
@@ -654,7 +702,6 @@
...
@@ -654,7 +702,6 @@
}
}
}
}
};
};
//附件上传
//附件上传
function con_et_upload_file(id, name, query_only) {
function con_et_upload_file(id, name, query_only) {
...
@@ -711,21 +758,22 @@
...
@@ -711,21 +758,22 @@
}
}
}
}
};
};
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
debugger;
debugger;
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
var req_record = $(req_ds_id).getAt(0);
calc_flag = req_record.get('calc_flag')||'N';
calc_flag = req_record.get('calc_flag')||'N';
if (calc_flag == 'N') {
if (calc_flag == 'N') {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存并计算!');
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存并计算!');
return;
return;
}
}
var contract_id =req_record.get('change_req_id');
var contract_id =req_record.get('change_req_id');
var templet_code = 'ET_CALCULATION_TABLE_SIMU';
var templet_code = 'ET_CALCULATION_TABLE_SIMU';
var url=$('con_lease_org_print_link').getUrl() + '?contract_id=' + contract_id + '
&
templet_code=' + templet_code;
var url=$('con_lease_org_print_link').getUrl() + '?contract_id=' + contract_id + '
&
templet_code=' + templet_code;
window.open(url, '_self');
window.open(url, '_self');
};
};
]]>
</script>
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:view>
</a:screen>
</a:screen>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment