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
8beb33de
Commit
8beb33de
authored
Apr 17, 2020
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【fix】罚息减免测算逻辑修改
parent
5c4321c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
104 deletions
+106
-104
contract_penalty_reduction_maintain.lview
...es/cont/CON1020/contract_penalty_reduction_maintain.lview
+106
-104
No files found.
src/main/webapp/modules/cont/CON1020/contract_penalty_reduction_maintain.lview
View file @
8beb33de
...
...
@@ -17,115 +17,117 @@
//测算逻辑
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
//锁屏
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
var record1 = $(ds_id1).getCurrentRecord();
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_info_save/execute',
para: {
penalty_reduce_id: record1.get('penalty_reduce_id'),
base_date: record1.get('base_date'),
penalty_reduction: record1.get('penalty_reduction'),
reduce_amount_total: record1.get('reduce_amount_total'),
reduce_amount_total_ratio: record1.get('reduce_amount_total_ratio')
},
success: function (res) {
if (res.result.header_result == 'success') {
var ds_id2 = 'CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds';
$(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 = [];
var param = {};
for (var i = 0; i < records2.length; i++) {
param['penalty_info_id'] = records2[i].get('penalty_info_id');
param['penalty_reduce_amount'] = records2[i].get('penalty_reduce_amount');
param['_status'] = 'update';
param_list.push(param);
if($(ds_id1).validate()){
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_info_save/execute',
para: {
penalty_reduce_id: record1.get('penalty_reduce_id'),
base_date: record1.get('base_date'),
penalty_reduction: record1.get('penalty_reduction'),
reduce_amount_total: record1.get('reduce_amount_total'),
reduce_amount_total_ratio: record1.get('reduce_amount_total_ratio')
},
success: function (res) {
if (res.result.header_result == 'success') {
var ds_id2 = 'CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds';
$(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 = [];
var param = {};
for (var i = 0; i < records2.length; i++) {
param['penalty_info_id'] = records2[i].get('penalty_info_id');
param['penalty_reduce_amount'] = records2[i].get('penalty_reduce_amount');
param['_status'] = 'update';
param_list.push(param);
}
Leaf.request({
url: $('contract_penalty_calc_link_id').getUrl(),
para: param_list,
success: function (res1) {
var copy_contract_id = record1.get('copy_contract_id');
var base_date = record1.get('base_date');
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_calculate/update',
para: {
copy_contract_id: copy_contract_id,
base_date: base_date
},
success: function (res2) {
Leaf.SideBar.show({
msg: '测算成功',
duration: 2000
});
$('CON_PENALTY_REDUCTION_MAINTAIN_F_QUERY_con_contract_penalty_reduce_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_F_CASHFLOW_DETAIL_con_contract_cashflow_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds').query();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
} else {
var copy_contract_id = record1.get('copy_contract_id');
var base_date = record1.get('base_date');
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_calculate/update',
para: {
copy_contract_id: copy_contract_id,
base_date: base_date
},
success: function (res3) {
Leaf.SideBar.show({
msg: '测算成功',
duration: 2000
});
$('CON_PENALTY_REDUCTION_MAINTAIN_F_QUERY_con_contract_penalty_reduce_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_F_CASHFLOW_DETAIL_con_contract_cashflow_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds').query();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
Leaf.request({
url: $('contract_penalty_calc_link_id').getUrl(),
para: param_list,
success: function (res1) {
var copy_contract_id = record1.get('copy_contract_id');
var base_date = record1.get('base_date');
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_calculate/update',
para: {
copy_contract_id: copy_contract_id,
base_date: base_date
},
success: function (res2) {
Leaf.SideBar.show({
msg: '测算成功',
duration: 2000
});
$('CON_PENALTY_REDUCTION_MAINTAIN_F_QUERY_con_contract_penalty_reduce_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_F_CASHFLOW_DETAIL_con_contract_cashflow_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds').query();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
} else {
var copy_contract_id = record1.get('copy_contract_id');
var base_date = record1.get('base_date');
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON1020.con_contract_penalty_calculate/update',
para: {
copy_contract_id: copy_contract_id,
base_date: base_date
},
success: function (res3) {
Leaf.SideBar.show({
msg: '测算成功',
duration: 2000
});
$('CON_PENALTY_REDUCTION_MAINTAIN_F_QUERY_con_contract_penalty_reduce_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_F_CASHFLOW_DETAIL_con_contract_cashflow_ds').query();
$('CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds').query();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
}
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
};
//分配罚息
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
...
...
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