Commit 80011d2f authored by stone's avatar stone

【feat】销项发票功能以及报表功能的开发

parent 35b5174f
...@@ -95,8 +95,6 @@ ...@@ -95,8 +95,6 @@
t1.inv_object_taxpayer_type, t1.inv_object_taxpayer_type,
t1.object_taxpayer_type) = 'SMALL_SCALE_TAXPAYER' and t1.object_taxpayer_type) = 'SMALL_SCALE_TAXPAYER' and
to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or t2.write_off_flag = 'FULL') to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or t2.write_off_flag = 'FULL')
and ((t2.cf_item = '8' and t2.write_off_flag = 'FULL') or
t2.cf_item <> '8')
AND cf_item<> 9 AND cf_item<> 9
AND cf_status='RELEASE' AND cf_status='RELEASE'
and nvl(t2.billing_status,'NOT') != 'FULL' and nvl(t2.billing_status,'NOT') != 'FULL'
...@@ -195,9 +193,13 @@ ...@@ -195,9 +193,13 @@
from acr_invoice_contract_v t1, acr_invoice_penalty_v t2 from acr_invoice_contract_v t1, acr_invoice_penalty_v t2
where where
t2.contract_id=t1.contract_id t2.contract_id=t1.contract_id
and not exists (select 1 AND (NOT EXISTS (SELECT 1
from acr_invoice_ln l FROM acr_invoice_ln l
where l.ref_n03=t2.journal_header_id) WHERE l.ref_n04 = t2.journal_line_id
GROUP BY journal_line_id
HAVING SUM(l.total_amount)>0 )
)
)vv )vv
#WHERE_CLAUSE# #WHERE_CLAUSE#
......
...@@ -3,172 +3,256 @@ ...@@ -3,172 +3,256 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT h.bp_code, SELECT v.*,
h.bp_name bp_id_tenant_n, (v.total_principal + v.total_interest) total_amount,
(v.this_principal + v.this_penalty+v.this_interest) this_total,
(v.this_add_principal + v.this_add_penalty+v.this_add_interest) this_add_total,
(v.future_interest+v.future_principal) future_due_amount
FROM (select
(SELECT h.bp_code FROM con_contract p,hls_bp_master h WHERE p.bp_id_tenant=h.bp_id AND p.contract_id=
contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))) bp_code,
(SELECT h.bp_name FROM con_contract p,hls_bp_master h WHERE p.bp_id_tenant=h.bp_id AND p.contract_id=
contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))) bp_id_tenant_n,
--合同编号 --合同编号
t.contract_number, t.contract_number,
t.contract_id, t.contract_id,
to_char(nvl(((SELECT SUM(nvl(ccc.principal, 0)) ((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 1) +
(SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 2)),
0),
'FM999,999,999,999,990.00') total_principal,
to_char(nvl(((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 1) +
(SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 8)),
0),
'FM999,999,999,999,990.00') total_interest,
'0.00' total_other,
to_char(nvl(((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND ccc.cf_item = 1) + contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
(SELECT nvl(ccc.due_amount, 0) p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND ccc.cf_item IN (1,200,250)
AND ccc.cf_status = 'RELEASE') +
NVL((SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND ccc.cf_item = 2) + contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
(SELECT SUM(nvl(ccc.interest, 0)) p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND ccc.cf_item = 2
AND ccc.cf_status = 'RELEASE'),0)) total_principal,
((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND ccc.cf_item = 1) + contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
(SELECT nvl(ccc.due_amount, 0) p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND ccc.cf_item IN (1,200,250)
AND ccc.cf_status = 'RELEASE') +
NVL((SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND ccc.cf_item = 8)), contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
0), p_calc_date => to_date(${@base_date},
'FM999,999,999,999,990.00') total_amount, 'yyyy-mm-dd'))
AND ccc.cf_item = 8
AND ccc.cf_status = 'RELEASE'),0)) total_interest,
'0.00' total_other,
--合同开始日 --合同开始日
t.lease_start_date, t.lease_start_date,
--合同终了日取留购金
(SELECT ccc.due_date (SELECT ccc.due_date
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.cf_item=1 and ccc.contract_id=t.contract_id and ccc.times=( WHERE ccc.cf_item = 8
select max(times) from con_contract_cashflow cc where cc.contract_id=t.contract_id AND ccc.contract_id =
)) lease_end_date, contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))) lease_end_date,
--当期利息 --当期利息
to_char(nvl((SELECT SUM(nvl(ccc.interest, 0)) nvl((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND cf_item = 1 contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN p_calc_date => to_date(${@base_date},
${@due_date_from} AND ${@due_date_to}), 'yyyy-mm-dd'))
0), AND cf_item IN(1,200,250)
'FM999,999,999,999,990.00') this_interest, AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') =
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),
0)+
NVL((SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id =
contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND ccc.cf_item = 8
AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') =
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),0) this_interest,
--当次累计利息 --当次累计利息
to_char(nvl((SELECT SUM(nvl(ccc.interest, 0)) nvl((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND cf_item = 1 contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN p_calc_date => to_date(${@base_date},
to_char(t.lease_start_date, 'yyyy-mm-dd') AND 'yyyy-mm-dd'))
${@due_date_to}), AND cf_item IN( 1,200,250)
0), AND ccc.cf_status = 'RELEASE'
'FM999,999,999,999,990.00') this_add_interest, AND to_char(ccc.due_date, 'yyyymm') <=
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),
0)+NVL((SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id =
contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND ccc.cf_item = 8
AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') <=
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),0) this_add_interest,
--设备本金 --设备本金
to_char(nvl((SELECT SUM(nvl(ccc.principal, 0)) nvl((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND cf_item = 1 contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN p_calc_date => to_date(${@base_date},
${@due_date_from} AND ${@due_date_to}), 'yyyy-mm-dd'))
0), AND cf_item IN (1,200,250)
'FM999,999,999,999,990.00') this_principal, AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') =
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),0)+NVL((
SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id =
contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND cf_item =2
AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') =
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),'yyyymm')
),0) this_principal,
--累计本金 --累计本金
to_char(nvl((SELECT SUM(nvl(ccc.principal, 0)) nvl((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND cf_item = 1 contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN p_calc_date => to_date(${@base_date},
to_char(t.lease_start_date, 'yyyy-mm-dd') AND 'yyyy-mm-dd'))
${@due_date_to}), AND cf_item IN (1,200,250)
0), AND ccc.cf_status = 'RELEASE'
'FM999,999,999,999,990.00') this_add_principal, AND to_char(ccc.due_date, 'yyyymm') <=
--当次违约金 to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0)) 'yyyymm')),0)+NVL((
FROM con_contract_cashflow ccc SELECT SUM(nvl(ccc.due_amount, 0))
WHERE ccc.contract_id = t.contract_id FROM con_contract_cashflow ccc
AND cf_item = 9 WHERE ccc.contract_id =
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
${@due_date_from} AND ${@due_date_to}), p_calc_date => to_date(${@base_date},
0), 'yyyy-mm-dd'))
'FM999,999,999,999,990.00') this_penalty, AND cf_item =2
AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') <=
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),'yyyymm')
),0) this_add_principal,
---当期违约金
NVL(( select sum(gw.write_off_amount)
from csh_transaction ct,
csh_write_off cw,
gld_write_off gw
where ct.transaction_id = cw.csh_transaction_id
and cw.write_off_id = gw.csh_write_off_id
and gw.cf_item = 9
and gw.contract_id = contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
and nvl(cw.reversed_flag, 'N') = 'N'
and nvl(gw.reversed_flag, 'N') = 'N'
and ((ct.transaction_type = 'RECEIPT' and
to_char(ct.transaction_date,'yyyymm') =
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),'yyyymm')) or
(ct.transaction_type = 'ADVANCED' and
to_char(cw.write_off_date,'yyyymm') =
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),'yyyymm')))
),0) this_penalty,
--累计违约金 --累计违约金
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0)) NVL(( select sum(gw.write_off_amount)
FROM con_contract_cashflow ccc from csh_transaction ct,
WHERE ccc.contract_id = t.contract_id csh_write_off cw,
AND cf_item = 9 gld_write_off gw
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN where ct.transaction_id = cw.csh_transaction_id
to_char(t.lease_start_date, 'yyyy-mm-dd') AND and cw.write_off_id = gw.csh_write_off_id
${@due_date_to}), and gw.cf_item = 9
0), and gw.contract_id = contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
'FM999,999,999,999,990.00') this_add_penalty, p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
and nvl(cw.reversed_flag, 'N') = 'N'
and nvl(gw.reversed_flag, 'N') = 'N'
and ((ct.transaction_type = 'RECEIPT' and
to_char(ct.transaction_date,'yyyymm') <=
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),'yyyymm')) or
(ct.transaction_type = 'ADVANCED' and
to_char(cw.write_off_date,'yyyymm') <=
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),'yyyymm')))
),0)this_add_penalty,
--当期累计 --当期累计
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0)) --累计
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item IN (1, 9)
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
${@due_date_from} AND ${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_total,
--累计之和
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item IN (1, 9)
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
to_char(t.lease_start_date, 'yyyy-mm-dd') AND
${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_add_total,
--未执行利息 --未执行利息
'0.00' unexecute_interest, '0' unexecute_interest,
--未来应收利息 --未来应收利息
to_char(nvl((SELECT SUM(nvl(ccc.interest, 0)) nvl((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND cf_item = 1 contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
AND to_char(ccc.due_date, 'yyyy-mm-dd') > p_calc_date => to_date(${@base_date},
${@due_date_to}), 'yyyy-mm-dd'))
0), AND cf_item IN ( 1,200,250)
'FM999,999,999,999,990.00') future_interest, AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') >
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),
0)+NVL((SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id =
contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
p_calc_date => to_date(${@base_date},
'yyyy-mm-dd'))
AND ccc.cf_item = 8
AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') >
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),0) future_interest,
--未执行本金 --未执行本金
'0.00' unexecute_principal, '0' unexecute_principal,
--未来本金 --未来本金
to_char(nvl((SELECT SUM(nvl(ccc.principal, 0)) NVL((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id WHERE ccc.contract_id =
AND cf_item = 1 contract_item_query_pkg.get_contract_history_id(p_contract_id => t.contract_id,
AND to_char(ccc.due_date, 'yyyy-mm-dd') > p_calc_date => to_date(${@base_date},
${@due_date_to}), 'yyyy-mm-dd'))
0), AND cf_item IN (1,200,250)
'FM999,999,999,999,990.00') future_principal, AND ccc.cf_status = 'RELEASE'
'0.00' unexecute_total, AND to_char(ccc.due_date, 'yyyymm') >
to_char(to_date(${@base_date}, 'yyyy-mm-dd'), 'yyyymm')),0) future_principal,
'0' unexecute_total,
--未来应收 --未来应收
'0.00' this_due_amount, '0' this_due_amount
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0)) FROM con_contract t
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') >
${@due_date_to}),
0),
'FM999,999,999,999,990.00') future_due_amount
FROM con_contract t, hls_bp_master h
WHERE t.data_class = 'NORMAL' WHERE t.data_class = 'NORMAL'
and t.contract_status='INCEPT' AND t.contract_status NOT IN('CANCEL', 'NEW', 'INCEPTING', 'INCEPT_RETURN')
AND h.bp_id = t.bp_id_tenant AND trunc(t.lease_start_date) >=
trunc(to_date(${@due_date_from}, 'yyyy-mm-dd'))
AND trunc(t.lease_start_date) <=
trunc(to_date(${@due_date_to}, 'yyyy-mm-dd'))
) v
]]> ]]>
</bm:query-sql> </bm:query-sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
csh_write_off_pkg.update_ifrs9_col_flag(
p_period_name =>${/parameter/@period_name},
p_user_id =>${/session/@user_id} ) flag
from dual
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="period_name" queryExpression="t1.period_day=${@period_name}"/>
<!-- <bm:query-field name="journal_date_to" queryExpression="to_char(t.journal_date,&apos;yyyy-mm-dd&apos;) &lt;= ${@journal_date_to}"/>-->
<!-- <bm:query-field name="bp_id_agent_level1" queryExpression="t.bp_id_agent_level1=${@bp_id_agent_level1}"/>-->
</bm:query-fields>
</bm:model>
...@@ -16,7 +16,10 @@ ...@@ -16,7 +16,10 @@
(csh_write_off_pkg.get_overdue_day(p_contract_id => t1.ref_contract_id, (csh_write_off_pkg.get_overdue_day(p_contract_id => t1.ref_contract_id,
p_calc_date => t1.base_date, p_calc_date => t1.base_date,
p_user_id => 1))OVERDUE_MAX_DAYS, p_user_id => 1))OVERDUE_MAX_DAYS,
t1.rest_amount RESIDUAL_CLAIMS, nvl(( con_cashflow_monthly_pkg.get_unwrite_amount_column(p_session_id => -1,
p_due_date => t1.base_date,
p_contract_id =>t1.ref_contract_id )),0) RESIDUAL_CLAIMS,
t1.pay_date PAYDATE_1, t1.pay_date PAYDATE_1,
t1.pay_amount RESIDUAL_VALUE, t1.pay_amount RESIDUAL_VALUE,
t1.industry_belonged INDUSTRY, t1.industry_belonged INDUSTRY,
...@@ -38,11 +41,23 @@ ...@@ -38,11 +41,23 @@
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
csh_write_off_pkg.update_ifrs9_col( csh_write_off_pkg.update_ifrs9_col(
p_period_name =>${@period_name} p_period_name =>${@period_name},
p_user_id =>${/session/@user_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
select
csh_write_off_pkg.update_ifrs9_col_flag(
p_period_name =>${@period_name},
p_user_id =>${/session/@user_id} ) flag
from dual
]]></bm:update-sql>
</bm:operation>
</bm:operations> </bm:operations>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="period_name" queryExpression="t1.period_day=${@period_name}"/> <bm:query-field name="period_name" queryExpression="t1.period_day=${@period_name}"/>
......
...@@ -6,6 +6,10 @@ var override_queryfields = [ ...@@ -6,6 +6,10 @@ var override_queryfields = [
{ {
name : 'journal_date_to', name : 'journal_date_to',
queryexpression : "to_char(t1.journal_date,'yyyy-mm-dd') <=${@journal_date_to} " queryexpression : "to_char(t1.journal_date,'yyyy-mm-dd') <=${@journal_date_to} "
},{
name : 'bp_id_agent_level1',
queryexpression : "t1.bp_id_agent_level1=${@bp_id_agent_level1}"
} }
]; ];
......
...@@ -32,14 +32,15 @@ ...@@ -32,14 +32,15 @@
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'GENERAL'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'GENERAL');
var record=$(ds_id).getAt(0); var record=$(ds_id).getAt(0);
if(record.get('due_date_from')&&record.get('due_date_to')){ if(record.get('due_date_from')&&record.get('due_date_to')&&record.get('base_date')){
var ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
$(ds).setQueryUrl("${/request/@context_path}/autocrud/cont.CON3300.contract_item_report_query/query"); $(ds).setQueryUrl("${/request/@context_path}/autocrud/cont.CON3300.contract_item_report_query/query");
$(ds).setQueryParameter('due_date_from',record.get('due_date_from')); $(ds).setQueryParameter('due_date_from',record.get('due_date_from'));
$(ds).setQueryParameter('due_date_to',record.get('due_date_to')); $(ds).setQueryParameter('due_date_to',record.get('due_date_to'));
$(ds).setQueryParameter('base_date',record.get('base_date'));
$(ds).query(); $(ds).query();
}else{ }else{
$L.showInfoMessage("提示",'请输入字段:预定收款日从、预定收款日到!'); $L.showInfoMessage("提示",'请输入字段:租赁开始日从、租赁开始日到、基准日!');
} }
} }
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
<a:link id="${/parameter/@layout_code}con_contract_query_link" <a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/> url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<style>
body{
font-size: 12px;
}
</style>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable( var ds_id = get_dsid_by_tabcode_basetable(
...@@ -21,7 +26,19 @@ ...@@ -21,7 +26,19 @@
param['function_code'] = 'CON3400N'; param['function_code'] = 'CON3400N';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['url_title'] = 'IFRS9'; param['url_title'] = 'IFRS9';
hls_doc_get_layout_code('contract_get_layout_code_link_id', param, 'con_contract_ifrs9_link',ds_id); param['winid']='ifrs9_win';
var win = new Leaf.Window({
id: 'ifrs9_win',
url: $('con_contract_ifrs9_link').getUrl(),
params: param,
title: '发送信息',
fullScreen: true
});
win.on('close', function () {
document.getElementsByClassName('alert')[0].remove();
});
// hls_doc_get_layout_code('contract_get_layout_code_link_id', param, 'con_contract_ifrs9_link',ds_id);
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true"> trace="true">
<a:init-procedure/> <a:init-procedure>
<a:model-query model="cont.CON3500.contract_ifrs9_report_flag" rootPath="status"/>
</a:init-procedure>
<a:view> <a:view>
<link href="${/request/@context_path}/lib/bootstrap-3.3.7/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/> modelaction="update"/>
<a:link id="save_ifrs9_report_link" model="cont.CON3500.contract_ifrs9_report_temp" <a:link id="save_ifrs9_report_link" model="cont.CON3500.contract_ifrs9_report_temp"
modelaction="update"/> modelaction="update"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link" <a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/> url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<style>
body{
font-size: 12px;
}
</style>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Leaf.onReady(function(){ Leaf.onReady(function(){
//检查保存按钮
var flag='${/model/status/record/@flag}';
if(flag=='Y'){
$("${/parameter/@layout_code}_user_button1").disable();
$("${/parameter/@layout_code}_user_button2").disable();
}else{
var reminder=document.getElementsByClassName('screenTopToolbar');
for(var i=0;i<reminder.length;i=i+1){
var t=reminder[i];
t.insertAdjacentHTML('afterend', '<div class="alert alert-danger" role="alert" >数据只能保存一次,请确认后保存</div>');
}
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_ifrs9'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_ifrs9');
$(ds_id).setQueryParameter("period_name",'${/parameter/@period_name}'); $(ds_id).setQueryParameter("period_name",'${/parameter/@period_name}');
$(ds_id).query(); $(ds_id).query();
...@@ -23,6 +46,7 @@ ...@@ -23,6 +46,7 @@
$(ds_id).setQueryParameter('period_name','${/parameter/@period_name}'); $(ds_id).setQueryParameter('period_name','${/parameter/@period_name}');
$(ds_id).query(); $(ds_id).query();
} }
//保存数据 //保存数据
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var period_name="${/parameter/@period_name}"; var period_name="${/parameter/@period_name}";
...@@ -33,6 +57,8 @@ ...@@ -33,6 +57,8 @@
period_name:period_name period_name:period_name
}, },
success: function() { success: function() {
$("${/parameter/@layout_code}_user_button1").disable();
$("${/parameter/@layout_code}_user_button2").disable();
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '保存成功', msg: '保存成功',
duration: 2000 duration: 2000
...@@ -51,5 +77,6 @@ ...@@ -51,5 +77,6 @@
} }
]]></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:view> </a:view>
</a:screen> </a:screen>
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
return '<a href="javascript:winOpen_templateLineCopy('+ record.get('je_template_ln_id') + ',' + record.get('je_ln_number') + ');">' + '复制' + '</a>'; return '<a href="javascript:winOpen_templateLineCopy('+ record.get('je_template_ln_id') + ',' + record.get('je_ln_number') + ');">' + '复制' + '</a>';
} }
]]></script> ]]></script>
<a:tabPanel marginHeight="100" marginWidth="30"> <a:tabPanel marginHeight="50" marginWidth="30">
<a:tabs> <a:tabs>
<a:tab prompt="GLD107.TAB.BASIC_INFO" width="100"> <a:tab prompt="GLD107.TAB.BASIC_INFO" width="100">
<a:grid id="lineDs_basic_grid" bindTarget="lineDs" marginHeight="50" marginWidth="60" height="500"> <a:grid id="lineDs_basic_grid" bindTarget="lineDs" marginHeight="50" marginWidth="60" height="500">
...@@ -358,7 +358,7 @@ ...@@ -358,7 +358,7 @@
</a:grid> </a:grid>
</a:tab> </a:tab>
<a:tab prompt="GLD107.TAB.REF_INFO" width="100"> <a:tab prompt="GLD107.TAB.REF_INFO" width="100">
<a:grid id="lineDs_ref_grid" bindTarget="lineDs" marginHeight="300" marginWidth="60" height="500"> <a:grid id="lineDs_ref_grid" bindTarget="lineDs" marginHeight="50" marginWidth="60">
<a:columns> <a:columns>
<a:column name="je_ln_number" align="right" editor="lineDs_ref_grid_nf_integer" width="50"/> <a:column name="je_ln_number" align="right" editor="lineDs_ref_grid_nf_integer" width="50"/>
<a:column name="ref_1_config" editorFunction="editorFunction_lineDs_ref_grid_advanceConfig" width="150"/> <a:column name="ref_1_config" editorFunction="editorFunction_lineDs_ref_grid_advanceConfig" width="150"/>
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
</a:grid> </a:grid>
</a:tab> </a:tab>
<a:tab prompt="GLD107.TAB.ADDITIONAL_INFO" width="100"> <a:tab prompt="GLD107.TAB.ADDITIONAL_INFO" width="100">
<a:grid id="lineDs_additional_grid" bindTarget="lineDs" marginHeight="300" marginWidth="60" height="500"> <a:grid id="lineDs_additional_grid" bindTarget="lineDs" marginHeight="50" marginWidth="60" height="500">
<a:columns> <a:columns>
<a:column name="je_ln_number" align="right" editor="lineDs_additional_grid_nf_integer" width="50"/> <a:column name="je_ln_number" align="right" editor="lineDs_additional_grid_nf_integer" width="50"/>
<a:column name="amount_fuc_config" editorFunction="editorFunction_lineDs_additional_grid_advanceConfig" width="250"/> <a:column name="amount_fuc_config" editorFunction="editorFunction_lineDs_additional_grid_advanceConfig" width="250"/>
......
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