Commit c909673e authored by Darming's avatar Darming

[refactor]bug调整

parent 8431cb75
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: chenlingfeng $Author: chenlingfeng
$Date: 2019-01-14 16:29:48 $Date: 2019-01-14 16:29:48
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm"> <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT t1.* SELECT t1.*
FROM (SELECT li.line_id, FROM (SELECT li.line_id,
li.error_message, li.error_message,
li.status, li.status,
li.header_id, li.header_id,
li.line_number, li.line_number,
hd.created_by, hd.created_by,
li.source_table, li.source_table,
li.attribute_1, li.attribute_1,
li.attribute_2, li.attribute_2,
li.attribute_3, li.attribute_3,
li.attribute_4, li.attribute_4,
li.attribute_5, li.attribute_5,
li.attribute_6, li.attribute_6,
li.attribute_7, li.attribute_7,
li.attribute_8, li.attribute_8,
li.attribute_9, li.attribute_9,
li.attribute_10, li.attribute_10,
li.attribute_11, li.attribute_11,
li.attribute_12, li.attribute_12,
li.attribute_13, li.attribute_13,
li.attribute_14, li.attribute_14,
li.attribute_15, li.attribute_15,
li.attribute_16, li.attribute_16,
li.attribute_17, li.attribute_17,
li.attribute_18, li.attribute_18,
li.attribute_19, li.attribute_19,
li.attribute_20, li.attribute_20,
li.attribute_21, li.attribute_21,
li.attribute_22, li.attribute_22,
li.attribute_23, li.attribute_23,
li.attribute_24, li.attribute_24,
li.attribute_25, li.attribute_25,
li.attribute_26, li.attribute_26,
t.csh_bank_account_num, t.csh_bank_account_num,
t.transaction_date, t.transaction_date,
t.bank_slip_num, t.bank_slip_num,
t.bp_bank_account_num, t.bp_bank_account_num,
t.bp_bank_account_name, t.bp_bank_account_name,
t.bp_bank_name, t.bp_bank_name,
t.transaction_amount, t.transaction_amount,
t.collection_classes, t.collection_classes,
t.bp_id, t.bp_id,
t.paid_byother_flag, t.paid_byother_flag,
t.csh_bank_account_id bank_account_id, t.csh_bank_account_id bank_account_id
FROM fnd_interface_headers hd, FROM fnd_interface_headers hd,
fnd_interface_lines li, fnd_interface_lines li,
csh_transaction_import_temp t 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 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 hd.template_code = 'CSH_TRX_BANK'
AND li.line_number >0 AND li.line_number >0
AND HD.CREATED_BY = ${/session/@user_id} AND HD.CREATED_BY = ${/session/@user_id}
) t1 ) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.line_number order by t1.line_number
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
csh_transaction_pkg.csh_transaction_import_check( csh_transaction_pkg.csh_transaction_import_check(
p_header_id => ${/model/header/record/@header_id}, p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id} p_user_id => ${/session/@user_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="insert"> <bm:operation name="insert">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
delete from csh_transaction_import_temp where header_id = ${@header_id}; delete from csh_transaction_import_temp where header_id = ${@header_id};
csh_transaction_pkg.save_receipt_import( csh_transaction_pkg.save_receipt_import(
p_transaction_id =>${@transaction_id}, p_transaction_id =>${@transaction_id},
p_transaction_num =>${@transaction_num}, p_transaction_num =>${@transaction_num},
p_transaction_category =>'BUSINESS', p_transaction_category =>'BUSINESS',
p_transaction_type =>${@transaction_type}, p_transaction_type =>${@transaction_type},
p_transaction_date =>to_date(${@transaction_date}, 'yyyy-mm-dd'), p_transaction_date =>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_penalty_calc_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_bank_slip_num =>${@bank_slip_num},
p_company_id =>${/session/@company_id}, p_company_id =>${/session/@company_id},
p_internal_period_num =>${@internal_period_num}, p_internal_period_num =>${@internal_period_num},
p_period_name =>${@period_name}, p_period_name =>${@period_name},
p_payment_method_id =>${@payment_method_id}, p_payment_method_id =>${@payment_method_id},
p_distribution_set_id =>${@distribution_set_id}, p_distribution_set_id =>${@distribution_set_id},
p_cashflow_amount =>${@transaction_amount}, p_cashflow_amount =>${@transaction_amount},
p_currency_code =>${@currency_code}, p_currency_code =>${@currency_code},
p_transaction_amount =>${@transaction_amount}, p_transaction_amount =>${@transaction_amount},
p_exchange_rate_type =>${@exchange_rate_type}, p_exchange_rate_type =>${@exchange_rate_type},
p_exchange_rate_quotation =>${@exchange_rate_quotation}, p_exchange_rate_quotation =>${@exchange_rate_quotation},
p_exchange_rate =>${@exchange_rate}, p_exchange_rate =>${@exchange_rate},
p_bank_account_id =>${@bank_account_id}, p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category}, p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id}, p_bp_id =>${@bp_id},
p_bp_bank_account_id =>${@bp_bank_account_id}, p_bp_bank_account_id =>${@bp_bank_account_id},
p_bp_bank_account_num =>${@bp_bank_account_num}, p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description}, p_description =>${@description},
p_handling_charge =>${@handling_charge}, p_handling_charge =>${@handling_charge},
p_posted_flag =>nvl(${@posted_flag}, 'N'), p_posted_flag =>nvl(${@posted_flag}, 'N'),
p_reversed_flag =>nvl(${@reversed_flag}, 'N'), p_reversed_flag =>nvl(${@reversed_flag}, 'N'),
p_reversed_date =>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'), p_reversed_date =>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag =>nvl(${@returned_flag}, 'NOT'), p_returned_flag =>nvl(${@returned_flag}, 'NOT'),
p_returned_amount =>${@returned_amount}, p_returned_amount =>${@returned_amount},
p_write_off_flag =>nvl(${@write_off_flag}, 'NOT'), p_write_off_flag =>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount =>${@write_off_amount}, 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_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_twin_csh_trx_id =>${@twin_csh_trx_id},
p_return_from_csh_trx_id =>${@return_from_csh_trx_id}, p_return_from_csh_trx_id =>${@return_from_csh_trx_id},
p_reversed_csh_trx_id =>${@reversed_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_type =>${@source_csh_trx_type},
p_source_csh_trx_id =>${@source_csh_trx_id}, p_source_csh_trx_id =>${@source_csh_trx_id},
p_source_doc_category =>${@source_doc_category}, p_source_doc_category =>${@source_doc_category},
p_source_doc_type =>${@source_doc_type}, p_source_doc_type =>${@source_doc_type},
p_source_doc_id =>${@source_doc_id}, p_source_doc_id =>${@source_doc_id},
p_source_doc_line_id =>${@source_doc_line_id}, p_source_doc_line_id =>${@source_doc_line_id},
p_create_je_mothed =>${@create_je_mothed}, p_create_je_mothed =>${@create_je_mothed},
p_create_je_flag =>nvl(${@create_je_flag}, 'N'), p_create_je_flag =>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag =>nvl(${@gld_interface_flag}, 'N'), p_gld_interface_flag =>nvl(${@gld_interface_flag}, 'N'),
p_user_id =>${/session/@user_id}, p_user_id =>${/session/@user_id},
p_ref_contract_id => ${@ref_contract_id}, p_ref_contract_id => ${@ref_contract_id},
p_receipt_type => ${@receipt_type}, p_receipt_type => ${@receipt_type},
p_csh_bp_name => ${@csh_bp_name}, p_csh_bp_name => ${@csh_bp_name},
p_ref_n01 =>${@ref_n01}, p_ref_n01 =>${@ref_n01},
p_bp_bank_name =>${@bp_bank_name}, p_bp_bank_name =>${@bp_bank_name},
p_bp_bank_branch_name =>${@bp_bank_branch_name}, p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_collection_classes =>${@collection_classes}, p_collection_classes =>${@collection_classes},
p_bp_bank_account_name =>${@bp_bank_account_name}, p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na}, p_opposite_band_na =>${@opposite_band_na},
p_banka =>${@banka}, p_banka =>${@banka},
p_purpose =>${@purpose}, p_purpose =>${@purpose},
p_gsber =>${@gsber}, p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr}, p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account}, p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_zuonr =>${@bank_slip_num}, p_zuonr =>${@bank_slip_num},
p_paid_byother_flag =>${@paid_byother_flag}, p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05}, p_ref_v05 =>${@ref_v05},
p_status =>${@status}, p_status =>${@status},
p_bank_account_num =>${@bank_account_num} p_bank_account_num =>${@bank_account_num}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute"> <bm:operation name="execute">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
csh_transaction_pkg.get_bank_account_id(p_bank_account_num =>${@bank_account_num}, csh_transaction_pkg.get_bank_account_id(p_bank_account_num =>${@bank_account_num},
p_bp_bank_account_num =>${@bp_bank_account_num}, p_bp_bank_account_num =>${@bp_bank_account_num},
p_bank_account_id =>${@bank_account_id}, p_bank_account_id =>${@bank_account_id},
p_bp_category =>${@bp_category}, p_bp_category =>${@bp_category},
p_bp_id =>${@bp_id}, p_bp_id =>${@bp_id},
p_csh_bp_name =>${@csh_bp_name}, p_csh_bp_name =>${@csh_bp_name},
p_user_id =>${session/@user_id} p_user_id =>${session/@user_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
<bm:parameter name="bank_account_id" dataType="java.lang.Long" output="true" <bm:parameter name="bank_account_id" dataType="java.lang.Long" output="true"
outputPath="@bank_account_id"/> outputPath="@bank_account_id"/>
<bm:parameter name="bp_category" dataType="java.lang.String" output="true" outputPath="@bp_category"/> <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="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"/> <bm:parameter name="csh_bp_name" dataType="java.lang.String" output="true" outputPath="@csh_bp_name"/>
</bm:parameters> </bm:parameters>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="header_id" queryExpression="t1.header_id=${@header_id}"/> <bm:query-field name="header_id" queryExpression="t1.header_id=${@header_id}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: sf $Author: sf
$Date: 2019-09-06 上午11:10:33 $Date: 2019-09-06 上午11:10:33
$Revision: 1.0 $Revision: 1.0
$Purpose: design the function of written_off money $Purpose: design the function of written_off money
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<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_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;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_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;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:init-procedure>
<a:view> <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="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_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_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_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="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="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="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="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="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[ <script type="text/javascript"><![CDATA[
Leaf.onReady(function(){ Leaf.onReady(function(){
//console.log($('csh_transaction_receipt_maintain_result_ds')); //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(); $('csh510_csh_trx_bank_drop').disable();
var datas = $('csh_transaction_receipt_maintain_result_ds').selected; var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if (datas.length == 0) { if (datas.length == 0) {
$L.showMessage("提示", '请选择要作废的单据'); $L.showMessage("提示", '请选择要作废的单据');
$('csh510_csh_trx_bank_drop').enable(); $('csh510_csh_trx_bank_drop').enable();
return; 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 confirmed_flag= datas[i].get('confirmed_flag');
//不是新增就报错 //不是新增就报错
if(confirmed_flag!='NEW'&&confirmed_flag!=undefined){ if(confirmed_flag!='NEW'&&confirmed_flag!=undefined){
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null); $L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
return; return;
} }
//将对象封装到json对象数组 //将对象封装到json对象数组
post_data.push({ post_data.push({
'transaction_id': datas[i].get('transaction_id'), 'transaction_id': datas[i].get('transaction_id'),
//提交想改变之后的状态 //提交想改变之后的状态
'wanted_confirmed_flag': 'CANCELLED', 'wanted_confirmed_flag': 'CANCELLED',
'_status': 'update' '_status': 'update'
}); });
}; };
//弹出确认修改的提示框 //弹出确认修改的提示框
$L.showConfirm("提示",'确认执行该操作?',function(){ $L.showConfirm("提示",'确认执行该操作?',function(){
//锁屏 //锁屏
lock_current_window(); lock_current_window();
//作废单据 //作废单据
Leaf.request({ Leaf.request({
url: $('csh509N_batch_update_confirmed_flag').getUrl(), url: $('csh509N_batch_update_confirmed_flag').getUrl(),
para: post_data, para: post_data,
success: function () { success: function () {
unlock_current_window(); unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query(); $('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '该单据已作废!'); Leaf.showMessage('${l:PROMPT}', '该单据已作废!');
$('csh510_csh_trx_bank_drop').enable(); $('csh510_csh_trx_bank_drop').enable();
}, failure: function () { }, failure: function () {
unlock_current_window(); unlock_current_window();
$('csh510_csh_trx_bank_drop').enable(); $('csh510_csh_trx_bank_drop').enable();
}, },
error: function () { error: function () {
unlock_current_window(); unlock_current_window();
$('csh510_csh_trx_bank_drop').enable(); $('csh510_csh_trx_bank_drop').enable();
}, },
scope: this scope: this
}); });
}) })
} }
//新增申请按钮 //新增申请按钮
function csh510_csh_trx_bank_apply_new() { function csh510_csh_trx_bank_apply_new() {
$('csh510_csh_trx_bank_apply_new').disable(); $('csh510_csh_trx_bank_apply_new').disable();
var datas = $('csh_transaction_receipt_maintain_result_ds').selected; var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
//获得所选择的的未提交的单据,如果有不是未提交的数据,提示重新进行选择 //获得所选择的的未提交的单据,如果有不是未提交的数据,提示重新进行选择
if (datas.length == 0) { if (datas.length == 0) {
$L.showMessage("提示", '请至少选择一条数据'); $L.showMessage("提示", '请至少选择一条数据');
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
return; 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 confirmed_flag = datas[i].get('confirmed_flag');
var bp_name=datas[i].get('bp_name'); var bp_name=datas[i].get('bp_name');
if(bp_name==''||bp_name==undefined){ if(bp_name==''||bp_name==undefined){
$L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null); $L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null);
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
return; return;
} }
//不是新增就报错 //不是新增就报错
if (confirmed_flag != 'NEW' && confirmed_flag != undefined) { if (confirmed_flag != 'NEW' && confirmed_flag != undefined) {
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null); $L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
return; return;
} }
//将对象封装到json对象数组 //将对象封装到json对象数组
post_data.push({ post_data.push({
'transaction_id': datas[i].get('transaction_id'), 'transaction_id': datas[i].get('transaction_id'),
'_status': 'update' '_status': 'update'
}); });
} }
//弹出确认修改的提示框 //弹出确认修改的提示框
$L.showConfirm("提示", '确认执行该操作?', function () { $L.showConfirm("提示", '确认执行该操作?', function () {
//锁屏 //锁屏
lock_current_window(); lock_current_window();
//改变未提交单据数据的状态 //改变未提交单据数据的状态
Leaf.request({ Leaf.request({
url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(), url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(),
para: post_data, para: post_data,
success: function () { success: function () {
unlock_current_window(); unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query(); $('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '修改成功!'); Leaf.showMessage('${l:PROMPT}', '修改成功!');
//启用按钮 //启用按钮
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
}, failure: function () { }, failure: function () {
//启用按钮 //启用按钮
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
unlock_current_window(); unlock_current_window();
}, },
error: function () { error: function () {
//启用按钮 //启用按钮
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
unlock_current_window(); unlock_current_window();
}, },
scope: this scope: this
}); });
},function(){ },function(){
$('csh510_csh_trx_bank_apply_new').enable(); $('csh510_csh_trx_bank_apply_new').enable();
}); });
} }
//跳转到收款新增页面 //跳转到收款新增页面
function csh510_csh_trx_bank_hand_add(){ function csh510_csh_trx_bank_hand_add(){
//按钮失效 //按钮失效
$('csh510_csh_trx_bank_hand_add').disable(); $('csh510_csh_trx_bank_hand_add').disable();
var url = $('csh_transaction_receipt_link').getUrl(); var url = $('csh_transaction_receipt_link').getUrl();
var win = new Leaf.Window({ var win = new Leaf.Window({
title:'${l:CSH510.NEW_MANUAL_RECEIPT}', title:'${l:CSH510.NEW_MANUAL_RECEIPT}',
url: url, url: url,
id: 'csh_trx_receipt_id', id: 'csh_trx_receipt_id',
fullScreen: true, fullScreen: true,
draggable: true draggable: true
}).on('close', function() { }).on('close', function() {
//按钮启用 //按钮启用
$('csh510_csh_trx_bank_hand_add').enable(); $('csh510_csh_trx_bank_hand_add').enable();
}); });
} }
//锁表 //锁表
function lock_current_window() { function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
} }
//解锁 //解锁
function unlock_current_window() { function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
} }
function dateValidator(record, name, value) { //日期校验方法 function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') { if (name == 'transaction_date_from' || name == 'transaction_date_to') {
var start_date = Leaf.formatDate(record.get('transaction_date_from')); var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to')); var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较 if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) { if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串 return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
} }
} }
return true; //校验通过返回true return true; //校验通过返回true
} }
} }
function compareDate(start, end) { function compareDate(start, end) {
if (start > end) { if (start > end) {
return false; return false;
} }
return true; return true;
} }
function csh510_receipt_query() { function csh510_receipt_query() {
var record = $('csh_transaction_receipt_maintain_query_ds').getAt(0); var record = $('csh_transaction_receipt_maintain_query_ds').getAt(0);
var dirty_flag = 'N'; var dirty_flag = 'N';
for (var name in record.data) { for (var name in record.data) {
var value = record.get(name); var value = record.get(name);
if (value != 'undefined' && value != null && value != '') { if (value != 'undefined' && value != null && value != '') {
dirty_flag = 'Y'; dirty_flag = 'Y';
} }
} }
if (dirty_flag == 'N') { if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () { Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () {
return; return;
}, function () { }, function () {
$('csh_transaction_receipt_maintain_result_ds').query(); $('csh_transaction_receipt_maintain_result_ds').query();
}, null, null); }, null, null);
} else { } else {
$('csh_transaction_receipt_maintain_result_ds').query(); $('csh_transaction_receipt_maintain_result_ds').query();
} }
} }
function csh510_receipt_reset() { function csh510_receipt_reset() {
$('csh_transaction_receipt_maintain_query_ds').reset(); $('csh_transaction_receipt_maintain_query_ds').reset();
} }
function csh510_receipt_back() { function csh510_receipt_back() {
history.go(-1); history.go(-1);
} }
function csh510_receipt_forward() { function csh510_receipt_forward() {
history.go(1); history.go(1);
} }
function csh510_receipt_quit() { function csh510_receipt_quit() {
location.href = $('sys_service_welcome_link').getUrl(); location.href = $('sys_service_welcome_link').getUrl();
parent.shMenu('show'); parent.shMenu('show');
} }
function seedetail_transaction_num(value, record, name) { function seedetail_transaction_num(value, record, name) {
/* console.log(record.get('receipt_type')); /* console.log(record.get('receipt_type'));
console.log( record.get('bp_name')); console.log( record.get('bp_name'));
console.log( record.get('confirmed_flag'));*/ console.log( record.get('confirmed_flag'));*/
if (record.get('transaction_id')) { if (record.get('transaction_id')) {
var url; var url;
/*if (record.get('posted_flag') == 'N') { /*if (record.get('posted_flag') == 'N') {
url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id'); url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} /!*else*!/ else if (record.get('posted_flag') == 'Y') { } /!*else*!/ else if (record.get('posted_flag') == 'Y') {
url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id'); url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
} else { } else {
return value; return value;
}*/ }*/
if(record.get('confirmed_flag')=='NEW' || record.get('confirmed_flag') == 'CT_REJECTED'){ if(record.get('confirmed_flag')=='NEW' || record.get('confirmed_flag') == 'CT_REJECTED'){
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true'; url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true';
}else{ }else{
url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=false'; 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>'; return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} }
} }
function openWindow(url) { function openWindow(url) {
new Leaf.Window({ new Leaf.Window({
id: 'csh_transaction_receipt_link_winid', id: 'csh_transaction_receipt_link_winid',
params: { params: {
winId: 'csh_transaction_receipt_link_winid' winId: 'csh_transaction_receipt_link_winid'
}, },
url: url, url: url,
title: '${l:CSH510.CSH_RECEIPT_UPDATE}', title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true fullScreen: true
}); });
} }
function construct_from_to() { function construct_from_to() {
var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code']; var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code'];
var pattern = ['_from', '_to']; var pattern = ['_from', '_to'];
var obj = {}; var obj = {};
for (var i = 0, for (var i = 0,
j = config.length; i < j; i++) { j = config.length; i < j; i++) {
for (var m = 0, 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]; obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
} }
} }
return obj; return obj;
} }
function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) { function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) {
var from_to = construct_from_to(); var from_to = construct_from_to();
var opposite_name = from_to[name]; var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) { if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name); var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) { if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value); record.set(opposite_name, value);
} }
} }
} }
function csh510_receipt_remove() { function csh510_receipt_remove() {
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected(); var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
if (!records.length) { if (!records.length) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}'); Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}');
return; return;
} }
var saveData = []; var saveData = [];
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if(records[i].get('confirmed_flag') != 'NEW' && records[i].get('confirmed_flag') != 'CT_REJECTED'){ if(records[i].get('confirmed_flag') != 'NEW' && records[i].get('confirmed_flag') != 'CT_REJECTED'){
Leaf.showInfoMessage("提示","请选择新建或者收款退回的单据进行收款取消操作!"); Leaf.showInfoMessage("提示","请选择新建或者收款退回的单据进行收款取消操作!");
return; return;
} }
records[i].set('_status', 'delete'); records[i].set('_status', 'delete');
saveData.push(records[i].data); saveData.push(records[i].data);
} }
Leaf.showConfirm('${l:PROMPT}', '${l:HLS.DELETE_CONFIRM}', function () { Leaf.showConfirm('${l:PROMPT}', '${l:HLS.DELETE_CONFIRM}', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.DELETING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.DELETING}');
Leaf.request({ Leaf.request({
url: '${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_delete/batch_update', url: '${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_delete/batch_update',
para: saveData, para: saveData,
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}', msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000 duration: 2000
}); });
csh510_delete_remove(records); csh510_delete_remove(records);
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
failure: function () { failure: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function () { error: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
}); });
}, function () { }, function () {
return; return;
}, null, null); }, null, null);
} }
function csh510_delete_remove(records) { function csh510_delete_remove(records) {
while (records[0]) { while (records[0]) {
$('csh_transaction_receipt_maintain_result_ds').removeLocal(records[0]); $('csh_transaction_receipt_maintain_result_ds').removeLocal(records[0]);
} }
} }
function csh510_receipt() { function csh510_receipt() {
Leaf.showConfirm('${l:PROMPT}', '非财务人员请勿操作!', function () { Leaf.showConfirm('${l:PROMPT}', '非财务人员请勿操作!', function () {
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected(); var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
if (records.length != 1) { if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '请选择1条数据!'); Leaf.showMessage('${l:PROMPT}', '请选择1条数据!');
return; return;
} }
if (records[0].get('transaction_id')) { if (records[0].get('transaction_id')) {
var url; var url;
if (records[0].get('posted_flag') == 'N') { if (records[0].get('posted_flag') == 'N') {
url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + records[0].get('transaction_id') + '&claim=F'; url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + records[0].get('transaction_id') + '&claim=F';
} else { } else {
Leaf.showMessage('${l:PROMPT}', '该单据已经被认领,无需再次认领!'); Leaf.showMessage('${l:PROMPT}', '该单据已经被认领,无需再次认领!');
return; return;
} }
openWindow(url); openWindow(url);
} }
}); });
} }
function csh510_batch_update() { function csh510_batch_update() {
var ds_id = 'csh_transaction_receipt_maintain_result_ds'; var ds_id = 'csh_transaction_receipt_maintain_result_ds';
var ds = $(ds_id) var ds = $(ds_id)
var records = ds.getSelected(); var records = ds.getSelected();
if (records.length < 1) { if (records.length < 1) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条要处理的单据'); Leaf.showMessage('${l:PROMPT}', '请至少选择一条要处理的单据');
return; return;
} }
var auto_write_record = $('csh510_collection_classes_batch_update_ds').getAt(0); var auto_write_record = $('csh510_collection_classes_batch_update_ds').getAt(0);
var collection_classes = auto_write_record.get('collection_classes'); var collection_classes = auto_write_record.get('collection_classes');
if (collection_classes) { if (collection_classes) {
lock_current_window(); lock_current_window();
var post_data = []; var post_data = [];
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if (records[i].get('write_off_flag') == 'FULL') { if (records[i].get('write_off_flag') == 'FULL') {
Leaf.showMessage('${l:PROMPT}', '选择数据中包含已完全核销的数据'); Leaf.showMessage('${l:PROMPT}', '选择数据中包含已完全核销的数据');
return; return;
} }
post_data.push({ post_data.push({
'transaction_id': records[i].get('transaction_id'), 'transaction_id': records[i].get('transaction_id'),
'collection_classes': auto_write_record.get('collection_classes'), 'collection_classes': auto_write_record.get('collection_classes'),
'_status': 'update' '_status': 'update'
}); });
} }
Leaf.request({ Leaf.request({
url: $('csh510_csh_transaction_batch_update').getUrl(), url: $('csh510_csh_transaction_batch_update').getUrl(),
para: post_data, para: post_data,
success: function () { success: function () {
unlock_current_window(); unlock_current_window();
ds.query(ds.currentpage); ds.query(ds.currentpage);
Leaf.showMessage('${l:PROMPT}', '修改成功!'); Leaf.showMessage('${l:PROMPT}', '修改成功!');
}, failure: function () { }, failure: function () {
unlock_current_window(); unlock_current_window();
}, },
error: function () { error: function () {
unlock_current_window(); unlock_current_window();
}, },
scope: this scope: this
}); });
} }
} }
function csh510_csh_transaction_batch_update(){ function csh510_csh_transaction_batch_update(){
// //
var records = $('csh_transaction_receipt_maintain_result_ds').getSelected(); var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
if (records.length == 0) { if (records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条记录!'); Leaf.showMessage('${l:PROMPT}', '请选择一条记录!');
return; return;
} }
var post_data = []; var post_data = [];
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
post_data.push({ post_data.push({
'transaction_id': records[i].get('transaction_id'), 'transaction_id': records[i].get('transaction_id'),
'_status': 'update' '_status': 'update'
}); });
} }
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({ Leaf.request({
url: $('csh511_csh_transaction_batch_post_link').getUrl(), url: $('csh511_csh_transaction_batch_post_link').getUrl(),
para: post_data, para: post_data,
success: function (res) { success: function (res) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SUBMIT_SUCCESS}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.SUBMIT_SUCCESS}');
csh510_receipt_query(); csh510_receipt_query();
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
failure: function() { failure: function() {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function() {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
}); });
} }
function csh510_csh_trx_bank_import(){ function csh510_csh_trx_bank_import(){
//按钮失效 //按钮失效
$('csh510_csh_trx_bank_import').disable(); $('csh510_csh_trx_bank_import').disable();
//只有债权内勤才能 //只有债权内勤才能
var url_l = $('csh510_csh_transaction_import_link').getUrl(); var url_l = $('csh510_csh_transaction_import_link').getUrl();
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'csh510_csh_transaction_import_win', id: 'csh510_csh_transaction_import_win',
url: url_l, url: url_l,
params: { params: {
'winid': 'csh510_csh_transaction_import_win', 'winid': 'csh510_csh_transaction_import_win',
'session_id': '${/session/@session_id}', 'session_id': '${/session/@session_id}',
'parent_ds_id': 'csh_transaction_receipt_maintain_result_ds' 'parent_ds_id': 'csh_transaction_receipt_maintain_result_ds'
}, },
title: '信息导入', title: '信息导入',
width: 430, width: 430,
height: 390 height: 390
}); });
win.on('close', function () { win.on('close', function () {
$('csh_transaction_receipt_maintain_result_ds').query(); $('csh_transaction_receipt_maintain_result_ds').query();
//按钮启用 //按钮启用
$('csh510_csh_trx_bank_import').enable(); $('csh510_csh_trx_bank_import').enable();
}); });
} }
function csh510_export() { function csh510_export() {
$('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护'); $('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护');
} }
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="confirmed_flag_ds"> <a:dataSet id="confirmed_flag_ds">
<a:datas> <a:datas>
<a:record code_value="NEW" code_value_name="新建"/> <a:record code_value="NEW" code_value_name="新建"/>
<a:record code_value="ACCAUDITING" code_value_name="收款确认中"/> <a:record code_value="ACCAUDITING" code_value_name="收款确认中"/>
<a:record code_value="CT_REJECTED" code_value_name="收款退回"/> <a:record code_value="CT_REJECTED" code_value_name="收款退回"/>
<a:record code_value="ACCAUDITED" code_value_name="收款已确认"/> <a:record code_value="ACCAUDITED" code_value_name="收款已确认"/>
</a:datas> </a:datas>
</a:dataSet> </a:dataSet>
<a:dataSet id="bp_category_ds" lookupCode="BP_CATEGORY"> <a:dataSet id="bp_category_ds" lookupCode="BP_CATEGORY">
</a:dataSet> </a:dataSet>
<!-- <a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">--> <!-- <a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">-->
<!-- </a:dataSet>--> <!-- </a:dataSet>-->
<a:dataSet id="payment_method_ds"> <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/> <a:datas dataSource="/model/payment_method_path"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/> <a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="currency_ds"> <a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/> <a:datas dataSource="/model/currency"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="transaction_type_ds"> <a:dataSet id="transaction_type_ds">
<a:datas dataSource="/model/transaction_type"/> <a:datas dataSource="/model/transaction_type"/>
</a:dataSet> </a:dataSet>
<!-- <a:dataSet id="transaction_type_ds" lookupCode="CSH511_TRANSACTION_TYPE"/> --> <!-- <a:dataSet id="transaction_type_ds" lookupCode="CSH511_TRANSACTION_TYPE"/> -->
<a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/> <a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/>
<!-- 去掉退款事务 --> <!-- 去掉退款事务 -->
<a:dataSet id="returned_flag_ds"> <a:dataSet id="returned_flag_ds">
<a:datas dataSource="/model/returned_flag_rp"/> <a:datas dataSource="/model/returned_flag_rp"/>
</a:dataSet> </a:dataSet>
<!-- 去掉反冲事务 --> <!-- 去掉反冲事务 -->
<a:dataSet id="reversed_flag_ds"> <a:dataSet id="reversed_flag_ds">
<a:datas dataSource="/model/reversed_flag_rp"/> <a:datas dataSource="/model/reversed_flag_rp"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/> <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh510_collection_classes_batch_update_ds"> <a:dataSet id="csh510_collection_classes_batch_update_ds">
<a:fields> <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:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true"> <a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="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:mapping>
<a:map from="precision" to="precision"/> <a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/> <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/> <a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/> <a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/> <a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/> <a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/> <a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/> <a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/> <a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/> <a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/> <a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="precision" to="precision"/> <a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/> <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/> <a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/> <a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/> <a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/> <a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/> <a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/> <a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/> <a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/> <a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/> <a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="precision" to="precision"/> <a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/> <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/> <a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/> <a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/> <a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/> <a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/> <a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/> <a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/> <a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/> <a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/> <a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping> </a:mapping>
</a:field> </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="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="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="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
<a:map from="bp_id" to="bp_id_from"/> <a:map from="bp_id" to="bp_id_from"/>
<a:map from="bp_name" to="bp_name_from"/> <a:map from="bp_name" to="bp_name_from"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="bp_id_from"/> <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:mapping>
<a:map from="bp_id" to="bp_id_to"/> <a:map from="bp_id" to="bp_id_to"/>
<a:map from="bp_name" to="bp_name_to"/> <a:map from="bp_name" to="bp_name_to"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="bp_id_to"/> <a:field name="bp_id_to"/>
<a:field name="transaction_num_from"/> <a:field name="transaction_num_from"/>
<a:field name="transaction_num_to"/> <a:field name="transaction_num_to"/>
<a:field name="bank_slip_num_from"/> <a:field name="bank_slip_num_from"/>
<a:field name="bank_slip_num_to"/> <a:field name="bank_slip_num_to"/>
<a:field name="transaction_date_from" validator="dateValidator"/> <a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" 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:mapping>
<a:map from="bank_account_code" to="bank_account_code"/> <a:map from="bank_account_code" to="bank_account_code"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="bank_account_code" to="bank_account_code_from"/> <a:map from="bank_account_code" to="bank_account_code_from"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="bank_account_from_id"/> <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:mapping>
<a:map from="bank_account_code" to="bank_account_code_to"/> <a:map from="bank_account_code" to="bank_account_code_to"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="transaction_amount_from"/> <a:field name="transaction_amount_from"/>
<a:field name="transaction_amount_to"/> <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="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="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="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="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping> <a:mapping>
<a:map from="period_name" to="period_name"/> <a:map from="period_name" to="period_name"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="description" to="user_desc"/> <a:map from="description" to="user_desc"/>
<a:map from="user_id" to="user_id"/> <a:map from="user_id" to="user_id"/>
</a:mapping> </a:mapping>
</a:field> </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="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_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_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/> <a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/> <a:field name="currency_code_to"/>
<a:field name="transaction_type" defaultValue="RECEIPT"/> <a:field name="transaction_type" defaultValue="RECEIPT"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/> <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="not_reversed_flag_r" defaultValue="NOT"/>
<a:field name="receipt_type"/> <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="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:mapping>
<a:map from="bp_id" to="bp_id"/> <a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_name"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/> <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="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/> <a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/> <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="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/> <a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="bp_bank_account_name" to="bp_bank_account_name"/> <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="opposite_band_na" to="opposite_band_na"/>
<a:map from="bp_bank_account_num" to="bp_bank_account_num"/> <a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/> <a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_transaction_receipt_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:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<!-- <a:gridButton click="csh510_receipt_back" text="HLS.BACK"/> <!-- <a:gridButton click="csh510_receipt_back" text="HLS.BACK"/>
<a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> --> <a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> -->
<!-- <a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> --> <!-- <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_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_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_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_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_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_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_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>--> <!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
<!-- <a:gridButton click="csh510_receipt" text="财务认领"/> --> <!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80" <a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
title="收款核销" style="margin-left:20px"> title="收款核销" style="margin-left:20px">
<a:hBox> <a:hBox>
<a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE"> <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_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: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_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: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_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_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_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:textField style="display:none"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/> <a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/> <a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/>
<!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_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:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
</a:fieldSet> </a:fieldSet>
</a:hBox> </a:hBox>
</a:form> </a:form>
<a:fieldSet labelWidth="150" title="收款单" style="margin-left:20px"> <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:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="300" marginWidth="80" navBar="true" >
<!--<a:toolBar> <!--<a:toolBar>
<a:button click="csh510_export" text="导出"/> <a:button click="csh510_export" text="导出"/>
</a:toolBar>--> </a:toolBar>-->
<a:columns> <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="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="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_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="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="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="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="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="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="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="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据审批状态" align="center"/> <a:column name="confirmed_flag_desc" prompt="单据审批状态" align="center"/>
<!-- <a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_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.MY_ACCOUNT">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name" 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_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_NUM" name="bank_account_num" align="center"/>
</a:column> </a:column>
<a:column prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT"> <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_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_BANK" name="opposite_band_na" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"/> <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"/>
</a:column> </a:column>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/> <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="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER" align="center"/>-->
<a:column name="acc_confirmed_by_desc" prompt="确认人" align="center"/> <a:column name="acc_confirmed_by_desc" prompt="确认人" align="center"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
<a:numberField id="number_editor" allowDecimals="true" decimalPrecision="2" editable="false"/> <a:numberField id="number_editor" allowDecimals="true" decimalPrecision="2" editable="false"/>
</a:editors> </a:editors>
</a:grid> </a:grid>
</a:fieldSet> </a:fieldSet>
</a:screenBody> </a:screenBody>
</a:view> </a:view>
</a:screen> </a:screen>
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure> <a:init-procedure>
<!-- <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:init-procedure>
<a:view> <a:view>
<a:link id="hls_journal_manual_create_link_id" url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/> <a:link id="hls_journal_manual_create_link_id" url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/>
...@@ -19,122 +19,169 @@ ...@@ -19,122 +19,169 @@
<a:link id="hls_journal_post_to_gld_link" model="hls.HLS301.hls_journal_post_to_gld" modelaction="batch_update"/> <a:link id="hls_journal_post_to_gld_link" model="hls.HLS301.hls_journal_post_to_gld" modelaction="batch_update"/>
<a:link id="hls_journal_unpost_to_gld_link" model="hls.HLS301.hls_journal_unpost_to_gld" modelaction="batch_update"/> <a:link id="hls_journal_unpost_to_gld_link" model="hls.HLS301.hls_journal_unpost_to_gld" modelaction="batch_update"/>
<a:link id="check_link" url="${/request/@context_path}/modules/hls/HLS530/hls_journal_check.lsc"/> <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="transfer_ref_link" url="${/request/@context_path}/transfer_ref.lsc"/> <a:link id="transfer_ref_link" url="${/request/@context_path}/transfer_ref.lsc"/>
<!-- <a:link id="transfer_voucher_link" url="${/request/@context_path}/transfer_voucher.lsc"/> --> <a:link id="transfer_voucher_link" url="${/request/@context_path}/transfer_voucher.lsc"/>
<a:link id="transfer_voucher_link" url="${/request/@context_path}/modules/interface/INTERFACE_KINGDEE/kingdee_importvoucher_interface.lsc"/> <a:link id="hls301_send_data" url="${/request/@context_path}/modules/hls/HLS301/hls_journal_send.lsc"/>
<a:link id="kingdee_interface_logs_id" url="${/request/@context_path}/modules/hls/HLS530/kingdee_interface_logs.lview"/> <a:link id="hls301_send_bp_to_sbo" model="hls.HLS301.hls_bp_post_to_sbo" modelaction="update"/>
<a:link id="hls_journal_close_link" model="hls.HLS530.hls_journal_close" modelaction="batch_update"/> <script><![CDATA[
<script type="text/javascript"><![CDATA[ //查询按钮
function render_line(record, rowIndex) {
if (record.get('kingdee_head_flag') == 'N' || record.get('kingdee_line_assist_flag') == 'N') { function hls301_journal_query() {
return 'background-color:#FFC0CB'; $('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 lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function lock_current_window2(msg) {
Leaf.Masker.mask(Ext.getBody(), msg);
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
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 hls301_journal_query() { function onUpdate_para_journalQueryDs(ds, record, name, value, oldvalue) {
$('hls_journal_header_result_ds').query(); var from_to = construct_from_to();
} var opposite_name = from_to[name];
//重置按钮 if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
function hls301_journal_reset() { if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
$('hls_journal_header_query').reset(); record.set(opposite_name, value);
}
//退出按钮
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_journal_new() {
var param = new Object();
param['function_code'] = 'HLS530';
param['document_category'] = 'JE';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
param['manual_flag'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
} }
function hls301_link_dynamic(reocrd_id, journal_header_id) { }
var maintain_type = 'UPDATE';
var record = $('hls_journal_header_result_ds').findById(reocrd_id); function hls301_journal_new() {
var param = new Object();
if (record.get('post_gl_status') == 'Y') { param['function_code'] = 'HLS530';
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS530.JOURNAL_POST_GL_STATUS_IS_Y}'); param['document_category'] = 'JE';
return false; param['function_usage'] = 'MODIFY';
} param['maintain_type'] = 'UPDATE';
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
var param = record.data; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
param['currency'] = param['currency_code']; }
param['function_code'] = 'HLS530';
param['document_id'] = journal_header_id; function hls301_link_dynamic(reocrd_id, journal_header_id) {
param['document_category'] = 'JE'; var maintain_type = 'UPDATE';
param['function_usage'] = 'MODIFY'; var record = $('hls_journal_header_result_ds').findById(reocrd_id);
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}'; if (record.get('post_gl_status') == 'Y') {
param['manual_flag'] = 'N'; Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS530.JOURNAL_POST_GL_STATUS_IS_Y}');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id'); return false;
} }
function hls301_journal_num_render(value, record, name) { var param = record.data;
return '<a href="javascript:hls301_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>'; param['currency'] = param['currency_code'];
param['function_code'] = 'HLS530';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
}
function hls301_journal_num_render(value, record, name) {
return '<a href="javascript:hls301_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
function journal_submit(datas) {
Leaf.request({
url: $('hls_journal_post_to_gld_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
$('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
var transfer_ref_flag = 'N';
function hls301_journal_post_ref() {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
return;
} }
var datas = [];
function journal_submit(datas) { for (var i = 0;i < records.length;i++) {
Leaf.request({ var obj = {};
url: $('hls_journal_post_to_gld_link').getUrl(), obj['journal_id'] = records[i].get('journal_header_id');
para: datas, obj['_status'] = 'update';
success: function(res) { datas[i] = obj;
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
$('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
} }
var transfer_ref_flag = 'N'; Leaf.request({
url: $('transfer_ref_link').getUrl(),
function hls301_journal_post_ref() { para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
transfer_ref_flag = 'Y';
//hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
function hls301_journal_post() {
debugger;
var url = $('test_link').getUrl();
if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else {
f_hls.winMask(); f_hls.winMask();
var ds = $('hls_journal_header_result_ds'); var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected(); var records = ds.getSelected();
...@@ -148,158 +195,33 @@ ...@@ -148,158 +195,33 @@
obj['journal_id'] = records[i].get('journal_header_id'); obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update'; obj['_status'] = 'update';
datas[i] = obj; datas[i] = obj;
if (records[i].get('je_transaction_code') == 'FIN_INCOME_RECOGNITION') {
// if(transfer_ref_flag == 'N'){
// Leaf.showMessage('${l:HLS.PROMPT}', '收入确认凭证请先传递凭证辅助段');
// f_hls.winNoMask();
// return;
// }
url = $('transfer_voucher_link').getUrl();
}
} }
Leaf.request({ Leaf.request({
url: $('transfer_ref_link').getUrl(), url: $('check_link').getUrl(),
para: datas, para: datas,
success: function(res) { success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
transfer_ref_flag = 'Y';
//hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
// function hls301_journal_post() {
// var url=$('test_link').getUrl();
// if(0){
// Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
// }else{
// f_hls.winMask();
// var ds = $('hls_journal_header_result_ds');
// var records = ds.getSelected();
// if (records.length == 0) {
// f_hls.winNoMask();
// return;
// }
// var datas = [];
// for (var i = 0;i < records.length;i++) {
// var obj = {};
// obj['journal_id'] = records[i].get('journal_header_id');
// obj['_status'] = 'update';
// datas[i] = obj;
// if(records[i].get('je_transaction_code')=='FIN_INCOME_RECOGNITION'){
// // if(transfer_ref_flag == 'N'){
// // Leaf.showMessage('${l:HLS.PROMPT}', '收入确认凭证请先传递凭证辅助段');
// // f_hls.winNoMask();
// // return;
// // }
// url =$('transfer_voucher_link').getUrl();
// }
// }
// Leaf.request({
// url: $('check_link').getUrl(),
// para: datas,
// success: function(res) {
// Leaf.request({
// url: url,
// para: datas,
// success: function(res) {
// f_hls.winNoMask();
// Leaf.SideBar.show({
// msg: '${l:HLS.SUBMIT_SUCCESS}',
// duration: 2000
// });
// hls301_journal_query();
// },
// failure: function() {
// f_hls.winNoMask();
// },
// error: function() {
// f_hls.winNoMask();
// },
// scope: this
// });
// },
// failure: function() {
// f_hls.winNoMask();
// },
// error: function() {
// f_hls.winNoMask();
// },
// scope: this
// });
// }}
function hls_journal_post_kingdee() {
var url = $('transfer_voucher_link').getUrl();
if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
//Check
if (records[i].get('kingdee_line_assist_flag') == 'N') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '辅助账信息有误或缺失,请检查数据!');
return;
}
if (records[i].get('post_gl_status') == 'CLOSE') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,请重新选择!');
return;
}
var obj = {};
obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
Leaf.showConfirm('提示', '确定导入凭证到金蝶吗?', function() {
Leaf.request({ Leaf.request({
url: $('check_link').getUrl(), url: url,
para: datas, para: datas,
success: function(res) { success: function(res) {
Leaf.request({ f_hls.winNoMask();
url: url,
para: datas, Leaf.SideBar.show({
success: function(res) { msg: '${l:HLS.SUBMIT_SUCCESS}',
f_hls.winNoMask(); duration: 2000
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() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
}); });
hls301_journal_query();
}, },
failure: function() { failure: function() {
f_hls.winNoMask(); f_hls.winNoMask();
...@@ -309,105 +231,203 @@ ...@@ -309,105 +231,203 @@
}, },
scope: this scope: this
}); });
}, function() {
},
failure: function() {
f_hls.winNoMask(); f_hls.winNoMask();
}); },
} error: function() {
f_hls.winNoMask();
},
scope: this
});
} }
}
//凭证关闭
function journal_submit_unpost(datas) {
function hls_journal_close() { Leaf.request({
f_hls.winMask(); url: $('hls_journal_unpost_to_gld_link').getUrl(),
var ds = $('hls_journal_header_result_ds'); para: datas,
var records = ds.getSelected(); success: function(res) {
if (records.length == 0) {
f_hls.winNoMask(); f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据'); Leaf.SideBar.show({
return; msg: '${l:HLS.SUBMIT_SUCCESS}',
} duration: 2000
var datas = [];
for (var i = 0;i < records.length;i++) {
if (records[i].get('post_gl_status') == 'Y') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '已过账凭证无法关闭,请重新选择!');
return;
}
if (records[i].get('post_gl_status') == 'CLOSE') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,无需重复操作!');
return;
}
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
Leaf.showConfirm('提示', '确定关闭所选凭证吗?', function() {
Leaf.request({
url: $('hls_journal_close_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
}); });
}, function() { $('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask(); f_hls.winNoMask();
}); },
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
function hls301_journal_unpost() {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
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_submit_unpost(datas);
function journal_submit_unpost(datas) { }
function on_loan_journal_header_query(ds, qpara) {
qpara['gld_flag'] = 'N';
}
function hls301_bp_send() {
Leaf.showConfirm('提示', '商业伙伴(项目已创建合同)同步至SBO,(上限400)您确定继续吗?', function() {
lock_current_window();
Leaf.request({ Leaf.request({
url: $('hls_journal_unpost_to_gld_link').getUrl(), url: $('hls301_send_bp_to_sbo').getUrl(),
para: datas, success: function() {
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}', msg: '提交成功',
duration: 2000 duration: 3000
}); });
$('hls_journal_header_result_ds').query(); unlock_current_window();
//$('hls_journal_header_result_ds').query();
}, },
failure: function() { failure: function() {
f_hls.winNoMask(); unlock_current_window();
}, },
error: function() { error: function() {
f_hls.winNoMask(); unlock_current_window();
}, },
scope: this scope: this
}); });
});
}
//手动传输凭证
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}';
var sbo_detail_limit = '${get_limit/record/@sbo_detail_limit}';
if (isNaN(limit)){
Leaf.showMessage('${l:HLS.PROMPT}', '传输上限获取失败,请联系管理员!');
return;
} }
if (records.length < 1) {
function hls301_journal_unpost() { Leaf.showMessage('${l:HLS.PROMPT}', '请选择至少一条数据');
f_hls.winMask(); return;
var ds = $('hls_journal_header_result_ds'); }
var records = ds.getSelected(); var datas = [];
if (records.length == 0) {
f_hls.winNoMask(); 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; return;
} }
var datas = []; je_detail_count = Number(records[i].get('je_detail_count'));
for (var i = 0;i < records.length;i++) { count = je_detail_count + Number(count);
var obj = {}; var data = {
obj['journal_header_id'] = records[i].get('journal_header_id'); journal_header_id: records[i].get('journal_header_id')
obj['_status'] = 'execute'; };
datas[i] = obj; datas.push(data);
}
journal_submit_unpost(datas);
} }
/* if (count > limit) {
function on_loan_journal_header_query(ds, qpara) { batch_flag = 'Y';
qpara['gld_flag'] = 'N'; } else {
batch_flag = 'N';
} */
if (count > sbo_detail_limit) {
Leaf.showMessage('${l:HLS.PROMPT}', '选择的凭证总行数超过了能够传输的最大的数量' + sbo_detail_limit + '条,')
return;
} }
batch_flag = 'Y'; // 全部修改为异步传输
var queryParams = new Object();
queryParams['details'] = datas;
queryParams['batch_flag'] = batch_flag;
/* if (count > limit) {
Leaf.showConfirm('提示', '由于凭证行数超过'+limit+'行,传输至SBO后不能立即得到返回结果,您确定继续吗?', function() { */
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: 3000
});
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
},
error: function() {
unlock_current_window();
},
scope: this
});
} */
}
function hls_journal_header_result_func(record, name) {
if (name == 'post_gl_log') {
return 'hls_journal_headers_grid_textArea_id';
}
return '';
}
function select_check_box(record) {
if (record.get('post_gl_status') == 'Y' || record.get('post_gl_status') == 'PROCESSING') {
return false;
} else if (record.get('post_gl_status') == 'FAILURE') {
return true;
}
if (record.get('je_transaction_code') == 'HL_PAYMENT_FEE_1') {
return true;
} else if (record.get('je_transaction_code') == 'HL_PAYMENT_FEE') {
return true;
} else {
return true;
}
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets> <a:dataSets>
...@@ -428,7 +448,7 @@ ...@@ -428,7 +448,7 @@
<a:field name="period_name"/> <a:field name="period_name"/>
<a:field name="external_journal_num"/> <a:field name="external_journal_num"/>
<a:field name="bp_id_tenant"/> <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="400" lovHeight="550" lovService="hls.HLS301.hls_bp_master_v_for_lov" lovWidth="500">
<a:mapping> <a:mapping>
<a:map from="bp_name" to="bp_id_tenant_desc"/> <a:map from="bp_name" to="bp_id_tenant_desc"/>
<a:map from="bp_id" to="bp_id_tenant"/> <a:map from="bp_id" to="bp_id_tenant"/>
...@@ -489,7 +509,7 @@ ...@@ -489,7 +509,7 @@
<a:event name="update" handler="onUpdate_para_journalQueryDs"/> <a:event name="update" handler="onUpdate_para_journalQueryDs"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query" 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:fields> <a:fields>
<a:field name="post_gl_log" readOnly="true"/> <a:field name="post_gl_log" readOnly="true"/>
</a:fields> </a:fields>
...@@ -501,17 +521,17 @@ ...@@ -501,17 +521,17 @@
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<!-- <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/> --> <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/>
<a:toolbarButton click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/> <a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/>
<a:toolbarButton click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_new" text="手工创建"/> <a:toolbarButton click="hls301_journal_new" text="手工创建"/>
<a:toolbarButton id="hls301_journal_post_ref_id" click="hls_journal_post_kingdee" text="凭证传输"/> <a:toolbarButton click="hls301_journal_send" text="凭证传输"/>
<a:toolbarButton id="hls301_journal_close_id" click="hls_journal_close" text="凭证关闭"/> <a:toolbarButton click="hls301_bp_send" text="商业伙伴传输"/>
<!-- <a:toolbarButton id="hls301_journal_post_ref_id" click="hls301_journal_post_ref" text="传辅助段"/> --> <!-- <a:toolbarButton id="hls301_journal_post_ref_id" click="hls301_journal_post_ref" text="传辅助段"/> -->
<!-- <a:toolbarButton click="hls301_journal_post" text="HLS530.JOURNAL_POST_GL"/> --> <!-- <a:toolbarButton click="hls301_journal_post" text="HLS530.JOURNAL_POST_GL"/> -->
<!-- <a:toolbarButton click="hls301_journal_unpost" text="HLS530.JOURNAL_UNPOST_GL"/> --> <!-- <a:toolbarButton click="hls301_journal_unpost" text="HLS530.JOURNAL_UNPOST_GL"/> -->
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="80" title="HAP_QUERY_TITLE"> <a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_NUM"/> <a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_NUM"/>
<a:comboBox name="merge_parent_flag_desc" bindTarget="hls_journal_header_query" prompt="合并凭证"/> <a:comboBox name="merge_parent_flag_desc" bindTarget="hls_journal_header_query" prompt="合并凭证"/>
<!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/> <!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/>
...@@ -522,13 +542,13 @@ ...@@ -522,13 +542,13 @@
<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_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:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
<a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/> <a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/>
<a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="HLS.TENANT_CODE"/> <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:comboBox name="post_gl_status_desc" bindTarget="hls_journal_header_query" prompt="HLS530.IS_POSTED"/>
<a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/> <a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/>
<!-- <a:textField name="external_journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.EXTERNAL_JOURNAL_NUM"/> --> <!-- <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="reference1" bindTarget="hls_journal_header_query" prompt="HLS530.REFERENCE1"/> -->
</a:form> </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:columns> <a:columns>
<a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM" renderer="hls301_journal_num_render" width="120"/> <a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM" renderer="hls301_journal_num_render" width="120"/>
<a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/> <a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/>
...@@ -540,7 +560,10 @@ ...@@ -540,7 +560,10 @@
<a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/> <a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/>
<a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/> <a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/>
<a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/> <a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/>
<!-- <a:column name="external_journal_num" align="center" prompt="NC凭证号" width="100"/> --> <a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<a:column name="sbo_num" align="center" prompt="SBO凭证号" width="100"/>
<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="post_gl_log" editor="hls530_textArea_id" prompt="金蝶日志" width="200"/> --> <!--<a:column name="post_gl_log" editor="hls530_textArea_id" prompt="金蝶日志" width="200"/> -->
</a:columns> </a:columns>
<a:editors> <a:editors>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: zengyuxuan $Author: zengyuxuan
$Date: 2016-11-16 上午10:30:00 $Date: 2016-11-16 上午10:30:00
$Revision: 1.0 $Revision: 1.0
$Purpose: 产品方案定义 $Purpose: 产品方案定义
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true">
<a:init-procedure><![CDATA[ <a:init-procedure><![CDATA[
]]></a:init-procedure> ]]></a:init-procedure>
<a:view> <a:view>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/> <a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<a:link id="get_new_journal_num_link_id" model="hls.HLS530.get_new_journal_number" modelaction="update"/> <a:link id="get_new_journal_num_link_id" model="hls.HLS530.get_new_journal_number" modelaction="update"/>
<a:link id="get_kingdee_line_flag" model="hls.HLS301.get_kingdee_line_flag" modelaction="update"/> <a:link id="get_document_type_id" model="csh.CSH511.get_document_type" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/> <script><![CDATA[
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<style type="text/css"><![CDATA[ window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
.SelectBG{ var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
background-color:#FFC0CB; var detail_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN', 'hls_journal_detail');
} var journal_record = $(journal_ds_id).getAt(0);
]]></style> var je_records = $(detail_ds_id).getAll();
<script type="text/javascript"><![CDATA[ var sum_dr = 0;
jQuery.noConflict(); var sum_cr = 0;
for (var i=0;i<je_records.length;i++){
var isLoaded = 'N'; var je_record = je_records[i];
// set单元格颜色 load事件无法实现效果 if(!isNaN(je_record.get('amount_dr'))){
var check_isload = setInterval(function() { sum_dr = (Number(sum_dr) + Number(je_record.get('amount_dr'))).toFixed(2);
// }
if (isLoaded == 'N') { if(!isNaN(je_record.get('amount_cr'))){
var ids = $('${/parameter/@layout_code}_JE_LN_hls_journal_detail_ds'); sum_cr = (Number(sum_cr) + Number(je_record.get('amount_cr'))).toFixed(2);
var ref_ids = $('${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_ds'); }
var idsRecord = ids.getAll(); }
var ref_idsRecord = ref_ids.getAll(); var check_flag = false;
for (var i = 0;i < idsRecord.length;i++) { if((sum_dr != sum_cr)&&(sum_dr != 0)){
var rowData = idsRecord[i]; Leaf.showMessage('提示','借贷总额必须相等');
var ids_rowData = idsRecord[i]; window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var kingdee_line_flag = ids_rowData.get('kingdee_line_flag'); return false;
//kingdee_line_flag为C代表金蝶支付表编号不为空,为B代表金蝶客户编号不为空 }else{
if (kingdee_line_flag == 'N' || kingdee_line_flag == 'C' || kingdee_line_flag == 'B') { if (journal_record.get('journal_num')) {
tr_id = '#${/parameter/@layout_code}_JE_LN_hls_journal_detail_layout_grid_id-u-' + rowData.id; return true;
jQuery(tr_id).removeClass("row-selected").addClass('SelectBG'); }
} window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
} Leaf.request({
for (var j = 0;j < ref_idsRecord.length;j++) { url: $('get_new_journal_num_link_id').getUrl(),
var ref_rowData = ref_idsRecord[j]; para: {
kingdee_line_flag = ref_rowData.get('kingdee_line_flag'); document_category: '${/parameter/@document_category}',
//kingdee_line_flag为C代表金蝶支付表编号不为空,为B代表金蝶客户编号不为空 document_type: record.get('document_type')
if (kingdee_line_flag == 'N') { },
tr_ref_id = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference1_' + ref_rowData.id; success: function(res) {
jQuery(tr_ref_id).removeClass("row-selected").addClass('SelectBG'); var document_number = res.result.document_number;
tr_ref_id_2 = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference3_' + ref_rowData.id; journal_record.set('journal_num', document_number);
jQuery(tr_ref_id_2).removeClass("row-selected").addClass('SelectBG'); check_flag = true;
} else if (kingdee_line_flag == 'C') { window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
tr_ref_id = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference3_' + ref_rowData.id; },
jQuery(tr_ref_id).removeClass("row-selected").addClass('SelectBG'); error: function() {
} else if (kingdee_line_flag == 'B') { window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
tr_ref_id = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference1_' + ref_rowData.id; },
jQuery(tr_ref_id).removeClass("row-selected").addClass('SelectBG'); failure: function() {
} window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} },
} else { sync: true,
clearInterval(check_isload); scope: this
} });
}, 1000); return check_flag;
}
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) { };
var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var detail_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN', 'hls_journal_detail'); window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
var journal_record = $(journal_ds_id).getAt(0); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var je_records = $(detail_ds_id).getAll(); var detail1_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN_REF1', 'hls_journal_detail');
var sum_dr = 0; var header_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_HD', 'hls_journal_header');
var sum_cr = 0; $(detail1_ds_id).query();
for (var i = 0;i < je_records.length;i++) { var header_ds_record = $(header_ds_id).getAt(0);
var je_record = je_records[i]; var document_type = header_ds_record.get('document_type');
if (!isNaN(je_record.get('amount_dr'))) { var journal_num = header_ds_record.get('journal_num');
sum_dr = plus(sum_dr, je_record.get('amount_dr')); if (!header_ds_record.get('post_gl_status')){
} header_ds_record.set('post_gl_status', 'N');
if (!isNaN(je_record.get('amount_cr'))) { }
sum_cr = plus(sum_cr, je_record.get('amount_cr')); header_ds_record.set('reversed_flag', 'N');
}
} if (name = 'document_type') {
var check_flag = false; Leaf.request({
if ((sum_dr != sum_cr) && (sum_dr != 0)) { url: $('get_document_type_id').getUrl(),
Leaf.showMessage('提示', '借贷总额必须相等'); para: {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); document_type: document_type,
return false; //journal_header_id: '${/parameter/@journal_header_id}',
} else { journal_num: journal_num
if (journal_record.get('journal_num')) { },
return true; success: periodname,
} scope: this
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); });
Leaf.request({ }
url: $('get_new_journal_num_link_id').getUrl(), };
para: {
document_category: '${/parameter/@document_category}', window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
document_type: record.get('document_type') if(name=='journal_date'){
}, var journal_date = record.get('journal_date');
success: function(res) { journal_date = Leaf.formatDate(journal_date);
var document_number = res.result.document_number; Leaf.request({
journal_record.set('journal_num', document_number); url: $('get_period_name_id').getUrl(),
check_flag = true; para: {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); p_date: journal_date
}, },
error: function() { success: periodname,
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); scope: this
}, });
failure: function() { }else if(name=='amount_dr'){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); record.set('amount_fuc_dr',value);
}, }else if(name=='amount_cr'){
sync: true, record.set('amount_fuc_cr',value);
scope: this }
}); };
return check_flag;
} function periodname(res) {
var journal_ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
}; var journal_record1 = $(journal_ds_id1).getAt(0);
if (res) {
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) { var period_name = res.result.record.period_name;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); var period_year = res.result.record.period_year;
var detail1_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN_REF1', 'hls_journal_detail'); var period_num = res.result.record.period_name.substring(5, 7);
$(detail1_ds_id).query(); var internal_period_num = res.result.record.internal_period_num;
}; var period_set_code = res.result.record.period_set_code;
journal_record1.set('period_name', period_name);
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) { journal_record1.set('period_year', period_year);
if (name == 'journal_date') { journal_record1.set('period_num', period_num);
var journal_date = record.get('journal_date'); journal_record1.set('internal_period_num', internal_period_num);
journal_date = Leaf.formatDate(journal_date); journal_record1.set('period_set_code', period_set_code);
Leaf.request({ }
url: $('get_period_name_id').getUrl(), }
para: {
p_date: journal_date window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
}, var bp_info_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
success: periodname, record.set('je_company_id', 1);
scope: this record.set('je_company_id_n', '宏菱租赁');
}); record.set('currency_code', 'CNY');
} else if (name == 'amount_dr') { record.set('currency_code_n', '人民币');
record.set('amount_fuc_dr', value); // record.set('je_transaction_code', 'MANUAL');
} else if (name == 'amount_cr') { // record.set('je_transaction_code_n', '手工生成');
record.set('amount_fuc_cr', value); //record.set('post_gl_status', 'N');
} if(!record.get('post_gl_status')){
};
record.set('post_gl_status', 'N');
function periodname(res) { }
var journal_ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header'); record.set('exchange_rate', 1);
var journal_record1 = $(journal_ds_id1).getAt(0); record.set('reversed_flag', 'N');
if (res) { record.set('source_table', 'hls_journal_header');
var period_name = res.result.record.period_name; record.set('company_id', 1);
var period_year = res.result.record.period_year; };
var period_num = res.result.record.period_num; ]]></script>
var internal_period_num = res.result.record.internal_period_num; <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
var period_set_code = res.result.record.period_set_code; </a:view>
journal_record1.set('period_name', period_name); </a:screen>
journal_record1.set('period_year', period_year);
journal_record1.set('period_num', period_num);
journal_record1.set('internal_period_num', internal_period_num);
journal_record1.set('period_set_code', period_set_code);
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_info_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var manual_flag = '${/parameter/@manual_flag}';
if (manual_flag == 'Y') {
record.set('je_company_id', 1);
record.set('je_company_id_n', '宏菱融资租赁(上海)有限公司');
record.set('je_transaction_code', 'MANUAL');
record.set('je_transaction_code_n', '手工生成');
record.set('post_gl_status', 'N');
record.set('currency_code', 'CNY');
record.set('currency_code_n', '人民币')
record.set('exchange_rate', 1);
record.set('reversed_flag', 'N');
record.set('source_table', 'HLS_JOURNAL_HEADER');
record.set('company_id', 1);
}
};
//导出
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = '${/parameter/@layout_code}_JE_LN_hls_journal_detail_ds';
var ref_ds_id = '${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_ds';
var grid_id = ds_id.replace('ds', 'layout_grid_id');
var ref_grid_id = ref_ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export();
$(ref_grid_id)._export();
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment