Commit 31121ce3 authored by lizhe's avatar lizhe

Merge remote-tracking branch 'origin/develop' into develop

parents 318553e8 612a4afe
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</bm:primary-key> </bm:primary-key>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and returned_flag not in ( &apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;=t1.transaction_amount)) "/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and returned_flag not in ( &apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;=t1.transaction_amount)) "/>
<!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>--> <!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;))"/> <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;))"/>
</bm:data-filters> </bm:data-filters>
<bm:query-fields> <bm:query-fields>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$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_lv" defaultOrderBy="t1.transaction_num asc" 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="attach_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACH_FILE_NAME" prompt="HLS.ATTACH_FILE_NAME"/>
<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" expression="(select nvl(returned_amount,0) from dual)"/>
<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="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="banka"/>
<bm:field name="purpose"/>
<bm:field name="can_returned_amount" expression="(select transaction_amount-nvl(returned_amount,0)-nvl(write_off_amount,0) from dual)"/>
<bm:field name="this_return_amount" expression="nvl((sELECT r.this_return_amount from csh_transaction_return r WHERE status='APPROVING' AND r.transaction_id=t1.transaction_id),0)"/>
<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="receipt_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type = 'REFUND_ENTRY' and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:field name="return_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from hls_journal_header h,csh_transaction ct where h.source_table = 'CSH_TRANSACTION' and h.source_id = ct.transaction_id and ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:field name="tenant_account_id" forInsert="false" forUpdate="false" expression="(select cc.bank_account_id from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="tenant_account_num" forInsert="false" forUpdate="false" expression="(select ha.bank_account_num from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_account_name" forInsert="false" forUpdate="false" expression="(select ha.bank_account_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_bank_name" forInsert="false" forUpdate="false" expression="(select ha.bank_full_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="return_date" forInsert="false" forUpdate="false" expression="(select listagg(to_char(ct.transaction_date,'yyyy-mm-dd'), ',') WITHIN group(order by ct.transaction_date) from csh_transaction ct where ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
</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.transaction_category='BUSINESS')"/>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and returned_flag not in ( &apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;=t1.transaction_amount)) "/>
<!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;))"/>
</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="="/>
<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="receipt" queryExpression="(t1.transaction_type=${@receipt} or t1.transaction_type=${@advance_receipt})"/>
<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="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 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="attachment_return_desc" queryExpression="${@attachment_return}=DECODE((select distinct 1 from FND_ATM_ATTACHMENT_MULTI fa where fa.table_pk_value=t1.transaction_id and fa.table_name=&apos;CON_CONTRACT_BANK&apos;),1,&apos;Y&apos;,&apos;N&apos;)"/>
</bm:query-fields>
</bm:model>
...@@ -119,7 +119,8 @@ ...@@ -119,7 +119,8 @@
||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN' ||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN'
||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN_A4'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_TJ' ||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN_A4'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_TJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_SURE'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_FR' ||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_SURE'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_FR'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_D_ESWJ' ||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ_OEC'||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ') { ||record_data.templet_code =='FINANCE_LEASE_CONTRACT_D_ESWJ' ||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ_OEC'||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_FR_TJ') { //update by xsh35973 添加法人铁甲保证函
// word转pdf // word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id; var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: qwm $Author: qwm
$Date: 2013-5-30 下午08:18:03 $Date: 2013-5-30 下午08:18:03
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<a:link id="csh515_amount_return_link" url="${/request/@context_path}/modules/csh/CSH515/csh_amount_return.lview"/> <a:link id="csh515_amount_return_link" url="${/request/@context_path}/modules/csh/CSH515/csh_amount_return.lview"/>
<a:link id="csh515_get_layout_link" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="csh515_get_layout_link" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="csh_transaction_receipt_maintain_readonly_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/> <a:link id="csh_transaction_receipt_maintain_readonly_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>
<a:link id="prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法 function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') { if (name == 'transaction_date_from' || name == 'transaction_date_to') {
...@@ -34,14 +35,14 @@ ...@@ -34,14 +35,14 @@
return true; //校验通过返回true return true; //校验通过返回true
} }
} }
function compareDate(start, end) { function compareDate(start, end) {
if (start > end) { if (start > end) {
return false; return false;
} }
return true; return true;
} }
function csh510_receipt_query() { function csh510_receipt_query() {
var record = $('csh_transaction_receipt_maintain_query_ds').getAt(0); var record = $('csh_transaction_receipt_maintain_query_ds').getAt(0);
var dirty_flag = 'N'; var dirty_flag = 'N';
...@@ -51,29 +52,35 @@ ...@@ -51,29 +52,35 @@
dirty_flag = 'Y'; dirty_flag = 'Y';
} }
} }
if (dirty_flag == 'N') { if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function() {
return; // Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function() {
}, function() { // return false;
$('csh_transaction_receipt_return_maintain_ds').query(); // }
}, null, null); // , function() {
// $('csh_transaction_receipt_return_maintain_ds').query();
// }, null, null);
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}');
return false;
} else { } else {
$('csh_transaction_receipt_return_maintain_ds').query(); $('csh_transaction_receipt_return_maintain_ds').query();
} }
} }
function csh510_receipt_reset() { function csh510_receipt_reset() {
$('csh_transaction_receipt_maintain_query_ds').reset(); $('csh_transaction_receipt_maintain_query_ds').reset();
} }
function csh510_receipt_back() { function csh510_receipt_back() {
history.go(-1); history.go(-1);
} }
function csh510_receipt_forward() { function csh510_receipt_forward() {
history.go(1); history.go(1);
} }
function csh510_receipt_quit() { function csh510_receipt_quit() {
location.href = $('sys_service_welcome_link').getUrl(); location.href = $('sys_service_welcome_link').getUrl();
parent.shMenu('show'); parent.shMenu('show');
...@@ -86,7 +93,48 @@ ...@@ -86,7 +93,48 @@
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>'; return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} }
} }
function attachment_uploadFile(value, record, name) {
if (name == 'attachment') {
var role_code = '${/model/role_info/record/@role_code}';
if (role_code !== '0008'&&role_code !== '0014'&&role_code !== '0014-1'&&role_code !== '0017'&&role_code !== 'HAND') {
return null;
}
return '<a href="javascript:prj501n_upload_file(\'' + record.get('transaction_id') + '\');">' +'附件上传'+ '</a>';
} else if (name == 'attach_file_name') {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i < str.length; i++) {
//
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
return url;
}
}
}
function prj501n_upload_file(transaction_id) {
if (transaction_id) {
var url;
url = $('prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT_BANK&header_id=' + transaction_id;
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
$('csh_transaction_receipt_return_maintain_ds').query();
});
}
function openWindow(url) { function openWindow(url) {
new Leaf.Window({ new Leaf.Window({
id: 'csh_transaction_receipt_return_link_winid', id: 'csh_transaction_receipt_return_link_winid',
...@@ -98,7 +146,7 @@ ...@@ -98,7 +146,7 @@
fullScreen: true fullScreen: true
}); });
} }
function construct_from_to() { function construct_from_to() {
var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code', 'transaction_date']; var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code', 'transaction_date'];
var pattern = ['_from', '_to']; var pattern = ['_from', '_to'];
...@@ -112,7 +160,7 @@ ...@@ -112,7 +160,7 @@
} }
return obj; return obj;
} }
function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) { function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) {
var from_to = construct_from_to(); var from_to = construct_from_to();
var opposite_name = from_to[name]; var opposite_name = from_to[name];
...@@ -123,7 +171,7 @@ ...@@ -123,7 +171,7 @@
} }
} }
} }
function csh510_receipt_remove() { function csh510_receipt_remove() {
var records = $('csh_transaction_receipt_return_maintain_ds').getSelected(); var records = $('csh_transaction_receipt_return_maintain_ds').getSelected();
if (!records.length) { if (!records.length) {
...@@ -160,13 +208,13 @@ ...@@ -160,13 +208,13 @@
return; return;
}, null, null); }, null, null);
} }
function csh510_delete_remove(records) { function csh510_delete_remove(records) {
while (records[0]) { while (records[0]) {
$('csh_transaction_receipt_return_maintain_ds').removeLocal(records[0]); $('csh_transaction_receipt_return_maintain_ds').removeLocal(records[0]);
} }
} }
function csh515_receipt_return() { function csh515_receipt_return() {
// new Leaf.Window({ // new Leaf.Window({
...@@ -231,14 +279,14 @@ ...@@ -231,14 +279,14 @@
scope: this scope: this
}); });
} }
function csh515_receipt_return_list() { function csh515_receipt_return_list() {
var a = $('csh_transaction_receipt_return_maintain_ds').getSelected(); var a = $('csh_transaction_receipt_return_maintain_ds').getSelected();
var record = a[0]; var record = a[0];
if (record == undefined) { if (record == undefined) {
Leaf.showMessage('${l:PROMPT_MESSAGE}', '未选中行', null, 250, 100); Leaf.showMessage('${l:PROMPT_MESSAGE}', '未选中行', null, 250, 100);
} else { } else {
new Leaf.Window({ new Leaf.Window({
id: 'csh_transaction_returned_list_window', id: 'csh_transaction_returned_list_window',
url: $('csh_transaction_returned_list_link').getUrl(), url: $('csh_transaction_returned_list_link').getUrl(),
...@@ -251,7 +299,7 @@ ...@@ -251,7 +299,7 @@
}); });
} }
} }
function onLoad_csh515_receipt_post(ds) { function onLoad_csh515_receipt_post(ds) {
var record = ds.getCurrentRecord(); var record = ds.getCurrentRecord();
if (record) { if (record) {
...@@ -274,6 +322,7 @@ ...@@ -274,6 +322,7 @@
<a:dataSet id="returned_flag_ds" lookupCode="CSH510_RETURN_SELECT"/> <a:dataSet id="returned_flag_ds" lookupCode="CSH510_RETURN_SELECT"/>
<a:dataSet id="reversed_flag_ds" lookupCode="CSH510_REVERSE_SELECT"/> <a:dataSet id="reversed_flag_ds" lookupCode="CSH510_REVERSE_SELECT"/>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/> <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="attachment_return_ds" lookupCode="ATTACHMENT_RETURN"/>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true"> <a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/> <a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
...@@ -389,18 +438,23 @@ ...@@ -389,18 +438,23 @@
<a:field name="currency_code_from"/> <a:field name="currency_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/> <a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/> <a:field name="currency_code_to"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/> <!-- <a:field name="transaction_category" defaultValue="BUSINESS"/>-->
<a:field name="transaction_category" />
<a:field name="write_off_flag"/> <a:field name="write_off_flag"/>
<a:field name="collection_classes"/> <a:field name="collection_classes"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" <a:field name="collection_classes_desc" options="ds_collection_classes_ds"
prompt="款项用途" prompt="款项用途"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/> displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="attachment_return"/>
<a:field name="attachment_return_desc" options="attachment_return_ds"
prompt="银行回单是否上传"
displayField="code_value_name" returnField="attachment_return" valueField="code_value"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/> <a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_transaction_receipt_return_maintain_ds" autoQuery="false" model="csh.CSH515.csh_transaction_receipt_return_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true" selectionModel="single"> <a:dataSet id="csh_transaction_receipt_return_maintain_ds" autoQuery="false" model="csh.CSH515.new_csh_transaction_receipt_return_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true" selectionModel="single">
<a:fields> <a:fields>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/> <a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bank_account_code" 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:field name="bank_account_code" 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">
...@@ -464,6 +518,8 @@ ...@@ -464,6 +518,8 @@
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/> <a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:textField name="contract_number" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="合同编号"/> <a:textField name="contract_number" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="合同编号"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="款项用途"/> <a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="款项用途"/>
<a:comboBox name="attachment_return_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="银行回单是否上传"/>
</a:fieldSet> </a:fieldSet>
...@@ -484,6 +540,7 @@ ...@@ -484,6 +540,7 @@
<a:column name="bank_slip_num" prompt="银行流水号" align="center"/> <a:column name="bank_slip_num" prompt="银行流水号" align="center"/>
<a:column name="this_return_amount" prompt="退款中金额" align="right" renderer="Leaf.formatMoney"/> <a:column name="this_return_amount" prompt="退款中金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="returned_amount" renderer="Leaf.formatMoney" align="right"/> <a:column name="returned_amount" renderer="Leaf.formatMoney" align="right"/>
<!-- <a:column name="posted_flag" prompt="HLS.POST"/> --> <!-- <a:column name="posted_flag" prompt="HLS.POST"/> -->
<!-- <a:column name="bank_account_code" prompt="CSH511.BANK_ACCOUNT_CODE"/> <!-- <a:column name="bank_account_code" prompt="CSH511.BANK_ACCOUNT_CODE"/>
<a:column name="bank_account_name" prompt="CSH511.BANK_ACCOUNT_NAME"/>--> <a:column name="bank_account_name" prompt="CSH511.BANK_ACCOUNT_NAME"/>-->
...@@ -505,6 +562,9 @@ ...@@ -505,6 +562,9 @@
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="opposite_band_na" align="center"/> <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="opposite_band_na" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"/> <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"/>
</a:column> </a:column>
<a:column name="attachment" prompt="银行回单附件上传" renderer="attachment_uploadFile" width="120" align="center"/>
<a:column name="attach_file_name" prompt="银行回单文件" renderer="attachment_uploadFile" width="120" align="center"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
...@@ -829,6 +829,39 @@ ...@@ -829,6 +829,39 @@
} }
} }
} }
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
var bp_type_flag='N';
var records = $(ds.id).getAll();
if(name=='bp_type'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
bp_type_flag='Y';
}
}
if(bp_type_flag=='Y'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
records[i].set('primary_flag','Y')
}else{
records[i].set('primary_flag','N')
}
}
}
}
var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bm_record = $(bm_ds_id).getCurrentRecord();
bm_record.set('bp_type', record.get('bp_type'));
bm_record.set('bp_type_n', record.get('bp_type_n'));
bm_record.set('bp_category', record.get('bp_category'));
bm_record.set('bp_category_n', record.get('bp_category_n'));
}
}
}; };
function upload_file(id, name, query_only) { function upload_file(id, name, query_only) {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/> <a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/> <a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/>
...@@ -46,6 +47,22 @@ ...@@ -46,6 +47,22 @@
// return; // return;
// } // }
// } // }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){
v_primary_flag_count=v_primary_flag_count+1;
}
}
if(v_primary_flag_count!=1){
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord(); var bp_record = $(ds_id).getCurrentRecord();
...@@ -380,10 +397,11 @@ ...@@ -380,10 +397,11 @@
} }
} }
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, line_record) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds,line_record) {
var dsId = ds.id; var dsId = ds.id;
var base_table_temp = 'hls_bp_master_role_ds'; var base_table_temp = 'hls_bp_master_role_ds';
if (dsId.substring(dsId.length - base_table_temp.length, dsId.length) == base_table_temp) { if (dsId.substring(dsId.length - base_table_temp.length, dsId.length) == base_table_temp) {
...@@ -396,7 +414,30 @@ ...@@ -396,7 +414,30 @@
if (ds.fields.parent_id) { if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true); record.getField('parent_id_n').setReadOnly(true);
} }
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
}; };
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
}
//更新时调用 add by liukang //更新时调用 add by liukang
//填写银行账号时 允许银行账号相同 但是给一个提示(提示一下而已) //填写银行账号时 允许银行账号相同 但是给一个提示(提示一下而已)
...@@ -633,6 +674,30 @@ ...@@ -633,6 +674,30 @@
record.set('tax_registry_num',record.get('social_code')); record.set('tax_registry_num',record.get('social_code'));
} }
} }
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
var bp_type_flag='N';
var records = $(ds.id).getAll();
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(name=='bp_type'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
bp_type_flag='Y';
}
}
if(bp_type_flag=='Y'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
records[i].set('primary_flag','Y')
}else{
records[i].set('primary_flag','N')
}
}
}
}
}
}
}; };
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/> <a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/> <a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/>
...@@ -47,6 +48,22 @@ ...@@ -47,6 +48,22 @@
// return; // return;
// } // }
// } // }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){
v_primary_flag_count=v_primary_flag_count+1;
}
}
if(v_primary_flag_count!=1){
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord(); var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req'); var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
...@@ -363,7 +380,7 @@ ...@@ -363,7 +380,7 @@
} }
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, line_record) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds,line_record) {
var dsId = ds.id; var dsId = ds.id;
var grid_id = dsId.replace('ds', 'layout_grid_id'); var grid_id = dsId.replace('ds', 'layout_grid_id');
var base_table_temp = 'hls_bp_master_req_role_ds'; var base_table_temp = 'hls_bp_master_req_role_ds';
...@@ -385,9 +402,31 @@ ...@@ -385,9 +402,31 @@
setListInterval(line_record, grid_id); setListInterval(line_record, grid_id);
} }
} }
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
}; };
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
}
function setListInterval(record, grid_id) { function setListInterval(record, grid_id) {
var btnListInterval = setTimeout(function() { var btnListInterval = setTimeout(function() {
...@@ -459,9 +498,11 @@ ...@@ -459,9 +498,11 @@
} }
} }
} }
var records = $(ds.id).getAll();
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req'); var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
if (role_ds == ds.id) { if (role_ds == ds.id) {
var bp_type_flag='N';
var primary_flag = record.get('primary_flag'); var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') { if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req'); var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
...@@ -471,6 +512,25 @@ ...@@ -471,6 +512,25 @@
bm_record.set('bp_category', record.get('bp_category')); bm_record.set('bp_category', record.get('bp_category'));
bm_record.set('bp_category_n', record.get('bp_category_n')); bm_record.set('bp_category_n', record.get('bp_category_n'));
} }
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(name=='bp_type'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
bp_type_flag='Y';
}
}
if(bp_type_flag=='Y'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
records[i].set('primary_flag','Y')
}else{
records[i].set('primary_flag','N')
}
}
}
}
}
} }
...@@ -663,7 +723,6 @@ ...@@ -663,7 +723,6 @@
} }
}; };
function upload_file(id, name, query_only) { function upload_file(id, name, query_only) {
......
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