Commit 44b8131c authored by stone's avatar stone

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into feature/credit_feature

parents 18be16ea 6a9c2afa
......@@ -20,6 +20,7 @@ overlays/
# sql
*~sql
*~pck
# common config rename
uncertain.local.xml
......
......@@ -7,4 +7,15 @@ INSERT INTO SYS_FUNCTION_DYNAMIC
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON_REPO001D', '合同回购申请明细', 1, SYSDATE, -1, SYSDATE, -1);
\ No newline at end of file
('CON_REPO001D', '合同回购申请明细', 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', '提前结清申请明细', 1, SYSDATE, -1, SYSDATE, -1);
\ No newline at end of file
create or replace package cus_con_contract_repo_pkg is
create or replace package cus_con_contract_repo_pkg is
-- Author : Spencer 3893
-- Created : 9/10/2019 2:21:13 PM
-- Purpose : 合同回购
--add by Spencer 3893 20190911 回购申请
--add by Spencer 3893 20190911 回购申请
procedure create_change_req_repo(p_contract_id in number,
p_req_type in varchar2,
p_user_id in number,
......@@ -14,7 +14,7 @@ create or replace package cus_con_contract_repo_pkg is
--回购现金流计算
procedure calc_repo_cashflows(p_contract_id in number,
p_user_id in number);
--通过回购解约日获取回购相关信息
--通过回购解约日获取回购相关信息
procedure calc_repo_date_amount(p_contract_id in number,
p_repurchase_date date,
p_last_rent_due_date out date,
......@@ -63,7 +63,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_agent_bp_code varchar2(30);
v_price_ref_v05 varchar2(200);
v_product_code varchar2(2000);
e_product_code_err exception;
e_get_contract_number_err exception;
begin
......@@ -80,7 +80,7 @@ create or replace package body cus_con_contract_repo_pkg is
when no_data_found then
null;
end;
begin
select l.ref_v05
into v_price_ref_v05
......@@ -91,7 +91,7 @@ create or replace package body cus_con_contract_repo_pkg is
when no_data_found then
null;
end;
v_no := fnd_code_rule_pkg.get_rule_next_auto_num(p_document_category => 'CHANGE_REQUEST',
p_document_type => p_document_type,
p_company_id => p_company_id,
......@@ -101,16 +101,16 @@ create or replace package body cus_con_contract_repo_pkg is
p_price_ref_v05 => v_price_ref_v05,
p_product_code => v_product_code,
p_created_by => p_user_id);
if v_no = fnd_code_rule_pkg.c_error then
raise e_get_contract_number_err;
end if;
return v_no;
exception
when e_get_contract_number_err then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '获取编码失败,请联系系统管理员!',
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
......@@ -138,34 +138,29 @@ create or replace package body cus_con_contract_repo_pkg is
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
--add by Spencer 3893 20190911 回购申请
--add by Spencer 3893 20190911 回购申请
procedure create_change_req_repo(p_contract_id in number,
p_req_type in varchar2,
p_user_id in number,
p_simulation_flag in varchar2 default 'N',
p_change_req_id out number) is
v_change_req_id number;
v_contract_rec con_contract%rowtype;
begin
select *
into v_contract_rec
from con_contract cc
where cc.contract_id = p_contract_id
for update nowait;
v_contract_rec := get_contract_rec(p_contract_id, p_user_id);
if v_contract_rec.contract_status <> 'INCEPT' and p_req_type = 'REPUR' then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '只有起租状态的合同才能进行回购申请!',
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'create_change_req_repo');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end if;
con_contract_history_pkg.create_change_req(p_contract_id => p_contract_id,
p_change_req_id => v_change_req_id,
p_req_date => sysdate,
......@@ -178,7 +173,7 @@ create or replace package body cus_con_contract_repo_pkg is
p_simulation_flag => p_simulation_flag,
p_repo_change_flag => 'Y',
p_user_id => p_user_id);
--生成回购编号
--生成回购编号
v_contract_rec.repurchase_contract_number := get_contract_repo_number(p_document_type => p_req_type,
p_document_date => sysdate,
p_company_id => v_contract_rec.company_id,
......@@ -214,7 +209,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_principal := round(p_service_charges / 1.13, 2);
v_outstanding_principal := 0;
v_due_date := p_paymengt_deadlinedate;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 304;
......@@ -246,7 +241,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
......@@ -254,7 +249,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
end sc_cashflow_hander;
-- Refactored procedure fund_prossession_cost_hander
-- Refactored procedure fund_prossession_cost_hander
procedure fund_prossession_cost_hander(p_contract_id number,
p_fund_possession_cost number,
p_paymengt_deadlinedate date,
......@@ -271,7 +266,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_principal := round(p_fund_possession_cost / 1.13, 2);
v_outstanding_principal := 0;
v_due_date := p_paymengt_deadlinedate;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 14;
......@@ -303,7 +298,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
......@@ -316,7 +311,7 @@ create or replace package body cus_con_contract_repo_pkg is
p_user_id in number) is
v_contract_rec con_contract%rowtype;
v_cashflow_rec con_contract_cashflow%rowtype;
v_due_amount number; --每期租金
v_outstanding_principal number; --剩余本金
v_principal number; --本金
......@@ -325,7 +320,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_calc_due_date date;
v_times number;
v_calc_days number;
e_due_amount_error exception;
e_repo_calc_amount_error exception;
begin
......@@ -338,10 +333,10 @@ create or replace package body cus_con_contract_repo_pkg is
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
--计算前删除本次变更起始期及之后期,
delete_cashflow(p_contract_id, v_cashflow_rec.times);
-- 一次性回购
-- 一次性回购
if v_contract_rec.repurchase_types = 'ONE_TIME_REPURCHASE' then
v_times := v_cashflow_rec.times + 1;
v_cashflow_rec := null;
......@@ -351,7 +346,7 @@ create or replace package body cus_con_contract_repo_pkg is
2);
v_outstanding_principal := 0;
v_due_date := v_contract_rec.paymengt_deadlinedate;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := v_contract_rec.contract_id;
v_cashflow_rec.cf_item := 1;
......@@ -384,7 +379,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
......@@ -411,8 +406,8 @@ create or replace package body cus_con_contract_repo_pkg is
p_times => v_times,
p_user_id => p_user_id);
end if;
--分期回购
--分期回购
elsif v_contract_rec.repurchase_types = 'STAGE_REPURCHASE' then
v_outstanding_principal := v_contract_rec.repurchase_tatal_amount; --回购价款总额
if v_outstanding_principal > 0 then
......@@ -426,7 +421,7 @@ create or replace package body cus_con_contract_repo_pkg is
2)
into v_due_amount
from dual;
if nvl(v_due_amount, 0) <= 0 then
hls_sys_log_pkg.log('回购合同计算租金异常,计算利率:' ||
v_contract_rec.repurchase_interest_rate ||
......@@ -498,19 +493,19 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
--最后期不需要校验剩余本金是否小于0
if cur < 6 then
v_due_date := add_months(v_due_date, 1);
v_times := v_times + 1;
if v_outstanding_principal < 0 then
raise e_repo_calc_amount_error;
end if;
......@@ -540,14 +535,14 @@ create or replace package body cus_con_contract_repo_pkg is
raise e_repo_calc_amount_error;
end if;
end if;
exception
when e_repo_calc_amount_error then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '回购价款总额小于0,请检查!',
p_created_by => -1,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'calc_repo_cashflows');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
when e_due_amount_error then
......@@ -555,11 +550,11 @@ create or replace package body cus_con_contract_repo_pkg is
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'calc_repo_cashflows');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end calc_repo_cashflows;
--通过回购解约日获取回购相关信息
--通过回购解约日获取回购相关信息
procedure calc_repo_date_amount(p_contract_id in number,
p_repurchase_date date,
p_last_rent_due_date out date,
......@@ -593,7 +588,7 @@ create or replace package body cus_con_contract_repo_pkg is
and a.cf_item in (1, 9)
and a.write_off_flag in ('PARTIAL', 'FULL')
and a.contract_id = p_contract_id;
if v_times >= 1 then
raise e_write_off_flagg_err;
end if;
......@@ -601,16 +596,16 @@ create or replace package body cus_con_contract_repo_pkg is
select f.due_date, f.outstanding_rental_tax_incld
into v_last_rent_due_date, v_sum_unreceived_principal
from con_contract_cashflow f
where f.due_date < p_repurchase_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id
and f.times = (select max(f.times)
where f.times = (select max(f.times)
from con_contract_cashflow f
where f.due_date < p_repurchase_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id);
and f.contract_id = p_contract_id)
and f.due_date <= p_repurchase_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
p_last_rent_due_date := v_last_rent_due_date;
--已回收租金
select sum(nvl(F.RECEIVED_AMOUNT, 0))
......@@ -657,12 +652,12 @@ create or replace package body cus_con_contract_repo_pkg is
'之后数据发起回购!',
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'get_last_rent_due_date');
p_procedure_function_name => 'calc_repo_date_amount');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
when others then
null;
end calc_repo_date_amount;
......@@ -672,30 +667,30 @@ create or replace package body cus_con_contract_repo_pkg is
p_user_id in number) is
r_change_req_rec con_contract_change_req%rowtype;
r_change_con_rec con_contract%rowtype;
v_approval_method hls_document_type.approval_method%type;
v_calc_hd_rec hls_fin_calculator_hd%rowtype;
v_success_flag varchar2(1);
e_change_req_status_error exception;
e_calc_error exception;
e_simulation_error exception;
e_calc_session_id_notfound exception;
e_is_calc_flag_err exception;
e_attachment_error exception;
begin
hls_document_compare_pkg.con_contract_compare(p_table_name => 'CON_CONTRACT',
p_change_req_id => p_change_req_id,
p_from_table_pk => '',
p_to_table_pk => p_change_req_id,
p_user_id => p_user_id);
r_change_req_rec := get_con_change_req_rec(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
/*add by Harry 9952 2017/1/19
purpose: verify the atttachment required property when submit the document
*/
......@@ -720,14 +715,14 @@ create or replace package body cus_con_contract_repo_pkg is
if v_request_num > 0 then
raise e_attachment_error;
end if;*/
r_change_con_rec := con_contract_pkg.get_contract_rec(p_contract_id => p_change_req_id,
p_user_id => p_user_id);
if r_change_req_rec.req_status not in ('NEW', 'REJECT') then
raise e_change_req_status_error;
end if;
--当是罚息变更申请的时候,没有存contract_id,所以不需要走这一步
if r_change_req_rec.ccr_price_list is not null then
if r_change_req_rec.ccr_calc_session_id is null then
......
create or replace package cus_con_et_pkg is
-- Author : Spencer 3893
-- Created : 9/19/2019 3:40:32 PM
-- Purpose : 提前结清
procedure create_change_req_et(p_contract_id number,
p_req_type varchar2,
p_user_id number,
p_simulation_flag varchar2,
p_change_req_id out number);
--通过结清日获取结清相关信息
procedure calc_et_date_amount(p_contract_id in number,
p_et_date date,
p_et_fee in out number,
p_et_interest_rate in number,
p_et_total_amount out number,
p_et_due_amount out number,
p_overdue_amount out number,
p_penalty out number,
p_fund_possession_time out number,
p_fund_possession_cost out number,
p_SUM_UNRECEIVED_PRINCIPAL out number,
p_user_id in number);
--结清现金流计算
procedure calc_et_cashflows(p_contract_id in number, p_user_id in number);
--结清提交
procedure submit_change_req_et(p_change_req_id number,
p_layout_code varchar2,
p_user_id number);
end cus_con_et_pkg;
/
create or replace package body cus_con_et_pkg is
e_lock_table exception;
pragma exception_init(e_lock_table, -54);
function get_contract_rec(p_contract_id number, p_user_id number)
return con_contract%rowtype is
v_con_contract_rec con_contract%rowtype;
begin
select *
into v_con_contract_rec
from con_contract t
where t.contract_id = p_contract_id
for update nowait;
return v_con_contract_rec;
exception
when e_lock_table then
sys_raise_app_error_pkg.raise_user_define_error(p_message_code => 'CON_CONTRACT_PKG.CONTRACT_LOCK_ERROR',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'get_contract_rec');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
function get_con_change_req_rec(p_change_req_id con_contract_change_req.change_req_id%type,
p_user_id con_contract_change_req.created_by%type)
return con_contract_change_req%rowtype is
v_change_req_rec con_contract_change_req%rowtype;
begin
select *
into v_change_req_rec
from con_contract_change_req t
where t.change_req_id = p_change_req_id
for update nowait;
return v_change_req_rec;
exception
when e_lock_table then
sys_raise_app_error_pkg.raise_user_define_error(p_message_code => 'CON_CONTRACT_CHANGE_REQ_PKG.CON_CHANGE_REQ_LOCK',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'get_con_change_req_rec');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
procedure create_change_req_et(p_contract_id number,
p_req_type varchar2,
p_user_id number,
p_simulation_flag varchar2,
p_change_req_id out number) is
v_change_req_id number;
v_contract_rec con_contract%rowtype;
begin
v_contract_rec := get_contract_rec(p_contract_id, p_user_id);
if v_contract_rec.contract_status <> 'INCEPT' and p_req_type = 'ET' then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '只有起租状态的合同才能进行提前结清申请!',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'create_change_req_et');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end if;
con_contract_history_pkg.create_change_req(p_contract_id => p_contract_id,
p_change_req_id => v_change_req_id,
p_req_date => sysdate,
p_ref_v01 => null,
p_description => null,
p_change_quotation => null,
p_change_lease_item => null,
p_change_bp => null,
p_req_doc_type => p_req_type,
p_simulation_flag => p_simulation_flag,
p_et_flag => 'Y',
p_user_id => p_user_id);
p_change_req_id := v_change_req_id;
end create_change_req_et;
--通过结清日获取结清相关信息
procedure calc_et_date_amount(p_contract_id in number,
p_et_date date,
p_et_fee in out number,
p_et_interest_rate in number,
p_et_total_amount out number,
p_et_due_amount out number,
p_overdue_amount out number,
p_penalty out number,
p_fund_possession_time out number,
p_fund_possession_cost out number,
p_sum_unreceived_principal out number,
p_user_id in number) is
v_contract_rec con_contract%rowtype;
v_times number;
--剩余本金
v_sum_unreceived_principal number;
v_fund_possession_cost number;
v_fund_possession_time number;
v_sum_overdue_amount number;
v_penalty number;
v_et_due_amount number;
v_et_total_amount number;
v_overdue_max_days number;
e_write_off_flagg_err exception;
begin
select max(a.times)
into v_times
from con_contract_cashflow a
where a.due_date >= p_et_date
and a.cf_item in (1, 9)
and a.write_off_flag in ('PARTIAL', 'FULL')
and a.contract_id = p_contract_id;
if v_times >= 1 then
raise e_write_off_flagg_err;
end if;
v_contract_rec := get_contract_rec(p_contract_id, p_user_id);
--结清日最近的未核销现金流,获取剩余本金
select nvl(f.outstanding_prin_tax_incld, 0)
into v_sum_unreceived_principal
from con_contract_cashflow f
where f.times = (select max(f.times)
from con_contract_cashflow f
where f.due_date <= p_et_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id)
and f.due_date <= p_et_date
and f.write_off_flag = 'NOT'
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
--上一次完全核销现金流
/*select (p_et_date - cwo.write_off_date) fund_possession_time
into v_fund_possession_time
from con_contract_cashflow f, csh_write_off cwo
where cwo.reversed_flag = 'N'
and cwo.cashflow_id = f.cashflow_id
and cwo.contract_id = p_contract_id
and f.due_date > p_et_date
and f.write_off_flag != 'NOT'
and f.cf_item = 1
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 *
nvl(v_fund_possession_time, 1) *
NVL(p_et_interest_rate,
v_contract_rec.int_rate_display) / 360;
--逾期租金
select nvl(sum(f.overdue_amount), 0)
into v_sum_overdue_amount
from con_contract_cashflow f
where f.write_off_flag != 'FULL'
and f.overdue_status = 'Y'
and f.cf_item = 1
and f.cf_direction != 'NONCASH'
and f.contract_id = p_contract_id;
-- 逾期天数 overdue_max_days+现在至回购日天数
v_overdue_max_days := nvl(v_contract_rec.overdue_max_days, 0) +
trunc(p_et_date - sysdate);
-- v_penalty 逾期罚息,逾期罚息=逾期租金* 逾期天数 * 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_total_amount := v_sum_unreceived_principal + p_et_fee +
v_fund_possession_cost +
nvl(v_contract_rec.residual_value, 0) +
v_sum_overdue_amount;
--回写字段
p_et_total_amount := v_et_total_amount;
p_et_due_amount := v_et_due_amount;
p_overdue_amount := v_sum_overdue_amount;
p_penalty := v_penalty;
p_fund_possession_time := v_fund_possession_time;
p_fund_possession_cost := v_fund_possession_cost;
p_sum_unreceived_principal := v_sum_unreceived_principal;
exception
when e_write_off_flagg_err then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '第' ||
v_times ||
'期已有核销记录,请重新选择期数' ||
v_times ||
'之后数据发起结清!',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'calc_et_date_amount');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end calc_et_date_amount;
procedure delete_cashflow(p_contract_id number, p_times number) is
begin
delete from con_contract_cashflow cf
where cf.times > p_times
and cf.cf_item in (1, 9)
and cf.contract_id = p_contract_id;
end;
--结清现金流计算
procedure calc_et_cashflows(p_contract_id in number, p_user_id in number) is
v_change_req_rec con_contract_change_req%rowtype;
v_cashflow_rec con_contract_cashflow%rowtype;
v_principal number; --本金
v_interest number; --利息
v_due_date date;
v_times number;
begin
v_change_req_rec := get_con_change_req_rec(p_contract_id, p_user_id);
select *
into v_cashflow_rec
from con_contract_cashflow f
where f.times = (select max(f.times)
from con_contract_cashflow f
where f.due_date <= v_change_req_rec.termination_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id)
and f.due_date <= v_change_req_rec.termination_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
v_times := v_cashflow_rec.times + 1;
--计算前删除本次变更起始期及之后期,
delete_cashflow(p_contract_id, v_cashflow_rec.times);
--创建提前结清款现金流
v_cashflow_rec := null;
v_interest := round(v_change_req_rec.et_total_amount * 0.13 / 1.13,
2);
v_principal := round(v_change_req_rec.et_total_amount / 1.13, 2);
v_due_date := v_change_req_rec.termination_date;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 200;
v_cashflow_rec.cf_type := 1;
v_cashflow_rec.cf_direction := 'INFLOW';
v_cashflow_rec.cf_status := 'RELEASE';
v_cashflow_rec.times := v_times;
v_cashflow_rec.calc_date := v_due_date;
v_cashflow_rec.due_date := v_due_date;
v_cashflow_rec.due_amount := v_change_req_rec.et_total_amount;
v_cashflow_rec.net_due_amount := round(v_change_req_rec.et_total_amount / 1.13,
2);
v_cashflow_rec.vat_due_amount := round(v_change_req_rec.et_total_amount * 0.13 / 1.13,
2);
v_cashflow_rec.principal := v_principal;
v_cashflow_rec.net_principal := round(v_principal / 1.13,
2);
v_cashflow_rec.vat_principal := round(v_principal * 0.13 / 1.13,
2);
v_cashflow_rec.interest := v_interest;
v_cashflow_rec.net_interest := round(v_interest / 1.13, 2);
v_cashflow_rec.vat_interest := round(v_interest * 0.13 / 1.13,
2);
v_cashflow_rec.received_amount := 0;
v_cashflow_rec.received_principal := 0;
v_cashflow_rec.received_interest := 0;
v_cashflow_rec.outstanding_prin_tax_incld := 0;
v_cashflow_rec.write_off_flag := 'NOT';
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
--创建提前结清手续费现金流
v_cashflow_rec := null;
v_interest := round(v_change_req_rec.et_fee * 0.13 / 1.13, 2);
v_principal := round(v_change_req_rec.et_fee / 1.13, 2);
v_due_date := v_change_req_rec.termination_date;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 11;
v_cashflow_rec.cf_type := 11;
v_cashflow_rec.cf_direction := 'INFLOW';
v_cashflow_rec.cf_status := 'RELEASE';
v_cashflow_rec.times := v_times;
v_cashflow_rec.calc_date := v_due_date;
v_cashflow_rec.due_date := v_due_date;
v_cashflow_rec.due_amount := v_change_req_rec.et_fee;
v_cashflow_rec.net_due_amount := round(v_change_req_rec.et_fee / 1.13,
2);
v_cashflow_rec.vat_due_amount := round(v_change_req_rec.et_fee * 0.13 / 1.13,
2);
v_cashflow_rec.principal := v_principal;
v_cashflow_rec.net_principal := round(v_principal / 1.13,
2);
v_cashflow_rec.vat_principal := round(v_principal * 0.13 / 1.13,
2);
v_cashflow_rec.interest := v_interest;
v_cashflow_rec.net_interest := round(v_interest / 1.13, 2);
v_cashflow_rec.vat_interest := round(v_interest * 0.13 / 1.13,
2);
v_cashflow_rec.received_amount := 0;
v_cashflow_rec.received_principal := 0;
v_cashflow_rec.received_interest := 0;
v_cashflow_rec.outstanding_prin_tax_incld := 0;
v_cashflow_rec.write_off_flag := 'NOT';
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
--创建提前结清资金占用费现金流
v_cashflow_rec := null;
v_interest := round(v_change_req_rec.fund_possession_cost * 0.13 / 1.13,
2);
v_principal := round(v_change_req_rec.fund_possession_cost / 1.13, 2);
v_due_date := v_change_req_rec.termination_date;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 14;
v_cashflow_rec.cf_type := 14;
v_cashflow_rec.cf_direction := 'INFLOW';
v_cashflow_rec.cf_status := 'RELEASE';
v_cashflow_rec.times := v_times;
v_cashflow_rec.calc_date := v_due_date;
v_cashflow_rec.due_date := v_due_date;
v_cashflow_rec.due_amount := v_change_req_rec.fund_possession_cost;
v_cashflow_rec.net_due_amount := round(v_change_req_rec.fund_possession_cost / 1.13,
2);
v_cashflow_rec.vat_due_amount := round(v_change_req_rec.fund_possession_cost * 0.13 / 1.13,
2);
v_cashflow_rec.principal := v_principal;
v_cashflow_rec.net_principal := round(v_principal / 1.13,
2);
v_cashflow_rec.vat_principal := round(v_principal * 0.13 / 1.13,
2);
v_cashflow_rec.interest := v_interest;
v_cashflow_rec.net_interest := round(v_interest / 1.13, 2);
v_cashflow_rec.vat_interest := round(v_interest * 0.13 / 1.13,
2);
v_cashflow_rec.received_amount := 0;
v_cashflow_rec.received_principal := 0;
v_cashflow_rec.received_interest := 0;
v_cashflow_rec.outstanding_prin_tax_incld := 0;
v_cashflow_rec.write_off_flag := 'NOT';
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
end calc_et_cashflows;
--结清提交
procedure submit_change_req_et(p_change_req_id number,
p_layout_code varchar2,
p_user_id number) is
r_change_req_rec con_contract_change_req%rowtype;
r_change_con_rec con_contract%rowtype;
v_approval_method hls_document_type.approval_method%type;
e_change_req_status_error exception;
begin
hls_document_compare_pkg.con_contract_compare(p_table_name => 'CON_CONTRACT',
p_change_req_id => p_change_req_id,
p_from_table_pk => '',
p_to_table_pk => p_change_req_id,
p_user_id => p_user_id);
r_change_req_rec := get_con_change_req_rec(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
r_change_con_rec := con_contract_pkg.get_contract_rec(p_contract_id => p_change_req_id,
p_user_id => p_user_id);
if r_change_req_rec.req_status not in ('NEW', 'REJECT') then
raise e_change_req_status_error;
end if;
con_change_req_custom_pkg.before_submit_change_req(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
con_contract_history_pkg.calc_change_history(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
select approval_method
into v_approval_method
from hls_document_type
where document_category = r_change_req_rec.document_category
and document_type = r_change_req_rec.document_type;
if v_approval_method = 'WORK_FLOW' then
con_contract_change_req_wf_pkg.workflow_start(p_change_req_rec => r_change_req_rec,
p_change_con_rec => r_change_con_rec,
p_layout_code => p_layout_code,
p_user_id => p_user_id);
else
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_id;
con_contract_change_req_pkg.change_req_confirm(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
end if;
end submit_change_req_et;
end cus_con_et_pkg;
/
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CON_ET001.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/cont/CON_ET001/con_early_termination_query.lview','提前结清创建入口',1,1,0);
sys_function_assign_pkg.service_load('modules/cont/CON_ET001/con_early_termination_et_detail.lview','提前结清申请明细',1,1,0);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CON_ET001','提前结清创建','提前结清创建','100','','','modules/cont/CON_ET001/con_early_termination_query.lview','ZHS',-1);
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CON_ET001','提前结清创建','提前结清创建','100','','','modules/cont/CON_ET001/con_early_termination_query.lview','US',-1);
--分配页面
sys_function_assign_pkg.func_service_load('CON_ET001','modules/cont/CON_ET001/con_early_termination_query.lview');
sys_function_assign_pkg.func_service_load('CON_ET001','modules/cont/CON500/con_contract_authority_list_validate.lview');
sys_function_assign_pkg.func_service_load('CON_ET001','modules/cont/CON500/con_contract_get_layout_code.lview');
sys_function_assign_pkg.func_service_load('CON_ET001','modules/cont/CON_ET001/con_early_termination_et_detail.lview');
--分配bm
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON500.con_contract_get_layout_code');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON_ET001.create_change_req');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON_ET001.submit_change_req');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON_ET001.con_early_termination_query');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON731.cancel_change_req');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON_ET001.calc_et_date_amount');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON_ET001.calc_cashflow');
sys_function_assign_pkg.func_bm_load('CON_ET001','cont.CON_ET001.submit_change_req');
--分配菜单
sys_load_sys_function_grp_pkg.sys_function_group_item_load(p_function_group_code=>'CON_CHANGE_REQ',p_function_code=>'CON_ET001',p_enabled_flag=>'Y',P_USER_ID=>-1);
end;
/
commit;
set feedback on
set define on
spool off
exit
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CON_ET001.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/cont/CON_ET003/con_early_termination_modify_query.lview','提前结清查询',1,1,0);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CON_ET003','提前结清查询','提前结清查询','100','','','modules/cont/CON_ET003/con_early_termination_modify_query.lview','ZHS',-1);
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CON_ET003','提前结清查询','提前结清查询','100','','','modules/cont/CON_ET003/con_early_termination_modify_query.lview','US',-1);
--分配页面
sys_function_assign_pkg.func_service_load('CON_ET003','modules/cont/CON_ET003/con_early_termination_modify_query.lview');
sys_function_assign_pkg.func_service_load('CON_ET003','modules/cont/CON500/con_contract_authority_list_validate.lview');
sys_function_assign_pkg.func_service_load('CON_ET003','modules/cont/CON500/con_contract_get_layout_code.lview');
sys_function_assign_pkg.func_service_load('CON_ET003','modules/cont/CON_ET001/con_early_termination_et_detail.lview');
--分配bm
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON500.con_contract_get_layout_code');
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON_ET001.submit_change_req');
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON_ET003.con_early_termination_modify_query');
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON731.cancel_change_req');
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON_ET001.calc_et_date_amount');
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON_ET001.calc_cashflow');
sys_function_assign_pkg.func_bm_load('CON_ET003','basic.hls_division_for_lov');
sys_function_assign_pkg.func_bm_load('CON_ET003','cont.CON_ET001.submit_change_req');
--分配菜单
sys_load_sys_function_grp_pkg.sys_function_group_item_load(p_function_group_code=>'CON_CHANGE_REQ',p_function_code=>'CON_ET003',p_enabled_flag=>'Y',P_USER_ID=>-1);
end;
/
commit;
set feedback on
set define on
spool off
exit
alter table CON_CONTRACT_CHANGE_REQ add REPO_CHANGE_FLAG varchar2(1);
comment on column CON_CONTRACT_CHANGE_REQ.REPO_CHANGE_FLAG
is '是否回购';
\ No newline at end of file
is '是否回购';
alter table CON_CONTRACT_CHANGE_REQ add FUND_POSSESSION_TIME number;
comment on column CON_CONTRACT_CHANGE_REQ.FUND_POSSESSION_TIME
is '资金占用天数';
alter table CON_CONTRACT_CHANGE_REQ add FUND_POSSESSION_COST number;
comment on column CON_CONTRACT_CHANGE_REQ.FUND_POSSESSION_COST
is '资金占用费';
alter table CON_CONTRACT_CHANGE_REQ add FUND_POSSESSION_RATE number;
comment on column CON_CONTRACT_CHANGE_REQ.FUND_POSSESSION_RATE
is '资金占用费利率';
alter table CON_CONTRACT_CHANGE_REQ add ET_DUE_AMOUNT number;
comment on column CON_CONTRACT_CHANGE_REQ.ET_DUE_AMOUNT
is '提前结清租金';
alter table CON_CONTRACT_CHANGE_REQ add SUM_UNRECEIVED_PRINCIPAL number;
comment on column CON_CONTRACT_CHANGE_REQ.SUM_UNRECEIVED_PRINCIPAL
is '剩余本金';
alter table CON_CONTRACT_CHANGE_REQ add ET_INTEREST_RATE number;
comment on column CON_CONTRACT_CHANGE_REQ.ET_INTEREST_RATE
is '提前结清利率';
CREATE OR REPLACE VIEW CON_CONTRACT_REPO_MODIFY_LV AS
CREATE OR REPLACE VIEW CON_CONTRACT_REPO_MODIFY_LV AS
SELECT t1.contract_id,
t1.data_class,
t1.calc_session_id,
......@@ -54,6 +54,7 @@ SELECT t1.contract_id,
cr.repo_change_flag
FROM con_contract t1,
con_contract_change_req cr
WHERE t1.contract_id = cr.contract_id
WHERE t1.contract_id = cr.change_req_id
AND t1.data_class = 'CHANGE_REQ'
AND cr.repo_change_flag = 'Y'
;
CREATE OR REPLACE VIEW CON_CONTRACT_CHANGE_REQ_LV AS
select t.change_req_id,
t.batch_id,
t.change_quotation,
t.change_lease_item,
t.change_bp,
t.change_req_number,
t.document_type,
(select t1.description
from hls_document_type t1
where t1.document_type = t.document_type) as document_type_n,
t.document_category,
t.business_type,
t.company_id,
t.contract_id,
t.req_status,
(select t1.code_value_name
from sys_code_values_v t1
where t1.code = 'CON_CHANGE_REQ_STATUS'
and t1.code_value = t.req_status) as req_status_n,
t.req_date,
t.description,
t.wfl_instance_id,
t.calc_session_id,
t.owner_user_id,
t.submit_date,
t.approved_date,
t.created_by,
(SELECT su.user_name FROM sys_user su WHERE su.user_id=t.created_by)created_by_n,
t.creation_date,
t.last_updated_by,
t.last_update_date,
t.ccr_price_list,
t.ccr_calc_session_id,
t.simulation_flag,
decode(t.simulation_flag,'Y','Y','') as simulation_flag_n,
reschedule_flag,
decode(t.reschedule_flag,'Y','Y','') as reschedule_flag_n,
t.et_flag,
decode(t.et_flag,'Y','Y','') as et_flag_n,
t.tenant_change_flag,
decode(t.tenant_change_flag,'Y','Y','') as tenant_change_flag_n,
t.bank_acc_change_flag,
decode(t.bank_acc_change_flag,'Y','Y','') as bank_acc_change_flag_n,
t.lease_item_change_flag,
decode(t.lease_item_change_flag,'Y','Y','') as lease_item_change_flag_n,
t.mortgage_change_flag,
decode(t.mortgage_change_flag,'Y','Y','') as mortgage_change_flag_n,
t.guarantor_change_flag,
decode(t.guarantor_change_flag,'Y','Y','') as guarantor_change_flag_n,
t.contract_cancel_flag,
decode(t.contract_cancel_flag,'Y','Y','') as contract_cancel_flag_n,
t.cashflow_change_flag,
decode(t.cashflow_change_flag,'Y','Y','') as cashflow_change_flag_n,
cc.contract_number,
cc.contract_name,
cc.bp_id_tenant,
(select m.bp_name from hls_bp_master m where m.bp_id=cc.bp_id_tenant) as bp_id_tenant_n,
cc.inception_of_lease,
nvl(t.et_ins_derate_amount,0) et_ins_derate_amount,
(select sum(cf.principal) - sum(nvl(cf.received_principal, 0))
from con_contract_cashflow cf
where cf.contract_id = t.change_req_id
and cf.cf_item = 1
and cf.cf_direction = 'INFLOW') outstanding_principal,
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,--提前结清利率
cc.bp_id_agent_level1,
(SELECT m.bp_name
FROM hls_bp_master m
WHERE m.bp_id = cc.bp_id_agent_level1)
AS bp_id_agent_level1_n,
nvl(t.residual_value,cc.residual_value)residual_value,
t.ccr_reason
--提前结清 end
from con_contract_change_req t,
con_contract cc
where t.contract_id = cc.contract_id
;
......@@ -51,11 +51,30 @@
<bm:field name="exchange_rate_type_desc" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="EXCHANGE_RATE_TYPE_DESC" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="invoice_bp_tax_registry_num" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_method" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_way_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_frequency_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="object_taxpayer_type" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_bp_address_phone_num" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_bp_bank_account" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t.cashflow_id,
t.bp_name,--承租人姓名
con.billing_method,--开票规则
con.billing_way_n,--开票方式
con.billing_frequency_n,--开票频率
aic.billing_object_name,--开票对象
t.invoice_title,--发票抬头
aic.object_taxpayer_type,--纳税人类型
t.invoice_bp_address_phone_num,--开票地址电话
t.invoice_bp_bank_account,--开户行及账号
t.record_id,
t.billing_object,
(select c.code_value_name
......@@ -141,10 +160,12 @@
t.invoice_bp_tax_registry_num
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf
con_contract_cashflow_all_v cf,
acr_invoice_contract_v aic
where t.session_id = ${/session/@session_id}
and t.contract_id = con.contract_id
and t.cashflow_id = cf.cashflow_id
and con.contract_id = aic.contract_id
order by con.contract_id,cf.times,t.cf_item
]]>
</bm:query-sql>
......
......@@ -50,7 +50,7 @@
and cc.bp_id_agent_level1 = h.bp_id),
t2.tax_registry_num) OBJECT_TAX_REGISTRY_NUM,
nvl(t2.bill_object_bp_class,t1.BILL_OBJECT_BP_CLASS) BILL_OBJECT_BP_CLASS,
nvl(t2.bill_object_bp_class_DESC,t1.BILL_OBJECT_BP_CLASS_DESC) BILL_OBJECT_BP_CLASS_DESC,
nvl(t2.bill_object_bp_class_desc,t1.BILL_OBJECT_BP_CLASS_DESC) BILL_OBJECT_BP_CLASS_DESC,
t1.TAX_TYPE_VAT,
t1.DESCRIPTION,
--t1.INVOICE_TITLE,
......@@ -137,7 +137,7 @@
t1.inv_billing_object_name,
t1.small_scale_taxpayer
FROM ACR_INVOICE_CONTRACT_V t1, ACR_INVOICE_CONTRACT_CF_V t2
#WHERE_CLAUSE#
WHERE t2.due_date<sysdate
ORDER BY
t1.contract_id,
t2.times,
......@@ -341,7 +341,6 @@
<bm:query-field name="bill_flag"
queryExpression="(${@bill_flag} = 'Y' and t1.billing_frequency in (${@times_bill_flag},${@mid_bill_flag},${@final_bill_flag},${@et_bill_flag}) )"/>
<bm:query-field name="all_contract_number"
queryExpression="(t1.contract_number in (Select regexp_substr( replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) From dual Connect By regexp_substr(replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) Is Not Null) )"/>
<bm:query-field name="notreceived_amount_from"
......@@ -359,6 +358,7 @@
queryExpression="t1.bill_object_bp_class = ${@bill_object_bp_class}"/>
<bm:query-field name="contract_status"
queryExpression="t1.contract_status = ${@contract_status}"/>
<!-- <bm:query-field name="" queryExpression="t2.due_date &lt;= sysdate"/>-->
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query"
......@@ -366,10 +366,10 @@
<bm:data-filter enforceOperations="query" expression="t2.write_off_flag != &apos;NOT&apos;"/>
<bm:data-filter enforceOperations="query"
expression="t2.billing_status != &apos;FULL&apos; and t2.cf_direction=&apos;INFLOW&apos;"/>
<!-- <bm:data-filter enforceOperations="query"
<bm:data-filter enforceOperations="query"
expression="t2.contract_id = t1.contract_id AND t1.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;NEW&apos;,&apos;CANCEL&apos;) AND t2.cf_status = &apos;RELEASE&apos;"/>
<bm:data-filter enforceOperations="query" expression="(t2.times != 0)"/>-->
<bm:data-filter enforceOperations="query" expression="(t2.times != 0)"/>
<bm:data-filter enforceOperations="query"
expression="not (t2.cf_item = 301 and nvl(direct_sales_agent_flag,'N') = 'Y')"/>
......
<?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:update-sql><![CDATA[
BEGIN
cus_con_et_pkg.calc_et_cashflows(p_contract_id=>${@contract_id}, 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="et_fee" dataType="java.lang.Double" input="true" output="true" outputPath="@et_fee"/>
<bm:parameter name="et_total_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@et_total_amount"/>
<bm:parameter name="et_due_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@et_due_amount"/>
<bm:parameter name="overdue_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@overdue_amount"/>
<bm:parameter name="penalty" dataType="java.lang.Double" input="false" output="true" outputPath="@penalty"/>
<bm:parameter name="fund_possession_time" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_time"/>
<bm:parameter name="fund_possession_cost" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_cost"/>
<bm:parameter name="sum_unreceived_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_unreceived_principal"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
cus_con_et_pkg.calc_et_date_amount(p_contract_id => ${@contract_id},
p_et_date => TO_DATE(${@termination_date},'yyyy-mm-dd'),
p_ET_FEE => ${@et_fee},
p_et_interest_rate => ${@et_interest_rate},
p_et_total_amount => ${@et_total_amount},
p_et_due_amount => ${@et_due_amount},
p_overdue_amount => ${@overdue_amount},
p_penalty => ${@penalty},
p_fund_possession_time => ${@fund_possession_time},
p_fund_possession_cost => ${@fund_possession_cost},
p_sum_unreceived_principal => ${@sum_unreceived_principal},
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" xmlns:s="leaf.plugin.script">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from
(SELECT
t.contract_id,
t.company_id,
t.business_type,
t.contract_number,
t.contract_name,
t.document_type,
dt.document_type_desc,
t.document_category,
dt.document_category_desc,
t.bp_id_tenant,
t.lease_execution_date,
(SELECT
scv.code_value_name
FROM
sys_code_values_v scv,
con_contract_lease_item ci,
hls_product_plan_definition hd
WHERE
scv.code = 'DISCOUNT_METHOD' AND
scv.code_value_enabled_flag = 'Y' AND
scv.code_value = hd.discount_method AND
hd.product_plan_id = ci.product_plan_id AND
ci.contract_id = t.contract_id
) discount_method_n,
b.bp_name,
b.bp_code,
--t.license_number,
TO_CHAR(t.lease_end_date, 'yyyy-mm-dd') lease_end_date,
(SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = t.unit_id
) AS unit_id_n,
t.unit_id,
TO_CHAR(t.inception_of_lease, 'yyyy-mm-dd') inception_of_lease,
t.contract_status,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS status_desc,
(SELECT
DECODE(COUNT(*), 0, 'N', 'Y')
FROM
con_contract_cashflow f
WHERE
f.contract_id = t.contract_id AND
f.overdue_status = 'Y'
) overdue_status,
'ET' et_type,
'提前结清' et_type_dis,
t.early_termination_profile,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS contract_status_n,
t.spv_company_id,
(SELECT
a.company_code
FROM
fnd_companies a
WHERE
a.company_id = t.spv_company_id
) spv_company_code,
(SELECT
COUNT(*)
FROM
con_contract_cashflow h
WHERE
h.contract_id = t.contract_id AND
h.write_off_flag = 'FULL' AND
h.cf_item = 1 AND
h.times != 0 AND
h.cf_direction = 'INFLOW'
) received_times,
(SELECT su.description FROM sys_user su WHERE su.user_id = t.owner_user_id
) owner,
t.lease_times,
TRIM((TO_CHAR(ROUND(t.int_rate_display, 4) * 100, '90.00')
|| '%')) int_rate_display,
t.invoice_price,
t.finance_amount,
t.down_payment,
TRIM((TO_CHAR(ROUND(t.down_payment_ratio, 4) * 100, '90.00')
|| '%')) down_payment_ratio,
t.deposit,
TRIM((TO_CHAR(ROUND(t.deposit_ratio, 4) * 100, '90.00')
|| '%')) deposit_ratio,
t.lease_charge,
TRIM((TO_CHAR(ROUND(t.lease_charge_ratio, 4) * 100, '90.00')
|| '%')) lease_charge_ratio,
(SELECT
TO_CHAR(cc.due_date, 'yyyy-mm-dd')
FROM
con_contract_cashflow cc
WHERE
cc.contract_id = t.contract_id AND
cc.times = 1 AND
cc.cf_item = 1
) start_due_date,
t.bp_id_agent_level1,
(SELECT
hls.bp_name
FROM
hls_bp_master hls
WHERE
hls.bp_id = t.bp_id_agent_level1
) bp_agent,
t.owner_user_id,
(SELECT
hbt.description
FROM
hls_business_type hbt
WHERE
hbt.enabled_flag = 'Y' AND
hbt.business_type = t.business_type
) business_type_n,
(SELECT
hlc.description
FROM
hls_lease_channel hlc
WHERE
hlc.lease_channel = t.lease_channel AND
hlc.enabled_flag = 'Y'
) lease_channel_n,
t.division,
(SELECT
t2.description
FROM
hls_division t2
WHERE
t2.enabled_flag = 'Y' AND
t2.division = t.division
) division_n
FROM
con_contract t,
hls_bp_master b,
hls_document_type_v dt
WHERE
t.bp_id_tenant = b.bp_id(+) AND
t.contract_status = 'INCEPT' AND
t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t1.contract_id = ${@contract_id}"/>
<bm:query-field name="unit_id" queryExpression="t1.unit_id = ${@unit_id}"/>
<bm:query-field name="date_from" datatype="java.lang.String" queryexpression="t1.inception_of_lease &gt;= ${@date_from}"/>
<bm:query-field name="date_to" datatype="java.lang.String" queryexpression="t1.inception_of_lease &lt;= ${@date_to}"/>
<bm:query-field name="lease_end_date_from" datatype="java.lang.String" queryexpression="t1.lease_end_date &gt;= ${@lease_end_date_from}"/>
<bm:query-field name="lease_end_date_to" datatype="java.lang.String" queryexpression="t1.lease_end_date &lt;= ${@lease_end_date_to}"/>
<bm:query-field name="contract_number" datatype="java.lang.String" queryexpression="upper(t1.contract_number) like &apos;%&apos; || upper(${@contract_number}) || &apos;%&apos;"/>
<!-- <bm:query-field name="license_number" datatype="java.lang.String" queryexpression="upper(t1.license_number) like &apos;%&apos; || upper(${@license_number}) || &apos;%&apos;"/> -->
<bm:query-field name="contract_name" datatype="java.lang.String" queryexpression="t1.contract_name like &apos;%&apos; || ${@contract_name} || &apos;%&apos;"/>
<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/>
<bm:query-field name="bp_id_agent_level1" queryExpression="t1.bp_id_agent_level1 = ${@bp_id_agent_level1}"/>
<bm:query-field name="bp_code" datatype="java.lang.String" queryexpression="t1.bp_code=${@bp_code}"/>
<bm:query-field name="document_category" datatype="java.lang.String" queryexpression="t1.document_category=${@document_category}"/>
<bm:query-field name="document_type" datatype="java.lang.String" queryexpression="t1.document_type=${@document_type}"/>
<bm:query-field name="overdue_status" datatype="java.lang.String" queryexpression="t1.overdue_status=${@overdue_status}"/>
<bm:query-field name="received_times" queryExpression="t1.received_times = ${@received_times}"/>
<bm:query-field name="division" queryExpression="t1.division = ${@division}"/>
<bm:query-field name="contract_status" queryExpression="t1.contract_status = ${@contract_status}"/>
<bm:query-field name="lease_execution_date_from" queryexpression="to_char(t1.lease_execution_date,'YYYY-MM-DD') &gt;= ${@lease_execution_date_from}"/>
<bm:query-field name="lease_execution_date_to" queryexpression="to_char(t1.lease_execution_date,'YYYY-MM-DD') &lt;= ${@lease_execution_date_to}"/>
</bm:query-fields>
<!-- <bm:features>-->
<!-- EXISTS-->
<!-- (SELECT-->
<!-- 1-->
<!-- FROM-->
<!-- sys_user u-->
<!-- WHERE-->
<!-- u.bp_category = 'AGENT' AND-->
<!-- u.user_id =${/session/@user_id}-->
<!-- ) AND-->
<!-- AND t.owner_user_id = ${/session/@user_id}-->
<!-- <s:bm-script><![CDATA[-->
<!-- var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!-- Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!-- ]]></s:bm-script>-->
<!-- </bm:features>-->
</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" outputPath="@change_req_id"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
cus_con_et_pkg.create_change_req_et(p_contract_id=>${@contract_id},
p_req_type=>${@req_type},
p_user_id=>${/session/@user_id},
p_simulation_flag=>${@simulation_flag},
p_change_req_id=>${@change_req_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="true" output="false"/>
<bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
cus_con_et_pkg.submit_change_req_et(p_change_req_id=>${@change_req_id},
p_layout_code=>${@layout_code},
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" xmlns:s="leaf.plugin.script">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from
(SELECT
t.contract_id,
t.company_id,
t.business_type,
t.contract_number,
t.contract_name,
t.document_type,
dt.document_type_desc,
t.document_category,
dt.document_category_desc,
t.bp_id_tenant,
t.lease_execution_date,
(SELECT
scv.code_value_name
FROM
sys_code_values_v scv,
con_contract_lease_item ci,
hls_product_plan_definition hd
WHERE
scv.code = 'DISCOUNT_METHOD' AND
scv.code_value_enabled_flag = 'Y' AND
scv.code_value = hd.discount_method AND
hd.product_plan_id = ci.product_plan_id AND
ci.contract_id = t.contract_id
) discount_method_n,
b.bp_name,
b.bp_code,
--t.license_number,
TO_CHAR(t.lease_end_date, 'yyyy-mm-dd') lease_end_date,
(SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = t.unit_id
) AS unit_id_n,
t.unit_id,
TO_CHAR(t.inception_of_lease, 'yyyy-mm-dd') inception_of_lease,
t.contract_status,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS status_desc,
(SELECT
DECODE(COUNT(*), 0, 'N', 'Y')
FROM
con_contract_cashflow f
WHERE
f.contract_id = t.contract_id AND
f.overdue_status = 'Y'
) overdue_status,
'ET' et_type,
'提前结清' et_type_dis,
t.early_termination_profile,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS contract_status_n,
t.spv_company_id,
(SELECT
a.company_code
FROM
fnd_companies a
WHERE
a.company_id = t.spv_company_id
) spv_company_code,
(SELECT
COUNT(*)
FROM
con_contract_cashflow h
WHERE
h.contract_id = t.contract_id AND
h.write_off_flag = 'FULL' AND
h.cf_item = 1 AND
h.times != 0 AND
h.cf_direction = 'INFLOW'
) received_times,
(SELECT su.description FROM sys_user su WHERE su.user_id = t.owner_user_id
) owner,
t.lease_times,
TRIM((TO_CHAR(ROUND(t.int_rate_display, 4) * 100, '90.00')
|| '%')) int_rate_display,
t.invoice_price,
t.finance_amount,
t.down_payment,
TRIM((TO_CHAR(ROUND(t.down_payment_ratio, 4) * 100, '90.00')
|| '%')) down_payment_ratio,
t.deposit,
TRIM((TO_CHAR(ROUND(t.deposit_ratio, 4) * 100, '90.00')
|| '%')) deposit_ratio,
t.lease_charge,
TRIM((TO_CHAR(ROUND(t.lease_charge_ratio, 4) * 100, '90.00')
|| '%')) lease_charge_ratio,
(SELECT
TO_CHAR(cc.due_date, 'yyyy-mm-dd')
FROM
con_contract_cashflow cc
WHERE
cc.contract_id = t.contract_id AND
cc.times = 1 AND
cc.cf_item = 1
) start_due_date,
t.bp_id_agent_level1,
(SELECT
hls.bp_name
FROM
hls_bp_master hls
WHERE
hls.bp_id = t.bp_id_agent_level1
) bp_agent,
t.owner_user_id,
(SELECT
hbt.description
FROM
hls_business_type hbt
WHERE
hbt.enabled_flag = 'Y' AND
hbt.business_type = t.business_type
) business_type_n,
(SELECT
hlc.description
FROM
hls_lease_channel hlc
WHERE
hlc.lease_channel = t.lease_channel AND
hlc.enabled_flag = 'Y'
) lease_channel_n,
t.division,
(SELECT
t2.description
FROM
hls_division t2
WHERE
t2.enabled_flag = 'Y' AND
t2.division = t.division
) division_n,
r.change_req_number,
r.change_req_id,
r.req_status,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON_CHANGE_REQ_STATUS' AND
v.code_value = r.req_status
)req_status_n,
r.created_by,
(SELECT su.description FROM sys_user su WHERE su.user_id=r.created_by)req_employee_n
FROM
con_contract t,
hls_bp_master b,
hls_document_type_v dt,con_contract_change_req r
WHERE
r.req_status = 'NEW' AND
r.change_req_id = t.contract_id AND
r.et_flag='Y' AND
t.bp_id_tenant = b.bp_id(+) AND
dt.document_type(+) = t.document_type
order by r.change_req_number
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t1.contract_id = ${@contract_id}"/>
<bm:query-field name="unit_id" queryExpression="t1.unit_id = ${@unit_id}"/>
<bm:query-field name="date_from" datatype="java.lang.String" queryexpression="t1.inception_of_lease &gt;= ${@date_from}"/>
<bm:query-field name="date_to" datatype="java.lang.String" queryexpression="t1.inception_of_lease &lt;= ${@date_to}"/>
<bm:query-field name="lease_end_date_from" datatype="java.lang.String" queryexpression="t1.lease_end_date &gt;= ${@lease_end_date_from}"/>
<bm:query-field name="lease_end_date_to" datatype="java.lang.String" queryexpression="t1.lease_end_date &lt;= ${@lease_end_date_to}"/>
<bm:query-field name="contract_number" datatype="java.lang.String" queryexpression="upper(t1.contract_number) like &apos;%&apos; || upper(${@contract_number}) || &apos;%&apos;"/>
<!-- <bm:query-field name="license_number" datatype="java.lang.String" queryexpression="upper(t1.license_number) like &apos;%&apos; || upper(${@license_number}) || &apos;%&apos;"/> -->
<bm:query-field name="contract_name" datatype="java.lang.String" queryexpression="t1.contract_name like &apos;%&apos; || ${@contract_name} || &apos;%&apos;"/>
<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/>
<bm:query-field name="bp_id_agent_level1" queryExpression="t1.bp_id_agent_level1 = ${@bp_id_agent_level1}"/>
<bm:query-field name="bp_code" datatype="java.lang.String" queryexpression="t1.bp_code=${@bp_code}"/>
<bm:query-field name="document_category" datatype="java.lang.String" queryexpression="t1.document_category=${@document_category}"/>
<bm:query-field name="document_type" datatype="java.lang.String" queryexpression="t1.document_type=${@document_type}"/>
<bm:query-field name="overdue_status" datatype="java.lang.String" queryexpression="t1.overdue_status=${@overdue_status}"/>
<bm:query-field name="received_times" queryExpression="t1.received_times = ${@received_times}"/>
<bm:query-field name="division" queryExpression="t1.division = ${@division}"/>
<bm:query-field name="contract_status" queryExpression="t1.contract_status = ${@contract_status}"/>
<bm:query-field name="lease_execution_date_from" queryexpression="to_char(t1.lease_execution_date,'YYYY-MM-DD') &gt;= ${@lease_execution_date_from}"/>
<bm:query-field name="lease_execution_date_to" queryexpression="to_char(t1.lease_execution_date,'YYYY-MM-DD') &lt;= ${@lease_execution_date_to}"/>
<bm:query-field name="req_employee_n" datatype="java.lang.String" queryexpression="t1.req_employee_n like &apos;%&apos; || ${@req_employee_n} || &apos;%&apos;"/>
<bm:query-field name="req_status" queryExpression="t1.req_status = ${@req_status}"/>
</bm:query-fields>
<!-- <bm:features>-->
<!-- EXISTS-->
<!-- (SELECT-->
<!-- 1-->
<!-- FROM-->
<!-- sys_user u-->
<!-- WHERE-->
<!-- u.bp_category = 'AGENT' AND-->
<!-- u.user_id =${/session/@user_id}-->
<!-- ) AND-->
<!-- AND t.owner_user_id = ${/session/@user_id}-->
<!-- <s:bm-script><![CDATA[-->
<!-- var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!-- Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!-- ]]></s:bm-script>-->
<!-- </bm:features>-->
</bm:model>
......@@ -69,36 +69,36 @@
}
function onLoad_cashflowDs(ds) {
var hd_ds = $('contractDs'),
r = hd_ds.getCurrentRecord();
if (hd_ds.getSelected().indexOf(r) != -1) {
ds.selectAll.defer(5, ds);
}
}
// function onLoad_cashflowDs(ds) {
// var hd_ds = $('contractDs'),
// r = hd_ds.getCurrentRecord();
// if (hd_ds.getSelected().indexOf(r) != -1) {
// ds.selectAll.defer(5, ds);
// }
// }
var isSelectFromLine = false;
function onSelect_contractDs(ds, record) {
ds.locate(ds.indexOf(record) + 1);
if (!isSelectFromLine) {
$('cashflowDs').selectAll();
}
}
function unselect_contractDs(ds, record) {
ds.locate(ds.indexOf(record) + 1);
$('cashflowDs').unSelectAll();
}
function onSelect_invoiceLineDs(ds, record) {
record.dirty = true;
isSelectFromLine = true;
$('contractDs').select($('contractDs').getCurrentRecord());
isSelectFromLine = false;
}
function unSelect_invoiceLineDs(ds, record) {
record.dirty = false;
}
// function onSelect_contractDs(ds, record) {
// ds.locate(ds.indexOf(record) + 1);
// if (!isSelectFromLine) {
// $('cashflowDs').selectAll();
// }
//
// }
// function unselect_contractDs(ds, record) {
// ds.locate(ds.indexOf(record) + 1);
// $('cashflowDs').unSelectAll();
// }
// function onSelect_invoiceLineDs(ds, record) {
// record.dirty = true;
// isSelectFromLine = true;
// $('contractDs').select($('contractDs').getCurrentRecord());
// isSelectFromLine = false;
// }
// function unSelect_invoiceLineDs(ds, record) {
// record.dirty = false;
// }
function render_contractDs_grid(value, record, name) {
if (name == 'billing_object_name') {
......@@ -109,7 +109,7 @@
]]></script>
<a:dataSets>
<a:dataSet id="contractDs" autoQuery="true" fetchAll="true" model="acr.ACR510.acr_invoice_contract_v"
<a:dataSet id="contractDs" autoQuery="false" fetchAll="false" model="acr.ACR510.acr_invoice_contract_v"
queryDataSet="conditionDs"
queryUrl="${/request/@context_path}/autocrud/acr.ACR510.acr_invoice_contract_v/query?company_id=${/parameter/@company_id}"
selectable="true">
......@@ -129,21 +129,21 @@
</a:mapping>
</a:field>
</a:fields>
<a:events>
<a:event name="select" handler="onSelect_contractDs"/>
<a:event name="unselect" handler="unselect_contractDs"/>
</a:events>
<!-- <a:events>-->
<!-- <a:event name="select" handler="onSelect_contractDs"/>-->
<!-- <a:event name="unselect" handler="unselect_contractDs"/>-->
<!-- </a:events>-->
</a:dataSet>
<a:dataSet id="cashflowDs" bindName="line_info" bindTarget="contractDs" fetchAll="true"
model="acr.ACR510.acr_invoice_contract_cf_v" selectable="true">
<a:fields>
<a:field name="last_received_date" datatype="date"/>
</a:fields>
<a:events>
<a:event name="load" handler="onLoad_cashflowDs"/>
<a:event name="select" handler="onSelect_invoiceLineDs"/>
<a:event name="unselect" handler="unSelect_invoiceLineDs"/>
</a:events>
<!-- <a:events>-->
<!-- <a:event name="load" handler="onLoad_cashflowDs"/>-->
<!-- <a:event name="select" handler="onSelect_invoiceLineDs"/>-->
<!-- <a:event name="unselect" handler="unSelect_invoiceLineDs"/>-->
<!-- </a:events>-->
</a:dataSet>
</a:dataSets>
<a:screenBody>
......
......@@ -60,9 +60,9 @@
$('acr_invoice_select_cashflow').close();
}
function contractDs_grid_clear() {
$('contractDs_grid').clear();
}
// function contractDs_grid_clear() {
// $('contractDs_grid').clear();
// }
function allConditionDs_reset() {
$('allConditionDs').reset();
......@@ -304,11 +304,13 @@
<a:field name="notbilling_amount_from" defaultValue="0.01"/>
<a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
</a:fields>
<a:events>
<a:event name="update" handler="acr510n_query_update"/>
</a:events>
<!-- <a:events>-->
<!-- <a:event name="update" handler="acr510n_query_update"/>-->
<!-- <a:event name="select" handler="onSelect_contractDs"/>-->
<!-- <a:event name="unselect" handler="unselect_contractDs"/>-->
<!-- </a:events>-->
</a:dataSet>
<a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" autoQuery="true" fetchAll="false"
<a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" autoQuery="false"
model="acr.ACR510N.acr_inovice_cf_v_n" queryDataSet="allConditionDs" selectable="true">
<a:fields>
<a:field name="invoice_title" required="true" prompt="发票抬头"/>
......@@ -332,14 +334,19 @@
</a:field>
<a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
</a:fields>
<!-- <a:events>-->
<!-- <a:event name="load" handler="onLoad_cashflowDs"/>-->
<!-- <a:event name="select" handler="onSelect_invoiceLineDs"/>-->
<!-- <a:event name="unselect" handler="unSelect_invoiceLineDs"/>-->
<!-- </a:events>-->
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="contractDs_grid_query" text="HLS.QUERY"/>
<a:gridButton click="allConditionDs_reset" text="重置条件"/>
<a:gridButton click="contractDs_grid_clear" text="ACR510.BUTTON.CLEAR_CONTRACT"/>
<a:gridButton click="allConditionDs_reset" text="重置"/>
<!-- <a:gridButton click="contractDs_grid_clear" text="ACR510.BUTTON.CLEAR_CONTRACT"/>-->
<a:gridButton click="invoiceHd_confirm" text="ACR510.BUTTON.COMFIRM"/>
<!--<a:gridButton click="acr510n_excel" text="导出"/>-->
</a:screenTopToolbar>
......@@ -354,6 +361,7 @@
<a:checkBox name="mid_bill_flag" bindTarget="allConditionDs" prompt="年中开票"/>
<a:checkBox name="final_bill_flag" bindTarget="allConditionDs" prompt="年末开票"/>
<a:checkBox name="et_bill_flag" bindTarget="allConditionDs" prompt="结清开票"/>
</a:formToolBar>
<a:formBody>
<a:hBox>
......@@ -374,7 +382,6 @@
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
<a:comboBox name="billing_way_n" bindTarget="allConditionDs" prompt="开票方式"/>
</a:hBox>
<a:hBox>
<a:numberField name="notreceived_amount_from" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs" prompt="未收金额从"/>
......@@ -384,7 +391,6 @@
<a:numberField name="notbilling_amount_to" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs"
prompt="未开金额到"/>
</a:hBox>
<a:hBox>
<a:textField name="inv_billing_object_name" bindTarget="allConditionDs" prompt="代理商"/>
......@@ -405,115 +411,85 @@
</a:queryForm>
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="30">
<a:tabs>
<a:tab prompt="明细信息" width="120">
<a:grid id="acr510n_cashflowds_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210"
marginWidth="70" navBar="true">
<a:tab prompt="开票信息" width="120">
<a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210" marginWidth="70" navBar="true">
<a:toolBar>
<a:button type="excel"/>
</a:toolBar>
<a:columns>
<!-- <a:column name="con_search_term_1" lock="true" prompt="合同号" width="150"/>-->
<a:column name="contract_number" lock="true" width="150" prompt="合同编号"/>
<!-- <a:column name="lease_channel_desc" prompt="商业模式"/>-->
<a:column name="inv_billing_object_name" prompt="代理"/>
<a:column name="contract_name" lock="true" width="150" prompt="合同名称"/>
<a:column name="inv_billing_object_name" prompt="代理"/>
<a:column name="business_type_desc" prompt="业务类型"/>
<a:column name="lease_channel_desc" prompt="商业模式"/>
<a:column name="division_desc" prompt="产品线"/>
<a:column name="times" align="center" width="40"/>
<a:column name="cf_item_desc"/>
<a:column name="due_date" renderer="Leaf.formatDate"/>
<a:column name="last_received_date" renderer="Leaf.formatDate"/>
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="principal" align="right" renderer="Leaf.formatMoney"/>
<a:column name="interest" align="right" renderer="Leaf.formatMoney"/>
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="received_principal" align="right" renderer="Leaf.formatMoney"/>
<a:column name="received_interest" align="right" renderer="Leaf.formatMoney"/>
<a:column name="notreceived_amount" align="right" prompt="未收金额"
<a:column name="times" align="right" lock="true" width="40" prompt="期数"/>
<a:column name="cf_item_desc" prompt="应收项目"/>
<a:column name="due_date" renderer="Leaf.formatDate" prompt="到期日"/>
<a:column name="last_received_date" renderer="Leaf.formatDate" prompt="收款日期"/>
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney" prompt="应收金额"/>
<a:column name="principal" align="right" renderer="Leaf.formatMoney" prompt="本金"/>
<a:column name="interest" align="right" renderer="Leaf.formatMoney" prompt="利息"/>
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney" prompt="已收金额"/>
<a:column name="received_principal" align="right" renderer="Leaf.formatMoney" prompt="已收本金"/>
<a:column name="received_interest" align="right" renderer="Leaf.formatMoney" prompt="已收利息"/>
<a:column name="notreceived_amount" align="right" renderer="Leaf.formatMoney" prompt="未收金额"/>
<a:column name="notreceived_principal" align="right" renderer="Leaf.formatMoney" prompt="未收本金"/>
<a:column name="notreceived_interest" align="right" renderer="Leaf.formatMoney" prompt="未收利息"/>
<a:column name="billing_amount" align="right" prompt="已开票金额"
renderer="Leaf.formatMoney"/>
<a:column name="notreceived_principal" align="right" prompt="未收本金"
<a:column name="billing_principal" align="right" prompt="已开票本金"
renderer="Leaf.formatMoney"/>
<a:column name="notreceived_interest" align="right" prompt="未收利息"
<a:column name="billing_interest" align="right" prompt="已开票利息"
renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="billing_principal" align="right" renderer="Leaf.formatMoney"/>
<a:column name="billing_interest" align="right" renderer="Leaf.formatMoney"/>
<a:column name="notbilling_amount" align="right" prompt="未开金额"
<a:column name="notbilling_amount" align="right" prompt="未开票金额"
renderer="Leaf.formatMoney"/>
<a:column name="notbilling_principal" align="right" prompt="未开本金"
<a:column name="notbilling_principal" align="right" prompt="未开本金"
renderer="Leaf.formatMoney"/>
<a:column name="notbilling_interest" align="right" prompt="未开利息"
<a:column name="notbilling_interest" align="right" prompt="未开利息"
renderer="Leaf.formatMoney"/>
<a:column name="currency_desc" width="60"/>
<a:column name="exchange_rate" align="right" width="80"/>
<a:column name="exchange_rate_type_desc" width="100"/>
<a:column name="interest" align="right" renderer="Leaf.formatMoney" prompt="利息"/>
</a:columns>
<a:editors>
<a:lov id="contractDs_grid_editor_lov"/>
<a:textField id="contractDs_grid_editor_tf"/>
</a:editors>
</a:grid>
</a:tab>
<a:tab prompt="开票信息" width="120">
<a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210"
marginWidth="70"
navBar="true">
<a:tab prompt="抬头信息" width="120">
<a:grid id="titleDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210" marginWidth="70" navBar="true">
<a:toolBar>
<a:button type="excel"/>
</a:toolBar>
<a:columns>
<!-- <a:column name="con_search_term_1" lock="true" prompt="合同号" width="150"/>-->
<!-- <a:column name="project_name" autoAdjust="false" lock="true" showTitle="true" width="200"/> -->
<a:column name="contract_number" lock="true" width="150" prompt="合同编号"/>
<a:column name="times" align="right" lock="true" width="40"/>
<!-- <a:column name="serial_number" prompt="机编号" width="80"/>-->
<a:column name="contract_status_desc" width="80"/>
<a:column name="billing_method_desc" width="100"/>
<a:column name="contract_name" lock="true" width="150" prompt="合同名称"/>
<a:column name="bp_name" prompt="承租人名称"/>
<a:column name="contract_status_desc" width="80" prompt="合同状态"/>
<a:column name="billing_method" prompt="开票规则"/>
<a:column name="billing_way_n" prompt="开票方式" width="80"/>
<a:column name="billing_frequency_n" prompt="开票频率" width="80"/>
<a:column name="billing_object_name" prompt="开票对象" autoAdjust="false"
editor="contractDs_grid_editor_lov" renderer="render_contractDs_grid"
editor="titleDs_grid_editor_lov" renderer="render_contractDs_grid"
showTitle="true" width="200"/>
<a:column name="invoice_title" prompt="发票抬头" autoAdjust="false" editor="contractDs_grid_editor_tf"
<a:column name="invoice_title" prompt="发票抬头" autoAdjust="false" editor="titleDs_grid_editor_tf"
showTitle="true" width="200"/>
<a:column name="object_taxpayer_type" prompt="纳税人类型"/>
<a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150"
editor="contractDs_grid_editor_tf"/>
editor="titleDs_grid_editor_tf"/>
<a:column name="invoice_bp_address_phone_num" prompt="开票地址电话" autoAdjust="false"
editor="contractDs_grid_editor_tf" showTitle="true" width="200"/>
editor="titleDs_grid_editor_tf" showTitle="true" width="200"/>
<a:column name="invoice_bp_bank_account" prompt="开户行及账号" autoAdjust="false"
editor="contractDs_grid_editor_tf" showTitle="true" width="150"/>
<a:column name="description" autoAdjust="false" editor="contractDs_grid_editor_tf"
editor="titleDs_grid_editor_tf" showTitle="true" width="150"/>
<a:column name="description" prompt="备注" autoAdjust="false" editor="titleDs_grid_editor_tf"
showTitle="true" width="200"/>
<a:column name="object_taxpayer_type_desc"/>
<a:column name="contract_name" autoAdjust="false" showTitle="true" width="200"/>
<!-- <a:column name="inception_of_lease" renderer="Leaf.formatDate" width="80"/> -->
</a:columns>
<a:editors>
<a:lov id="contractDs_grid_editor_lov"/>
<a:textField id="contractDs_grid_editor_tf"/>
<a:lov id="titleDs_grid_editor_lov"/>
<a:textField id="titleDs_grid_editor_tf"/>
</a:editors>
</a:grid>
</a:tab>
<!--<a:tab prompt="导出" width="100">-->
<!--<a:grid id="contractDs_grid_forexport" bindTarget="ar510n_cashflow_ds" marginHeight="170"-->
<!--marginWidth="70" navBar="true">-->
<!--<a:toolBar>-->
<!--<a:button type="excel"/>-->
<!--</a:toolBar>-->
<!--<a:columns>-->
<!--<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>-->
<!--&lt;!&ndash; <a:column name="project_name" autoAdjust="false" lock="true" showTitle="true" width="200"/> &ndash;&gt;-->
<!--<a:column name="times" align="right" lock="true" width="40"/>-->
<!--&lt;!&ndash; <a:column name="serial_number" prompt="机编号" width="80"/>&ndash;&gt;-->
<!--<a:column name="cf_item_desc"/>-->
<!--<a:column name="due_amount"/>-->
<!--<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>-->
<!--<a:column name="billing_amount" align="right" renderer="Leaf.formatMoney"/>-->
<!--<a:column name="need_bill_amount" align="right" prompt="应开票金额"-->
<!--renderer="Leaf.formatMoney"/>-->
<!--<a:column name="billing_object_name" autoAdjust="false" showTitle="true"-->
<!--width="200"/>-->
<!--<a:column name="invoice_title" autoAdjust="false" showTitle="true" width="200"/>-->
<!--<a:column name="object_tax_registry_num" width="150"/>-->
<!--</a:columns>-->
<!--</a:grid>-->
<!--</a:tab>-->
</a:tabs>
</a:tabPanel>
</a:screenBody>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
2019-9-6 Spencer 3893 合同提前结清申请创建明细
-->
<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_et002_submit_link" model="" 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_et_date_amount_link" model="cont.CON_ET001.calc_et_date_amount" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
var ds_us_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_03', 'hls_document_use_seal');
if ($(ds_us_id)) {
$(ds_us_id).setQueryParameter('document_table','CON_CONTRACT');
$(ds_us_id).setQueryParameter('document_id','${/parameter/@contract_id}');
$(ds_us_id).query();
}
});
//新增和加载时调用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_update'] = function(ds, record, name, value, old_value, bp_seq) {
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 (name == 'termination_date') {
// 根据结清日计算结清相关金额字段
Leaf.request({
url: $('con_et001_calc_et_date_amount_link').getUrl(),
para: {
contract_id: record.get('contract_id'),
termination_date: value,
et_fee:record.get('et_fee'),
et_interest_rate:record.get('et_interest_rate')
},
success: function (res) {
record.set('et_fee', res.result.et_fee);
record.set('et_total_amount', res.result.et_total_amount);
record.set('et_due_amount', res.result.et_due_amount);
record.set('overdue_amount', res.result.overdue_amount);
record.set('penalty', res.result.penalty);
record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_cost', res.result.fund_possession_cost);
record.set('sum_unreceived_principal', res.result.sum_unreceived_principal);
},
failure: function () {
},
error: function () {
},
scope: this
});
}
}
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
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 case_type = '';
var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if ($(req_ds_id).validate()) {
if (req_record.dirty) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000);
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
};
function con_repo001_submit() {
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);
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_et002_submit_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id},
layout_code: '${/parameter/@layout_code}'
},
success: function(res) {
$('${/parameter/@winid}').close();
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
});
}
//保存submitsuccess调用
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');
if (ca_ds_id_s) {
$(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');
if (ca_ds_id_c) {
$(ca_ds_id_c).query();
}
};
//报价计算
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用
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_record = $(con_contract_ds_id).getAt(0);
if ($(con_contract_ds_id).validate()) {
// if (con_record.dirty) {
// Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// return;
// }
setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](clac), 2000);
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
}
};
function clac(){
Leaf.request({
url: $('con_et001_calc_cashflow_link').getUrl(),
para: {
contract_id: '${/parameter/@contract_id}',
},
success: function(res) {
Leaf.SideBar.enable = true;
Leaf.SideBar.show({msg: '计算成功!',duration: 2000});
//con_record.getField('ccr_start_times').setReadOnly(true);
var ca_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_04', 'con_contract_cashflow');
if (ca_ds_id) {
$(ca_ds_id).query();
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
scope: this
});
}
//生成文本
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
//$('${/parameter/@layout_code}_user_button2').disable(); //按钮不可用
//$('${/parameter/@layout_code}_user_button2').enable(); //按钮启用
};
//取消变更
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_et002_cancel_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id}
},
success: function(res) {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Spencer 3893
$Date: 2019-9-19
$Revision: 1.0
$Purpose: 提前结清创建入口
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="basic.hls_division_for_lov" rootPath="hls_division_path"/>
</a:init-procedure>
<a:view>
<a:link id="con_et_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_et_change_link" url="${/request/@context_path}/modules/cont/CON_ET001/con_early_termination_et_detail.lview"/>
<a:link id="con_et_create_change_link" model="cont.CON_ET001.create_change_req" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
function contractQueryScreen_query() {
$('contractQueryScreen_mainDs').query();
}
function contractQueryScreen_reset() {
$('contractQueryScreen_paraDs').reset();
}
function contractQueryScreen_add() {
$('et_create').disable(); //按钮不可用
var records = $('contractQueryScreen_mainDs').getSelected();
var record = records[0],
contract_id = record.get('contract_id');
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在回购期间无法进行后续操作,请谨慎操作!!!如果需要取消提前结清,请一定点击取消按钮!!!</span>', function () {
var ccr_document_type = 'ET';
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('con_et_create_change_link').getUrl(),
para: {
simulation_flag: 'N',
contract_id: contract_id,
req_type: ccr_document_type
},
success: function (res) {
$('et_create').enable(); //按钮启用
var param = record.data;
param['change_req_id'] = res.result.change_req_id;
param['contract_id'] = res.result.change_req_id;
param['source_contract_id'] = contract_id;
//param['layout_debugger_flag'] = 'Y';
param['function_code'] = 'CON_ET002';
param['url_title'] = '提前结清创建';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['document_type'] = ccr_document_type;
param['winid'] = 'con_et002_detail_winid';
hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs');
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
$('et_create').enable(); //按钮启用
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
$('et_create').enable(); //按钮启用
},
scope: this
});
}, function () {
$('et_create').enable(); //按钮启用
}, 300, 150);
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON_ET001"/>
<a:dataSets>
<a:dataSet id="yes_or_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="contract_status_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="hls_division_ds">
<a:datas dataSource="/model/hls_division_path"/>
</a:dataSet>
<a:dataSet id="contractQueryScreen_paraDs">
<a:fields>
<a:field name="contract_number" typeCase="upper"/>
<a:field name="contract_name"/>
<a:field name="date_from"/>
<a:field name="date_to"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_name" lovGridHeight="330" lovHeight="470" lovLabelWidth="120" lovService="cont.CON701.hls_bp_master_v_all_lov?bp_category=TENANT" lovWidth="700" title="承租人">
<a:mapping>
<a:map from="bp_id" to="bp_id_tenant"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<!--代理商-->
<a:field name="bp_id_agent_level1"/>
<a:field name="bp_agent" lovGridHeight="330" lovHeight="470" lovLabelWidth="120" lovService="cont.CON701.hls_bp_master_v_all_lov?bp_category=AGENT" lovWidth="700" title="代理商">
<a:mapping>
<a:map from="bp_id" to="bp_id_agent_level1"/>
<a:map from="bp_name" to="bp_agent"/>
</a:mapping>
</a:field>
<!--产品线-->
<a:field name="division_n" displayField="description" options="hls_division_ds" returnField="division" valueField="division"/>
<a:field name="overdue_status"/>
<a:field name="overdue_status_desc" displayField="code_value_name" options="yes_or_no_ds" returnField="overdue_status" valueField="code_value"/>
<a:field name="contract_status"/>
<a:field name="contract_status_desc" displayField="code_value_name" options="contract_status_ds" returnField="contract_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="contractQueryScreen_mainDs" autoQuery="true" fetchAll="false" model="cont.CON_ET001.con_early_termination_query" pageSize="14" queryDataSet="contractQueryScreen_paraDs" selectable="true" selectionModel="single">
<a:fields>
<a:field name="et_type_dis" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="cont.CON701.hls_document_type_for_et_lov" lovWidth="500" prompt="提前结清类型" readOnly="true" required="true">
<a:mapping>
<a:map from="document_type" to="et_type"/>
<a:map from="document_type_desc" to="et_type_dis"/>
</a:mapping>
</a:field>
<a:field name="termination_date" datatype="date" required="true"/>
<a:field name="overdue_status" checkedValue="Y" uncheckedValue="N"/>
<a:field name="trial" checkedValue="Y" uncheckedValue="N"/>
<a:field name="lease_execution_date" datatype="date"/>
</a:fields>
<a:events>
<a:event name="query" handler="aut_authority_list_validate_query"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="contractQueryScreen_query" text="HLS.QUERY"/>
<a:gridButton click="contractQueryScreen_reset" text="HLS.RESET"/>
<a:gridButton id="et_create" click="contractQueryScreen_add" text="HLS.CREATE"/>
</a:screenTopToolbar>
<a:form column="4" labelWidth="100" marginWidth="40" title="HLS.QUERY_TITLE">
<a:textField name="contract_number" bindTarget="contractQueryScreen_paraDs" prompt="合同编号"/>
<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: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="是否逾期"/>
</a:form>
<a:grid id="contractQueryScreen_mainDs_grid" bindTarget="contractQueryScreen_mainDs" marginHeight="230" marginWidth="40" navBar="true">
<a:columns>
<a:column name="contract_number" prompt="合同编号" width="120" align="left"/>
<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="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"/>
</a:columns>
</a:grid>
</a:screenBody>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Spencer 3893
$Date: 2019-9-19
$Revision: 1.0
$Purpose: 提前结清维护入口
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="basic.hls_division_for_lov" rootPath="hls_division_path"/>
</a:init-procedure>
<a:view>
<a:link id="con_et_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_et_change_link" url="${/request/@context_path}/modules/cont/CON_ET001/con_early_termination_et_detail.lview"/>
<a:link id="con_et_create_change_link" model="cont.CON_ET001.create_change_req" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
function contractQueryScreen_query() {
$('contractQueryScreen_mainDs').query();
}
function contractQueryScreen_reset() {
$('contractQueryScreen_paraDs').reset();
}
function open_change_req(value,record,name){debugger
if(name=='change_req_number'){
var req_status = record.get('req_status');
var change_req_id = record.get('change_req_id');
var contract_id=record.get('contract_id');
if('NEW' == req_status || 'REJECT' == req_status){
return '<a href="javascript:open_change_req_detail(' + change_req_id + ',' + contract_id + ')">'+value+'</a>';
}else{
return '<a href="javascript:open_change_req_readonly_detail(' + change_req_id + ',' + contract_id + ')">'+value+'</a>';
}
}
return value;
}
function open_change_req_detail(change_req_id,contract_id) {debugger
var param = {};
param['change_req_id'] = change_req_id;
param['contract_id'] = change_req_id;
param['source_contract_id'] = contract_id;
//param['layout_debugger_flag'] = 'Y';
param['function_code'] = 'CON_ET002';
param['url_title'] = '提前结清维护';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['document_type'] = 'ET';
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');
}
function open_change_req_readonly_detail(change_req_id,contract_id) {
var param = {};
param['change_req_id'] = change_req_id;
param['contract_id'] = change_req_id;
param['source_contract_id'] = contract_id;
//param['layout_debugger_flag'] = 'Y';
param['function_code'] = 'CON_ET002';
param['url_title'] = '提前结清明细';
param['function_usage'] = 'READONLY';
param['maintain_type'] = 'QUERY';
param['document_type'] = 'ET';
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');
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON_ET001"/>
<a:dataSets>
<a:dataSet id="yes_or_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="contract_status_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="contract_chage_req_status_ds" lookupCode="CON_CHANGE_REQ_STATUS"/>
<a:dataSet id="hls_division_ds">
<a:datas dataSource="/model/hls_division_path"/>
</a:dataSet>
<a:dataSet id="contractQueryScreen_paraDs">
<a:fields>
<a:field name="contract_number" typeCase="upper"/>
<a:field name="contract_name"/>
<a:field name="date_from"/>
<a:field name="date_to"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_name" lovGridHeight="330" lovHeight="470" lovLabelWidth="120" lovService="cont.CON701.hls_bp_master_v_all_lov?bp_category=TENANT" lovWidth="700" title="承租人">
<a:mapping>
<a:map from="bp_id" to="bp_id_tenant"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<!--代理商-->
<a:field name="bp_id_agent_level1"/>
<a:field name="bp_agent" lovGridHeight="330" lovHeight="470" lovLabelWidth="120" lovService="cont.CON701.hls_bp_master_v_all_lov?bp_category=AGENT" lovWidth="700" title="代理商">
<a:mapping>
<a:map from="bp_id" to="bp_id_agent_level1"/>
<a:map from="bp_name" to="bp_agent"/>
</a:mapping>
</a:field>
<!--产品线-->
<a:field name="division_n" displayField="description" options="hls_division_ds" returnField="division" valueField="division"/>
<a:field name="contract_status"/>
<a:field name="contract_status_desc" displayField="code_value_name" options="contract_status_ds" returnField="contract_status" valueField="code_value"/>
<a:field name="req_employee_n"/>
<a:field name="req_status"/>
<a:field name="req_status_n" displayField="code_value_name" options="contract_chage_req_status_ds" returnField="contract_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="contractQueryScreen_mainDs" autoQuery="true" fetchAll="false" model="cont.CON_ET003.con_early_termination_modify_query" pageSize="14" queryDataSet="contractQueryScreen_paraDs" selectable="true" selectionModel="single">
<a:fields>
<a:field name="et_type_dis" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="cont.CON701.hls_document_type_for_et_lov" lovWidth="500" prompt="提前结清类型" readOnly="true" required="true">
<a:mapping>
<a:map from="document_type" to="et_type"/>
<a:map from="document_type_desc" to="et_type_dis"/>
</a:mapping>
</a:field>
<a:field name="termination_date" datatype="date" required="true"/>
<a:field name="overdue_status" checkedValue="Y" uncheckedValue="N"/>
<a:field name="trial" checkedValue="Y" uncheckedValue="N"/>
<a:field name="lease_execution_date" datatype="date"/>
</a:fields>
<a:events>
<a:event name="query" handler="aut_authority_list_validate_query"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="contractQueryScreen_query" text="HLS.QUERY"/>
<a:gridButton click="contractQueryScreen_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form column="4" labelWidth="100" marginWidth="40" title="HLS.QUERY_TITLE">
<a:textField name="change_req_number" bindTarget="contractQueryScreen_paraDs" prompt="合同变更编号"/>
<a:textField name="contract_number" bindTarget="contractQueryScreen_paraDs" prompt="合同编号"/>
<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:textField name="req_employee_n" bindTarget="contractQueryScreen_paraDs" prompt="申请人"/>
<a:comboBox name="req_status_n" bindTarget="contractQueryScreen_paraDs" prompt="变更审批状态"/>
</a:form>
<a:grid id="contractQueryScreen_mainDs_grid" bindTarget="contractQueryScreen_mainDs" marginHeight="230" marginWidth="40" navBar="true">
<a:columns>
<a:column name="change_req_number" prompt="合同变更编号" width="120" align="left" renderer="open_change_req"/>
<a:column name="contract_number" prompt="合同编号" width="120" align="left"/>
<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="req_employee_n" prompt="申请人" width="80" align="right"/>
<a:column name="req_status_n" prompt="变更审批状态" width="100" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -19,8 +19,13 @@
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>
<a:link id="hls213_sap_eai_create_vender_link"
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>
<<<<<<< HEAD
<!-- <a:link id="Identity_ccx_link"
url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>-->
=======
<!-- <a:link id="Identity_ccx_link"
url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>-->
>>>>>>> fc911afa6f82f272999782f0b1703081ee8d4607
<script src="${/request/@context_path}/javascripts/identity_card_info_query.js" type="text/javascript"/>
<a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>
<script type="text/javascript"><![CDATA[
......@@ -85,41 +90,42 @@
var bp_record = $(bp_ds_id).getCurrentRecord();
var bp_id = bp_record.get('bp_id');
Leaf.request({
url: $('hls213_sap_eai_create_customer_link').getUrl(),
para: {
bp_id: bp_id
},
scope: this,
success: function () {
Leaf.request({
url: $('hls213_sap_eai_create_vender_link').getUrl(),
para: {
bp_id: bp_id
},
scope: this,
success: function () {
$(bp_ds_id).setQueryParameter('bp_id', bp_id);
$(bp_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
// Leaf.request({
// url: $('hls213_sap_eai_create_customer_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// Leaf.request({
// url: $('hls213_sap_eai_create_vender_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// $(bp_ds_id).setQueryParameter('bp_id', bp_id);
// $(bp_ds_id).query();
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
......@@ -141,7 +147,7 @@
var sp_identity_flag;
function id_card_no_validate(record, name, value) {
if (name == 'id_card_no') {
var bp_name = record.get('bp_name');
} else if (name == 'id_no_sp') {
......@@ -157,6 +163,81 @@
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
// if(value=='123456199001011233'){
//
<<<<<<< HEAD
// var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({
url: url1,
para: {
id_card_no: value,//身份证号码
bp_name: bp_name
},
success: function (res) {
var resmsg_1 = res.result.resmsg_1;
if (resmsg_1 == '1') {
if (name == 'id_card_no') {
record.set('ccx_resmsg', '身份验证成功');
card_identity_flag = 'Y';
} else {
record.set('ccx_resmsg1', '身份验证成功');
sp_identity_flag = 'Y';
}
} else {
//个人身份验证
var url = $('Identity_ccx_link').getUrl();
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: url,
para: {
bp_name: bp_name,//姓名
id_card_no: value//身份证号码
},
success: function (res) {
var resmsg = res.result.resmsg;
if (name == 'id_card_no') {
record.set('ccx_resmsg', resmsg);
if (resmsg == '身份验证成功') {
card_identity_flag = 'Y';
}
} else {
record.set('ccx_resmsg1', resmsg);
if (resmsg == '身份验证成功') {
sp_identity_flag = 'Y';
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});*/
=======
// var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({
......@@ -230,6 +311,7 @@
scope: this,
sync: true
});*/
>>>>>>> fc911afa6f82f272999782f0b1703081ee8d4607
}
if (value.length == 18) {
......@@ -275,12 +357,13 @@
//保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
//
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class');
//alert('${/parameter/@unbrand}');
if (bp_class == 'NP') {
if (card_identity_flag == 'Y' || sp_identity_flag == 'Y') {
if (card_identity_flag == 'N' || sp_identity_flag == 'N') {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
if (head_record.get('bp_code')) {
......
......@@ -11,16 +11,16 @@
<a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<script type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) {
record.set('function_code', 'HLS213D');
record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id);
record.data['url_title'] = '商业伙伴创建';
var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) {
record.set('function_code', 'HLS213D');
record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id);
record.data['url_title'] = '商业伙伴创建';
var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq){
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure/>
<a:view>
<!-- <a:link id="BmLink_MainScreen_functionHit" model="sys.sys_page_function_visit" modelaction="update"/>-->
<script><![CDATA[
//退出按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
$('hls_bp_master_billing').close();
}
Leaf.onReady(function () {
var billing_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
// console.log($(billing_ds));
$(billing_ds).setQueryParameter("bp_id","${/parameter/@bp_id}");
$(billing_ds).query();
}
)
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -15,8 +15,8 @@
<a:link id="hls214N_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="hls214_bp_master_save_link_id" model="hls.HLS214.hls_bp_change_agent" modelaction="update"/>
<a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>
<a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>
<!-- <a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<script src="${/request/@context_path}/javascripts/identity_card_info_query.js"
type="text/javascript"></script>
<script type="text/javascript"><![CDATA[
......@@ -33,41 +33,41 @@
var bp_record = $(bp_ds_id).getCurrentRecord();
var bp_id = bp_record.get('bp_id');
Leaf.request({
url: $('hls214_sap_eai_create_customer_link').getUrl(),
para: {
bp_id: bp_id
},
scope: this,
success: function () {
Leaf.request({
url: $('hls214_sap_eai_create_vender_link').getUrl(),
para: {
bp_id: bp_id
},
scope: this,
success: function () {
$(bp_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
// Leaf.request({
// url: $('hls214_sap_eai_create_customer_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// Leaf.request({
// url: $('hls214_sap_eai_create_vender_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// $(bp_ds_id).query();
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
function prj_check_bp_id(record) {
......
......@@ -23,10 +23,43 @@
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/>
<a:link id="hls_bp_ccx_icinfo_link"
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/>
<a:link id="hls_bp_master_billing_link"
url="${/request/@context_path}/modules/hls/HLS214N/hls_bp_master_billing.lview"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
//信息变更
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
var data=$(ds_id).selected[0];
var invoice_bp_bank_account = data.get('invoice_bp_bank_account');
var invoice_title = data.get('invoice_title');
var invoice_bp_address_phone_num = data.get('invoice_bp_address_phone_num');
var phone =data.get('phone');
var taxpayer_type =data.get('taxpayer_type');
var invoice_bp_bank =data.get('invoice_bp_bank');
var bp_id=data.get('bp_id');
new Leaf.Window({
id: 'hls_bp_master_billing',
url: $('hls_bp_master_billing_link').getUrl(),
params: {
function_code:'HLS214NS',
invoice_bp_bank_account:invoice_bp_bank_account,
invoice_title:invoice_title,
invoice_bp_address_phone_num:invoice_bp_address_phone_num,
phone:phone,
taxpayer_type:taxpayer_type,
invoice_bp_bank:invoice_bp_bank,
bp_id:bp_id
},
title: '开票信息',
fullScreen: true
});
}
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
function open_bp_modify_win(ds_id, record_id) {
......@@ -34,7 +67,7 @@
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'HLS214D';
debugger;
// debugger;
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS228DL';
}
......
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