Commit 29d01dcc authored by lizhe's avatar lizhe

佣金月度分摊表

parent a749a6ba
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
rpt_commission_split_pkg.query_split_data_job(
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select * from rpt_commission_split tt where tt.created_by = ${/session/@user_id}) t
#WHERE_CLAUSE#
order by t.seq_order
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
rpt_commission_split_pkg.insert_commission_split_job(
p_data_month =>${@period_name_cal},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="period_name_query" queryExpression=" t.split_month = ${@period_name_query}"/>
<bm:query-field name="contract_number" queryExpression="t.contract_number = ${@contract_number}"/>
<bm:query-field name="tenant_name" queryExpression="t.tenant_name = ${@tenant_name}"/>
<bm:query-field name="agent_name" queryExpression="t.agent_name = ${@agent_name}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lz
$Date: 2024年04月25日 11:19:16
$Revision: 1.0
$Purpose: 佣金月度分摊报表
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query model="gld.gld_period_status" rootPath="gld_periods_combo"/>
</a:init-procedure>
<a:view>
<a:link id="rpt5900_query_id" model="rpt.RPT5900.rpt5900_result_query" modelaction="update"/>
<a:link id="query_job" model="rpt.RPT5900.rpt5900_query_job" modelaction="update"/>
<script><![CDATA[
function rpt5900_reset() {
$('rpt5900_query_ds').reset();
}
function rpt5900_query() {
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('query_job').getUrl(),
para: {},
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
$('rpt5900_result_ds').query();
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function result_export() {
$('rpt5900_grid_ds')._export('xls', '佣金月度分摊报表');
}
function rpt5900_query_job() {
var headers_ds = $('rpt5900_query_ds');
var record = headers_ds.getAt(0);
if (Ext.isEmpty(record.get('period_name_cal'))) {
Leaf.showMessage('提示', '更新期间必输,不能为空');
return;
}
Leaf.showConfirm('${l:HLS.PROMPT}', '确认发起异步任务?(请稍后查询)', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:BEING_IMPLEMENTED}');
Leaf.request({
url: $('rpt5900_query_id').getUrl(),
para: {
period_name_cal: record.get('period_name_cal')
},
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.SideBar.show({
msg: '发起成功!',
duration: 2000
});
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, null, 300, 150);
}
]]></script>
<a:dataSets>
<a:dataSet id="rpt5900_period_name_ds">
<a:datas dataSource="/model/gld_periods_combo" fetchAll="true" />
</a:dataSet>
<a:dataSet id="rpt5900_query_ds">
<a:fields>
<!-- <a:field name="period_name_cal" required="true" displayField="period_name"-->
<!-- options="rpt5900_period_name_ds" returnField="period_name_cal" valueField="period_name"/>-->
<!-- <a:field name="period_name_query" displayField="period_name"-->
<!-- options="rpt5900_period_name_ds" returnField="period_name_query" valueField="period_name"/>-->
<a:field name="period_name_cal" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name_cal"/>
</a:mapping>
</a:field>
<a:field name="period_name_query" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name_query"/>
</a:mapping>
</a:field>
<a:field name="contract_number"/>
<a:field name="tenant_name"/>
<a:field name="agent_name"/>
</a:fields>
</a:dataSet>
<a:dataSet id="rpt5900_result_ds" autoQuery="false" model="rpt.RPT5900.rpt5900_result_query" pageSize="50"
queryDataSet="rpt5900_query_ds" selectable="true"><![CDATA[
]]></a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="rpt5900_query" text="HLS.QUERY"/>
<a:gridButton click="rpt5900_query_job" text="更新全量数据"/>
<a:gridButton click="rpt5900_reset" text="HLS.RESET"/>
<a:gridButton click="result_export" text="导出"/>
<font color="red" style="margin-left:30px;margin-top:13px">
<![CDATA[注:将按照更新期间生成该期间之后的佣金分摊数据,更新完成后,可通过查询条件查找所需的最新结果!]]></font>
</a:screenTopToolbar>
<a:form column="4" labelWidth="100" marginWidth="50" title="更新期间">
<a:lov name="period_name_cal" bindTarget="rpt5900_query_ds" prompt="更新期间" colspan="4"/>
</a:form>
<a:form column="4" labelWidth="100" marginWidth="50" title="查询条件">
<a:lov name="period_name_query" bindTarget="rpt5900_query_ds" prompt="期间"/>
<a:textField name="contract_number" bindTarget="rpt5900_query_ds" prompt="合同编号"/>
<a:textField name="tenant_name" bindTarget="rpt5900_query_ds" prompt="承租人"/>
<a:textField name="agent_name" bindTarget="rpt5900_query_ds" prompt="经销商"/>
</a:form>
<a:grid id="rpt5900_grid_ds" bindTarget="rpt5900_result_ds" marginHeight="180" marginWidth="50"
navBar="true">
<a:columns>
<a:column name="split_month" align="center" prompt="期间" />
<a:column name="agent_code" align="center" prompt="经销商编码"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="150" />
<a:column name="agent_name" align="center" prompt="经销商" width="180"/>
<a:column name="tenant_code" align="center" prompt="承租人编码"/>
<a:column name="tenant_name" align="center" prompt="承租人" width="180"/>
<a:column name="month_unearned_commission_fee" align="right" prompt="可抵扣佣金" renderer="Leaf.formatMoney"/>
<a:column name="unmonth_unearned_commision_fee" align="right" prompt="不可抵扣佣金" renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment