Commit e8d445d0 authored by stone's avatar stone

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

parents 8dc519cb 5201868c
create or replace package cus_con_deposit_pkg is
-- Author : Spencer 3893
-- Created : 2019/10/14 20:51:45
-- Purpose : 保证金
--罚息测算
procedure calc_overdue_dayend(p_calc_date date,
p_session_id number,
p_user_id number);
end cus_con_deposit_pkg;
/
create or replace package body cus_con_deposit_pkg is
g_currency_precision constant number := 2;
procedure log(p_log_desc varchar2, p_error_message varchar2) is
begin
hls_dayend_pkg.log(p_log_desc => p_log_desc,
p_error_message => p_error_message);
end;
procedure f_calc_penalty(p_calc_amount number,
p_contract_rec con_contract%rowtype,
p_calc_date date,
p_penalty_calc_date date,
p_user_id number,
p_total_penalty_amt out number) is
v_penalty_days number;
v_penalty_amt number;
v_total_penalty_amt number := 0;
begin
v_penalty_days := trunc(p_calc_date) - trunc(p_penalty_calc_date) -
nvl(p_contract_rec.grace_period, 0);
-- 未核销金额 * 延迟天数 * 延迟履行金率
if v_penalty_days <= 0 then
v_penalty_amt := 0;
else
v_penalty_days := v_penalty_days +
nvl(p_contract_rec.grace_period, 0);
v_penalty_amt := p_calc_amount * (v_penalty_days) *
p_contract_rec.penalty_rate;
end if;
/*log(p_log_desc => '未收金额'||to_char(p_cashflow_rec.due_amount - nvl(p_cashflow_rec.received_amount,0)),
p_error_message => '延迟天数='||v_penalty_days||',延迟金'||v_penalty_amt);
*/
v_total_penalty_amt := v_total_penalty_amt + v_penalty_amt;
p_total_penalty_amt := round(v_total_penalty_amt,
nvl(p_contract_rec.currency_precision,
g_currency_precision));
end;
procedure calc_penalty(p_cashflow_rec con_contract_cashflow%rowtype,
p_contract_rec con_contract%rowtype,
p_calc_date date,
p_user_id number,
p_total_penalty_amt out number) is
v_penalty_days number;
v_penalty_amt number;
v_total_penalty_amt number := 0;
v_last_creation_date date;
begin
select trunc(max(a.penalty_calc_date))
into v_last_creation_date
from csh_write_off a
where a.cashflow_id = p_cashflow_rec.cashflow_id;
--modify by wcs
if not (p_cashflow_rec.penalty_process_status = 'NORMAL') then
--不满足计算条件
return;
end if;
--已收部分
for c_write_off in (select a.*
from csh_write_off a
where a.contract_id = p_contract_rec.contract_id
and a.cashflow_id = p_cashflow_rec.cashflow_id
and trunc(a.penalty_calc_date) <=
trunc(p_calc_date)
order by a.penalty_calc_date, a.write_off_date) loop
--核销金额 * 延迟天数 * 延迟履行金率
v_penalty_days := trunc(c_write_off.penalty_calc_date) -
trunc(nvl(p_cashflow_rec.ln_user_col_d01,
p_cashflow_rec.due_date)) -
nvl(p_contract_rec.grace_period, 0);
if v_penalty_days <= 0 then
v_penalty_amt := 0;
else
v_penalty_days := v_penalty_days +
nvl(p_contract_rec.grace_period, 0);
v_penalty_amt := c_write_off.write_off_due_amount * v_penalty_days *
p_contract_rec.penalty_rate;
end if;
/*log(p_log_desc => to_char(c_write_off.penalty_calc_date,'YYYYMMDD')||'收款核销'||c_write_off.write_off_due_amount,
p_error_message => '延迟天数='||v_penalty_days||',延迟金'||v_penalty_amt);
*/
v_total_penalty_amt := v_total_penalty_amt + v_penalty_amt;
end loop;
--未收部分
if nvl(p_cashflow_rec.received_amount, 0) < p_cashflow_rec.due_amount then
v_penalty_days := trunc(p_calc_date) -
trunc(nvl(p_cashflow_rec.ln_user_col_d01,
p_cashflow_rec.due_date)) -
nvl(p_contract_rec.grace_period, 0);
-- 未核销金额 * 延迟天数 * 延迟履行金率
if v_penalty_days <= 0 then
v_penalty_amt := 0;
else
v_penalty_days := v_penalty_days +
nvl(p_contract_rec.grace_period, 0);
v_penalty_amt := (p_cashflow_rec.due_amount -
nvl(p_cashflow_rec.received_amount, 0)) *
(v_penalty_days) * p_contract_rec.penalty_rate;
end if;
/*log(p_log_desc => '未收金额'||to_char(p_cashflow_rec.due_amount - nvl(p_cashflow_rec.received_amount,0)),
p_error_message => '延迟天数='||v_penalty_days||',延迟金'||v_penalty_amt);
*/
v_total_penalty_amt := v_total_penalty_amt + v_penalty_amt;
end if;
p_total_penalty_amt := round(v_total_penalty_amt,
nvl(p_contract_rec.currency_precision,
g_currency_precision));
end;
procedure overdue_dayend(p_contract_cashflow_rec con_contract_cashflow%rowtype,
p_contract_rec con_contract%rowtype,
p_calc_date date,
p_session_id number,
p_user_id number) is
v_total_penalty_amt number;
v_total_penalty_amt_tmp number;
v_last_creation_date date;
v_deposit_calc_overdue_tmp_rec CUS_DEPOSIT_CALC_OVERDUE_TMP%rowtype;
begin
select trunc(max(a.penalty_calc_date))
into v_last_creation_date
from csh_write_off a
where a.cashflow_id = p_contract_cashflow_rec.cashflow_id;
--计算营业数据overdue
--逾期
if p_contract_cashflow_rec.overdue_status = 'Y' then
--已逾期
if p_contract_cashflow_rec.due_amount >
nvl(p_contract_cashflow_rec.received_amount, 0) then
--未收完款
v_deposit_calc_overdue_tmp_rec.calc_id := CUS_DEPOSIT_CALC_OVERDUE_TMP_s.Nextval;
v_deposit_calc_overdue_tmp_rec.session_id := p_session_id;
v_deposit_calc_overdue_tmp_rec.calc_date := p_calc_date;
v_deposit_calc_overdue_tmp_rec.due_date := p_contract_cashflow_rec.due_date;
v_deposit_calc_overdue_tmp_rec.contract_id := p_contract_rec.contract_id;
v_deposit_calc_overdue_tmp_rec.cashflow_id := p_contract_cashflow_rec.cashflow_id;
v_deposit_calc_overdue_tmp_rec.overdue_max_days := trunc(p_calc_date) -
trunc(p_contract_cashflow_rec.due_date);
v_deposit_calc_overdue_tmp_rec.overdue_amount := p_contract_cashflow_rec.due_amount -
nvl(p_contract_cashflow_rec.received_amount,
0);
v_deposit_calc_overdue_tmp_rec.overdue_principal := p_contract_cashflow_rec.principal -
nvl(p_contract_cashflow_rec.received_principal,
0);
v_deposit_calc_overdue_tmp_rec.overdue_interest := p_contract_cashflow_rec.interest -
nvl(p_contract_cashflow_rec.received_interest,
0);
v_deposit_calc_overdue_tmp_rec.created_by := p_user_id;
v_deposit_calc_overdue_tmp_rec.creation_date := sysdate;
insert into CUS_DEPOSIT_CALC_OVERDUE_TMP
values v_deposit_calc_overdue_tmp_rec;
end if;
else
--未逾期
if p_contract_cashflow_rec.due_amount >
nvl(p_contract_cashflow_rec.received_amount, 0) then
v_deposit_calc_overdue_tmp_rec.calc_id := CUS_DEPOSIT_CALC_OVERDUE_TMP_s.Nextval;
v_deposit_calc_overdue_tmp_rec.session_id := p_session_id;
v_deposit_calc_overdue_tmp_rec.calc_date := p_calc_date;
v_deposit_calc_overdue_tmp_rec.due_date := p_contract_cashflow_rec.due_date;
v_deposit_calc_overdue_tmp_rec.contract_id := p_contract_rec.contract_id;
v_deposit_calc_overdue_tmp_rec.cashflow_id := p_contract_cashflow_rec.cashflow_id;
v_deposit_calc_overdue_tmp_rec.overdue_max_days := trunc(p_calc_date) -
trunc(p_contract_cashflow_rec.due_date);
v_deposit_calc_overdue_tmp_rec.overdue_amount := p_contract_cashflow_rec.due_amount -
nvl(p_contract_cashflow_rec.received_amount,
0);
v_deposit_calc_overdue_tmp_rec.overdue_principal := p_contract_cashflow_rec.principal -
nvl(p_contract_cashflow_rec.received_principal,
0);
v_deposit_calc_overdue_tmp_rec.overdue_interest := p_contract_cashflow_rec.interest -
nvl(p_contract_cashflow_rec.received_interest,
0);
v_deposit_calc_overdue_tmp_rec.created_by := p_user_id;
v_deposit_calc_overdue_tmp_rec.creation_date := sysdate;
insert into CUS_DEPOSIT_CALC_OVERDUE_TMP
values v_deposit_calc_overdue_tmp_rec;
end if;
end if;
--计算会计逾期数据,取会计核销的最大期与营业现金流数据比较
for c_f in (select gwo.cf_item,
gwo.times,
sum(gwo.write_off_amount) write_off_amount,
gwo.penalty_calc_date
from GLD_WRITE_OFF gwo
where /*gwo.create_je_flag = 'Y'
AND */
gwo.reversed_flag = 'N'
and gwo.contract_id = p_contract_rec.contract_id
and gwo.times =
(select max(gwo.times) max_times
from GLD_WRITE_OFF gwo
where /*gwo.create_je_flag = 'Y'
AND */
gwo.reversed_flag = 'N'
and gwo.contract_id = p_contract_rec.contract_id)
group by gwo.cf_item, gwo.times, gwo.penalty_calc_date) loop
--会计出凭证的数据同类型同期现金流,并营业应收金额大于会计出凭证的和及营业应收日小于计算日。就视为这一期现金流 会计逾期
if p_contract_cashflow_rec.cf_item = c_f.cf_item and
p_contract_cashflow_rec.times = c_f.times and
p_contract_cashflow_rec.due_amount > c_f.write_off_amount and
p_contract_cashflow_rec.due_date < p_calc_date then
--会计已收收计算罚息
f_calc_penalty(p_calc_amount => c_f.write_off_amount,
p_contract_rec => p_contract_rec,
p_calc_date => p_calc_date,
p_penalty_calc_date => c_f.penalty_calc_date,
p_user_id => p_user_id,
p_total_penalty_amt => v_total_penalty_amt_tmp);
--会计未收计算罚息
f_calc_penalty(p_calc_amount => p_contract_cashflow_rec.due_amount -
c_f.write_off_amount,
p_contract_rec => p_contract_rec,
p_calc_date => p_calc_date,
p_penalty_calc_date => p_contract_cashflow_rec.due_date,
p_user_id => p_user_id,
p_total_penalty_amt => v_total_penalty_amt);
--更新会计逾期租金=营业应收租金-会计核销租金
update CUS_DEPOSIT_CALC_OVERDUE_TMP t
set t.f_overdue_amount = p_contract_cashflow_rec.due_amount -
c_f.write_off_amount,
t.f_overdue_penalty_amt = round(v_total_penalty_amt_tmp +
v_total_penalty_amt,
2)
where t.cashflow_id = p_contract_cashflow_rec.cashflow_id
and t.contract_id = p_contract_rec.contract_id
and t.session_id = p_session_id;
--会计出凭证的数据同类型及会计未来期现金流,并营业应收日小于计算日。就视为这一期现金流 会计逾期
elsif p_contract_cashflow_rec.cf_item = c_f.cf_item and
p_contract_cashflow_rec.times > c_f.times and
p_contract_cashflow_rec.due_date < p_calc_date then
--会计未收计算罚息
f_calc_penalty(p_calc_amount => p_contract_cashflow_rec.due_amount,
p_contract_rec => p_contract_rec,
p_calc_date => p_calc_date,
p_penalty_calc_date => p_contract_cashflow_rec.due_date,
p_user_id => p_user_id,
p_total_penalty_amt => v_total_penalty_amt);
--更新会计逾期租金=营业应收租金
update CUS_DEPOSIT_CALC_OVERDUE_TMP t
set t.f_overdue_amount = p_contract_cashflow_rec.due_amount,
t.f_overdue_penalty_amt = v_total_penalty_amt
where t.cashflow_id = p_contract_cashflow_rec.cashflow_id
and t.contract_id = p_contract_rec.contract_id
and t.session_id = p_session_id;
end if;
end loop;
--计算penalty
if p_contract_cashflow_rec.write_off_flag <> 'FULL' then
calc_penalty(p_cashflow_rec => p_contract_cashflow_rec,
p_contract_rec => p_contract_rec,
p_calc_date => p_calc_date,
p_total_penalty_amt => v_total_penalty_amt,
p_user_id => p_user_id);
update CUS_DEPOSIT_CALC_OVERDUE_TMP
set OVERDUE_PENALTY_AMT = v_total_penalty_amt
where calc_id = v_deposit_calc_overdue_tmp_rec.calc_id;
end if;
end;
procedure overdue_dayend(p_contract_id number,
p_calc_date date,
p_session_id number,
p_user_id number) is
v_contract_rec con_contract%rowtype;
begin
begin
select *
into v_contract_rec
from con_contract
where contract_id = p_contract_id
and contract_status = 'INCEPT'
for update nowait;
exception
when no_data_found then
return;
end;
for c_contract_cashflow in (select a.*
from con_contract_cashflow a,
con_contract_cf_item b
where a.contract_id = p_contract_id
and a.cf_status = 'RELEASE'
and a.due_date <= p_calc_date
--只有正常的才计算罚息。
and a.penalty_process_status = 'NORMAL'
and a.cf_direction = 'INFLOW'
and a.contract_id = b.contract_id
and a.cf_item = b.cf_item
and b.calc_penalty = 'Y'
order by times, due_date
for update nowait) loop
overdue_dayend(p_contract_cashflow_rec => c_contract_cashflow,
p_contract_rec => v_contract_rec,
p_calc_date => p_calc_date,
p_session_id => p_session_id,
p_user_id => p_user_id);
end loop;
end;
--罚息测算
procedure calc_overdue_dayend(p_calc_date date,
p_session_id number,
p_user_id number) is
v_count number;
begin
-- 同样的罚息测算日如果存在数据,不在进行计算
select count(*)
into v_count
from CUS_DEPOSIT_CALC_OVERDUE_TMP t
where t.calc_date = p_calc_date
--and t.session_id = p_session_id
;
if v_count >= 1 then
null;
else
-- 之前的计算数据
delete from CUS_DEPOSIT_CALC_OVERDUE_TMP t
where t.calc_date <= p_calc_date;
--t.session_id = p_session_id;
--根据测算日重算罚息
for c_con in (select *
from con_contract t
where t.contract_status = 'INCEPT') loop
overdue_dayend(p_contract_id => c_con.contract_id,
p_calc_date => p_calc_date,
p_session_id => p_session_id,
p_user_id => p_user_id);
end loop;
end if;
end calc_overdue_dayend;
end cus_con_deposit_pkg;
/
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CUS_DEPOSIT100.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_manger_entrance.lview','保证金管理',1,1,0);
sys_function_assign_pkg.service_load('modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_manger_entrance.lview','保证金管理',1,1,0);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CUS_DEPOSIT100','保证金管理','保证金管理','100','','','modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_manger_entrance.lview','ZHS',-1);
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CUS_DEPOSIT100','保证金管理','保证金管理','100','','','modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_manger_entrance.lview','US',-1);
--分配页面
sys_function_assign_pkg.func_service_load('CUS_DEPOSIT100','modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_manger_entrance.lview');
--分配bm
sys_function_assign_pkg.func_bm_load('CUS_DEPOSIT100','cus_deposit.CUS_DEPOSIT100.csh_transaction_query');
--分配菜单
sys_load_sys_function_grp_pkg.sys_function_group_item_load(p_function_group_code=>'DEPOSIT',p_function_code=>'CUS_DEPOSIT100',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_CUS_DEPOSIT110.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('','保证金-',1,1,0);
sys_function_assign_pkg.service_load('','保证金-',1,1,0);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CUS_DEPOSIT110','保证金入账','保证金入账','110','','','modules/cus_deposit/CUS_DEPOSIT110/xx.lview','ZHS',-1);
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CUS_DEPOSIT110','保证金入账','保证金入账','110','','','modules/cus_deposit/CUS_DEPOSIT110/xx.lview','US',-1);
--分配页面
sys_function_assign_pkg.func_service_load('CUS_DEPOSIT110','');
--分配bm
sys_function_assign_pkg.func_bm_load('CUS_DEPOSIT110','basic.hls_bp_master_v_for_lov');
--分配菜单
sys_load_sys_function_grp_pkg.sys_function_group_item_load(p_function_group_code=>'DEPOSIT',p_function_code=>'CUS_DEPOSIT110',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_CUS_DEPOSIT120.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/cus_deposit/CUS_DEPOSIT120/cus_deposit_advance_list.lview','保证金-代垫清单',1,1,0);
sys_function_assign_pkg.service_load('modules/cus_deposit/CUS_DEPOSIT120/cus_deposit_advance_list.lview','保证金-代垫清单',1,1,0);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CUS_DEPOSIT120','保证金-代垫清单','保证金-代垫清单','120','','','modules/cus_deposit/CUS_DEPOSIT120/cus_deposit_advance_list.lview','ZHS',-1);
SYS_LOAD_SYS_FUNCTION_PKG.SYS_FUNCTION_LOAD('CUS_DEPOSIT120','保证金-代垫清单','保证金-代垫清单','120','','','modules/cus_deposit/CUS_DEPOSIT120/cus_deposit_advance_list.lview','US',-1);
--分配页面
sys_function_assign_pkg.func_service_load('CUS_DEPOSIT120','modules/cus_deposit/CUS_DEPOSIT120/cus_deposit_advance_list.lview');
--分配bm
sys_function_assign_pkg.func_bm_load('CUS_DEPOSIT120','cus_deposit.CUS_DEPOSIT120.cus_deposit_calc_overdue_list_query');
sys_function_assign_pkg.func_bm_load('CUS_DEPOSIT120','cus_deposit.CUS_DEPOSIT120.cus_deposit_calc_overdue_list');
sys_function_assign_pkg.func_bm_load('CUS_DEPOSIT120','basic.hls_bp_master_v_for_lov');
--分配菜单
sys_load_sys_function_grp_pkg.sys_function_group_item_load(p_function_group_code=>'DEPOSIT',p_function_code=>'CUS_DEPOSIT120',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 CUS_DEPOSIT_CALC_OVERDUE_TMP_S.log
prompt
prompt Creating sequence CUS_DEPOSIT_CALC_OVERDUE_TMP_S
prompt ====================================
prompt
whenever sqlerror continue
drop sequence CUS_DEPOSIT_CALC_OVERDUE_TMP_S;
whenever sqlerror exit failure rollback
Create sequence CUS_DEPOSIT_CALC_OVERDUE_TMP_S;
spool off
exit
alter table CSH_TRANSACTION add (transfer_amount number);
comment on column CSH_TRANSACTION.transfer_amount is '已划转金额(hlcm保证金)';
alter table CSH_TRANSACTION add (offset_amount number);
comment on column CSH_TRANSACTION.offset_amount is '已冲抵金额(hlcm保证金)';
alter table CSH_TRANSACTION add (return_amount number);
comment on column CSH_TRANSACTION.return_amount is '已退款金额(hlcm保证金)';
alter table CSH_TRANSACTION add (deposit_balance number);
comment on column CSH_TRANSACTION.deposit_balance is '保证金余额(hlcm保证金)';
alter table CSH_TRANSACTION add (deposit_source_tran_id number);
comment on column CSH_TRANSACTION.deposit_source_tran_id is '保证金上级现金事务id(hlcm保证金)';
alter table CSH_WRITE_OFF add (operation_type number);
comment on column CSH_WRITE_OFF.operation_type is '操作类型:入账、划转、冲抵租金、冲抵违约金(hlcm保证金)';
\ No newline at end of file
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool CUS_DEPOSIT_CALC_OVERDUE_TMP.log
PROMPT
PROMPT CREATING TABLE CUS_DEPOSIT_CALC_OVERDUE_TMP
PROMPT ============================
PROMPT
WHENEVER SQLERROR CONTINUE
DROP TABLE CUS_DEPOSIT_CALC_OVERDUE_TMP;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK
-- Create table
create table CUS_DEPOSIT_CALC_OVERDUE_TMP
(
calc_id NUMBER not null,
session_id NUMBER,
calc_date DATE,
due_date DATE,
contract_id NUMBER,
cashflow_id NUMBER,
f_overdue_amount NUMBER,
f_overdue_penalty_amt NUMBER,
overdue_principal NUMBER,
overdue_interest NUMBER,
overdue_amount NUMBER,
overdue_max_days NUMBER,
overdue_penalty_amt NUMBER,
created_by NUMBER,
creation_date DATE
);
-- Add comments to the table
comment on table CUS_DEPOSIT_CALC_OVERDUE_TMP
is '保证金代垫清单-罚息测算';
-- Add comments to the columns
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.calc_id
is 'PK';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.session_id
is 'session_id';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.calc_date
is '计算日';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.due_date
is '到期日';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.contract_id
is '合同id';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.cashflow_id
is '现金流id';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.overdue_principal
is '逾期本金';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.overdue_interest
is '逾期利息';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.overdue_amount
is '逾期租金';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.overdue_max_days
is '最大逾期天数';
comment on column CUS_DEPOSIT_CALC_OVERDUE_TMP.overdue_penalty_amt
is '逾期违约金';
-- Create/Recreate indexes
create index CUS_DEPT_CALC_OVERDUE_TMP_N1 on CUS_DEPOSIT_CALC_OVERDUE_TMP (SESSION_ID);
create index CUS_DEPT_CALC_OVERDUE_TMP_N2 on CUS_DEPOSIT_CALC_OVERDUE_TMP (CONTRACT_ID);
-- Create/Recreate primary, unique and foreign key constraints
alter table CUS_DEPOSIT_CALC_OVERDUE_TMP
add constraint CUS_DEPT_CALC_OVERDUE_TMP_PK primary key (CALC_ID);
/
SPOOL OFF
EXIT
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_id desc">
</bm:model>
\ No newline at end of file
<?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_deposit_pkg.calc_overdue_dayend(p_calc_date => to_date(${@calc_overdue_date},'yyyy-mm-dd'),
p_session_id => ${/session/@session_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[select * from (
select v1.*,v1.due_rental_deposit-v1.received_rental_deposit undue_rental_deposit from (
select cc.bp_id_agent_level1,
(select hbm.bp_name
from HLS_BP_MASTER HBM
where cc.bp_id_agent_level1 = hbm.bp_id) agent_name,
cc.contract_number,
cc.bp_id_tenant,
(select hbm.bp_name
from HLS_BP_MASTER HBM
where cc.bp_id_tenant = hbm.bp_id) bp_name,
t.session_id,
t.overdue_max_days,
f.times,
to_char(t.calc_date,'yyyy-mm-dd') calc_date,
to_char(f.due_date,'yyyy-mm-dd') due_date,
nvl(t.f_overdue_amount,0) f_overdue_amount,
nvl(t.f_overdue_penalty_amt,0) f_overdue_penalty_amt,
nvl(t.overdue_principal, 0) overdue_principal,
nvl(t.overdue_interest, 0) overdue_interest,
nvl(t.overdue_amount, 0) overdue_amount,
nvl(t.overdue_penalty_amt, 0) overdue_penalty_amt,
nvl(t.f_overdue_amount, 0) due_rental_deposit,
(select nvl(sum(cwo.write_off_due_amount),0)
from csh_transaction ctr, csh_write_off cwo
where cwo.contract_id = t.contract_id
AND cwo.cashflow_id = t.cashflow_id
AND cwo.csh_transaction_id = ctr.transaction_id
and ctr.transaction_type = 'DEPOSIT') received_rental_deposit
from CUS_DEPOSIT_CALC_OVERDUE_TMP t,
CON_CONTRACT CC,
con_contract_cashflow f
where t.cashflow_id = f.cashflow_id
and f.contract_id = cc.contract_id
and t.contract_id = cc.contract_id
and cc.data_class = 'NORMAL')v1
order by v1.contract_number,v1.times)v
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="v.contract_number like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_id_agent_level1" queryExpression="v.bp_id_agent_level1 = ${@bp_id_agent_level1}"/>
<bm:query-field name="bp_id_tenant" queryExpression="v.bp_id_tenant =${@bp_id_tenant}"/>
<bm:query-field name="overdue_max_days_from" queryExpression="v.overdue_max_days &lt;= ${@overdue_max_days_from}"/>
<bm:query-field name="overdue_max_days_to" queryExpression="v.overdue_max_days &gt;= ${@overdue_max_days_to}"/>
<bm:query-field name="due_date_from" queryExpression="v.due_date &lt;= ${@due_date_from}"/>
<bm:query-field name="due_date_to" queryExpression="v.due_date &gt;= ${@due_date_to}"/>
</bm:query-fields>
<!-- <bm:data-filters>-->
<!-- <bm:data-filter name="session_id" expression="${/session/@session_id}"/>-->
<!-- </bm:data-filters>-->
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-24 上午10:17:59
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
aux_single_variable_calc_pkg.calc_real_rate(p_calc_session_id =>${@calc_session_id},
p_user_id => ${/session/@user_id},
p_msg => ${@msg});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="msg" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@msg"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
aux_single_variable_calc_pkg.manual_trial_after_calc(p_calc_session_id =>${@calc_session_id},
p_user_id => ${/session/@user_id},
p_msg => ${@msg});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="msg" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@msg"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
p_document_category=>${@document_category}, p_document_category=>${@document_category},
p_user_id =>${/session/@user_id} p_user_id =>${/session/@user_id}
); );
hls_fin_calculator_itfc_pkg.calculate( hls_fin_calculator_itfc_pkg.calculate(
p_calc_session_id=>${@calc_session_id}, p_calc_session_id=>${@calc_session_id},
p_recreate_H_formula=>${@recreate_H_formula}, p_recreate_H_formula=>${@recreate_H_formula},
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
<a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="execute"/> <a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="execute"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true); Ext.ux.Lightbox.register('a[ref=img]', true);
function lock_current_window() { function lock_current_window() {
...@@ -470,6 +472,50 @@ ...@@ -470,6 +472,50 @@
} }
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cashflow_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var record = $(ds_id).getCurrentRecord();
var price_list = record.get('price_list');
var calc_session_id = record.get('calc_session_id');
var parent_pk_value = record.get('contract_id');
var calc_type = '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR';
var maintain_type='QUERY'
if (calc_session_id) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
document_id: parent_pk_value,
price_list: price_list,
document_category: 'CONTRACT',
contract_status:record.get('contract_status'),
maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
dsId: cashflow_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: calc_type,
recreate_L_formula: 'N'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(cashflow_ds_id).query();
$(ds_id).query();
});
}
}
;
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view> </a:view>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
a:model-query model="basic.hls_sys_time_default_value" rootPath="sys_time_default_value_path"/>
<a:model-query
defaultWhereClause="v.code=&apos;CSH511_TRANSACTION_TYPE&apos; and v.code_value in (&apos;PAYMENT&apos;,&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;,&apos;DEPOSIT&apos;)"
fetchAll="true" model="basic.sys_code_default_value" rootPath="transaction_type"/>
</a:init-procedure>
<a:view>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_transaction_receipt_return_maintain_link"
url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_receipt_detail_query.lview"/>
<a:link id="csh_transaction_returned_detail_link"
url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_returned_detail_query.lview"/>
<a:link id="csh_write_off_detail_link"
url="${/request/@context_path}/modules/csh/CSH311/csh_advances_transaction_receipt_write_off_detail_query.lview"/>
<a:link id="csh_write_off_detail_link1"
url="${/request/@context_path}/modules/csh/CSH311/csh_transaction_write_off_detail1.lview"/>
<a:link id="csh_transaction_returned_list_link"
url="${/request/@context_path}/modules/csh/CSH515/csh_transaction_returned_list.lview"/>
<a:link id="csh_transaction_payment_detail_link"
url="${/request/@context_path}/modules/csh/CSH301/csh_payment_req_pay_detail.lview"/>
<a:link id="get_xml" model="csh.CSH311.csh_tranction_Initiate_case" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
// 退出按钮
function cus_deposit100_back() {
$('cus_deposit100_detail_link_winid').close();
}
// 冲抵租金反冲
function cus_deposit100_reverse() {
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_transaction_query_ds" autoCreate="true" model="csh.CSH301.get_sum_transaction_amount">
<a:fields>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id"/>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_result_ds" autoPageSize="true" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT100.csh_transaction_query" queryDataSet="csh_transaction_query_ds"
selectable="true" selectionModel="single"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="cus_deposit100_back" text="HLS.BACK"/>
</a:screenTopToolbar>
<a:fieldSet title="保证金信息">
<a:form bindTarget="csh_transaction_query_ds" column="4" labelWidth="130" marginWidth="80">
<a:textField name="agent_name" bindTarget="csh_transaction_query_ds" prompt="代理店"/>
<a:textField name="bp_name" bindTarget="csh_transaction_query_ds" prompt="承租人"/>
<a:textField name="contract_number" bindTarget="csh_transaction_query_ds" prompt="合同编号"/>
<a:textField name="times" bindTarget="csh_transaction_query_ds" prompt="期数"/>
<a:textField name="balance" bindTarget="csh_transaction_query_ds" prompt="保证金剩余余额"/>
</a:form>
</a:fieldSet>
<a:fieldSet title="保证金来源">
<a:grid id="csh_transaction_grid_ds" bindTarget="csh_transaction_result_ds" marginHeight="295" marginWidth="80" navBar="true">
<a:toolBar>
<a:button prompt="冲抵租金反冲" click="" id="cus_deposit100_reverse"/>
</a:toolBar>
<a:columns>
<a:column name="transaction_number" prompt="现金事务编号" width="100"/>
<a:column name="transaction_number" prompt="来源方式" width="100"/>
<a:column name="agent_name" prompt="来源合同/期数" width="100"/>
<a:column name="contract_number" prompt="来源金额" width="100"/>
<a:column name="bp_name" prompt="已使用金额" width="100"/>
<a:column name="times" prompt="剩余金额" width="100"/>
<a:column name="transaction_date" prompt="操作时间" width="100" renderer="Leaf.formatDate"/>
</a:columns>
</a:grid>
</a:fieldSet>
<a:fieldSet title="保证金用途">
<a:grid id="csh_transaction_grid_ds" bindTarget="csh_transaction_result_ds" marginHeight="295" marginWidth="80" navBar="true">
<a:columns>
<a:column name="transaction_number" prompt="现金事务编号" width="100"/>
<a:column name="transaction_number" prompt="用途方式" width="100"/>
<a:column name="agent_name" prompt="去向合同/期数" width="100"/>
<a:column name="bp_name" prompt="使用金额" width="100"/>
<a:column name="transaction_date" prompt="操作时间" width="100" renderer="Leaf.formatDate"/>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
a:model-query model="basic.hls_sys_time_default_value" rootPath="sys_time_default_value_path"/>
<a:model-query
defaultWhereClause="v.code=&apos;CSH511_TRANSACTION_TYPE&apos; and v.code_value in (&apos;PAYMENT&apos;,&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;,&apos;DEPOSIT&apos;)"
fetchAll="true" model="basic.sys_code_default_value" rootPath="transaction_type"/>
</a:init-procedure>
<a:view>
<a:link id="cus_deposit100_detail_link"
url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_detail.lview"/>
<script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
}
return true; //校验通过返回true
}
}
function compareDate(start, end) {
if (start > end) {
return false;
}
return true;
}
function csh510_receipt_query() {
var record = $('csh_transaction_query_ds').getAt(0);
var dirty_flag = 'N';
for (var name in record.data) {
var value = record.get(name);
if (value != 'undefined' && value != null && value != '') {
dirty_flag = 'Y';
}
}
if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () {
return;
}, function () {
$('csh_transaction_result_ds').query();
}, null, null);
} else {
$('csh_transaction_result_ds').query();
}
}
function csh510_receipt_reset() {
$('csh_transaction_query_ds').reset();
}
function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) {
var url;
if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') != 'RETURN') {
url = $('csh_transaction_receipt_return_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} else if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') == 'RETURN') {
url = $('csh_transaction_returned_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return '<a href="javascript:RETURN_openWindow(\'' + url + '\');">' + value + '</a>';
} else if (record.get('transaction_type') == 'PAYMENT') {
url = $('csh_transaction_payment_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return '<a href="javascript:payment_openWindow(\'' + url + '\');">' + value + '</a>';
} else {
return value;
}
}
}
function openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
},
url: url,
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
}
function RETURN_openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_returned_detail_link_winid',
params: {
winId: 'csh_transaction_returned_detail_link_winid'
},
url: url,
title: '${l:CSH515.CSH_REFUND_DETAILS}',
fullScreen: true
});
}
function payment_openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_payment_link_winid',
params: {
winId: 'csh_transaction_payment_link_winid'
},
url: url,
title: '付款明细',
fullScreen: true
});
}
function seedetail_write_off1(value, record, name) {
var url;
url = $('cus_deposit100_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type');
var return_value = value || 0;
return '<a href="javascript:openWindow_writeoff1(\'' + url + '\');">' + Leaf.formatMoney(return_value) + '</a>';
}
function openWindow_writeoff1(url) {
new Leaf.Window({
id: 'cus_deposit100_detail_link_winid',
params: {
winId: 'cus_deposit100_detail_link_winid'
},
url: url,
title: '${l:CSH301.CSH_WRITE_OFF_DETAIL}',
fullScreen: true
});
}
function summaryRenderer(datas, name) {
var sum = 0;
var sum1 = 0;
var sum2 = 0;
var sum3 = 0;
if (name == "transaction_date") {
return '<font color="red">合计:</font>';
}
if (name == "transaction_amount") {
for (var i = 0; i < datas.length; i++) {
var record = datas[i];
var payment_amount_vl = record.get("transaction_amount");
var payment_amount = parseFloat(payment_amount_vl);
if (!isNaN(payment_amount)) {
sum += payment_amount;
}
}
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
}
if (name == "returned_amount") {
for (var j = 0; j < datas.length; j++) {
var record1 = datas[j];
var payment_amount_vl1 = record1.get("returned_amount");
var payment_amount1 = parseFloat(payment_amount_vl1);
if (!isNaN(payment_amount1)) {
sum1 += payment_amount1;
}
}
return '<font color="red">' + Leaf.formatNumber(sum1, 2) + '</font>';
}
if (name == "write_off_amount") {
for (var k = 0; k < datas.length; k++) {
var record2 = datas[k];
var payment_amount_vl2 = record2.get("write_off_amount");
var payment_amount2 = parseFloat(payment_amount_vl2);
if (!isNaN(payment_amount2)) {
sum2 += payment_amount2;
}
}
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
}
if (name == "unwrite_off_amount") {
for (var l = 0; l < datas.length; l++) {
var record3 = datas[l];
var payment_amount_vl3 = record3.get("unwrite_off_amount");
var payment_amount3 = parseFloat(payment_amount_vl3);
if (!isNaN(payment_amount3)) {
sum3 += payment_amount3;
}
}
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
}
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_transaction_query_ds" autoCreate="true" model="csh.CSH301.get_sum_transaction_amount">
<a:fields>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id"/>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_result_ds" autoPageSize="true" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT100.csh_transaction_query" queryDataSet="csh_transaction_query_ds"
selectable="true" selectionModel="single"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="" text="保证金入账"/>
<a:gridButton click="" text="保证金划转"/>
<a:gridButton click="" text="保证金冲抵"/>
<a:gridButton click="" text="保证金退款"/>
<a:gridButton click="cus_deposit100_query" text="HLS.QUERY"/>
<a:gridButton click="cus_deposit100_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_query_ds" column="4" labelWidth="130" marginWidth="80" title="逾期合同查询">
<a:lov name="agent_name" bindTarget="csh_transaction_query_ds" prompt="代理店"/>
<a:lov name="contract_number" bindTarget="csh_transaction_query_ds" prompt="合同编号"/>
<a:lov name="bp_name" bindTarget="csh_transaction_query_ds" prompt="承租人"/>
<a:datePicker name="transaction_date_from" bindTarget="csh_transaction_query_ds" prompt="HLS.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_query_ds" prompt="HLS.TRANSACTION_DATE_TO"/>
<a:comboBox name="" bindTarget="csh_transaction_query_ds" prompt="单据状态"/>
</a:form>
<a:grid id="csh_transaction_grid_ds" bindTarget="csh_transaction_result_ds" marginHeight="295" marginWidth="80" navBar="true">
<a:toolBar>
<a:button prompt="PROMPT.EXPORT_EXCEL" type="excel"/>
</a:toolBar>
<a:columns>
<a:column name="agent_name" prompt="代理店" width="100"/>
<a:column name="contract_number" prompt="合同编号" width="100"/>
<a:column name="bp_name" prompt="承租人" width="100"/>
<a:column name="times" prompt="期数" width="100"/>
<a:column name="transaction_date" prompt="到期日" width="100" renderer="Leaf.formatDate" footerRenderer="summaryRenderer"/>
<a:column prompt="会计">
<a:column name="" prompt="逾期本金" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="逾期利息" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="逾期租金" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="逾期违约金" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
</a:column>
<a:column prompt="营业">
<a:column name="" prompt="逾期本金" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="逾期利息" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="逾期租金" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="逾期违约金" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
</a:column><!-- renderer="seedetail_balance"-->
<a:column name="balance" prompt="保证金余额" align="right" width="100" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="" prompt="单据状态" align="right" width="100"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
a:model-query model="basic.hls_sys_time_default_value" rootPath="sys_time_default_value_path"/>
<a:model-query
defaultWhereClause="v.code=&apos;CSH511_TRANSACTION_TYPE&apos; and v.code_value in (&apos;PAYMENT&apos;,&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;,&apos;DEPOSIT&apos;)"
fetchAll="true" model="basic.sys_code_default_value" rootPath="transaction_type"/>
</a:init-procedure>
<a:view>
<a:link id="cus_deposit100_detail_link"
url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT100/cus_deposit_detail.lview"/>
<script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
}
return true; //校验通过返回true
}
}
function compareDate(start, end) {
if (start > end) {
return false;
}
return true;
}
function csh510_receipt_query() {
var record = $('csh_transaction_query_ds').getAt(0);
var dirty_flag = 'N';
for (var name in record.data) {
var value = record.get(name);
if (value != 'undefined' && value != null && value != '') {
dirty_flag = 'Y';
}
}
if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () {
return;
}, function () {
$('csh_transaction_result_ds').query();
}, null, null);
} else {
$('csh_transaction_result_ds').query();
}
}
function csh510_receipt_reset() {
$('csh_transaction_query_ds').reset();
}
function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) {
var url;
if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') != 'RETURN') {
url = $('csh_transaction_receipt_return_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} else if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') == 'RETURN') {
url = $('csh_transaction_returned_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return '<a href="javascript:RETURN_openWindow(\'' + url + '\');">' + value + '</a>';
} else if (record.get('transaction_type') == 'PAYMENT') {
url = $('csh_transaction_payment_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
return '<a href="javascript:payment_openWindow(\'' + url + '\');">' + value + '</a>';
} else {
return value;
}
}
}
function openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
},
url: url,
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
}
function RETURN_openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_returned_detail_link_winid',
params: {
winId: 'csh_transaction_returned_detail_link_winid'
},
url: url,
title: '${l:CSH515.CSH_REFUND_DETAILS}',
fullScreen: true
});
}
function payment_openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_payment_link_winid',
params: {
winId: 'csh_transaction_payment_link_winid'
},
url: url,
title: '付款明细',
fullScreen: true
});
}
function seedetail_write_off1(value, record, name) {
var url;
url = $('cus_deposit100_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type');
var return_value = value || 0;
return '<a href="javascript:openWindow_writeoff1(\'' + url + '\');">' + Leaf.formatMoney(return_value) + '</a>';
}
function openWindow_writeoff1(url) {
new Leaf.Window({
id: 'cus_deposit100_detail_link_winid',
params: {
winId: 'cus_deposit100_detail_link_winid'
},
url: url,
title: '${l:CSH301.CSH_WRITE_OFF_DETAIL}',
fullScreen: true
});
}
function summaryRenderer(datas, name) {
var sum = 0;
var sum1 = 0;
var sum2 = 0;
var sum3 = 0;
if (name == "transaction_date") {
return '<font color="red">合计:</font>';
}
if (name == "transaction_amount") {
for (var i = 0; i < datas.length; i++) {
var record = datas[i];
var payment_amount_vl = record.get("transaction_amount");
var payment_amount = parseFloat(payment_amount_vl);
if (!isNaN(payment_amount)) {
sum += payment_amount;
}
}
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
}
if (name == "returned_amount") {
for (var j = 0; j < datas.length; j++) {
var record1 = datas[j];
var payment_amount_vl1 = record1.get("returned_amount");
var payment_amount1 = parseFloat(payment_amount_vl1);
if (!isNaN(payment_amount1)) {
sum1 += payment_amount1;
}
}
return '<font color="red">' + Leaf.formatNumber(sum1, 2) + '</font>';
}
if (name == "write_off_amount") {
for (var k = 0; k < datas.length; k++) {
var record2 = datas[k];
var payment_amount_vl2 = record2.get("write_off_amount");
var payment_amount2 = parseFloat(payment_amount_vl2);
if (!isNaN(payment_amount2)) {
sum2 += payment_amount2;
}
}
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
}
if (name == "unwrite_off_amount") {
for (var l = 0; l < datas.length; l++) {
var record3 = datas[l];
var payment_amount_vl3 = record3.get("unwrite_off_amount");
var payment_amount3 = parseFloat(payment_amount_vl3);
if (!isNaN(payment_amount3)) {
sum3 += payment_amount3;
}
}
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
}
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_transaction_query_ds" autoCreate="true" model="csh.CSH301.get_sum_transaction_amount">
<a:fields>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id"/>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_result_ds" autoPageSize="true" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT100.csh_transaction_query" queryDataSet="csh_transaction_query_ds"
selectable="true" selectionModel="single"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="" text="确认"/>
<a:gridButton click="cus_deposit110_query" text="HLS.QUERY"/>
<a:gridButton click="cus_deposit110_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:fieldSet title="查询条件">
<a:form bindTarget="csh_transaction_query_ds" column="4" labelWidth="130" marginWidth="80">
<a:lov name="agent_name" bindTarget="csh_transaction_query_ds" prompt="代理店"/>
<a:lov name="contract_number" bindTarget="csh_transaction_query_ds" prompt="合同编号"/>
<a:lov name="bp_name" bindTarget="csh_transaction_query_ds" prompt="承租人"/>
<a:datePicker name="transaction_date_from" bindTarget="csh_transaction_query_ds" prompt="HLS.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_query_ds" prompt="HLS.TRANSACTION_DATE_TO"/>
<a:comboBox name="" bindTarget="csh_transaction_query_ds" prompt="单据状态"/>
</a:form>
</a:fieldSet>
<a:fieldSet title="收款单">
<a:grid id="csh_transaction_grid_ds" bindTarget="csh_transaction_result_ds" marginHeight="295" marginWidth="80" navBar="true">
<a:columns>
<a:column name="transaction_number" prompt="现金事务编号" width="100"/>
<a:column name="" prompt="收款类型" width="100"/>
<a:column name="balance" prompt="收款金额" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="transaction_date" prompt="收款日期" width="100" renderer="Leaf.formatDate"/>
<a:column name="balance" prompt="退款金额" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="balance" prompt="已用金额" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="balance" prompt="可用金额" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="balance" prompt="款项类型" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="" prompt="商业伙伴" align="right" width="100"/>
<a:column prompt="我方账户">
<a:column name="" prompt="户名" align="left" width="100"/>
<a:column name="" prompt="银行" align="left" width="100"/>
<a:column name="" prompt="账号" align="left" width="100"/>
</a:column>
<a:column prompt="对方账户">
<a:column name="" prompt="户名" align="left" width="100"/>
<a:column name="" prompt="银行" align="left" width="100"/>
<a:column name="" prompt="账号" align="left" width="100"/>
</a:column>
<a:column name="" prompt="单据状态" align="right" width="100"/>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure/>
<a:view>
<script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
}
return true; //校验通过返回true
}
}
function compareDate(start, end) {
if (start > end) {
return false;
}
return true;
}
function cus_deposit120_query() {
$('cus_deposit120_result_ds').query();
}
function cus_deposit120_reset() {
$('cus_deposit120_query_ds').reset();
}
function cus_deposit120_calc_overdue() {
$('cus_deposit120_calc_btn').disable();
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
var record = $('cus_deposit120_calc_overdue_date_ds').getAt(0);
var calc_overdue_date = record.get('calc_overdue_date');
if(calc_overdue_date){
Leaf.request({
url:"${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT120.cus_deposit_calc_overdue_list/execute",
para:{calc_overdue_date:calc_overdue_date},
scope:this,
success:function (res) {
$('cus_deposit120_calc_btn').enable();
Leaf.Masker.unmask(Ext.getBody()); //解锁
if (res.success) {
cus_deposit120_query();
}
},
failure: function() {
$('cus_deposit120_calc_btn').enable();
Leaf.Masker.unmask(Ext.getBody()); //解锁
},
error: function() {
$('cus_deposit120_calc_btn').enable();
Leaf.Masker.unmask(Ext.getBody()); //解锁
}
});
}else{
$('cus_deposit120_calc_btn').enable();
Leaf.Masker.unmask(Ext.getBody()); //解锁
Leaf.showMessage('${l:HLS.PROMPT}', '请先维护罚息测算日!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="cus_deposit120_query_ds">
<a:fields>
<a:field name="agent_name" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov?bp_category=AGENT" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_agent_level1"/>
<a:map from="bp_name" to="agent_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id_agent_level1"/>
<a:field name="bp_id_tenant_name" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_tenant"/>
<a:map from="bp_name" to="bp_id_tenant_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id_tenant"/>
<a:field name="due_date_from"/>
<a:field name="due_date_to"/>
</a:fields>
</a:dataSet>
<a:dataSet id="cus_deposit120_calc_overdue_date_ds" autoCreate="true">
<a:fields>
<a:field name="calc_overdue_date"/>
</a:fields>
</a:dataSet>
<a:dataSet id="cus_deposit120_result_ds" autoPageSize="true" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT120.cus_deposit_calc_overdue_list_query" queryDataSet="cus_deposit120_query_ds"
selectable="true" selectionModel="single"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton id="cus_deposit120_calc_btn" click="cus_deposit120_calc_overdue" text="罚息测算"/>
<a:gridButton click="cus_deposit120_query" text="HLS.QUERY"/>
<a:gridButton click="cus_deposit120_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form bindTarget="cus_deposit120_query_ds" column="4" labelWidth="130" marginWidth="80" title="逾期合同查询">
<a:lov name="agent_name" bindTarget="cus_deposit120_query_ds" prompt="代理店"/>
<a:textField name="contract_number" bindTarget="cus_deposit120_query_ds" prompt="合同编号"/>
<a:lov name="bp_id_tenant_name" bindTarget="cus_deposit120_query_ds" prompt="承租人"/>
<a:numberField name="overdue_max_days_from" allowDecimals="false" allowNegative="false" bindTarget="cus_deposit120_query_ds" prompt="合同逾期天数从"/>
<a:numberField name="overdue_max_days_to" allowDecimals="false" allowNegative="false" bindTarget="cus_deposit120_query_ds" prompt="合同逾期天数到"/>
<a:datePicker name="due_date_from" bindTarget="cus_deposit120_query_ds" prompt="HLS.TRANSACTION_DATE_FROM"/>
<a:datePicker name="due_date_to" bindTarget="cus_deposit120_query_ds" prompt="HLS.TRANSACTION_DATE_TO"/>
</a:form>
<a:fieldSet title="罚息测算">
<a:datePicker name="calc_overdue_date" bindTarget="cus_deposit120_calc_overdue_date_ds" prompt="罚息测算日"/>
</a:fieldSet>
<a:grid id="cus_deposit120_grid_ds" bindTarget="cus_deposit120_result_ds" marginHeight="295" marginWidth="80" navBar="true">
<a:toolBar>
<a:button prompt="PROMPT.EXPORT_EXCEL" type="excel"/>
</a:toolBar>
<a:columns>
<a:column name="agent_name" prompt="代理店" width="120"/>
<a:column name="contract_number" prompt="合同编号" width="100"/>
<a:column name="bp_name" prompt="承租人" width="100"/>
<a:column name="overdue_max_days" prompt="合同逾期天数" width="80"/>
<a:column name="times" prompt="期数" width="40"/>
<a:column name="calc_date" prompt="罚息测算日" width="100" renderer="Leaf.formatDate"/>
<a:column name="due_date" prompt="到期日" width="100" renderer="Leaf.formatDate"/>
<a:column prompt="会计">
<!-- <a:column name="" prompt="逾期本金" align="right" width="100" renderer="Leaf.formatMoney"/>-->
<!-- <a:column name="" prompt="逾期利息" align="right" width="100" renderer="Leaf.formatMoney"/>-->
<a:column name="f_overdue_amount" prompt="逾期租金" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="f_overdue_penalty_amt" prompt="逾期违约金" align="right" width="100" renderer="Leaf.formatMoney"/>
</a:column>
<a:column prompt="营业">
<a:column name="overdue_principal" prompt="逾期本金" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="overdue_interest" prompt="逾期利息" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="overdue_amount" prompt="逾期租金" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="overdue_penalty_amt" prompt="逾期违约金" align="right" width="100" renderer="Leaf.formatMoney"/>
</a:column>
<a:column prompt="租金保证金">
<a:column name="due_rental_deposit" prompt="应垫" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="received_rental_deposit" prompt="已垫" align="right" width="100" renderer="Leaf.formatMoney"/>
<a:column name="undue_rental_deposit" prompt="未垫" align="right" width="100" renderer="Leaf.formatMoney"/>
</a:column>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
<a:link id="hls_fin_calc_import_line_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_import_line.lview"/> <a:link id="hls_fin_calc_import_line_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_import_line.lview"/>
<a:link id="hls_fin_calc_show_display_line_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_show_display_line_n.lview"/> <a:link id="hls_fin_calc_show_display_line_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_show_display_line_n.lview"/>
<a:link id="prj_check_prj_record_link_id" model="hls.HLS500N.check_prj_record" modelaction="execute"/> <a:link id="prj_check_prj_record_link_id" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<a:link id="hls_fin_calc_single_variable_calc_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="update"/>
<a:link id="hls_fin_calc_single_variable_manual_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="execute"/>
<style><![CDATA[ <style><![CDATA[
.finGrid td[dataindex=percent]{ .finGrid td[dataindex=percent]{
border-right-color:#FFF; border-right-color:#FFF;
...@@ -78,7 +79,8 @@ ...@@ -78,7 +79,8 @@
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}'); Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_save(nextStep, source_procedure) { function hls_hls500_save(nextStep, source_procedure) {
lock_calc_current_window('${l:HLS.SAVING}');
if('${/parameter/@document_category}'=='PROJECT'){
Leaf.request({ Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(), url: $('prj_check_prj_record_link_id').getUrl(),
para: { para: {
...@@ -113,8 +115,7 @@ ...@@ -113,8 +115,7 @@
if(record[i].get('column_code')=='H109') { if(record[i].get('column_code')=='H109') {
record[i].set('column_value',0); record[i].set('column_value',0);
record[i].set('column_value_c',0); record[i].set('column_value_c',0);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id); var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);console.log(a);
console.log(a);
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0; document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0;
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=0; document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=0;
} }
...@@ -137,7 +138,20 @@ ...@@ -137,7 +138,20 @@
} }
lock_calc_current_window('${l:HLS.SAVING}');
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) { if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window(); unlock_calc_current_window();
return; return;
...@@ -171,15 +185,7 @@ ...@@ -171,15 +185,7 @@
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess); $('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false; Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit(); $('hls_fin_cal_save_hd_ds').submit();
},
failure: function() {
},
error: function() {
},
scope: this
});
} }
...@@ -783,6 +789,27 @@ ...@@ -783,6 +789,27 @@
function onEditorHdload(ds) { function onEditorHdload(ds) {
var headRecords = ds.getAll(); var headRecords = ds.getAll();
if('${/parameter/@document_category}'=='CONTRACT'&&'${/parameter/@contract_status}'=='SIGN'){
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name !="lease_start_date"&&column_name !="contract_inception_date"){
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
}else if('${/parameter/@document_category}'=='CONTRACT'&&'${/parameter/@contract_status}'!='SIGN'){
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
if (headRecords[0].get('show_column_code') == 'N') { if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code'); $('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code'); $('hls_fin_calculator_export_grid_id').hideColumn('column_code');
...@@ -1171,6 +1198,54 @@ ...@@ -1171,6 +1198,54 @@
return ''; return '';
} }
} }
//add by syj 单变量求解
function hls_hls500_user_button1() {
flag = 'Y';
lock_calc_current_window();
Leaf.request({
url: $('hls_fin_calc_single_variable_calc_link_id').getUrl(),
para: {
calc_session_id: '${/parameter/@calc_session_id}'
},
success: function() {
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
function hls_hls500_user_button2() {
flag = 'Y';
lock_calc_current_window();
Leaf.request({
url: $('hls_fin_calc_single_variable_manual_link_id').getUrl(),
para: {
calc_session_id: '${/parameter/@calc_session_id}'
},
success: function() {
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:placeHolder id="dynamicDataSet_left_id"/> <a:placeHolder id="dynamicDataSet_left_id"/>
...@@ -1389,6 +1464,16 @@ ...@@ -1389,6 +1464,16 @@
<a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/> <a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config> </c:process-config>
</p:case> </p:case>
<p:case value="USER_BUTTON1">
<c:process-config>
<a:gridButton id="hls_hls500_user_button1_col_id" click="hls_hls500_user_button1" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="USER_BUTTON2">
<c:process-config>
<a:gridButton id="hls_hls500_user_button2_col_id" click="hls_hls500_user_button2" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="*"> <p:case value="*">
<c:process-config> <c:process-config>
<a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/> <a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
......
...@@ -234,7 +234,6 @@ ...@@ -234,7 +234,6 @@
draggable: true draggable: true
}); });
win.on('close', function () { win.on('close', function () {
debugger;
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query(); $(history_ds_id).query();
}); });
...@@ -285,7 +284,6 @@ ...@@ -285,7 +284,6 @@
draggable: true draggable: true
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query(); $(history_ds_id).query();
......
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