Commit 05227de7 authored by Spencer Chang's avatar Spencer Chang

[fix] 提前结清资金占用天数修改,现金流收/付方向修改为图片

parent 310e8454
...@@ -164,18 +164,15 @@ create or replace package body cus_con_et_pkg is ...@@ -164,18 +164,15 @@ create or replace package body cus_con_et_pkg is
and f.cf_type = 1 and f.cf_type = 1
and f.contract_id = p_contract_id; and f.contract_id = p_contract_id;
--上一次完全核销现金流 --上一次完全核销现金流
/*select (p_et_date - cwo.write_off_date) fund_possession_time select (p_et_date - f.due_date + 1) fund_possession_time
into v_fund_possession_time into v_fund_possession_time
from con_contract_cashflow f, csh_write_off cwo from con_contract_cashflow f
where cwo.reversed_flag = 'N' where f.due_date > p_et_date
and cwo.cashflow_id = f.cashflow_id and f.write_off_flag = 'FULL'
and cwo.contract_id = p_contract_id and f.cf_item = 1
and f.due_date > p_et_date and f.cf_type = 1
and f.write_off_flag != 'NOT' and f.cf_direction != 'NONCASH'
and f.cf_item = 1 and f.contract_id = p_contract_id;
and f.cf_type = 1
and f.contract_id = p_contract_id;*/
v_fund_possession_time := 11;
v_fund_possession_cost := v_sum_unreceived_principal * v_fund_possession_cost := v_sum_unreceived_principal *
nvl(v_fund_possession_time, 1) * nvl(v_fund_possession_time, 1) *
NVL(p_et_interest_rate, NVL(p_et_interest_rate,
...@@ -187,11 +184,12 @@ create or replace package body cus_con_et_pkg is ...@@ -187,11 +184,12 @@ create or replace package body cus_con_et_pkg is
where f.write_off_flag != 'FULL' where f.write_off_flag != 'FULL'
and f.overdue_status = 'Y' and f.overdue_status = 'Y'
and f.cf_item = 1 and f.cf_item = 1
and f.cf_type = 1
and f.cf_direction != 'NONCASH' and f.cf_direction != 'NONCASH'
and f.contract_id = p_contract_id; and f.contract_id = p_contract_id;
-- 逾期天数 overdue_max_days+现在至回购日天数 -- 逾期天数 overdue_max_days+现在至回购日天数
v_overdue_max_days := nvl(v_contract_rec.overdue_max_days, 0) + v_overdue_max_days := nvl(v_contract_rec.overdue_max_days, 0) +
trunc(p_et_date - sysdate); v_fund_possession_time;
-- v_penalty 逾期罚息,逾期罚息=逾期租金* 逾期天数 * 0.0004。回购总额中罚息由系统自动计算,可直接进行手动调整,不需要通过罚息减免流程;逾期罚息,计算到回购解约日为止 -- v_penalty 逾期罚息,逾期罚息=逾期租金* 逾期天数 * 0.0004。回购总额中罚息由系统自动计算,可直接进行手动调整,不需要通过罚息减免流程;逾期罚息,计算到回购解约日为止
v_penalty := v_sum_overdue_amount * v_overdue_max_days * 0.0004; v_penalty := v_sum_overdue_amount * v_overdue_max_days * 0.0004;
v_et_due_amount := v_sum_unreceived_principal + v_sum_overdue_amount; v_et_due_amount := v_sum_unreceived_principal + v_sum_overdue_amount;
...@@ -424,10 +422,10 @@ create or replace package body cus_con_et_pkg is ...@@ -424,10 +422,10 @@ create or replace package body cus_con_et_pkg is
con_contract_history_pkg.calc_change_history(p_change_req_id => p_change_req_id, con_contract_history_pkg.calc_change_history(p_change_req_id => p_change_req_id,
p_user_id => p_user_id); p_user_id => p_user_id);
con_contract_change_req_wf_pkg.workflow_start(p_change_req_rec => r_change_req_rec, cus_con_change_req_wfl_pkg.workflow_start(p_change_req_rec => r_change_req_rec,
p_change_con_rec => r_change_con_rec, p_change_con_rec => r_change_con_rec,
p_layout_code => p_layout_code, p_layout_code => p_layout_code,
p_user_id => p_user_id); p_user_id => p_user_id);
end submit_change_req_et; end submit_change_req_et;
end cus_con_et_pkg; end cus_con_et_pkg;
/ /
...@@ -80,7 +80,8 @@ select t.change_req_id, ...@@ -80,7 +80,8 @@ select t.change_req_id,
WHERE m.bp_id = cc.bp_id_agent_level1) WHERE m.bp_id = cc.bp_id_agent_level1)
AS bp_id_agent_level1_n, AS bp_id_agent_level1_n,
nvl(t.residual_value,cc.residual_value)residual_value, nvl(t.residual_value,cc.residual_value)residual_value,
t.ccr_reason t.ccr_reason,
t.termination_date
--提前结清 end --提前结清 end
from con_contract_change_req t, from con_contract_change_req t,
con_contract cc con_contract cc
......
...@@ -697,6 +697,22 @@ ...@@ -697,6 +697,22 @@
}; };
/// 附件上传 end /// 附件上传 end
//图片渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
var result = name.match(/(.*)_pic$/);
if (result) {
var pic_value = record.get(result[1]);
if (pic_value == 'OUTFLOW') {
return '<img src="${/request/@context_path}/images/outflow.png" style="margin-top:4px"/>';
} else if (pic_value == 'INFLOW') {
return '<img src="${/request/@context_path}/images/inflow.png" style="margin-top:4px"/>';
} else if (pic_value == 'NONCASH') {
return '<img src="${/request/@context_path}/images/noncash.png" style="margin-top:4px"/>';
} else if (pic_value == 'CASH') {
return '<img src="${/request/@context_path}/images/cash.png" style="margin-top:4px"/>';
}
}
};
]]></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>
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
}; };
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();
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 = '';
...@@ -67,12 +68,17 @@ ...@@ -67,12 +68,17 @@
var calc_session_id = req_record.get('calc_session_id'); var calc_session_id = req_record.get('calc_session_id');
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()) { 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;
} // }
$('${/parameter/@layout_code}_submit_approval').disable();
$('${/parameter/@layout_code}_save').disable();
$('${/parameter/@layout_code}_user_button1').disable();
$('${/parameter/@layout_code}_user_button2').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);
} else { } else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...@@ -89,13 +95,28 @@ ...@@ -89,13 +95,28 @@
layout_code: '${/parameter/@layout_code}' layout_code: '${/parameter/@layout_code}'
}, },
success: function(res) { success: function(res) {
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button2').enable();
$('${/parameter/@layout_code}_user_button3').enable();
$('${/parameter/@winid}').close(); $('${/parameter/@winid}').close();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
failure: function() { failure: function() {
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button2').enable();
$('${/parameter/@layout_code}_user_button3').enable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
error: function() { error: function() {
$('${/parameter/@layout_code}_submit_approval').enable();
$('${/parameter/@layout_code}_save').enable();
$('${/parameter/@layout_code}_user_button1').enable();
$('${/parameter/@layout_code}_user_button2').enable();
$('${/parameter/@layout_code}_user_button3').enable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
scope: this scope: this
...@@ -112,6 +133,7 @@ ...@@ -112,6 +133,7 @@
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}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
...@@ -196,6 +218,23 @@ ...@@ -196,6 +218,23 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
}; };
//图片渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
var result = name.match(/(.*)_pic$/);
if (result) {
var pic_value = record.get(result[1]);
if (pic_value == 'OUTFLOW') {
return '<img src="${/request/@context_path}/images/outflow.png" style="margin-top:4px"/>';
} else if (pic_value == 'INFLOW') {
return '<img src="${/request/@context_path}/images/inflow.png" style="margin-top:4px"/>';
} else if (pic_value == 'NONCASH') {
return '<img src="${/request/@context_path}/images/noncash.png" style="margin-top:4px"/>';
} else if (pic_value == 'CASH') {
return '<img src="${/request/@context_path}/images/cash.png" style="margin-top:4px"/>';
}
}
};
]]></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>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
var record = records[0], var record = records[0],
contract_id = record.get('contract_id'); contract_id = record.get('contract_id');
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在回购期间无法进行后续操作,请谨慎操作!!!如果需要取消提前结清,请一定点击取消按钮!!!</span>', function () { Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在回购期间无法进行后续操作,请谨慎操作!!!如果需要取消提前结清,请一定点击取消按钮!!!</span>', function () {
var ccr_document_type = 'ET'; var ccr_document_type = 'ET_CHAG';
Leaf.Masker.mask(Ext.getBody()); Leaf.Masker.mask(Ext.getBody());
Leaf.request({ Leaf.request({
url: $('con_et_create_change_link').getUrl(), url: $('con_et_create_change_link').getUrl(),
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
param['url_title'] = '提前结清维护'; param['url_title'] = '提前结清维护';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE'; param['maintain_type'] = 'UPDATE';
param['document_type'] = 'ET'; param['document_type'] = 'ET_CHAG';
param['winid'] = 'con_et003_detail_winid'; param['winid'] = 'con_et003_detail_winid';
hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs'); hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs');
} }
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
param['url_title'] = '提前结清明细'; param['url_title'] = '提前结清明细';
param['function_usage'] = 'READONLY'; param['function_usage'] = 'READONLY';
param['maintain_type'] = 'QUERY'; param['maintain_type'] = 'QUERY';
param['document_type'] = 'ET'; param['document_type'] = 'ET_CHAG';
param['winid'] = 'con_et003_detail_winid'; param['winid'] = 'con_et003_detail_winid';
hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs'); hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs');
} }
......
...@@ -342,6 +342,22 @@ ...@@ -342,6 +342,22 @@
return value; return value;
} }
} }
//图片渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
var result = name.match(/(.*)_pic$/);
if (result) {
var pic_value = record.get(result[1]);
if (pic_value == 'OUTFLOW') {
return '<img src="${/request/@context_path}/images/outflow.png" style="margin-top:4px"/>';
} else if (pic_value == 'INFLOW') {
return '<img src="${/request/@context_path}/images/inflow.png" style="margin-top:4px"/>';
} else if (pic_value == 'NONCASH') {
return '<img src="${/request/@context_path}/images/noncash.png" style="margin-top:4px"/>';
} else if (pic_value == 'CASH') {
return '<img src="${/request/@context_path}/images/cash.png" style="margin-top:4px"/>';
}
}
};
]]></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>
......
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