Commit 6266c44d authored by Darming's avatar Darming

[feature] 核销及SBO

parent aea319ad
......@@ -5,7 +5,7 @@
$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 asc" needAccessControl="false">
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_id desc" 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"/>
......@@ -107,7 +107,7 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.posted_flag in (&apos;N&apos;))"/>
<bm:data-filter name="query" expression="(t1.posted_flag in (&apos;N&apos;) and t1.transaction_type not in ('PAYMENT'))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -10,12 +10,14 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.update_confirmer_by_condition(
p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
update csh_transaction
set LAST_UPDATE_DATE = sysdate,
last_updated_by = ${/session/@user_id},
confirmed_flag = 'ACCAUDITING'
where transaction_id = ${@transaction_id}
and confirmed_flag = 'NEW';
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -42,10 +42,23 @@
li.attribute_23,
li.attribute_24,
li.attribute_25,
li.attribute_26
li.attribute_26,
t.csh_bank_account_num,
t.transaction_date,
t.bank_slip_num,
t.bp_bank_account_num,
t.bp_bank_account_name,
t.bp_bank_name,
t.transaction_amount,
t.collection_classes,
t.bp_id,
t.paid_byother_flag,
t.csh_bank_account_id bank_account_id,
FROM fnd_interface_headers hd,
fnd_interface_lines li
WHERE hd.header_id = li.header_id
fnd_interface_lines li,
csh_transaction_import_temp t
WHERE hd.header_id = li.header_id and li.line_id = t.line_id and hd.header_id = t.header_id
AND hd.template_code = 'CSH_TRX_BANK'
AND li.line_number >0
AND HD.CREATED_BY = ${/session/@user_id}
......@@ -58,102 +71,104 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.csh_transaction_import_check(
p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id}
);
csh_transaction_pkg.csh_transaction_import_check(
p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.save_receipt_import(
p_transaction_id =>${@transaction_id},
p_transaction_num =>${@transaction_num},
p_transaction_category =>'BUSINESS',
p_transaction_type =>'RECEIPT',
p_transaction_date =>to_date(${@transaction_date},'yyyy-mm-dd'),
p_penalty_calc_date =>to_date(${@transaction_date},'yyyy-mm-dd'),
p_bank_slip_num =>${@bank_slip_num},
p_company_id =>${/session/@company_id},
p_internal_period_num =>${@internal_period_num},
p_period_name =>${@period_name},
p_payment_method_id =>${@payment_method_id},
p_distribution_set_id =>${@distribution_set_id},
p_cashflow_amount =>${@transaction_amount},
p_currency_code =>${@currency_code},
p_transaction_amount =>${@transaction_amount},
p_exchange_rate_type =>${@exchange_rate_type},
p_exchange_rate_quotation =>${@exchange_rate_quotation},
p_exchange_rate =>${@exchange_rate},
p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id},
p_bp_bank_account_id =>${@bp_bank_account_id},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description},
p_handling_charge =>${@handling_charge},
p_posted_flag =>nvl(${@posted_flag},'N'),
p_reversed_flag =>nvl(${@reversed_flag},'N'),
p_reversed_date =>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag =>nvl(${@returned_flag},'NOT'),
p_returned_amount =>${@returned_amount},
p_write_off_flag =>nvl(${@write_off_flag},'NOT'),
p_write_off_amount =>${@write_off_amount},
p_full_write_off_date =>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id =>${@twin_csh_trx_id},
p_return_from_csh_trx_id =>${@return_from_csh_trx_id},
p_reversed_csh_trx_id =>${@reversed_csh_trx_id},
p_source_csh_trx_type =>${@source_csh_trx_type},
p_source_csh_trx_id =>${@source_csh_trx_id},
p_source_doc_category =>${@source_doc_category},
p_source_doc_type =>${@source_doc_type},
p_source_doc_id =>${@source_doc_id},
p_source_doc_line_id =>${@source_doc_line_id},
p_create_je_mothed =>${@create_je_mothed},
p_create_je_flag =>nvl(${@create_je_flag},'N'),
p_gld_interface_flag =>nvl(${@gld_interface_flag},'N'),
p_user_id =>${/session/@user_id},
p_ref_contract_id => ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
p_csh_bp_name => ${@csh_bp_name},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr =>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05},
p_status =>${@status},
p_bank_account_num =>${@bank_account_num}
);
end;
]]></bm:update-sql>
begin
delete from csh_transaction_import_temp where header_id = ${@header_id};
csh_transaction_pkg.save_receipt_import(
p_transaction_id =>${@transaction_id},
p_transaction_num =>${@transaction_num},
p_transaction_category =>'BUSINESS',
p_transaction_type =>${@transaction_type},
p_transaction_date =>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_penalty_calc_date =>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_bank_slip_num =>${@bank_slip_num},
p_company_id =>${/session/@company_id},
p_internal_period_num =>${@internal_period_num},
p_period_name =>${@period_name},
p_payment_method_id =>${@payment_method_id},
p_distribution_set_id =>${@distribution_set_id},
p_cashflow_amount =>${@transaction_amount},
p_currency_code =>${@currency_code},
p_transaction_amount =>${@transaction_amount},
p_exchange_rate_type =>${@exchange_rate_type},
p_exchange_rate_quotation =>${@exchange_rate_quotation},
p_exchange_rate =>${@exchange_rate},
p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id},
p_bp_bank_account_id =>${@bp_bank_account_id},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description},
p_handling_charge =>${@handling_charge},
p_posted_flag =>nvl(${@posted_flag}, 'N'),
p_reversed_flag =>nvl(${@reversed_flag}, 'N'),
p_reversed_date =>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag =>nvl(${@returned_flag}, 'NOT'),
p_returned_amount =>${@returned_amount},
p_write_off_flag =>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount =>${@write_off_amount},
p_full_write_off_date =>to_date(${@full_write_off_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id =>${@twin_csh_trx_id},
p_return_from_csh_trx_id =>${@return_from_csh_trx_id},
p_reversed_csh_trx_id =>${@reversed_csh_trx_id},
p_source_csh_trx_type =>${@source_csh_trx_type},
p_source_csh_trx_id =>${@source_csh_trx_id},
p_source_doc_category =>${@source_doc_category},
p_source_doc_type =>${@source_doc_type},
p_source_doc_id =>${@source_doc_id},
p_source_doc_line_id =>${@source_doc_line_id},
p_create_je_mothed =>${@create_je_mothed},
p_create_je_flag =>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag =>nvl(${@gld_interface_flag}, 'N'),
p_user_id =>${/session/@user_id},
p_ref_contract_id => ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
p_csh_bp_name => ${@csh_bp_name},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr =>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05},
p_status =>${@status},
p_bank_account_num =>${@bank_account_num}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.get_bank_account_id(p_bank_account_num =>${@bank_account_num},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id},
p_csh_bp_name =>${@csh_bp_name},
p_user_id =>${session/@user_id}
);
end;
]]></bm:update-sql>
begin
csh_transaction_pkg.get_bank_account_id(p_bank_account_num =>${@bank_account_num},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id},
p_csh_bp_name =>${@csh_bp_name},
p_user_id =>${session/@user_id}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="bank_account_id" dataType="java.lang.Long" output="true" outputPath="@bank_account_id"/>
<bm:parameter name="bank_account_id" dataType="java.lang.Long" output="true"
outputPath="@bank_account_id"/>
<bm:parameter name="bp_category" dataType="java.lang.String" output="true" outputPath="@bp_category"/>
<bm:parameter name="bp_id" dataType="java.lang.Long" output="true" outputPath="@bp_id"/>
<bm:parameter name="csh_bp_name" dataType="java.lang.String" output="true" outputPath="@csh_bp_name"/>
......
......@@ -9,143 +9,144 @@
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.insert_csh_transaction(
p_transaction_id=>${@transaction_id},
p_transaction_num=>${@transaction_num},
p_transaction_category=>'BUSINESS',
p_transaction_type=>'RECEIPT',
p_transaction_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_bank_slip_num=>${@bank_slip_num},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
p_period_name=>${@period_name},
p_payment_method_id=>${@payment_method_id},
p_distribution_set_id=>${@distribution_set_id},
p_cashflow_amount=>${@transaction_amount},
p_currency_code=>${@currency_code},
p_transaction_amount=>${@transaction_amount},
p_exchange_rate_type=>${@exchange_rate_type},
p_exchange_rate_quotation=>${@exchange_rate_quotation},
p_exchange_rate=>${@exchange_rate},
p_bank_account_id=>${@bank_account_id},
p_bp_category=>${@bp_category},
p_bp_id=>${@bp_id},
p_bp_bank_account_id=>${@bp_bank_account_id},
p_bp_bank_account_num=>${@bp_bank_account_num},
p_description=>${@description},
p_handling_charge=>${@handling_charge},
p_posted_flag=>nvl(${@posted_flag},'N'),
p_reversed_flag=>nvl(${@reversed_flag},'N'),
p_reversed_date=>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag},'NOT'),
p_returned_amount=>${@returned_amount},
p_write_off_flag=>nvl(${@write_off_flag},'NOT'),
p_write_off_amount=>${@write_off_amount},
p_full_write_off_date=>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id=>${@twin_csh_trx_id},
p_return_from_csh_trx_id=>${@return_from_csh_trx_id},
p_reversed_csh_trx_id=>${@reversed_csh_trx_id},
p_source_csh_trx_type=>${@source_csh_trx_type},
p_source_csh_trx_id=>${@source_csh_trx_id},
p_source_doc_category=>${@source_doc_category},
p_source_doc_type=>${@source_doc_type},
p_source_doc_id=>${@source_doc_id},
p_source_doc_line_id=>${@source_doc_line_id},
p_create_je_mothed=>${@create_je_mothed},
p_create_je_flag=>nvl(${@create_je_flag},'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag},'N'),
p_user_id=>${/session/@user_id},
p_ref_contract_id=> ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
p_csh_bp_name => ${@csh_bp_name},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name=>${@bp_bank_account_name},
p_opposite_band_na=>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr=>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05},
p_status =>${@status}
);
begin
csh_transaction_pkg.insert_csh_transaction(
p_transaction_id=>${@transaction_id},
p_transaction_num=>${@transaction_num},
p_transaction_category=>'BUSINESS',
p_transaction_type=>${@transaction_type},
p_transaction_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_bank_slip_num=>${@bank_slip_num},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
p_period_name=>${@period_name},
p_payment_method_id=>${@payment_method_id},
p_distribution_set_id=>${@distribution_set_id},
p_cashflow_amount=>${@transaction_amount},
p_currency_code=>${@currency_code},
p_transaction_amount=>${@transaction_amount},
p_exchange_rate_type=>${@exchange_rate_type},
p_exchange_rate_quotation=>${@exchange_rate_quotation},
p_exchange_rate=>${@exchange_rate},
p_bank_account_id=>${@bank_account_id},
p_bp_category=>${@bp_category},
p_bp_id=>${@bp_id},
p_bp_bank_account_id=>${@bp_bank_account_id},
p_bp_bank_account_num=>${@bp_bank_account_num},
p_description=>${@description},
p_handling_charge=>${@handling_charge},
p_posted_flag=>nvl(${@posted_flag}, 'N'),
p_reversed_flag=>nvl(${@reversed_flag}, 'N'),
p_reversed_date=>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag}, 'NOT'),
p_returned_amount=>${@returned_amount},
p_write_off_flag=>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount=>${@write_off_amount},
p_full_write_off_date=>to_date(${@full_write_off_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id=>${@twin_csh_trx_id},
p_return_from_csh_trx_id=>${@return_from_csh_trx_id},
p_reversed_csh_trx_id=>${@reversed_csh_trx_id},
p_source_csh_trx_type=>${@source_csh_trx_type},
p_source_csh_trx_id=>${@source_csh_trx_id},
p_source_doc_category=>${@source_doc_category},
p_source_doc_type=>${@source_doc_type},
p_source_doc_id=>${@source_doc_id},
p_source_doc_line_id=>${@source_doc_line_id},
p_create_je_mothed=>${@create_je_mothed},
p_create_je_flag=>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag}, 'N'),
p_user_id=>${/session/@user_id},
p_ref_contract_id=> ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
p_csh_bp_name => ${@csh_bp_name},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name=>${@bp_bank_account_name},
p_opposite_band_na=>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr=>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05},
p_status =>${@status}
);
end;
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="transaction_id" dataType="java.lang.Long" input="false" inputPath="@transaction_id" output="true" outputPath="/parameter/@transaction_id"/>
<bm:parameter name="transaction_id" dataType="java.lang.Long" input="false" inputPath="@transaction_id"
output="true" outputPath="/parameter/@transaction_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.update_csh_transaction(
p_transaction_id=>${@transaction_id},
p_transaction_num=>${@transaction_num},
p_transaction_category=>'BUSINESS',
p_transaction_type=>'RECEIPT',
p_transaction_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_bank_slip_num=>${@bank_slip_num},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
p_period_name=>${@period_name},
p_payment_method_id=>${@payment_method_id},
p_distribution_set_id=>${@distribution_set_id},
p_cashflow_amount=>${@transaction_amount},
p_currency_code=>${@currency_code},
p_transaction_amount=>${@transaction_amount},
p_exchange_rate_type=>${@exchange_rate_type},
p_exchange_rate_quotation=>${@exchange_rate_quotation},
p_exchange_rate=>${@exchange_rate},
p_bank_account_id=>${@bank_account_id},
p_bp_category=>${@bp_category},
p_bp_id=>${@bp_id},
p_bp_bank_account_id=>${@bp_bank_account_id},
p_bp_bank_account_num=>${@bp_bank_account_num},
p_description=>${@description},
p_handling_charge=>${@handling_charge},
p_posted_flag=>nvl(${@posted_flag},'N'),
p_reversed_flag=>nvl(${@reversed_flag},'N'),
p_reversed_date=>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag},'NOT'),
p_returned_amount=>${@returned_amount},
p_write_off_flag=>nvl(${@write_off_flag},'NOT'),
p_write_off_amount=>${@write_off_amount},
p_full_write_off_date=>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id=>${@twin_csh_trx_id},
p_return_from_csh_trx_id=>${@return_from_csh_trx_id},
p_reversed_csh_trx_id=>${@reversed_csh_trx_id},
p_source_csh_trx_type=>${@source_csh_trx_type},
p_source_csh_trx_id=>${@source_csh_trx_id},
p_source_doc_category=>${@source_doc_category},
p_source_doc_type=>${@source_doc_type},
p_source_doc_id=>${@source_doc_id},
p_source_doc_line_id=>${@source_doc_line_id},
p_create_je_mothed=>${@create_je_mothed},
p_create_je_flag=>nvl(${@create_je_flag},'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag},'N'),
p_user_id=>${/session/@user_id},
p_ref_contract_id=> ${@ref_contract_id},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name=>${@bp_bank_account_name},
p_opposite_band_na=>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account});
end;
begin
csh_transaction_pkg.update_csh_transaction(
p_transaction_id=>${@transaction_id},
p_transaction_num=>${@transaction_num},
p_transaction_category=>'BUSINESS',
p_transaction_type=>${@transaction_type},
p_transaction_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_bank_slip_num=>${@bank_slip_num},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
p_period_name=>${@period_name},
p_payment_method_id=>${@payment_method_id},
p_distribution_set_id=>${@distribution_set_id},
p_cashflow_amount=>${@transaction_amount},
p_currency_code=>${@currency_code},
p_transaction_amount=>${@transaction_amount},
p_exchange_rate_type=>${@exchange_rate_type},
p_exchange_rate_quotation=>${@exchange_rate_quotation},
p_exchange_rate=>${@exchange_rate},
p_bank_account_id=>${@bank_account_id},
p_bp_category=>${@bp_category},
p_bp_id=>${@bp_id},
p_bp_bank_account_id=>${@bp_bank_account_id},
p_bp_bank_account_num=>${@bp_bank_account_num},
p_description=>${@description},
p_handling_charge=>${@handling_charge},
p_posted_flag=>nvl(${@posted_flag}, 'N'),
p_reversed_flag=>nvl(${@reversed_flag}, 'N'),
p_reversed_date=>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag}, 'NOT'),
p_returned_amount=>${@returned_amount},
p_write_off_flag=>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount=>${@write_off_amount},
p_full_write_off_date=>to_date(${@full_write_off_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id=>${@twin_csh_trx_id},
p_return_from_csh_trx_id=>${@return_from_csh_trx_id},
p_reversed_csh_trx_id=>${@reversed_csh_trx_id},
p_source_csh_trx_type=>${@source_csh_trx_type},
p_source_csh_trx_id=>${@source_csh_trx_id},
p_source_doc_category=>${@source_doc_category},
p_source_doc_type=>${@source_doc_type},
p_source_doc_id=>${@source_doc_id},
p_source_doc_line_id=>${@source_doc_line_id},
p_create_je_mothed=>${@create_je_mothed},
p_create_je_flag=>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag}, 'N'),
p_user_id=>${/session/@user_id},
p_ref_contract_id=> ${@ref_contract_id},
p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes},
p_bp_bank_account_name=>${@bp_bank_account_name},
p_opposite_band_na=>${@opposite_band_na},
p_banka =>${@banka},
p_purpose =>${@purpose},
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
......
......@@ -44,6 +44,6 @@
queryExpression="due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="t.cf_status = 'RELEASE' and t.write_off_flag != 'FULL'"/>
<bm:data-filter name="query" expression="t.cf_status = 'RELEASE' and t.write_off_flag != 'FULL' and t.cf_direction = 'INFLOW'"/>
</bm:data-filters>
</bm:model>
......@@ -3,15 +3,22 @@
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_interface_pkg.post_interface(p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id},
p_err_count =>${@err_count});
end;
]]></bm:update-sql>
begin
csh_transaction_interface_pkg.post_interface(p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id},
p_err_count =>${@err_count});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="err_count" dataType="java.lang.Long" output="true" outputPath="@err_count"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
update CSH_TRANSACTION set confirmed_flag = 'WF_APPROVING' where transaction_id = ${@transaction_id};
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -100,6 +100,8 @@
<bm:field name="approving_return_amount" datatype="java.lang.Double" expression="(select nvl(sum(ctr.this_return_amount),0) from csh_transaction_return ctr where ctr.transaction_id = t1.transaction_id and ctr.status = 'APPROVING')" forInsert="false" forUpdate="false" prompt="审批中退款金额"/>
<bm:field name="created_user_name" expression="(select description from sys_user where user_id = t1.created_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirm_user_name" expression="(select description from sys_user where user_id = t1.confirmed_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag_desc" expression="(select code_value_name from sys_code_values_v where code = 'CONFIRMED_FLAG' and code_value = t1.confirmed_flag)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag"/>
<!--end-->
</bm:fields>
<bm:features>
......@@ -167,8 +169,6 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag = 'APPROVED' "/>
<bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED') "/>
</bm:data-filters>
</bm:model>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT sys_parameter_pkg.value('HL_SBO_JE_TIMELY_LIMIT') sbo_limit ,
sys_parameter_pkg.value('HL_SBO_JE_BATCH_LIMIT') sbo_detail_limit
FROM dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sbo_limit"/>
<bm:field name="sbo_detail_limit"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-15 下午01:13:07
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_BP_MASTER_V">
<bm:fields>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="HLS_BP_MASTER_V.BP_ID"/>
<bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="210" forDisplay="true" forQuery="true" physicalName="BP_CODE" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="210" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="HLS.BP_NAME"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HLS_BP_MASTER_V.COMPANY_ID"/>
<bm:field name="company_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_CODE" prompt="HLS_BP_MASTER_V.COMPANY_CODE"/>
<bm:field name="company_short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_SHORT_NAME" prompt="HLS_BP_MASTER_V.COMPANY_SHORT_NAME"/>
<bm:field name="company_full_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_FULL_NAME" prompt="HLS_BP_MASTER_V.COMPANY_FULL_NAME"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY"/>
<bm:field name="bp_category_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY_NAME"/>
<bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS"/>
<bm:field name="bp_class_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS_NAME"/>
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
</bm:fields>
<bm:features>
<f:standard-who/>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
</bm:features>
<bm:query-fields>
<bm:query-field field="bp_id" queryOperator="="/>
<bm:query-field field="bp_code" queryOperator="like"/>
<bm:query-field field="bp_name" queryExpression="t1.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos;"/>
<!-- <bm:query-field field="bp_category" queryOperator="="/> -->
<!-- <bm:query-field field="bp_category" queryExpression="(t1.bp_category = ${@bp_category} or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.bp_category = ${@bp_category} and br.bp_type = ${@bp_category}))"/> -->
<!-- <bm:query-field name="contract_bp_flag" queryExpression="(exists (select 1 from con_contract_bp b where b.contract_id in (${:@contract_id}) and b.bp_id = t1.bp_id and b.bp_category in (&apos;VENDER&apos;,&apos;TENANT&apos;,&apos;TENANT_SEC&apos;) )or nvl(${@contract_bp_flag},&apos;N&apos;) != &apos;Y&apos; )"/> -->
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> -->
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos; and bp_category in (&apos;TENANT&apos;,&apos;AGENT&apos;))"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
HL_SBO_INF_PKG.create_batch_bp_sbo_info( p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -61,7 +61,9 @@
<bm:field name="re_journal_num"/>
<bm:field name="re_sap_belnr"/>
<bm:field name="created_by_n" expression="(select su.description from sys_user su where su.user_id = t1.CREATED_BY)"/>
<bm:field name="je_detail_count"/>
<bm:field name="sbo_num"/>
<bm:field name="sbo_req_number"/>
<bm:field name="reversed_19_flag"/>
</bm:fields>
......@@ -74,6 +76,8 @@
<bm:query-field field="journal_num" queryOperator="like"/>
<bm:query-field name="journal_date_from" queryExpression="t1.journal_date &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="t1.journal_date &lt;= to_date(${@journal_date_to},'yyyy-mm-dd')"/>
<bm:query-field name="sbo_num" queryExpression="t1.sbo_num like &apos;%&apos;||${@sbo_num}||&apos;%&apos; "/>
<bm:query-field name="sbo_req_number" queryExpression="t1.sbo_req_number like &apos;%&apos;||${@sbo_req_number}||&apos;%&apos; "/>
<bm:query-field name="external_journal_num" queryExpression="t1.external_journal_num like &apos;%&apos;||${@external_journal_num}||&apos;%&apos; "/>
<bm:query-field field="je_transaction_code" queryOperator="="/>
<bm:query-field name="total_amount_dr_from" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &gt;= ${@total_amount_dr_from}"/>
......@@ -89,6 +93,8 @@
<bm:query-field name="query_reversed_flag" queryExpression="(${@query_reversed_flag}=&apos;Y&apos; and nvl(t1.reversed_flag,&apos;N&apos;)=&apos;N&apos;)"/>
<bm:query-field name="status_list_flag" queryExpression="(${@status_list_flag}=&apos;Y&apos; and t1.status in (&apos;U&apos;,&apos;B&apos;))"/>
<bm:query-field name="gld_flag" queryExpression="exists (select 1 from gld_je_transaction d where d.je_transaction_code = t1.je_transaction_code and d.gld_flag = ${@gld_flag})"/>
<bm:query-field name="bp_id_tenant" queryExpression="exists (select 1 from hls_journal_detail_v dv where dv.reference1=(select a.bp_code from hls_bp_master a where a.bp_id=${@bp_id_tenant} )and dv.journal_header_id=t1.journal_header_id )"/>
<bm:query-field name="desc" queryExpression="t1.description like &apos;%&apos;||${@desc}||&apos;%&apos; "/>
<bm:query-field name="post_sap" queryExpression="(decode(t1.sap_belnr,null,'N','Y') = ${@post_sap})"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
BEGIN
HL_SBO_INF_PKG.save_sbo_temp(p_journal_header_id => ${@journal_header_id}, p_user_id => ${/session/@user_id},p_id=>${/parameter/@v_id_1});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
HL_SBO_INF_PKG.create_sbo_inf_xml(p_journal_header_id => ${@journal_header_id}, p_user_id => ${/session/@user_id},p_batch_flag=>${@batch_flag},p_job_flag=>'N',p_id=>${/parameter/@v_id_1});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
select SBO_TMP_S.Nextval into ${@v_id_1} from dual;
END;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="v_id_1" output="true" outputPath="/parameter/@v_id_1"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -7,50 +7,68 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true"
model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH510_RETURN_SELECT&apos; and t.code_value not in (&apos;RETURN&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="returned_flag_rp"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH510_REVERSE_SELECT&apos; and t.code_value not in (&apos;R&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="reversed_flag_rp"/>
<a:model-query
defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)"
fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query
defaultWhereClause="t.code = &apos;CSH510_RETURN_SELECT&apos; and t.code_value not in (&apos;RETURN&apos;)"
fetchAll="true" model="sys.sys_code_values_v" rootPath="returned_flag_rp"/>
<a:model-query
defaultWhereClause="t.code = &apos;CSH510_REVERSE_SELECT&apos; and t.code_value not in (&apos;R&apos;)"
fetchAll="true" model="sys.sys_code_values_v" rootPath="reversed_flag_rp"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_receipt_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="csh_transaction_receipt_link"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_transaction_receipt_update_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_update_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_maintain_post_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_post_query.lview"/> -->
<a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/>
<a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete"
modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post"
modelaction="batch_update"/>
<!--更新收款单据的状态-->
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update" modelaction="batch_update"/>
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update"
modelaction="batch_update"/>
<a:link id="csh509_batch_update_confirmed_flag" model="csh.CSH509.query_roles_info" modelaction="batch_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="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/>-->
<a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<a:link id="csh510_csh_transaction_import_link"
url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<script type="text/javascript"><![CDATA[
//添加一个全局变量,该变量用于判断是债权内勤还是会计担当进行确认
var confirmed_by='';
var confirmed_by = '';
//判断是债权内勤还是会计担当
function judgeRoles(position_code){
function judgeRoles(position_code) {
var datas=$('position_code_ds').data;
for(var i=0;i<datas.length;i++){
if(datas[i].data.position_code==position_code){
var datas = $('position_code_ds').data;
for (var i = 0; i < datas.length; i++) {
if (datas[i].data.position_code == position_code) {
return true;
}
}
return false;
}
return false;
}
//对函数进行封装
function update_confirmed_flag(updateData){
function update_confirmed_flag(updateData) {
//弹出确认修改的提示框
$L.showConfirm("提示",'确认执行该操作?',function(){
$L.showConfirm("提示", '确认执行该操作?', function () {
//锁屏
lock_current_window();
//作废单据
......@@ -60,7 +78,7 @@
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '修改成功!');
Leaf.showMessage('${l:PROMPT}', '操作成功!');
$('csh509_csh_trx_bank_business_confirm').enable();
$('csh509_csh_trx_bank_refuse').enable();
$('csh509_csh_trx_bank_drop').enable();
......@@ -75,44 +93,47 @@
})
}
//营业人员确认
function csh509_csh_trx_bank_business_confirm(){
function csh509_csh_trx_bank_business_confirm() {
//console.log('${/session/@user_id}');
$('csh509_csh_trx_bank_business_confirm').disable();
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
var updateData=[];
for(var i=0;i<datas.length;i++){
var confirmed_flag= datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
$L.showInfoMessage("提示",'请选择新增确认中的收款单据');
return;
}
//
if(confirmed_flag=='ACCAUDITING'){
confirmed_by='00321';
if(!judgeRoles("00321")){
$L.showInfoMessage("提示",'需要会计担当确认单据');
return;
}
}else if(confirmed_flag=='DEBTAUDITING'){
confirmed_by='00217';
if(!judgeRoles("00217")){
$L.showInfoMessage("提示",'需要债权内勤确认单据');
return;
}
}else{
$L.showInfoMessage("提示",'该身份没有确认的权限');
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
var updateData = [];
for (var i = 0; i < datas.length; i++) {
var confirmed_flag = datas[i].get('confirmed_flag');
if (confirmed_flag != 'ACCAUDITING' && confirmed_flag != 'DEBTAUDITING') {
$L.showInfoMessage("提示", '请选择确认中的收款单据');
return;
}
//
// if(confirmed_flag=='ACCAUDITING'){
// confirmed_by='00321';
// if(!judgeRoles("00321")){
// $L.showInfoMessage("提示",'需要会计担当确认单据');
// return;
// }
// }else if(confirmed_flag=='DEBTAUDITING'){
// confirmed_by='00217';
// if(!judgeRoles("00217")){
// $L.showInfoMessage("提示",'需要债权内勤确认单据');
// return;
// }
//
// }else{
// $L.showInfoMessage("提示",'该身份没有确认的权限');
// return;
// }
//保存要修改的数据
//岗位
confirmed_by = '00321';
updateData.push({
transaction_id:datas[i].get('transaction_id'),
wanted_confirmed_flag: 'APPROVED',
transaction_id: datas[i].get('transaction_id'),
wanted_confirmed_flag: 'ACCAUDITED',
wanted_written_off_flag: 'NOT',
confirmed_by :confirmed_by,
_status : 'update'
confirmed_by: confirmed_by,
_status: 'update'
})
}
//更新数据
......@@ -122,91 +143,93 @@
}
//营业人员驳回单据
function csh509_csh_trx_bank_refuse(){
//营业人员驳回单据
function csh509_csh_trx_bank_refuse() {
//驳回收款单
$('csh509_csh_trx_bank_refuse').disable();
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if(datas.length==0){
$('csh509_csh_trx_bank_refuse').enable();
$L.showInfoMessage("提示",'请先选择数据');
return;
}
var updateData=[];
for(var i=0;i<datas.length;i++){
var confirmed_flag= datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
$L.showInfoMessage("提示",'请选择新增确认中的收款单据');
return;
}
//需要债权用户和会计担当才能驳回单据
if(confirmed_flag=='ACCAUDITING'){
if(!judgeRoles("00321")){
$L.showInfoMessage("提示",'需要会计担驳回单据');
return;
}
}
if(confirmed_flag=='DEBTAUDITING'){
if(!judgeRoles("00217")){
$L.showInfoMessage("提示",'需要债权内勤驳回单据');
return;
}
}
//保存要修改的数据
updateData.push({
transaction_id:datas[i].get('transaction_id'),
wanted_confirmed_flag: 'REJECTED',
_status : 'update'
})
}
//更新数据
update_confirmed_flag(updateData);
}
$('csh509_csh_trx_bank_refuse').disable();
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if (datas.length == 0) {
$('csh509_csh_trx_bank_refuse').enable();
$L.showInfoMessage("提示", '请先选择数据');
return;
}
var updateData = [];
for (var i = 0; i < datas.length; i++) {
var confirmed_flag = datas[i].get('confirmed_flag');
// if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
// $L.showInfoMessage("提示",'请选择新增确认中的收款单据');
// return;
// }
// //需要债权用户和会计担当才能驳回单据
// if(confirmed_flag=='ACCAUDITING'){
// if(!judgeRoles("00321")){
// $L.showInfoMessage("提示",'需要会计担驳回单据');
// return;
// }
// }
// if(confirmed_flag=='DEBTAUDITING'){
// if(!judgeRoles("00217")){
// $L.showInfoMessage("提示",'需要债权内勤驳回单据');
// return;
// }
// }
//保存要修改的数据
updateData.push({
transaction_id: datas[i].get('transaction_id'),
wanted_confirmed_flag: 'CT_REJECTED',
_status: 'update'
})
}
//更新数据
update_confirmed_flag(updateData);
}
//新增单据的作废
function csh509_csh_trx_bank_drop(){
//驳回收款单
//根据身份判断所选择的数据是否可以确认
$('csh509_csh_trx_bank_drop').disable();
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if(datas.length==0){
$L.showInfoMessage("提示",'请先选择数据');
$('csh509_csh_trx_bank_drop').enable();
return;
}
var updateData=[];
for(var i=0;i<datas.length;i++){
var confirmed_flag= datas[i].get('confirmed_flag');
if(confirmed_flag!='ACCAUDITING'&&confirmed_flag!='DEBTAUDITING'){
$L.showInfoMessage("提示",'请选择新增确认中的收款单据');
return;
}
//需要债权用户和会计担当才能驳回单据
if(confirmed_flag=='ACCAUDITING'){
if(!judgeRoles("00321")){
$L.showInfoMessage("提示",'需要会计担当作废单据');
return;
}
function csh509_csh_trx_bank_drop() {
//驳回收款单
//根据身份判断所选择的数据是否可以确认
$('csh509_csh_trx_bank_drop').disable();
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if (datas.length == 0) {
$L.showInfoMessage("提示", '请先选择数据');
$('csh509_csh_trx_bank_drop').enable();
return;
}
if(confirmed_flag=='DEBTAUDITING'){
if(!judgeRoles("00217")){
$L.showInfoMessage("提示",'需要债权内勤作废单据');
var updateData = [];
for (var i = 0; i < datas.length; i++) {
var confirmed_flag = datas[i].get('confirmed_flag');
if (confirmed_flag != 'ACCAUDITING' && confirmed_flag != 'DEBTAUDITING') {
$L.showInfoMessage("提示", '请选择新增确认中的收款单据');
return;
}
//需要债权用户和会计担当才能驳回单据
if (confirmed_flag == 'ACCAUDITING') {
if (!judgeRoles("00321")) {
$L.showInfoMessage("提示", '需要会计担当作废单据');
return;
}
}
if (confirmed_flag == 'DEBTAUDITING') {
if (!judgeRoles("00217")) {
$L.showInfoMessage("提示", '需要债权内勤作废单据');
return;
}
}
//保存要修改的数据
updateData.push({
transaction_id: datas[i].get('transaction_id'),
wanted_confirmed_flag: 'CANCELLED',
_status: 'update'
})
}
//保存要修改的数据
updateData.push({
transaction_id:datas[i].get('transaction_id'),
wanted_confirmed_flag: 'CANCELLED',
_status : 'update'
})
}
//更新数据
update_confirmed_flag(updateData);
}
//更新数据
update_confirmed_flag(updateData);
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
......@@ -280,13 +303,13 @@
if (record.get('transaction_id')) {
var url;
url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
}
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
function openWindow(url) {
new Leaf.Window({
var win = new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
......@@ -295,16 +318,17 @@
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
win.on('close', function () {
$('csh_transaction_receipt_maintain_result_ds').query();
});
}
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++) {
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];
}
}
......@@ -420,7 +444,7 @@
success: function () {
unlock_current_window();
ds.query(ds.currentpage);
Leaf.showMessage('${l:PROMPT}', '修改成功!');
Leaf.showMessage('${l:PROMPT}', '操作成功!');
}, failure: function () {
unlock_current_window();
},
......@@ -432,7 +456,7 @@
}
}
function csh510_csh_transaction_batch_update(){
function csh510_csh_transaction_batch_update() {
//
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
......@@ -460,20 +484,19 @@
csh510_receipt_query();
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function csh510_csh_trx_bank_import(){
function csh510_csh_trx_bank_import() {
var url_l = $('csh510_csh_transaction_import_link').getUrl();
......@@ -498,8 +521,9 @@
}
function csh510_export() {
$('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护');
$('csh_transaction_receipt_maintain_grid_ds')._export(null, '收款维护');
}
]]></script>
<a:dataSets>
<a:dataSet id="position_code_ds">
......@@ -532,13 +556,16 @@
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh510_collection_classes_batch_update_ds">
<a:fields>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<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: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"/>
......@@ -553,7 +580,9 @@
<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: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"/>
......@@ -568,7 +597,9 @@
<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: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"/>
......@@ -583,16 +614,20 @@
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value" displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds"
returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" 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_from"/>
<a:map from="bp_name" to="bp_name_from"/>
</a:mapping>
</a:field>
<a:field name="bp_id_from"/>
<a:field name="bp_name_to" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="bp_name_to" 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_to"/>
<a:map from="bp_name" to="bp_name_to"/>
......@@ -605,74 +640,100 @@
<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: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: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: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="posted_flag_display" displayField="code_value_name" options="posted_flag_ds" returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds"
returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag" defaultValue="N"/>
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds" returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds" returnField="reversed_flag" valueField="code_value"/>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds"
returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds"
returnField="reversed_flag" valueField="code_value"/>
<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: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="transaction_type_display" displayField="code_value_name" options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds" returnField="currency_code_from" valueField="currency_code"/>
<a:field name="transaction_type_display" displayField="code_value_name"
options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_from" valueField="currency_code"/>
<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="transaction_type" defaultValue="RECEIPT"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
<a:field name="not_reversed_flag_r" defaultValue="NOT"/>
<a:field name="receipt_type"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds"
returnField="receipt_type" valueField="code_value"/>
<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: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:field name="collection_classes_n" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes_n" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<!--对方账户的-->
<a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550"
lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580"
title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550"
lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580"
title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550"
lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580"
title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
......@@ -685,7 +746,9 @@
<a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true" model="csh.CSH510.csh_transaction_miantain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true"/>
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true"
model="csh.CSH510.csh_transaction_miantain_query"
queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -693,13 +756,17 @@
<!-- <a:gridButton click="csh510_receipt_back" text="HLS.BACK"/>
<a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> -->
<!-- <a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh509_csh_trx_bank_business_confirm" text="CSH509.CSH_RECEIPT_CONFIRM.NEW_APPLY_BTN" id="csh509_csh_trx_bank_business_confirm"/>
<a:gridButton click="csh509_csh_trx_bank_refuse" text="CSH509.CSH_RECEIPT_CONFIRM.REFUSE_BTN" id="csh509_csh_trx_bank_refuse"/>
<a:gridButton click="csh509_csh_trx_bank_drop" text="CSH509.CSH_RECEIPT_CONFIRM.DROP_BTN" id="csh509_csh_trx_bank_drop"/>
<a:gridButton click="csh510_receipt_query" text="CSH509.CSH_RECEIPT_CONFIRM.QUERY_BTN" id="csh510_receipt_query"/>
<a:gridButton click="csh509_csh_trx_bank_business_confirm"
text="确认"
id="csh509_csh_trx_bank_business_confirm"/>
<a:gridButton click="csh509_csh_trx_bank_refuse" text="驳回"
id="csh509_csh_trx_bank_refuse"/>
<!-- <a:gridButton click="csh509_csh_trx_bank_drop" text="CSH509.CSH_RECEIPT_CONFIRM.DROP_BTN" id="csh509_csh_trx_bank_drop"/>-->
<a:gridButton click="csh510_receipt_query" text="CSH509.CSH_RECEIPT_CONFIRM.QUERY_BTN"
id="csh510_receipt_query"/>
<!--<a:gridButton click="csh510_receipt_remove" text="HLS.REMOVE"/>-->
<!-- <a:gridButton click="csh510_csh_trx_bank_apply_new" text="CSH510.CSH_TRANSACTION.APPLY_NEW_BTN"/>
<a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN"/>-->
<!-- <a:gridButton click="csh510_csh_trx_bank_apply_new" text="CSH510.CSH_TRANSACTION.APPLY_NEW_BTN"/>
<a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN"/>-->
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
<!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
......@@ -708,64 +775,98 @@
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: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: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="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<!--对方账户户名-->
<a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField style="display:none"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
<a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
<!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>-->
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
</a:fieldSet>
</a:hBox>
</a:form>
<a:fieldSet labelWidth="150" title="收款单" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="300" marginWidth="80" navBar="true" >
<a:fieldSet labelWidth="150" title="收款单" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds"
bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="300" 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" renderer="seedetail_transaction_num" width="110"/>
<a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE" width="100"/>
<a:column name="transaction_amount" align="right" prompt="CSH510.CSH_TRANSACTION.RECEIPT_AMOUNT" width="100" renderer="Leaf.formatMoney"/>
<a:column name="transaction_num" prompt="CSH510.CSH_TRANSACTION.CSH_TRANSACTION_NUM"
renderer="seedetail_transaction_num" width="110"/>
<!-- <a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE" width="100"/>-->
<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="returned_amount" prompt="CSH510.CSH_TRANSACTION.RETURN_AMOUNT" align="right" renderer="Leaf.formatMoney" />
<a:column name="use_money_amount" prompt="CSH510.CSH_TRANSACTION.USEFUL_AMOUNT" align="right" renderer="Leaf.formatMoney"/>
<a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS" align="center"/>
<a:column name="returned_amount" prompt="CSH510.CSH_TRANSACTION.RETURN_AMOUNT" align="right"
renderer="Leaf.formatMoney"/>
<a:column name="use_money_amount" prompt="CSH510.CSH_TRANSACTION.USEFUL_AMOUNT" align="right"
renderer="Leaf.formatMoney"/>
<a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"
align="center"/>
<a:column name="bp_name" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" align="center"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS" align="center"/>
<a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"
align="center"/>
<a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"
align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT" align="center">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name"
align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name"
align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num"
align="center"/>
</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"/>
<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_NAME" name="bp_bank_account_name"
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>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/>
<a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER" align="center"/>
<a:column name="acc_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.ACCT_CONFIRMER" align="center"/>
<!-- <a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER"-->
<!-- align="center"/>-->
<a:column name="acc_confirmed_by_desc" prompt="确认人"
align="center"/>
</a:columns>
</a:grid>
</a:fieldSet>
......
......@@ -87,7 +87,8 @@
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh510_update_bp_info_link').query();
// $('csh510_update_bp_info_link').query();
$('csh_transaction_receipt_link_winid').close();
},
scope: this
});
......
......@@ -435,7 +435,7 @@
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:screenTitle/>-->
<!-- <a:gridButton id="csh511_receipt_save_id" click="csh511_receipt_save" text="HLS.SAVE"/>
<a:gridButton id="csh511_receipt_reset_id" click="csh511_receipt_reset" text="HLS.RESET"/>-->
<!--<a:gridButton id="csh511_receipt_posted_id" click="csh511_receipt_posted" text="HLS.POST"/>-->
......
......@@ -7,35 +7,52 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH510_RETURN_SELECT&apos; and t.code_value not in (&apos;RETURN&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="returned_flag_rp"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH510_REVERSE_SELECT&apos; and t.code_value not in (&apos;R&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="reversed_flag_rp"/>
<a:model-query
defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)"
fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query
defaultWhereClause="t.code = &apos;CSH510_RETURN_SELECT&apos; and t.code_value not in (&apos;RETURN&apos;)"
fetchAll="true" model="sys.sys_code_values_v" rootPath="returned_flag_rp"/>
<a:model-query
defaultWhereClause="t.code = &apos;CSH510_REVERSE_SELECT&apos; and t.code_value not in (&apos;R&apos;)"
fetchAll="true" model="sys.sys_code_values_v" rootPath="reversed_flag_rp"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_receipt_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="csh_transaction_receipt_link"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_transaction_receipt_update_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>-->
<a:link id="csh_transaction_receipt_maintain_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update.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="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/>
<a:link id="csh_transaction_receipt_update_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>-->
<a:link id="csh_transaction_receipt_maintain_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update.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="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete"
modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post"
modelaction="batch_update"/>
<!--更新收款单据的状态-->
<a:link id="csh509N_batch_update_confirmed_flag" model="csh.CSH509.query_roles_info" modelaction="batch_update"/>
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update" modelaction="batch_update"/>
<a:link id="csh509N_batch_update_confirmed_flag" model="csh.CSH509.query_roles_info"
modelaction="batch_update"/>
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update"
modelaction="batch_update"/>
<!-- <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/>-->
<!-- <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/>-->
<a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<a:link id="csh510_csh_transaction_import_link"
url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function(){
Leaf.onReady(function () {
//console.log($('csh_transaction_receipt_maintain_result_ds'));
})
//新增单据的作废
function csh510_csh_trx_bank_drop(){
function csh510_csh_trx_bank_drop() {
$('csh510_csh_trx_bank_drop').disable();
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if (datas.length == 0) {
......@@ -43,12 +60,13 @@
$('csh510_csh_trx_bank_drop').enable();
return;
}
var post_data=[];
for(var i=0;i<datas.length;i=i+1) {
var confirmed_flag= datas[i].get('confirmed_flag');
var post_data = [];
for (var i = 0; i < datas.length; i = i + 1) {
var confirmed_flag = datas[i].get('confirmed_flag');
//不是新增就报错
if(confirmed_flag!='NEW'&&confirmed_flag!=undefined){
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
if ((confirmed_flag != 'NEW' && confirmed_flag != 'REJECTED') || !confirmed_flag) {
$L.showInfoMessage("提示", '请选择单据为新建或退回的数据', null, null);
$('csh510_csh_trx_bank_drop').enable();
return;
}
//将对象封装到json对象数组
......@@ -58,10 +76,11 @@
'wanted_confirmed_flag': 'CANCELLED',
'_status': 'update'
});
};
}
;
//弹出确认修改的提示框
$L.showConfirm("提示",'确认执行该操作?',function(){
$L.showConfirm("提示", '确认执行该操作?', function () {
//锁屏
lock_current_window();
//作废单据
......@@ -86,6 +105,7 @@
})
}
//新增申请按钮’
function csh510_csh_trx_bank_apply_new() {
$('csh510_csh_trx_bank_apply_new').disable();
......@@ -96,74 +116,77 @@
$('csh510_csh_trx_bank_apply_new').enable();
return;
}
var post_data=[];
var post_data = [];
for(var i=0;i<datas.length;i=i+1) {
for (var i = 0; i < datas.length; i = i + 1) {
var confirmed_flag = datas[i].get('confirmed_flag');
var bp_name=datas[i].get('bp_name');
if(bp_name==''||bp_name==undefined){
var bp_name = datas[i].get('bp_name');
if (bp_name == '' || bp_name == undefined) {
$L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null);
$('csh510_csh_trx_bank_apply_new').enable();
return;
}
//不是新增就报错
if (confirmed_flag != 'NEW' && confirmed_flag != undefined) {
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
if ((confirmed_flag != 'NEW' && confirmed_flag != 'REJECTED') || !confirmed_flag) {
$L.showInfoMessage("提示", '请选择单据为新建或退回的数据', null, null);
$('csh510_csh_trx_bank_apply_new').enable();
return;
}
//将对象封装到json对象数组
post_data.push({
'transaction_id': datas[i].get('transaction_id'),
'_status': 'update'
});
}
//弹出确认修改的提示框
$L.showConfirm("提示", '确认执行该操作?', function () {
//锁屏
lock_current_window();
//改变未提交单据数据的状态
Leaf.request({
url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(),
para: post_data,
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '修改成功!');
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
}, failure: function () {
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
unlock_current_window();
},
error: function () {
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
unlock_current_window();
},
scope: this
});
});
}
//弹出确认修改的提示框
$L.showConfirm("提示", '确认执行该操作?', function () {
//锁屏
lock_current_window();
//改变未提交单据数据的状态
Leaf.request({
url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(),
para: post_data,
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '操作成功!');
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
}, failure: function () {
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
unlock_current_window();
},
error: function () {
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
unlock_current_window();
},
scope: this
});
});
}
//跳转到收款新增页面
function csh510_csh_trx_bank_hand_add(){
function csh510_csh_trx_bank_hand_add() {
//按钮失效
$('csh510_csh_trx_bank_hand_add').disable();
var url = $('csh_transaction_receipt_link').getUrl();
var win = new Leaf.Window({
title:'${l:CSH510.NEW_MANUAL_RECEIPT}',
title: '${l:CSH510.NEW_MANUAL_RECEIPT}',
url: url,
id: 'csh_trx_receipt_id',
id: 'csh_trx_receipt_win_id',
fullScreen: true,
draggable: true
}).on('close', function() {
}).on('close', function () {
//按钮启用
$('csh510_csh_trx_bank_hand_add').enable();
$('csh_transaction_receipt_maintain_result_ds').query();
});
}
//锁表
function lock_current_window() {
......@@ -235,9 +258,6 @@
}
function seedetail_transaction_num(value, record, name) {
console.log(record.get('receipt_type'));
console.log( record.get('bp_name'));
console.log( record.get('confirmed_flag'));
if (record.get('transaction_id')) {
var url;
/*if (record.get('posted_flag') == 'N') {
......@@ -247,10 +267,10 @@
} else {
return value;
}*/
if(record.get('receipt_type')=='IMPORT'&&record.get('bp_name')==null&&record.get('confirmed_flag')=='NEW'){
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true';
}else{
url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=false';
if (!record.get('bp_name') && record.get('confirmed_flag') == 'NEW') {
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&update_flag=true';
} else {
url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&update_flag=false';
}
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
......@@ -258,7 +278,7 @@
}
function openWindow(url) {
new Leaf.Window({
var win = new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
......@@ -267,6 +287,9 @@
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
win.on('close', function () {
$('csh_transaction_receipt_maintain_result_ds').query();
});
}
function construct_from_to() {
......@@ -404,7 +427,7 @@
}
}
function csh510_csh_transaction_batch_update(){
function csh510_csh_transaction_batch_update() {
//
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
......@@ -432,48 +455,47 @@
csh510_receipt_query();
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function csh510_csh_trx_bank_import(){
function csh510_csh_trx_bank_import() {
//按钮失效
$('csh510_csh_trx_bank_import').disable();
//只有债权内勤才能
var url_l = $('csh510_csh_transaction_import_link').getUrl();
var win = new Leaf.Window({
id: 'csh510_csh_transaction_import_win',
url: url_l,
params: {
'winid': 'csh510_csh_transaction_import_win',
'session_id': '${/session/@session_id}',
'parent_ds_id': 'csh_transaction_receipt_maintain_result_ds'
},
title: '信息导入',
width: 430,
height: 390
});
win.on('close', function () {
$('csh_transaction_receipt_maintain_result_ds').query();
//按钮启用
$('csh510_csh_trx_bank_import').enable();
});
//只有债权内勤才能
var url_l = $('csh510_csh_transaction_import_link').getUrl();
var win = new Leaf.Window({
id: 'csh510_csh_transaction_import_win',
url: url_l,
params: {
'winid': 'csh510_csh_transaction_import_win',
'session_id': '${/session/@session_id}',
'parent_ds_id': 'csh_transaction_receipt_maintain_result_ds'
},
title: '信息导入',
width: 430,
height: 390
});
win.on('close', function () {
$('csh_transaction_receipt_maintain_result_ds').query();
//按钮启用
$('csh510_csh_trx_bank_import').enable();
});
}
function csh510_export() {
$('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护');
$('csh_transaction_receipt_maintain_grid_ds')._export(null, '收款维护');
}
]]></script>
......@@ -506,14 +528,17 @@
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh510_collection_classes_batch_update_ds">
<a:fields>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<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: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"/>
......@@ -528,7 +553,9 @@
<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: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"/>
......@@ -543,7 +570,9 @@
<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: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"/>
......@@ -558,16 +587,20 @@
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value" displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds"
returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" 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_from"/>
<a:map from="bp_name" to="bp_name_from"/>
</a:mapping>
</a:field>
<a:field name="bp_id_from"/>
<a:field name="bp_name_to" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="bp_name_to" 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_to"/>
<a:map from="bp_name" to="bp_name_to"/>
......@@ -580,75 +613,101 @@
<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: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: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: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="posted_flag_display" displayField="code_value_name" options="posted_flag_ds" returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds"
returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag" defaultValue="N"/>
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds" returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds" returnField="reversed_flag" valueField="code_value"/>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds"
returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds"
returnField="reversed_flag" valueField="code_value"/>
<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: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="transaction_type_display" displayField="code_value_name" options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds" returnField="currency_code_from" valueField="currency_code"/>
<a:field name="transaction_type_display" displayField="code_value_name"
options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_from" valueField="currency_code"/>
<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="transaction_type" defaultValue="RECEIPT"/>
<a:field name="transaction_type"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>
<a:field name="not_reversed_flag_r" defaultValue="NOT"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
<!-- <a:field name="reversed_flag" defaultValue="NOT"/>-->
<a:field name="receipt_type"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds"
returnField="receipt_type" valueField="code_value"/>
<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: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:field name="collection_classes_n" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes_n" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<!--对方账户的-->
<a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550"
lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580"
title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550"
lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580"
title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
<a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550"
lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580"
title="对方账户信息">
<a:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
<a:map from="opposite_band_na" to="opposite_band_na"/>
......@@ -661,7 +720,9 @@
<a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true" model="csh.CSH510.csh_transaction_miantain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true">
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true"
model="csh.CSH510.csh_transaction_miantain_query"
queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true">
</a:dataSet>
</a:dataSets>
......@@ -672,11 +733,15 @@
<a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> -->
<!-- <a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh510_receipt_query" text="HLS.QUERY" id="csh510_receipt_query"/>
<a:gridButton click="csh510_csh_trx_bank_import" text="CSH510.CSH_TRANSACTION.RECEIVE_MONEY_IMPORT_BTN" id="csh510_csh_trx_bank_import"/>
<a:gridButton click="csh510_csh_trx_bank_hand_add" text="CSH510.CSH_TRANSACTION.MONEY_HAND_ADD_BTN" id="csh510_csh_trx_bank_hand_add"/>
<!--<a:gridButton click="csh510_receipt_remove" text="HLS.REMOVE"/>-->
<a:gridButton click="csh510_csh_trx_bank_apply_new" text="CSH510.CSH_TRANSACTION.APPLY_NEW_BTN" id="csh510_csh_trx_bank_apply_new"/>
<a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN" id="csh510_csh_trx_bank_drop"/>
<a:gridButton click="csh510_csh_trx_bank_import" text="CSH510.CSH_TRANSACTION.RECEIVE_MONEY_IMPORT_BTN"
id="csh510_csh_trx_bank_import"/>
<a:gridButton click="csh510_csh_trx_bank_hand_add" text="CSH510.CSH_TRANSACTION.MONEY_HAND_ADD_BTN"
id="csh510_csh_trx_bank_hand_add"/>
<a:gridButton click="csh510_receipt_remove" text="收款取消"/>
<a:gridButton click="csh510_csh_trx_bank_apply_new" text="提交确认"
id="csh510_csh_trx_bank_apply_new"/>
<!-- <a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN"-->
<!-- id="csh510_csh_trx_bank_drop"/>-->
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
<!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
......@@ -685,69 +750,104 @@
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: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: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="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<!--对方账户户名-->
<a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:lov name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<a:lov name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField style="display:none"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
<a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
<!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>-->
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
</a:fieldSet>
</a:hBox>
</a:form>
<a:fieldSet labelWidth="150" title="收款单" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="300" marginWidth="80" navBar="true" >
<!--<a:toolBar>
<a:button click="csh510_export" text="导出"/>
</a:toolBar>-->
<a:fieldSet labelWidth="150" title="收款单" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds"
bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="300" 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" renderer="seedetail_transaction_num" width="110" align="center"/>
<a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE" width="100"/>
<a:column name="transaction_amount" align="right" prompt="CSH510.CSH_TRANSACTION.RECEIPT_AMOUNT" width="100" renderer="Leaf.formatMoney"/>
<a:column name="transaction_num" prompt="CSH510.CSH_TRANSACTION.CSH_TRANSACTION_NUM"
renderer="seedetail_transaction_num" width="110" align="center"/>
<!-- <a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE"-->
<!-- width="100"/>-->
<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="returned_amount" prompt="CSH510.CSH_TRANSACTION.RETURN_AMOUNT" align="right" renderer="Leaf.formatMoney"/>
<a:column name="use_money_amount" prompt="CSH510.CSH_TRANSACTION.USEFUL_AMOUNT" align="right" renderer="Leaf.formatMoney"/>
<a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS" align="center"/>
<a:column name="returned_amount" prompt="CSH510.CSH_TRANSACTION.RETURN_AMOUNT" align="right"
renderer="Leaf.formatMoney"/>
<a:column name="use_money_amount" prompt="CSH510.CSH_TRANSACTION.USEFUL_AMOUNT" align="right"
renderer="Leaf.formatMoney"/>
<a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"
align="center"/>
<a:column name="bp_name" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" align="center"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS" align="center"/>
<a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"
align="center"/>
<a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"
align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num" align="center"/>
</a:column>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name"
align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name"
align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num"
align="center"/>
</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"/>
<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_NAME" name="bp_bank_account_name"
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>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/>
<a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER" align="center"/>
<a:column name="acc_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.ACCT_CONFIRMER" align="center"/>
<!-- <a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER"-->
<!-- align="center"/>-->
<a:column name="acc_confirmed_by_desc" prompt="确认人"
align="center"/>
</a:columns>
<a:editors>
<a:numberField id="number_editor" allowDecimals="true" decimalPrecision="2" editable="false"/>
</a:editors>
</a:grid>
<a:editors>
<a:numberField id="number_editor" allowDecimals="true" decimalPrecision="2" editable="false"/>
</a:editors>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
......
......@@ -8,54 +8,82 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure outputPath="/parameter">
<a:model-query model="basic.hls_fnd_attribute_sequence" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="CSH_TRX_BANK" user_id="${/session/@user_id}"/>
<a:model-query defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;CSH_TRX_BANK&apos;" model="basic.hls_fnd_attribute_status" rootPath="status"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator=","
status_field="/parameter/@ImportSuccess" template_code="CSH_TRX_BANK"
user_id="${/session/@user_id}"/>
<a:model-query
defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;CSH_TRX_BANK&apos;"
model="basic.hls_fnd_attribute_status" rootPath="status"/>
<a:model-update model="csh.CSH510N.csh_transaction_list_tmp"/>
</a:init-procedure>
<a:view>
<a:link id="import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp" modelaction="execute"/>
<a:link id="save_import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp" modelaction="batch_update"/>
<a:link id="import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp"
modelaction="execute"/>
<a:link id="save_import_csh_transaction_receipt_data_link_id" model="csh.CSH510N.csh_transaction_list_tmp"
modelaction="batch_update"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script type="text/javascript"><![CDATA[
function backBtn() {
parent._input_window.close();
}
var import_flag=0;
var import_flag = 0;
function import_btn() {
var ds = $('tre_withdraw_subscriber_import_ds');
var records = ds.getAll();
var saveData=[];
if(import_flag==0){
for (var i = 0;i < records.length;i++) {
var record=records[i];
if( record.get('status') == 'ERROR'){
var saveData = [];
if (import_flag == 0) {
for (var i = 0; i < records.length; i++) {
var record = records[i];
if (record.get('status') == 'ERROR') {
//不将这条数据传递到数组中
continue;
continue;
}
//否则的话添加必要的字段
record.set('receipt_type','IMPORT');
record.set('bank_account_num',record.get('attribute_1'));
record.set('transaction_date', Leaf.formatDate(record.get('attribute_3')));
record.set('bank_slip_num',record.get('attribute_5'));
record.set('receipt_type', 'IMPORT');
record.set('bank_account_num', record.get('attribute_1'));
// record.set('transaction_date', Leaf.formatDate(record.get('attribute_3')));
record.set('bank_slip_num', record.get('attribute_5'));
record.set('currency_code', 'CNY');
record.set('transaction_amount',record.get('attribute_14'));
record.set('exchange_rate',1);
record.set('bp_bank_account_num',record.get('attribute_8'));
record.set('bp_bank_account_name',record.get('attribute_9'));
record.set('opposite_band_na',record.get('attribute_10'));
record.set('description',record.get('attribute_23'));
record.set('ref_v05',record.get('attribute_24'));
record.set('transaction_amount', record.get('attribute_14'));
record.set('exchange_rate', 1);
record.set('bp_bank_account_num', record.get('attribute_8'));
record.set('bp_bank_account_name', record.get('attribute_9'));
record.set('opposite_band_na', record.get('attribute_10'));
record.set('description', record.get('attribute_23'));
record.set('ref_v05', record.get('attribute_24'));
record.set('write_off_flag', 'DISABLED');
var paid_byother_flag = record.get('paid_byother_flag');
if (paid_byother_flag == 'T') {
//代付非保证金类 --> 直接从银行过账到预收科目
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'ADVANCE_RECEIPT');
}
} else if (paid_byother_flag == 'F') {
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'RECEIPT');
}
}
record.set('write_off_flag','DISABLED');
if(!record.get('transaction_type')){
continue;
}
record.set('_status','insert');
record.set('_status', 'insert');
saveData.push(record.data);
}
//开始导入数据
Leaf.showConfirm('提示', '确定要导入信息吗,有错误信息的数据将不会被导入', function() {
Leaf.showConfirm('提示', '确定要导入信息吗,有错误信息的数据将不会被导入', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('save_import_csh_transaction_receipt_data_link_id').getUrl(),
......@@ -69,26 +97,82 @@
msg: '操作成功',
duration: 2000
});
//关闭该导入的界面
//关闭该导入的界面
backBtn();
},
failure:function(){
Leaf.Masker.unmask(Ext.getBody());
},
error:function(){
Leaf.Masker.unmask(Ext.getBody());
}
});
});
}else{
} else {
Leaf.showMessage('${l:PROMPT}', '数据已导入不能重复导入!');
return;
}
}
function update_import_data(ds, record, name, value, oldvalue) {
if (name == 'paid_byother_flag') {
if (value == 'T') {
//代付非保证金类 --> 直接从银行过账到预收科目
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'ADVANCE_RECEIPT');
}
} else if (value == 'F') {
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'RECEIPT');
}
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="tre_withdraw_subscriber_import_ds" autoQuery="true" fetchAll="true" model="csh.CSH510N.csh_transaction_list_tmp" queryUrl="${/request/@context_path}/autocrud/csh.CSH510N.csh_transaction_list_tmp/query?header_id=${/model/header/record/@header_id}">
<a:dataSet id="collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES">
</a:dataSet>
<a:dataSet id="paid_byother_flag_ds">
<a:datas>
<a:record code_value="T" code_value_name="是"/>
<a:record code_value="F" code_value_name="否"/>
</a:datas>
</a:dataSet>
<a:dataSet id="tre_withdraw_subscriber_import_ds" autoQuery="true" fetchAll="true"
model="csh.CSH510N.csh_transaction_list_tmp"
queryUrl="${/request/@context_path}/autocrud/csh.CSH510N.csh_transaction_list_tmp/query?header_id=${/model/header/record/@header_id}">
<a:fields>
<a:field name="error_message" readOnly="true"/>
<a:field name="attribute_4" readOnly="true"/>
<a:field name="paid_byother_flag_desc" options="paid_byother_flag_ds"
returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
<a:field name="paid_byother_flag" required="true"/>
<a:field name="collection_classes_desc" options="collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" required="true"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_name" to="bp_category_display"/>
</a:mapping>
</a:field>
<a:field name="bp_id"/>
<a:field name="bp_category"/>
<a:field name="transaction_date" datatype="date"/>
</a:fields>
<a:events>
<a:event name="update" handler="update_import_data"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
......@@ -97,24 +181,31 @@
<a:gridButton click="backBtn" text="退出"/>
<a:gridButton click="import_btn" text="导入"/>
</a:screenTopToolbar>
<a:grid id="grid_ds_id" bindTarget="tre_withdraw_subscriber_import_ds" height="340" navBar="true" width="980">
<a:grid id="grid_ds_id" bindTarget="tre_withdraw_subscriber_import_ds" height="340" navBar="true"
width="980">
<a:columns>
<a:column name="error_message" editor="textArea_e" prompt="错误信息" width="180"/>
<a:column name="attribute_1" prompt="账号" width="80"/>
<a:column name="attribute_2" prompt="货币" width="80"/>
<a:column name="attribute_3" prompt="交易日期" width="80"/>
<!-- <a:column name="attribute_4" prompt="交易时间" width="80"/>-->
<a:column name="transaction_date" prompt="交易日期" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="attribute_4" prompt="交易时间" width="80"/>-->
<a:column name="attribute_5" prompt="日志号" width="80"/>
<a:column name="attribute_8" prompt="对方账号" width="80"/>
<a:column name="attribute_9" prompt="对方账号户名" width="80"/>
<a:column name="attribute_10" prompt="对方银行名称" width="80"/>
<a:column name="attribute_14" prompt="收款金额" width="80"/>
<a:column name="bp_name" prompt="收款对象" editor="grid_lov" width="120"/>
<a:column name="paid_byother_flag_desc" prompt="是否代付" editor="grid_cb"/>
<a:column name="attribute_14" prompt="收款金额" renderer="Leaf.formatMoney" align="right"
width="80"/>
<a:column name="attribute_23" prompt="摘要" width="80"/>
<a:column name="collection_classes_desc" prompt="款项分类" editor="grid_cb"/>
<a:column name="attribute_24" prompt="附言" width="80"/>
</a:columns>
<a:editors>
<a:textArea id="textArea_e" height="50" width="240"/>
<a:comboBox id="grid_cb"/>
<a:lov id="grid_lov"/>
</a:editors>
</a:grid>
</a:form>
......
......@@ -6,10 +6,27 @@
$Purpose: excel导入收款
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure/>
<a:init-procedure>
<a:model-query defaultWhereClause="t1.code = &apos;CSH_TRX_IMPORT_TEMPLATE&apos;" model="sys.SYS120.hls_attachment_module" rootPath="template_path"/>
</a:init-procedure>
<a:view>
<a:link id="downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[
function downloadFile() {
new Leaf.Window({
url: $('downloadFile_id').getUrl(),
title: '${l:HLS.SUPPORTING_DOCUMENT}',
params: {
'table_name': 'HLS_ATTACHMENT_MODULE',
'header_id': '${/model/template_path/record/@attachment_module_id}'
},
width: 850,
height: 400
});
}
function saveClick() {
......@@ -65,10 +82,10 @@
<a:label name="label6" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="TMPLT_IMPORT_FILE" width="400">
<form name="upload" id="importForm" action="modules/prj/PRJ501N/prj_lease_item_trans_upload.lview?session_id=${/parameter/@session_id}&amp;project_id=${/parameter/@project_id}&amp;parent_ds_id=${/parameter/@parent_ds_id}&amp;type=${/parameter/@type}&amp;_csrf=${/session/@_csrf.token}" enctype="multipart/form-data" method="post" target="_input_window">
<form name="upload" id="importForm" enctype="multipart/form-data" method="post" target="_input_window">
<label style="margin-left:10px;margin-top:10px;font-size:13px"><![CDATA[${l:PLEASE_SELECT_A_FILE}]]></label>
<input name="CONTENT" id="importFile" style="font-size:15px" type="file"/>
<!-- <input onclick="downloadFile()" style="margin-left:10px;margin-top:10px;width:60px;height:23px" type="button" value="模板下载"/> -->
<input onclick="downloadFile()" style="margin-left:10px;margin-top:10px;width:60px;height:23px" type="button" value="模板下载"/>
<input onclick="saveClick()" style="margin-left:25px;margin-top:10px;width:60px;height:23px" type="button" value="${l:TMPLT_IMPORT}"/>
</form>
</a:fieldSet>
......
......@@ -7,54 +7,60 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.fnd_financial_option" rootPath="fnd_financial_option_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type"
rootPath="default_exchange_rate_type_path"/>
</a:init-procedure>
<a:view>
<a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_receipt_import_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/>
<a:link id="csh_receipt_import_link"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate"
modelaction="query"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[
var transaction_id='';
var transaction_id = '';
//附件上传
function upload_attachment_win() {
console.log(transaction_id)
var flag=true;
if(transaction_id==''){
$L.showInfoMessage("提示",'请先保存数据',null,null);
flag=false;
var flag = true;
if (transaction_id == '') {
$L.showInfoMessage("提示", '请先保存数据', null, null);
flag = false;
return;
}
//防止并发
if(flag){
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'csh_transaction',
header_id: transaction_id
},
width: 900,
hight: 400
}).on('close', function() {
//record.ds.query();
});
}
if (flag) {
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'csh_transaction',
header_id: transaction_id
},
width: 900,
hight: 400
}).on('close', function () {
//record.ds.query();
});
}
}
<!--增加重置功能-->
function csh511_receipt_reset(){
function csh511_receipt_reset() {
$('csh_transaction_receipt_head_ds').reset();
}
function csh511_receipt_import_and_write_off() {
new Leaf.Window({
url: $('csh_receipt_import_link').getUrl(),
......@@ -110,6 +116,7 @@
// window.location.href = $('csh_transaction_receipt_id').getUrl();
$('csh511_receipt_save').enable();
Leaf.Masker.unmask(Ext.getBody());
$('csh_trx_receipt_win_id').close();
},
failure: function () {
$('csh511_receipt_save').enable();
......@@ -121,7 +128,7 @@
},
scope: this
});
}else{
} else {
$('csh511_receipt_save').enable();
}
}
......@@ -169,7 +176,7 @@
record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
// record.getField('exchange_rate_type_display').setRequired(true);
// record.getField('exchange_rate_type_display').setRequired(true);
record.getField('exchange_rate_type_display').setReadOnly(false);
}
} else if (name == 'rate_method_code' || name == 'period_name') {
......@@ -220,6 +227,31 @@
if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
} else if (name == 'collection_classes') {
if (value == 'DEPOSIT') {
record.set('paid_byother_flag', 'F');
record.set('paid_byother_flag_n', '否');
record.set('transaction_type', 'DEPOSIT');
record.set('deposit_flag', 'Y');
record.getField('paid_byother_flag_n').setReadOnly(true);
} else {
record.getField('paid_byother_flag_n').setReadOnly(false);
}
} else if (name == 'paid_byother_flag') {
if (value == 'T') {
//代付非保证金类 --> 直接从银行过账到预收科目
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'ADVANCE_RECEIPT');
}
} else if (value == 'F') {
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'RECEIPT');
}
}
}
}
......@@ -347,17 +379,18 @@
]]></script>
<a:dataSets>
<a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
<!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>-->
<!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>-->
<!--<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>-->
<a:dataSet id="exchangerate_type_ds">
<a:datas dataSource="/model/exchangerate_type_path"/>
</a:dataSet>
<!-- <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true" model="csh.CSH511.csh_transaction">
<!-- <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true"
model="csh.CSH511.csh_transaction">
<a:fields>
<a:field name="transaction_date" required="true"/>
<a:field name="bank_slip_num" required="true"/>
......@@ -368,15 +401,18 @@
</a:field>-->
<!--<a:field name="internal_period_num"/>-->
<!--<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>-->
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true" required="true" returnField="currency_code" valueField="currency_code">
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true"
required="true" returnField="currency_code" valueField="currency_code">
<a:mapping>
<a:map from="precision" to="precision"/>
</a:mapping>
</a:field>
<a:field name="currency_code"/>
<a:field name="precision"/>
<a:field name="functional_currency_code" defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:field name="functional_currency_code"
defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
......@@ -396,7 +432,8 @@
</a:field> -->
<a:field name="bp_category_display" readOnly="true"/>
<a:field name="transaction_num" readOnly="true"/>
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds" readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds"
readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:mapping>
<a:map from="type_code" to="exchange_rate_type"/>
<a:map from="rate_method_code" to="rate_method_code"/>
......@@ -407,7 +444,9 @@
<a:field name="rate_method_code"/>
<a:field name="transaction_amount" required="true"/>
<a:field name="transaction_functional_amount" readOnly="true"/>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
......@@ -423,7 +462,9 @@
</a:mapping>
</a:field>
<a:field name="zero_amounts_allowed"/>
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y" lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y"
lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_id" to="bp_bank_account_id"/>
<a:map from="bank_account_num" to="bp_bank_account_num"/>
......@@ -440,7 +481,8 @@
<a:map from="contract_id" to="ref_contract_id"/>
</a:mapping>
</a:field> -->
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530"
lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
......@@ -453,8 +495,11 @@
</a:field>
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value" required="true"/>
<a:field name="collection_classes" required="true"/>
<a:field name="collection_classes_desc" required="true" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag"
displayField="code_value_name" valueField="code_value" required="true"/>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/>
......@@ -508,56 +553,68 @@
<!--</a:box>-->
<!--</a:form>-->
<!--#删除表格头,添加fieldSet-->
<!-- <a:form title="收款信息" width="1200">-->
<!-- <a:form title="收款信息" width="1200">-->
<a:fieldSet title="CSH511.CSH_TRANSACTION.MANUAL_ADD">
<a:box column="3">
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>
<!-- # 新增现金流字段,代付,商业伙伴,摘要字段-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" required="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds" required="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH511.CSH_TRANSACTION.CLASS_DESC"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true"
allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>
<!-- # 新增现金流字段,代付,商业伙伴,摘要字段-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" required="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds"
required="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH511.CSH_TRANSACTION.CLASS_DESC"/>
</a:box>
<a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
<!--#添加备注字段-->
<a:hBox style="width:800px">
<a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
&lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
</a:box>-->
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
&lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
</a:box>-->
<!--删除下面的两个box-->
<!-- <a:box column="4">
<a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
</a:box>
<a:box column="4">
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
<a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
<a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
</a:box>-->
<!-- </a:form>-->
<!--添加两方的账户信息和附件-->
<!--删除下面的两个box-->
<!-- <a:box column="4">
<a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
</a:box>
<a:box column="4">
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
<a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
<a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
</a:box>-->
<!-- </a:form>-->
<!--添加两方的账户信息和附件-->
<a:fieldSet title="CSH511.CSH_TRANSACTION.BANK_INFO">
<a:box column="3" labelWidth="100">
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<!--对方账户-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
</a:box>
</a:fieldSet>
<a:fieldSet title="CSH511.CSH_TRANSACTION.ATTACHMENT">
......@@ -568,13 +625,13 @@
</a:fieldSet>
<!-- <a:form title="对方账户信息" width="1200">
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
</a:box>
</a:form>-->
<!-- <a:form title="对方账户信息" width="1200">
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
</a:box>
</a:form>-->
</a:screenBody>
......
......@@ -335,12 +335,17 @@
var ds = $('csh531n_sap_bankflow_info_result_ds');
var record = ds.findById(id);
var bp_category = record.get('bp_category');
var transaction_type = record.get('transaction_type');
var depositDisplayFlag = 'N';
var advanceDisplayFlag = 'N';
if (bp_category == 'AGENT') {
depositDisplayFlag = 'Y';
}
if (transaction_type != 'ADVANCE_RECEIPT'){
advanceDisplayFlag = 'Y';
}
var win = new Leaf.Window({
id: 'csh_write_off_upload_window',
id: 'csh_write_off_window',
params: {
transaction_id: record.get('transaction_id'),
depositDisplayFlag: depositDisplayFlag,
......@@ -352,8 +357,9 @@
bp_bank_account_num: record.get('bp_bank_account_num'),
bp_bank_account_name: record.get('bp_bank_account_name'),
bp_id: record.get('bp_id'),
advanceDisplayFlag: advanceDisplayFlag,
readOnly: readOnly,
winid: 'csh_write_off_upload_window'
winid: 'csh_write_off_window'
},
url: $('batch_detail_link').getUrl(),
title: '明细',
......@@ -367,11 +373,11 @@
function csh531n_detail_renderer(value, record, name) {
var text = '';
var status = record.get('status');
var status = record.get('confirmed_flag');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
if ((status == 'NEW' || status == 'RETURN') && write_off_flag != 'FULL') {
readOnly = 'N';
var readOnly = 'N';
if ((status == 'WF_APPROVING' || status == 'WF_APPROVED') && write_off_flag != 'FULL') {
readOnly = 'Y';
}
if (name == 'csh531n_detail') {
return '<a href="Javascript:csh531n_open_write_off_detail(' + record.id + ',\'' + readOnly + '\')">明细</a>';
......@@ -394,7 +400,8 @@
function seedetail_write_off(value, record, name) {
var return_value = value || 0;
return '<a href="javascript:openWindow_writeoff(' + record.id + ');">' + Leaf.formatMoney(return_value) + '</a>';
// return '<a href="javascript:openWindow_writeoff(' + record.id + ');">' + Leaf.formatMoney(return_value) + '</a>';
return '<a href="javascript:openWindow_writeoff(' + record.id + ');">明细</a>';
}
......@@ -545,7 +552,7 @@
<a:screenTitle/>
<a:gridButton click="csh531_query" text="HLS.QUERY"/>
<a:gridButton click="csh531_new_write_off" text="新增核销"/>
<a:gridButton click="csh531_new_reverse_write_off" text="新增反冲"/>
<!-- <a:gridButton click="csh531_new_reverse_write_off" text="新增反冲"/>-->
<a:gridButton click="csh531_reset" text="重置"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" style="background:#f7f7f8" labelWidth="250">
......@@ -579,14 +586,15 @@
<!-- bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="对方账户账号"/>-->
<!-- </a:box>-->
<a:box column="4">
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="现金事务编号"/>
<a:lov name="bp_name"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="商业伙伴"/>
<!-- <a:comboBox name="status" bindTarget="csh_transaction_receipt_write_off_query_ds"-->
<!-- prompt="单据状态"/>-->
<a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_write_off_query_ds"
prompt="核销状态"/>
<a:comboBox name="collection_classes_desc"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="款项用途"/>
<!-- <a:comboBox name="collection_classes_desc"-->
<!-- bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="款项用途"/>-->
</a:box>
</a:fieldSet>
</a:form>
......@@ -602,8 +610,8 @@
<!-- <a:button click="csh531_data_confirm" text="审阅"/>-->
<!-- </a:toolBar>-->
<a:columns>
<a:column name="transaction_num" prompt="现金事务编号" lock="true" align="left"
renderer="csh531n_detail_renderer" width="220"/>
<a:column name="transaction_num" prompt="现金事务编号" lock="true" align="center"
renderer="csh531n_detail_renderer" width="120"/>
<a:column name="transaction_type_desc" prompt="现金事务类型" lock="true" align="center" width="120"/>
<a:column name="receipt_type_desc" prompt="收款类型" align="center" lock="true" width="120"/>
<!--<a:column name="bank_name" prompt="银行名称"/>-->
......@@ -611,13 +619,14 @@
<!-- <a:column name="bank_slip_num" prompt="银行流水号"/>-->
<!-- <a:column name="bank_account_num" prompt="收款账号"/>-->
<a:column name="transaction_amount" align="right" lock="true" footerRenderer="summary_Renderer"
renderer="Leaf.formatMoney" prompt="收款金额" width="180"/>
renderer="Leaf.formatMoney" prompt="收款金额" width="120"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" align="center" lock="true"
prompt="收款日期" width="120"/>
<a:column name="collection_classes_desc" prompt="款项用途" lock="true" align="center"/>
<a:column name="description" prompt="摘要" width="180"/>
<!-- <a:column name="collection_classes_desc" prompt="款项用途" lock="true" align="center"/>-->
<a:column name="bp_name" prompt="商业伙伴" align="left" width="200"/>
<a:column name="csh531n_detail" renderer="csh531n_detail_renderer" prompt="核销明细" align="center"
width="80"/>
<!-- <a:column name="csh531n_detail" renderer="csh531n_detail_renderer" prompt="核销明细" align="center" width="80"/>-->
<a:column name="csh531n_detail" renderer="seedetail_write_off" prompt="核销明细" align="center" width="80"/>
<!-- <a:column name="bp_bank_account_name" prompt="对方账户"/>-->
<!-- <a:column name="bp_bank_account_num" prompt="对方账号"/>-->
<!-- <a:column name="description_p" prompt="摘要+用途"/>-->
......@@ -629,6 +638,7 @@
<!-- renderer="Leaf.formatMoney" prompt="未分配金额"/>-->
<!-- <a:column name="status_desc" prompt="单据状态" width="120" align="center"/>-->
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据状态" width="120" align="center"/>
<!-- <a:column name="review_status_desc" prompt="分配状态" width="80"/>-->
<!-- <a:column name="ref_v05" prompt="备注" width="100"/>-->
<a:column name="created_user_name" prompt="制单人" width="120" align="center"/>
......
......@@ -6,6 +6,7 @@
</a:init-procedure>
<a:view>
<a:link id="csh531n_csh_confirm_data_link" model="csh.CSH531N.csh_data_confirm" modelaction="update"/>
<a:link id="csh531n_submit_link_id" model="csh.CSH531N.csh_data_confirm" modelaction="execute"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="transaction_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
......@@ -24,11 +25,14 @@
}
function init() {
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
if ('${/parameter/@depositDisplayFlag}' == 'Y') {
document.getElementById('write_off_deposit').style.display = 'block';
}
if ('${/parameter/@advanceDisplayFlag}' == 'Y') {
document.getElementById('write_off_advance').style.display = 'block';
}
if ('${/parameter/@readOnly}' == 'Y') {
$('csh_grid_add_bt').setVisible(false);
$('csh_grid_delete_bt').setVisible(false);
......@@ -42,12 +46,13 @@
$('csh_write_off_grid').hideColumn('unreceived_amount');
$('csh_write_off_interface_ds').setQueryUrl('${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off/query?transaction_id=${/parameter/@transaction_id}');
$('csh_write_off_interface_ds').query();
if (record) {
record.getField('ref_v05').setReadOnly(true);
}
} else {
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
} else {
$('csh531n_write_off_submit_btn_id').setVisible(true);
}
$('csh511_save_all_id').setVisible(true);
$('csh531n_write_off_btn_id').setVisible(true);
}
}
......@@ -86,7 +91,15 @@
return 'csh_write_off_grid_nf';
}
if (name == 'write_off_date' || name == 'journal_date') {
return 'csh_write_off_grid_dp';
if(write_off_type == 'RECEIPT_CREDIT'){
return 'csh_write_off_grid_dp';
}
if(write_off_type == 'RECEIPT_ADVANCE_RECEIPT'){
return 'csh_transaction_advanced_grid_dp';
}
if(write_off_type == 'RECEIPT_DEPOSIT_POOL'){
return 'csh_transaction_deposit_grid_dp';
}
}
if (name == 'agent_id_desc') {
if (write_off_type == 'DEPOSIT_POOL_CREDIT') {
......@@ -281,7 +294,7 @@
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
var allRs = [...interfaceRs,...depositRs,...advancedRs];
var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
for (var i = 0; i < allRs.length; i++) {
if (allRs[i].dirty) {
......@@ -376,7 +389,7 @@
// record = ds.getCurrentRecord();
// var header_id = record.get('transaction_id');
var header_id = '${/parameter/@transaction_id}';
var url = $('transaction_downFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
var url = $('transaction_downloadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
......@@ -384,11 +397,11 @@
width: 850,
height: 400
});
win.on('close', function () {
window.location.href = $('csh_transaction_receipt_id').getUrl();
// var url = $('csh_transaction_receipt_id').getUrl();
// Leaf.go(url);
});
// win.on('close', function () {
// window.location.href = $('csh_transaction_receipt_id').getUrl();
// // var url = $('csh_transaction_receipt_id').getUrl();
// // Leaf.go(url);
// });
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
return;
......@@ -460,6 +473,7 @@
return true;
}
function csh_deposit_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
......@@ -481,10 +495,10 @@
var current_deposit_r = deposit_ds.getAt(0);
var current_advance_r = advanced_ds.getAt(0);
if(r.get('exists_deposit_flag') == 'Y' && current_deposit_r){
if (r.get('exists_deposit_flag') == 'Y' && current_deposit_r) {
return;
}
if(r.get('exists_advance_flag') == 'Y' && current_advance_r){
if (r.get('exists_advance_flag') == 'Y' && current_advance_r) {
return;
}
return 'csh_transaction_advanced_grid_nf';
......@@ -492,6 +506,64 @@
}
}
function csh531n_write_off_submit() {
var returning_amount = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount') || 0;
if (returning_amount > 0) {
Leaf.showInfoMessage("提示", "该收款单存在审批中的退款流程,无法进行提交操作!");
}
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
debugger;
var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
var sum = 0;
for (var i = 0; i < allRs.length; i++) {
if (allRs[i].dirty) {
Leaf.showInfoMessage("提示", "存在未保存数据,请先保存再进行提交操作!");
return;
}
sum += allRs[i].get('write_off_amount') || 0;
}
if (sum == 0) {
Leaf.showInfoMessage('提示', '请先分配核销金额再进行提交操作');
return;
}
Leaf.showConfirm('提示', '确认提交复核吗', function () {
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
$('csh531n_write_off_submit_btn_id').disable();
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh531n_submit_link_id').getUrl(),
para: {
transaction_id: record.get('transaction_id')
},
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
$('${/parameter/@winid}').close();
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_write_off_submit_btn_id').enable();
},
scope: this
});
});
}
]]></script>
<a:dataSets>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
......@@ -609,7 +681,7 @@
<a:field name="write_off_type" defaultValue="RECEIPT_DEPOSIT_POOL"/>
<a:field name="company_id" defaultValue="${/session/@company_id}"/>
<a:field name="write_off_amount"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true" readOnly="true"
<a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/parameter/@transaction_date}"/>
</a:fields>
</a:dataSet>
......@@ -633,7 +705,7 @@
<a:field name="write_off_type" defaultValue="RECEIPT_ADVANCE_RECEIPT"/>
<a:field name="company_id" defaultValue="${/session/@company_id}"/>
<a:field name="write_off_amount"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true" readOnly="true"
<a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/parameter/@transaction_date}"/>
</a:fields>
</a:dataSet>
......@@ -643,7 +715,9 @@
<a:gridButton id="csh511_save_all_id" click="csh511_save_all" style="margin-left:20px;display:none"
text="暂存"/>
<a:gridButton id="csh531n_write_off_btn_id" click="csh531n_write_off"
style="margin-left:10px;display:none" text="核销"/>
style="margin-left:10px;display:none" text="确认核销"/>
<a:gridButton id="csh531n_write_off_submit_btn_id" click="csh531n_write_off_submit"
style="margin-left:10px;display:none" text="提交复核"/>
</a:screenTopToolbar>
<a:form style="margin-left:20px;">
<a:fieldSet labelWidth="250" title="收款单详情">
......@@ -796,7 +870,7 @@
renderer="Leaf.formatMoney"
width="120"/>
<a:column name="write_off_date"
prompt="核销日期"
prompt="核销日期" editorFunction="csh_edit_function"
renderer="Leaf.formatDate" width="80"/>
<!--<a:column name="agent_id_desc" editorFunction="csh_edit_function" prompt="代理商"/>-->
</a:columns>
......@@ -827,7 +901,7 @@
align="right"
footerRenderer="summaryRenderer"/>
<a:column name="write_off_date" prompt="核销日期" width="180" align="center"
renderer="Leaf.formatDate" editor="csh_transaction_deposit_grid_dp"/>
renderer="Leaf.formatDate" editorFunction="csh_edit_function"/>
</a:columns>
<a:editors>
<a:lov id="csh_transaction_deposit_grid_lv"/>
......@@ -836,7 +910,7 @@
</a:editors>
</a:grid>
</a:tab>
<a:tab id="write_off_advance" prompt="核销为预收款" width="150">
<a:tab id="write_off_advance" tabStyle="display:none" prompt="核销为预收款" width="150">
<a:grid id="csh_transaction_advanced_grid" navBar="true"
bindTarget="csh_transaction_advanced_ds" height="370"
marginWidth="10">
......@@ -853,7 +927,7 @@
align="right"
footerRenderer="summaryRenderer"/>
<a:column name="write_off_date" prompt="核销日期" width="180" align="center"
renderer="Leaf.formatDate" editor="csh_transaction_advanced_grid_dp"/>
renderer="Leaf.formatDate" editorFunction="csh_edit_function"/>
</a:columns>
<a:editors>
<a:lov id="csh_transaction_advanced_grid_lv"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-12-3 上午11:18:39
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-12-3 上午11:18:39
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>
<!-- <a:model-query fetchAll="true" model="hls.HLS530.get_batch_id" rootPath="batch_id_path"/> -->
<a:model-query defaultWhereClause="t1.document_category = &apos;JE&apos;" fetchAll="true"
model="basic.hls_document_type_for_lov" queryOrderBy="document_type desc"
rootPath="hls_document_type_path"/>
<a:model-query defaultWhereClause="t1.document_category = &apos;JE&apos;" fetchAll="true" model="basic.hls_document_type_for_lov" queryOrderBy="document_type desc" rootPath="hls_document_type_path"/>
<a:model-query fetchAll="true" model="hls.HLS301.get_sbo_limit" rootPath="get_limit"/>
</a:init-procedure>
<a:view>
<a:link id="welcome_link_id" url="${/request/@context_path}/welcome.lview"/>
<a:link id="hls_journal_con_contract_update_link_id"
url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="hls_journal_con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_link" url="${/request/@context_path}/modules/hls/HLS530/hls_journal_check.lsc"/>
<a:link id="test_link" url="${/request/@context_path}/test.lsc"/>
<a:link id="export_jum_link" model="hls.HLS301.hls_journal_post_to_nc" modelaction="batch_update"/>
<a:link id="gh_nc_je_log_link" url="${/request/@context_path}/modules/nc/NC100/hls_nc_bp_log_query.lview"/>
<a:link id="hls_sap_transafer_link" model="sap.hls_sap_transfer" modelaction="batch_update"/>
<a:link id="hls_sap_send_link" model="sap.submit_process_accounts" modelaction="batch_update"/>
<a:link id="transfer_voucher_link"
url="${/request/@context_path}/modules/interface/INTERFACE_KINGDEE/kingdee_importvoucher_interface.lsc"/>
<a:link id="kingdee_interface_logs_id"
url="${/request/@context_path}/modules/hls/HLS530/kingdee_interface_logs.lview"/>
<a:link id="hls301_sap_eai_create_account_link"
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrAccount.lsc"/>
<a:link id="hls301_sap_eai_reverse_account_link"
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_ReAccount.lsc"/>
<script type="text/javascript"><![CDATA[
function render_line(record, rowIndex) {
if (record.get('kingdee_head_flag') == 'N' || record.get('kingdee_line_assist_flag') == 'N') {
return 'background-color:#FFC0CB';
}
<a:link id="hls301_send_data" url="${/request/@context_path}/modules/hls/HLS301/hls_journal_send.lsc"/>
<a:link id="hls301_send_data_splice_id" model="hls.HLS301.hls_journal_post_to_sbo" modelaction="update"/>
<a:link id="hls301_send_bp_to_sbo" model="hls.HLS301.hls_bp_post_to_sbo" modelaction="update"/>
<script><![CDATA[
function lock_current_window2(msg) {
Leaf.Masker.mask(Ext.getBody(), msg);
}
function lock_current_window() {
......@@ -47,19 +34,16 @@
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
//查询按钮
function hls301_journal_query() {
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls301_journal_reset() {
$('hls_journal_header_query').reset();
}
//退出按钮
function hls301_journal_exit() {
......@@ -72,9 +56,9 @@
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length; i < j; i++) {
j = config.length;i < j;i++) {
for (var m = 0,
n = pattern.length; m < n; m++) {
n = pattern.length;m < n;m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
......@@ -109,102 +93,19 @@
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_con_contract_update_link_id');
}
function hls_journal_post_kingdee() {
var url = $('transfer_voucher_link').getUrl();
if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else {
lock_current_window();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return;
}
var datas = [];
// var batch_id = ${/model/batch_id_path/record/@batch_id};
for (var i = 0; i < records.length; i++) {
//Check
if (records[i].get('kingdee_line_assist_flag') == 'N') {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '辅助账信息有误或缺失,请检查数据!');
return;
}
if (records[i].get('post_gl_status') == 'CLOSE') {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,请重新选择!');
return;
}
var obj = {};
obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
// obj['batch_id'] = batch_id;
datas[i] = obj;
}
Leaf.showConfirm('提示', '确定导入凭证到金蝶吗?', function () {
Leaf.request({
url: $('check_link').getUrl(),
para: datas,
success: function (res) {
Leaf.request({
url: url,
para: datas,
success: function (res) {
unlock_current_window();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
var kingdee_url = $('kingdee_interface_logs_id').getUrl() + '?batch_id=' + res.result.batch_id_path.record[0].batch_id;
var win = new Leaf.Window({
url: kingdee_url,
title: '金蝶导入日志',
id: 'kingdee_interface_logs_winid',
width: 850,
height: 400
});
win.on('close', function () {
hls301_journal_query();
});
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
}, function () {
unlock_current_window();
});
}
}
function export_jum(journal_header_id) {
Leaf.request({
url: $('export_jum_link').getUrl(),
para: {
journal_header_id: journal_header_id
},
success: function (res) {
success: function(res) {
$('hls_journal_header_result_ds').query();
},
failure: function () {
failure: function() {
f_hls.winNoMask();
},
error: function () {
error: function() {
f_hls.winNoMask();
},
scope: this
......@@ -216,14 +117,14 @@
Leaf.request({
url: $('export_jum_link').getUrl(),
para: datas,
success: function (res) {
success: function(res) {
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function () {
failure: function() {
unlock_current_window();
},
error: function () {
error: function() {
unlock_current_window();
},
scope: this
......@@ -238,7 +139,7 @@
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
for (var i = 0;i < records.length;i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
......@@ -279,7 +180,7 @@
}
function select_check_box(record) {
if (record.get('post_gl_status') == 'Y') {
if (record.get('post_gl_status') == 'Y' || record.get('post_gl_status') == 'PROCESSING') {
return false;
} else {
return true;
......@@ -294,7 +195,7 @@
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
for (var i = 0;i < records.length;i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
......@@ -304,17 +205,17 @@
Leaf.request({
url: $('hls_sap_transafer_link').getUrl(),
para: datas,
success: function (res) {
success: function(res) {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
Leaf.Masker.unmask(detail_mask);
},
failure: function () {
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
......@@ -329,7 +230,7 @@
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
for (var i = 0;i < records.length;i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
......@@ -339,7 +240,7 @@
Leaf.request({
url: $('hls_sap_send_link').getUrl(),
para: datas,
success: function (res) {
success: function(res) {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
......@@ -347,128 +248,131 @@
$('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
Leaf.Masker.unmask(detail_mask);
},
failure: function () {
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
function hls301_sap_post() {
var detail_mask = Ext.getBody();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
//手动传输凭证
function hls301_journal_send() {
var je_detail_count = 0;
var count = 0;
var batch_flag;
var records = $('hls_journal_header_result_ds').getSelected();
var limit = '${get_limit/record/@sbo_limit}';
if (isNaN(limit)){
Leaf.showMessage('${l:HLS.PROMPT}', '传输上限获取失败,请联系管理员!');
return;
}
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择至少一条数据');
return;
}
//非反冲凭证
var datas = [];
//反冲凭证
var re_datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('sap_belnr')) {
Leaf.showMessage('提示', '凭证 ' + records[i].get('journal_num') + ' 已传输SAP,请勿重复传输!');
for (var i = 0;i < records.length;i++) {
if (records[i].get('post_gl_status') == 'Y' || records[i].get('post_gl_status') == 'PROCESSING') {
Leaf.showMessage('${l:HLS.PROMPT}', '该凭证已传输至SBO系统');
return;
}
var obj = {};
var re_obj = {};
if (records[i].get('reversed_flag') == 'R' && records[i].get('reversed_19_flag') == 'Y') {
if (!records[i].get('re_sap_belnr')) {
Leaf.showMessage('提示', '请先传输反冲凭证 ' + records[i].get('journal_num') + ' 的原凭证 ' + records[i].get('re_journal_num'));
return;
}
re_obj['journal_header_id'] = records[i].get('journal_header_id');
re_obj['_status'] = 'update';
re_datas[i] = re_obj;
} else {
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
je_detail_count = Number(records[i].get('je_detail_count'));
count = je_detail_count + Number(count);
var data = {
journal_header_id: records[i].get('journal_header_id')
};
datas.push(data);
}
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('hls301_sap_eai_create_account_link').getUrl(),
para: datas,
success: function (res) {
if (re_datas.length > 0) {
Leaf.request({
url: $('hls301_sap_eai_reverse_account_link').getUrl(),
para: re_datas,
success: function (res) {
Leaf.SideBar.show({
msg: '传输成功!',
duration: 2000
});
$('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
Leaf.Masker.unmask(detail_mask);
//将按钮设置为不可选择
$('hls301_sap_post_id').disable()
var t1 = window.setInterval(buttonChange, 5000);
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
} else {
if (count > limit) {
batch_flag = 'Y';
} else {
batch_flag = 'N';
}
var queryParams = new Object();
queryParams['details'] = datas;
queryParams['batch_flag'] = batch_flag;
if (count > limit) {
Leaf.showConfirm('提示', '由于凭证行数超过'+limit+'行,传输至SBO后不能立即得到返回结果,您确定继续吗?', function() {
//lock_current_window();
lock_current_window2('正在传送,请勿离开当前界面。。。');
Leaf.request({
url: $('hls301_send_data').getUrl(),
para: queryParams,
success: function() {
Leaf.SideBar.show({
msg: '已提交请求',
duration: 3000
});
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
},
error: function() {
unlock_current_window();
},
scope: this
});
});
} else {
lock_current_window2('正在传送,请勿离开当前界面。。。');
Leaf.request({
url: $('hls301_send_data').getUrl(),
para: queryParams,
success: function() {
Leaf.SideBar.show({
msg: '传输成功!',
duration: 2000
msg: '已提交请求',
duration: 3000
});
$('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
Leaf.Masker.unmask(detail_mask);
}
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
},
error: function() {
unlock_current_window();
},
scope: this
});
}
}
function buttonChange() {
$('hls301_sap_post_id').enable();
window.clearInterval(t1);
function hls301_bp_send() {
Leaf.showConfirm('提示', '商业伙伴(项目已创建合同)同步至SBO,(上限400)您确定继续吗?', function() {
lock_current_window();
Leaf.request({
url: $('hls301_send_bp_to_sbo').getUrl(),
success: function() {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
//$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
},
error: function() {
unlock_current_window();
},
scope: this
});
});
}
function hls301_export(){
$('hls_journal_headers_grid')._export(null,'子系统凭证查询');
function hls_journal_header_result_func(record, name) {
if (name == 'post_gl_log') {
return 'hls_journal_headers_grid_textArea_id';
}
return '';
}
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
//异步打印
ds.setQueryParameter('__async__', 'Y');
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -480,22 +384,16 @@
<a:dataSet id="hls_journal_header_query">
<a:fields>
<a:field name="journal_num"/>
<a:field name="category_code_desc" displayField="description" options="hls_document_type_ds"
returnField="category_code" valueField="document_type"/>
<a:field name="post_sap_desc" displayField="code_value_name" options="hls301_yes_no_ds"
returnField="post_sap" valueField="code_value"/>
<a:field name="journal_date_from" datatype="date"
defaultValue="${/model/sys_default_time/record/@month_first_day}"/>
<a:field name="desc"/>
<a:field name="category_code_desc" displayField="description" options="hls_document_type_ds" returnField="category_code" valueField="document_type"/>
<a:field name="journal_date_from"/>
<a:field name="journal_date_to"/>
<a:field name="total_amount_dr_from"/>
<a:field name="total_amount_dr_to"/>
<a:field name="period_name"/>
<a:field name="external_journal_num"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_id_tenant_desc" lovGridHeight="350" lovHeight="550"
lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500">
<a:field name="bp_id_tenant_desc" lovGridHeight="350" lovHeight="550" lovService="hls.HLS301.hls_bp_master_v_for_lov" lovWidth="500">
<a:mapping>
<a:map from="bp_name" to="bp_id_tenant_desc"/>
<a:map from="bp_id" to="bp_id_tenant"/>
......@@ -504,85 +402,61 @@
<a:field name="source_table"/>
<a:field name="reference1"/>
<a:field name="je_transaction_code"/>
<a:field name="je_transaction_desc" lovGridHeight="420" lovHeight="550" lovPageSize="20"
lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="500">
<a:field name="je_transaction_desc" lovGridHeight="420" lovHeight="550" lovPageSize="20" lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="500">
<a:mapping>
<a:map from="je_transaction_code" to="je_transaction_code"/>
<a:map from="je_transaction_desc" to="je_transaction_desc"/>
</a:mapping>
</a:field>
<a:field name="post_gl_status"/>
<a:field name="post_gl_status_desc" displayField="code_value_name" options="post_gl_status_ds"
returnField="post_gl_status" valueField="code_value"/>
<a:field name="responsibility_center_name_from" lovHeight="500" lovLabelWidth="100"
lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550"
title="HLS.RESPONSIBILITY_CENTER_NAME">
<a:field name="post_gl_status_desc" displayField="code_value_name" options="post_gl_status_ds" returnField="post_gl_status" valueField="code_value"/>
<a:field name="responsibility_center_name_from" lovHeight="500" lovLabelWidth="100" lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550" title="HLS.RESPONSIBILITY_CENTER_NAME">
<a:mapping>
<a:map from="responsibility_center_id" to="responsibility_center_id"/>
<a:map from="responsibility_center_code" to="responsibility_center_code_from"/>
<a:map from="responsibility_center_name" to="responsibility_center_name_from"/>
</a:mapping>
</a:field>
<a:field name="responsibility_center_name_to" lovHeight="500" lovLabelWidth="100"
lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550"
title="HLS.RESPONSIBILITY_CENTER_NAME">
<a:field name="responsibility_center_name_to" lovHeight="500" lovLabelWidth="100" lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550" title="HLS.RESPONSIBILITY_CENTER_NAME">
<a:mapping>
<a:map from="responsibility_center_code" to="responsibility_center_code_to"/>
<a:map from="responsibility_center_name" to="responsibility_center_name_to"/>
</a:mapping>
</a:field>
<a:field name="account_code_from" autoComplete="true" lovHeight="500" lovLabelWidth="100"
lovService="hls.HLS301.hls_journal_account_for_lov" lovWidth="500"
title="HLS530.ACCOUNT_NAME">
<a:field name="account_code_from" autoComplete="true" lovHeight="500" lovLabelWidth="100" lovService="hls.HLS301.hls_journal_account_for_lov" lovWidth="500" title="HLS530.ACCOUNT_NAME">
<a:mapping>
<a:map from="account_code" to="account_code_from"/>
<a:map from="description" to="account_name_from"/>
</a:mapping>
</a:field>
<a:field name="account_code_to" autoComplete="true" lovHeight="600" lovLabelWidth="100"
lovUrl="${/request/@context_path}/modules/hls/HLS530/gld_company_account_tree.lview"
lovWidth="550" title="HLS530.ACCOUNT_NAME">
<a:field name="account_code_to" autoComplete="true" lovHeight="600" lovLabelWidth="100" lovUrl="${/request/@context_path}/modules/hls/HLS530/gld_company_account_tree.lview" lovWidth="550" title="HLS530.ACCOUNT_NAME">
<a:mapping>
<a:map from="account_code" to="account_code_to"/>
<a:map from="description" to="account_name_to"/>
</a:mapping>
</a:field>
<a:field name="company_short_name" lovHeight="500" lovLabelWidth="100"
lovService="fnd.fnd_companies_lov" lovWidth="550" title="HLS530.JOURNAL_COMPANY">
<a:field name="company_short_name" lovHeight="500" lovLabelWidth="100" lovService="fnd.fnd_companies_lov" lovWidth="550" title="HLS530.JOURNAL_COMPANY">
<a:mapping>
<a:map from="company_id" to="je_company_id"/>
<a:map from="company_short_name" to="company_short_name"/>
</a:mapping>
</a:field>
<a:field name="currency_code" lovHeight="500" lovLabelWidth="100"
lovService="basic.gld_currency_v_lov" lovWidth="550">
<a:field name="currency_code" lovHeight="500" lovLabelWidth="100" lovService="basic.gld_currency_v_lov" lovWidth="550">
<a:mapping>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
</a:mapping>
</a:field>
<a:field name="created_by_n" autoComplete="true" lovGridHeight="300" lovHeight="450"
lovService="basic.sys_user_for_lov" lovWidth="500"
title="员工选择">
<a:mapping>
<a:map from="description" to="created_by_n"/>
<a:map from="user_id" to="created_by"/>
</a:mapping>
</a:field>
<a:field name="contract_number"/>
<a:field name="external_journal_num"/>
<a:field name="merge_parent_flag_desc" defaultValue="否" displayField="code_value_name"
options="hls301_yes_no_ds" returnField="merge_parent_flag" valueField="code_value"/>
<a:field name="merge_parent_flag_desc" defaultValue="否" displayField="code_value_name" options="hls301_yes_no_ds" returnField="merge_parent_flag" valueField="code_value"/>
<a:field name="merge_parent_flag" defaultValue="N"/>
<a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_para_journalQueryDs"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="false"
model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query"
selectFunction="select_check_box" selectable="true">
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query" selectFunction="select_check_box" selectable="true">
<a:events>
<a:event name="query" handler="on_loan_journal_header_query"/>
</a:events>
......@@ -591,72 +465,65 @@
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/> -->
<a:toolbarButton id="hls301_journal_query_id" click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/>
<a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/>
<!--<a:toolbarButton id="hls301_journal_post_ref_id" click="hls_journal_post_kingdee" text="凭证传输"/>-->
<a:toolbarButton click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_send" text="凭证传输"/>
<a:toolbarButton click="hls301_bp_send" text="商业伙伴传输"/>
<!--<a:toolbarButton click="hls301_journal_import" text="批量导入"/>
<a:toolbarButton click="hls301_sap_transafer" text="转换为SAP凭证"/>
<a:toolbarButton click="hls301_sap_send" text="发送SAP凭证"/> -->
<a:toolbarButton id="hls301_sap_post_id" click="hls301_sap_post" text="传输SAP"/>
</a:screenTopToolbar>
<a:form column="4" labelSeparator=" " labelWidth="100" marginWidth="80" title="HAP_QUERY_TITLE">
<a:form column="4" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/>
<a:lov name="account_code_to" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_TO"/> -->
<a:comboBox name="merge_parent_flag_desc" bindTarget="hls_journal_header_query" prompt="合并凭证"/>
<a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/>
<!-- <a:lov name="responsibility_center_name_from" bindTarget="hls_journal_header_query" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_FROM"/> -->
<!-- <a:lov name="responsibility_center_name_to" bindTarget="hls_journal_header_query" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_TO"/> -->
<!-- <a:lov name="company_short_name" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_COMPANY"/> -->
<a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query"
prompt="HLS530.JOURNAL_DATE_FROM"/>
<a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query"
prompt="HLS530.JOURNAL_DATE_TO"/>
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query"
prompt="HLS530.TOTAL_AMOUNT_DR_FROM"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query"
prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
<a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_DATE_FROM"/>
<a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_DATE_TO"/>
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query" prompt="HLS530.TOTAL_AMOUNT_DR_FROM"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
<!-- <a:textField name="project_name" bindTarget="hls_journal_header_query" prompt="HLS.PROJECT_NAME"/> -->
<a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/>
<!-- <a:lov name="currency_code" bindTarget="hls_journal_header_query" prompt="HLS.CURRENCY"/> -->
<a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="HLS.TENANT_CODE"/>
<a:comboBox name="post_sap_desc" bindTarget="hls_journal_header_query" prompt="是否传递sap"/>
<!--<a:comboBox name="post_gl_status_desc" bindTarget="hls_journal_header_query" prompt="HLS530.IS_POSTED"/>-->
<a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="商业伙伴"/>
<a:comboBox name="post_gl_status_desc" bindTarget="hls_journal_header_query" prompt="HLS530.IS_POSTED"/>
<!-- <a:textField name="external_journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.EXTERNAL_JOURNAL_NUM"/> -->
<!-- <a:textField name="reference1" bindTarget="hls_journal_header_query" prompt="HLS530.REFERENCE1"/> -->
<!--<a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/>-->
<a:textField name="description" bindTarget="hls_journal_header_query"
prompt="HLS530.JOURNAL_DESCRIPTION"/>
<a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/>
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_NUM"/>
<a:textField name="sap_belnr" bindTarget="hls_journal_header_query" prompt="SAP凭证号"/>
<a:lov name="created_by_n" bindTarget="hls_journal_header_query" prompt="制证人"/>
<a:textField name="sbo_num" bindTarget="hls_journal_header_query" prompt="SBO凭证号"/>
<a:textField name="sbo_req_number" bindTarget="hls_journal_header_query" prompt="SBO请求批次号"/>
<a:textField name="desc" bindTarget="hls_journal_header_query" prompt="凭证摘要"/>
</a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="280"
marginWidth="80" navBar="true">
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true">
<a:toolBar>
<a:button click="hls301_export" text="导出"/>
<a:button type="excel"/>
</a:toolBar>
<a:columns>
<a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM"
renderer="hls301_journal_num_render" width="120"/>
<!--<a:column name="external_journal_num" align="center" prompt="金蝶凭证号" width="130"/>-->
<a:column name="sap_belnr" align="center" prompt="SAP凭证号" width="110"/>
<a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/>
<a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM" renderer="hls301_journal_num_render" width="120"/>
<a:column name="sbo_num" align="center" prompt="SBO凭证号" width="130"/>
<a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="80"/>
<a:column name="period_name" align="center" prompt="HLS530.PERIOD_NAME" width="80"/>
<a:column name="journal_date" align="center" prompt="HLS530.JOURNAL_DATE" renderer="Leaf.formatDate"
width="90"/>
<a:column name="journal_date" align="center" prompt="HLS530.JOURNAL_DATE" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="total_amount_dr" align="right" prompt="HLS530.TOTAL_AMOUNT_DR" renderer="Leaf.formatMoney" width="120"/>-->
<a:column name="currency_desc" align="center" prompt="HLS.CURRENCY" width="80"/>
<a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney"
width="120"/>
<a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/>
<a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/>
<a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/>
<a:column name="created_by_n" prompt="制证人"/>
<a:column name="re_meg" prompt="凭证回传信息" width="300"/>
<a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="80"/>
<a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="130"/>
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<a:column name="post_gl_log" editorFunction="hls_journal_header_result_func" prompt="传输信息" width="150"/>
<a:column name="sbo_req_number" align="center" prompt="SBO请求批次号" width="130"/>
<!-- <a:column name="export" prompt="导入" width="50" align="center" renderer="hls301_journal_num_render"/> -->
<!-- <a:column name="nc_log" align="center" prompt="NC导入日志" renderer="hls301_journal_num_render" width="70"/> -->
</a:columns>
<a:editors>
<a:textArea id="hls_journal_headers_grid_textArea_id" readOnly="true"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-12-3 上午11:18:39
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>
<!-- <a:model-query fetchAll="true" model="hls.HLS530.get_batch_id" rootPath="batch_id_path"/> -->
<a:model-query defaultWhereClause="t1.document_category = &apos;JE&apos;" fetchAll="true"
model="basic.hls_document_type_for_lov" queryOrderBy="document_type desc"
rootPath="hls_document_type_path"/>
</a:init-procedure>
<a:view>
<a:link id="welcome_link_id" url="${/request/@context_path}/welcome.lview"/>
<a:link id="hls_journal_con_contract_update_link_id"
url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="check_link" url="${/request/@context_path}/modules/hls/HLS530/hls_journal_check.lsc"/>
<a:link id="test_link" url="${/request/@context_path}/test.lsc"/>
<a:link id="export_jum_link" model="hls.HLS301.hls_journal_post_to_nc" modelaction="batch_update"/>
<a:link id="gh_nc_je_log_link" url="${/request/@context_path}/modules/nc/NC100/hls_nc_bp_log_query.lview"/>
<a:link id="hls_sap_transafer_link" model="sap.hls_sap_transfer" modelaction="batch_update"/>
<a:link id="hls_sap_send_link" model="sap.submit_process_accounts" modelaction="batch_update"/>
<a:link id="transfer_voucher_link"
url="${/request/@context_path}/modules/interface/INTERFACE_KINGDEE/kingdee_importvoucher_interface.lsc"/>
<a:link id="kingdee_interface_logs_id"
url="${/request/@context_path}/modules/hls/HLS530/kingdee_interface_logs.lview"/>
<a:link id="hls301_sap_eai_create_account_link"
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrAccount.lsc"/>
<a:link id="hls301_sap_eai_reverse_account_link"
url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_ReAccount.lsc"/>
<script type="text/javascript"><![CDATA[
function render_line(record, rowIndex) {
if (record.get('kingdee_head_flag') == 'N' || record.get('kingdee_line_assist_flag') == 'N') {
return 'background-color:#FFC0CB';
}
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
//查询按钮
function hls301_journal_query() {
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls301_journal_reset() {
$('hls_journal_header_query').reset();
}
//退出按钮
function hls301_journal_exit() {
location.href = $('welcome_link_id').getUrl();
parent.shMenu('show');
}
function construct_from_to() {
var config = ['responsibility_center_code', 'responsibility_center_name', 'account_code', 'account_name'];
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 onUpdate_para_journalQueryDs(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 hls301_link_dynamic(reocrd_id, journal_header_id) {
var maintain_type = 'READONLY';
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
var param = record.data;
param['function_code'] = 'HLS301';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_QUERY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_con_contract_update_link_id');
}
function hls_journal_post_kingdee() {
var url = $('transfer_voucher_link').getUrl();
if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else {
lock_current_window();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return;
}
var datas = [];
// var batch_id = ${/model/batch_id_path/record/@batch_id};
for (var i = 0; i < records.length; i++) {
//Check
if (records[i].get('kingdee_line_assist_flag') == 'N') {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '辅助账信息有误或缺失,请检查数据!');
return;
}
if (records[i].get('post_gl_status') == 'CLOSE') {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,请重新选择!');
return;
}
var obj = {};
obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
// obj['batch_id'] = batch_id;
datas[i] = obj;
}
Leaf.showConfirm('提示', '确定导入凭证到金蝶吗?', function () {
Leaf.request({
url: $('check_link').getUrl(),
para: datas,
success: function (res) {
Leaf.request({
url: url,
para: datas,
success: function (res) {
unlock_current_window();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
var kingdee_url = $('kingdee_interface_logs_id').getUrl() + '?batch_id=' + res.result.batch_id_path.record[0].batch_id;
var win = new Leaf.Window({
url: kingdee_url,
title: '金蝶导入日志',
id: 'kingdee_interface_logs_winid',
width: 850,
height: 400
});
win.on('close', function () {
hls301_journal_query();
});
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
}, function () {
unlock_current_window();
});
}
}
function export_jum(journal_header_id) {
Leaf.request({
url: $('export_jum_link').getUrl(),
para: {
journal_header_id: journal_header_id
},
success: function (res) {
$('hls_journal_header_result_ds').query();
},
failure: function () {
f_hls.winNoMask();
},
error: function () {
f_hls.winNoMask();
},
scope: this
});
}
function journal_import(datas) {
lock_current_window();
Leaf.request({
url: $('export_jum_link').getUrl(),
para: datas,
success: function (res) {
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
}
function hls301_journal_import() {
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
Leaf.showMessage('提示', '请选择一条数据进行操作!');
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'execute';
datas[i] = obj;
}
journal_import(datas);
}
function hls301_journal_num_render(value, record, name) {
if (name == 'journal_num') {
return '<a href="javascript:hls301_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
if (name == 'export') {
if (record.get('post_gl_status') != 'Y') {
return '<a href="javascript:export_jum(' + record.get('journal_header_id') + ');">' + '导入' + '</a>';
}
}
if (name == 'nc_log') {
if (record.get('result_id')) {
return '<a href="javascript:openLogPage(\'' + record.get('result_id') + '\')";>日志</a>';
}
}
}
function openLogPage(result_id) {
new Leaf.Window({
id: 'hls_nc_bp_log_window',
url: $('gh_nc_je_log_link').getUrl() + '?result_id=' + result_id,
title: '日志信息',
height: 450,
width: 700
});
}
function on_loan_journal_header_query(ds, qpara) {
qpara['gld_flag'] = 'N';
}
function select_check_box(record) {
if (record.get('post_gl_status') == 'Y') {
return false;
} else {
return true;
}
}
function hls301_sap_transafer() {
var detail_mask = Ext.getBody();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('hls_sap_transafer_link').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
Leaf.Masker.unmask(detail_mask);
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
function hls301_sap_send() {
var detail_mask = Ext.getBody();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('hls_sap_send_link').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
$('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
Leaf.Masker.unmask(detail_mask);
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
function hls301_sap_post() {
var detail_mask = Ext.getBody();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
unlock_current_window();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return;
}
//非反冲凭证
var datas = [];
//反冲凭证
var re_datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('sap_belnr')) {
Leaf.showMessage('提示', '凭证 ' + records[i].get('journal_num') + ' 已传输SAP,请勿重复传输!');
return;
}
var obj = {};
var re_obj = {};
if (records[i].get('reversed_flag') == 'R' && records[i].get('reversed_19_flag') == 'Y') {
if (!records[i].get('re_sap_belnr')) {
Leaf.showMessage('提示', '请先传输反冲凭证 ' + records[i].get('journal_num') + ' 的原凭证 ' + records[i].get('re_journal_num'));
return;
}
re_obj['journal_header_id'] = records[i].get('journal_header_id');
re_obj['_status'] = 'update';
re_datas[i] = re_obj;
} else {
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
}
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('hls301_sap_eai_create_account_link').getUrl(),
para: datas,
success: function (res) {
if (re_datas.length > 0) {
Leaf.request({
url: $('hls301_sap_eai_reverse_account_link').getUrl(),
para: re_datas,
success: function (res) {
Leaf.SideBar.show({
msg: '传输成功!',
duration: 2000
});
$('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
Leaf.Masker.unmask(detail_mask);
//将按钮设置为不可选择
$('hls301_sap_post_id').disable()
var t1 = window.setInterval(buttonChange, 5000);
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
} else {
Leaf.SideBar.show({
msg: '传输成功!',
duration: 2000
});
$('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
Leaf.Masker.unmask(detail_mask);
}
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
function buttonChange() {
$('hls301_sap_post_id').enable();
window.clearInterval(t1);
}
function hls301_export(){
$('hls_journal_headers_grid')._export(null,'子系统凭证查询');
}
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
//异步打印
ds.setQueryParameter('__async__', 'Y');
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="hls301_yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="hls_document_type_ds">
<a:datas dataSource="/model/hls_document_type_path"/>
</a:dataSet>
<a:dataSet id="post_gl_status_ds" lookupCode="SUBSYSTEM_POST_GL_FLAG"/>
<a:dataSet id="hls_journal_header_query">
<a:fields>
<a:field name="journal_num"/>
<a:field name="category_code_desc" displayField="description" options="hls_document_type_ds"
returnField="category_code" valueField="document_type"/>
<a:field name="post_sap_desc" displayField="code_value_name" options="hls301_yes_no_ds"
returnField="post_sap" valueField="code_value"/>
<a:field name="journal_date_from" datatype="date"
defaultValue="${/model/sys_default_time/record/@month_first_day}"/>
<a:field name="journal_date_to"/>
<a:field name="total_amount_dr_from"/>
<a:field name="total_amount_dr_to"/>
<a:field name="period_name"/>
<a:field name="external_journal_num"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_id_tenant_desc" lovGridHeight="350" lovHeight="550"
lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500">
<a:mapping>
<a:map from="bp_name" to="bp_id_tenant_desc"/>
<a:map from="bp_id" to="bp_id_tenant"/>
</a:mapping>
</a:field>
<a:field name="source_table"/>
<a:field name="reference1"/>
<a:field name="je_transaction_code"/>
<a:field name="je_transaction_desc" lovGridHeight="420" lovHeight="550" lovPageSize="20"
lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="500">
<a:mapping>
<a:map from="je_transaction_code" to="je_transaction_code"/>
<a:map from="je_transaction_desc" to="je_transaction_desc"/>
</a:mapping>
</a:field>
<a:field name="post_gl_status"/>
<a:field name="post_gl_status_desc" displayField="code_value_name" options="post_gl_status_ds"
returnField="post_gl_status" valueField="code_value"/>
<a:field name="responsibility_center_name_from" lovHeight="500" lovLabelWidth="100"
lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550"
title="HLS.RESPONSIBILITY_CENTER_NAME">
<a:mapping>
<a:map from="responsibility_center_id" to="responsibility_center_id"/>
<a:map from="responsibility_center_code" to="responsibility_center_code_from"/>
<a:map from="responsibility_center_name" to="responsibility_center_name_from"/>
</a:mapping>
</a:field>
<a:field name="responsibility_center_name_to" lovHeight="500" lovLabelWidth="100"
lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550"
title="HLS.RESPONSIBILITY_CENTER_NAME">
<a:mapping>
<a:map from="responsibility_center_code" to="responsibility_center_code_to"/>
<a:map from="responsibility_center_name" to="responsibility_center_name_to"/>
</a:mapping>
</a:field>
<a:field name="account_code_from" autoComplete="true" lovHeight="500" lovLabelWidth="100"
lovService="hls.HLS301.hls_journal_account_for_lov" lovWidth="500"
title="HLS530.ACCOUNT_NAME">
<a:mapping>
<a:map from="account_code" to="account_code_from"/>
<a:map from="description" to="account_name_from"/>
</a:mapping>
</a:field>
<a:field name="account_code_to" autoComplete="true" lovHeight="600" lovLabelWidth="100"
lovUrl="${/request/@context_path}/modules/hls/HLS530/gld_company_account_tree.lview"
lovWidth="550" title="HLS530.ACCOUNT_NAME">
<a:mapping>
<a:map from="account_code" to="account_code_to"/>
<a:map from="description" to="account_name_to"/>
</a:mapping>
</a:field>
<a:field name="company_short_name" lovHeight="500" lovLabelWidth="100"
lovService="fnd.fnd_companies_lov" lovWidth="550" title="HLS530.JOURNAL_COMPANY">
<a:mapping>
<a:map from="company_id" to="je_company_id"/>
<a:map from="company_short_name" to="company_short_name"/>
</a:mapping>
</a:field>
<a:field name="currency_code" lovHeight="500" lovLabelWidth="100"
lovService="basic.gld_currency_v_lov" lovWidth="550">
<a:mapping>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
</a:mapping>
</a:field>
<a:field name="created_by_n" autoComplete="true" lovGridHeight="300" lovHeight="450"
lovService="basic.sys_user_for_lov" lovWidth="500"
title="员工选择">
<a:mapping>
<a:map from="description" to="created_by_n"/>
<a:map from="user_id" to="created_by"/>
</a:mapping>
</a:field>
<a:field name="contract_number"/>
<a:field name="external_journal_num"/>
<a:field name="merge_parent_flag_desc" defaultValue="否" displayField="code_value_name"
options="hls301_yes_no_ds" returnField="merge_parent_flag" valueField="code_value"/>
<a:field name="merge_parent_flag" defaultValue="N"/>
<a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_para_journalQueryDs"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="false"
model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query"
selectFunction="select_check_box" selectable="true">
<a:events>
<a:event name="query" handler="on_loan_journal_header_query"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/> -->
<a:toolbarButton id="hls301_journal_query_id" click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/>
<!--<a:toolbarButton id="hls301_journal_post_ref_id" click="hls_journal_post_kingdee" text="凭证传输"/>-->
<!--<a:toolbarButton click="hls301_journal_import" text="批量导入"/>
<a:toolbarButton click="hls301_sap_transafer" text="转换为SAP凭证"/>
<a:toolbarButton click="hls301_sap_send" text="发送SAP凭证"/> -->
<a:toolbarButton id="hls301_sap_post_id" click="hls301_sap_post" text="传输SAP"/>
</a:screenTopToolbar>
<a:form column="4" labelSeparator=" " labelWidth="100" marginWidth="80" title="HAP_QUERY_TITLE">
<!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/>
<a:lov name="account_code_to" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_TO"/> -->
<a:comboBox name="merge_parent_flag_desc" bindTarget="hls_journal_header_query" prompt="合并凭证"/>
<a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/>
<!-- <a:lov name="responsibility_center_name_from" bindTarget="hls_journal_header_query" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_FROM"/> -->
<!-- <a:lov name="responsibility_center_name_to" bindTarget="hls_journal_header_query" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_TO"/> -->
<!-- <a:lov name="company_short_name" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_COMPANY"/> -->
<a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query"
prompt="HLS530.JOURNAL_DATE_FROM"/>
<a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query"
prompt="HLS530.JOURNAL_DATE_TO"/>
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query"
prompt="HLS530.TOTAL_AMOUNT_DR_FROM"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query"
prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
<!-- <a:textField name="project_name" bindTarget="hls_journal_header_query" prompt="HLS.PROJECT_NAME"/> -->
<!-- <a:lov name="currency_code" bindTarget="hls_journal_header_query" prompt="HLS.CURRENCY"/> -->
<a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="HLS.TENANT_CODE"/>
<a:comboBox name="post_sap_desc" bindTarget="hls_journal_header_query" prompt="是否传递sap"/>
<!--<a:comboBox name="post_gl_status_desc" bindTarget="hls_journal_header_query" prompt="HLS530.IS_POSTED"/>-->
<!-- <a:textField name="external_journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.EXTERNAL_JOURNAL_NUM"/> -->
<!-- <a:textField name="reference1" bindTarget="hls_journal_header_query" prompt="HLS530.REFERENCE1"/> -->
<!--<a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/>-->
<a:textField name="description" bindTarget="hls_journal_header_query"
prompt="HLS530.JOURNAL_DESCRIPTION"/>
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_NUM"/>
<a:textField name="sap_belnr" bindTarget="hls_journal_header_query" prompt="SAP凭证号"/>
<a:lov name="created_by_n" bindTarget="hls_journal_header_query" prompt="制证人"/>
</a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="280"
marginWidth="80" navBar="true">
<a:toolBar>
<a:button click="hls301_export" text="导出"/>
</a:toolBar>
<a:columns>
<a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM"
renderer="hls301_journal_num_render" width="120"/>
<!--<a:column name="external_journal_num" align="center" prompt="金蝶凭证号" width="130"/>-->
<a:column name="sap_belnr" align="center" prompt="SAP凭证号" width="110"/>
<a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/>
<a:column name="period_name" align="center" prompt="HLS530.PERIOD_NAME" width="80"/>
<a:column name="journal_date" align="center" prompt="HLS530.JOURNAL_DATE" renderer="Leaf.formatDate"
width="90"/>
<a:column name="currency_desc" align="center" prompt="HLS.CURRENCY" width="80"/>
<a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney"
width="120"/>
<a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/>
<a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/>
<a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/>
<a:column name="created_by_n" prompt="制证人"/>
<a:column name="re_meg" prompt="凭证回传信息" width="300"/>
<!-- <a:column name="export" prompt="导入" width="50" align="center" renderer="hls301_journal_num_render"/> -->
<!-- <a:column name="nc_log" align="center" prompt="NC导入日志" renderer="hls301_journal_num_render" width="70"/> -->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<!-- <a:init-procedure>
<a:batch-apply sourcepath="/parameter">
<a:model-insert model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
<a:model-update model="hls.HLS301.hls_journal_post_to_sbo"/>
<a:batch-apply sourcepath="/parameter">
<a:batch-apply sourcepath="/@current_parameter/datas">
<a:model-insert model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
<a:model-update model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/> -->
<p:echo/>
<a:init-procedure>
<a:model-execute model="hls.HLS301.hls_journal_post_to_sbo"/>
<a:batch-apply sourcepath="/parameter/details">
<a:model-insert model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
<a:model-update model="hls.HLS301.hls_journal_post_to_sbo"/>
<p:echo/>
</a:init-procedure>
<p:echo/>
<a:service-output output="/parameter"/>
</a:service>
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