Commit 6397eec1 authored by 18083's avatar 18083

保证金管理模块改造

parent 8e77797b
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/>
<!-- <bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>--> <!-- <bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>-->
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>--> <!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/> <bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,'DEPOSIT','DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />--> <!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/> <bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
<bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/> <bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/>
......
...@@ -13,8 +13,10 @@ ...@@ -13,8 +13,10 @@
hlcm_cux_deposit_pkg.execute_deposit_transfer( hlcm_cux_deposit_pkg.execute_deposit_transfer(
p_session_id=>${/session/@session_id}, p_session_id=>${/session/@session_id},
p_source_contract_id=>${@source_contract_id}, p_source_contract_id=>${@source_contract_id},
p_source_transaction_id=>${@source_transaction_id},
p_je_date=>to_date(${@je_date},'yyyy-mm-dd hh24:mi:ss'), p_je_date=>to_date(${@je_date},'yyyy-mm-dd hh24:mi:ss'),
p_contract_id=>${@contract_id}, p_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_deposit_amount=>${@deposit_amount}, p_deposit_amount=>${@deposit_amount},
p_deposit_trans_type=>${@deposit_trans_type}, p_deposit_trans_type=>${@deposit_trans_type},
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
...@@ -30,6 +32,8 @@ ...@@ -30,6 +32,8 @@
hlcm_cux_deposit_pkg.create_deposit_transfer_je( hlcm_cux_deposit_pkg.create_deposit_transfer_je(
p_hd_contract_id=>${@hd_contract_id}, p_hd_contract_id=>${@hd_contract_id},
p_contract_id=>${@source_contract_id}, p_contract_id=>${@source_contract_id},
p_transaction_id=>${@source_transaction_id},
p_batch_id=>${@batch_id},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
); );
end; end;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
begin begin
hlcm_cux_deposit_pkg.check_csh_transaction_status( hlcm_cux_deposit_pkg.check_csh_transaction_status(
p_contract_id=>${@contract_id}, p_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
); );
end; end;
...@@ -26,9 +27,16 @@ ...@@ -26,9 +27,16 @@
</bm:operation> </bm:operation>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * from ( select v1.contract_id, select *
(select cc.contract_number from con_contract cc where cc.contract_id=v1.contract_id)contract_number, from (select v1.contract_id,
(select cc.contract_name from con_contract cc where cc.contract_id=v1.contract_id)contract_name, null transaction_id,
'' transaction_num,
(select cc.contract_number
from con_contract cc
where cc.contract_id = v1.contract_id) contract_number,
(select cc.contract_name
from con_contract cc
where cc.contract_id = v1.contract_id) contract_name,
--to_char(v1.unwrite_off_amount,'FM999,999,999,990.00')unwrite_off_amount, --to_char(v1.unwrite_off_amount,'FM999,999,999,990.00')unwrite_off_amount,
v1.unwrite_off_amount, v1.unwrite_off_amount,
v1.deposit_trans_type, v1.deposit_trans_type,
...@@ -36,8 +44,8 @@ ...@@ -36,8 +44,8 @@
from hls_bp_master t, con_contract ct from hls_bp_master t, con_contract ct
where t.bp_id = ct.bp_id_tenant where t.bp_id = ct.bp_id_tenant
and ct.contract_id = v1.contract_id) bp_id_telnet_n, and ct.contract_id = v1.contract_id) bp_id_telnet_n,
(select ct.bp_id_agent_level1 from (select ct.bp_id_agent_level1
con_contract ct from con_contract ct
where contract_id = v1.contract_id) bp_id_agent_level1, where contract_id = v1.contract_id) bp_id_agent_level1,
(select t.bp_name (select t.bp_name
from hls_bp_master t, con_contract ct from hls_bp_master t, con_contract ct
...@@ -47,7 +55,9 @@ ...@@ -47,7 +55,9 @@
from sys_code_values_v v from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE' where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = v1.deposit_trans_type) deposit_trans_type_n, and v.code_value = v1.deposit_trans_type) deposit_trans_type_n,
nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id=>v1.contract_id,p_user_id=>1) ),'正常')approve_status, nvl((hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id => v1.contract_id,
p_user_id => 1)),
'正常') approve_status,
v1.bp_id, v1.bp_id,
nvl((SELECT tc.trans_review_status nvl((SELECT tc.trans_review_status
FROM csh_transaction_contemp tc FROM csh_transaction_contemp tc
...@@ -55,7 +65,8 @@ ...@@ -55,7 +65,8 @@
(select max(contemp_id) (select max(contemp_id)
FROM csh_transaction_contemp tc FROM csh_transaction_contemp tc
where tc.source_contract_id = v1.contract_id where tc.source_contract_id = v1.contract_id
and tc.batch_id is not null)),'NEW') trans_review_status, and tc.batch_id is not null)),
'NEW') trans_review_status,
nvl((SELECT sc.code_value_name nvl((SELECT sc.code_value_name
FROM csh_transaction_contemp tc, sys_code_values_v sc FROM csh_transaction_contemp tc, sys_code_values_v sc
where tc.contemp_id = where tc.contemp_id =
...@@ -64,7 +75,8 @@ ...@@ -64,7 +75,8 @@
where tc.source_contract_id = v1.contract_id where tc.source_contract_id = v1.contract_id
and tc.batch_id is not null) and tc.batch_id is not null)
and sc.code = 'TRANS_REVIEW_STATUS' and sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value =nvl(tc.trans_review_status,'NEW')),'新建') trans_review_status_n AND sc.code_value = nvl(tc.trans_review_status, 'NEW')),
'新建') trans_review_status_n
from (select tt.ref_contract_id contract_id, from (select tt.ref_contract_id contract_id,
tt.deposit_trans_type, tt.deposit_trans_type,
sum((nvl(tt.transaction_amount, 0) - sum((nvl(tt.transaction_amount, 0) -
...@@ -77,7 +89,62 @@ ...@@ -77,7 +89,62 @@
and tt.transaction_amount > 0 and tt.transaction_amount > 0
and tt.deposit_trans_type is not null and tt.deposit_trans_type is not null
group by tt.ref_contract_id, tt.deposit_trans_type, tt.bp_id) v1 group by tt.ref_contract_id, tt.deposit_trans_type, tt.bp_id) v1
where v1.unwrite_off_amount > 0) v where v1.unwrite_off_amount > 0
union all
select null contract_id,
tt.transaction_id,
tt.transaction_num,
'' contract_number,
'' contract_name,
nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0) unwrite_off_amount,
'' deposit_trans_type,
(select hbm.bp_name
from hls_bp_master hbm
where hbm.bp_id = tt.bp_id) bp_id_telnet_n,
(select h.bp_id
from hls_bp_master hbm, hls_bp_master h
where hbm.unit_id = h.unit_id
and hbm.bp_id = tt.bp_id
and h.bp_category = 'AGENT') bp_id_agent_level1,
(select h.bp_name
from hls_bp_master hbm, hls_bp_master h
where hbm.unit_id = h.unit_id
and hbm.bp_id = tt.bp_id
and h.bp_category = 'AGENT') bp_name,
'' deposit_trans_type_n,
nvl((hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id => Null,
p_transaction_id => tt.transaction_id,
p_user_id => 1)),
'正常') approve_status,
tt.bp_id,
nvl((SELECT tc.trans_review_status
FROM csh_transaction_contemp tc
where tc.contemp_id =
(select max(contemp_id)
FROM csh_transaction_contemp tc
where tc.source_transaction_id =
tt.transaction_id
and tc.batch_id is not null)),
'NEW') trans_review_status,
nvl((SELECT sc.code_value_name
FROM csh_transaction_contemp tc, sys_code_values_v sc
where tc.contemp_id =
(select max(contemp_id)
FROM csh_transaction_contemp tc
where tc.source_transaction_id =
tt.transaction_id
and tc.batch_id is not null)
and sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = nvl(tc.trans_review_status, 'NEW')),
'新建') trans_review_status_n
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
and tt.ref_contract_id is null
and tt.confirmed_flag not in
('ACCAUDITING', 'NEW', 'CT_REJECTED')
and (nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0) > 0)) v
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -9,22 +9,27 @@ ...@@ -9,22 +9,27 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * from (select ct.contemp_id, select *
from (select ct.contemp_id,
ct.batch_id, ct.batch_id,
ct.bp_id, ct.bp_id,
ct.source_contract_id, ct.source_contract_id,
ct.contract_id, ct.contract_id,
ct.source_transaction_id,
ct.transaction_id,
ct.source_trans_type, ct.source_trans_type,
(select t.contract_number from con_contract t (select t.contract_number
from con_contract t
where t.contract_id = ct.contract_id where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL' and t.data_class = 'NORMAL'
and rownum = 1) contract_number, and rownum = 1) contract_number,
'' transaction_num,
ct.deposit_trans_type, ct.deposit_trans_type,
(SELECT sc.code_value_name (SELECT sc.code_value_name
FROM sys_code_values_v sc FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE' WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc, AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
to_char(ct.je_date,'yyyy-MM-dd') je_date, to_char(ct.je_date, 'yyyy-MM-dd') je_date,
ct.deposit_amount, ct.deposit_amount,
ct.deposit_info, ct.deposit_info,
cc.bp_id_agent_level1, cc.bp_id_agent_level1,
...@@ -37,7 +42,42 @@ ...@@ -37,7 +42,42 @@
WHERE bpv.bp_id = cc.bp_id_tenant) bp_name WHERE bpv.bp_id = cc.bp_id_tenant) bp_name
from csh_transaction_contemp ct, con_contract cc from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id where ct.contract_id = cc.contract_id
and cc.data_class = 'NORMAL') t1 and cc.data_class = 'NORMAL'
union all
select ct.contemp_id,
ct.batch_id,
ct.bp_id,
ct.source_contract_id,
ct.contract_id,
ct.source_transaction_id,
ct.transaction_id,
ct.source_trans_type,
'' contract_number,
cc.transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
to_char(ct.je_date, 'yyyy-MM-dd') je_date,
ct.deposit_amount,
ct.deposit_info,
(select u.bp_id
from hls_bp_master u, hls_bp_master hbm
where u.unit_id = hbm.unit_id
and hbm.bp_id = cc.bp_id
and u.bp_category = 'AGENT'),
(select u.bp_name
from hls_bp_master u, hls_bp_master hbm
where u.unit_id = hbm.unit_id
and hbm.bp_id = cc.bp_id
and u.bp_category = 'AGENT'),
cc.bp_id bp_id_tenant,
(select hbm.bp_name
from hls_bp_master hbm
where hbm.bp_id = cc.bp_id) bp_name
from csh_transaction_contemp ct, csh_transaction cc
where ct.transaction_id = cc.transaction_id) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.je_date desc order by t1.je_date desc
]]></bm:query-sql> ]]></bm:query-sql>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * select *
from (select v.source_contract_id, from (select v.source_contract_id,
null source_transaction_id,
v.batch_id, v.batch_id,
v.trans_review_status, v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date, to_char(v.je_date,'yyyy-MM-dd') je_date,
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
WHERE sc.code = 'TRANS_REVIEW_STATUS' WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n, AND sc.code_value = v.trans_review_status) trans_review_status_n,
cc.contract_number, cc.contract_number,
'' transaction_num,
cc.contract_name, cc.contract_name,
cc.bp_id_agent_level1, cc.bp_id_agent_level1,
(SELECT t.bp_name (SELECT t.bp_name
...@@ -67,7 +69,52 @@ ...@@ -67,7 +69,52 @@
and ct.batch_id is not null and ct.batch_id is not null
) v ) v
where cc.contract_id = v.source_contract_id where cc.contract_id = v.source_contract_id
and cc.data_class = 'NORMAL') t1 and cc.data_class = 'NORMAL'
union all
select null source_contract_id,
v.source_transaction_id,
v.batch_id,
v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date,
v.source_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = v.source_trans_type) deposit_trans_type_n,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
'' contract_number,
cc.transaction_num,
'' contract_name,
(select u.bp_id from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
(select u.bp_name from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
cc.bp_id bp_id_tenant,
(SELECT bpv.bp_name
FROM hls_bp_master bpv
WHERE bpv.bp_id = cc.bp_id) bp_id_telnet_n,
nvl(cc.transaction_amount, 0) -
nvl(cc.write_off_amount, 0) -
nvl(cc.returned_amount, 0) unwrite_off_amount,
nvl((hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id => null,
p_transaction_id =>cc.transaction_id,
p_user_id => 1)),
'正常') approve_status
from csh_transaction cc,
(select distinct ct.batch_id,
ct.source_transaction_id,
ct.bp_id,
ct.trans_review_status,
ct.source_trans_type,
ct.je_date
from csh_transaction_contemp ct
where nvl(ct.trans_review_status, 'NEW') <> 'NEW'
and ct.batch_id is not null
) v
where cc.transaction_id = v.source_transaction_id
) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.trans_review_status,t1.je_date desc order by t1.trans_review_status,t1.je_date desc
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"/> <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"/> <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"/>
<bm:field name="source_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CONTRACT_ID"/> <bm:field name="source_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CONTRACT_ID"/>
<bm:field name="source_transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_TRANSACTION_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/> <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" forInsert="false" forUpdate="false"/> <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" forInsert="false" forUpdate="false"/>
<bm:field name="je_date" databaseType="DATE" datatype="java.util.Date" physicalName="JE_DATE"/> <bm:field name="je_date" databaseType="DATE" datatype="java.util.Date" physicalName="JE_DATE"/>
...@@ -24,6 +25,9 @@ ...@@ -24,6 +25,9 @@
<bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" forInsert="false" forUpdate="false"/> <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" forInsert="false" forUpdate="false"/> <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" forInsert="false" forUpdate="false"/>
<bm:field name="file_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FILE_NUM" forInsert="false" forUpdate="false"/> <bm:field name="file_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FILE_NUM" forInsert="false" forUpdate="false"/>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -40,11 +44,14 @@ ...@@ -40,11 +44,14 @@
ct.batch_id, ct.batch_id,
ct.source_trans_type, ct.source_trans_type,
ct.source_contract_id, ct.source_contract_id,
ct.source_transaction_id,
ct.contract_id, ct.contract_id,
(select t.contract_number from con_contract t (select t.contract_number from con_contract t
where t.contract_id = ct.contract_id where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL' and t.data_class = 'NORMAL'
and rownum = 1) contract_number, and rownum = 1) contract_number,
ct.transaction_id,
'' transaction_num,
ct.deposit_trans_type, ct.deposit_trans_type,
(SELECT sc.code_value_name (SELECT sc.code_value_name
FROM sys_code_values_v sc FROM sys_code_values_v sc
...@@ -68,14 +75,57 @@ ...@@ -68,14 +75,57 @@
from csh_transaction_contemp ct, con_contract cc from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id where ct.contract_id = cc.contract_id
and ct.trans_review_status = 'NEW' and ct.trans_review_status = 'NEW'
and cc.data_class = 'NORMAL') t1 and cc.data_class = 'NORMAL'
union all
select ct.contemp_id,
ct.bp_id,
ct.batch_id,
ct.source_trans_type,
ct.source_contract_id,
ct.source_transaction_id,
ct.contract_id,
'' contract_number,
ct.transaction_id transaction_id,
(select t.transaction_num
from csh_transaction t
where t.transaction_id = ct.transaction_id
and rownum = 1) transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
ct.je_date,
ct.deposit_amount,
ct.deposit_info,
(select h.bp_id
from hls_bp_master hbm,hls_bp_master h
where hbm.unit_id=h.unit_id
and hbm.bp_id=cc.bp_id
and h.bp_category='AGENT') bp_id_agent_level1,
(SELECT u.bp_name
FROM hls_bp_master u,hls_bp_master hbm
WHERE u.unit_id = hbm.unit_id
and hbm.bp_id=cc.bp_id
and u.bp_category='AGENT') bp_id_agent_level1_n,
cc.bp_id bp_id_tenant,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id) bp_name,
(select count(1)
from fnd_atm_attachment_multi fm
where fm.table_name = 'CSH_TRANSACTION_CONTEMP'
and fm.table_pk_value = ct.contemp_id) file_num
from csh_transaction_contemp ct,csh_transaction cc
where ct.transaction_id = cc.transaction_id
and ct.trans_review_status = 'NEW') t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.contemp_id order by t1.contemp_id
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.source_contract_id=${@source_contract_id} "/> <bm:data-filter enforceOperations="query" expression="(t1.source_contract_id is null or(t1.source_contract_id is not null and t1.source_contract_id=${@source_contract_id})) "/>
<bm:data-filter enforceOperations="query" expression="t1.bp_id=${@bp_id} "/> <bm:data-filter enforceOperations="query" expression="t1.bp_id=${@bp_id} "/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</bm:primary-key> </bm:primary-key>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/> <bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/> <bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/> <bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
</bm:data-filters> </bm:data-filters>
......
<?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 hlcm_cux_deposit_pkg.deposit_return_bp_name(p_transaction_id=>${@transaction_id}) v_flag from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -107,7 +107,15 @@ ...@@ -107,7 +107,15 @@
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/> <bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/> <bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/> <bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="left_amount" expression=" (Select (nvl(Sum(c.transaction_amount), 0) - <bm:field name="left_amount" expression=" decode(t1.ref_contract_id,null,
(select (nvl(t1.transaction_amount,0)-
nvl(t1.write_off_amount,0)-
nvl(t1.returned_amount,0)-
nvl((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr
Where cr.transaction_id = t1.transaction_id
And cr.status = 'APPROVING'),0)) from dual),
(Select (nvl(Sum(c.transaction_amount), 0) -
nvl(Sum(c.write_off_amount), 0) - nvl(Sum(c.returned_amount), 0) - nvl(Sum(c.write_off_amount), 0) - nvl(Sum(c.returned_amount), 0) -
nvl(Sum((Select nvl(cr.return_amount, 0) nvl(Sum((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr From csh_transaction_return cr
...@@ -122,7 +130,7 @@ ...@@ -122,7 +130,7 @@
And c.ref_contract_id = And c.ref_contract_id =
(Select c1.ref_contract_id (Select c1.ref_contract_id
From csh_transaction c1 From csh_transaction c1
Where c1.transaction_id = t1.transaction_id) )" forInsert="false" forUpdate="false"/> Where c1.transaction_id = t1.transaction_id) ))" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -133,7 +141,7 @@ ...@@ -133,7 +141,7 @@
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/> <bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/> <bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/> <bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="(t1.returned_flag not in ('RETURN'))"/> <bm:data-filter name="query" expression="(t1.returned_flag not in ('RETURN'))"/>
</bm:data-filters> </bm:data-filters>
......
...@@ -102,6 +102,9 @@ ...@@ -102,6 +102,9 @@
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/> <bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/> <bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/> <bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="approval_status" expression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;WFL_STATUS&apos; And v.code_value = decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
<bm:field name="transaction_wfl_id"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
......
...@@ -133,7 +133,9 @@ ...@@ -133,7 +133,9 @@
where hm.bp_code in('D00010020','D00010023') where hm.bp_code in('D00010020','D00010023')
and hm.bp_id = t1.bp_id and hm.bp_id = t1.bp_id
and t1.collection_classes = 'DEPOSIT' and t1.collection_classes = 'DEPOSIT'
and t1.paid_byother_flag = 'F'))"/> and t1.paid_byother_flag = 'F') or
(t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and
t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/> <bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
<bm:data-filter name="query" expression="(exists ( <bm:data-filter name="query" expression="(exists (
(select 1 (select 1
......
...@@ -104,7 +104,54 @@ ...@@ -104,7 +104,54 @@
records[i].set('_status', 'update'); records[i].set('_status', 'update');
saveData.push(records[i].data); saveData.push(records[i].data);
} }
} else { }else if(transaction_type == 'DEPOSIT'){
//保证金抵扣时无合同按照收款的校验来判断 18083 2023/8/22
if(Ext.isEmpty('${/parameter/@ref_contract_id}')||'${/parameter/@ref_contract_id}' == 'undefined'){
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支持部分反冲");
return;
}
for (var i = 0; i < records.length; i++) {
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
}else{
var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!");
return;
}
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
//同批次未勾选的
var allR = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
var unR = [];
for (var i = 0; i < allR.length; i++) {
if (records.indexOf(allR[i]) === -1) {
unR.push(allR[i]);
}
}
for (var i = 0; i < unR.length; i++) {
if (unR[i].get('gld_batch_id') == gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!");
return;
}
//校验必须先核销批次较大的 18083 2023/8/23
for (var j = 0; j < records.length; j++) {
if (unR[i].get('gld_batch_id')>records[j].get('gld_batch_id')) {
Leaf.showInfoMessage("提示", "此现金事务下存在核销批次较大的批次,请先反冲!");
return;
}
}
}
}
}else {
var gld_batch_id = records[0].get('gld_batch_id'); var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) { if (records[i].get('gld_batch_id') != gld_batch_id) {
...@@ -129,6 +176,13 @@ ...@@ -129,6 +176,13 @@
Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!"); Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!");
return; return;
} }
//校验必须先核销批次较大的 18083 2023/8/23
for (var j = 0; j < records.length; j++) {
if (unR[i].get('gld_batch_id')>records[j].get('gld_batch_id')) {
Leaf.showInfoMessage("提示", "此现金事务下存在核销批次较大的批次,请先反冲!");
return;
}
}
} }
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
} }
function cshdeposit102N_transfer_submit() { function cshdeposit102N_transfer_submit() {
debugger;
if ($('deposit_transfer_detail_result_ds').validate()) { if ($('deposit_transfer_detail_result_ds').validate()) {
var deposit_records = $('deposit_transfer_detail_result_ds').getAll(); var deposit_records = $('deposit_transfer_detail_result_ds').getAll();
var role_code = '${/parameter/@role_code}'; var role_code = '${/parameter/@role_code}';
...@@ -69,8 +70,11 @@ ...@@ -69,8 +70,11 @@
}else if(role_code == '0002'||role_code == '0001'){ }else if(role_code == '0002'||role_code == '0001'){
var param = {}; var param = {};
var saveData = []; var saveData = [];
//新增划转源单据为未入账收款,传现金事务id 18083 2023/8/11
param['source_transaction_id'] = '${/parameter/@transaction_id}';
param['source_contract_id'] = '${/parameter/@contract_id}'; param['source_contract_id'] = '${/parameter/@contract_id}';
param['je_date'] = deposit_records[0].get('je_date'); param['je_date'] = deposit_records[0].get('je_date');
param['batch_id'] = deposit_records[0].get('batch_id');
param['hd_contract_id'] = deposit_records[0].get('contract_id'); param['hd_contract_id'] = deposit_records[0].get('contract_id');
var deposit_record; var deposit_record;
for (var i = 0; i < deposit_records.length; i++) { for (var i = 0; i < deposit_records.length; i++) {
...@@ -234,7 +238,11 @@ ...@@ -234,7 +238,11 @@
}, },
success: function () { success: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
if(!Ext.isEmpty(record.get('contract_number'))){
var file_name = "保证金划转-" + record.get('contract_number'); var file_name = "保证金划转-" + record.get('contract_number');
}else{
var file_name = "保证金划转-" + record.get('transaction_num');
}
var url_l = $('csh_deposit_trans_history_print_link_id').getUrl() + '?document_id=' + batch_id + '&file_name=' + encodeURI(file_name) + '&document_table=CSH_TRANSACTION_TRANSFER&batch_flag=Y&source_type=common'; var url_l = $('csh_deposit_trans_history_print_link_id').getUrl() + '?document_id=' + batch_id + '&file_name=' + encodeURI(file_name) + '&document_table=CSH_TRANSACTION_TRANSFER&batch_flag=Y&source_type=common';
window.open(href = url_l, target = "_self"); window.open(href = url_l, target = "_self");
}, },
...@@ -282,9 +290,10 @@ ...@@ -282,9 +290,10 @@
</a:fieldSet> </a:fieldSet>
<a:grid id="deposit_review_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds" <a:grid id="deposit_review_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds"
marginHeight="170" marginHeight="170"
navBar="false" width="1000"> navBar="false" width="1200">
<a:columns> <a:columns>
<a:column name="contract_number" align="center" prompt="合同编号" width="135"/> <a:column name="contract_number" align="center" prompt="合同编号" width="135"/>
<a:column name="transaction_num" align="center" prompt="现金事务编号" width="135"/>
<a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="160"/> <a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="160"/>
<a:column name="bp_name" align="center" prompt="承租人" width="122"/> <a:column name="bp_name" align="center" prompt="承租人" width="122"/>
<a:column name="deposit_trans_type_desc" align="center" prompt="保证金类型" width="124"/> <a:column name="deposit_trans_type_desc" align="center" prompt="保证金类型" width="124"/>
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
Leaf.request({ Leaf.request({
url: $('check_csh_transaction_status_link_id').getUrl(), url: $('check_csh_transaction_status_link_id').getUrl(),
para: { para: {
contract_id:record.get('contract_id') contract_id:record.get('contract_id'),
transaction_id:record.get('transaction_id')
}, },
success: function () { success: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
params: { params: {
winId: 'csh_transaction_deposit_transfer_link_winid', winId: 'csh_transaction_deposit_transfer_link_winid',
contract_id:record.get('contract_id'), contract_id:record.get('contract_id'),
transaction_id:record.get('transaction_id'),
bp_id_agent_level1:record.get('bp_id'), bp_id_agent_level1:record.get('bp_id'),
deposit_trans_type:record.get('deposit_trans_type'), deposit_trans_type:record.get('deposit_trans_type'),
deposit_trans_type_desc:record.get('deposit_trans_type_n') deposit_trans_type_desc:record.get('deposit_trans_type_n')
...@@ -106,7 +108,7 @@ ...@@ -106,7 +108,7 @@
title="查询条件" style="margin-left:20px" column="3"> title="查询条件" style="margin-left:20px" column="3">
<a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:textField name="bp_id_telnet_n" prompt="承租人" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:textField name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
</a:form> </a:form>
...@@ -114,7 +116,7 @@ ...@@ -114,7 +116,7 @@
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_transfer_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" > <a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_transfer_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns> <a:columns>
<a:column name="bp_name" prompt="代理店" align="center" width="200"/> <a:column name="bp_name" prompt="代理店" align="center" width="200"/>
<a:column name="bp_id_telnet_n" prompt="承租人" align="center" width="120"/> <a:column name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" align="center" width="180"/>
<a:column name="contract_number" prompt="合同编号" align="center"/> <a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="150"/> <a:column name="contract_name" prompt="合同名称" align="center" width="150"/>
<a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/> <a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/>
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
params: { params: {
winId: 'csh_transaction_detail_transfer_link_winid', winId: 'csh_transaction_detail_transfer_link_winid',
contract_id:record.get('source_contract_id'), contract_id:record.get('source_contract_id'),
transaction_id:record.get('source_transaction_id'),
batch_id:record.get('batch_id'), batch_id:record.get('batch_id'),
bp_id_agent_level1:record.get('bp_id'), bp_id_agent_level1:record.get('bp_id'),
deposit_trans_type:record.get('deposit_trans_type'), deposit_trans_type:record.get('deposit_trans_type'),
...@@ -106,7 +107,7 @@ ...@@ -106,7 +107,7 @@
title="查询条件" style="margin-left:20px" column="3"> title="查询条件" style="margin-left:20px" column="3">
<a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:textField name="bp_id_telnet_n" prompt="承租人" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:textField name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_review_maintain_query_ds"/>
</a:form> </a:form>
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_review_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" > <a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_review_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns> <a:columns>
<a:column name="bp_name" prompt="代理店" align="center" width="200"/> <a:column name="bp_name" prompt="代理店" align="center" width="200"/>
<a:column name="bp_id_telnet_n" prompt="承租人" align="center" width="120"/> <a:column name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" align="center" width="120"/>
<a:column name="contract_number" prompt="合同编号" align="center"/> <a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="200"/> <a:column name="contract_name" prompt="合同名称" align="center" width="200"/>
<a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/> <a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
modelaction="update"/> modelaction="update"/>
<a:link id="csh560_start_wfl_link" model="cus_deposit.CUS_DEPOSIT106.return_workflow_start" <a:link id="csh560_start_wfl_link" model="cus_deposit.CUS_DEPOSIT106.return_workflow_start"
modelaction="execute"/> modelaction="execute"/>
<a:link id="deposit_csh_return_bp_name_link" model="cus_deposit.CUS_DEPOSIT106.check_csh_bp_name" modelaction="query"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var csh_return_atm_id = '${/model/csh_return_list_id/record/@return_list_id}'; var csh_return_atm_id = '${/model/csh_return_list_id/record/@return_list_id}';
...@@ -238,7 +239,7 @@ ...@@ -238,7 +239,7 @@
<a:lov name="csh_return_bp_name" bindTarget="csh_transaction_deposit_return_maintain_ds" <a:lov name="csh_return_bp_name" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="退款用户" width="185"/> prompt="退款用户" width="185"/>
</a:box> </a:box>
<a:box column="4" labelWidth="115"> <a:box id="contract_number_ds" column="4" labelWidth="115">
<a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds" <a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="合同编号" readOnly="true" width="180"/> prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_deposit_return_maintain_ds" <a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_deposit_return_maintain_ds"
...@@ -322,12 +323,40 @@ ...@@ -322,12 +323,40 @@
// record.getField('return_date').setRequired(true); // record.getField('return_date').setRequired(true);
// record.getField('return_amount').setRequired(true); // record.getField('return_amount').setRequired(true);
var deposit_record = $('csh_transaction_deposit_return_maintain_ds').getCurrentRecord(); var deposit_record = $('csh_transaction_deposit_return_maintain_ds').getCurrentRecord();
//判断现金事务最初的收款商业伙伴与对方账户户名是否一致,不一致则不带出
Leaf.request({
url: $('deposit_csh_return_bp_name_link').getUrl(),
para: {
transaction_id:record.get('transaction_id')
},
success: function (res) {
if (res.result.record.v_flag=='Y'){
deposit_record.set('csh_return_bp_name', record.get('bp_name')); deposit_record.set('csh_return_bp_name', record.get('bp_name'));
deposit_record.set('csh_return_bp_id', record.get('bp_id')); deposit_record.set('csh_return_bp_id', record.get('bp_id'));
}else{
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
}
},
failure: function () {
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
},
error: function () {
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
},
scope: this
});
deposit_record.set('contract_number', record.get('contract_number')); deposit_record.set('contract_number', record.get('contract_number'));
deposit_record.set('bp_id_telnet_code', record.get('bp_id_telnet_code')); deposit_record.set('bp_id_telnet_code', record.get('bp_id_telnet_code'));
deposit_record.set('bp_id_telnet_n', record.get('bp_id_telnet_n')); deposit_record.set('bp_id_telnet_n', record.get('bp_id_telnet_n'));
deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name')); deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name'));
//未入账现金事务隐藏合同编号、承租人编码、承租人名称、合同剩余保证金 18083 2023/7/28
if(Ext.isEmpty(record.get('ref_contract_id'))){
document.getElementById('contract_number_ds').style.display='none';
}
} }
]]></script> ]]></script>
......
...@@ -116,9 +116,15 @@ ...@@ -116,9 +116,15 @@
if("${/model/seq_info/record/@position_012_flag}"=="1" && "${/model/seq_info/record/@current_seq}"=="5") { if("${/model/seq_info/record/@position_012_flag}"=="1" && "${/model/seq_info/record/@current_seq}"=="5") {
record.getField('finance_flag').setReadOnly(false); record.getField('finance_flag').setReadOnly(false);
record.set('finance_flag','N'); record.set('finance_flag','N');
if(Ext.isEmpty(record.get('contract_number'))){
document.getElementById('contract_number_ds').style.display='none';
}
}else{ }else{
record.set('finance_flag','Y'); record.set('finance_flag','Y');
record.getField('finance_flag').setReadOnly(true); record.getField('finance_flag').setReadOnly(true);
if(Ext.isEmpty(record.get('contract_number'))){
document.getElementById('contract_number_ds').style.display='none';
}
} }
} }
...@@ -158,7 +164,7 @@ ...@@ -158,7 +164,7 @@
<!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_return_wfl_ds" prompt="HLS.PAYMENT_METHOD" readOnly="true"/>--> <!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_return_wfl_ds" prompt="HLS.PAYMENT_METHOD" readOnly="true"/>-->
<!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_return_wfl_ds" decimalPrecision="-1" prompt="HLS.EXCHANGE_RATE" readOnly="true"/>--> <!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_return_wfl_ds" decimalPrecision="-1" prompt="HLS.EXCHANGE_RATE" readOnly="true"/>-->
</a:box> </a:box>
<a:box column="4" labelWidth="115"> <a:box id="contract_number_ds" column="4" labelWidth="115">
<a:textField name="contract_number" bindTarget="csh_transaction_return_wfl_ds" <a:textField name="contract_number" bindTarget="csh_transaction_return_wfl_ds"
prompt="合同编号" readOnly="true" width="180"/> prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_return_wfl_ds" <a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_return_wfl_ds"
...@@ -225,6 +231,7 @@ ...@@ -225,6 +231,7 @@
if ('${/model/default_value_path/record/@status}' != 'APPROVED') { if ('${/model/default_value_path/record/@status}' != 'APPROVED') {
document.getElementById("csh106_return_print_id").style.display = "none"; document.getElementById("csh106_return_print_id").style.display = "none";
} }
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<a:view> <a:view>
<a:link id="csh_write_off_reverse_detail_link" <a:link id="csh_write_off_reverse_detail_link"
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/> url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/>
<a:link id="csh_write_off_reverse_wfl_link" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_wfl.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//锁表 //锁表
...@@ -59,7 +60,10 @@ ...@@ -59,7 +60,10 @@
function seedetail_transaction_num(value, record, name) { function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) { if (record.get('transaction_id')) {
url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag')+ '&deposit_type=Y'; url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag')+ '&ref_contract_id=' + record.get('ref_contract_id')+ '&deposit_type=Y';
if(record.get('approval_status') == 'APPROVING' || record.get('approval_status') == 'APPROVED'){
url = $('csh_write_off_reverse_wfl_link').getUrl() + '?transaction_wfl_id=' + record.get('transaction_wfl_id')+ '&button_flag=YES';
}
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>'; return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} }
} }
......
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