Commit 00b1aa9c authored by Spencer Chang's avatar Spencer Chang

Merge branch 'feature/con_change_feature' into develop

parents 5ffcf725 f8dec59b
......@@ -18,4 +18,95 @@ VALUES
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON_ET002', '提前结清申请明细', 1, SYSDATE, -1, SYSDATE, -1);
\ No newline at end of file
('CON_ET002', '提前结清申请明细', 1, SYSDATE, -1, SYSDATE, -1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733CF', '合同租金计划变更申请明细', 1, SYSDATE, -1, SYSDATE, -1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733BPT', '合同承租人变更申请明细', 1, SYSDATE, -1, SYSDATE, -1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733BPB', '合同回款账户变更申请明细', 1, SYSDATE, -1, SYSDATE, -1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733BPBQ', '合同回款账户变更申请明细', 1, SYSDATE, -1, SYSDATE, -1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733CF_Q','租金计划变更申请明细',1,SYSDATE,-1,SYSDATE,-1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733BPT_Q','承租人变更申请明细',1,SYSDATE,-1,SYSDATE,-1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON_REPO001D_Q','回购申请明细',1,SYSDATE,-1,SYSDATE,-1);
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON_ET002_Q','提前结清申请明细',1,SYSDATE,-1,SYSDATE,-1);
\ No newline at end of file
......@@ -11,6 +11,10 @@ sys_message_pkg.delete_message('ZJ_WFL_WORKFLOW_NODE_HIERARCHY_ERROR');
sys_message_pkg.insert_message('ZJ_WFL_WORKFLOW_NODE_HIERARCHY_ERROR','错误','查找工作流节点接收人出现错误,请联系管理员!','ZHS');
sys_message_pkg.insert_message('ZJ_WFL_WORKFLOW_NODE_HIERARCHY_ERROR','Error','查找工作流节点接收人出现错误,请联系管理员!','US');
sys_message_pkg.delete_message('CON_CONTRACT_CHANGE_REQ_PKG.IS_CALC_FLAG_ERR');
sys_message_pkg.insert_message('CON_CONTRACT_CHANGE_REQ_PKG.IS_CALC_FLAG_ERR','错误','未完成报价,请先完成报价计算操作!','ZHS');
sys_message_pkg.insert_message('CON_CONTRACT_CHANGE_REQ_PKG.IS_CALC_FLAG_ERR','Error','未完成报价,请先完成报价计算操作!','US');
end;
/
commit;
......
This diff is collapsed.
This diff is collapsed.
create or replace package cus_con_change_req_wfl_pkg is
-- Author : Spencer 3893
-- Created : 2019/9/25 13:51:00
-- Purpose : 合同變更工作流相關邏輯
procedure workflow_start(p_change_req_rec in con_contract_change_req%rowtype,
p_change_con_rec in con_contract%rowtype,
p_layout_code in varchar2,
p_user_id in number);
procedure workflow_approve(p_change_req_id in number,
p_user_id in number);
procedure workflow_reject(p_change_req_id in number, p_user_id in number);
procedure workflow_cancel(p_change_req_id in number, p_user_id in number);
end cus_con_change_req_wfl_pkg;
/
create or replace package body cus_con_change_req_wfl_pkg is
procedure workflow_start(p_change_req_rec in con_contract_change_req%rowtype,
p_change_con_rec in con_contract%rowtype,
p_layout_code in varchar2,
p_user_id in number) is
v_document_info varchar2(2000);
v_instance_id number;
v_bp_name varchar2(300);
v_workflow_desc varchar2(2000);
begin
select lv.bp_name
into v_bp_name
from con_contract_bp_tenant_lv lv
where lv.contract_id = p_change_con_rec.contract_id;
update con_contract_change_req t
set t.req_status = 'APPROVING',
t.submit_date = sysdate,
last_updated_by = p_user_id,
last_update_date = sysdate
where t.change_req_id = p_change_req_rec.change_req_id;
v_instance_id := p_change_req_rec.wfl_instance_id;
begin
select t1.workflow_desc
into v_workflow_desc
from hls_document_type_v t1
where t1.enabled_flag = 'Y'
and t1.document_type = p_change_req_rec.document_type
and t1.document_category = p_change_req_rec.document_category;
exception
when others then
null;
end;
v_document_info := v_workflow_desc || ':' ||
p_change_con_rec.contract_number || '-' || v_bp_name;
hls_workflow_pkg.workflow_start(p_instance_id => v_instance_id,
p_document_id => p_change_req_rec.change_req_id,
p_document_category => p_change_req_rec.document_category,
p_document_type => p_change_req_rec.document_type,
p_business_type => p_change_req_rec.business_type,
p_business_type_2nd => p_change_con_rec.business_type,
p_document_category_2nd => p_change_con_rec.document_category,
p_document_type_2nd => p_change_con_rec.document_type,
p_company_id => p_change_con_rec.company_id,
p_user_id => p_user_id,
p_lease_org => p_change_con_rec.lease_organization, --事业部
p_lease_channel => p_change_con_rec.lease_channel,
p_division => p_change_con_rec.division,
p_ccr_reschedule => p_change_req_rec.reschedule_flag,
p_ccr_et => p_change_req_rec.et_flag,
p_ccr_tenant_change => p_change_req_rec.tenant_change_flag,
p_ccr_lease_item_change => p_change_req_rec.lease_item_change_flag,
p_ccr_mortgage_change => p_change_req_rec.mortgage_change_flag,
p_ccr_guarantor_change => p_change_req_rec.guarantor_change_flag,
p_ccr_bank_acc_change => p_change_req_rec.bank_acc_change_flag,
p_ccr_contract_cancel => p_change_req_rec.contract_cancel_flag,
p_ccr_cashflow_change => p_change_req_rec.cashflow_change_flag,
-- parameter values
p_parameter_1 => 'NEW_CONTRACT_ID',
p_parameter_1_value => p_change_req_rec.change_req_id,
p_parameter_2 => 'OLD_CONTRACT_ID',
p_parameter_2_value => p_change_req_rec.contract_id,
p_parameter_4 => 'OWNER_USER_ID',
p_parameter_4_value => nvl(p_change_req_rec.owner_user_id,
p_user_id),
p_parameter_5 => 'CHANGE_REQ_ID',
p_parameter_5_value => p_change_req_rec.change_req_id,
p_parameter_6 => 'DOCUMENT_INFO',
p_parameter_6_value => v_document_info,
p_parameter_8 => 'CHANGE_REQ_NUMBER',
p_parameter_8_value => p_change_req_rec.change_req_number,
p_parameter_9 => 'PROJECT_ID',
p_parameter_9_value => p_change_con_rec.project_id,
p_parameter_10 => 'LAYOUT_CODE',
p_parameter_10_value => p_layout_code);
update con_contract_change_req t
set t.wfl_instance_id = v_instance_id
where t.change_req_id = p_change_req_rec.change_req_id;
exception
when no_data_found then
sys_raise_app_error_pkg.raise_user_define_error(p_message_code => 'CON_CONTRACT_CHG_REQ_WFL_PKG.NO_DATA_FOUND',
p_created_by => p_user_id,
p_package_name => 'cus_con_change_req_wfl_pkg',
p_procedure_function_name => 'workflow_start');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
when others then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => dbms_utility.format_error_backtrace || ' ' ||
sqlerrm,
p_created_by => p_user_id,
p_package_name => 'cus_con_change_req_wfl_pkg',
p_procedure_function_name => 'workflow_start');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
procedure workflow_approve(p_change_req_id in number,
p_user_id in number) is
begin
con_contract_change_req_pkg.change_req_confirm(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
end;
procedure workflow_reject(p_change_req_id in number, p_user_id in number) is
begin
con_contract_change_req_pkg.change_req_reject(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
end;
procedure workflow_cancel(p_change_req_id in number, p_user_id in number) is
begin
con_contract_change_req_pkg.change_req_cancel(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
end;
end cus_con_change_req_wfl_pkg;
/
This diff is collapsed.
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CON_ET001.log
set feedback off
set define off
begin
--分配bm
sys_function_assign_pkg.func_bm_load('CON733','cont.CON733.create_change_req');
sys_function_assign_pkg.func_bm_load('CON733','cont.CON733.calc_change_req');
sys_function_assign_pkg.func_bm_load('CON733','cont.CON733.calc_tenant_change_req');
end;
/
commit;
set feedback on
set define on
spool off
exit
......@@ -48,4 +48,12 @@ is '逾期租金(回购)';
alter table CON_CONTRACT add SUM_UNRECEIVED_PRINCIPAL number;
comment on column CON_CONTRACT.SUM_UNRECEIVED_PRINCIPAL
is '剩余本金(回购)';
\ No newline at end of file
is '剩余本金(回购)';
alter table CON_CONTRACT add extend_flag varchar2(1);
comment on column CON_CONTRACT.extend_flag
is '是否展期';
alter table CON_CONTRACT add deflation_flag varchar2(1);
comment on column CON_CONTRACT.deflation_flag
is '是否缩期';
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
CREATE OR REPLACE VIEW CON_CONTRACT_CHANGE_REQ_LV AS
CREATE OR REPLACE VIEW CON_CONTRACT_CHANGE_REQ_LV AS
select t.change_req_id,
t.batch_id,
t.change_quotation,
......@@ -66,13 +66,13 @@ select t.change_req_id,
nvl(t.et_fee,500) et_fee,
nvl(t.et_total_amount,0) et_total_amount,
nvl(t.et_interest,0) et_interest,
--提前结清 start
nvl(t.FUND_POSSESSION_TIME,0)FUND_POSSESSION_TIME,--资金占用天数
NVL(t.FUND_POSSESSION_COST,0)FUND_POSSESSION_COST,--资金占用费
NVL(t.FUND_POSSESSION_RATE,0)FUND_POSSESSION_RATE,--资金占用费利率
NVL(t.ET_DUE_AMOUNT,0)ET_DUE_AMOUNT,--提前结清租金
NVL(t.SUM_UNRECEIVED_PRINCIPAL,0)SUM_UNRECEIVED_PRINCIPAL,--剩余本金
NVL(t.ET_INTEREST_RATE,cc.int_rate_display)ET_INTEREST_RATE,--提前结清利率
--提前结清 start
nvl(t.FUND_POSSESSION_TIME,0)FUND_POSSESSION_TIME,--资金占用天数
NVL(t.FUND_POSSESSION_COST,0)FUND_POSSESSION_COST,--资金占用费
NVL(t.FUND_POSSESSION_RATE,0)FUND_POSSESSION_RATE,--资金占用费利率
NVL(t.ET_DUE_AMOUNT,0)ET_DUE_AMOUNT,--提前结清租金
NVL(t.SUM_UNRECEIVED_PRINCIPAL,0)SUM_UNRECEIVED_PRINCIPAL,--剩余本金
NVL(t.ET_INTEREST_RATE,cc.int_rate_display)ET_INTEREST_RATE,--提前结清利率
cc.bp_id_agent_level1,
(SELECT m.bp_name
FROM hls_bp_master m
......@@ -80,8 +80,9 @@ select t.change_req_id,
AS bp_id_agent_level1_n,
nvl(t.residual_value,cc.residual_value)residual_value,
t.ccr_reason
--提前结清 end
--提前结清 end
from con_contract_change_req t,
con_contract cc
where t.contract_id = cc.contract_id
where cc.contract_id = t.change_req_id
AND cc.data_class = 'CHANGE_REQ'
;
......@@ -4,19 +4,14 @@
<bm:operation name="execute">
<bm:parameters>
<bm:parameter name="change_req_id" dataType="java.lang.Long" input="true" output="false"/>
<bm:parameter name="ccr_fee" input="true" output="false"/>
<bm:parameter name="ccr_penalty" input="true" output="false"/>
<bm:parameter name="btb_payment_date" input="true" output="false"/>
<bm:parameter name="layout_code" dataType="java.lang.String" input="true" output="false"/>
<bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
CON_CHANGE_REQ_CALC_ITFC_PKG.SUBMIT_CHANGE_REQ
cus_con_change_req_pkg.SUBMIT_CHANGE_REQ
(
p_change_req_id=>${@change_req_id},
p_ccr_fee=>${@ccr_fee},
p_ccr_penalty=>${@ccr_penalty},
p_btb_payment_date=>to_date(${@btb_payment_date},'yyyy-mm-dd'),
p_layout_code=>${@layout_code},
p_user_id=>${/session/@user_id}
);
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:parameters>
<bm:parameter name="calc_session_id" dataType="java.lang.Long" input="false" output="true"/>
<bm:parameter name="calc_successful" dataType="java.lang.String" input="false" output="true"/>
<bm:parameter name="warning_message" dataType="java.lang.String" input="false" output="true"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
cus_con_change_req_pkg.CALC_CHANGE_REQ
(
p_change_req_id=>${@change_req_id},
p_ccr_start_times =>${@ccr_start_times},
p_ccr_outstanding_times =>${@ccr_outstanding_times},
p_calc_session_id=>${@calc_session_id},
p_calc_successful=>${@calc_successful},
p_warning_message=>${@warning_message},
p_user_id=>${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:parameters>
<bm:parameter name="ccr_lease_rental" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_rental"/>
<bm:parameter name="ccr_lease_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_principal"/>
<bm:parameter name="ccr_lease_interest" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_interest"/>
<bm:parameter name="ccr_lease_penalty" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_penalty"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
cus_con_change_req_pkg.calc_tenant_change_req(p_change_req_id =>${@change_req_id},
p_ccr_lease_date =>to_date(${@ccr_lease_date},'yyyy-mm-dd'),
p_ccr_lease_rental =>${@ccr_lease_rental},
p_ccr_lease_principal =>${@ccr_lease_principal},
p_ccr_lease_interest =>${@ccr_lease_interest},
p_ccr_lease_penalty =>${@ccr_lease_penalty},
p_user_id =>${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:parameters>
<bm:parameter name="change_req_id" dataType="java.lang.Long" input="false" output="true"/>
</bm:parameters>
<bm:update-sql><![CDATA[
DECLARE
v_change_req_id NUMBER;
BEGIN
cus_con_change_req_pkg.create_change_req(p_contract_id=>${@contract_id},
p_req_date=>to_date(${@req_date},'YYYY-MM-DD'),
p_req_type=>${@req_type},
p_description=>${@description},
p_user_id=>${/session/@user_id},
p_simulation_flag=>${@simulation_flag},
p_ref_v01=>${@ref_v01},
p_change_req_id=>v_change_req_id );
${@change_req_id}:=v_change_req_id;
END;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -6,6 +6,9 @@ var override_queryfields = [
{
name : 'bp_name',
queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_tenant and hr.bp_name like ${@bp_name})"
},{
name : 'bp_id_agent_level1_n',
queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_agent_level1 and hr.bp_name like ${@bp_id_agent_level1_n})"
},
{
name : 'lease_start_date_from',
......@@ -14,6 +17,14 @@ var override_queryfields = [
{
name : 'lease_start_date_to',
queryexpression : "t1.lease_start_date between nvl(to_date(${@lease_start_date_from},'yyyy-mm-dd'),t1.lease_start_date) and to_date(${@lease_start_date_to},'yyyy-mm-dd')"
},
{
name : 'inception_of_lease_from',
queryexpression : "t1.inception_of_lease between to_date(${@inception_of_lease_from},'yyyy-mm-dd') and nvl(to_date(${@inception_of_lease_to},'yyyy-mm-dd'),t1.inception_of_lease)"
},
{
name : 'inception_of_lease_to',
queryexpression : "t1.inception_of_lease between nvl(to_date(${@inception_of_lease_from},'yyyy-mm-dd'),t1.inception_of_lease) and to_date(${@inception_of_lease_to},'yyyy-mm-dd')"
}, {
field : 'project_id',
queryoperator : "="
......
......@@ -36,7 +36,7 @@ var override_queryfields = [
queryoperator: "="
}, {
name: 'contract_name',
queryexpression: "t1.contract_number like ${@contract_number}"
queryexpression: "t1.contract_name like ${@contract_name}"
}, {
field: 'lease_channel',
queryoperator: "="
......
......@@ -85,36 +85,27 @@
var param = record.data;
var req_status = record.get('req_status');
param['change_req_id'] = record.get('contract_id');
param['source_contract_id'] = record.get('source_contract_id');//變更前源合同id
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON732D';
param['function_usage'] = 'MODIFY';
param['req_status'] = req_status;
if (req_status == 'APPROVED' || req_status == 'APPROVING' || req_status == 'CANCEL') {
if (req_status == 'APPROVED' || req_status == 'APPROVING' || req_status == 'CANCEL' || req_status == 'REJECT' ) {
param['maintain_type'] = 'READONLY';
param['function_usage'] = 'QUERY';
} else {
param['maintain_type'] = 'UPDATE';
param['function_usage'] = 'MODIFY';
}
if (record.get('ccr_document_type') == 'PAYCARD' && (req_status == 'REJECT' || req_status == 'CANCEL' || req_status == 'APPROVED' || req_status == 'APPROVING')) {
param['function_code'] = 'CON732Q';
param['function_usage'] = 'QUERY';
param['url_title'] = '变更申请-还款卡变更查询 ';
} else if (record.get('ccr_document_type') == 'BASICHAG' && (req_status == 'REJECT' || req_status == 'CANCEL' || req_status == 'APPROVED' || req_status == 'APPROVING')) {
param['function_code'] = 'CON702E';
param['function_usage'] = 'QUERY';
param['url_title'] = '变更申请-常规信息查询 ';
} else if (record.get('ccr_document_type') == 'CONEXTHAG' && (req_status == 'REJECT' || req_status == 'CANCEL' || req_status == 'APPROVED' || req_status == 'APPROVING')) {
param['function_code'] = 'CON732D';
param['function_usage'] = 'QUERY';
param['url_title'] = '变更申请-还款卡变更 ';
} else {
param['function_code'] = 'CON732D_BASIC';
param['url_title'] = '变更申请-常规信息调整 ';
if (record.get('ccr_document_type') == 'CUT_CHAG') {
param['function_code'] = 'CON733CF';
param['url_title'] = '变更申请-合同回款账户变更';
} else if (record.get('ccr_document_type') == 'LEASE_CHAG') {
param['function_code'] = 'CON733BPT';
param['url_title'] = '变更申请-合同回款账户变更';
} else if (record.get('ccr_document_type') == 'ACC_CHAG') {
param['function_code'] = 'CON733BPB';
param['url_title'] = '变更申请-合同回款账户变更';
}
param['function_code'] = 'CON732D';
param['function_usage'] = 'MODIFY';
param['document_type'] = record.get('ccr_document_type');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_change_link', ds_id);
};
......
......@@ -124,10 +124,20 @@
var param = record.data;
var req_status = record.get('req_status');
param['change_req_id'] = record.get('contract_id');
param['source_contract_id'] = record.get('source_contract_id');//變更前源合同id
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON732E';
if (record.get('ccr_document_type') == 'CUT_CHAG') {
param['function_code'] = 'CON733CF_Q';
param['url_title'] = '变更申请-合同回款账户变更查询';
} else if (record.get('ccr_document_type') == 'LEASE_CHAG') {
param['function_code'] = 'CON733BPT_Q';
param['url_title'] = '变更申请-合同回款账户变更查询';
} else if (record.get('ccr_document_type') == 'ACC_CHAG') {
//param['function_code'] = 'CON733BPB';
param['function_code'] = 'CON733BPBQ';
param['url_title'] = '变更申请-合同回款账户变更查询';
}
param['function_usage'] = 'QUERY';
param['url_title'] = '变更申请查询';
param['req_status'] = req_status;
param['query_flag'] = 'Y';
param['maintain_type'] = 'QUERY';
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
2017-1-10 Harry 9952 2017/1/10 合同变更-经销商
合同变更
租金計劃變更
承租人變更
回款賬戶變更
-->
<a:screen xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application"
customizationEnabled="true" dynamiccreateenabled="true" trace="true">
......@@ -13,7 +15,7 @@
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="con_contract_change_link"
url="${/request/@context_path}/modules/cont/CON731/hls_con_contract_change_detail.lview"/>
<a:link id="con731_create_change_link" model="cont.CON731.create_change_req" modelaction="execute"/>
<a:link id="con733_create_change_link" model="cont.CON733.create_change_req" modelaction="execute"/>
<a:link id="con_contract_change_req_link"
url="${/request/@context_path}/modules/cont/CON701/con_contract_et_print.lsc"/>
<script type="text/javascript"><![CDATA[
......@@ -34,6 +36,7 @@
return value;
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
$('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var prj_project_result_ds = $(ds_id);
var records = prj_project_result_ds.getSelected();
......@@ -41,12 +44,12 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return;
}
Leaf.showConfirm('特别注意', '<font color="">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</font>', function () {
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</span>', function () {
var record = records[0];
var head_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var head_record = $(head_ds_id).getAt(0);
if ($(head_ds_id).validate()) {
if ($(head_ds_id).validate($('${/parameter/@layout_code}_user_button1').enable())) {
var contract = record.get('contract_id');
var ccr_document_type = head_record.get('ccr_document_type');
var req_date = head_record.get('req_date');
......@@ -54,7 +57,7 @@
var ref_v01 = head_record.get('ref_v01');
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('con731_create_change_link').getUrl(),
url: $('con733_create_change_link').getUrl(),
para: {
simulation_flag: 'N',
contract_id: record.get('contract_id'),
......@@ -64,21 +67,35 @@
ref_v01: ref_v01
},
success: function (res) {
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
var param = record.data;
param['change_req_id'] = res.result.change_req_id;
param['source_contract_id'] = record.get('contract_id');//變更前源合同id
param['contract_id'] = res.result.change_req_id;
param['function_code'] = 'CON732D';
param['url_title'] = '变更申请-合同变更';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['document_type'] = ccr_document_type;
if(ccr_document_type == 'CUT_CHAG'){//租金計劃變更
param['function_code'] = 'CON733CF';
param['url_title'] = '变更申请-合同租金计划变更';
param['winid'] = 'con733_cf_change_detail_winid';
}else if(ccr_document_type == 'LEASE_CHAG'){//承租人變更
param['function_code'] = 'CON733BPT';
param['url_title'] = '变更申请-合同承租人变更';
param['winid'] = 'con733_bpt_change_detail_winid';
}else if(ccr_document_type == 'ACC_CHAG'){//回款賬戶變更
param['function_code'] = 'CON733BPB';
param['url_title'] = '变更申请-合同回款账户变更';
param['winid'] = 'con733_bpb_change_detail_winid';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_change_link', ds_id);
},
failure: function () {
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
......@@ -86,23 +103,13 @@
}
}, null, 300, 150);
};
//变更申请打印单
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
var xmlTemp = '';
var fileName = '';
xmlTemp = 'con_contract_change_req_apply.xml';
fileName = '变更申请单.pdf';
var url = $('con_contract_change_req_link').getUrl() + '?xmlTemp=' + xmlTemp + '&fileName=' + fileName;
window.open(url);
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
}
// if (ds == $(ds_id)) {
// aut_authority_list_validate_query(ds, qpara);
//
// }
};
]]></script>
<a:screen-include
......
......@@ -133,7 +133,7 @@
<a:textField name="contract_name" bindTarget="contractQueryScreen_paraDs" prompt="合同名称"/>
<a:lov name="bp_name" bindTarget="contractQueryScreen_paraDs" prompt="承租人名称"/>
<a:lov name="bp_agent" bindTarget="contractQueryScreen_paraDs" prompt="代理店"/>
<a:comboBox name="division_n" bindTarget="contractQueryScreen_paraDs" prompt="产品线"/>
<a:comboBox name="division_n" bindTarget="contractQueryScreen_paraDs" prompt="租赁物"/>
<!-- <a:textField name="received_times" bindTarget="contractQueryScreen_paraDs" prompt="已还款期数"/>-->
<!-- <a:comboBox name="contract_status_desc" bindTarget="contractQueryScreen_paraDs" prompt="合同状态"/>-->
<a:comboBox name="overdue_status_desc" bindTarget="contractQueryScreen_paraDs" prompt="是否逾期"/>
......@@ -144,7 +144,7 @@
<a:column name="contract_name" prompt="合同名称" width="120" align="left"/>
<a:column name="bp_name" prompt="承租人名称" width="200" align="left"/>
<a:column name="bp_agent" prompt="代理店" width="200" align="left"/>
<a:column name="division_n" prompt="产品线" width="120" align="left"/>
<a:column name="division_n" prompt="租赁物" width="120" align="left"/>
<a:column name="received_times" prompt="已还款期数" width="80" align="right"/>
<a:column name="status_desc" prompt="合同状态" width="120" align="center"/>
<a:column name="overdue_status" prompt="是否逾期" width="100" align="center"/>
......
......@@ -131,7 +131,7 @@
<a:textField name="contract_name" bindTarget="contractQueryScreen_paraDs" prompt="合同名称"/>
<a:lov name="bp_name" bindTarget="contractQueryScreen_paraDs" prompt="承租人名称"/>
<a:lov name="bp_agent" bindTarget="contractQueryScreen_paraDs" prompt="代理店"/>
<a:comboBox name="division_n" bindTarget="contractQueryScreen_paraDs" prompt="产品线"/>
<a:comboBox name="division_n" bindTarget="contractQueryScreen_paraDs" prompt="租赁物"/>
<a:textField name="req_employee_n" bindTarget="contractQueryScreen_paraDs" prompt="申请人"/>
<a:comboBox name="req_status_n" bindTarget="contractQueryScreen_paraDs" prompt="变更审批状态"/>
</a:form>
......@@ -142,7 +142,7 @@
<a:column name="contract_name" prompt="合同名称" width="120" align="left"/>
<a:column name="bp_name" prompt="承租人名称" width="200" align="left"/>
<a:column name="bp_agent" prompt="代理店" width="200" align="left"/>
<a:column name="division_n" prompt="产品线" width="120" align="left"/>
<a:column name="division_n" prompt="租赁物" width="120" align="left"/>
<a:column name="req_employee_n" prompt="申请人" width="80" align="right"/>
<a:column name="req_status_n" prompt="变更审批状态" width="100" align="center"/>
</a:columns>
......
......@@ -5,7 +5,6 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure/>
<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_repo_submit_link" model="" modelaction="execute"/>
<a:link id="con_repo001_cancel_link" model="cont.CON731.cancel_change_req" modelaction="execute"/>
<a:link id="con_repo001_calc_cashflow_link" model="cont.CON_REPO001.calc_cashflow" modelaction="execute"/>
......@@ -27,9 +26,27 @@
// $(ds_us_id).query();
// }
});
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['download'] = 'Y';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var repurchase_types = record.get('repurchase_types');
if (repurchase_types == 'ONE_TIME_REPURCHASE') {
record.getField('payment_frequency_n').setRequired(false);
record.getField('payment_frequency').setRequired(false);
record.getField('payment_period').setRequired(false);
record.getField('payment_frequency_n').setReadOnly(true);
record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1);
}
};
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'] = function () {
// debugger;
......@@ -66,6 +83,7 @@
record.getField('payment_frequency_n').setReadOnly(true);
record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1);
record.set('payment_frequency', '');
if (name == 'ccr_due_amount') {
var due_amount = record.get('due_amount') || 0;
if (due_amount < value) {
......@@ -169,6 +187,7 @@
record.set('sum_overdue_amount', res.result.sum_overdue_amount);
record.set('sum_unreceived_principal', res.result.sum_unreceived_principal);
record.set('due_amount', res.result.due_amount);
record.set('ccr_due_amount', res.result.due_amount);
},
failure: function () {
......@@ -309,6 +328,17 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
};
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '<font color="RED">' + value + '</font>';
}
return value;
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</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