Commit 317c05f8 authored by 18083's avatar 18083

保证金管理模块改造

parent c79e06e5
......@@ -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="(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="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="(((${@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')"/>
......
......@@ -13,8 +13,10 @@
hlcm_cux_deposit_pkg.execute_deposit_transfer(
p_session_id=>${/session/@session_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_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_deposit_amount=>${@deposit_amount},
p_deposit_trans_type=>${@deposit_trans_type},
p_company_id=>${/session/@company_id},
......@@ -22,7 +24,7 @@
p_source_trans_type=>${@source_trans_type}
);
end;
]]></bm:update-sql>
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
......@@ -30,6 +32,8 @@
hlcm_cux_deposit_pkg.create_deposit_transfer_je(
p_hd_contract_id=>${@hd_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}
);
end;
......
......@@ -9,35 +9,75 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select ct.contemp_id,
ct.batch_id,
ct.bp_id,
ct.source_contract_id,
ct.contract_id,
ct.source_trans_type,
(select t.contract_number from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) contract_number,
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,
cc.bp_id_agent_level1,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(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') t1
select *
from (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,
(select t.contract_number
from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) contract_number,
'' 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,
cc.bp_id_agent_level1,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(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#
order by t1.je_date desc
]]></bm:query-sql>
......
......@@ -15,6 +15,7 @@
<bm:query-sql><![CDATA[
select *
from (select v.source_contract_id,
null source_transaction_id,
v.batch_id,
v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date,
......@@ -28,6 +29,7 @@
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
cc.contract_number,
'' transaction_num,
cc.contract_name,
cc.bp_id_agent_level1,
(SELECT t.bp_name
......@@ -67,7 +69,52 @@
and ct.batch_id is not null
) v
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#
order by t1.trans_review_status,t1.je_date desc
......
......@@ -11,6 +11,7 @@
<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="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_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"/>
......@@ -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_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="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:features>
<f:standard-who/>
......@@ -40,11 +44,14 @@
ct.batch_id,
ct.source_trans_type,
ct.source_contract_id,
ct.source_transaction_id,
ct.contract_id,
(select t.contract_number from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) contract_number,
ct.transaction_id,
'' transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
......@@ -68,14 +75,57 @@
from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id
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#
order by t1.contemp_id
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<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-filters>
</bm:model>
......@@ -113,7 +113,7 @@
</bm:primary-key>
<bm:data-filters>
<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="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
</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 @@
<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="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((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr
......@@ -122,7 +130,7 @@
And c.ref_contract_id =
(Select c1.ref_contract_id
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:features>
<f:standard-who/>
......@@ -133,7 +141,7 @@
<bm:data-filters>
<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="(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.returned_flag not in ('RETURN'))"/>
</bm:data-filters>
......
......@@ -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="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="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="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:features>
<f:standard-who/>
......
......@@ -133,7 +133,9 @@
where hm.bp_code in('D00010020','D00010023')
and hm.bp_id = t1.bp_id
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 (
(select 1
......
......@@ -104,8 +104,55 @@
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
} else {
var gld_batch_id = records[0].get('gld_batch_id');
}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');
for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!");
......@@ -129,6 +176,13 @@
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;
}
}
}
}
......
......@@ -26,6 +26,7 @@
}
function cshdeposit102N_transfer_submit() {
debugger;
if ($('deposit_transfer_detail_result_ds').validate()) {
var deposit_records = $('deposit_transfer_detail_result_ds').getAll();
var role_code = '${/parameter/@role_code}';
......@@ -69,8 +70,11 @@
}else if(role_code == '0002'||role_code == '0001'){
var param = {};
var saveData = [];
param['source_contract_id'] = '${/parameter/@contract_id}';
param['je_date'] = deposit_records[0].get('je_date');
//新增划转源单据为未入账收款,传现金事务id 18083 2023/8/11
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');
var deposit_record;
for (var i = 0; i < deposit_records.length; i++) {
......@@ -224,7 +228,7 @@
});
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');
Leaf.Masker.mask(Ext.getBody(), '检验sbo编号中...');
Leaf.request({
......@@ -234,7 +238,11 @@
},
success: function () {
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';
window.open(href = url_l, target = "_self");
},
......@@ -282,9 +290,10 @@
</a:fieldSet>
<a:grid id="deposit_review_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds"
marginHeight="170"
navBar="false" width="1000">
navBar="false" width="1200">
<a:columns>
<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_name" align="center" prompt="承租人" width="122"/>
<a:column name="deposit_trans_type_desc" align="center" prompt="保证金类型" width="124"/>
......
......@@ -39,12 +39,13 @@
var ds_id = 'deposit_transfer_maintain_result_ds';
var ds = $(ds_id);
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.request({
url: $('check_csh_transaction_status_link_id').getUrl(),
para: {
contract_id:record.get('contract_id')
contract_id:record.get('contract_id'),
transaction_id:record.get('transaction_id')
},
success: function () {
Leaf.Masker.unmask(Ext.getBody());
......@@ -54,6 +55,7 @@
params: {
winId: 'csh_transaction_deposit_transfer_link_winid',
contract_id:record.get('contract_id'),
transaction_id:record.get('transaction_id'),
bp_id_agent_level1:record.get('bp_id'),
deposit_trans_type:record.get('deposit_trans_type'),
deposit_trans_type_desc:record.get('deposit_trans_type_n')
......@@ -106,7 +108,7 @@
title="查询条件" style="margin-left:20px" column="3">
<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_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="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
</a:form>
......@@ -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:columns>
<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_name" prompt="合同名称" align="center" width="150"/>
<a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/>
......
......@@ -44,6 +44,7 @@
params: {
winId: 'csh_transaction_detail_transfer_link_winid',
contract_id:record.get('source_contract_id'),
transaction_id:record.get('source_transaction_id'),
batch_id:record.get('batch_id'),
bp_id_agent_level1:record.get('bp_id'),
deposit_trans_type:record.get('deposit_trans_type'),
......@@ -106,7 +107,7 @@
title="查询条件" style="margin-left:20px" column="3">
<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_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="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_review_maintain_query_ds"/>
</a:form>
......@@ -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:columns>
<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_name" prompt="合同名称" align="center" width="200"/>
<a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/>
......
......@@ -16,6 +16,7 @@
modelaction="update"/>
<a:link id="csh560_start_wfl_link" model="cus_deposit.CUS_DEPOSIT106.return_workflow_start"
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 type="text/javascript"><![CDATA[
var csh_return_atm_id = '${/model/csh_return_list_id/record/@return_list_id}';
......@@ -242,8 +243,8 @@
<a:lov name="csh_return_bp_name" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="退款用户" width="185"/>
</a:box>
<a:box column="4" labelWidth="115">
<a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds"
<a:box id="contract_number_ds" column="4" labelWidth="115">
<a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="承租人编码" readOnly="true" width="170"/>
......@@ -345,12 +346,40 @@
// record.getField('return_date').setRequired(true);
// record.getField('return_amount').setRequired(true);
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('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_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>
......
......@@ -116,9 +116,15 @@
if("${/model/seq_info/record/@position_012_flag}"=="1" && "${/model/seq_info/record/@current_seq}"=="5") {
record.getField('finance_flag').setReadOnly(false);
record.set('finance_flag','N');
if(Ext.isEmpty(record.get('contract_number'))){
document.getElementById('contract_number_ds').style.display='none';
}
}else{
record.set('finance_flag','Y');
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 @@
<!--<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: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"
prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_return_wfl_ds"
......@@ -246,6 +252,7 @@
if ('${/model/default_value_path/record/@status}' != 'APPROVED') {
document.getElementById("csh106_return_print_id").style.display = "none";
}
}
......
......@@ -13,6 +13,7 @@
<a:view>
<a:link id="csh_write_off_reverse_detail_link"
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[
//锁表
......@@ -59,7 +60,10 @@
function seedetail_transaction_num(value, record, name) {
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>';
}
}
......
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