Commit b4997d35 authored by 18083's avatar 18083

保证金管理模块改造

parent 44576ef1
...@@ -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},
...@@ -22,7 +24,7 @@ ...@@ -22,7 +24,7 @@
p_source_trans_type=>${@source_trans_type} p_source_trans_type=>${@source_trans_type}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute"> <bm:operation name="execute">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
...@@ -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;
......
...@@ -9,35 +9,75 @@ ...@@ -9,35 +9,75 @@
<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 *
ct.batch_id, from (select ct.contemp_id,
ct.bp_id, ct.batch_id,
ct.source_contract_id, ct.bp_id,
ct.contract_id, ct.source_contract_id,
ct.source_trans_type, ct.contract_id,
(select t.contract_number from con_contract t ct.source_transaction_id,
where t.contract_id = ct.contract_id ct.transaction_id,
and t.data_class = 'NORMAL' ct.source_trans_type,
and rownum = 1) contract_number, (select t.contract_number
ct.deposit_trans_type, from con_contract t
(SELECT sc.code_value_name where t.contract_id = ct.contract_id
FROM sys_code_values_v sc and t.data_class = 'NORMAL'
WHERE sc.code = 'DEPOSIT_TRANS_TYPE' and rownum = 1) contract_number,
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc, '' transaction_num,
to_char(ct.je_date,'yyyy-MM-dd') je_date, ct.deposit_trans_type,
ct.deposit_amount, (SELECT sc.code_value_name
ct.deposit_info, FROM sys_code_values_v sc
cc.bp_id_agent_level1, WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
(SELECT t.bp_name AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
FROM hls_bp_master t to_char(ct.je_date, 'yyyy-MM-dd') je_date,
WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n, ct.deposit_amount,
cc.bp_id_tenant, ct.deposit_info,
(SELECT bpv.bp_name cc.bp_id_agent_level1,
FROM hls_bp_master bpv (SELECT t.bp_name
WHERE bpv.bp_id = cc.bp_id_tenant) bp_name FROM hls_bp_master t
from csh_transaction_contemp ct, con_contract cc WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
where ct.contract_id = cc.contract_id cc.bp_id_tenant,
and cc.data_class = 'NORMAL') t1 (SELECT bpv.bp_name
FROM hls_bp_master bpv
WHERE bpv.bp_id = cc.bp_id_tenant) bp_name
from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id
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>
......
...@@ -99,9 +99,12 @@ ...@@ -99,9 +99,12 @@
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/> <bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/> <bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type"/> <bm:field name="deposit_trans_type"/>
<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/>
......
...@@ -78,9 +78,9 @@ ...@@ -78,9 +78,9 @@
<bm:field name="rate_method_code" expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)" forInsert="false" forUpdate="false"/> <bm:field name="rate_method_code" expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)" forInsert="false" forUpdate="false"/>
<bm:field name="zero_amounts_allowed" expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false"/> <bm:field name="zero_amounts_allowed" expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false"/>
<bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/> <bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/>
<!-- <bm:field name="unwrite_off_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>--> <!-- <bm:field name="unwrite_off_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>-->
<bm:field name="unwrite_off_amount" expression="(t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/> <bm:field name="unwrite_off_amount" expression="(t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>
<bm:field name="precision" expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)" forInsert="false" forUpdate="false"/> <bm:field name="precision" expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)" forInsert="false" forUpdate="false"/>
<bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false" prompt="CSH511.REVERSE_AMOUNT"/> <bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false" prompt="CSH511.REVERSE_AMOUNT"/>
<bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.created_by)" forInsert="false" forUpdate="false"/> <bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.created_by)" forInsert="false" forUpdate="false"/>
<bm:field name="auto_filt_penalty" expression="&apos;N&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PENALTY"/> <bm:field name="auto_filt_penalty" expression="&apos;N&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PENALTY"/>
...@@ -130,10 +130,13 @@ ...@@ -130,10 +130,13 @@
<bm:data-filter name="query" expression="((t1.ref_contract_id is not null and t1.source_type is not null) or <bm:data-filter name="query" expression="((t1.ref_contract_id is not null and t1.source_type is not null) or
exists (select hm.bp_id exists (select hm.bp_id
from hls_bp_master hm from hls_bp_master hm
where hm.bp_code = 'D00010012' 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="(exists ( <bm:data-filter name="query" expression="(exists (
(select 1 (select 1
from exp_emp_assign_e_v ee from exp_emp_assign_e_v ee
...@@ -148,7 +151,7 @@ ...@@ -148,7 +151,7 @@
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/> or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters> </bm:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="query_amount_flag" queryExpression="((${@query_amount_flag}='1' and ((t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))>0) )or(${@query_amount_flag}='2' and ( (t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))=0) )or (${@query_amount_flag}='3' and ( (t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))>=0)))"/> <bm:query-field name="query_amount_flag" queryExpression="((${@query_amount_flag}='1' and ((t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))>0) )or(${@query_amount_flag}='2' and ( (t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))=0) )or (${@query_amount_flag}='3' and ( (t1.transaction_amount-nvl((select sum(cw.write_off_due_amount) from csh_write_off cw where cw.csh_transaction_id=t1.transaction_id and cw.reversed_flag='N' and cw.write_off_date &lt;=nvl(to_date(${@write_off_date_to},&apos;yyyy-mm-dd&apos;),sysdate) ),0))>=0)))"/>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/> <bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/> <bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/> <bm:query-field field="bp_bank_account_name" queryOperator="like"/>
......
...@@ -104,8 +104,55 @@ ...@@ -104,8 +104,55 @@
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'){
var gld_batch_id = records[0].get('gld_batch_id'); //保证金抵扣时无合同按照收款的校验来判断 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');
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) {
Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!"); Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!");
...@@ -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 == '0003' || role_code == '0005'){ }else if(role_code == '0003' || role_code == '0005'){
var param = {}; var param = {};
var saveData = []; var saveData = [];
param['source_contract_id'] = '${/parameter/@contract_id}'; //新增划转源单据为未入账收款,传现金事务id 18083 2023/8/11
param['je_date'] = deposit_records[0].get('je_date'); param['source_transaction_id'] = '${/parameter/@transaction_id}';
param['source_contract_id'] = '${/parameter/@contract_id}';
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++) {
...@@ -224,7 +228,7 @@ ...@@ -224,7 +228,7 @@
}); });
function csh515_return_print() { function csh515_return_print() {
var record = $('deposit_review_maintain_result_ds').getSelected()[0]; var record = $('deposit_review_maintain_result_ds').getSelected()[0];
var batch_id = record.get('batch_id'); var batch_id = record.get('batch_id');
Leaf.Masker.mask(Ext.getBody(), '检验sbo编号中...'); Leaf.Masker.mask(Ext.getBody(), '检验sbo编号中...');
Leaf.request({ Leaf.request({
...@@ -234,7 +238,11 @@ ...@@ -234,7 +238,11 @@
}, },
success: function () { success: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
var file_name = "保证金划转-" + record.get('contract_number'); if(!Ext.isEmpty(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"/>
......
...@@ -39,12 +39,13 @@ ...@@ -39,12 +39,13 @@
var ds_id = 'deposit_transfer_maintain_result_ds'; var ds_id = 'deposit_transfer_maintain_result_ds';
var ds = $(ds_id); var ds = $(ds_id);
var record = ds.getSelected()[0]; var record = ds.getSelected()[0];
var url = $('csh_transaction_transfer_detail_link').getUrl(); var url = $('csh_transaction_transfer_detail_link').getUrl();
Leaf.Masker.mask(Ext.getBody(), '正在执行...'); Leaf.Masker.mask(Ext.getBody(), '正在执行...');
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}';
...@@ -242,8 +243,8 @@ ...@@ -242,8 +243,8 @@
<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"
prompt="承租人编码" readOnly="true" width="170"/> prompt="承租人编码" readOnly="true" width="170"/>
...@@ -345,12 +346,40 @@ ...@@ -345,12 +346,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();
deposit_record.set('csh_return_bp_name', record.get('bp_name')); //判断现金事务最初的收款商业伙伴与对方账户户名是否一致,不一致则不带出
deposit_record.set('csh_return_bp_id', record.get('bp_id')); 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_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';
}
} }
} }
...@@ -161,7 +167,7 @@ ...@@ -161,7 +167,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"
...@@ -246,6 +252,7 @@ ...@@ -246,6 +252,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