Commit 764950ed authored by lizhe's avatar lizhe

Merge remote-tracking branch 'origin/master'

parents bb8f4cdf ea4382ca
......@@ -1097,8 +1097,7 @@
<select id="selectContractDetailList" parameterType="integer" resultType="java.util.HashMap">
Select
hb.bp_name,
Select hb.bp_name,
c.contract_number,
(Select cl.machine_number
From con_contract_lease_item cl
......@@ -1107,6 +1106,20 @@
From con_contract c, hls_bp_master hb
Where c.bp_id_tenant = hb.bp_id
and c.contract_id = #{contractId}
and nvl(division, '-1') not IN ('70', '92')
union all
Select hb.bp_name,
c.contract_number,
(Select cl.machine_number_70
From con_contract_lease_item cl
Where cl.contract_id = c.contract_id) As machine_number,
to_char(Sysdate, 'yyyy"年"mm"月"dd"日"') As today
From con_contract c, hls_bp_master hb
Where c.bp_id_tenant = hb.bp_id
and c.contract_id = #{contractId}
and nvl(division, '-1') IN ('70', '92')
</select>
......
......@@ -37,14 +37,14 @@
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
and PARENT_UNIT_ID <> 1544
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91'))
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'DIVISION'
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91')
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60')
AND NOT EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
......
<?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 contract_status
from con_contract t
where t.contract_id = ${@contract_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="contract_status"/>
</bm:fields>
</bm:model>
......@@ -53,6 +53,7 @@
<bm:field name="sign_contract_status_n"/>
<bm:field name="bp_id_tenant_n"/>
<bm:field name="bp_id_agent_level1_n"/>
<bm:field name="project_status"/>
<bm:field name="is_constru_unit"/>
</bm:fields>
<bm:primary-key>
......
......@@ -244,7 +244,9 @@
From sys_code_values_v v
Where v.code = 'SEND_MESSAGE'
And cc.send_message = v.code_value ) send_message_n,
cc.cell_phone
cc.cell_phone,
cc.lease_item_amount,
cc.contract_amount
FROM con_contract cc
WHERE
EXISTS(SELECT 1
......@@ -274,9 +276,267 @@
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
or (decode(${/session/@user_id}, 10600, 1, 2) = 2)) and nvl(division,'-1') not IN ('70','92')
union all
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,
-- add by lihh 20210317 租赁物
(SELECT v.code_value_name
FROM sys_code_values_v v
where v.code = 'DIVISION'
and v.code_value = cc.division) division_n,
cc.division,
contract_item_query_pkg.calc_ac_overdue_times(p_contract_id => cc.contract_id,
p_calc_date => SYSDATE,
p_user_id => -1) account_due_times,
contract_item_query_pkg.calc_ac_overdue_days(p_contract_id => cc.contract_id,
p_calc_date => SYSDATE,
p_user_id => -1) account_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 (1, 8, 250)
AND trunc(ccc.due_date) <= trunc(SYSDATE)) -
nvl((SELECT SUM(nvl(gwo.write_off_amount, 0))
FROM gld_write_off gwo, con_contract_cashflow ccw
WHERE gwo.reversed_flag = 'N'
AND gwo.contract_id = cc.contract_id
AND gwo.cf_item IN (1, 8, 250)
and gwo.cf_item = ccw.cf_item
and gwo.times = ccw.times
and ccw.cf_status='RELEASE'
and gwo.contract_id = ccw.contract_id
AND trunc(ccw.due_date) <= trunc(SYSDATE)), 0) 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 (1, 8, 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 (1, 8, 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,
--营业逾期总金额
(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_item = 9
AND ccc.write_off_flag <> 'FULL'
and ccc.cf_status = 'RELEASE') 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.cf_status = 'RELEASE'
AND ccc.due_date <= sysdate
AND ccc.cf_item in (1, 8, 9)
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
(1, 8, 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 (1, 8, 250)
) business_unreceived_amount,
--会计已收租金
nvl((SELECT SUM(nvl(gwo.write_off_amount, 0))
FROM gld_write_off gwo
WHERE gwo.reversed_flag = 'N'
AND gwo.contract_id = cc.contract_id
AND gwo.cf_item IN (1, 8, 250)),
0) ac_received_amount,
--会计未收租金
(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 (1, 8, 250)
) -
nvl((SELECT SUM(nvl(gwo.write_off_amount, 0))
FROM gld_write_off gwo
WHERE gwo.reversed_flag = 'N'
AND gwo.contract_id = cc.contract_id
AND gwo.cf_item IN (1, 8, 250)),
0) ac_unreceived_amount,
--机型
(SELECT ccli.modelcd
FROM con_contract_lease_item ccli
WHERE ccli.contract_id = cc.contract_id) modelcd,
--机号
(SELECT ccli.machine_number_70
FROM con_contract_lease_item ccli
WHERE ccli.contract_id = cc.contract_id) machine_number,
to_char(cc.lease_start_date, 'yyyy-mm-dd') lease_start_date,
cc.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 (1, 8, 250)
) total_due_amount,
cc.contract_status,
cc.BUSINESS_TYPE/*,
(Select Count(1)
From con_contract_cashflow ccc
Where ccc.contract_id = cc.contract_id
And ccc.cf_item = 1
And ccc.cf_status = 'RELEASE'
And ccc.cf_direction <> 'NONCASH'
And nvl(ccc.overdue_status, 'N') = 'Y'
And ccc.due_amount > nvl(ccc.received_amount, 0)) As business_due_times, -- 营业逾期期数
(Select Max(ccc.overdue_max_days)
From con_contract_cashflow ccc
Where ccc.contract_id = cc.contract_id
And ccc.cf_item = 1
And ccc.cf_status = 'RELEASE'
And ccc.cf_direction <> 'NONCASH'
And nvl(ccc.overdue_status, 'N') = 'Y'
And ccc.due_amount > nvl(ccc.received_amount, 0)) As business_due_days, -- 营业逾期天数
(Select Count(1)
From con_contract_cashflow ccc
Where ccc.contract_id = cc.contract_id
And ccc.cf_item = 1
And ccc.cf_status = 'RELEASE'
And ccc.cf_direction <> 'NONCASH'
And nvl(ccc.overdue_status, 'N') = 'Y'
And ccc.due_amount >
nvl((Select Sum(nvl(gwo.write_off_amount, 0))
From gld_write_off gwo
Where gwo.reversed_flag = 'N'
And gwo.contract_id = ccc.contract_id
And gwo.times = ccc.times
And gwo.cf_item = ccc.cf_item),
0)) As account_due_times, -- 会计逾期期数
(Select floor(Sysdate - Min(ccc.due_date))
From con_contract_cashflow ccc
Where ccc.contract_id = cc.contract_id
--modify by shen 不统计留购价
And ccc.cf_item In (1)
And ccc.cf_status = 'RELEASE'
And trunc(ccc.due_date) <= trunc(Sysdate)
And ccc.due_amount >
nvl((Select Sum(nvl(gwo.write_off_amount, 0))
From gld_write_off gwo
Where gwo.reversed_flag = 'N'
And gwo.contract_id = ccc.contract_id
And gwo.times = ccc.times
And gwo.cf_item = ccc.cf_item),
0)) As account_due_days -- 会计逾期天数*/
,(select to_char(max(t.creation_date), 'yyyy-mm-dd')
from cux_rent_dun_msg t
where t.contract_id = cc.contract_id) dun_date,
cc.send_message,
(select v.code_value_name
From sys_code_values_v v
Where v.code = 'SEND_MESSAGE'
And cc.send_message = v.code_value ) send_message_n,
cc.cell_phone,
cc.lease_item_amount,
cc.contract_amount
FROM con_contract cc
WHERE
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.overdue_status = 'Y'
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))
and nvl(division,'-1') IN ('70','92')) t1
#WHERE_CLAUSE#
]]>
</bm:query-sql>
......
......@@ -188,7 +188,181 @@
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
or (decode(${/session/@user_id}, 10600, 1, 2) = 2))
and nvl(division,'-1') not IN ('70','92')
union all
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_70
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
,(select to_char(max(t.creation_date), 'yyyy-mm-dd')
from cux_rent_dun_msg t
where t.contract_id = cc.contract_id) dun_date,
cc.send_message,
(select v.code_value_name
From sys_code_values_v v
Where v.code = 'SEND_MESSAGE'
And cc.send_message = v.code_value ) send_message_n,
cc.cell_phone
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)) and nvl(division,'-1') IN ('70','92')
) t1
#WHERE_CLAUSE#
......
......@@ -22,12 +22,12 @@
t1.contract_status in ('INCEPT','NEW','ETING','REPURING')
and t1.data_class = 'NORMAL'
and t1.company_id in ((
select company_id
select company_id
from fnd_companies t
where t.company_id = ${/session/@company_id} or
t.parent_company_id = ${/session/@company_id}
union
select t.parent_company_id company_id
union
select t.parent_company_id company_id
from fnd_companies t
where t.parent_company_id is not null
and (t.company_id = ${/session/@company_id} or t.parent_company_id = ${/session/@company_id})))
......@@ -60,11 +60,12 @@ select t.parent_company_id company_id
<!--<bm:query-field name="bp_id"
queryExpression="(t.bp_id_tenant = ${@bp_id} or t.bp_id_agent_level1 = ${@bp_id} or ((select bp_category from hls_bp_master where bp_id = ${@bp_id}) = 'VENDER'))"/>-->
<bm:query-field name="bp_id" queryExpression="(Exists (Select 1
From hls_bp_master h, hls_bp_master_role hbr
From hls_bp_master h, hls_bp_master_role hbr,con_contract_bp bp
Where h.bp_name in ( select hbm.bp_name from hls_bp_master hbm where hbm.bp_id= ${@bp_id})
and hbr.bp_id = h.bp_id
and hbr.bp_type = 'TENANT'
and h.bp_id = t.bp_id_tenant) Or not Exists
and h.bp_id= bp.bp_id
and hbr.bp_type in('TENANT','GUTA_NP')
and bp.contract_id=t.contract_id) Or not Exists
(Select 1
From hls_bp_master h, hls_bp_master_role hbr
Where h.bp_id = ${@bp_id}
......@@ -73,4 +74,18 @@ select t.parent_company_id company_id
))"/>
<bm:query-field name="bp_name" queryExpression="t.bp_name like '%' || ${@bp_name} || '%'"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" Expression=" exists
(select 1
from con_contract_cashflow ccc
where ccc.contract_id = t.contract_id
and ccc.cf_status = 'RELEASE'
and ccc.write_off_flag != 'FULL'
and ccc.cf_direction = 'INFLOW'
and ccc.cf_item not in (251)
and ((nvl(${@deposit_flag}, 'N') = 'Y' and cf_item in (1, 8, 9, 200, 11, 250)) or
(nvl(${@deposit_flag}, 'N') = 'N'))
and ccc.due_amount - nvl(ccc.received_amount, 0)>0
)"/>
</bm:data-filters>
</bm:model>
......@@ -47,118 +47,10 @@
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
t1.journal_type
FROM hls_journal_header_imp t1
where
EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('014'))
and t1.journal_type in('COST_IMPORT','GLOBAL_TEMPLATE')
union
select t1.journal_header_id,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
t1.total_amount_dr,
t1.total_amount_cr,
(select c.company_short_name
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1
where
EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('012'))
and t1.journal_type in('FUND_POOL','FINANCIAL_TEMPLATE')
union
select t1.journal_header_id,
t1.batch_id,
t1.batch_number,
t1.reverse_batch_number,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
t1.total_amount_dr,
t1.total_amount_cr,
(select c.company_short_name
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1
where
EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('0033','025'))
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES')
where t1.created_by=${/session/@user_id}
union
select t1.journal_header_id,
t1.batch_id,
......@@ -197,18 +89,12 @@
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
t1.journal_type
FROM hls_journal_header_imp t1
where EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('002','013') or ${/session/@user_id} = 10418
where ${/session/@user_id}=10418
and(t1.wfl_status in ('APPROVING', 'REJECT', 'APPROVED')
)
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES','COST_IMPORT','FUND_POOL','GLOBAL_TEMPLATE','FINANCIAL_TEMPLATE')
) t1
#WHERE_CLAUSE#
......
......@@ -46,11 +46,7 @@
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
t1.journal_type
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
......
......@@ -43,10 +43,7 @@
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id) post_gl_status
t1.journal_type
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
......
......@@ -17,6 +17,8 @@
10413,
'NO',
(Select decode(t.role_code,
'0009',
'NO',
'0014',
'YES',
'0013',
......
......@@ -143,6 +143,118 @@
}
}
//去除数据空格
function remove_space(table_name,field_name,aurora_bm_field){
//租赁项目信息,客户类型,催收手机号,交货地址,租赁物安置地点,合同签订地
if(table_name.toUpperCase()=='PRJ_PROJECT'){
if(field_name.toUpperCase()=='BP_CLASS' || field_name.toUpperCase()=='CELL_PHONE'
|| field_name.toUpperCase()=='DELIVERY_ADDRESS' || field_name.toUpperCase()=='LEASE_ITEM_LOCATION'
|| field_name.toUpperCase()=='SIGNING_CITY'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//项目报告_租赁物信息,序号,品牌名称,租赁物,机型,机号,使用小时,留购价,二手机评估价,台数
if(table_name.toUpperCase()=='PRJ_PROJECT_LEASE_ITEM'){
if(field_name.toUpperCase()=='LEASE_ITEM_SEQ' || field_name.toUpperCase()=='BRAND_VALUE' ||
field_name.toUpperCase()=='LEASE_ITEM_ID' || field_name.toUpperCase()=='MODELCD' ||
field_name.toUpperCase()=='MACHINE_NUMBER' || field_name.toUpperCase()=='MACHINE_NUMBER_70' ||
field_name.toUpperCase()=='USING_HOUR' || field_name.toUpperCase()=='DETENTION_AMOUNT' ||
field_name.toUpperCase()=='DETENTION_AMOUNT' || field_name.toUpperCase()=='SET_NUMBER'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//承租人评分明细表,房产价值,家庭平均月收入,工程平均月收入,工程合同金额,第三方担保附件份数,年龄,铁甲评分
if(table_name.toUpperCase()=='BP_TENANT_RATE_DETAIL'){
if(field_name.toUpperCase()=='HOUSE_VALUE' || field_name.toUpperCase()=='FAMILY_AVG_INCOME' ||
field_name.toUpperCase()=='WORK_AVG_MONTH_INCOME' || field_name.toUpperCase()=='E_CONTRACT_AMOUNT' ||
field_name.toUpperCase()=='THIRD_GUAR_SCORE' || field_name.toUpperCase()=='BP_AGE' ||
field_name.toUpperCase()=='TJ_SCORE'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//hls_bp_master和hls_bp_master_req,商业伙伴名称,简称,统一社会信用代码,中征码,注册资本,法人代表姓名,主营业务,法人代表身份证号,电话,手机,注册地址,邮政编码,证件号码,电话(住宅),电话
//职业信息,入职年份,单位名称,单位详细地址,单位电话,单位邮编
//配偶信息,配偶姓名,证件号码,联系电话,单位电话,工作单位,单位地址
//开票信息,发票抬头,开票地址,电话,开户行,账号,纳税人识别号,备注,接收发票邮箱
if(table_name.toUpperCase()=='HLS_BP_MASTER' || table_name.toUpperCase()=='HLS_BP_MASTER_REQ'){
if(field_name.toUpperCase()=='BP_NAME' || field_name.toUpperCase()=='EXTRA_NAM'
|| field_name.toUpperCase()=='SOCIAL_CODE' || field_name.toUpperCase()=='CREDIT_CODE'
|| field_name.toUpperCase()=='REGISTERED_CAPITAL' || field_name.toUpperCase()=='LEGAL_PERSON'
|| field_name.toUpperCase()=='MAIN_BUSINESS' || field_name.toUpperCase()=='ID_CARD_NO_LEG'
|| field_name.toUpperCase()=='PHONE' || field_name.toUpperCase()=='CELL_PHONE'
|| field_name.toUpperCase()=='REGISTERED_PLACE' || field_name.toUpperCase()=='ZIPCODE'
|| field_name.toUpperCase()=='ID_CARD_NO' || field_name.toUpperCase()=='HOME_PHONE'
|| field_name.toUpperCase()=='EMAIL' || field_name.toUpperCase()=='FAX'
|| field_name.toUpperCase()=='LIVING_ADDRESS' || field_name.toUpperCase()=='ENTRY_DATE'
|| field_name.toUpperCase()=='WORK_UNIT' || field_name.toUpperCase()=='WORK_UNIT_ADDRESS'
|| field_name.toUpperCase()=='WORK_UNIT_PHONE' || field_name.toUpperCase()=='WORK_UNIT_ZIP'
|| field_name.toUpperCase()=='BP_NAME_SP' || field_name.toUpperCase()=='ID_NO_SP'
|| field_name.toUpperCase()=='CELL_PHONE_SP' || field_name.toUpperCase()=='WORK_UNIT_PHONE_SP'
|| field_name.toUpperCase()=='WORK_UNIT_NAME_SP' || field_name.toUpperCase()=='WORK_UNIT_ADDRESS_SP'
|| field_name.toUpperCase()=='INVOICE_TITLE' || field_name.toUpperCase()=='INVOICE_BP_ADDRESS'
|| field_name.toUpperCase()=='INVOICE_BP_PHONE_NUM' || field_name.toUpperCase()=='INVOICE_BP_BANK'
|| field_name.toUpperCase()=='INVOICE_BP_BANK_ACCOUNT' || field_name.toUpperCase()=='TAX_REGISTRY_NUM'
|| field_name.toUpperCase()=='REF_V07' || field_name.toUpperCase()=='RECEPTION_MAILE'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//经办人信息,姓名,身份证号,手机号
if(table_name.toUpperCase()=='HLS_BP_MASTER_SIGNER' || table_name.toUpperCase()=='HLS_BP_MASTER_SIGNER_REQ'){
if(field_name.toUpperCase()=='NAME' || field_name.toUpperCase()=='ID_CARD'
|| field_name.toUpperCase()=='CELL_PHONE'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//银行信息,账户名称,银行账号,银行全称,支行名称
//hls_bp_master_bank_acc_req
if(table_name.toUpperCase()=='HLS_BP_MASTER_BANK_ACCOUNT' || table_name.toUpperCase()=='HLS_BP_MASTER_BANK_ACC_REQ'){
if(field_name.toUpperCase()=='BANK_ACCOUNT_NAME' || field_name.toUpperCase()=='BANK_ACCOUNT_NUM'
|| field_name.toUpperCase()=='BANK_FULL_NAME' || field_name.toUpperCase()=='BANK_BRANCH_NAME'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//地址信息,详细地址,邮政编码,电话
if(table_name.toUpperCase()=='HLS_BP_MASTER_ADDRESS' || table_name.toUpperCase()=='HLS_BP_MASTER_ADDRESS_REQ'){
if(field_name.toUpperCase()=='ADDRESS' || field_name.toUpperCase()=='ZIPCODE'
|| field_name.toUpperCase()=='PHONE'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//联系人信息,联系人名称,职位,电话,传真,E-mail,地址,邮政编码,支付负责人
if(table_name.toUpperCase()=='HLS_BP_MASTER_CONTACT_INFO'){
if(field_name.toUpperCase()=='CONTACT_PERSON' || field_name.toUpperCase()=='POSITION'
|| field_name.toUpperCase()=='PHONE' || field_name.toUpperCase()=='FAX'
|| field_name.toUpperCase()=='EMAIL' || field_name.toUpperCase()=='CONTACT_INFO'
|| field_name.toUpperCase()=='REF_V01' || field_name.toUpperCase()=='PAYMENT_OWNER'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
//企业关联信息,身份类型,名称,证件号码,出资比例
//hls_bp_master_com_req,法人
if(table_name.toUpperCase()=='HLS_BP_MASTER_COMPANY_INFO' || table_name.toUpperCase()=='HLS_BP_MASTER_COM_REQ'){
if(field_name.toUpperCase()=='IDENTITY_TYPE' || field_name.toUpperCase()=='PERSON_NAME'
|| field_name.toUpperCase()=='ASSOCIATE_ID_NO' || field_name.toUpperCase()=='CAPITAL_KEY'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
}
}
var table_name = $ctx.dynamic_base_table;
// println("table_name:"+table_name);
......@@ -178,6 +290,7 @@
}
}
f.setDatabaseType(r.dbtype);
remove_space(tableName,r.name.toLowerCase(),f);
f.setPrompt(r.prompt);
$this.addField(f);
if (r.ispk) {
......
......@@ -28,6 +28,7 @@
sysdate - creation_date
)
< 3
and rownum<=30
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......
......@@ -40,6 +40,7 @@
url="${/request/@context_path}/modules/cont/CON301N/con_contract_print_signatures.lview"/>
<a:link id="rl_notice_print_link"
url="${/request/@context_path}/modules/cont/CON301N/rl_notice_print.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
......@@ -112,13 +113,23 @@
//项目类layout_code
maintain_type = 'READONLY';
param = record.data;
var url;
param['hide_flag'] = 'Y';
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_link_readonly', ds_id);
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_link_readonly';
}else{
//虚拟店
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id);
}
......
......@@ -21,6 +21,7 @@
<a:link id="con_contract_update_print_detail_link_id" url="${/request/@context_path}/modules/cont/CON311/con_contract_update_print_word_detail.lview"/>
<a:link id="con_lease_org_print_link"
url="${/request/@context_path}/modules/cont/CON620/create_content_for_collection.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<script type="text/javascript"><![CDATA[
......@@ -68,17 +69,26 @@
function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
param['hide_flag'] = 'Y';
param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['function_code'] = 'PRJ501_WFL';
param['bp_class'] = record.get('bp_class');
param['maintain_type'] = 'QUERY';
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_special_link', ds_id, '${/parameter/@layout_code}');
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_special_link';
}else{
//虚拟店
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
function open_bs_Window(record_id, ds_id) {
......
......@@ -58,6 +58,7 @@
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="get_atch_download_link"
url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<a:link id="check_contract_status" model="cont.CON3200.con_checklist_contract" modelaction="query"/>
<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"/>
......@@ -775,6 +776,31 @@
var division = lease_item_record.get('division');
var machine_number_num = 0;
var secondary_lease = record.get('secondary_lease') ;
var contract_id = record.get('contract_id');
var contract_status = record.get('contract_status');
var contract_status_result = '';
//校验合同状态
if(!Leaf.isEmpty(contract_status)){
Leaf.request({
url: $('check_contract_status').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
sync: true,
success: function (res) {
contract_status_result = res.result.record.contract_status;
},
failure: function () {
return false;
},
});
if (contract_status != contract_status_result) {
$L.showErrorMessage('提示', '合同状态已发生改变,需要重新刷新页面!');
return false;
}
}
if(!Leaf.isEmpty(secondary_lease) && secondary_lease!='YES') {
if (division == '92' && !Leaf.isEmpty(machine_number)) {
Leaf.request({
......
......@@ -20,6 +20,7 @@
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="cont_con_sale_contract_info_print_link"
url="${/request/@context_path}/modules/cont/CON3200/contract_receipt_detail_print.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
......@@ -55,18 +56,28 @@
function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
param['hide_flag'] = 'Y';
param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['function_code'] = 'PRJ501_WFL';
param['bp_class'] = record.get('bp_class');
param['maintain_type'] = 'QUERY';
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_special_link', ds_id, '${/parameter/@layout_code}');
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_special_link';
}else{
//虚拟店
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
function open_bs_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
......
......@@ -130,7 +130,7 @@
//add by 18938
||record_data.templet_code == 'BUSINESS_CONTRACT_XN' || record_data.templet_code == 'LEASE_CONTRACT_PAR_XN2' || record_data.templet_code == 'LEASE_CONTRACT_PAR_XN' || record_data.templet_code == 'DOWN_PAYMENT_OFFSET'
||record_data.templet_code == 'FINANCE_LEASEBACK_CONTRACT_XN' || record_data.templet_code == 'LEASE_ORDER_XN' || record_data.templet_code == 'LEASE_ORDER_XN2' || record_data.templet_code == 'FINANCE_LEASE_CONTRACT_XN'
||record_data.templet_code == 'CON_CONTRACT_MORTGAGE_XN') {
||record_data.templet_code == 'CON_CONTRACT_MORTGAGE_XN'||record_data.templet_code == 'G_LEASE_CONTRACT_PER_EX'||record_data.templet_code == 'G_LEASE_CONTRACT_PER') {
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
......@@ -19,6 +19,7 @@
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<script type="text/javascript"><![CDATA[
function CON542_con_contract_query() {
$('CON542_contract_result_ds').query();
......@@ -53,16 +54,25 @@
function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['function_code'] = 'PRJ501_WFL';
param['bp_class'] = record.get('bp_class');
param['maintain_type'] = 'QUERY';
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_special_link', ds_id, '${/parameter/@layout_code}');
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_special_link';
}else{
//虚拟店
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
function summaryRenderer(datas, name) {
......
......@@ -19,6 +19,19 @@
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
if("${/parameter/@division}"=='70' || "${/parameter/@division}"=='92' ){
if(document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER")){
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_prompt").style.display = "none";
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER").style.display = "none";
}
}else {
if (document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70")) {
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70_prompt").style.display = "none";
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70").style.display = "none";
}
}
});
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -211,14 +211,23 @@
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CON_DUE_DETAIL_user_button4").style.display = "";
document.getElementById("CON_DUE_DETAIL_user_button3").style.display = "";
document.getElementById("CON_DUE_DETAIL_user_button5").style.display = "";
} else {
document.getElementById("CON_DUE_DETAIL_user_button4").style.display = "none";
document.getElementById("CON_DUE_DETAIL_user_button3").style.display = "none";
document.getElementById("CON_DUE_DETAIL_user_button5").style.display = "none";
}
}
if("${/parameter/@division}"=='70' || "${/parameter/@division}"=='92' ){
if(document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER")){
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_prompt").style.display = "none";
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER").style.display = "none";
}
}else {
if (document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70")) {
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70_prompt").style.display = "none";
document.getElementById("${/parameter/@layout_code}_F_BASIC_CON_CONTRACT_MACHINE_NUMBER_70").style.display = "none";
}
}
});
//新增催款函pdf打印(盖章)
......
......@@ -301,6 +301,8 @@
Leaf.onReady(function () {
if ("${/model/role_info/record/@role_code}" == "0018" || "${/model/role_info/record/@role_code}" == "0019") {
document.getElementById('msg_money_id').style.display = "none";
document.getElementById('msg_no_money_id').style.display = "none";
$('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');
......@@ -588,8 +590,8 @@
<a:screenTitle/>
<a:gridButton click="CON601_con_contract_reset" text="HLS.RESET"/>
<a:gridButton click="CON601_con_contract_query" text="HLS.QUERY"/>
<a:gridButton click="CON601_dun_msg_money" text="催收短信发送(含金额)"/>
<a:gridButton click="CON601_dun_msg_no_money" text="催收短信发送(无金额)"/>
<a:gridButton id="msg_money_id" click="CON601_dun_msg_money" text="催收短信发送(含金额)"/>
<a:gridButton id="msg_no_money_id" click="CON601_dun_msg_no_money" text="催收短信发送(无金额)"/>
<!--<a:gridButton id="CON601_con_contract_print_btn" click="CON601_con_contract_print" text="打印催收函"/>-->
</a:screenTopToolbar>
......@@ -729,6 +731,10 @@
<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="lease_item_amount" align="right" prompt="设备价格" width="100"
renderer="Leaf.formatMoney"/>
<a:column name="contract_amount" align="right" prompt="合同金额" width="100"
renderer="Leaf.formatMoney"/>
<a:column name="send_message_n" align="center" prompt="发送催收短信" width="60"/>
<a:column name="dun_date" align="center" prompt="催收短信发送日期" width="120"/>
<!-- <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.change_req_id = ${/parameter/@change_req_id}"
model="cus_deposit.CUS_DEPOSIT106.get_contract_wfl_status" rootPath="default_value_path"/>
</a:init-procedure>
<a:view>
<a:link id="con731_submit_link" model="cont.CON731.submit_change_req" modelaction="execute"/>
<a:link id="con731_cancel_link" model="cont.CON731.cancel_change_req" modelaction="execute"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id"
model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_buyback_info_print_link_id"
url="${/request/@context_path}/modules/csh/CSH501/csh_con_req_history_pdf_print.lsc"/>
<a:link id="con_check_deduction_limit_link" model="check_after_save_bm.con_check_deduction_limit_after_save"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="check_sign_status_id" model="cont.CON731.check_contract_sign_status" modelaction="query"/>
<script type="text/javascript"><![CDATA[
function attachment_window_open(change_req_id,record_id, ds_id) {
url = $('cdd_uploadFile_id').getUrl() + '?table_name=CCR_BEFORE_SIGN&header_id=' + change_req_id;
wd = new Leaf.Window({
id: 'open_attachment_window',
url: url,
title: '附件上传',
height: 350,
width: 850
});
}
function attachment_window_query(change_req_id,record_id, ds_id) {
url = $('cdd_downloadFile_id').getUrl() + '?table_name=CCR_BEFORE_SIGN&header_id=' + change_req_id;
wd = new Leaf.Window({
id: 'open_attachment_window',
url: url,
title: '附件上传',
height: 350,
width: 850
});
}
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cashflow_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var record = $(ds_id).getCurrentRecord();
var price_list = record.get('price_list');
var calc_session_id = record.get('calc_session_id');
var parent_pk_value = record.get('contract_id');
var calc_type = '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR';
var maintain_type = 'QUERY'
if (calc_session_id) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code: '${/parameter/@layout_code}',
document_id: parent_pk_value,
price_list: price_list,
document_category: 'CONTRACT',
contract_status: record.get('contract_status'),
maintain_type: 'MODIFY',
business_type: record.get('business_type'),
calc_session_id: record.get('calc_session_id'),
//quotation_id: record.get('quotation_id'),
dsId: cashflow_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: calc_type,
recreate_L_formula: 'Y',
recreate_H_formula: 'Y',
change_type : 'CCR_BEFORE_SINGE'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(cashflow_ds_id).query();
$(ds_id).query();
});
}
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
//debugger
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
//var record = $(ds_id).getCurrentRecord();
var contract_id = record.get('contract_id');
var change_req_id = '${/parameter/@change_req_id}';
var sign_contract_status;
Leaf.request({
url: $('check_sign_status_id').getUrl(),
para: {
change_req_id: change_req_id
},
scope: this,
success: function (res) {
sign_contract_status = res.result.record.sign_contract_status;
},
failure: function () {
return false;
},
scope: this,
sync: true
});
if (name == 'attachment') {
if(sign_contract_status == 'NEW' ){
return '<a href="javascript:attachment_window_open(\'' + record.get('change_req_id') + '\',\'' + record.id + '\',\'' + record.ds.id + '\');">' + '附件上传' + '</a>';
}else{
return '<a href="javascript:attachment_window_query(\'' + record.get('change_req_id') + '\',\'' + record.id + '\',\'' + record.ds.id + '\');">' + '附件上传' + '</a>';
}
}
}
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var req_ds_id2 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var req_record = $(req_ds_id).getAt(0);
var case_type = '';
var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id');
var change_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var req_record2 = $(change_ds_id).getAt(0);
if (Ext.isEmpty(req_record2.get('ccr_reason'))) {
$L.showErrorMessage('错误', '变更理由及说明字段不能为空!');
return false;
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
// if ($(lease_item_ds_id).isModified()) {
// Leaf.showInfoMessage('提示', '变更后未完成报价计算,请先进行报价计算!');
// return false;
// }
if ($(change_ds_id).isModified()) {
Leaf.showInfoMessage('提示', '请先保存之后再提交审批!');
return false;
}
if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable()) && $(req_ds_id2).validate($('${/parameter/@layout_code}_submit_approval').enable())) {
con731_submit();
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
};
function con731_submit() {
var showMessage ='是否确认提交审批?';
Leaf.showConfirm('${l:HLS.PROMPT}', showMessage, function () {
var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var req_record = $(req_ds_id).getAt(0);
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con731_submit_link').getUrl(),
para: {
change_req_id: '${/parameter/@change_req_id}',
layout_code: '${/parameter/@layout_code}'
},
success: function (res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}, null, 300, 150);
}
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) {
var ca_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
if (ca_ds_id) {
$(ca_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con731_cancel_link').getUrl(),
para: {
change_req_id: '${/parameter/@change_req_id}'
},
success: function (res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
};
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
if(ds.id == lease_item_ds_id&&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70'|| record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('full_name_n');
$(gridId).hideColumn('division_n');
$(gridId).hideColumn('equipments');
$(gridId).hideColumn('machine_model_class_n');
$(gridId).hideColumn('item_type_n');
$(gridId).hideColumn('equipment_type_n');
$(gridId).hideColumn('machine_number');
record.getField('machine_number').setRequired(false);
}else {
$(gridId).hideColumn('machine_number_70');
$(gridId).hideColumn('lease_name_n');
$(gridId).hideColumn('brand_value');
$(gridId).hideColumn('type_name');
$(gridId).hideColumn('produce_date');
$(gridId).hideColumn('using_hour');
$(gridId).hideColumn('detention_amount');
$(gridId).hideColumn('residual_value_amount');
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
if(record.data.division=='30'||record.data.division=='50'||record.data.division=='80'){
record.getField('set_number').setRequired(true);
}else{
record.getField('set_number').setReadOnly(true);
if(Ext.isEmpty(record.get('set_number'))){
record.set('set_number',1);
}
}
if (record.data.division == '70' || record.data.division=='92') {
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('modelcd').setReadOnly(true);
record.getField('modelcd').setRequired(false);
record.getField('pattern').setReadOnly(true);
record.getField('pattern').setRequired(false);
record.getField('machine_number_70').setRequired(true);
}
}
var lease_old_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_OLD_CAR', 'con_contract_lease_item');
if(ds.id == lease_old_ds_id&&lease_old_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70' || record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('full_name_n');
$(gridId).hideColumn('division_n');
$(gridId).hideColumn('equipments');
$(gridId).hideColumn('machine_model_class_n');
$(gridId).hideColumn('item_type_n');
$(gridId).hideColumn('equipment_type_n');
$(gridId).hideColumn('machine_number');
record.getField('machine_number').setRequired(false);
}else {
$(gridId).hideColumn('machine_number_70');
$(gridId).hideColumn('lease_name_n');
$(gridId).hideColumn('brand_value');
$(gridId).hideColumn('type_name');
$(gridId).hideColumn('produce_date');
$(gridId).hideColumn('using_hour');
$(gridId).hideColumn('detention_amount');
$(gridId).hideColumn('residual_value_amount');
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
}
};
//新增和加载时调用(form)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
//document.getElementById('${/parameter/@layout_code}_CCR_BEFORE_SIGN_F_BASIC_1_prompt').style.display = 'none';//component_id_
//document.getElementById('${/parameter/@layout_code}_CCR_BEFORE_SIGN_F_BASIC_1').style.display = 'none';
document.getElementById('CCR_BEFORE_SIGN_F_BASIC_1_component_id').style.display = "none";
if('${/parameter/@function_usage}'=='QUERY'){
document.getElementById('CCR_BEFORE_SIGN_save').style.display = 'none';
document.getElementById('CCR_BEFORE_SIGN_quote').style.display = 'none';
document.getElementById('CCR_BEFORE_SIGN_exit').style.display = 'none';
document.getElementById('CCR_BEFORE_SIGN_user_button1').style.display = 'none';
document.getElementById('CCR_BEFORE_SIGN_submit_approval').style.display = 'none';
}
}
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(record.data.division=='70' || record.data.division=='92'){
if(name=='lease_name_n'){
record.data.type_name=value;
}else if(name=='modelcd'){
record.data.pattern=value;
}
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
}
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -4,6 +4,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.change_req_id = ${/parameter/@change_req_id}"
model="cus_deposit.CUS_DEPOSIT106.get_contract_wfl_status" rootPath="default_value_path"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.create_change_req" rootPath="get_contract_division"/>
</a:init-procedure>
<a:view>
<!-- <a:link id="con731_calc_ccr_fee_link" model="cont.CON731.calc_ccr_fee" modelaction="execute"/>-->
......@@ -52,6 +53,16 @@
$(ds_con_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(ds_con_id).query();
}
if('${/model/get_contract_division/record/@division}' !='70' && '${/model/get_contract_division/record/@division}' != ''){
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_BALANCE").style.display = "none";
}
if(document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION")){
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION_prompt").style.display = "none";
document.getElementById("CON_ET_MODIFY_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_DEPOSIT_DEDUCTION").style.display = "none";
}
}
});
function open_contract_win(ds_id, record_id) {
......@@ -876,6 +887,17 @@
$(ds_id).query();
}
}
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_10', 'con_contract_lease_item');
if(ds.id == lease_ds_id&&lease_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70' || record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('machine_number');
}else {
$(gridId).hideColumn('lease_name');
$(gridId).hideColumn('machine_number_70');
}
};
};
//选择事件(grid,attach,gridbox,table)
/*window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_before_select'] = function(ds, record, bp_seq) {
......
......@@ -17,6 +17,7 @@
<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="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<script type="text/javascript"><![CDATA[
function open_contract_win(ds_id, record_id) {
......@@ -35,12 +36,21 @@
//项目类layout_code
maintain_type = 'READONLY';
param = record.data;
var url;
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_link_readonly', ds_id);
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_link_readonly';
}else{
//虚拟店
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id);
}
......
......@@ -89,7 +89,6 @@
var clc_flag = 'N';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
debugger;
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ds == $(ds_id)) {
if(value!=old_value){
......@@ -682,9 +681,20 @@
});
}
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_10', 'con_contract_lease_item');
if(ds.id == lease_ds_id&&lease_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70' || record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('machine_number');
}else {
$(gridId).hideColumn('lease_name');
$(gridId).hideColumn('machine_number_70');
}
};
}
//图片渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
......@@ -759,7 +769,6 @@
}
};
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
debugger;
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
calc_flag = req_record.get('calc_flag')||'N';
......
......@@ -519,9 +519,20 @@
});
});
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_10', 'con_contract_lease_item');
if(ds.id == lease_ds_id&&lease_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70' || record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('machine_number');
}else {
$(gridId).hideColumn('lease_name');
$(gridId).hideColumn('machine_number_70');
}
};
}
//图片渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
var result = name.match(/(.*)_pic$/);
......
......@@ -148,7 +148,9 @@
</a:fields>
</a:dataSet>
<a:dataSet id="csh_lov_con_contract_ds" selectable="true" autoQuery="true" selectionModel="single"
model="csh.CSH531N.con_contract" queryDataSet="csh_query_con_ds">
model="csh.CSH531N.con_contract"
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.con_contract/query?deposit_flag=${/parameter/@deposit_flag}&amp;transaction_date=${/parameter/@transaction_date}"
queryDataSet="csh_query_con_ds">
<a:events>
<a:event name="indexchange" handler="indexChangeFunction"/>
</a:events>
......
......@@ -101,6 +101,7 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record) {
//0017 宏菱管理员 HAND HAND管理员
var role_code = '${/model/user_name_path/record/@role_code}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_lease_item');
if (record) {
if (role_code == '0017' || role_code == 'HAND') {
record.getField('ref_n01').setReadOnly(false);
......@@ -108,6 +109,26 @@
record.getField('ref_n01').setReadOnly(true);
}
}
if(ds.id == ds_id){
var record = $(ds_id).getAll()
for (var i=0;i<record.length;i++){
if(record[i].data.division=='70' || record[i].data.division=='92'){
record[i].getField('pattern').setRequired(false);
record[i].getField('pattern').setReadOnly(true);
record[i].getField('equipments').setReadOnly(true);
record[i].getField('detention').setReadOnly(true);
record[i].getField('detention').setRequired(false);
record[i].getField('machine_model_class').setReadOnly(true);
record[i].getField('machine_model_class_n').setReadOnly(true);
record[i].getField('ref_n01').setReadOnly(true);
record[i].getField('created_by_n').setReadOnly(true);
record[i].getField('vender_id').setReadOnly(true);
record[i].getField('vender_id').setRequired(false);
record[i].getField('vender_id_n').setReadOnly(true);
record[i].getField('vender_id_n').setRequired(false);
}
}
}
};
//新增时调用(grid,table,gridBox)
......@@ -117,6 +138,48 @@
record.getField('ref_n01').setReadOnly(false);
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_lease_item');
if(ds.id == ds_id){
if(name == 'division'){
if(value == '70' || value == '92'){
record.getField('pattern').setReadOnly(true);
record.getField('pattern').setRequired(false);
record.getField('equipments').setReadOnly(true);
record.getField('detention').setReadOnly(true);
record.getField('detention').setRequired(false);
record.set('machine_model_class',' ');
record.set('machine_model_class_n',' ');
record.getField('machine_model_class').setReadOnly(true);
record.getField('machine_model_class_n').setReadOnly(true);
record.getField('ref_n01').setReadOnly(true);
record.getField('created_by_n').setReadOnly(true);
record.getField('vender_id').setReadOnly(true);
record.getField('vender_id').setRequired(false);
record.getField('vender_id_n').setReadOnly(true);
record.getField('vender_id_n').setRequired(false);
}else {
record.getField('pattern').setReadOnly(false);
record.getField('pattern').setRequired(true);
record.getField('equipments').setReadOnly(false);
record.getField('detention').setReadOnly(false);
record.getField('detention').setRequired(true);
record.set('machine_model_class','LARGE');
record.set('machine_model_class_n','大型');
record.getField('machine_model_class').setReadOnly(false);
record.getField('machine_model_class_n').setReadOnly(false);
record.getField('ref_n01').setReadOnly(false);
record.getField('vender_id').setReadOnly(false);
record.getField('vender_id').setRequired(true);
record.getField('vender_id_n').setReadOnly(false);
record.getField('vender_id_n').setRequired(true);
}
}
}
}
//更新机型信息
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_lease_item');
......
......@@ -390,6 +390,9 @@
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
//去除空格
Code = Code.trim();
Code = Code.replace(/[\t\r\f\n\s]*/g,"");
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
......@@ -764,6 +767,8 @@
}
//邮编校验 add by 20230619
if(name=='zipcode'|| name=='work_unit_zip') {
value = value.trim();
value = value.replace(/[\t\r\f\n\s]*/g,"");
if (!(/^[0-9]{6}$/.test(value)) && value) {
Leaf.showMessage('提示', '请正确填写邮编', function () {
record.set(name, '');
......@@ -801,6 +806,8 @@
if(record.get('bp_type') == 'TENANT'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
......
......@@ -176,6 +176,9 @@
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
//去除空格
Code = Code.trim();
Code = Code.replace(/[\t\r\f\n\s]*/g,"");
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
......@@ -573,6 +576,8 @@
}
//邮编校验 add by 20230619
if(name=='zipcode'|| name=='work_unit_zip') {
value = value.trim();
value = value.replace(/[\t\r\f\n\s]*/g,"");
if (!(/^[0-9]{6}$/.test(value)) && value) {
Leaf.showMessage('提示', '请正确填写邮编', function () {
record.set(name, '');
......@@ -607,6 +612,8 @@
if(record.get('bp_type') == 'TENANT' && name =='credit_code'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
......
......@@ -211,6 +211,9 @@
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
//去除空格
Code = Code.trim();
Code = Code.replace(/[\t\r\f\n\s]*/g,"");
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
......@@ -616,6 +619,8 @@
//邮编校验 add by 20230619
if(name=='zipcode'|| name=='work_unit_zip') {
if (!(/^[0-9]{6}$/.test(value)) && value) {
value = value.trim();
value = value.replace(/[\t\r\f\n\s]*/g,"");
Leaf.showMessage('提示', '请正确填写邮编', function () {
record.set(name, '');
});
......@@ -649,6 +654,8 @@
if(record.get('bp_type') == 'TENANT' && name =='credit_code'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
......
......@@ -40,6 +40,9 @@ checkCard = function(card) {
if(Ext.isEmpty(card)){
return true;
}
//去除空格
card = card.trim();
card = card.replace(/[\t\r\f\n\s]*/g,"");
if (isCardNo(card) === false) {
return false;
}
......@@ -174,6 +177,8 @@ changeFivteenToEighteen = function(card) {
function checkMobile(str) {
// var re = /^1\d{10}$/;
//var re=/^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|(^(13[0-9]|15[0|3|6|7|8|9]|18[8|9])\d{8}$)/;
str = str.trim();
str = str.replace(/[\t\r\f\n\s]*/g,"");
var re=/^((0\d{2,3}-\d{7,8})|(1[3584769]\d{9}))$/;
if (re.test(str)) {
return true;
......
......@@ -1236,8 +1236,8 @@
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('machine_number_70').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('modelcd').setReadOnly(true);
record.getField('modelcd').setRequired(false);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
......
......@@ -586,6 +586,7 @@
$(prj_quotation_ds_id).query();
$(score_ds_id).query();
}
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
......@@ -675,9 +676,11 @@
record.getField('cell_phone').setRequired(false);
}
}
}
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'||division=='92'){
record.getField('lease_name_n').setRequired(true);
......@@ -685,8 +688,8 @@
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('machine_number_70').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('modelcd').setReadOnly(true);
record.getField('modelcd').setRequired(false);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
......@@ -949,14 +952,15 @@
};
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
/* var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_HISTORY_INFO_1', 'prj_project_bp');
$(bp_ds_ids).setQueryParameter('bp_id','${/parameter/@bp_id_tenant}');
$(bp_ds_ids).query(); */
$(bp_ds_ids).query();*/
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
......@@ -970,8 +974,8 @@
record.getField('produce_date').setReadOnly(false);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('modelcd').setReadOnly(true);
record.getField('modelcd').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true);
record.getField('full_name').setRequired(false);
......@@ -1032,9 +1036,10 @@
return eval(strJs);
}
var division='';
//新增和加载时调用(form)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id){
//debugger;
if (Leaf.isEmpty(record.get('send_message'))){
......@@ -1062,10 +1067,6 @@
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') {
......@@ -1148,17 +1149,20 @@
record.getField('branch_code_n').setRequired(false);
}
//获取员工类型
//debugger;
debugger;
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord();
if(division=='80'||division=='30'||division=='50'){
var invoice_agent_id=record.get('invoice_agent_id');
if((division=='80'||division=='30'||division=='50') && invoice_agent_id !== 25321){
credit_record.set('credit_line','TENANT');
credit_record.set('credit_line_n','承租人');
}else if(!Ext.isEmpty(description) && description == 'AGENT'){
}
if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){
if(bp_code !== 'C00010180' && bp_code !== 'C00010175' && bp_code !== 'C00010176' && bp_code !== 'C00010187'){
if(bp_code =='D00010001'){
if(bp_code !== 'D00000026' && bp_code !== 'D00000029' && bp_code !== 'D00000030' && bp_code !== 'D00000031'){
if(bp_code =='X00010005' || bp_code =='J00010006'){
credit_record.set('credit_line','TENANT');
credit_record.set('credit_line_n','承租人');
credit_record.getField('credit_line').setReadOnly(true);
......@@ -1166,6 +1170,7 @@
credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false);
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
......@@ -1263,7 +1268,6 @@
document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE').style.display = 'none';
}
if (!record.get('score_name')) {
if ($(ds_id).getCurrentRecord()) {
var score_name = $(ds_id).getCurrentRecord().get('legal_person') || $(ds_id).getCurrentRecord().get('bp_id_tenant_n');
record.set('score_name', score_name);
......@@ -1422,7 +1426,6 @@
return;
}
}
}else{
if (key != 'bp_detail_id' && key != 'score_name'&& key != 'contract_id' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score' ) {
//if (!bp_tenant_detail_r.get(key)) {
......@@ -1511,13 +1514,11 @@
var show = down_payment_rate_new * 100;
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if(current_record.get('division')!='91'){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
}
}
}
if ($(ds_id).validate()) {
......@@ -1611,13 +1612,11 @@
var show = down_payment_rate_new * 100;
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if(current_record.get('division')!='91') {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
}
}
}
if ($(ds_id).validate()) {
......@@ -1829,14 +1828,11 @@
return false;
}
if (record.get('signing_city')){
// var reg = /^([\u2E80-\u9FFF]){4,}$/;
// var reg = /^(.){4,}$/;
// if (!reg.test(record.get('signing_city'))) {
// $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
// return false;
// }
if (record.get('signing_city').indexOf('州') == -1 && record.get('signing_city').indexOf('县') == -1 && record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
var reg = /^(.){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
return false;
}
}
}
......@@ -1864,7 +1860,7 @@
bp_rate_flag = true;
}
}
} else{
}else{
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age'&& key != 'contract_id' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score') {
//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) === "") {
......@@ -1882,7 +1878,6 @@
if (!bp_rate_flag) {
return false;
}
debugger;
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var project_record = $(prj_project_ds_id).getCurrentRecord();
......
......@@ -634,15 +634,17 @@
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
debugger;
if((division=='70'||division=='92')&&division!=''){
debugger;
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('modelcd').setReadOnly(true);
record.getField('modelcd').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true);
record.getField('full_name').setRequired(false);
......@@ -1215,14 +1217,15 @@
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'||division=='92'){
debugger;
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('machine_number_70').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('modelcd').setReadOnly(true);
record.getField('modelcd').setRequired(false);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
......
......@@ -80,11 +80,13 @@
var data = con_num_map.getChildren();
var v_con_id = data[0].contract_id;
for (var j = 0; j < docs_list.length; j++) {
var file_size=get_file_length(docs_list[j].fileUrl.replace('/mnt','Z:'));
con_ele_file_dl_bm.update({
contract_id: v_con_id,
file_name: docs_list[j].fileName,
file_url: docs_list[j].fileUrl.replace('/mnt','X:'),
file_size:docs_list[j].fileSize
file_url: docs_list[j].fileUrl.replace('/mnt','Z:'),
//file_size:docs_list[j].fileSize
file_size:file_size
})
}
con_ele_file_dl_bm.execute({
......@@ -113,6 +115,17 @@
$ctx.parameter.json = JSON.stringify(result);
}
//获取文件长度
function get_file_length(path){
var file=new File(String(path));
if (file.exists() && file.isFile()){
length=file.length();
return length;
} else{
return 0;
}
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
ele_file_download();
}
......
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