Commit 0aedeea4 authored by niminmin's avatar niminmin

保单分公司及售后回租首付款逻辑调整

parent 168e4f68
......@@ -306,12 +306,15 @@
and (t1.invoice_method = 'BILLING' or
(t1.invoice_method = 'NO_BILLING' and
t1.contract_status in ('TERMINATE', 'ET', 'REPUR')))
AND NOT EXISTS
(SELECT 1
FROM acr_invoice_ln l
WHERE l.ref_n04 = t2.journal_line_id
GROUP BY journal_line_id
HAVING SUM(l.total_amount) = t2.amount_dr)
AND NOT EXISTS (SELECT 1
FROM acr_invoice_ln l, acr_invoice_hd h
WHERE l.invoice_hd_id = h.invoice_hd_id
and h.contract_id = t2.contract_id
and l.cf_item = 9
and l.ref_n04 = t2.journal_line_id
and l.ref_n03 = t2.journal_header_id
group by t2.journal_line_id
having sum(l.total_amount) = t2.amount_dr)
) vv
......
......@@ -3,7 +3,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT confirmed_by_name,
select t1.* from(SELECT confirmed_by_name,
create_je_flag,
document_type_desc,
vat_interface_status,
......@@ -130,9 +130,9 @@
ref_n02,
vat_interface_status_desc,
invoice_apply_num,
ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t1.invoice_hd_id)csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t1.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc
FROM acr_invoice_hd_v t1
( ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id))csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
......@@ -164,8 +164,8 @@
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code like ${@invoice_code}"/>
<bm:query-field name="vat_invoice_code" queryExpression="t1.vat_invoice_code like ${@vat_invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number like ${@invoice_number}"/>
<bm:query-field name="invoice_date_from" queryExpression=" trunc(t1.invoice_date) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression="trunct1.invoice_date) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_from" queryExpression=" to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression=" to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
</bm:query-fields>
......
......@@ -3,7 +3,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT confirmed_by_name,
select t1.* from( SELECT confirmed_by_name,
create_je_flag,
document_type_desc,
vat_interface_status,
......@@ -129,10 +129,10 @@
claim_status,
ref_n02,
invoice_apply_num,
ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t1.invoice_hd_id)csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t1.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc
ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id)csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc
FROM acr_invoice_hd_v t1
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
]]></bm:query-sql>
......@@ -153,7 +153,7 @@
<bm:query-field name="invoice_status_desc" queryExpression="t1.invoice_status_desc = ${@invoice_status_desc}"/>
<bm:query-field name="claim_status" queryExpression="t1.claim_status = ${@claim_status}"/>
<bm:query-field name="claim_status_n" queryExpression="t1.claim_status_n = ${@claim_status_n}"/>
<bm:query-field name="csh_transaction_flag" queryExpression="t1.csh_transaction_flag = ${@csh_transaction_flag}"/>
<bm:query-field name="cf_item_desc" queryExpression="t1.cf_item_desc = ${@cf_item_desc}"/>
<bm:query-field name="document_number" queryExpression="t1.document_number like ${@document_number}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/>
......@@ -163,8 +163,8 @@
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code like ${@invoice_code}"/>
<bm:query-field name="vat_invoice_code" queryExpression="t1.vat_invoice_code like ${@vat_invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number like ${@invoice_number}"/>
<bm:query-field name="invoice_date_from" queryExpression=" trunc(t1.invoice_date) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression="trunct1.invoice_date) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_from" queryExpression=" to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
</bm:query-fields>
......
......@@ -270,7 +270,7 @@
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number"
queryExpression="contract_number like ${@contract_number}"/>
queryExpression="contract_number like &apos;%&apos;|| ${@contract_number} ||&apos;%&apos;"/>
<!--<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/>-->
<bm:query-field name="bp_id_tenant_desc" queryExpression="t1.bp_id_tenant_desc like ${@bp_id_tenant_desc}"/>
<!-- <bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name} "/>-->
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-23 下午8:16:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
t1.*,
(Select Min(cc1.TIMES)
From con_contract_cashflow cc1
Where cc1.contract_id = t1.contract_id
And cc1.due_date <= Sysdate
And cc1.cf_item In (250)
And cc1.write_off_flag <> 'FULL'
and cc1.cf_status='RELEASE'
And cc1.due_date = t1.min_overdue_date) min_overdue_times
FROM (SELECT
cc.contract_id,
cc.document_type,
cc.document_category,
--cc.contract_name,
(SELECT pp.project_number
FROM prj_project pp
WHERE pp.project_id = cc.project_id) project_number,
cc.bp_id_tenant,
to_char(cc.inception_of_lease, 'yyyy-mm-dd') inception_of_lease,
(SELECT hb.bp_name
FROM hls_bp_master hb, con_contract_bp ccb
WHERE hb.bp_category = 'AGENT'
AND ccb.bp_category = 'AGENT'
AND hb.bp_id = ccb.bp_id
AND ccb.contract_id = cc.contract_id) agent_id_n,
(SELECT bp_name
FROM hls_bp_master
WHERE bp_id = cc.bp_id_tenant
AND enabled_flag = 'Y') bp_id_tenant_desc,
cc.contract_number,
cc.bp_id_agent_level1,
(SELECT extra_nam
FROM hls_bp_master
WHERE bp_id = cc.bp_id_agent_level1
AND enabled_flag = 'Y') bp_id_agent_desc,
cc.owner_user_id,
(SELECT description
FROM sys_user
WHERE user_id = cc.owner_user_id) owner_user_id_desc,
cc.lease_organization,
(SELECT description
FROM hls_lease_organization
WHERE lease_organization = cc.lease_organization
AND enabled_flag =
'Y') lease_organization_desc,
(SELECT a.description value_name
FROM hls_business_type_v a
WHERE a.enabled_flag = 'Y'
AND a.business_type = cc.business_type) business_type_n,
cc.data_class,
(SELECT hd.description
FROM hls_division hd
WHERE hd.enabled_flag = 'Y'
AND hd.division = cc.division) division_n,
cc.division,
null account_due_times,
null account_due_days,
null account_due_amount,
contract_item_query_pkg.calc_business_overdue_times(p_contract_id => cc.contract_id,
p_calc_date => SYSDATE,
p_user_id => -1) business_due_times,
contract_item_query_pkg.calc_bussiness_overdue_days(p_contract_id => cc.contract_id,
p_calc_date => SYSDATE,
p_user_id => -1) business_due_days,
(SELECT SUM(ccc.due_amount)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
AND ccc.cf_status = 'RELEASE'
AND ccc.cf_item IN (250)
AND trunc(ccc.due_date) <= trunc(SYSDATE)) -
nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo
WHERE cwo.reversed_flag = 'N'
AND cwo.contract_id = cc.contract_id
AND cwo.cf_item IN ( 250)
And Exists
(Select 1
From con_contract_cashflow cn
Where cn.cashflow_id = cwo.cashflow_id
And cn.cf_status = 'RELEASE'
And trunc(cn.due_date) <= trunc(Sysdate))),
0) business_due_amount,
--营业逾期总金额
contract_item_query_pkg.calc_repur_penalty(p_contract_id => cc.contract_id,
p_calc_date => SYSDATE,
p_user_id => -1) over_due_amount,
--营业最早逾期的预定支付日
(SELECT MIN(ccc.due_date)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
AND ccc.due_amount > 0
AND ccc.due_date <= sysdate
and ccc.cf_status='RELEASE'
AND ccc.cf_item in (250)
AND ccc.write_off_flag <> 'FULL') min_overdue_date,
--营业已收租金
(SELECT SUM(nvl(ccc.received_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
and ccc.cf_status='RELEASE'
AND ccc.cf_item IN
(250)) business_received_amount,
--营业未收租金
(SELECT SUM(ccc.due_amount - nvl(ccc.received_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
and ccc.cf_status='RELEASE'
AND ccc.cf_item IN ( 250)
) business_unreceived_amount,
--会计已收租金
null ac_received_amount,
--会计未收租金
null ac_unreceived_amount,
--机型
(SELECT ccli.modelcd
FROM con_contract_lease_item ccli
WHERE ccli.contract_id = cc.contract_id) modelcd,
--机号
(SELECT ccli.machine_number
FROM con_contract_lease_item ccli
WHERE ccli.contract_id = cc.contract_id) machine_number,
to_char(cc.repurchase_date, 'yyyy-mm-dd') lease_start_date,
cc.PAYMENT_PERIOD lease_times,
--租金合计
(SELECT SUM(ccc.due_amount)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
AND ccc.cf_status = 'RELEASE'
AND ccc.cf_item IN (250)
) total_due_amount,
cc.contract_status,
cc.BUSINESS_TYPE,
cc.repurchase_types
FROM con_contract cc
WHERE
cc.contract_status='REPURING'
and cc.repurchase_types='STAGE_REPURCHASE'
and EXISTS(SELECT 1
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = cc.contract_id
AND TRUNC(ccw.due_date) <= TRUNC(SYSDATE)
AND ccw.due_amount > nvl(ccw.received_amount, 0)
AND ccw.write_off_flag <> 'FULL'
And ccw.cf_item = '250'
AND ccw.cf_status = 'RELEASE'
AND ccw.cf_direction = 'INFLOW')
AND ('Y' = 'Y' AND EXISTS
(SELECT 1
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
WHERE a1.trx_category = 'CONTRACT'
AND a1.trx_id = cc.contract_id
AND trunc(SYSDATE) BETWEEN a1.start_date AND
nvl(a1.end_date, trunc(SYSDATE))
AND a1.user_id = a2.owner_user_id
AND a1.trx_category = a2.trx_category
AND a2.authorized_user_id = ${/session/@user_id}
AND trunc(SYSDATE) BETWEEN a2.start_date AND
nvl(a2.end_date, trunc(SYSDATE))))
And ((decode(${/session/@user_id}, 10600, 1, 2) = 1
And exists(select 1
from hls_bp_master hb
where hb.bp_id = cc.bp_id_agent_level1
And hb.bp_code in
('D00000028', 'D00000035', 'D00000016', 'D00000021', 'D00000039', 'D00000025', 'D00000034', 'D00000017', 'D00000018', 'D00000024', 'D00000032', 'D00000009', 'D00000012', 'D00000014', 'D00000015', 'D00000023')))
or (decode(${/session/@user_id}, 10600, 1, 2) = 2))) t1
#WHERE_CLAUSE#
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number"
queryExpression="contract_number like &apos;%&apos;|| ${@contract_number} ||&apos;%&apos;"/>
<!--<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/>-->
<bm:query-field name="bp_id_tenant_desc" queryExpression="t1.bp_id_tenant_desc like &apos;%&apos;|| ${@bp_id_tenant_desc}||&apos;%&apos;"/>
<!-- <bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name} "/>-->
<bm:query-field name="project_number" queryExpression="t1.project_number like ${@project_number}"/>
<bm:query-field name="bp_id_agent_desc" queryExpression="t1.bp_id_agent_desc like &apos;%&apos;|| ${@bp_id_agent_desc}||&apos;%&apos;"/>
<!-- <bm:query-field name="lease_start_date_from" queryExpression="t1.inception_of_lease &gt;=to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="lease_start_date_to" queryExpression="t1.inception_of_lease &lt;=to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/>
-->
<bm:query-field name="division" queryExpression="t1.division = ${@division}"/>
<bm:query-field name="lease_start_date_from"
queryExpression="t1.inception_of_lease &gt;=${@lease_start_date_from}"/>
<bm:query-field name="lease_start_date_to"
queryExpression="t1.inception_of_lease &lt;=${@lease_start_date_to}"/>
<bm:query-field name="lease_times_from" queryExpression="t1.lease_times &gt;=${@lease_times_from}"/>
<bm:query-field name="lease_times_to" queryExpression="t1.lease_times &lt;=${@lease_times_to}"/>
<bm:query-field name="received_times_from" queryExpression="t1.received_times &gt;=${@received_times_from}"/>
<bm:query-field name="received_times_to" queryExpression="t1.received_times &lt;=${@received_times_to}"/>
<bm:query-field name="agent_id_n" queryExpression="t1.agent_id_n = ${@agent_id_n}"/>
<bm:query-field name="promised_return_date_from"
queryExpression="t1.promised_return_date &gt;= to_date(${@promised_return_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="promised_return_date_to"
queryExpression="t1.promised_return_date &lt;= to_date(${@promised_return_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="account_due_times_from"
queryExpression="t1.account_due_times &gt;= ${@account_due_times_from}"/>
<bm:query-field name="account_due_times_to"
queryExpression="t1.account_due_times &lt;= ${@account_due_times_to}"/>
<bm:query-field name="account_due_days_from"
queryExpression="t1.account_due_days &gt;= ${@account_due_days_from}"/>
<bm:query-field name="account_due_days_to" queryExpression="t1.account_due_days &lt;= ${@account_due_days_to}"/>
<bm:query-field name="account_due_amount_from"
queryExpression="t1.account_due_amount &gt;= ${@account_due_amount_from}"/>
<bm:query-field name="account_due_amount_to"
queryExpression="t1.account_due_amount &lt;= ${@account_due_amount_to}"/>
<bm:query-field name="business_due_times_from"
queryExpression="t1.business_due_times &gt;= ${@business_due_times_from}"/>
<bm:query-field name="business_due_times_to"
queryExpression="t1.business_due_times &lt;= ${@business_due_times_to}"/>
<bm:query-field name="business_due_days_from"
queryExpression="t1.business_due_days &gt;= ${@business_due_days_from}"/>
<bm:query-field name="business_due_days_to"
queryExpression="t1.business_due_days &lt;= ${@business_due_days_to}"/>
<bm:query-field name="business_due_amount_from"
queryExpression="t1.business_due_amount &gt;= ${@business_due_amount_from}"/>
<bm:query-field name="business_due_amount_to"
queryExpression="t1.business_due_amount &lt;= ${@business_due_amount_to}"/>
<bm:query-field name="owner_user_id" queryExpression="t1.owner_user_id = ${@owner_user_id}"/>
<bm:query-field name="lease_organization" queryExpression="t1.lease_organization = ${@lease_organization}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type = ${@business_type}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.*,
(select hm.bp_name
from hls_bp_master hm
where hm.bp_id = t1.bp_id_tenant) bp_id_tenant_name,
decode(substr((t1.confirmed_rate*100),1,1),'.','0'||(t1.confirmed_rate*100),(t1.confirmed_rate*100))||'%'confirmed_rate
from con_debts_confirmed_tmp t1 where t1.session_id=${/session/@session_id}
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_bad_debts_confirmed_pkg.calc_bad_debts_confirmed(
p_session_id =>${/session/@session_id},
p_calc_date =>to_date(${@end_date},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<!-- <bm:query-fields>-->
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/>-->
<!-- </bm:query-fields>-->
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.*,
(select v.code_value_name from sys_code_values_v v
where v.code = 'CON_DEBTS_CONFIRMED_STATUS'
and v.code_value=t1.confirmed_types)confirmed_types_desc,
decode (t1.confirmed_rate,null,null,decode(substr((t1.confirmed_rate*100),1,1),'.','0'||(t1.confirmed_rate*100),(t1.confirmed_rate*100))||'%') confirmed_rate,
t1.confirmed_amount*t1.confirmed_rate confirmed_sum_amount
from con_debts_confirmed_sum_tmp t1 where t1.session_id=${/session/@session_id} order by t1.confirmed_types
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<!-- <bm:query-fields>-->
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/>-->
<!-- </bm:query-fields>-->
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2014-2-13 下午2:42:08
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.* from (select to_number(to_char(sysdate, 'YYYYMM')) internal_period_num,
to_char(sysdate, 'YYYY') || '-' || to_char(sysdate, 'MM') period_name,
trunc(last_day(sysdate))end_date
from dual
union
select to_number(to_char(add_months(sysdate, -1), 'YYYYMM')) internal_period_num,
to_char(add_months(sysdate, -1), 'YYYY') || '-' ||
to_char(add_months(sysdate, -1), 'MM') period_name,
trunc(last_day(add_months(sysdate,-1)))end_date
from dual
order by internal_period_num desc) t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="period_name" displayWidth="120" forDisplay="true" forQuery="true" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME" prompt="GLD_PERIODS.PERIOD_NAME"/>
<bm:field name="internal_period_num" displayWidth="120" forDisplay="true" forQuery="true" physicalName="INTERNAL_PERIOD_NUM" prompt="期间号"/>
<bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE" prompt="截止日期"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="internal_period_num" queryExpression="t1.internal_period_num=${@internal_period_num}"/>
<bm:query-field name="period_name" queryExpression="t1.period_name=${@period_name}"/>
</bm:query-fields>
</bm:model>
......@@ -206,7 +206,9 @@
nvl((select due_amount-nvl(received_amount,0) from con_contract_cashflow where contract_id=t.repur_contract_id and cf_item=250),0)repur_con_amt,
nvl((select due_amount-nvl(received_amount,0) from con_contract_cashflow where contract_id=t.repur_contract_id and cf_item=250),0)repur_con_ddct_amt,
nvl(t.entrusted_amount,0) entrusted_amount,
decode(t.business_type,'LEASEBACK',(f.due_amount-nvl(t.down_payment,0)-nvl(t.entrusted_amount,0)),'LEASE',0) amount_tenant
decode(t.business_type,'LEASEBACK',(f.due_amount-nvl((select to_number(hd.other_payment2)
from hls_fin_calculator_hd hd
where hd.calc_session_id = t.calc_session_id),0)-nvl(t.entrusted_amount,0)),'LEASE',0) amount_tenant
FROM con_contract_cashflow f
join con_contract t
on t.contract_id = f.contract_id
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
......
......@@ -105,7 +105,7 @@
<a:field name="total_amount"/>
<a:field name="csh_transaction_flag"/>
<a:field name="csh_transaction_flag_desc" options="csh_transaction_flag_ds"
displayField="code_value_name" returnField="code_value" valueField="csh_transaction_flag"/>
displayField="code_value_name" returnField="csh_transaction_flag" valueField="code_value"/>
<a:field name="cf_item"/>
<a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item"
valueField="cf_item"/>
......
......@@ -159,7 +159,7 @@
<a:field name="total_amount"/>
<a:field name="csh_transaction_flag"/>
<a:field name="csh_transaction_flag_desc" options="csh_transaction_flag_ds"
displayField="code_value_name" returnField="code_value" valueField="csh_transaction_flag"/>
displayField="code_value_name" returnField="csh_transaction_flag" valueField="code_value"/>
<a:field name="cf_item"/>
<a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item" valueField="cf_item"/>
<!-- <a:field name="claim_status" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/>-->
......@@ -201,11 +201,11 @@
<a:textField name="vat_invoice_code" bindTarget="acr517_invoice_query_ds" prompt="发票代码" width="120"/>
<a:textField name="invoice_number" bindTarget="acr517_invoice_query_ds" prompt="发票号码" width="120"/>
<a:comboBox name="claim_status_n" bindTarget="acr517_invoice_query_ds" prompt="认领状态" width="120"/>
<a:comboBox name="csh_transaction_flag_desc" bindTarget="acr516_invoice_query_ds" prompt="收款标记"
<a:comboBox name="csh_transaction_flag_desc" bindTarget="acr517_invoice_query_ds" prompt="收款标记"
width="120"/>
<a:textField name="invoice_apply_num" bindTarget="acr516_invoice_query_ds" prompt="申请编号" width="120"/>
<a:datePicker name="invoice_date_from" bindTarget="acr516_invoice_query_ds" prompt="发票日期从" width="120"/>
<a:datePicker name="invoice_date_to" bindTarget="acr516_invoice_query_ds" prompt="发票日期到" width="120"/>
<a:textField name="invoice_apply_num" bindTarget="acr517_invoice_query_ds" prompt="申请编号" width="120"/>
<a:datePicker name="invoice_date_from" bindTarget="acr517_invoice_query_ds" prompt="发票日期从" width="120"/>
<a:datePicker name="invoice_date_to" bindTarget="acr517_invoice_query_ds" prompt="发票日期到" width="120"/>
</a:form>
<a:grid id="acr516_invoice_grid_id" bindTarget="acr517_invoice_result_ds" marginHeight="225" marginWidth="30" navBar="true">
<a:columns>
......
......@@ -9,6 +9,7 @@
trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check"
......@@ -33,7 +34,7 @@
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<!-- <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>-->
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
......@@ -49,6 +50,12 @@
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1_prompt").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1").style.display = "none";
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
$('${/parameter/@layout_code}_G_CONTRACT_RESULT_con_contract_layout_grid_id').hideColumn('branch_code');
$('${/parameter/@layout_code}_G_CONTRACT_RESULT_con_contract_layout_grid_id').hideColumn('branch_code_n');
}
});
function open_contract_win(ds_id, record_id) {
......
......@@ -67,14 +67,15 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds_id == ds.id && ds_id) {
if (record.get('business_type') == 'LEASEBACK'&&'${/parameter/@function_usage}'=='MODIFY') {
record.set('submit_date',null);
record.set('guarantee_letter_f','N');
record.set('guarantee_letter_f_n','否');
record.getField('submit_date').setReadOnly(true);
record.getField('guarantee_letter_f').setReadOnly(true);
record.getField('guarantee_letter_f_n').setReadOnly(true);
}else if(record.get('business_type') == 'LEASE'){
// if (record.get('business_type') == 'LEASEBACK'&&'${/parameter/@function_usage}'=='MODIFY') {
// record.set('submit_date',null);
// record.set('guarantee_letter_f','N');
// record.set('guarantee_letter_f_n','否');
// record.getField('submit_date').setReadOnly(true);
// record.getField('guarantee_letter_f').setReadOnly(true);
// record.getField('guarantee_letter_f_n').setReadOnly(true);
// }else
if(record.get('business_type') == 'LEASE'){
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'none';
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,7 +16,7 @@
<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_pacon_contract_dun_for_queryth}/modules/cont/CON620/con_contract_rent_detail.lview"/>
url="${/request/@context_path}/modules/cont/CON620/con_contract_rent_detail.lview"/>
<a:link id="con_contract_account_detail_link_id"
url="${/request/@context_path}/modules/cont/CON620/con_contract_account_detail.lview"/>
<a:link id="con_contract_query_link_id"
......@@ -24,6 +24,8 @@
<script type="text/javascript"><![CDATA[
function CON601_con_contract_query() {
$('CON620_contract_result_ds').query();
$('CON620_contract_repur_result_ds').query();
}
function CON601_con_contract_reset() {
......@@ -33,9 +35,9 @@
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_detail_link(' + record.id + ');">' + value + '</a></u>';
return '<u><a style="color:red" href="javascript:contract_detail_link(' + record.id + ',\'' + record.ds.id + '\');">' + value + '</a></u>';
} else {
return '<a href="javascript:contract_detail_link(' + record.id + ');">' + value + '</a>';
return '<a href="javascript:contract_detail_link(' + record.id + ',\'' + record.ds.id + '\');">' + value + '</a>';
}
} else if (name == 'bp_id_tenant_desc') {
//商业伙伴查询页面要做好,然后在此处关联。
......@@ -46,7 +48,7 @@
}
} 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>';
......@@ -54,29 +56,29 @@
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 == 'business_due_amount') {
} else if (name == 'business_due_amount') {
if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:contract_business_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a></u>';
return '<u><a style="color:red" href="javascript:contract_business_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
} else {
return '<a href="javascript:contract_business_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a>';
return '<a href="javascript:contract_business_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
}
}else if (name == 'account_due_amount') {
} else if (name == 'account_due_amount') {
if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:contract_account_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a></u>';
return '<u><a style="color:red" href="javascript:contract_account_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
} else {
return '<a href="javascript:contract_account_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a>';
return '<a href="javascript:contract_account_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
}
}else if (name == 'business_received_amount') {
} else if (name == 'business_received_amount') {
if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:business_received_amount_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a></u>';
return '<u><a style="color:red" href="javascript:business_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
} else {
return '<a href="javascript:business_received_amount_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a>';
return '<a href="javascript:business_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
}
}else if (name == 'ac_received_amount') {
} else if (name == 'ac_received_amount') {
if (record.get('overdue_times') > 1) {
return '<u><a style="color:red" href="javascript:ac_received_amount_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a></u>';
return '<u><a style="color:red" href="javascript:ac_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
} else {
return '<a href="javascript:ac_received_amount_link(' + record.id + ');">' + Leaf.formatMoney(value) + '</a>';
return '<a href="javascript:ac_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
}
}
}
......@@ -111,8 +113,8 @@
}
function ac_received_amount_link(id) {
var current_record = $('CON620_contract_result_ds').findById(id);
function ac_received_amount_link(record_id, ds_id) {
var current_record = $(ds_id).findById(record_id);
var record = current_record;
var saveData = [];
for (var k in record.data) {
......@@ -130,12 +132,12 @@
param['url_title'] = '业务冲销详情';
param['company_id'] = '${/session/@company_id}';
//
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_account_detail_link_id', 'CON620_contract_result_ds');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_account_detail_link_id', ds_id);
}
function business_received_amount_link(id) {
function business_received_amount_link(record_id, ds_id) {
//
var current_record = $('CON620_contract_result_ds').findById(id);
var current_record = $(ds_id).findById(record_id);
var record = current_record;
var saveData = [];
for (var k in record.data) {
......@@ -148,18 +150,23 @@
param['document_id'] = current_record.get('contract_id');
// con601_param_set_value(param);
param['document_category'] = 'CONTRACT';
param['function_code'] = 'CON620Q';
if (current_record.get('contract_status') == 'REPURING') {
param['function_code'] = 'CON620QRP';
} else {
param['function_code'] = 'CON620Q';
}
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
param['url_title'] = '业务冲销详情';
param['company_id'] = '${/session/@company_id}';
//
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_account_detail_link_id', 'CON620_contract_result_ds');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_account_detail_link_id', ds_id);
}
function contract_account_link(id) {
var current_record = $('CON620_contract_result_ds').findById(id);
function contract_account_link(record_id, ds_id) {
var current_record = $(ds_id).findById(record_id);
var record = current_record;
var saveData = [];
for (var k in record.data) {
......@@ -177,12 +184,12 @@
param['url_title'] = '催收详情';
param['company_id'] = '${/session/@company_id}';
//
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_dun_detail_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', ds_id);
}
function contract_business_link(id) {
//
var current_record = $('CON620_contract_result_ds').findById(id);
function contract_business_link(record_id, ds_id) {
debugger;
var current_record = $(ds_id).findById(record_id);
var record = current_record;
var saveData = [];
for (var k in record.data) {
......@@ -195,18 +202,22 @@
param['document_id'] = current_record.get('contract_id');
// con601_param_set_value(param);
param['document_category'] = 'CONTRACT';
param['function_code'] = 'CON620D';
if (current_record.get('contract_status') == 'REPURING') {
param['function_code'] = 'CON620RP';
} else {
param['function_code'] = 'CON620D';
}
param['function_usage'] = 'UPDATE';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '催收详情';
param['company_id'] = '${/session/@company_id}';
//
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_dun_detail_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', ds_id);
}
function contract_detail_link(id) {
function contract_detail_link(record_id, ds_id) {
//
var current_record = $('CON620_contract_result_ds').findById(id);
var current_record = $(ds_id).findById(record_id);
var record = current_record;
var saveData = [];
for (var k in record.data) {
......@@ -234,21 +245,21 @@
for (var i = 0; i < datas.length; i++) {
record = datas[i];
if (name == "account_due_amount") {
var r_1 = record.get("account_due_amount")||0;
var r_1 = record.get("account_due_amount") || 0;
var r_2 = parseFloat(r_1);
if (!isNaN(r_2)) {
sum += r_2;
}
}
if (name == "business_due_amount") {
var s_1 = record.get("business_due_amount")||0;
var s_1 = record.get("business_due_amount") || 0;
var s_2 = parseFloat(s_1);
if (!isNaN(s_2)) {
sum2 += s_2;
}
}
if (name == "over_due_amount") {
var t_1 = record.get("over_due_amount")||0;
var t_1 = record.get("over_due_amount") || 0;
var t_2 = parseFloat(t_1);
if (!isNaN(t_2)) {
sum3 += t_2;
......@@ -286,8 +297,9 @@
//
// }
}
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
Leaf.onReady(function () {
if ("${/model/role_info/record/@role_code}" == "0018" || "${/model/role_info/record/@role_code}" == "0019") {
$('CON601_con_contract_grid_ds').hideColumn('account_due_times');
$('CON601_con_contract_grid_ds').hideColumn('account_due_days');
$('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
......@@ -310,13 +322,19 @@
grid_id.hideColumn('account_due_days');
grid_id.hideColumn('account_due_amount');
}
if("${/model/role_info/record/@role_code}"=="0020"||"${/model/role_info/record/@role_code}"=="0030"){
if ("${/model/role_info/record/@role_code}" == "0020" || "${/model/role_info/record/@role_code}" == "0030") {
$('CON601_con_contract_grid_ds').hideColumn('account_due_times');
$('CON601_con_contract_grid_ds').hideColumn('account_due_days');
$('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_received_amount');
$('CON601_con_contract_grid_ds').hideColumn('ac_unreceived_amount');
}
//document.getElementById("repur_select_id").style.backgroundColor = '#657efe';
//jQuery(".aaaa").css("color","#657efe");
// jQuery(".aaaa").css("color","white");
// jQuery(".aaaa").css("background-color","FF7744");
jQuery(".repur_class").css("color","#FF7744");
});
function render_formatDate(value, record, name) {
if (!Ext.isEmpty(value)) {
......@@ -325,6 +343,7 @@
return '';
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -339,14 +358,14 @@
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="CON620_contract_query_ds" autoCreate="true">
<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:mapping>-->
<!-- <a:map from="bp_name" to="bp_id_tenant_n"/>-->
<!-- <a:map from="bp_id" to="bp_id_tenant"/>-->
<!-- </a:mapping>-->
<!-- </a:field>-->
<!-- <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:map from="bp_name" to="bp_id_tenant_n"/>-->
<!-- <a:map from="bp_id" to="bp_id_tenant"/>-->
<!-- </a:mapping>-->
<!-- </a:field>-->
<a:field name="bp_id_tenant_desc"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_id_agent_desc"/>
......@@ -363,8 +382,10 @@
<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: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:dataSet>
<a:dataSet id="CON620_contract_result_ds" autoPageSize="true" autoQuery="true"
......@@ -379,6 +400,11 @@
<a:event name="load" handler="ds_query"/>
</a:events>
</a:dataSet>
<a:dataSet id="CON620_contract_repur_result_ds" autoPageSize="true" autoQuery="true"
model="cont.CON620.con_contract_dun_for_repur_query" queryDataSet="CON620_contract_query_ds"
queryUrl="${/request/@context_path}/autocrud/cont.CON620.con_contract_dun_for_repur_query/query"
selectable="true" selectionModel="single">
</a:dataSet>
<!--<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/>-->
</a:dataSets>
<a:screenBody>
......@@ -389,12 +415,16 @@
<!--<a:gridButton id="CON601_con_contract_print_btn" click="CON601_con_contract_print" text="打印催收函"/>-->
</a:screenTopToolbar>
<a:queryForm title="CON301.CONTRACT_QUERY" style="background-color: white;" id="condition_queryForm" bindTarget="CON620_contract_query_ds" createSearchButton="false" resultTarget="CON620_contract_result_ds" labelWidth="120" marginWidth="30">
<a:queryForm title="CON301.CONTRACT_QUERY" style="background-color: white;" id="condition_queryForm"
bindTarget="CON620_contract_query_ds" createSearchButton="false"
resultTarget="CON620_contract_result_ds" labelWidth="120" marginWidth="30">
<a:formToolBar style="background-color: white;">
<a:box labelWidth="140" column="4" style="width:100%">
<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:textField name="bp_id_tenant_desc" bindTarget="CON620_contract_query_ds" prompt="HLS.TENANT_CODE"/>
<a:textField name="bp_id_tenant_desc" bindTarget="CON620_contract_query_ds"
prompt="HLS.TENANT_CODE"/>
<a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
<a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
......@@ -402,18 +432,30 @@
</a:formToolBar>
<a:formBody style="background-color: white;">
<a:box labelWidth="120" column="4">
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="逾期期数(营业)从" allowDecimals="false"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="逾期期数(营业)到" allowDecimals="false"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="逾期天数(营业)从" allowDecimals="false"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="逾期天数(营业)到" allowDecimals="false"/>
<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:numberField id="account_due_times_from_id" name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)从" allowDecimals="false"/>
<a:numberField id="account_due_times_to_id" name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)到" allowDecimals="false"/>
<a:numberField id="account_due_days_from_id" name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)从" allowDecimals="false"/>
<a:numberField id="account_due_days_to_id" name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)到" allowDecimals="false"/>
<a:numberField id="account_due_amount_from_id" name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)从"/>
<a:numberField id="account_due_amount_to_id" name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)到"/>
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds"
prompt="逾期期数(营业)从" allowDecimals="false"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds"
prompt="逾期期数(营业)到" allowDecimals="false"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds"
prompt="逾期天数(营业)从" allowDecimals="false"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds"
prompt="逾期天数(营业)到" allowDecimals="false"/>
<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:numberField id="account_due_times_from_id" name="account_due_times_from"
bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)从" allowDecimals="false"/>
<a:numberField id="account_due_times_to_id" name="account_due_times_to"
bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)到" allowDecimals="false"/>
<a:numberField id="account_due_days_from_id" name="account_due_days_from"
bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)从" allowDecimals="false"/>
<a:numberField id="account_due_days_to_id" name="account_due_days_to"
bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)到" allowDecimals="false"/>
<a:numberField id="account_due_amount_from_id" name="account_due_amount_from"
bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)从"/>
<a:numberField id="account_due_amount_to_id" name="account_due_amount_to"
bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)到"/>
</a:box>
</a:formBody>
</a:queryForm>
......@@ -438,57 +480,142 @@
<a:numberField id="account_due_amount_to_id" name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)到"/>
</a:form>-->
<a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="100"
marginWidth="30" navBar="true" height="1000">
<a:columns>
<a:tabPanel marginHeight="145" marginWidth="15">
<a:tabs>
<a:tab prompt="正常合同逾期租金" width="130" >
<a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="215"
marginWidth="50" navBar="true">
<a:columns>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" lock="true" width="100"/>
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
renderer="CON620_render_contract_dun_grid" width="100"/>
<!-- <a:column name="contract_name" align="center"-->
<!-- prompt="合同名称" width="120"/>-->
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true"
width="100"
align="center"/>
<a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100"
renderer="render_formatDate"/>
<a:column name="min_overdue_times" align="center" prompt="预定支付期数" width="100"/>
<a:column prompt="营业">
<a:column name="business_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="business_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="逾期金额"
renderer="CON620_render_contract_dun_grid"
footerRenderer="summaryRenderer"
width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金"
renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_received_amount" align="right" prompt="已收租金"
renderer="CON620_render_contract_dun_grid"
footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_unreceived_amount" align="right" prompt="未收租金"
renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
</a:column>
<a:column prompt="会计">
<a:column name="account_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="account_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="account_due_amount" align="right" prompt="逾期金额"
renderer="CON620_render_contract_dun_grid"
footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_received_amount" align="right" prompt="已收租金"
renderer="CON620_render_contract_dun_grid"
footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_unreceived_amount" align="right" prompt="未收租金"
renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
</a:column>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60"
/>
<a:column name="modelcd" align="center" prompt="机型" width="100"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁开始日" width="100"/>
<a:column name="lease_times" align="center" prompt="期数" width="100"/>
<a:column name="total_due_amount" align="right" prompt="租金合计" width="100"
renderer="Leaf.formatMoney"/>
<!-- <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="分期回购逾期租金" width="130" id="repur_select_id" tabClassName="repur_class" >
<a:grid id="CON620_contract_repur_result_grid_ds" bindTarget="CON620_contract_repur_result_ds"
marginHeight="215"
marginWidth="50" navBar="true" >
<a:columns>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" lock="true" width="100"/>
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
renderer="CON620_render_contract_dun_grid" width="100"/>
<!-- <a:column name="contract_name" align="center"-->
<!-- prompt="合同名称" width="120"/>-->
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true" width="100"
align="center"/>
<a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100" renderer="render_formatDate"/>
<a:column name="min_overdue_times" align="center" prompt="预定支付期数" width="100"/>
<a:column prompt="营业">
<a:column name="business_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="business_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="逾期金额" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" lock="true" width="100"/>
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
renderer="CON620_render_contract_dun_grid" width="100"/>
<!-- <a:column name="contract_name" align="center"-->
<!-- prompt="合同名称" width="120"/>-->
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true"
width="100"
align="center"/>
<a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100"
renderer="render_formatDate"/>
<a:column name="min_overdue_times" align="center" prompt="预定支付期数" width="100"/>
<a:column prompt="营业">
<a:column name="business_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="business_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="逾期金额"
renderer="CON620_render_contract_dun_grid"
footerRenderer="summaryRenderer"
width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_received_amount" align="right" prompt="已收租金" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_unreceived_amount" align="right" prompt="未收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
</a:column>
<a:column prompt="会计">
<a:column name="account_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="account_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="account_due_amount" align="right" prompt="逾期金额" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_received_amount" align="right" prompt="已收租金" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_unreceived_amount" align="right" prompt="未收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
</a:column>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/>
<a:column name="modelcd" align="center" prompt="机型" width="100"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁开始日" width="100"/>
<a:column name="lease_times" align="center" prompt="期数" width="100"/>
<a:column name="total_due_amount" align="right" prompt="租金合计" width="100" renderer="Leaf.formatMoney"/>
<!-- <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
</a:columns>
</a:grid>
<a:column name="over_due_amount" align="right" prompt="违约金"
renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_received_amount" align="right" prompt="已收租金"
renderer="CON620_render_contract_dun_grid"
footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_unreceived_amount" align="right" prompt="未收租金"
renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
</a:column>
<!-- <a:column prompt="会计">-->
<!-- <a:column name="account_due_times" align="center" prompt="逾期期数"-->
<!-- width="100"/>-->
<!-- <a:column name="account_due_days" align="center" prompt="逾期天数"-->
<!-- width="100"/>-->
<!-- <a:column name="account_due_amount" align="right" prompt="逾期金额" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"-->
<!-- width="100"/>-->
<!-- <a:column name="ac_received_amount" align="right" prompt="已收租金" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"-->
<!-- width="100"/>-->
<!-- <a:column name="ac_unreceived_amount" align="right" prompt="未收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"-->
<!-- width="100"/>-->
<!-- </a:column>-->
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60"
/>
<a:column name="modelcd" align="center" prompt="机型" width="100"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="100"/>
<a:column name="lease_start_date" align="center" prompt="分期回购开始日" width="100"/>
<a:column name="lease_times" align="center" prompt="分期期数" width="100"/>
<a:column name="total_due_amount" align="right" prompt="分期回购款合计" width="100"
renderer="Leaf.formatMoney"/>
<!-- <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:view>
<a:link id="con_bad_debts_confirmed_calc_id" model="cont.CON8000.con_bad_debts_confirmed_query"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<script type="text/javascript"><![CDATA[
// 退出按钮
function con_bad_debts_confirmed_reset() {
$('con_bad_debts_confirmed_query_ds').reset();
}
function con_bad_debts_confirmed_query() {
if ($('con_bad_debts_confirmed_query_ds').validate()) {
var headers_ds = $('con_bad_debts_confirmed_query_ds');
var record = headers_ds.getAt(0);
Leaf.Masker.mask(Ext.getBody(), '正在统计并查询,请稍等...');
Leaf.request({
url: $('con_bad_debts_confirmed_calc_id').getUrl(),
para: {
end_date: record.get('end_date')
},
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
$('con_bad_debts_confirmed_result_ds').query();
$('con_bad_debts_confirmed_sum_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
function CON620_render_contract_dun_grid(value, record, name) {
if (name == 'contract_number') {
return '<a href="javascript:contract_detail_link(' + record.id + ',\'' + record.ds.id + '\');">' + value + '</a>';
}
}
function contract_detail_link(record_id,ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['document_id'] = record.get('contract_id');
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
//hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', null);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="con_bad_debts_confirmed_query_ds" autoCreate="true">
<a:fields>
<a:field name="period_name" lovGridHeight="100" lovHeight="100"
lovService="cont.CON8000.gld_periods"
lovWidth="500" required="true" title="GLD_PERIODS.PERIOD_NAME" prompt="期间">
<a:mapping>
<a:map from="period_name" to="period_name"/>
<a:map from="end_date" to="end_date"/>
</a:mapping>
</a:field>
<a:field name="end_date"/>
</a:fields>
</a:dataSet>
<a:dataSet id="con_bad_debts_confirmed_result_ds" autoPageSize="true"
model="cont.CON8000.con_bad_debts_confirmed_query"
queryDataSet="con_bad_debts_confirmed_query_ds"
/>
<a:dataSet id="con_bad_debts_confirmed_sum_ds" autoPageSize="true"
model="cont.CON8000.con_bad_debts_confirmed_sum_query"
queryDataSet="con_bad_debts_confirmed_query_ds"
/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="con_bad_debts_confirmed_reset" text="HLS.RESET"/>
<a:gridButton click="con_bad_debts_confirmed_query" text="HLS.QUERY"/>
</a:screenTopToolbar>
<a:form column="1" labelWidth="130" marginWidth="50">
<a:lov name="period_name" prompt="期间"
bindTarget="con_bad_debts_confirmed_query_ds" renderer="Leaf.formatDate"/>
</a:form>
<a:tabPanel marginHeight="100" marginWidth="50">
<a:tabs>
<a:tab prompt="分期回购合同计提对象金额" width="190">
<a:grid id="con_bad_debts_confirmed_result_id" bindTarget="con_bad_debts_confirmed_result_ds"
marginHeight="150" marginWidth="238" navBar="true">
<a:columns>
<a:column name="contract_number" prompt="合同编号" width="200" align="center" renderer="CON620_render_contract_dun_grid"/>
<a:column name="bp_id_tenant_name" prompt="承租人名称" width="230" align="center"/>
<a:column name="principal_due_sum" prompt="本金应收金额合计" renderer="Leaf.formatMoney"
width="125" align="right"/>
<a:column name="principal_received_sum" prompt="本金已收金额合计" renderer="Leaf.formatMoney"
width="125" align="right"/>
<a:column name="over_due_max_days" prompt="最大逾期天数"
width="120" align="center"/>
<a:column name="confirmed_amount" prompt="计提对象金额" renderer="Leaf.formatMoney"
width="120" align="right"/>
<a:column name="confirmed_rate" prompt="计提率"
width="120" align="right"/>
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="分期回购坏账计提合计" width="180">
<a:grid id="con_bad_debts_confirmed_sum_id" bindTarget="con_bad_debts_confirmed_sum_ds"
marginHeight="150" marginWidth="238" navBar="true">
<a:columns>
<a:column name="confirmed_types_desc" prompt="债券状况" width="250" align="center"/>
<a:column name="customer_count" prompt="计提对象客户数" width="250" align="center"/>
<a:column name="confirmed_amount" prompt="计提对象金额" renderer="Leaf.formatMoney" width="250" align="right"/>
<a:column name="confirmed_rate" prompt="计提率" width="250" align="right"/>
<a:column name="confirmed_sum_amount" prompt="计提金额" align="right"
renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -1553,7 +1553,7 @@
unlock_calc_current_window();
return;
}
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}' == 'LEASE') {
//if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}' == 'LEASE') {
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
......@@ -1564,6 +1564,7 @@
var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list;
var down_payment_rate_new = res.result.down_payment_rate_new;
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}' == 'LEASE') {
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
//比例=(H16+H97)/(H99+H102-H16)
var H16, H97, H99, H102;
......@@ -1590,34 +1591,56 @@
return false;
}
}
}
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
if (price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') {
if (payment_deduction != 'TRADE_IN' && payment_deduction != 'TRI_AGREEMENT') {
var record = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (record[i].get('column_code') == 'H109') {
record[i].set('column_value', 0);
record[i].set('column_value_c', 0);
var a = document.getElementById('hls_fin_calculator_hd_grid_id_column_value_' + record[i].id);
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;
if('${/parameter/@business_type}' == 'LEASE'){
if (payment_deduction != 'TRADE_IN' && payment_deduction != 'TRI_AGREEMENT') {
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', 0);
// temp_head_records[i].set('column_value_c',0);
}
// var record = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// if (record[i].get('column_code') == 'H109') {
// record[i].set('column_value', 0);
// record[i].set('column_value_c', 0);
// var a = document.getElementById('hls_fin_calculator_hd_grid_id_column_value_' + record[i].id);
// 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;
// }
// }
} else {
var H16;
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value');
}
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', H16);
// temp_head_records[i].set('column_value_c',0);
}
}
} else {
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
}else if( '${/parameter/@business_type}' == 'LEASEBACK'){
if (payment_deduction != 'DOWN_PAYMENT_DEDUCTION') {
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', 0);
temp_head_records[i].set('column_value_c',0);
}
// var record = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// if (record[i].get('column_code') == 'H109') {
// record[i].set('column_value', 0);
// record[i].set('column_value_c', 0);
// var a = document.getElementById('hls_fin_calculator_hd_grid_id_column_value_' + record[i].id);
// 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;
// }
// }
} else {
var H16;
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value');
......@@ -1627,8 +1650,41 @@
// temp_head_records[i].set('column_value_c',0);
}
}
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
// if (price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') {
// if (payment_deduction != 'TRADE_IN' && payment_deduction != 'TRI_AGREEMENT') {
// var record = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// if (record[i].get('column_code') == 'H109') {
// record[i].set('column_value', 0);
// record[i].set('column_value_c', 0);
// var a = document.getElementById('hls_fin_calculator_hd_grid_id_column_value_' + record[i].id);
// 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;
// }
// }
// } else {
// var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// var H16;
// if (temp_head_records[i].get('column_code') == 'H16') {
// H16 = temp_head_records[i].get('column_value');
// }
// if (temp_head_records[i].get('column_code') == 'H109') {
// temp_head_records[i].set('column_value', H16);
// // temp_head_records[i].set('column_value_c',0);
// }
// }
// }
// }
function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
if (typeof (nextStep) == 'function') {
......@@ -1663,47 +1719,47 @@
});
} else {
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
var H16;
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value');
}
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', H16);
// temp_head_records[i].set('column_value_c',0);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
if (typeof (nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess_new);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
// } else {
// var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
// $('temp_hd_attribute_ds').create(temp_head_records[i].data);
// }
// var H16;
// if (temp_head_records[i].get('column_code') == 'H16') {
// H16 = temp_head_records[i].get('column_value');
// }
// if (temp_head_records[i].get('column_code') == 'H109') {
// temp_head_records[i].set('column_value', H16);
// // temp_head_records[i].set('column_value_c',0);
// }
// }
// var all_records = $('temp_hd_attribute_ds').getAll();
// var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
// headRecord.isNew = false;
// headRecord.dirty = true;
// create_record_column(all_records, headRecord);
//
// function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
// if (typeof (nextStep) == 'function') {
// nextStep(source_procedure);
// } else {
// function on_ln_formula_load(ds) {
// Leaf.SideBar.enable = true;
// success_sidebar_show();
// unlock_calc_current_window();
// $('ln_formula_ds').un('load', on_ln_formula_load);
// }
//
// $('ln_formula_ds').on('load', on_ln_formula_load);
// $('ln_formula_ds').query();
// }
// }
//
// $('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess_new);
// Leaf.SideBar.enable = false;
// $('hls_fin_cal_save_hd_ds').submit();
// }
}
......
......@@ -12,6 +12,7 @@
<a:model-query fetchAll="true" model="hls.HLS303.hls_bp_agentemployee_id" rootPath="employee_id_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.amount_check" rootPath="amount_check"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<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'];
......@@ -603,10 +604,10 @@
}
//业务类型回租时,默认只读“首付款抵扣”选项
if (record.get('business_type') == 'LEASEBACK') {
record.set('payment_deduction', 'DOWN_PAYMENT_DEDUCTION');
record.set('payment_deduction_n', "首付款抵扣");
record.getField('payment_deduction').setReadOnly(true);
record.getField('payment_deduction_n').setReadOnly(true);
// record.set('payment_deduction', 'DOWN_PAYMENT_DEDUCTION');
// record.set('payment_deduction_n', "首付款抵扣");
// record.getField('payment_deduction').setReadOnly(true);
// record.getField('payment_deduction_n').setReadOnly(true);
record.set('pay_method', 'WIRE_TRANSFER');
record.set('pay_method_n', "电汇");
record.getField('pay_method').setReadOnly(true);
......@@ -617,8 +618,15 @@
record.getField('bank_account_id_n').setRequired(false);
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code='${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)&&bp_code!== 'D00010001'&&bp_code!=='D00000009') {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE').style.display = 'none';
}
}
};
......
......@@ -49,11 +49,11 @@
var invoice_agent_id = '${/model/user_agent_description/record/@bp_id}';
var invoice_agent_id_n = '${/model/user_agent_description/record/@bp_name}';
head_record.set('unit_id', '${/model/4s_root_path/record/@value_code}');
head_record.set('unit_id_n', '${/model/4s_root_path/record/@value_name}');
//head_record.set('unit_id', '${/model/4s_root_path/record/@value_code}');
//head_record.set('unit_id_n', '${/model/4s_root_path/record/@value_name}');
head_record.set('company_id', '${/model/company_info_path/record/@company_id}');
head_record.set('company_id_n', '${/model/company_info_path/record/@company_short_name}');
head_record.set('invoice_agent_id', '${/model/prj_project_invoice_agent_id_dafault_value_path/record/@bp_id}');
//head_record.set('invoice_agent_id', '${/model/prj_project_invoice_agent_id_dafault_value_path/record/@bp_id}');
// head_record.set('invoice_agent_id', '${/model/prj_project_invoice_agent_id_dafault_value_path/record/@bp_id}');
// head_record.set('invoice_agent_id_n', '${/model/prj_project_invoice_agent_id_dafault_value_path/record/@bp_id_n}');
head_record.set('invoice_agent_id', invoice_agent_id);
......
......@@ -10,7 +10,10 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query
defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)"
model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<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'];
......@@ -60,7 +63,8 @@
<!--<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="prj_check_prj_record_link_n" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<a:link id="get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<a:link id="get_atch_download_link"
url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
......@@ -359,9 +363,9 @@
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}*/
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
if ('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
......@@ -430,7 +434,7 @@
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
if(record.get('cdd_item') == 'ADD_ATTACH'){
if (record.get('cdd_item') == 'ADD_ATTACH') {
link_function = 'prj501n_upload_file_new';
}
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
......@@ -477,8 +481,7 @@
// url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
link_function = 'show_viewer_more';
url = url + '<a href="javascript:window[\'' + link_function + '\'](\'' + link + '\',\'' + temp[1] + '\',\'' + temp[0] + '\',\'' + value + '\');">' + temp[0] + '</a>' + ',';
}
else {
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
......@@ -822,6 +825,7 @@
strJs = strJs.substr(0, strJs.length - 1) + '})';
return eval(strJs);
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
......@@ -861,10 +865,10 @@
}
//业务类型回租时,默认只读“首付款抵扣”选项
if (record.get('business_type') == 'LEASEBACK') {
record.set('payment_deduction', 'DOWN_PAYMENT_DEDUCTION');
record.set('payment_deduction_n', "首付款抵扣");
record.getField('payment_deduction').setReadOnly(true);
record.getField('payment_deduction_n').setReadOnly(true);
//record.set('payment_deduction', 'DOWN_PAYMENT_DEDUCTION');
//record.set('payment_deduction_n', "首付款抵扣");
//record.getField('payment_deduction').setReadOnly(true);
//record.getField('payment_deduction_n').setReadOnly(true);
record.set('pay_method', 'WIRE_TRANSFER');
record.set('pay_method_n', "电汇");
record.getField('pay_method').setReadOnly(true);
......@@ -875,6 +879,21 @@
record.getField('bank_account_id_n').setRequired(false);
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
if (document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE')) {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE').style.display = 'none';
}
}
if (Ext.isEmpty(bp_code)) {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
}
}
......@@ -1031,7 +1050,7 @@
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n') {
//if (!bp_tenant_detail_r.get(key)) {
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)=== "") {
if (typeof bp_tenant_detail_r.get(key) == "null" || typeof bp_tenant_detail_r.get(key) == "undefined" || bp_tenant_detail_r.get(key) === "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
return;
}
......@@ -1154,7 +1173,7 @@
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n') {
//if (!bp_tenant_detail_r.get(key)) {
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)=== "") {
if (typeof bp_tenant_detail_r.get(key) == "null" || typeof bp_tenant_detail_r.get(key) == "undefined" || bp_tenant_detail_r.get(key) === "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
......@@ -1176,7 +1195,7 @@
var prj_project_record = $(prj_project_ds_id).getAt(0);
var project_id = prj_project_record.get('project_id');
var project_number = prj_project_record.get('project_number');
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT'+ '&doc_code=' + project_number;
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT' + '&doc_code=' + project_number;
window.open(href = url_l, target = "_self");
};
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<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'];
......@@ -748,10 +749,10 @@
//业务类型回租时,默认只读“首付款抵扣”选项
if (record.get('business_type') == 'LEASEBACK') {
record.set('payment_deduction', 'DOWN_PAYMENT_DEDUCTION');
record.set('payment_deduction_n', "首付款抵扣");
record.getField('payment_deduction').setReadOnly(true);
record.getField('payment_deduction_n').setReadOnly(true);
// record.set('payment_deduction', 'DOWN_PAYMENT_DEDUCTION');
// record.set('payment_deduction_n', "首付款抵扣");
// record.getField('payment_deduction').setReadOnly(true);
// record.getField('payment_deduction_n').setReadOnly(true);
record.set('pay_method', 'WIRE_TRANSFER');
record.set('pay_method_n', "电汇");
record.getField('pay_method').setReadOnly(true);
......@@ -762,6 +763,20 @@
record.getField('bank_account_id_n').setRequired(false);
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
if (document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE')) {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE').style.display = 'none';
}
}
if (Ext.isEmpty(bp_code)) {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
}
}
};
......
......@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
......@@ -124,7 +125,7 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
......@@ -145,6 +146,13 @@
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID").style.display = "none";
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
$('${/parameter/@layout_code}_G_PROJECT_RESULT_prj_project_layout_grid_id').hideColumn('branch_code');
$('${/parameter/@layout_code}_G_PROJECT_RESULT_prj_project_layout_grid_id').hideColumn('branch_code_n');
}
});
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&amp;function_code=PRJ501"/>
......
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