Commit e1c6fc80 authored by 23459's avatar 23459

I-7715 【建机】汇联易上传材料批量打印优化

parent 675ad199
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" baseTable="CSH_DEPOSIT_CASHFLOW" alias="t">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select (select hb.bp_name
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id
and hb.bp_id = cc.bp_id_agent_level1) AS bp_name_n,
(select cc.contract_number
from con_contract cc
where cc.contract_id = ct.ref_contract_id) AS contract_number,
(select hb.bp_code
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id
and hb.bp_id = cc.bp_id_tenant) AS bp_id_telnet_code,
(select hb.bp_name
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id
and hb.bp_id = cc.bp_id_tenant) AS bp_id_telnet_n,
cr.return_date,
to_char(cr.return_date,'yyyy-MM-dd') AS return_date_n,
cr.this_return_amount,
cr.left_amount,
cr.bp_bank_account_name,
cr.opposite_band_na,
(select a.bank_account_num
from csh_bank_account a
where a.bank_account_id = cr.csh_return_atm_id) AS bank_account_num,
(select su.description
from sys_user su
where su.user_id = cr.created_by) AS user_desc,
decode((select count(1)
from HLS_JOURNAL_HEADER hh, hls_journal_detail hd
where hh.journal_header_id = hd.journal_header_id
and hh.source_table = 'CSH_TRANSACTION'
and hh.source_id = cr.transaction_id
and hh.je_transaction_code = 'CSH_WRITE_OFF_CM'
and hd.amount_cr = cr.return_amount),
0,
'否',
'是') journal_flag,
cr.return_id,
cr.transaction_id,
cr.csh_return_atm_id
from csh_transaction_return cr, csh_transaction ct
where cr.status = 'APPROVED'
and cr.return_type = 'DEPOSIT'
and cr.transaction_id = ct.transaction_id
order by cr.return_date desc) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="return_date_from" queryExpression="t1.return_date &gt;= to_date(${@return_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="return_date_to" queryExpression="t1.return_date &lt;= to_date(${@return_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="this_return_amount_from" queryExpression="t1.this_return_amount &gt;= ${@this_return_amount_from}"/>
<bm:query-field name="this_return_amount_to" queryExpression="t1.this_return_amount &lt;= ${@this_return_amount_to}"/>
<bm:query-field name="left_amount_from" queryExpression="t1.left_amount &gt;= ${@left_amount_from}"/>
<bm:query-field name="left_amount_to" queryExpression="t1.left_amount &lt;= ${@left_amount_to}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_id_telnet_n" queryExpression="t1.bp_id_telnet_n like &apos;%&apos;||${@bp_id_telnet_n}||&apos;%&apos;"/>
<bm:query-field name="bp_name_n" queryExpression="t1.bp_name_n like &apos;%&apos;||${@bp_name_n}||&apos;%&apos;"/>
<bm:query-field name="user_desc" queryExpression="t1.user_desc like &apos;%&apos;||${@user_desc}||&apos;%&apos;"/>
<bm:query-field name="bp_bank_account_name" queryExpression="t1.bp_bank_account_name like &apos;%&apos;||${@bp_bank_account_name}||&apos;%&apos;"/>
<bm:query-field name="opposite_band_na" queryExpression="t1.opposite_band_na like &apos;%&apos;||${@opposite_band_na}||&apos;%&apos;"/>
<bm:query-field name="bank_account_num" queryExpression="t1.bank_account_num like &apos;%&apos;||${@bank_account_num}||&apos;%&apos;"/>
<bm:query-field name="return_id" queryExpression="t1.return_id in (${:@return_id})"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="file_type"/>
<bm:field name="table_name"/>
<bm:field name="table_pk_value"/>
<bm:field name="attachment_id"/>
<bm:field name="file_name"/>
<bm:field name="file_size"/>
<bm:field name="file_path"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT fa.attachment_id,
fa.file_name,
fa.file_size,
fa.file_path,
UPPER(fa.file_type_code) file_type,
fam.table_name,
fam.table_pk_value
FROM fnd_atm_attachment fa
LEFT OUTER JOIN fnd_atm_attachment_multi fam
ON fa.attachment_id = fam.attachment_id) fam
WHERE fam.table_name = ${@table_name}
and fam.table_pk_value = ${@table_pk_value}
ORDER BY file_name
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_doc_file_templet_pkg.init_hls_doc_file_content(
p_document_id =>${@document_id},
p_document_table =>${@document_table},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
delete csh_transaction_detail_temp c where c.session_id = ${/session/@session_id};
for c_return_id in (select cr.return_id from csh_transaction_return cr
where cr.return_id in (${:@return_id})) loop
csh_transaction_return_pkg.csh_insert_return_info(
p_return_id => c_return_id.return_id,
p_session_id =>${/session/@session_id},
p_user_id =>${/session/@user_id}
);
end loop;
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh_transaction_return_pkg.check_detail_sbo_num(
p_session_id =>${/session/@session_id},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select ct.return_id,t.csh_return_atm_id
from csh_transaction_detail_temp ct, csh_transaction_return t
where t.return_id=ct.return_id and ct.session_id = ${/session/@session_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="return_id"/>
<bm:field name="csh_return_atm_id"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="return_file_path"/>
<bm:field name="year"/>
<bm:field name="month"/>
<bm:field name="hour"/>
<bm:field name="minute"/>
<bm:field name="second"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select sys_parameter_pkg.value('CSH_RETURN_FILE_PATH') return_file_path,
to_char(sysdate,'yyyy') year,
to_char(sysdate,'mm') month,
to_char(sysdate,'hh') hour,
to_char(sysdate,'mi') minute,
to_char(sysdate,'ss') second
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num " needAccessControl="false">
<bm:fields>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM"/>
<bm:field name="transaction_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_CATEGORY" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_CATEGORY"/>
<bm:field name="transaction_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH511_TRANSACTION_TYPE" lookupField="transaction_type_desc" physicalName="TRANSACTION_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_TYPE"/>
<bm:field name="transaction_date" databaseType="DATE" datatype="java.util.Date" physicalName="TRANSACTION_DATE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_DATE"/>
<bm:field name="penalty_calc_date" databaseType="DATE" datatype="java.util.Date" physicalName="PENALTY_CALC_DATE" prompt="CSH511.CSH_TRANSACTION.PENALTY_CALC_DATE"/>
<bm:field name="bank_slip_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_SLIP_NUM" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH511.CSH_TRANSACTION.COMPANY_ID"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CSH511.CSH_TRANSACTION.INTERNAL_PERIOD_NUM"/>
<bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME" prompt="HLS.ACCOUNT_PERIOD_NAME"/>
<bm:field name="payment_method_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PAYMENT_METHOD_ID" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRIBUTION_SET_ID" prompt="CSH511.CSH_TRANSACTION.DISTRIBUTION_SET_ID"/>
<bm:field name="cashflow_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CASHFLOW_AMOUNT" prompt="CSH511.CSH_TRANSACTION.CASHFLOW_AMOUNT"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="HLS.CURRENCY"/>
<bm:field name="transaction_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TRANSACTION_AMOUNT" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT" />
<bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="exchange_rate_quotation" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_QUOTATION" prompt="CSH511.CSH_TRANSACTION.EXCHANGE_RATE_QUOTATION"/>
<bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE" prompt="HLS.EXCHANGE_RATE"/>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BANK_ACCOUNT_ID"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="CSH511.CSH_TRANSACTION.BP_ID"/>
<bm:field name="bp_bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BP_BANK_ACCOUNT_ID"/>
<bm:field name="bp_bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_BANK_ACCOUNT_NUM" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.NOTE"/>
<bm:field name="handling_charge" databaseType="NUMBER" datatype="java.lang.Double" physicalName="HANDLING_CHARGE" prompt="CSH511.CSH_TRANSACTION.HANDLING_CHARGE"/>
<bm:field name="posted_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSTED_FLAG" prompt="CSH511.CSH_TRANSACTION.POSTED_FLAG"/>
<bm:field name="reversed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REVERSED_FLAG" prompt="CSH511.CSH_TRANSACTION.REVERSED_FLAG"/>
<bm:field name="reversed_date" databaseType="DATE" datatype="java.util.Date" physicalName="REVERSED_DATE" prompt="CSH511.CSH_TRANSACTION.REVERSED_DATE"/>
<bm:field name="returned_flag" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH510_RETURN_SELECT" lookupField="returned_flag_desc" physicalName="RETURNED_FLAG" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="returned_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RETURNED_AMOUNT" prompt="CSH511.CSH_TRANSACTION.RETURNED_AMOUNT"/>
<bm:field name="write_off_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WRITE_OFF_FLAG" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_FLAG"/>
<bm:field name="write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_AMOUNT" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_AMOUNT"/>
<bm:field name="full_write_off_date" databaseType="DATE" datatype="java.util.Date" physicalName="FULL_WRITE_OFF_DATE" prompt="CSH511.CSH_TRANSACTION.FULL_WRITE_OFF_DATE"/>
<bm:field name="twin_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TWIN_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.TWIN_CSH_TRX_ID"/>
<bm:field name="return_from_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RETURN_FROM_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.RETURN_FROM_CSH_TRX_ID"/>
<bm:field name="reversed_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REVERSED_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.REVERSED_CSH_TRX_ID"/>
<bm:field name="source_csh_trx_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_CSH_TRX_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_TYPE"/>
<bm:field name="source_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_ID"/>
<bm:field name="source_doc_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_DOC_CATEGORY"/>
<bm:field name="source_doc_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_DOC_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_TYPE"/>
<bm:field name="source_doc_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_ID"/>
<bm:field name="source_doc_line_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_LINE_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_LINE_ID"/>
<bm:field name="create_je_mothed" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_MOTHED"/>
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="CSH511.CSH_TRANSACTION.GLD_INTERFACE_FLAG"/>
<bm:field name="bp_code" expression="(select d.bp_code from hls_bp_master_v d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" expression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="payment_method_display" expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)" forInsert="false" forUpdate="false" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="currency_name" expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)" forInsert="false" forUpdate="false" prompt="HLS.CURRENCY"/>
<bm:field name="bp_category_display" expression="(select b.description from hls_bp_category b where b.bp_category=t1.bp_category)" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="exchange_rate_type_display" expression="(select tv.type_name from gld_exchangerate_types_vl tv where tv.type_code=t1.exchange_rate_type)" forInsert="false" forUpdate="false" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="transaction_functional_amount" expression="gld_exchange_rate_pkg.get_currency_exchange(t1.transaction_amount,t1.exchange_rate,t1.exchange_rate_quotation)" forInsert="false" forUpdate="false" prompt="HLS.FUNCTIONAL_AMOUNT"/>
<bm:field name="bank_account_code" expression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_CODE"/>
<bm:field name="bank_account_name" expression="(select a.bank_account_name from csh_bank_account a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:field name="bank_account_num" expression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="bp_bank_account_code" expression="(select a.bank_account_code from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BP_BANK_ACCOUNT_CODE"/>
<!--<bm:field name="bp_bank_account_name" expression="(select a.bank_account_name from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>-->
<bm:field name="bp_bank_account_name" prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:field name="functional_currency_code" expression="(select gb.functional_currency_code from fnd_companies fc, gld_set_of_books gb where fc.company_id = ${/session/@company_id} and fc.set_of_books_id = gb.set_of_books_id)" 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="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="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="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_prinicipal_interest" expression="&apos;Y&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PRINICIPAL_INTEREST"/>
<bm:field name="returned_flag_desc" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="receipt_type"/>
<bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/>
<bm:field name="ref_contract_id"/>
<bm:field name="contract_number" expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="contract_name" expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="collection_classes"/>
<bm:field name="collection_classes_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)" forInsert="false" forUpdate="false"/>
<bm:field name="confirmed_flag_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CONFIRMED_FLAG' and v.code_value =t1.confirmed_flag)" forInsert="false" forUpdate="false"/>
<bm:field name="written_off_flag_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'WRITE_OFF_FLAG' and v.code_value =t1.WRITE_OFF_FLAG)" forInsert="false" forUpdate="false"/>
<bm:field name="bank_branch_name" expression="(select bank_branch_name from csh_bank_branch where bank_branch_id = (select bank_branch_id from csh_bank_account where bank_account_id = t1.bank_account_id))" forInsert="false" forUpdate="false"/>
<bm:field name="use_money_amount" expression="(select t1.transaction_amount-t1.returned_amount from dual)" forInsert="false" forUpdate="false"/>
<bm:field name="opposite_band_na"/>
<bm:field name="applying_amount" expression="(nvl((select sum(cr.return_amount) from csh_transaction_return cr where cr.transaction_id=t1.transaction_id and cr.status='APPROVING'),0))" forInsert="false" forUpdate="false"/>
<bm:field name="return_id" expression="(select cr.return_id from csh_transaction_return cr where cr.transaction_id=t1.transaction_id and cr.status='APPROVING')" forInsert="false" forUpdate="false"/>
<bm:field name="banka"/>
<bm:field name="purpose"/>
<bm:field name="gsber"/>
<bm:field name="sus_belnr"/>
<bm:field name="bp_virtual_bank_account"/>
<bm:field name="confirmed_flag" />
<bm:field name="debt_confirmed_by"/>
<bm:field name="debt_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.debt_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="acc_confirmed_by"/>
<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_id_telnet_code" expression="(select hb.bp_code 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_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_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) -
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
Where cr.transaction_id = c.transaction_id
And cr.status = 'APPROVING')),
0))
From csh_transaction c
Where c.company_id = ${/session/@company_id}
And c.ref_contract_id Is Not Null
And c.transaction_type = 'DEPOSIT'
And c.source_type Is Not Null
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"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="transaction_id"/>
</bm:primary-key>
<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.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="exists (select 1 from csh_transaction_return cr where cr.transaction_id = t1.transaction_id and cr.status = 'APPROVED' and cr.return_type = 'DEPOSIT')"/>
</bm:data-filters>
<bm:query-fields>
<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="bp_bank_account_name" queryOperator="like"/>
<bm:query-field field="receipt_type" queryOperator="="/>
<bm:query-field field="opposite_band_na" queryOperator="like"/>
<bm:query-field field="bp_bank_account_num" queryOperator="like"/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
<bm:query-field name="transaction_num_to" queryExpression="t1.transaction_num &lt;= ${@transaction_num_to}"/>
<bm:query-field name="bank_slip_num" queryExpression="t1.bank_slip_num like &apos;%&apos;||${@bank_slip_num}||&apos;%&apos;"/>
<!-- <bm:query-field name="bank_slip_num_to" queryExpression="t1.bank_slip_num &lt;= ${@bank_slip_num_to}"/>-->
<bm:query-field name="transaction_amount_from" queryExpression="t1.transaction_amount &gt;= ${@transaction_amount_from}"/>
<bm:query-field name="transaction_amount_to" queryExpression="t1.transaction_amount &lt;= ${@transaction_amount_to}"/>
<bm:query-field name="currency_code_from" queryExpression="t1.currency_code &gt;= ${@currency_code_from}"/>
<bm:query-field name="currency_code_to" queryExpression="t1.currency_code &lt;= ${@currency_code_to}"/>
<bm:query-field name="bank_account_code" queryExpression="exists (select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id and a.bank_account_code = ${@bank_account_code})"/>
<bm:query-field name="bank_account_code_from" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) &gt;= ${@bank_account_code_from}"/>
<bm:query-field name="bank_account_code_to" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) &lt;= ${@bank_account_code_to}"/>
<bm:query-field name="transaction_date_from" queryExpression="transaction_date &gt;= to_date(${@transaction_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="transaction_date_to" queryExpression="transaction_date &lt;= to_date(${@transaction_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="user_id" queryExpression="t1.created_by=${@user_id}"/>
<bm:query-field name="full_write_off_flag" queryExpression="t1.write_off_flag!=${@full_write_off_flag}"/>
<bm:query-field name="full_returned_flag" queryExpression="t1.returned_flag!=${@full_returned_flag}"/>
<bm:query-field name="not_write_off_flag" queryExpression="t1.write_off_flag!=${@not_write_off_flag}"/>
<bm:query-field name="not_reversed_flag_r" queryExpression="t1.reversed_flag!=${@not_reversed_flag_r}"/>
<bm:query-field name="bp_id_from" queryExpression="t1.bp_id&gt;=${@bp_id_from}"/>
<bm:query-field name="bp_id_to" queryExpression="t1.bp_id&lt;=${@bp_id_to}"/>
<bm:query-field field="write_off_flag" queryOperator="="/>
<bm:query-field field="posted_flag" queryOperator="="/>
<bm:query-field field="returned_flag" queryOperator="="/>
<bm:query-field field="reversed_flag" queryOperator="="/>
<bm:query-field field="period_name" queryOperator="="/>
<bm:query-field field="payment_method_id" queryOperator="="/>
<bm:query-field field="transaction_category" queryOperator="="/>
<bm:query-field field="transaction_type" queryOperator="="/>
<bm:query-field field="transaction_id" queryOperator="="/>
<bm:query-field field="collection_classes" queryOperator="="/>
<bm:query-field name="reverse_write_off_amount_flag" queryExpression="t1.write_off_amount &gt; 0 and ${@reverse_write_off_amount_flag}=&apos;Y&apos;"/>
<bm:query-field field="bp_id" queryOperator="="/>
<bm:query-field name="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<bm:query-field name="bank_account_num" queryExpression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id) like &apos;%&apos;||upper(${@bank_account_num})||&apos;%&apos;"/>
<!--<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||upper(${@contract_number})||&apos;%&apos;"/>-->
<bm:query-field name="bp_id_telnet_n" queryExpression="(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) like ${@bp_id_telnet_n}"/>
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_name_n" queryExpression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id) like ${@bp_name_n} "/>
<bm:query-field name="deposit_trans_type" queryExpression="t1.deposit_trans_type=${@deposit_trans_type}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select
cr.return_id,
to_char(cr.return_date, 'yyyy-mm-dd') return_date,
cr.return_amount,
ct.period_name,
cr.opposite_band_na,
cr.bp_bank_account_num,
(select cp.description
from csh_payment_method cp
where cp.payment_method_id =
ct.payment_method_id) payment_method_display,
ct.exchange_rate,
ct.bank_slip_num,
(select gc.currency_name
from gld_currency_vl gc
where gc.currency_code = ct.currency_code),
(select tv.type_name
from gld_exchangerate_types_vl tv
where tv.type_code = ct.exchange_rate_type),
(select a.bank_account_code
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_code,
(select a.bank_account_name
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_name,
(select a.bank_account_num
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_num,
(select a.bank_account_code
from hls_bp_master_bank_account a
where a.bank_account_id =
ct.bp_bank_account_id) bp_bank_account_code,
cr.bp_bank_account_name,
cr.notes description,
cr.csh_return_atm_id,
cr.csh_return_bp_id,
(select a.bp_name
from hls_bp_master a
where a.bp_id = cr.csh_return_bp_id) csh_return_bp_name,
(select hb.bp_code
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id and hb.bp_id = cc.bp_id_tenant) bp_id_telnet_code,
(select hb.bp_name
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id and hb.bp_id = cc.bp_id_tenant) bp_id_telnet_n,
(select cc.contract_number
from con_contract cc
where cc.contract_id = ct.ref_contract_id) contract_number,
(select a.bp_name
from hls_bp_master a
where a.bp_id = ct.bp_id) bp_agent_name,
nvl(cr.left_amount, 0) as left_amount
from csh_transaction ct, csh_transaction_return cr
where ct.transaction_id = cr.transaction_id
) v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2015-6-10 下午03:17:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
faa.file_name,
faa.file_path,
faa.file_type_code,
(
CASE
WHEN document_table='CON_CONTRACT'
THEN
(SELECT
c.contract_number
FROM
con_contract c
WHERE
c.contract_id=to_number(${@document_id})
)
ELSE ''
END ) contract_number,
(
CASE
WHEN document_table='CON_CONTRACT'
THEN
(SELECT
c.bp_id_tenant_n
FROM
con_contract_lv c
WHERE
c.contract_id=to_number(${@document_id})
)
ELSE ''
END ) bp_id_tenant_n,
(
CASE
WHEN document_table='CON_CONTRACT'
THEN
(SELECT
p.project_number
FROM
con_contract c,
prj_project p
WHERE
p.project_id =c.project_id AND
c.contract_id=to_number(${@document_id})
)
ELSE ''
END ) project_number,
(SELECT
'Y'
FROM
fnd_atm_attachment_multi m1
WHERE
m1.table_name = 'HLS_DOC_FILE_CONTENT' AND
m1.table_pk_value = cc.content_id
) file_exists_flag,
(SELECT
faa.file_name
FROM
fnd_atm_attachment_multi m1,
fnd_atm_attachment faa
WHERE
m1.table_name = 'HLS_DOC_FILE_CONTENT' AND
m1.table_pk_value = cc.content_id AND
m1.attachment_id = faa.attachment_id
) download_file_name,
(SELECT
faa.file_path
FROM
fnd_atm_attachment_multi m1,
fnd_atm_attachment faa
WHERE
m1.table_name = 'HLS_DOC_FILE_CONTENT' AND
m1.table_pk_value = cc.content_id AND
m1.attachment_id = faa.attachment_id
) download_file_path,
(SELECT
m1.attachment_id
FROM
fnd_atm_attachment_multi m1
WHERE
m1.table_name = 'HLS_DOC_FILE_CONTENT' AND
m1.table_pk_value = cc.content_id
) download_attachment_id,
NVL(${/parameter/@to_file_name},faa.file_name) to_file_name,
lt.pwd,
cc.content_id,
(SELECT
cct.templet_code
FROM
con_clause_templet cct
WHERE
cct.templet_id=cc.templet_id
) templet_code,
faa.attachment_id
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
hls_doc_file_content cc
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.doc_plugin_flag = 'Y' AND
t.templet_id = cc.templet_id AND
(
cc.document_id =${@document_id} AND
cc.document_table =${@document_table} AND
${/parameter/@batch_flag}='Y'
) and rownum=1
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_doc_file_templet_pkg.init_hls_doc_file_content(
p_document_id =>${/parameter/@document_id},
p_document_table =>${/parameter/@document_table},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="file_exists_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_EXISTS_FLAG"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
<bm:field name="pwd" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PWD"/>
<bm:field name="content_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTENT_ID"/>
<bm:field name="download_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOWNLOAD_FILE_NAME"/>
<bm:field name="download_file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOWNLOAD_FILE_PATH"/>
<bm:field name="attachment_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="download_attachment_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="con_print_path.js"><![CDATA[
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.com.hand.hls.hlcm.util);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(java.io);
importPackage(Packages.com.itextpdf.text);
importPackage(Packages.com.itextpdf.text.pdf);
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
transfer(file_path, os);
os.flush();
os.close();
}
//word生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path;
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
// deleteFile(word_file_path);
return pdf_file_path_new;
}
//删除目录以及以下文件
function delFiles(attachment_path){
var attachment_file=new File(String(attachment_path));
//目录
if(attachment_file.isDirectory()){
var files = attachment_file.listFiles();
for (var i = 0;i < files.length;i++){
if(files[i].isFile()){
files[i].delete();
}else{
delFiles(files[i]);
}
}
}
//删除 文件、空目录
attachment_file.delete();
}
//合并PDF
function mergePdfFiles(files, newfile) {
var document = null;
try {
document = new Document(new PdfReader(files[0]).getPageSize(1));
var copy = new PdfCopy(document, new FileOutputStream(newfile));
document.open();
for (var i = 0; i < files.length; i++) {
var reader = new PdfReader(files[i]);
var n = reader.getNumberOfPages();
for (var j = 1; j <= n; j++) {
document.newPage();
var page = copy.getImportedPage(reader, j);
copy.addPage(page);
}
}
document.close();
} catch (e) {
println("PDF合并失败!!!" + e);
} finally {
}
}
//创建对应文件夹用于保存文件
var path_data = $bm('cus_deposit.CUS_DEPOSIT106N.csh_return_system_parameter').queryAsMap().getChildren();
var return_file_path = path_data[0].return_file_path;
var year = path_data[0].year;
var month = path_data[0].month;
var hour = path_data[0].hour;
var minute = path_data[0].minute;
var second = path_data[0].second;
var sysPath = return_file_path+"\\"+year+"\\"+month+"\\"+$ctx.session.session_id;
var sysDeletePath=return_file_path+"\\"+year;
var saveFile = new File(String(sysPath));
//如果文件夹不存在,则创建文件夹
if(!saveFile.exists()){
saveFile.mkdirs();
}
var files = [];
var files_num = 0;
//先通过sessionID查找需要打印的单据
var return_data = $bm('cus_deposit.CUS_DEPOSIT106N.csh_return_detail_execute').queryAsMap().getChildren();
for (var i = 0;i < return_data.length;i++) {
var return_id = return_data[i].return_id.toString();
$ctx.parameter.document_id=return_id;
var csh_return_atm_id = return_data[i].csh_return_atm_id.toString();
var outputfilepath;
var attachment_flag = 'N';
//查找本条退款单据的附件信息
var return_attachment = $bm('cus_deposit.CUS_DEPOSIT106N.csh_get_detail_attachment');
var attachment_result = return_attachment.queryAsMap({
table_name: "CSH_TRANSACTION_RETURN",
table_pk_value: csh_return_atm_id
});
var attachment_data = attachment_result.getChildren();
for (var j = 0;j < attachment_data.length;j++) {
var attachment_type = attachment_data[j].file_type;
//如果上传的附件为word,则先转换为PDF
if(attachment_type == 'DOC' || attachment_type == 'DOCX'){
// word转pdf
var saveName = $ctx.session.session_id +'_'+attachment_data[j].attachment_id+'.pdf';
var file_savePath = sysPath+"\\"+saveName;
var return_saveFile = new File(file_savePath);
//重复打印先删除之前的文件
if(return_saveFile.exists()){
return_saveFile.delete();
}
var wordFilePath="D:"+attachment_data[j].file_path;
outputfilepath = wordToPdf(wordFilePath,file_savePath);
println("word--pdf"+outputfilepath);
files[files_num] = outputfilepath.replace("\\","\\\\");
files_num++;
attachment_flag = 'Y';
}else if(attachment_type == 'PDF'){
files[files_num] ="D:"+attachment_data[j].file_path.replace("\\","\\\\");
files_num++;
attachment_flag = 'Y';
}
}
var attachment_update = $bm('cus_deposit.CUS_DEPOSIT106N.csh_get_detail_attachment');
attachment_update.update({
document_id: return_id,
document_table: $ctx.parameter.document_table
});
var attachment_batch_dl = $bm('cus_deposit.CUS_DEPOSIT106N.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: return_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var k = 0;k < from_file_data.length;k++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
var to_file_path = 'D:/u01/hls_file/excel/';
var record_data = from_file_data[k];
var to_file_name = $ctx.parameter.file_name+'.docx';
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = to_file_path + guid_file_name_tables[0].guid_file_name + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString(),
source_type: $ctx.parameter.source_type
});
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: return_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
var pdf_file_path = sysPath+"\\"+guid_file_name_tables[0].guid_file_name+record_data.content_id+'.pdf';
println(to_file_path);
println(pdf_file_path);
outputfilepath = wordToPdf(to_file_path,pdf_file_path);
files[files_num] = outputfilepath.replace("\\","\\\\");
files_num++;
} catch (e) {
raise_app_error(e);
}
}
}
//存储最终生成的pdf文件路径
var guid_file_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_tables = guid_file_path.getChildren();
var fromPath = sysPath+"\\"+guid_file_tables[0].guid_file_name+'_'+$ctx.session.session_id;
// 合并pdf
println("fromPath---------"+fromPath);
mergePdfFiles(files,fromPath);
fromPath=fromPath.replace(/\\/g, "\/");
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
var downloadName = "保证金退款打印"+".pdf";
HlsFileUtil.downloadFile(encodeURI(fromPath,'utf-8'),encodeURI(downloadName,'utf-8'),resp);
delFiles(sysDeletePath);
]]></s:server-script>
</a:init-procedure>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:view>
<a:link id="cus_deposit106_download_win_link" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="deposit_return_print_link" url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT106N/csh_transaction_return_detail.lview"/>
<a:link id="insert_temp_info_link" model="cus_deposit.CUS_DEPOSIT106N.csh_return_detail_execute"
modelaction="update"/>
<script type="text/javascript"><![CDATA[
function deposit_return_back() {
$('${/parameter/@winId}').close();
}
function deposit_return_query() {
$('csh_deposit_cashflow_grid_ds').query();
}
function deposit_return_print (){
var records = $('csh_deposit_cashflow_grid_ds').getSelected();
if (records.length == 0) {
Leaf.showMessage('提示', '请勾选需要打印的数据');
return;
}
var return_id = records[0].get('return_id');
for (var i = 1; i < records.length; i++) {
return_id = return_id+','+records[i].get('return_id');
}
Leaf.Masker.mask(Ext.getBody(), '执行中...');
Leaf.request({
url: $('insert_temp_info_link').getUrl(),
para: {
return_id: return_id
},
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
var url = $('deposit_return_print_link').getUrl();
new Leaf.Window({
id: 'deposit_return_print_link_winid',
params: {
winId: 'deposit_return_print_link_winid',
return_id: return_id
},
url: url,
title: '退款打印预览',
fullScreen: true
}).on('close',function(){
//deposit_return_query();
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
//附件上传
function upload_attachment_win(csh_return_atm_id) {
var win = new Leaf.Window({
id: 'cus_deposit106_download_win',
url: $('cus_deposit106_download_win_link').getUrl(),
params: {
winid: 'cus_deposit106_download_win',
table_name: 'CSH_TRANSACTION_RETURN',
header_id: csh_return_atm_id
},
width: 900,
hight: 400
}).on('close', function () {
//record.ds.query();
});
}
function attach_renderer(value) {
return '<a href="javascript:upload_attachment_win('+value+');">' + '附件下载' + '</a>';
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_transaction_deposit_return_maintain_ds" autoCreate="true">
<a:fields>
<a:field name="contract_number"/>
<a:field name="user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.sys_user_for_lov" lovWidth="500" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID" title="员工选择">
<a:mapping>
<a:map from="description" to="user_desc"/>
<a:map from="user_id" to="user_id"/>
</a:mapping>
</a:field>
<a:field name="return_date_from"/>
<a:field name="return_date_to"/>
<a:field name="this_return_amount_from" />
<a:field name="this_return_amount_to" />
<a:field name="left_amount_from" />
<a:field name="left_amount_to" />
<a:field name="bp_name_n"/>
<a:field name="bp_id_telnet_n"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106N.csh_deposit_cashflow_query" queryDataSet="csh_transaction_deposit_return_maintain_ds" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106N.csh_deposit_cashflow_query/query" selectable="true" selectionModel="multiple"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton id="deposit_return_back_id" click="deposit_return_back" text="HLS.EXIT"/>
<a:gridButton id="deposit_return_submit_id" click="deposit_return_query" text="HLS.QUERY"/>
<a:gridButton id="deposit_return_print_id" click="deposit_return_print" text="HLS.PRINT"/>
</a:screenTopToolbar>
<a:form labelWidth="120" marginWidth="80"
title="HLS.QUERY_TITLE" style="margin-left:20px">
<a:hBox>
<a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE">
<a:datePicker name="return_date_from" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="经济业务发生日从"/>
<a:datePicker name="return_date_to" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="经济业务发生日到"/>
<a:numberField name="this_return_amount_from" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM" align="right"/>
<a:numberField name="this_return_amount_to" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO" align="right"/>
<a:numberField name="left_amount_from" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="剩余可用金额从" align="right"/>
<a:numberField name="left_amount_to" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="剩余可用金额到 " align="right"/>
<a:textField name="bp_name_n" prompt="退款用户" bindTarget="csh_transaction_deposit_return_maintain_ds"/>
<a:textField name="bp_id_telnet_n" prompt="承租人" bindTarget="csh_transaction_deposit_return_maintain_ds"/>
<!--对方账户户名-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:textField name="opposite_band_na" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:textField name="bank_account_num" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField name="contract_number" prompt="合同编号" bindTarget="csh_transaction_deposit_return_maintain_ds"/>
</a:fieldSet>
</a:hBox>
</a:form>
<a:fieldSet labelWidth="150" title="退款信息" style="margin-left:20px">
<a:grid id="csh_deposit_cashflow_grid_ds_id" bindTarget="csh_deposit_cashflow_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<a:columns>
<a:column name="bp_name_n" prompt="退款用户" width="200" align="center"/>
<a:column name="contract_number" prompt="合同编号" width="110" align="center"/>
<a:column name="bp_id_telnet_code" prompt="承租人编码" width="110" align="center"/>
<a:column name="bp_id_telnet_n" prompt="承租人名称" width="110" align="center"/>
<a:column name="return_date_n" prompt="经济业务发生日" align="center" width="110"/>
<a:column name="this_return_amount" prompt="退款金额" width="100" align="right" renderer="Leaf.formatMoney"/>
<a:column name="left_amount" prompt="剩余可用金额" width="100" align="right" renderer="Leaf.formatMoney"/>
<a:column name="bp_bank_account_name" prompt="对方账户户名" width="150" align="center"/>
<a:column name="opposite_band_na" prompt="对方银行名称" width="150" align="center"/>
<a:column name="bank_account_num" prompt="对方账户账号" width="150" align="center"/>
<a:column name="user_desc" prompt="申请人" width="110" align="center"/>
<a:column name="journal_flag" prompt="凭证是否生成" width="100" align="center"/>
<a:column name="csh_return_atm_id" prompt="申请附件" width="110" align="center" renderer="attach_renderer"/>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款打印
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="check_csh_detail_sbo_id" model="cus_deposit.CUS_DEPOSIT106N.csh_return_detail_execute"
modelaction="execute"/>
<a:link id="csh_return_detail_history_print_link_id"
url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT106N/csh_return_detail_history_print.lsc"/>
<script><![CDATA[
function detail_exit() {
$('${/parameter/@winId}').close();
}
function sumFunction_foot(data,name){
var total=0;
var length=data.length;
var value=0;
for(var i=0;i<length;i++){
if(Ext.isEmpty(data[i].get(name))){
value=0;
}else{
value=data[i].get(name);
}
total=plus(total,value);
}
return '<font color=red>' +Leaf.formatMoney(total)+ '</font>';
}
function detail_print() {
var return_id = '${/parameter/@return_id}';
Leaf.Masker.mask(Ext.getBody(), '检验sbo编号中...');
Leaf.request({
url: $('check_csh_detail_sbo_id').getUrl(),
para: {
document_id: return_id
},
success: function (res) {
var file_name = "保证金退款-";
debugger;
var url_l = $('csh_return_detail_history_print_link_id').getUrl() + '?file_name=' + encodeURI(file_name) + '&document_table=CSH_DEPOSIT_TRANSACTION_RETURN&batch_flag=Y&source_type=common';
window.open(href = url_l, target = "_self");
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_deposit_detail_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106N.csh_deposit_cashflow_query" queryDataSet="csh_transaction_deposit_return_maintain_ds" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106N.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
</a:dataSets>
<a:screenBody>
<a:hBox>
<a:button click="detail_exit" text="HLS.EXIT"/>
<a:button click="detail_print" text="HLS.PRINT"/>
</a:hBox>
<a:fieldSet labelWidth="150" title="退款信息" style="margin-left:20px">
<a:grid id="csh_deposit_detail_grid_ds_id" bindTarget="csh_deposit_detail_grid_ds" marginHeight="80" marginWidth="80" navBar="true">
<a:columns>
<a:column name="bp_name_n" prompt="退款用户" width="200" align="center"/>
<a:column name="contract_number" prompt="合同编号" width="110" align="center"/>
<a:column name="bp_id_telnet_code" prompt="承租人编码" width="110" align="center"/>
<a:column name="bp_id_telnet_n" prompt="承租人名称" width="110" align="center"/>
<a:column name="return_date_n" prompt="经济业务发生日" align="center" width="110"/>
<a:column name="this_return_amount" prompt="退款金额" width="100" align="right" footerRenderer="sumFunction_foot" renderer="Leaf.formatMoney"/>
<a:column name="left_amount" prompt="剩余可用金额" width="100" align="right" renderer="Leaf.formatMoney"/>
<a:column name="bp_bank_account_name" prompt="对方账户户名" width="150" align="center"/>
<a:column name="opposite_band_na" prompt="对方银行名称" width="150" align="center"/>
<a:column name="bank_account_num" prompt="对方账户账号" width="150" align="center"/>
<a:column name="user_desc" prompt="申请人" width="110" align="center"/>
<a:column name="journal_flag" prompt="凭证是否生成" width="100" align="center"/>
<a:column name="csh_return_atm_id" prompt="申请附件" width="110" align="center" renderer="attach_renderer"/>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 26887cz
$Date: 2021-10-14 下午03:16:44
$Revision: 1.0
$Purpose: 保证金退款下载入口
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_return_link" url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT106N/csh_transaction_return.lview"/>
<a:link id="csh_transaction_return_read_link" url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT106/csh_transaction_return_wfl.lview"/>
<script type="text/javascript"><![CDATA[
//锁表
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
//解锁
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function cus100_receipt_reset() {
$('csh_transaction_receipt_maintain_query_ds').reset();
}
function cus100_receipt_query(){
$('csh_transaction_receipt_return_maintain_ds').query();
}
function seedetail_return_num(value, record, name){
if (record.get('return_id')) {
var url;
url = $('csh_transaction_return_read_link').getUrl() + '?return_id=' + record.get('return_id');
return '<a href="javascript:openReturnWindow(\'' + url + '\');">' + '<font color="red">'+ Leaf.formatMoney(value) +'</font>' + '</a>';
}else{
return '<font color="red">'+ Leaf.formatMoney(value) +'</font>';
}
}
function openReturnWindow(url) {
new Leaf.Window({
id: 'csh_transaction_deposit_link_winid',
params: {
winId: 'csh_transaction_deposit_link_winid'
},
url: url,
title: '退款详情',
fullScreen: true
}).on('close',function(){
});
}
function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) {
var from_to = construct_from_to();
var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value);
}
}
}
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
debugger;
var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
}
return true; //校验通过返回true
}
}
function compareDate(start, end) {
if (start > end) {
return false;
}
return true;
}
function construct_from_to() {
var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code'];
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length; i < j; i++) {
for (var m = 0,
n = pattern.length; m < n; m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
return obj;
}
function cus100_receipt_print (){
var url = $('csh_transaction_return_link').getUrl();
new Leaf.Window({
id: 'csh_transaction_deposit_link_winid',
params: {
winId: 'csh_transaction_deposit_link_winid'
},
url: url,
title: '退款打印',
fullScreen: true
}).on('close',function(){
});
}
]]></script>
<a:dataSets>
<a:dataSet id="DEPOSIT_TRANS_TYPE_DS" lookupCode="DEPOSIT_TRANS_TYPE"/>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<a:field name="deposit_trans_type"/>
<a:field name="contract_number"/>
<a:field name="bp_name_n"/>
<a:field name="bp_id_telnet_n"/>
<a:field name="deposit_trans_type_desc" options="DEPOSIT_TRANS_TYPE_DS"
returnField="deposit_trans_type" displayField="code_value_name" valueField="code_value"/>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_branch_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_account_num" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="transaction_num_from"/>
<a:field name="transaction_num_to"/>
<a:field name="bank_slip_num_from"/>
<a:field name="bank_slip_num_to"/>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
<a:field name="bank_account_code" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code"/>
</a:mapping>
</a:field>
<a:field name="bank_account_code_from" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_from"/>
</a:mapping>
</a:field>
<a:field name="bank_account_from_id"/>
<a:field name="bank_account_code_to" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_to"/>
</a:mapping>
</a:field>
<a:field name="transaction_amount_from"/>
<a:field name="transaction_amount_to"/>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name"/>
</a:mapping>
</a:field>
<a:field name="user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.sys_user_for_lov" lovWidth="500" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID" title="员工选择">
<a:mapping>
<a:map from="description" to="user_desc"/>
<a:map from="user_id" to="user_id"/>
</a:mapping>
</a:field>
<a:field name="currency_code_from"/>
<a:field name="currency_code_to"/>
<a:field name="transaction_type" />
<a:field name="transaction_category" />
<a:field name="not_reversed_flag_r" />
<a:field name="receipt_type"/>
<a:field name="description"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
</a:fields>
<a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_return_maintain_ds" autoPageSize="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106N.csh_transaction_maintain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="cus100_receipt_query" text="HLS.QUERY" id="cus100_receipt_query"/>
<a:gridButton click="cus100_receipt_reset" text="HLS.RESET"/>
<a:gridButton click="cus100_receipt_print" text="汇联易上传材料打印"/>
</a:screenTopToolbar>
<a:form labelWidth="120" marginWidth="80"
title="查询条件" style="margin-left:20px">
<a:hBox>
<a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE">
<a:datePicker name="transaction_date_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
<a:numberField name="transaction_amount_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM" align="right"/>
<a:numberField name="transaction_amount_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO" align="right"/>
<!--我方账户户名-->
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:lov name="bank_branch_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/>
<a:lov name="bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/>
<!--银行流水号-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<!--对方账户户名-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField name="contract_number" prompt="合同编号" bindTarget="csh_transaction_receipt_maintain_query_ds"/>
<a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_transaction_receipt_maintain_query_ds"/>
<a:textField name="bp_id_telnet_n" prompt="承租人" bindTarget="csh_transaction_receipt_maintain_query_ds"/>
<a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_transaction_receipt_maintain_query_ds"/>
</a:fieldSet>
</a:hBox>
</a:form>
<a:fieldSet labelWidth="150" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="csh_transaction_receipt_return_maintain_ds" marginHeight="200" marginWidth="80" navBar="true" >
<!--<a:toolBar>
<a:button click="csh510_export" text="导出"/>
</a:toolBar>-->
<a:columns>
<a:column name="transaction_num" prompt="CSH510.CSH_TRANSACTION.CSH_TRANSACTION_NUM" width="110" align="center"/>
<a:column name="bp_name" prompt="代理店/厂商" align="center"/>
<a:column name="bp_id_telnet_n" prompt="承租人" align="center"/>
<a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="transaction_amount" align="right" prompt="CSH510.CSH_TRANSACTION.RECEIPT_AMOUNT" width="100" renderer="Leaf.formatMoney"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" align="center"/>
<a:column name="unwrite_off_amount" prompt="剩余可退金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="deposit_trans_type_desc" prompt="保证金类型" width="110" align="center"/>
<a:column name="applying_amount" prompt="退款中金额" align="right" renderer="seedetail_return_num"/>
<a:column name="approve_status" prompt="状态" width="120" align="center"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center" forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name" align="center" forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name" align="center" forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num" align="center" forExport="false"/>
</a:column>
<a:column prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bp_bank_account_name" align="center" forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="opposite_band_na" align="center" forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center" forExport="false"/>
</a:column>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
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