Commit 4fa26125 authored by liyuan.chen's avatar liyuan.chen

核销反冲部分修改,合同结束查询,债权月报

parent 081ec636
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 下午06:07:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=> ${@invoice_hd_ids},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_reject(p_invoice_hd_id=> ${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
......@@ -392,9 +392,9 @@
AND (t.contract_status IN ('INCEPT',
'TERMINATING',
'ETING',
'REPURING',
'ET') or
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} and t.contract_status = 'TERMINATE'))
'REPURING') or
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} and t.contract_status in ('TERMINATE',
'ET')))
and trunc(t.lease_start_date) <= trunc(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd')))
]]>
</bm:query-sql>
......
......@@ -37,7 +37,7 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
......
......@@ -36,7 +36,7 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/>
<bm:field name="division_n"/>
......
......@@ -79,8 +79,8 @@
<bm:field name="paid_byother_flag"/>
<bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/>
<bm:field name="ref_n01"/>
<bm:field name="approval_status" expression="nvl((select nvl(cw.approval_status, &apos;NEW&apos;) from csh_transaction_wfl cw where cw.transaction_wfl_id = t1.transaction_wfl_id), &apos;NEW&apos;)"/>
<bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;COST_SUPPORT_STATUS&apos; And v.code_value = nvl((Select cw.approval_status From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), &apos;NEW&apos;))"/>
<bm:field name="approval_status" expression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;WFL_STATUS&apos; And v.code_value = decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
<bm:field name="transaction_wfl_id"/>
</bm:fields>
<bm:features>
......@@ -92,7 +92,7 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>-->
<bm:data-filter name="approval_status" enforceOperations="query" expression="('APPROVED' != nvl((select nvl(cw.approval_status, 'NEW') from csh_transaction_wfl cw where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:data-filter name="approval_status" enforceOperations="query" expression="('APPROVED' != decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="receipt_type" queryOperator="="/>
......@@ -146,5 +146,6 @@ and cwo.reversed_flag = 'N'
and cc.data_class = 'NORMAL'
and cwo.csh_transaction_id = t1.transaction_id
and hbm.bp_name like ${@bp_name_r})"/>
<bm:query-field name="approval_status" queryExpression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')) = ${@approval_status}"/>
</bm:query-fields>
</bm:model>
......@@ -7,8 +7,8 @@
t.transaction_wfl_id,
t.transaction_id,
t.transaction_num,
t.transaction_date,
t.reversed_date,
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
to_char(t.reversed_date, 'yyyy-mm-dd') reversed_date,
t.reversed_period_name,
t.description,
t.note,
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-insert model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</batch-apply>
<a:model-execute model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="acr512_currency_list"/>
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list"
rootPath="acr512_business_type_list"/>
</a:init-procedure>
<a:view>
<a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="execute"/>
<a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="acr512_invoice_update_page"
url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_detail.lview"/>
<!--<a:link id="acr512_invoice_update_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.screen"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="acr512_submit_id" model="acr.ACR512.acr_invoice_hd_batch" modelaction="update"/>
<a:link id="get_document_number_link" model="acr.ACR512.get_document_number" modelaction="query"/>
<a:link id="acr512_update_for_submit_id" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_for_submit.lsc"/>
<script><![CDATA[
//提交复核
function acr512_invoice_submit_selected() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length == 0) {
$L.showInfoMessage('提示', '请至少选择一条数据!');
} else {
var invoice_hd_ids = '';
//判断单据的状态
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
var detail_mask = Ext.getBody();
Leaf.showConfirm('提示', "确认执行该操作?", function () {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids,
want_status: 'CONFIRMING'
},
success: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr512_invoice_result_ds').query();
},
error: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
},
scope: this
});
}, function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
})
}
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function acr512_invoice_query() {
$('acr512_invoice_result_ds').query();
var records = $('acr512_invoice_result_ds').getAll();
for (var i = 0; i < records.length; i++) {
var record = record[i];
var invoice_hd_id = record.get('invoice_hd_id');
Leaf.request({
url: $('get_document_number_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id
},
success: function (res) {
var document_number = record[i].get('document_number');
if (res.result.record['isreturn'] > 0) {
return '<font color="red">' + document_number + '</font> ';
} else {
return value;
}
}
});
}
$('acr512_invoice_result_ds').query();
}
function acr512_invoice_reset() {
$('acr512_invoice_query_ds').reset();
}
function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
if (param['invoice_status'] == 'CONFIRMING') {
param['function_code'] = 'ACR512R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
} else {
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
}
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
}
// return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
function acr512_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
function acr512_invoice_query_Onupdate(ds, record, name, value, oldVlaue) {
if (name == 'document_number_f') {
if (Leaf.isEmpty(record.get('document_number_t'))) {
record.set('document_number_t', value);
}
} else if (name == 'project_number_f') {
if (Leaf.isEmpty(record.get('project_number_t'))) {
record.set('project_number_t', value);
}
} else if (name == 'invoice_number_f') {
if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('invoice_number_t', value);
}
} else if (name == 'contract_number_f') {
if (Leaf.isEmpty(record.get('contract_number_t'))) {
record.set('contract_number_t', value);
}
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
}
}
if (Ext.isEmpty(record.get('project_number_f')) && Ext.isEmpty(record.get('project_number_t'))) {
record.set('query_project_number', '');
} else {
record.set('query_project_number', 'Y');
}
if (Ext.isEmpty(record.get('contract_number_f')) && Ext.isEmpty(record.get('contract_number_t'))) {
record.set('query_contract_number', '');
} else {
record.set('query_contract_number', 'Y');
}
}
function acr512_invoice_delete() {
$('acr512_invoice_update_grid_ds').remove();
}
//发票提交
function acr512_invoice_submit() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('status') == 'APPROVED' || records[i].get('statsu') == 'APPROVING') {
Leaf.showMessage('${l:HLS.PROMPT}', '该发票正在审批中或已审批通过,不可重复提交');
return;
}
if (i == 0) { //modify by wuts for hl 2018-12-23
var invoice_hd_ids = records[0].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_submit_id').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
function acr512_invoice_insert() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = {};
var saveData = [];
var invoice_hd_ids = '';
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
datas['invoice_hd_ids'] = invoice_hd_ids;
datas['details'] = saveData;
Leaf.showConfirm('提示', '您确认新建申请吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_update_for_submit_id').getUrl(),
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="acr512_currency_ds">
<a:datas dataSource="/model/acr512_currency_list"/>
</a:dataSet>
<a:dataSet id="acr512_business_type_ds">
<a:datas dataSource="/model/acr512_business_type_list"/>
</a:dataSet>
<a:dataSet id="acr512_invoice_kind_ds" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr512_invoice_status_ds" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="hls_lease_channel_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="acr512_invoice_query_ds">
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds"
returnField="currency" valueField="currency_code"/>
<a:field name="invoice_status_n" displayField="code_value_name" options="acr512_invoice_status_ds"
returnField="invoice_status" valueField="code_value"/>
<a:field name="invoice_kind"/>
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds"
returnField="invoice_kind" valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc"
options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
<a:mapping>
<a:map from="user_id" to="created_by"/>
<a:map from="description" to="created_by_name"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping>
</a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_f"/>
</a:mapping>
</a:field>
<a:field name="project_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_t"/>
</a:mapping>
</a:field>
<a:field name="contract_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_f"/>
</a:mapping>
</a:field>
<a:field name="contract_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_t"/>
</a:mapping>
</a:field>
<a:field name="lease_channel"/>
<a:field name="lease_channel_desc" displayField="description" options="hls_lease_channel_ds"
returnField="lease_channel" valueField="lease_channel"/>
</a:fields>
<a:events>
<a:event name="update" handler="acr512_invoice_query_Onupdate"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr512_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
<!-- <a:fields>-->
<!-- <a:field name="compare_date_flag"/>-->
<!-- </a:fields>-->
<!-- <a:events>-->
<!-- <a:event name="load" handler="load_do_info"/>-->
<!-- </a:events>-->
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr512_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr512_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr512_invoice_delete" text="HLS.REMOVE"/>
<!--<a:toolbarButton click="acr512_invoice_submit_selected" text="提交复核"/>-->
<a:toolbarButton click="acr512_invoice_insert" text="新建申请"/>
<!--
<a:toolbarButton click="acr512_invoice_submit" text="HLS.SUBMIT"/>
-->
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="应收发票维护">
<a:hBox labelSeparator=" ">
<a:textField name="document_number_f" bindTarget="acr512_invoice_query_ds"
prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
-->
<a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到"
width="135"/>
<a:textField name="contract_name" bindTarget="acr512_invoice_query_ds" prompt="合同名称" width="353"/>
<!-- <a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="contract_number_t" bindTarget="acr512_invoice_query_ds" prompt="合同编号到" width="135"/>-->
<!-- <a:lov name="project_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
<a:lov name="project_number_t" bindTarget="acr512_invoice_query_ds" prompt="" width="135"/>-->
<!--
<a:comboBox name="business_type_desc" bindTarget="acr512_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
-->
<!--
<a:comboBox name="lease_channel_desc" bindTarget="acr512_invoice_query_ds" prompt="商业模式" width="135"/>
-->
<!-- <a:comboBox name="currency_name" bindTarget="acr512_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/> -->
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="accounting_date_f" bindTarget="acr512_invoice_query_ds" prompt="记账日期从"
width="135"/>
<!--
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
-->
<a:datePicker name="accounting_date_t" bindTarget="acr512_invoice_query_ds" prompt="记账日期到"
width="135"/>
<a:lov name="created_by_name" bindTarget="acr512_invoice_query_ds" prompt="创建人" width="135"/>
<a:textField name="invoice_title" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_TITLE"
width="135"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="invoice_date_f" bindTarget="acr512_invoice_query_ds" prompt="发票日期从"
width="135"/>
<!--
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
-->
<a:datePicker name="invoice_date_t" bindTarget="acr512_invoice_query_ds" prompt="发票日期到"
width="135"/>
<!-- <a:lov name="invoice_bp_code_f" bindTarget="acr512_invoice_query_ds" prompt="客户编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_bp_name" bindTarget="acr512_invoice_query_ds" prompt="客户名称" width="135"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND"
width="135"/>
<a:comboBox name="invoice_status_n" bindTarget="acr512_invoice_query_ds" prompt="发票状态" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="HLS.DOCUMENT_NUMBER"
renderer="acr512_document_number_render" width="120"/>
<a:column name="invoice_bp_name" autoAdjust="false" prompt="HLS.CUSTOMER_NAME" showTitle="true"
width="100"/>
<a:column name="contract_name" autoAdjust="false" prompt="HLS.CONTRACT_NAME" showTitle="true"
width="150"/>
<!--
<a:column name="business_type_desc" prompt="HLS.BUSINESS_TYPE_DESC" width="80"/>
-->
<a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>
<!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/> -->
<a:column name="invoice_date" prompt="ACR.INVOICE_DATE" width="100"/>
<!-- <a:column name="project_name" autoAdjust="false" prompt="HLS.PROJECT_NAME" showTitle="true" width="150"/> -->
<!-- <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/> -->
<!-- <a:column name="bp_code" prompt="HLS.CUSTOMER_NUMBER" width="100"/> -->
<a:column name="invoice_title" autoAdjust="false" prompt="ACR.INVOICE_TITLE" showTitle="true"
width="150"/>
<!-- <a:column name="total_amount" align="right" prompt="ACR.TOTAL_AMOUNT" renderer="Aurora.formatMoney" width="100"/> -->
<!-- <a:column name="currency" prompt="HLS.CURRENCY" width="80"/> -->
<a:column name="created_by_name" autoAdjust="false" prompt="创建人" showTitle="true" width="150"/>
<a:column name="invoice_status_desc" prompt="ACR.INVOICE_STATUS" width="100"/>
<a:column name="accounting_date" prompt="HLS.ACCOUNT_DATE" width="100"/>
<!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> -->
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> -->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="acr610_invoice_detail_link" url="${/request/@context_path}/modules/acr/acr610/acr_invoice_detail_update_detail.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="acr610_detail_submit_link" model="acr.acr610.acr_invoice_apply_detail" modelaction="update"/>
<a:link id="attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script><![CDATA[
function lock_current_detail_window() {
Leaf.Masker.mask($('${/parameter/@win_id}').wrap, '${l:HLS.EXECUTING}');
}
function unlock_current_detail_window() {
Leaf.Masker.unmask($('${/parameter/@win_id}').wrap);
}
function acr610_invoice_detail_exit() {
$('${/parameter/@win_id}').close();
}
function acr610_invoice_detail_query() {
$('acr610_invoice_detail_result_ds').query();
}
function acr610_invoice_detail_reset() {
$('acr610_invoice_detail_query_ds').reset();
}
function acr610_invoice_detail_submit() {
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_detail_window();
Leaf.request({
url: $('acr610_detail_submit_link').getUrl(),
para: {
invoice_apply_id: '${/parameter/@invoice_apply_id}'
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_detail_window();
acr610_invoice_detail_exit();
},
failure: function () {
unlock_current_detail_window();
},
error: function () {
unlock_current_detail_window();
},
scope: this
});
});
}
function acr610_detail_grid_readonly(reocrd_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['winid'] = 'confirm_invoice_detail_win';
param['document_id'] = invoice_hd_wfl_id;
param['url_title'] = '${l:ACR.INVOICE_DETAIL_DETAIL}';
param['function_code'] = 'ACR610R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr610_invoice_detail_link');
}
function acr610_detail_upload_window(write_off_id) {
if(write_off_id){
var url = $('attachment_uploadFile_id').getUrl() + '?table_name=ACR_INVOICE_APPLY&header_id=' + record.get('write_off_id');
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'acr_apply_cdd_attachtment_upload_id',
width: 850,
height: 400
});
}else {
Leaf.showMessage('${l:HLS.PROMPT}', '无法上传,请联系管理员!');
}
}
function acr610_detail_renderer(value, record, name) {
if (name == 'document_number') {
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + '\');">' + value + '</a>';
}
if(name == 'attachment'){
if(record.get('paid_byother_flag') == 'T'){
return '<a href="javascript:acr610_detail_upload_window(\'' + record.get('write_off_id') + '\')">附件</a>';
}
}
}
function acr610_detail_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<!--<a:dataSet id="acr610_invoice_apply_query_ds">
<a:fields>
<a:field name="invoice_apply_num"/>
<a:field name="invoice_apply_user_n"/>
<a:field name="invoice_apply_date"/>
</a:fields>
</a:dataSet>-->
<a:dataSet id="acr610_ipaid_byother_flag_ds" lookupCode="PAID_BYOTHER_FLAG"/>
<a:dataSet id="acr610_invoice_detail_query_ds">
<a:fields>
<a:field name="contract_number"/>
<a:field name="bp_code"/>
<a:field name="journal_month"/>
<a:field name="paid_byother_flag_n" displayField="code_value_name" options="acr610_ipaid_byother_flag_ds"
returnField="paid_byother_flag" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr610_invoice_detail_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
model="acr.acr610.acr_invoice_apply_detail" queryUrl="${/request/@context_path}/autocrud/acr.acr610.acr_invoice_apply_detail/query?invoice_apply_id=${/parameter/@invoice_apply_id}" queryDataSet="acr610_invoice_detail_query_ds"
selectable="false"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr610_invoice_detail_exit" text="HLS.EXIT"/>
<a:toolbarButton click="acr610_invoice_detail_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr610_invoice_detail_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr610_invoice_detail_submit" text="HLS.SUBMIT"/>
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="查询条件">
<a:hBox labelSeparator=" ">
<a:textField name="contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="合同编号" width="135"/>
<a:textField name="bp_code" bindTarget="acr610_invoice_detail_query_ds" prompt="客户编号" width="135"/>
<a:datePicker name="journal_month" bindTarget="acr610_invoice_detail_query_ds" prompt="税款所属期" width="135"/>
<a:comboBox name="paid_byother_flag_n" bindTarget="acr610_invoice_detail_query_ds" prompt="担保支付" width="135"/>
</a:hBox>
</a:form>
<a:form marginWidth="200" padding="0" title="基本信息">
<a:hBox labelSeparator=" ">
<a:textField name="invoice_apply_num" bindTarget="acr610_invoice_result_ds" prompt="申请编号" width="135" readOnly="true"/>
<a:textField name="invoice_apply_user_n" bindTarget="acr610_invoice_result_ds" prompt="申请人" width="135" readOnly="true"/>
<a:textField name="invoice_apply_date" bindTarget="acr610_invoice_result_ds" prompt="申请时间" width="135" readOnly="true"/>
</a:hBox>
</a:form>
<a:grid id="acr610_invoice_detail_grid_ds" bindTarget="acr610_invoice_detail_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="单据编号" renderer="acr610_detail_renderer" width="120"/>
<a:column name="contract_number" prompt="合同编号" width="100"/>
<a:column name="bp_code" prompt="客户编号" width="150"/>
<a:column name="bp_name" prompt="客户名称" width="100"/>
<a:column name="times" prompt="租期" width="100"/>
<a:column name="journal_month" prompt="税款所属期" width="150"/>
<a:column name="tax_type_rate" prompt="税率" width="150"/>
<a:column name="total_amount" prompt="开票金额" renderer="acr610_detail_formatMoney" width="150"/>
<a:column name="net_amount" prompt="不含税金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="tax_amount" prompt="税额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="paid_byother_flag_n" prompt="担保支付" width="100"/>
<a:column name="bp_bank_account_name" prompt="付款人" width="100"/>
<a:column name="transaction_amount" prompt="付款金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="write_off_due_amount" prompt="核销金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" width="100"/>
<a:column name="journal_num" prompt="增值税凭证号" width="100"/>
<a:column name="attachment" prompt="担保代付协议" width="100" renderer="acr610_detail_renderer"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="acr512_currency_list"/>
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list"
rootPath="acr512_business_type_list"/>
</a:init-procedure>
<a:view>
<a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="execute"/>
<a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="acr512_invoice_update_page"
url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_detail.lview"/>
<!--<a:link id="acr512_invoice_update_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.screen"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="acr512_submit_id" model="acr.ACR512.acr_invoice_hd_batch" modelaction="update"/>
<a:link id="get_document_number_link" model="acr.ACR512.get_document_number" modelaction="query"/>
<a:link id="acr512_update_for_submit_id" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_for_submit.lsc"/>
<script><![CDATA[
//提交复核
function acr512_invoice_submit_selected() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length == 0) {
$L.showInfoMessage('提示', '请至少选择一条数据!');
} else {
var invoice_hd_ids = '';
//判断单据的状态
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
var detail_mask = Ext.getBody();
Leaf.showConfirm('提示', "确认执行该操作?", function () {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids,
want_status: 'CONFIRMING'
},
success: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr512_invoice_result_ds').query();
},
error: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
},
scope: this
});
}, function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
})
}
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function acr512_invoice_query() {
$('acr512_invoice_result_ds').query();
var records = $('acr512_invoice_result_ds').getAll();
for (var i = 0; i < records.length; i++) {
var record = record[i];
var invoice_hd_id = record.get('invoice_hd_id');
Leaf.request({
url: $('get_document_number_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id
},
success: function (res) {
var document_number = record[i].get('document_number');
if (res.result.record['isreturn'] > 0) {
return '<font color="red">' + document_number + '</font> ';
} else {
return value;
}
}
});
}
$('acr512_invoice_result_ds').query();
}
function acr512_invoice_reset() {
$('acr512_invoice_query_ds').reset();
}
function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
if (param['invoice_status'] == 'CONFIRMING') {
param['function_code'] = 'ACR512R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
} else {
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
}
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
}
// return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
function acr512_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
function acr512_invoice_query_Onupdate(ds, record, name, value, oldVlaue) {
if (name == 'document_number_f') {
if (Leaf.isEmpty(record.get('document_number_t'))) {
record.set('document_number_t', value);
}
} else if (name == 'project_number_f') {
if (Leaf.isEmpty(record.get('project_number_t'))) {
record.set('project_number_t', value);
}
} else if (name == 'invoice_number_f') {
if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('invoice_number_t', value);
}
} else if (name == 'contract_number_f') {
if (Leaf.isEmpty(record.get('contract_number_t'))) {
record.set('contract_number_t', value);
}
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
}
}
if (Ext.isEmpty(record.get('project_number_f')) && Ext.isEmpty(record.get('project_number_t'))) {
record.set('query_project_number', '');
} else {
record.set('query_project_number', 'Y');
}
if (Ext.isEmpty(record.get('contract_number_f')) && Ext.isEmpty(record.get('contract_number_t'))) {
record.set('query_contract_number', '');
} else {
record.set('query_contract_number', 'Y');
}
}
function acr512_invoice_delete() {
$('acr512_invoice_update_grid_ds').remove();
}
//发票提交
function acr512_invoice_submit() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('status') == 'APPROVED' || records[i].get('statsu') == 'APPROVING') {
Leaf.showMessage('${l:HLS.PROMPT}', '该发票正在审批中或已审批通过,不可重复提交');
return;
}
if (i == 0) { //modify by wuts for hl 2018-12-23
var invoice_hd_ids = records[0].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_submit_id').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
function acr512_invoice_insert() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = {};
var saveData = [];
var invoice_hd_ids = '';
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
datas['invoice_hd_ids'] = invoice_hd_ids;
datas['details'] = saveData;
Leaf.showConfirm('提示', '您确认新建申请吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_update_for_submit_id').getUrl(),
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="acr512_currency_ds">
<a:datas dataSource="/model/acr512_currency_list"/>
</a:dataSet>
<a:dataSet id="acr512_business_type_ds">
<a:datas dataSource="/model/acr512_business_type_list"/>
</a:dataSet>
<a:dataSet id="acr512_invoice_kind_ds" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr512_invoice_status_ds" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="hls_lease_channel_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="acr512_invoice_query_ds">
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds"
returnField="currency" valueField="currency_code"/>
<a:field name="invoice_status_n" displayField="code_value_name" options="acr512_invoice_status_ds"
returnField="invoice_status" valueField="code_value"/>
<a:field name="invoice_kind"/>
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds"
returnField="invoice_kind" valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc"
options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
<a:mapping>
<a:map from="user_id" to="created_by"/>
<a:map from="description" to="created_by_name"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping>
</a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_f"/>
</a:mapping>
</a:field>
<a:field name="project_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_t"/>
</a:mapping>
</a:field>
<a:field name="contract_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_f"/>
</a:mapping>
</a:field>
<a:field name="contract_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_t"/>
</a:mapping>
</a:field>
<a:field name="lease_channel"/>
<a:field name="lease_channel_desc" displayField="description" options="hls_lease_channel_ds"
returnField="lease_channel" valueField="lease_channel"/>
</a:fields>
<a:events>
<a:event name="update" handler="acr512_invoice_query_Onupdate"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr512_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
<!-- <a:fields>-->
<!-- <a:field name="compare_date_flag"/>-->
<!-- </a:fields>-->
<!-- <a:events>-->
<!-- <a:event name="load" handler="load_do_info"/>-->
<!-- </a:events>-->
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr512_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr512_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr512_invoice_delete" text="HLS.REMOVE"/>
<!--<a:toolbarButton click="acr512_invoice_submit_selected" text="提交复核"/>-->
<a:toolbarButton click="acr512_invoice_insert" text="新建申请"/>
<!--
<a:toolbarButton click="acr512_invoice_submit" text="HLS.SUBMIT"/>
-->
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="应收发票维护">
<a:hBox labelSeparator=" ">
<a:textField name="document_number_f" bindTarget="acr512_invoice_query_ds"
prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
-->
<a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到"
width="135"/>
<a:textField name="contract_name" bindTarget="acr512_invoice_query_ds" prompt="合同名称" width="353"/>
<!-- <a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="contract_number_t" bindTarget="acr512_invoice_query_ds" prompt="合同编号到" width="135"/>-->
<!-- <a:lov name="project_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
<a:lov name="project_number_t" bindTarget="acr512_invoice_query_ds" prompt="" width="135"/>-->
<!--
<a:comboBox name="business_type_desc" bindTarget="acr512_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
-->
<!--
<a:comboBox name="lease_channel_desc" bindTarget="acr512_invoice_query_ds" prompt="商业模式" width="135"/>
-->
<!-- <a:comboBox name="currency_name" bindTarget="acr512_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/> -->
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="accounting_date_f" bindTarget="acr512_invoice_query_ds" prompt="记账日期从"
width="135"/>
<!--
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
-->
<a:datePicker name="accounting_date_t" bindTarget="acr512_invoice_query_ds" prompt="记账日期到"
width="135"/>
<a:lov name="created_by_name" bindTarget="acr512_invoice_query_ds" prompt="创建人" width="135"/>
<a:textField name="invoice_title" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_TITLE"
width="135"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="invoice_date_f" bindTarget="acr512_invoice_query_ds" prompt="发票日期从"
width="135"/>
<!--
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
-->
<a:datePicker name="invoice_date_t" bindTarget="acr512_invoice_query_ds" prompt="发票日期到"
width="135"/>
<!-- <a:lov name="invoice_bp_code_f" bindTarget="acr512_invoice_query_ds" prompt="客户编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_bp_name" bindTarget="acr512_invoice_query_ds" prompt="客户名称" width="135"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND"
width="135"/>
<a:comboBox name="invoice_status_n" bindTarget="acr512_invoice_query_ds" prompt="发票状态" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="HLS.DOCUMENT_NUMBER"
renderer="acr512_document_number_render" width="120"/>
<a:column name="invoice_bp_name" autoAdjust="false" prompt="HLS.CUSTOMER_NAME" showTitle="true"
width="100"/>
<a:column name="contract_name" autoAdjust="false" prompt="HLS.CONTRACT_NAME" showTitle="true"
width="150"/>
<!--
<a:column name="business_type_desc" prompt="HLS.BUSINESS_TYPE_DESC" width="80"/>
-->
<a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>
<!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/> -->
<a:column name="invoice_date" prompt="ACR.INVOICE_DATE" width="100"/>
<!-- <a:column name="project_name" autoAdjust="false" prompt="HLS.PROJECT_NAME" showTitle="true" width="150"/> -->
<!-- <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/> -->
<!-- <a:column name="bp_code" prompt="HLS.CUSTOMER_NUMBER" width="100"/> -->
<a:column name="invoice_title" autoAdjust="false" prompt="ACR.INVOICE_TITLE" showTitle="true"
width="150"/>
<!-- <a:column name="total_amount" align="right" prompt="ACR.TOTAL_AMOUNT" renderer="Aurora.formatMoney" width="100"/> -->
<!-- <a:column name="currency" prompt="HLS.CURRENCY" width="80"/> -->
<a:column name="created_by_name" autoAdjust="false" prompt="创建人" showTitle="true" width="150"/>
<a:column name="invoice_status_desc" prompt="ACR.INVOICE_STATUS" width="100"/>
<a:column name="accounting_date" prompt="HLS.ACCOUNT_DATE" width="100"/>
<!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> -->
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> -->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.screen"/>
<a:link id="acr512_invoice_ln_update_1_link" model="acr.ACR512.acr_invoice_update_query" modelaction="update"/>
<!-- <a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="update"/>-->
<script><![CDATA[
// var dynamic_document_id = '$c{/parameter/@document_id}';
// if ('$c{/parameter/@document_id}') {
// var detail_mask;
// if ('${/parameter/@winid}') {
// if (parent.$A.CmpManager.get('${/parameter/@winid}')) {
// detail_mask = parent.$('${/parameter/@winid}').wrap;
// parent.Aurora.Masker.mask(detail_mask, '${l:HLS.LOADING}');
// } else {
// detail_mask = $('${/parameter/@winid}').wrap;
// Aurora.Masker.mask(detail_mask, '${l:HLS.LOADING}');
// }
// } else {
// detail_mask = Ext.getBody();
// Aurora.Masker.mask(detail_mask, '${l:HLS.LOADING}');
// }
// }
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'car_detail' && record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'contract_number' && record.get('contract_id')) {
link_function = '${/parameter/@layout_code}_open_contract_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + value + '</a>';
}
};
//发票确认
// window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
// var detail_mask = Ext.getBody();
//
// var record_hd="${/parameter/@invoice_hd_id}";
// //确认发票状态
// var invoice_status='${/parameter/@invoice_status}';
// if(invoice_status!='NEW' &&invoice_status!='REJECT'){
// $L.showErrorMessage("提示",'发票状态有误!');
// return;
// }
// Leaf.showConfirm('提示', "确认执行该操作?", function() {
// Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
// Leaf.request({
// url: $('acr512_invoice_status_change').getUrl(),
// para: {
// invoice_hd_id: record_hd,
// want_status: 'CONFIRMING'
// },
// success: function () {
//
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
//
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
// $('${/parameter/@winid}').close();
//
// //$('${/parameter/@winid}').close();
// },
// error: function () {
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
// },
// scope: this
// });
// },function(){
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
//
// })
//
//
//
// }
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_maintain_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
window['${/parameter/@layout_code}_open_contract_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'ACR_CON301'; /* param['function_usage'] = 'QUERY'; */
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', record.ds.id, '${/parameter/@layout_code}');
};
//加载事件
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var acr_invoice_hd_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_hd');
var ds_batch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_batch_ln');
if(!$(acr_invoice_hd_ds_id).getAt(0).get('merge_flag')){
var acr_invoice_rec = $(acr_invoice_hd_ds_id).getAt(0);
var invoice_hd_id = $(acr_invoice_hd_ds_id).getCurrentRecord().get('invoice_hd_id');
$(acr_invoice_hd_ds_id).getAt(0).set('merge_flag', 'N');
$(acr_invoice_hd_ds_id).getAt(0).set('merge_flag_n', '不合并');
// if (acr_invoice_rec.get('merge_flag') == 'Y') {
Leaf.request({
url: $('acr512_invoice_ln_update_1_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id,
merge_flag: $(acr_invoice_hd_ds_id).getCurrentRecord().get('merge_flag')
},
success: function() {
$(ds_batch_id).query();
//$('${/parameter/@winid}').close();
},
scope: this
});
}
};
window['${/parameter/@layout_code}_open_bp_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'CON501H';
param['function_usage'] = 'MODIFY';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con713_hls_bp_master_modify_link', record.ds.id, '${/parameter/@layout_code}');
};
function con500_contract_save(nextStep) {
var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds');
if (root_ds.validate()) {
var winid = '${/parameter/@winid}';
if (winid) {
Leaf.Masker.mask($(winid).wrap, '${l:HLS.EXECUTING}');
} else {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
lock_current_window();
var root_record = root_ds.getAt(0);
root_ds.setSubmitParameter('layout_code', '${/parameter/@layout_code}');
on_con_save_dynamic(root_ds, root_record, nextStep, winid);
}
con500_contract_merge();
}
function con500_contract_submit() {
Leaf.SideBar.enable = false;
con500_contract_save(con500_contract_submit_final);
}
function con500_contract_exit() {
if ('${/parameter/@winid}') {
$('${/parameter/@winid}').close();
} else {
window.location.go(-1);
}
}
function con500_contract_save_exit() {
con500_contract_save(con500_contract_exit);
}
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_hd');
var ds_batch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_batch_ln');
var invoice_hd_id = $(ds_id).getCurrentRecord().get('invoice_hd_id');
var message = '您确认吗';
// if ($(ds_id).getCurrentRecord().get('merge_flag') == 'Y') {
// message = '您确认行合并吗';
// } else {
// message = '您确认行不合并吗';
// }
// Leaf.showConfirm('提示', message, function() {
Leaf.request({
url: $('acr512_invoice_ln_update_1_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id,
merge_flag: $(ds_id).getCurrentRecord().get('merge_flag')
},
success: function() {
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
$(ds_batch_id).query();
// $('${/parameter/@winid}').close();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
/* new Aurora.Window({
id: 'contract_invoice_merge_window',
url: $('contract_invoice_merge_link').getUrl(),
params: {
invoice_hd_id: invoice_hd_id,
winid: 'contract_invoice_merge_window'
},
// draggable: true,
fullScreen: true
}); */
},
scope: this
});
// },function(){
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
//
// });
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -150,6 +150,7 @@
<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>
<a:dataSet id="approval_status_ds" lookupCode="WFL_STATUS"/>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_query_ds" autoCreate="true">
<a:fields>
<a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov"
......@@ -239,6 +240,7 @@
<a:map from="bp_code" to="bp_code_to"/>
</a:mapping>
</a:field>
<a:field name="approval_status_desc" displayField="code_value_name" options="approval_status_ds" returnField="approval_status" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="csh514_reversed_update"/>
......@@ -301,9 +303,8 @@
prompt="对方账户名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="对方账号"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="我方账户名称"/>
<a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="客户名称"/>
<!-- <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账号" readOnly="true"/>-->
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="现金事务编号"/>
......@@ -314,8 +315,8 @@
prompt="HLS.ADVANCE_RECEIPT"/>
<a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="合同编号"/>
<a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="客户名称"/>
<a:comboBox name="approval_status_desc" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="审批状态"/>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35"
......
......@@ -51,13 +51,13 @@
</a:screenTopToolbar>-->
<a:form title="CSH514.CSH_WRITE_OFF_DETAIL">
<a:hBox>
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" renderer="Leaf.formatDate"
prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/>
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" renderer="Leaf.formatDate" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.NOTE" width="300"/>
</a:hBox>
......
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