Commit 8ead9284 authored by stone's avatar stone

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

parents e2d04fff 5c063124
...@@ -218,6 +218,22 @@ create or replace package body cus_con_deposit_pkg is ...@@ -218,6 +218,22 @@ create or replace package body cus_con_deposit_pkg is
values v_deposit_calc_overdue_tmp_rec; values v_deposit_calc_overdue_tmp_rec;
end if; end if;
end if; end if;
--计算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,
f_overdue_amount = overdue_amount,
f_overdue_penalty_amt = v_total_penalty_amt
where calc_id = v_deposit_calc_overdue_tmp_rec.calc_id;
end if;
--计算会计逾期数据,取会计核销的最大期与营业现金流数据比较 --计算会计逾期数据,取会计核销的最大期与营业现金流数据比较
for c_f in (select gwo.cf_item, for c_f in (select gwo.cf_item,
gwo.times, gwo.times,
...@@ -225,14 +241,14 @@ create or replace package body cus_con_deposit_pkg is ...@@ -225,14 +241,14 @@ create or replace package body cus_con_deposit_pkg is
gwo.penalty_calc_date gwo.penalty_calc_date
from GLD_WRITE_OFF gwo from GLD_WRITE_OFF gwo
where /*gwo.create_je_flag = 'Y' where /*gwo.create_je_flag = 'Y'
AND */ AND */
gwo.reversed_flag = 'N' gwo.reversed_flag = 'N'
and gwo.contract_id = p_contract_rec.contract_id and gwo.contract_id = p_contract_rec.contract_id
and gwo.times = and gwo.times =
(select max(gwo.times) max_times (select max(gwo.times) max_times
from GLD_WRITE_OFF gwo from GLD_WRITE_OFF gwo
where /*gwo.create_je_flag = 'Y' where /*gwo.create_je_flag = 'Y'
AND */ AND */
gwo.reversed_flag = 'N' gwo.reversed_flag = 'N'
and gwo.contract_id = p_contract_rec.contract_id) and gwo.contract_id = p_contract_rec.contract_id)
group by gwo.cf_item, gwo.times, gwo.penalty_calc_date) loop group by gwo.cf_item, gwo.times, gwo.penalty_calc_date) loop
...@@ -287,18 +303,6 @@ create or replace package body cus_con_deposit_pkg is ...@@ -287,18 +303,6 @@ create or replace package body cus_con_deposit_pkg is
and t.session_id = p_session_id; and t.session_id = p_session_id;
end if; end if;
end loop; 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; end;
procedure overdue_dayend(p_contract_id number, procedure overdue_dayend(p_contract_id number,
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/>
<bm:field name="division_n"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -52,9 +55,10 @@ ...@@ -52,9 +55,10 @@
<bm:query-field field="owner_user_id" queryOperator="="/> <bm:query-field field="owner_user_id" queryOperator="="/>
<bm:query-field field="bp_id_tenant" queryOperator="="/> <bm:query-field field="bp_id_tenant" queryOperator="="/>
<bm:query-field field="lease_organization" queryOperator="="/> <bm:query-field field="lease_organization" queryOperator="="/>
<bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/> <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;TERMINATE&apos;) "/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> --> <!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/> <bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;NOT&apos;) OR received_amount != due_amount))"/>--> <!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;NOT&apos;) OR received_amount != due_amount))"/>-->
......
...@@ -8,18 +8,26 @@ ...@@ -8,18 +8,26 @@
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_UNEARNED_FINANCE_INCOME"> <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_UNEARNED_FINANCE_INCOME">
<bm:fields> <bm:fields>
<bm:field name="seq" databaseType="NUMBER" datatype="java.lang.Long" expression="(row_number() over(order by t1.contract_id))"/> <bm:field name="seq" databaseType="NUMBER" datatype="java.lang.Long" expression="(row_number() over(order by t1.contract_id))"/>
<bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="int_rate_implicit" databaseType="NUMBER" datatype="java.lang.Double" expression="round((select nvl(c.int_rate,c.annual_mean_rate) from con_contract c where c.contract_id = t1.contract_id),4)" forInsert="false" forUpdate="false"/>
<bm:field name="calc_period" databaseType="VARCHAR2" datatype="java.lang.String" expression="(to_char(t1.calc_start_date,&apos;yyyy/mm/dd&apos;)||&apos;-&apos;||to_char(t1.calc_end_date,&apos;yyyy/mm/dd&apos;))" forInsert="false" forUpdate="false"/>
<bm:field name="calc_date_count" databaseType="NUMBER" datatype="java.lang.Long" expression="(t1.calc_end_date-t1.calc_start_date+1)" forInsert="false" forUpdate="false"/>
<bm:field name="vat_unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/>
<bm:field name="unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UNEARNED_FINANCE_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME"/>
<bm:field name="finance_income_recognized" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_INCOME_RECOGNIZED" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCE_INCOME_RECOGNIZED"/>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="CON_UNEARNED_FINANCE_INCOME.RECORD_ID"/> <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="CON_UNEARNED_FINANCE_INCOME.RECORD_ID"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_UNEARNED_FINANCE_INCOME.COMPANY_ID"/> <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_UNEARNED_FINANCE_INCOME.COMPANY_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CONTRACT_ID"/> <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CONTRACT_ID"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CON_UNEARNED_FINANCE_INCOME.INTERNAL_PERIOD_NUM"/>
<bm:field name="net_unearned_finance_income" expression="(t1.unearned_finance_income * (select decode(t.tax_type_id, 1, 1, 1 + (select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)-t1.unearned_finance_income)" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CON_UNEARNED_FINANCE_INCOME.INTERNAL_PERIOD_NUM"/>
<bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="CON_UNEARNED_FINANCE_INCOME.CF_ITEM"/> <bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="CON_UNEARNED_FINANCE_INCOME.CF_ITEM"/>
<bm:field name="seq_in_period" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_IN_PERIOD" prompt="CON_UNEARNED_FINANCE_INCOME.SEQ_IN_PERIOD"/> <bm:field name="seq_in_period" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_IN_PERIOD" prompt="CON_UNEARNED_FINANCE_INCOME.SEQ_IN_PERIOD"/>
<bm:field name="unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UNEARNED_FINANCE_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME"/>
<bm:field name="financing_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FINANCING_COST" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCING_COST"/> <bm:field name="financing_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FINANCING_COST" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCING_COST"/>
<bm:field name="main_business_income" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_INCOME"/> <bm:field name="main_business_income" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_INCOME"/>
<bm:field name="main_business_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_COST" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_COST"/> <bm:field name="main_business_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_COST" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_COST"/>
<bm:field name="unearned_finance_income_balanc" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNEARNED_FINANCE_INCOME_BALANC" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME_BALANC"/> <bm:field name="unearned_finance_income_balanc" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNEARNED_FINANCE_INCOME_BALANC" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME_BALANC"/>
<bm:field name="finance_income_recognized" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_INCOME_RECOGNIZED" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCE_INCOME_RECOGNIZED"/>
<bm:field name="weight_factor" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WEIGHT_FACTOR" prompt="CON_UNEARNED_FINANCE_INCOME.WEIGHT_FACTOR"/> <bm:field name="weight_factor" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WEIGHT_FACTOR" prompt="CON_UNEARNED_FINANCE_INCOME.WEIGHT_FACTOR"/>
<bm:field name="total_weight" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_WEIGHT" prompt="CON_UNEARNED_FINANCE_INCOME.TOTAL_WEIGHT"/> <bm:field name="total_weight" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_WEIGHT" prompt="CON_UNEARNED_FINANCE_INCOME.TOTAL_WEIGHT"/>
<bm:field name="factor_days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FACTOR_DAYS" prompt="CON_UNEARNED_FINANCE_INCOME.FACTOR_DAYS"/> <bm:field name="factor_days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FACTOR_DAYS" prompt="CON_UNEARNED_FINANCE_INCOME.FACTOR_DAYS"/>
...@@ -31,53 +39,18 @@ ...@@ -31,53 +39,18 @@
<bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CASHFLOW_ID"/> <bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CASHFLOW_ID"/>
<bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="CON_UNEARNED_FINANCE_INCOME.TIMES"/> <bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="CON_UNEARNED_FINANCE_INCOME.TIMES"/>
<bm:field name="cf_type" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_TYPE" prompt="CON_UNEARNED_FINANCE_INCOME.CF_TYPE"/> <bm:field name="cf_type" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_TYPE" prompt="CON_UNEARNED_FINANCE_INCOME.CF_TYPE"/>
<bm:field name="calc_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_START_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_START_DATE"/> <bm:field name="calc_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_START_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_START_DATE"/> -->
<bm:field name="calc_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_END_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_END_DATE"/> <!-- <bm:field name="calc_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_END_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_END_DATE"/> -->
<bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)" forInsert="false" forUpdate="false"/> <!-- <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)" forInsert="false" forUpdate="false"/> -->
<bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/> <!-- <bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((SELECT TO_CHAR(cf1.due_date + 1, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id )) || &apos;-&apos;||(SELECT TO_CHAR(cf.due_date, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))" forInsert="false" forUpdate="false"/> -->
<bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((SELECT TO_CHAR(cf1.due_date + 1, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id )) || &apos;-&apos; || (SELECT TO_CHAR(cf.due_date, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id) )" forInsert="false" forUpdate="false"/> <!-- <bm:field name="current_month_vat_income" databaseType="NUMBER" datatype="java.lang.Double" expression="ROUND((select sum(t.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num} ),(select c.PRECISION from gld_currency c,con_contract ct where c.currency_code = ct.currency and ct.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/> -->
<bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/> <!-- <bm:field name="current_month_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(select sum(t.unearned_finance_income) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num})" forInsert="false" forUpdate="false"/> -->
<bm:field name="int_rate_implicit" databaseType="NUMBER" datatype="java.lang.Double" expression="round((select c.int_rate from con_contract c where c.contract_id = t1.contract_id),4)" forInsert="false" forUpdate="false"/> <!-- <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/> -->
<bm:field name="calc_period" databaseType="VARCHAR2" datatype="java.lang.String" expression="(to_char(t1.calc_start_date,&apos;yyyy/mm/dd&apos;)||&apos;-&apos;||to_char(t1.calc_end_date,&apos;yyyy/mm/dd&apos;))" forInsert="false" forUpdate="false"/> <!-- <bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.search_term_1 from con_contract t where t.contract_id =t1.contract_id)" forInsert="false" forUpdate="false"/> -->
<bm:field name="calc_date_count" databaseType="NUMBER" datatype="java.lang.Long" expression="(t1.calc_end_date-t1.calc_start_date+1)" forInsert="false" forUpdate="false"/> <bm:field name="vat_interest" />
<bm:field name="vat_unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/>
<bm:field name="current_month_vat_income" databaseType="NUMBER" datatype="java.lang.Double" expression="ROUND((select sum(t.unearned_finance_income*(select decode(t.tax_type_id, 1, 1, 1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =t1.internal_period_num),(select c.PRECISION from gld_currency c,con_contract ct where c.currency_code = ct.currency and ct.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/>
<bm:field name="current_month_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(select sum(t.unearned_finance_income) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =t1.internal_period_num)" forInsert="false" forUpdate="false"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_number from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>
<bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>
<bm:field name="cf_item_desc" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.description from hls_cashflow_item t where t.cf_item =t1.cf_item )" forInsert="false" forUpdate="false"/>
<bm:field name="loan_contract_id" databaseType="NUMBER" datatype="java.lang.Long" />
<bm:field name="loan_contract_number" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.loan_contract_number from tre_loan_contract t,tre_loan_con_withdrawal_plan p where p.widthdrawal_plan_id =t1.contract_id and p.loan_contract_id = t.loan_contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="loan_amount" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.amount from tre_loan_con_withdrawal_plan p where p.widthdrawal_plan_id =t1.contract_id )" forInsert="false" forUpdate="false"/>
<bm:field name="full_received" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select CASE WHEN nvl(ccc.write_off_flag, &apos;NOT&apos;) = &apos;FULL&apos; THEN &apos;Y&apos; ELSE &apos;N&apos; END from con_contract_cashflow ccc where ccc.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="unearned_finance_income_all" databaseType="NUMBER" datatype="java.lang.Double" expression="((t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))+t1.unearned_finance_income)" forInsert="false" forUpdate="false"/>
<bm:field name="contract_overdue_90" databaseType="VARCHAR2" datatype="java.lang.String" expression="&apos;Y&apos;" forInsert="false" forUpdate="false"/>
<bm:field name="rental_overdue_90" databaseType="VARCHAR2" datatype="java.lang.String" expression="&apos;Y&apos;" forInsert="false" forUpdate="false"/>
<bm:field name="overdue_days" databaseType="VARCHAR2" datatype="java.lang.String" expression="
nvl((SELECT (add_months(to_date(${@internal_period_num},'yyyymm'),1)-1)- ccc.due_date
FROM con_contract_cashflow ccc
WHERE ccc.cf_item IN (1, 200)
AND ccc.due_amount - nvl(ccc.received_amount, 0) > 0
AND ccc.cashflow_id = t1.cashflow_id),0)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="rental_overdue_90" databaseType="VARCHAR2" datatype="java.lang.String" expression="(DECODE((SELECT COUNT(*) FROM con_contract_cashflow ccc WHERE ccc.cf_item IN (1, 200) AND nvl(ccc.received_amount, 0) &lt; ccc.due_amount AND ccc.due_date + 90 &lt;= trunc(SYSDATE) AND ccc.cashflow_id = t1.cashflow_id),0,&apos;N&apos;,&apos;Y&apos;))" forInsert="false" forUpdate="false"/>-->
<bm:field name="tre_unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(round(t1.unearned_finance_income * 1.16,2))" forInsert="false" forUpdate="false"/>
<bm:field name="lease_execution_date" databaseType="DATE" datatype="java.util.Date" expression="(select c.lease_execution_date from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="lease_end_date" databaseType="DATE" datatype="java.util.Date" expression="(select c.lease_end_date from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String" expression="(SELECT hbt.description FROM con_contract c,hls_business_type hbt WHERE c.contract_id = t1.contract_id and hbt.business_type = c.business_type)" forInsert="false" forUpdate="false"/>
<bm:field name="principal" databaseType="NUMBER" datatype="java.lang.Double" expression="(SELECT ccc.principal FROM con_contract_cashflow ccc WHERE ccc.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/> <!-- <bm:field name="interest"/>-->
<bm:field name="principal_15" databaseType="NUMBER" datatype="java.lang.Double" expression="(SELECT ccc.principal FROM con_contract_cashflow ccc WHERE ccc.cashflow_id = t1.cashflow_id) * 0.15 " forInsert="false" forUpdate="false"/> <!-- <bm:field name="interest" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>-->
<bm:field name="net_principal" databaseType="NUMBER" datatype="java.lang.Double" expression="(SELECT ccc.net_principal FROM con_contract_cashflow ccc WHERE ccc.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="net_principal_15" databaseType="NUMBER" datatype="java.lang.Double" expression="(SELECT ccc.net_principal FROM con_contract_cashflow ccc WHERE ccc.cashflow_id = t1.cashflow_id) * 0.15" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
...@@ -87,45 +60,21 @@ ...@@ -87,45 +60,21 @@
<bm:pk-field name="record_id"/> <bm:pk-field name="record_id"/>
</bm:primary-key> </bm:primary-key>
<bm:query-fields> <bm:query-fields>
<bm:query-field field="company_id" queryOperator="="/> <bm:query-field name="company_id" queryExpression="t1.company_id = ${@company_id}"/>
<bm:query-field field="contract_number" queryExpression="(select t.contract_number from con_contract t where t.contract_id =t1.contract_id ) = ${@contract_number}"/> <bm:query-field name="finance_income_recognized" queryExpression="nvl(t1.finance_income_recognized,'N') = ${@finance_income_recognized}"/>
<bm:query-field field="rental_overdue_90" queryExpression="
(decode((SELECT COUNT(1)
FROM con_contract_cashflow ccc
WHERE ccc.cf_item IN (1, 200)
AND ccc.due_amount - nvl(ccc.received_amount, 0) &gt; 0
AND ccc.due_date &lt;=
(SELECT MIN(f.due_date)
FROM con_contract_cashflow f
WHERE f.contract_id = t1.contract_id
AND f.cf_item IN (1, 200)
AND f.due_amount - nvl(ccc.received_amount, 0) &gt; 0) + 90
AND ccc.cashflow_id = t1.cashflow_id),0,&apos;N&apos;,&apos;Y&apos;)) =${@rental_overdue_90}"/>
<bm:query-field field="contract_overdue_90" queryExpression="
((DECODE((SELECT COUNT(*)
FROM con_contract_cashflow ccc
WHERE ccc.cf_item IN (1, 200)
AND ccc.due_amount - nvl(ccc.received_amount, 0) &gt;= 0
AND (add_months(to_date(${@internal_period_num},'yyyymm'),1)-1)- ccc.due_date BETWEEN 0 AND 89
AND ccc.cashflow_id = t1.cashflow_id),
0,
&apos;N&apos;,
&apos;Y&apos;)))= ${@contract_overdue_90}"/>
<bm:query-field field="loan_contract_number" queryExpression="(select t.loan_contract_number from tre_loan_contract t,tre_loan_con_withdrawal_plan p where p.widthdrawal_plan_id =t1.contract_id and p.loan_contract_id = t.loan_contract_id) = ${@loan_contract_numbers}"/>
<bm:query-field name="buession_type" queryExpression=" ((${@buession_type} = 'LEASE'
AND t1.cf_item in (1,3) and t1.internal_period_num &lt;= ${@internal_period_num}
AND (select cc.data_class from con_contract cc where cc.contract_id = t1.contract_id) = 'NORMAL'
) OR (${@buession_type} = 'LOAN'
AND (
(t1.cf_item= 900
and t1.internal_period_num = ${@internal_period_num}
and not EXISTS (SELECT 1 FROM tre_loan_con_repayment_plan p WHERE EXISTS (SELECT 1 FROM tre_loan_con_repayment_dtl d
WHERE d.repayment_plan_id = p.repayment_plan_id AND d.repayment_amount = p.rental )
AND p.repayment_plan_id = t1.cashflow_id)) or (t1.cf_item= 901
and t1.internal_period_num = ${@internal_period_num} )
)))"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.cf_item = ${@cf_item} "/> <bm:data-filter enforceOperations="query" expression="t1.internal_period_num = ${@internal_period_num} and t1.company_id IN (SELECT company_id FROM fnd_companies_vl WHERE (company_id = ${/session/@company_id} OR parent_biz_company_id = ${/session/@company_id}) AND enabled_flag = &apos;Y&apos;) and t2.data_class = &apos;NORMAL&apos; and t2.contract_status in( &apos;INCEPT&apos;,&apos;SIGN&apos;,&apos;TERMINATE&apos;,&apos;ET&apos;) and nvl(t1.unearned_finance_income,0) !=0 "/>
</bm:data-filters> </bm:data-filters>
<bm:relations>
<bm:relation name="con_ref" joinType="LEFT OUTER" refAlias="t2" refModel="cont.CON500.con_contract">
<bm:reference foreignField="contract_id" localField="contract_id"/>
</bm:relation>
</bm:relations>
<bm:ref-fields>
<bm:ref-field name="contract_number" relationName="con_ref" sourceField="contract_number"/>
<bm:ref-field name="contract_name" relationName="con_ref" sourceField="contract_name"/>
<bm:ref-field name="contract_status" relationName="con_ref" sourceField="contract_status"/>
<bm:ref-field name="data_class" relationName="con_ref" sourceField="data_class"/>
</bm:ref-fields>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: gaoyang $Author: gaoyang
$Date: 2013-6-24 下午03:23:39 $Date: 2013-6-24 下午03:23:39
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<a:screen xmlns:c="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" cacheEnabled="true" cacheKey="${/parameter/@layout_code}_screen" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:c="leaf.application.action" xmlns:p="uncertain.proc" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<!-- <s:server-script import="aut_authority_validate.js"/> --> <!-- <s:server-script import="aut_authority_validate.js"/>-->
<a:model-query fetchAll="true" model="hls.HLS030.hls_doc_layout_main" rootPath="layout_main_path"/> <a:model-query fetchAll="true" model="hls.HLS030.hls_doc_layout_main" rootPath="layout_main_path"/>
<a:model-query fetchAll="true" model="cont.CON500.hls_doc_layout_button" rootPath="layout_main_button_path"/> <a:model-query fetchAll="true" model="cont.CON500.hls_doc_layout_button" rootPath="layout_main_button_path"/>
<a:model-query defaultWhereClause="t1.parent_table is null and t1.tab_type!=&apos;TAB&apos; and t1.enabled_flag=&apos;Y&apos; and rownum=1" fetchAll="true" model="cont.CON500.con_hls_doc_layout_tab_query" rootPath="base_table_path"/> <a:model-query defaultWhereClause="t1.parent_table is null and t1.tab_type!=&apos;TAB&apos; and t1.enabled_flag=&apos;Y&apos; and rownum=1" fetchAll="true" model="cont.CON500.con_hls_doc_layout_tab_query" rootPath="base_table_path"/>
<!-- <s:server-script><![CDATA[ <!-- <s:server-script><![CDATA[-->
var m=$ctx.get('/model/layout_main_button_path'); <!-- var m=$ctx.get('/model/layout_main_button_path');-->
println(m.toXML()); <!-- println(m.toXML());-->
println('**************'); <!-- println('**************');-->
]]></s:server-script> --> <!-- ]]></s:server-script>-->
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var dynamic_document_id = '$c{/parameter/@document_id}'; var dynamic_document_id = '$c{/parameter/@document_id}';
if ('$c{/parameter/@document_id}') { if ('$c{/parameter/@document_id}') {
var detail_mask; var detail_mask;
if ('${/parameter/@winid}') { if ('${/parameter/@winid}') {
if (parent.$L.CmpManager.get('${/parameter/@winid}')) { if (parent.$L.CmpManager.get('${/parameter/@winid}')) {
detail_mask = parent.$('${/parameter/@winid}').wrap; detail_mask = parent.$('${/parameter/@winid}').wrap;
parent.Leaf.Masker.mask(detail_mask, '${l:HLS.LOADING}'); // parent.Leaf.Masker.mask(detail_mask, '${l:HLS.LOADING}');
} else { } else {
detail_mask = $('${/parameter/@winid}').wrap; detail_mask = $('${/parameter/@winid}').wrap;
Leaf.Masker.mask(detail_mask, '${l:HLS.LOADING}'); // Leaf.Masker.mask(detail_mask, '${l:HLS.LOADING}');
} }
} else { } else {
detail_mask = Ext.getBody(); detail_mask = Ext.getBody();
Leaf.Masker.mask(detail_mask, '${l:HLS.LOADING}'); // Leaf.Masker.mask(detail_mask, '${l:HLS.LOADING}');
} }
} }
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'car_detail' && record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
}
};
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_maintain_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
window['${/parameter/@layout_code}_open_bp_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'CON501H';
param['function_usage'] = 'MODIFY';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con713_hls_bp_master_modify_link', record.ds.id, '${/parameter/@layout_code}');
};
function con500_contract_save(nextStep) {
var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds');
if (root_ds.validate()) {
var winid = '${/parameter/@winid}';
if (winid) {
Leaf.Masker.mask($(winid).wrap, '${l:HLS.EXECUTING}');
} else {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
lock_current_window();
var root_record = root_ds.getAt(0);
root_ds.setSubmitParameter('layout_code', '${/parameter/@layout_code}');
on_con_save_dynamic(root_ds, root_record, nextStep, winid);
}
}
function con500_contract_submit() {
Leaf.SideBar.enable = false; window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
con500_contract_save(con500_contract_submit_final); var link_function = '';
} window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) {
function con500_contract_exit() { link_function = '${/parameter/@layout_code}_open_bp_detail_window';
if ('${/parameter/@winid}') { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
$('${/parameter/@winid}').close(); } else if (name == 'car_detail' && record.get('contract_lease_item_id')) {
} else { link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
window.location.go(-1); return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} }
} };
function con500_contract_save_exit() { window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function(id, name) {
con500_contract_save(con500_contract_exit); var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
} var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
function con500_contract_quote() { new Leaf.Window({
var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds'); id: 'contract_lease_item_maintain_window',
con500_contract_quote_execute(root_ds); url: $('contract_lease_item_maintain_link').getUrl(),
} params: {
contract_lease_item_id: contract_lease_item_id,
function con500_contract_upload() { winid: 'contract_lease_item_maintain_window'
if (!dynamic_document_id) { },
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); draggable: true,
return; fullScreen: true
} else { });
var dynamic_base_table = '${/model/base_table_path/record/@base_table}'.toUpperCase(); };
var url = '${/request/@context_path}/uploadFile.lview?table_name=' + dynamic_base_table + '&header_id=' + dynamic_document_id;
new Leaf.Window({ window['${/parameter/@layout_code}_open_bp_detail_window'] = function(id, name) {
url: url, var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
title: '${l:HLS.SUPPORTING_DOCUMENT}', var param = record.data;
id: '${/parameter/@attach_tab_code}_con500_cdd_uploadFile_screen_id', param['function_code'] = 'CON501H';
width: 850, param['function_usage'] = 'MODIFY';
height: 400 param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
}); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con713_hls_bp_master_modify_link', record.ds.id, '${/parameter/@layout_code}');
} };
}
]]></script>
function con500_contract_save(nextStep) {
var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds');
if (root_ds.validate()) {
var winid = '${/parameter/@winid}';
if (winid) {
Leaf.Masker.mask($(winid).wrap, '${l:HLS.EXECUTING}');
} else {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
lock_current_window();
var root_record = root_ds.getAt(0);
root_ds.setSubmitParameter('layout_code', '${/parameter/@layout_code}');
on_con_save_dynamic(root_ds, root_record, nextStep, winid);
}
}
function con500_contract_submit() {
Leaf.SideBar.enable = false;
con500_contract_save(con500_contract_submit_final);
}
function con500_contract_exit() {
if ('${/parameter/@winid}') {
$('${/parameter/@winid}').close();
} else {
window.location.go(-1);
}
}
function con500_contract_save_exit() {
con500_contract_save(con500_contract_exit);
}
function con500_contract_quote() {
var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds');
con500_contract_quote_execute(root_ds);
}
function con500_contract_upload() {
if (!dynamic_document_id) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
} else {
var dynamic_base_table = '${/model/base_table_path/record/@base_table}'.toUpperCase();
var url = '${/request/@context_path}/uploadFile.lview?table_name=' + dynamic_base_table + '&header_id=' + dynamic_document_id;
new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@attach_tab_code}_con500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
}
}
]]></script>
<a:freeMarker><![CDATA[ <a:freeMarker><![CDATA[
<#if model.getObject("/model/layout_main_button_path").getChilds()??> <#if model.getObject("/model/layout_main_button_path").getChilds()??>
<#if model.getObject("/parameter/@tab_tab_code")??> <#if model.getObject("/parameter/@tab_tab_code")??>
<#else> <#else>
<a:screenTopToolbar> <a:screenTopToolbar>
<#list model.getObject('/model/layout_main_button_path').getChilds() as item> <#list model.getObject('/model/layout_main_button_path').getChilds() as item>
<#if item.getString('button_code') =='SAVE'> <#if item.getString('button_code') =='SAVE'>
<a:gridButton click="con500_contract_save" text="${item.getString('prompt')!""}"/> <a:gridButton click="con500_contract_save" text="${item.getString('prompt')!""}"/>
<#elseif item.getString('button_code') =='EXIT'> <#elseif item.getString('button_code') =='EXIT'>
<a:gridButton click="con500_contract_exit" text="${item.getString('prompt')!""}"/> <a:gridButton click="con500_contract_exit" text="${item.getString('prompt')!""}"/>
<#elseif item.getString('button_code') =='SAVE_EXIT'> <#elseif item.getString('button_code') =='SAVE_EXIT'>
<a:gridButton click="con500_contract_save_exit" text="${item.getString('prompt')!""}"/> <a:gridButton click="con500_contract_save_exit" text="${item.getString('prompt')!""}"/>
<#elseif item.getString('button_code') =='QUOTE'> <#elseif item.getString('button_code') =='QUOTE'>
<a:gridButton click="con500_contract_quote" text="${item.getString('prompt')!""}"/> <a:gridButton click="con500_contract_quote" text="${item.getString('prompt')!""}"/>
<#elseif item.getString('button_code') =='SUBMIT_APPROVAL'> <#elseif item.getString('button_code') =='SUBMIT_APPROVAL'>
<a:gridButton click="con500_contract_submit" text="${item.getString('prompt')!""}"/> <a:gridButton click="con500_contract_submit" text="${item.getString('prompt')!""}"/>
<#elseif item.getString('button_code') =='PRINT'> <#elseif item.getString('button_code') =='PRINT'>
<a:gridButton click="function(){con500_contract_print&amp;&amp;con500_contract_print()}" text="${item.getString('prompt')!""}"/> <a:gridButton click="function(){con500_contract_print&amp;&amp;con500_contract_print()}" text="${item.getString('prompt')!""}"/>
<#elseif item.getString('button_code') =='UPLOAD'> <#elseif item.getString('button_code') =='UPLOAD'>
<a:gridButton click="con500_contract_upload" text="${item.getString('prompt')!""}"/> <a:gridButton click="con500_contract_upload" text="${item.getString('prompt')!""}"/>
<#else> <#else>
<a:gridButton id="${item.getString('button_code')!""}" click="function(btn){con500_define_button&amp;&amp;con500_define_button(btn,$('${model.getObject("/model/base_table_path/record/@tab_code")!""}_${model.getObject("/model/base_table_path/record/@base_table")}_ds'))}" text="${item.getString('prompt')!""}"/> <a:gridButton id="${item.getString('button_code')!""}" click="function(btn){con500_define_button&amp;&amp;con500_define_button(btn,$('${model.getObject("/model/base_table_path/record/@tab_code")!""}_${model.getObject("/model/base_table_path/record/@base_table")}_ds'))}" text="${item.getString('prompt')!""}"/>
</#if> </#if>
</#list> </#list>
</a:screenTopToolbar> </a:screenTopToolbar>
</#if> </#if>
</#if> </#if>
]]></a:freeMarker> ]]></a:freeMarker>
<a:screenBody padding="5" style="width:98%"> <a:screenBody padding="5" style="width:98%">
<a:placeHolder id="dynamicMain_id"/> <a:placeHolder id="dynamicMain_id"/>
</a:screenBody> </a:screenBody>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lpc 9874
$Date:
$Revision: 1.0
$Purpose: 租赁物查看
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]></s:server-script>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<a:link id="contract_accounting_wait_link_id" model="cont.CON505N.contract_accounting_wait" modelaction="update"/>
<a:link id="contract_accounting_finish_link_id" model="cont.CON505N.contract_accounting_finish" modelaction="update"/>
<script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true);
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var con_accounting_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_accounting_manage');
var accounting_record = $(con_accounting_ds_id).getCurrentRecord();
$('CONTRACT_LEGAL_MODIFY_G_CASHFLOW_con_contract_cashflow_ds').setQueryParameter('con_accounting_id', accounting_record.get('con_accounting_id'));
$('CONTRACT_LEGAL_MODIFY_G_CASHFLOW_con_contract_cashflow_ds').query();
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
};
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
};
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {};
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {};
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function(res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path;
var oWin = window.open(source_path);
},
scope: this
});
}
function upload_file(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('con_accounting_attch_id')) {
var url;
if (query_only == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_ACCOUNTING_MANAGE_ATTCH&header_id=' + record.get('con_accounting_attch_id');
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_ACCOUNTING_MANAGE_ATTCH&header_id=' + record.get('con_accounting_attch_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function() {
$('CONTRACT_LEGAL_MODIFY_ACY_con_accounting_manage_attch_ds').setQueryParameter('con_accounting_id', record.get('con_accounting_id'));
// $('CONTRACT_LEGAL_MODIFY_ACY_con_accounting_manage_attch_ds').setQueryParameter('con_accounting_attch_id', record.get('con_accounting_attch_id'));
$('CONTRACT_LEGAL_MODIFY_ACY_con_accounting_manage_attch_ds').query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'upload_file';
if (record.get('attach_count') == 0 || !record.get('attach_count')) {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '(' + record.get('attach_count') + ')' + '</a>';
}
} else if (name == 'attach_file_name') {
//
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0;i < str.length;i++) {
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
}
};
]]></script>
</a:view>
</a:screen>
...@@ -3,220 +3,206 @@ ...@@ -3,220 +3,206 @@
<a:init-procedure/> <a:init-procedure/>
<a:view> <a:view>
<a:link id="con_dun_record_id" url="${/request/@context_path}/modules/cont/CON620/con_dun_record.lview"/> <a:link id="con_dun_record_id" url="${/request/@context_path}/modules/cont/CON620/con_dun_record.lview"/>
<a:link id="hls_bp_master_id" url="${/request/@context_path}/modules/hls/HLS306/hls_bp_master_details_check.lview"/> <a:link id="hls_bp_master_id"
<a:link id="con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/> url="${/request/@context_path}/modules/hls/HLS306/hls_bp_master_details_check.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_update_link_id"
<a:link id="con_contract_lawyer_letter_print_link_id" url="${/request/@context_path}/modules/cont/CON620/con_contract_lawyer_letter_print.lview"/> url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="penalty_change_id" url="${/request/@context_path}/modules/cont/CON747/con_contract_penatly_change_req_detail.lview"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="con_contract_lawyer_letter_print_link_id"
url="${/request/@context_path}/modules/cont/CON620/con_contract_lawyer_letter_print.lview"/>
<a:link id="penalty_change_id"
url="${/request/@context_path}/modules/cont/CON747/con_contract_penatly_change_req_detail.lview"/>
<a:link id="con_contract_dun_detail_link_id"
url="${/request/@context_path}/modules/cont/CON620/con_contract_rent_detail.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
function CON601_con_contract_query() { function CON601_con_contract_query() {
$('CON620_contract_result_ds').query(); $('CON620_contract_result_ds').query();
} }
function CON601_con_contract_reset() { function CON601_con_contract_reset() {
$('CON620_contract_query_ds').reset(); $('CON620_contract_query_ds').reset();
} }
function penalty_change_btn() { function CON620_render_contract_dun_grid(value, record, name) {
// Leaf.go(url); if (name == 'contract_number') {
// var contract_id=$('CON620_contract_result_ds').getSelected().get('contract_id'); if (record.get('overdue_times') > 1) {
var url=$('penalty_change_id').getUrl(); return '<u><a style="color:red" href="javascript:contract_link(' + record.id + ');">' + value + '</a></u>';
// var url=$('penalty_change_id').getUrl()+'?contract_id='+contract_id; } else {
new Leaf.Window({ return '<a href="javascript:contract_link(' + record.id + ');">' + value + '</a>';
id: 'penalty_change_window', }
fullScreen:true, } else if (name == 'bp_id_tenant_desc') {
url: url //商业伙伴查询页面要做好,然后在此处关联。
}); if (record.get('overdue_times') > 1) {
} return '<u><a style="color:red" href="javascript:bp_id_tenant_desc_link(' + record.get('contract_id') + ');">' + value + '</a></u>';
} else {
function CON601_con_contract_print() { return '<a href="javascript:bp_id_tenant_desc_link(' + record.get('contract_id') + ');">' + value + '</a>';
//待报表做好,在此处写 }
var contract_id = $('CON620_contract_result_ds').getSelected()[0].get('contract_id'); } else if (name == 'bp_id_agent_desc') {
if (record.get('bp_id_agent_desc') == null) {
new Leaf.Window({ return;
id: 'con_contract_lawyer_letter_print_detail_winid', } else {
params: {
contract_id: contract_id,
winid: 'con_contract_lawyer_letter_print_detail_winid'
},
url: $('con_contract_lawyer_letter_print_link_id').getUrl(),
title: '${l:CON505.CON_CONTENT_PRINT}',
width: 600,
height: 400
});
}
function CON620_render_contract_dun_grid(value, record, name) {
if (name == 'contract_number') {
if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:contract_link(' + record.id + ');">' + value + '</a></u>';
} else {
return '<a href="javascript:contract_link(' + record.id + ');">' + value + '</a>';
}
} else if (name == 'bp_id_tenant_desc') {
//商业伙伴查询页面要做好,然后在此处关联。
if (record.get('overdue_times') > 1) { if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:bp_id_tenant_desc_link(' + record.get('contract_id') + ');">' + value + '</a></u>'; return '<u><a style="color:red" href="javascript:bp_id_agent_desc_link(' + record.get('bp_id_agent_level1') + ',\'' + record.get('bp_id_agent_class') + '\')">' + value + '</a></u>';
} else { } else {
return '<a href="javascript:bp_id_tenant_desc_link(' + record.get('contract_id') + ');">' + value + '</a>'; return '<a href="javascript:bp_id_agent_desc_link(' + record.get('bp_id_agent_level1') + ',\'' + record.get('bp_id_agent_class') + '\')">' + value + '</a>';
}
} else if (name == 'bp_id_agent_desc') {
if (record.get('bp_id_agent_desc') == null) {
return;
} else {
if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:bp_id_agent_desc_link(' + record.get('bp_id_agent_level1') + ',\'' + record.get('bp_id_agent_class') + '\')">' + value + '</a></u>';
} else {
return '<a href="javascript:bp_id_agent_desc_link(' + record.get('bp_id_agent_level1') + ',\'' + record.get('bp_id_agent_class') + '\')">' + value + '</a>';
}
} }
} }
} }
}
function bp_id_tenant_desc_link(contract_id) {
var url = $('con_dun_record_id').getUrl() + '?contract_id=' + contract_id; function bp_id_tenant_desc_link(contract_id) {
var url = $('con_dun_record_id').getUrl() + '?contract_id=' + contract_id;
var win = new Leaf.Window({
id: 'con_dun_record_window', var win = new Leaf.Window({
url: url, id: 'con_dun_record_window',
title: '催收记录', url: url,
fullScreen: true title: '催收记录',
}); fullScreen: true
win.on('close', function() { });
$('CON620_contract_result_ds').query(); win.on('close', function () {
}); $('CON620_contract_result_ds').query();
} });
}
function bp_id_agent_desc_link(bp_id, bp_class) {
var url = $('hls_bp_master_id').getUrl(); function bp_id_agent_desc_link(bp_id, bp_class) {
new Leaf.Window({ var url = $('hls_bp_master_id').getUrl();
id: 'hls_bp_detail_winId', new Leaf.Window({
url: url, id: 'hls_bp_detail_winId',
params: { url: url,
bp_id: bp_id, params: {
bp_class: bp_class, bp_id: bp_id,
winId: 'hls_bp_detail_winId' bp_class: bp_class,
}, winId: 'hls_bp_detail_winId'
title: '${l:HLS212.BP_MASTER_MAINTAIN}', },
fullScreen: true title: '${l:HLS212.BP_MASTER_MAINTAIN}',
}); fullScreen: true
});
}
}
function con601_param_set_value(param) {
param['document_category'] = 'CONTRACT'; function con601_param_set_value(param) {
param['function_code'] = 'CON301'; param['document_category'] = 'CONTRACT';
param['function_usage'] = 'QUERY'; param['function_code'] = 'CON620D';
param['maintain_type'] = 'READONLY'; param['function_usage'] = 'UPDATE';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; param['maintain_type'] = 'UPDATE';
param['company_id'] = '${/session/@company_id}'; param['url_title'] = '催收详情';
// param['company_id'] = '${/session/@company_id}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_update_link_id', 'CON620_contract_result_ds'); //
} hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_dun_detail_link_id', 'CON620_contract_result_ds');
}
function contract_link(id) {
// function contract_link(id) {
var current_record = $('CON620_contract_result_ds').findById(id); //
var record = current_record; var current_record = $('CON620_contract_result_ds').findById(id);
var saveData = []; var record = current_record;
for (var k in record.data) { var saveData = [];
var item = record.data[k]; for (var k in record.data) {
if (item && item.xtype == 'dataset') { var item = record.data[k];
delete record.data[k]; if (item && item.xtype == 'dataset') {
} delete record.data[k];
} }
var param = record.data;
param['document_id'] = current_record.get('contract_id');
con601_param_set_value(param);
} }
var param = record.data;
function summaryRenderer(datas, name) { param['document_id'] = current_record.get('contract_id');
con601_param_set_value(param);
var sum = 0; }
var sum2 = 0;
var sum3 = 0; function summaryRenderer(datas, name) {
var sum4 = 0;
var sum5 = 0; var sum = 0;
for (var i = 0;i < datas.length;i++) { var sum2 = 0;
record = datas[i]; var sum3 = 0;
if (name == "overdue_amount") { var sum4 = 0;
var t_1 = record.get("overdue_amount"); var sum5 = 0;
var t_2 = parseFloat(t_1); for (var i = 0; i < datas.length; i++) {
if (!isNaN(t_2)) { record = datas[i];
sum += t_2;
}
}
if (name == "remain_principal") {
var d_1 = record.get("remain_principal");
var d_2 = parseFloat(d_1);
if (!isNaN(d_2)) {
sum2 += d_2;
}
}
if (name == "penalty") {
var p_1 = record.get("penalty");
var p_2 = parseFloat(p_1);
if (!isNaN(p_2)) {
sum3 += p_2;
}
}
if (name == "promised_return_amount") {
var r_1 = record.get("promised_return_amount");
var r_2 = parseFloat(r_1);
if (!isNaN(r_2)) {
sum4 += r_2;
}
}
if (name == "deposit") {
var s_1 = record.get("deposit");
var s_2 = parseFloat(s_1);
if (!isNaN(s_2)) {
sum5 += s_2;
}
}
}
if (name == "overdue_days") {
return '<div align="right">合计:</div>';
}
if (name == "overdue_amount") { if (name == "overdue_amount") {
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>'; var t_1 = record.get("overdue_amount");
var t_2 = parseFloat(t_1);
if (!isNaN(t_2)) {
sum += t_2;
}
} }
if (name == "remain_principal") { if (name == "remain_principal") {
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>'; var d_1 = record.get("remain_principal");
var d_2 = parseFloat(d_1);
if (!isNaN(d_2)) {
sum2 += d_2;
}
} }
if (name == "penalty") { if (name == "penalty") {
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>'; var p_1 = record.get("penalty");
var p_2 = parseFloat(p_1);
if (!isNaN(p_2)) {
sum3 += p_2;
}
} }
if (name == "promised_return_amount") { if (name == "promised_return_amount") {
return '<font color="red">' + Leaf.formatNumber(sum4, 2) + '</font>'; var r_1 = record.get("promised_return_amount");
var r_2 = parseFloat(r_1);
if (!isNaN(r_2)) {
sum4 += r_2;
}
} }
if (name == "deposit") { if (name == "deposit") {
return '<font color="red">' + Leaf.formatNumber(sum5, 2) + '</font>'; var s_1 = record.get("deposit");
var s_2 = parseFloat(s_1);
if (!isNaN(s_2)) {
sum5 += s_2;
}
} }
} }
if (name == "overdue_days") {
function onIndexChange(ds, record, name, value, oldvalue) { return '<div align="right">合计:</div>';
$('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', record.get('contract_id'));
$('bgt_contract_payment_detail_line_ds').query();
} }
if (name == "overdue_amount") {
function ds_query(ds) { return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
if(ds.getAll().length==0) {
$('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', null);
$('bgt_contract_payment_detail_line_ds').query();
}
} }
if (name == "remain_principal") {
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
}
if (name == "penalty") {
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
}
if (name == "promised_return_amount") {
return '<font color="red">' + Leaf.formatNumber(sum4, 2) + '</font>';
}
if (name == "deposit") {
return '<font color="red">' + Leaf.formatNumber(sum5, 2) + '</font>';
}
}
function onIndexChange(ds, record, name, value, oldvalue) {
$('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', record.get('contract_id'));
$('bgt_contract_payment_detail_line_ds').query();
}
function ds_query(ds) {
if (ds.getAll().length == 0) {
$('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', null);
$('bgt_contract_payment_detail_line_ds').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:dataSets> <a:dataSets>
<a:dataSet id="CON601_lease_organization_name_ds" loadData="true" model="basic.hls_lease_organization_for_lov"/> <a:dataSet id="con501_division_name_ds" loadData="true" model="basic.hls_division_for_lov"/>
<a:dataSet id="business_type_ds">
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
</a:datas>
</a:dataSet>
<a:dataSet id="CON601_lease_organization_name_ds" loadData="true"
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="CON620_contract_query_ds" autoCreate="true"> <a:dataSet id="CON620_contract_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bp_id_tenant_n" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="520" title="HLS.BP_TITLE"> <a:field name="bp_id_tenant_n" autoComplete="true" lovGridHeight="350" lovHeight="500"
lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT"
lovWidth="520" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
<a:map from="bp_name" to="bp_id_tenant_n"/> <a:map from="bp_name" to="bp_id_tenant_n"/>
<a:map from="bp_id" to="bp_id_tenant"/> <a:map from="bp_id" to="bp_id_tenant"/>
...@@ -225,72 +211,85 @@ ...@@ -225,72 +211,85 @@
<a:field name="bp_id_tenant"/> <a:field name="bp_id_tenant"/>
<a:field name="contract_number" typeCase="Upper"/> <a:field name="contract_number" typeCase="Upper"/>
<a:field name="overdue_times"/> <a:field name="overdue_times"/>
<a:field name="owner_user_id_desc" lovGridHeight="350" lovHeight="475" lovService="cont.CON620.sys_user_for_lov" lovWidth="520" title="出单人"> <a:field name="owner_user_id_desc" lovGridHeight="350" lovHeight="475"
lovService="cont.CON620.sys_user_for_lov" lovWidth="520" title="出单人">
<a:mapping> <a:mapping>
<a:map from="user_id" to="owner_user_id"/> <a:map from="user_id" to="owner_user_id"/>
<a:map from="description" to="owner_user_id_desc"/> <a:map from="description" to="owner_user_id_desc"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="lease_organization_name" displayField="description" options="CON601_lease_organization_name_ds" returnField="lease_organization" valueField="lease_organization"/> <a:field name="lease_organization_name" displayField="description"
options="CON601_lease_organization_name_ds" returnField="lease_organization"
valueField="lease_organization"/>
<a:field name="business_type_n" displayField="code_value_name" options="business_type_ds" returnField="business_type" valueField="code_value"/>
<a:field name="division_n" displayField="description" options="con501_division_name_ds" returnField="division" valueField="division"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="CON620_contract_result_ds" autoPageSize="true" autoQuery="true" model="cont.CON620.con_contract_dun_for_query" queryDataSet="CON620_contract_query_ds" queryUrl="${/request/@context_path}/autocrud/cont.CON620.con_contract_dun_for_query/query" selectable="true" selectionModel="single"> <a:dataSet id="CON620_contract_result_ds" autoPageSize="true" autoQuery="true"
model="cont.CON620.con_contract_dun_for_query" queryDataSet="CON620_contract_query_ds"
queryUrl="${/request/@context_path}/autocrud/cont.CON620.con_contract_dun_for_query/query"
selectable="true" selectionModel="single">
<a:fields> <a:fields>
<a:field name="promised_return_date" datatype="date"/> <a:field name="promised_return_date" datatype="date"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="indexChange" handler="onIndexChange"/> <!--<a:event name="indexChange" handler="onIndexChange"/>-->
<a:event name="load" handler="ds_query"/> <a:event name="load" handler="ds_query"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/> <!--<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/>-->
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="CON601_con_contract_query" text="HLS.QUERY"/> <a:gridButton click="CON601_con_contract_query" text="HLS.QUERY"/>
<a:gridButton click="CON601_con_contract_reset" text="HLS.RESET"/> <a:gridButton click="CON601_con_contract_reset" text="HLS.RESET"/>
<a:gridButton id="CON601_con_contract_print_btn" click="CON601_con_contract_print" text="打印催收函"/> <!--<a:gridButton id="CON601_con_contract_print_btn" click="CON601_con_contract_print" text="打印催收函"/>-->
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="4" labelWidth="100" marginWidth="30" title="CON301.CONTRACT_QUERY"> <a:form column="4" labelWidth="120" marginWidth="30" title="CON301.CONTRACT_QUERY">
<a:textField name="contract_number" bindTarget="CON620_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/> <a:textField name="contract_number" bindTarget="CON620_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/>
<a:textField name="contract_name" bindTarget="CON620_contract_query_ds" prompt="合同名称"/>
<a:lov name="bp_id_tenant_n" bindTarget="CON620_contract_query_ds" prompt="HLS.TENANT_CODE"/> <a:lov name="bp_id_tenant_n" bindTarget="CON620_contract_query_ds" prompt="HLS.TENANT_CODE"/>
<a:textField name="phone" bindTarget="CON620_contract_query_ds" prompt="电话"/> <a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
<a:numberField name="overdue_times" allowDecimals="false" bindTarget="CON620_contract_query_ds" prompt="逾期期数"/> <a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:numberField name="overdue_days_from" allowDecimals="false" bindTarget="CON620_contract_query_ds" prompt="逾期天数从"/> <a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
<a:numberField name="overdue_days_to" allowDecimals="false" bindTarget="CON620_contract_query_ds" prompt="逾期天数到"/> <a:numberField name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数从"/>
<a:numberField name="due_amount_from" allowDecimals="false" bindTarget="CON620_contract_query_ds" prompt="预定收款金额从"/> <a:numberField name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数到"/>
<a:numberField name="due_amount_to" allowDecimals="false" bindTarget="CON620_contract_query_ds" prompt="预定收款金额至"/> <a:numberField name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数从"/>
<a:numberField name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数到"/>
<a:numberField name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额从"/>
<a:numberField name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额到"/>
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数从"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数到"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数从"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数到"/>
<a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额从"/>
<a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额到"/>
</a:form> </a:form>
<a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="380" marginWidth="30" navBar="true"> <a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="240"
<a:columns> marginWidth="30" navBar="true">
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER" renderer="CON620_render_contract_dun_grid" width="150"/>
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" renderer="CON620_render_contract_dun_grid" showTitle="true" width="210"/>
<a:column name="status_desc" align="center" prompt="催收状态"/>
<a:column name="lease_organization_desc" align="center" prompt="业务部" width="120"/>
<a:column name="lease_times" align="center" prompt="租赁期数" width="60"/>
<a:column name="recieved_times" align="center" prompt="已还期数" width="60"/>
<a:column name="overdue_times" align="center" prompt="逾期期数" width="60"/>
<a:column name="overdue_days" align="center" footerRenderer="summaryRenderer" prompt="逾期天数" width="60"/>
<a:column name="overdue_amount" align="right" footerRenderer="summaryRenderer" prompt="逾期金额" renderer="Leaf.formatMoney"/>
<a:column name="penalty" align="right" footerRenderer="summaryRenderer" prompt="逾期罚息" renderer="Leaf.formatMoney"/>
<a:column name="remain_principal" align="right" footerRenderer="summaryRenderer" prompt="剩余租金" renderer="Leaf.formatMoney"/>
<a:column name="deposit" align="right" footerRenderer="summaryRenderer" prompt="保证金" renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
<a:grid bindTarget="bgt_contract_payment_detail_line_ds" marginHeight="420" marginWidth="30" navBar="true" showRowNumber="true">
<a:columns> <a:columns>
<!-- <a:column name="bp_name" prompt="承租人名称" width="200" showTitle="true"/> <a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
<a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="150"/> --> renderer="CON620_render_contract_dun_grid" width="150"/>
<a:column name="times" align="center" prompt="CON305.TIMES" width="80"/> <a:column name="contract_name" align="center"
<a:column name="due_date" align="center" prompt="CON305.DUE_DATE" renderer="Leaf.formatDate"/> prompt="合同名称" width="120"/><!--<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" renderer="CON620_render_contract_dun_grid" showTitle="true" width="210"/>-->
<a:column name="due_amount" align="right" prompt="CON305.DUE_AMOUNT" renderer="Leaf.formatMoney"/> <a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true" width="170"
<a:column name="principal" align="right" prompt="CON305.PRINCIPAL" renderer="Leaf.formatMoney"/> align="center"/>
<a:column name="interest" align="right" prompt="CON305.INTEREST" renderer="Leaf.formatMoney"/> <a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/>
<a:column name="write_off_date" align="center" prompt="实际收款日" renderer="Leaf.formatDate"/> <a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="write_off_due_amount" align="right" prompt="实际收款金额" renderer="Leaf.formatMoney"/> <a:column name="division_n" align="center" prompt="租赁物" width="60"/>
<a:column name="write_off_principal" align="right" prompt="实际收款本金" renderer="Leaf.formatMoney"/> <a:column name="account_due_times" align="right" prompt="会计逾期总期数" renderer="Leaf.formatMoney"
<a:column name="write_off_interest" align="right" prompt="实际收款利息" renderer="Leaf.formatMoney"/> width="100"/>
<a:column name="account_due_days" align="right" prompt="会计逾期总天数" renderer="Leaf.formatMoney"
width="100"/>
<a:column name="account_due_amount" align="right" prompt="会计逾期总金额" renderer="Leaf.formatMoney"
width="100"/>
<a:column name="business_due_times" align="right" prompt="营业逾期总期数" renderer="Leaf.formatMoney"
width="100"/>
<a:column name="business_due_days" align="right" prompt="营业逾期总天数" renderer="Leaf.formatMoney"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="营业逾期总金额" renderer="Leaf.formatMoney"
width="100"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
<a:columns> <a:columns>
<a:column name="create_date_fmt" prompt="审批时间" width="150"/> <a:column name="create_date_fmt" prompt="审批时间" width="150"/>
<a:column name="action_type_desc" prompt="审批操作" renderer="render_action_type_desc" width="200"/> <a:column name="action_type_desc" prompt="审批操作" renderer="render_action_type_desc" width="200"/>
<!-- <a:column name="comment_text" prompt="内部信审意见" width="250"/> --> <a:column name="comment_text" prompt="审批意见" width="250"/>
<a:column name="comment_text_out" prompt="审批意见" width="400"/> <!--<a:column name="comment_text_out" prompt="审批意见" width="400"/>-->
<a:column name="node_desc" prompt="审批节点" width="200"/> <a:column name="node_desc" prompt="审批节点" width="200"/>
<a:column name="approver" prompt="审批人" renderer="check_agent_renderer" width="200"/> <a:column name="approver" prompt="审批人" renderer="check_agent_renderer" width="200"/>
<a:placeHolder id="dynamicLineColumn_id"/> <a:placeHolder id="dynamicLineColumn_id"/>
......
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