Commit 2ab6fcda authored by 18083's avatar 18083

收付款预定表逻辑调整

parent 3f884a8f
...@@ -123,8 +123,7 @@ ...@@ -123,8 +123,7 @@
from con_cashflow_monthly_temp t, hls_bp_master m, gld_accounts g from con_cashflow_monthly_temp t, hls_bp_master m, gld_accounts g
where m.bp_id = t.agent_bp_id where m.bp_id = t.agent_bp_id
and g.account_id(+) = t.account_id and g.account_id(+) = t.account_id
and t.session_id = ${/session/@session_id} union
union
select tt.unreceived_sum_amount, select tt.unreceived_sum_amount,
tt.overdue_sum_amount, tt.overdue_sum_amount,
not_due_sum_amount, not_due_sum_amount,
...@@ -325,7 +324,6 @@ ...@@ -325,7 +324,6 @@
t.vender_id, t.vender_id,
t.division t.division
from con_cashflow_monthly_temp t from con_cashflow_monthly_temp t
where t.session_id = ${/session/@session_id}
group by t.contract_id, t.bp_id, t.agent_bp_id,t.vender_id,t.division) tt, group by t.contract_id, t.bp_id, t.agent_bp_id,t.vender_id,t.division) tt,
hls_bp_master m hls_bp_master m
where m.bp_id = tt.agent_bp_id) ttt #WHERE_CLAUSE# where m.bp_id = tt.agent_bp_id) ttt #WHERE_CLAUSE#
......
...@@ -162,8 +162,7 @@ ...@@ -162,8 +162,7 @@
t.account_id, t.account_id,
t.account_code t.account_code
from con_cashflow_monthly_temp t from con_cashflow_monthly_temp t
where t.session_id = ${/session/@session_id} group by t.agent_bp_id,
group by t.agent_bp_id,
t.division, t.division,
t.account_id, t.account_id,
t.account_code) tt, t.account_code) tt,
...@@ -319,8 +318,7 @@ ...@@ -319,8 +318,7 @@
t.agent_bp_id, t.agent_bp_id,
t.division t.division
from con_cashflow_monthly_temp t from con_cashflow_monthly_temp t
where t.session_id = ${/session/@session_id} group by t.agent_bp_id, t.division) tt,
group by t.agent_bp_id, t.division) tt,
hls_bp_master m hls_bp_master m
where m.bp_id = tt.agent_bp_id) ttt #WHERE_CLAUSE# where m.bp_id = tt.agent_bp_id) ttt #WHERE_CLAUSE#
order by ttt.agent_bp_id,ttt.division, ttt.account_id_n order by ttt.agent_bp_id,ttt.division, ttt.account_id_n
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
t.account_code, t.account_code,
t.agent_bp_id t.agent_bp_id
from con_cashflow_monthly_temp t,hls_bp_master hm from con_cashflow_monthly_temp t,hls_bp_master hm
where t.session_id = ${/session/@session_id} and hm.bp_id=t.agent_bp_id where hm.bp_id=t.agent_bp_id
group by t.division, t.account_id, t.account_code,t.agent_bp_id) tt, group by t.division, t.account_id, t.account_code,t.agent_bp_id) tt,
gld_accounts g gld_accounts g
where g.account_id(+) = tt.account_id where g.account_id(+) = tt.account_id
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
t.division, t.division,
t.agent_bp_id t.agent_bp_id
from con_cashflow_monthly_temp t,hls_bp_master hm from con_cashflow_monthly_temp t,hls_bp_master hm
where t.session_id = ${/session/@session_id} and hm.bp_id=t.agent_bp_id where hm.bp_id=t.agent_bp_id
group by t.division,t.agent_bp_id) tt) ttt #WHERE_CLAUSE# group by t.division,t.agent_bp_id) tt) ttt #WHERE_CLAUSE#
order by ttt.division, ttt.account_id_n order by ttt.division, ttt.account_id_n
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WangYu
$Date: 2014-4-25 上午09:30:21
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_cashflow_monthly_pkg.insert_con_cash_temp_data_job(
p_session_id =>${/session/@session_id},
p_due_date =>to_date(${@due_date},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id},
p_business_type =>${@business_type});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:view> <a:view>
<a:link id="con_cashflow_pre_query_id" model="cont.CON930.con_contract_cashflow_monthly" modelaction="update"/> <!--<a:link id="con_cashflow_pre_query_id" model="cont.CON930.con_contract_cashflow_monthly" modelaction="update"/>-->
<a:link id="con_cashflow_pre_query_id" model="cont.CON930.con_contract_cashflow_monthly_n" modelaction="update"/>
<a:link id="con_cashflow_pre_update_id" model="cont.CON930.insert_con_cash_temp_data_job" modelaction="update"/>
<script><![CDATA[ <script><![CDATA[
function CON321_con_contract_query() { function CON321_con_contract_query() {
if ($('con_contract_cashflow_monthly_query_ds').validate()){ if ($('con_contract_cashflow_monthly_query_ds').validate()){
...@@ -53,7 +56,7 @@ ...@@ -53,7 +56,7 @@
Leaf.request({ Leaf.request({
url: $('con_cashflow_pre_query_id').getUrl(), url: $('con_cashflow_pre_query_id').getUrl(),
para: { para: {
due_date : record.get('due_date'), /*due_date : record.get('due_date'),
division:record.data.division, division:record.data.division,
bp_id : record.get('bp_id'), bp_id : record.get('bp_id'),
business_type : record.get('business_type'), business_type : record.get('business_type'),
...@@ -65,7 +68,7 @@ ...@@ -65,7 +68,7 @@
not_overday3:record.get('not_overday3'), not_overday3:record.get('not_overday3'),
not_overday4:record.get('not_overday4'), not_overday4:record.get('not_overday4'),
not_overday5:record.get('not_overday5'), not_overday5:record.get('not_overday5'),
not_overday6:record.get('not_overday6') not_overday6:record.get('not_overday6')*/
}, },
success: function(res) { success: function(res) {
Leaf.Masker.unmask (Ext.getBody()); Leaf.Masker.unmask (Ext.getBody());
...@@ -85,6 +88,30 @@ ...@@ -85,6 +88,30 @@
} }
} }
function CON321_con_contract_update() {
var headers_ds = $('con_contract_cashflow_monthly_query_ds');
var record = headers_ds.getAt(0);
Leaf.Masker.mask(Ext.getBody(), '正在更新数据,请稍等...');
Leaf.request({
url: $('con_cashflow_pre_update_id').getUrl(),
para: {
due_date : record.get('due_date'),
business_type : record.get('business_type')
},
success: function(res) {
Leaf.Masker.unmask (Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask (Ext.getBody());
},
error: function() {
Leaf.Masker.unmask (Ext.getBody());
},
scope: this
});
}
function CON321_con_contract_reset() { function CON321_con_contract_reset() {
$('con_contract_cashflow_monthly_query_ds').reset(); $('con_contract_cashflow_monthly_query_ds').reset();
} }
...@@ -149,6 +176,7 @@ ...@@ -149,6 +176,7 @@
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:gridButton click="CON321_con_contract_query" text="HLS.QUERY"/> <a:gridButton click="CON321_con_contract_query" text="HLS.QUERY"/>
<a:gridButton click="CON321_con_contract_update" text="更新全量数据"/>
<a:gridButton click="CON321_con_contract_reset" text="HLS.RESET"/> <a:gridButton click="CON321_con_contract_reset" text="HLS.RESET"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form bindTarget="con_contract_cashflow_balance_query_ds" column="3" title="收付款预定查询" marginWidth="40"> <a:form bindTarget="con_contract_cashflow_balance_query_ds" column="3" title="收付款预定查询" marginWidth="40">
...@@ -224,8 +252,7 @@ ...@@ -224,8 +252,7 @@
<a:column name="not_due_amount_4" align="center" prompt="未到期4个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_4" align="center" prompt="未到期4个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_5" align="center" prompt="未到期5个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_5" align="center" prompt="未到期5个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_6" align="center" prompt="未到期6个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_6" align="center" prompt="未到期6个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_left" align="center" prompt="未到期6个月以上" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_7" align="center" prompt="未到期7个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_7" align="center" prompt="未到期7个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_8" align="center" prompt="未到期8个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_8" align="center" prompt="未到期8个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_9" align="center" prompt="未到期9个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_9" align="center" prompt="未到期9个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_10" align="center" prompt="未到期10个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_10" align="center" prompt="未到期10个月" renderer="Leaf.formatMoney" width="80"/>
...@@ -289,6 +316,7 @@ ...@@ -289,6 +316,7 @@
<a:column name="not_due_amount_68" align="center" prompt="未到期68个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_68" align="center" prompt="未到期68个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_69" align="center" prompt="未到期69个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_69" align="center" prompt="未到期69个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_70" align="center" prompt="未到期70个月" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_70" align="center" prompt="未到期70个月" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_left" align="center" prompt="未到期6个月以上" renderer="Leaf.formatMoney" width="80"/>
<!--<a:column name="not_due_amount_48_left" align="center" prompt="未到期48个月以上" renderer="Leaf.formatMoney" width="80"/>--> <!--<a:column name="not_due_amount_48_left" align="center" prompt="未到期48个月以上" renderer="Leaf.formatMoney" width="80"/>-->
<a:column name="not_due_amount_year_1" align="center" prompt="未到期1年" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_year_1" align="center" prompt="未到期1年" renderer="Leaf.formatMoney" width="80"/>
<a:column name="not_due_amount_year_2" align="center" prompt="未到期2年" renderer="Leaf.formatMoney" width="80"/> <a:column name="not_due_amount_year_2" align="center" prompt="未到期2年" renderer="Leaf.formatMoney" width="80"/>
......
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