Commit 0db0d008 authored by 18083's avatar 18083

佣金uat调整

parent 8c3283c9
...@@ -37,7 +37,7 @@ ...@@ -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="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="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="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 ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0 and ccc.cf_item&lt;&gt;40) - (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 and ccc.cf_item&lt;&gt;40 )) = 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 not in(0,40,911)) - (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 not in(0,40,911))) = 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_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_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"/> <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"/>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
join con_contract t join con_contract t
on t.contract_id = f.contract_id on t.contract_id = f.contract_id
join hlcm_comsn_reconcilia hc join hlcm_comsn_reconcilia hc
on t.contract_id = hc.contract_id on f.cashflow_id = hc.cashflow_id
where EXISTS (SELECT 1 where EXISTS (SELECT 1
FROM CSH_PAYMENT_CASHFLOW_ID_TEMP tmp FROM CSH_PAYMENT_CASHFLOW_ID_TEMP tmp
WHERE tmp.session_id = ${/session/@session_id} WHERE tmp.session_id = ${/session/@session_id}
......
...@@ -107,6 +107,7 @@ order by hc.overdue_max_days desc ...@@ -107,6 +107,7 @@ order by hc.overdue_max_days desc
<bm:query-field name="bp_id_agent_level1_n" queryExpression="t1.bp_id_agent_level1_n like &apos;%&apos;||${@bp_id_agent_level1_n}||&apos;%&apos;"/> <bm:query-field name="bp_id_agent_level1_n" queryExpression="t1.bp_id_agent_level1_n like &apos;%&apos;||${@bp_id_agent_level1_n}||&apos;%&apos;"/>
<bm:query-field name="division_n" queryExpression="t1.division_n like &apos;%&apos;||${@division_n}||&apos;%&apos;"/> <bm:query-field name="division_n" queryExpression="t1.division_n like &apos;%&apos;||${@division_n}||&apos;%&apos;"/>
<bm:query-field name="policy_name" queryExpression="t1.policy_name=${@policy_name}"/> <bm:query-field name="policy_name" queryExpression="t1.policy_name=${@policy_name}"/>
<bm:query-field name="overdue_max_days_f" queryExpression="t1.overdue_max_days &gt;= ${@overdue_max_days_f}"/>
<bm:query-field name="overdue_max_days_t" queryExpression="t1.overdue_max_days &lt;= ${@overdue_max_days_t}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * from(
select h.policy_hd_id, select h.policy_hd_id,
h.policy_name, h.policy_name,
h.policy_ext_name, h.policy_ext_name,
...@@ -12,41 +13,8 @@ ...@@ -12,41 +13,8 @@
where d.division = h.division) division_n where d.division = h.division) division_n
from hlcm_comsn_policy_hd h from hlcm_comsn_policy_hd h
where h.wfl_status = 'APPROVED' where h.wfl_status = 'APPROVED'
and h.bp_id = ${@bp_id} and h.bp_id = ${@bp_id}) t
and exists #WHERE_CLAUSE#
(select 1
from con_contract t
where t.data_class = 'NORMAL'
and t.bp_id_agent_level1 = h.bp_id
and t.division = h.division
and t.contract_status in ('INCEPT',
'REPURING',
'REPUR',
'TERMINATING',
'TERMINATE',
'ETING',
'ET',
'PENDING')
and trunc(t.lease_start_date) >= trunc(h.calc_start_date)
and trunc(t.lease_start_date) <= trunc(h.calc_end_date)
and (select count(1)
from con_contract_cashflow cc
where cc.contract_id = t.contract_id
and cc.cf_item = 1
and cc.cf_direction = 'INFLOW'
and cc.cf_status = 'RELEASE'
and cc.write_off_flag = 'FULL') >= h.rent_recovery_time
and exists (select 1
from con_contract_cashflow cc1
where cc1.contract_id = t.contract_id
and cc1.cf_item = 0
and cc1.write_off_flag = 'FULL')
and not exists
(select 1
from hlcm_comsn_reconcilia r
where r.contract_id = t.contract_id
and r.wfl_status in ('NEW', 'APPROVING', 'APPROVED')))
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
...@@ -58,8 +26,8 @@ ...@@ -58,8 +26,8 @@
<bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="160" forDisplay="true" forQuery="true" physicalName="DIVISION_N" prompt="产品线"/> <bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="160" forDisplay="true" forQuery="true" physicalName="DIVISION_N" prompt="产品线"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field field="policy_name" queryExpression="t1.policy_name like &apos;%&apos;||${@policy_name}||&apos;%&apos;"/> <bm:query-field field="policy_name" queryExpression="t.policy_name like &apos;%&apos;||${@policy_name}||&apos;%&apos;"/>
<bm:query-field field="policy_ext_name" queryExpression="t1.policy_ext_name like &apos;%&apos;||${@policy_ext_name}||&apos;%&apos;"/> <bm:query-field field="policy_ext_name" queryExpression="t.policy_ext_name like &apos;%&apos;||${@policy_ext_name}||&apos;%&apos;"/>
<bm:query-field field="division_n" queryExpression="t1.division_n like &apos;%&apos;||${@division_n}||&apos;%&apos;"/> <bm:query-field field="division_n" queryExpression="t.division_n like &apos;%&apos;||${@division_n}||&apos;%&apos;"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -13,9 +13,13 @@ ...@@ -13,9 +13,13 @@
gld_period_pkg.close_period(${/session/@company_id}, gld_period_pkg.close_period(${/session/@company_id},
${@period_set_code}, ${@period_set_code},
${@period_name}, ${@period_name},
${/session/@user_id}); ${/session/@user_id},
${@p_err_msg});
end; end;
]]></update-sql> ]]></update-sql>
<parameters>
<parameter name="p_err_msg" dataType="java.lang.String" input="false" output="true" outputPath="@p_err_msg"/>
</parameters>
</operation> </operation>
</operations> </operations>
</model> </model>
remove_query_field('approval_status_n');
var override_queryfields = [ var override_queryfields = [
{ {
name : 'amount_from', name : 'amount_from',
...@@ -18,6 +19,10 @@ var override_queryfields = [ ...@@ -18,6 +19,10 @@ var override_queryfields = [
{ {
name:'payment_req_number', name:'payment_req_number',
queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'" queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'"
},
{
name:'approval_status',
queryexpression:"t1.approval_status = ${@approval_status}"
} }
]; ];
var add_datafilters = [ var add_datafilters = [
......
remove_query_field('approval_status_n');
var override_queryfields = [ var override_queryfields = [
{ {
name : 'req_date_from', name : 'req_date_from',
...@@ -10,6 +11,10 @@ var override_queryfields = [ ...@@ -10,6 +11,10 @@ var override_queryfields = [
{ {
name:'payment_req_number', name:'payment_req_number',
queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'" queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'"
},
{
name:'approval_status',
queryexpression:"t1.approval_status = ${@approval_status}"
} }
]; ];
var add_datafilters = [ var add_datafilters = [
......
...@@ -58,13 +58,8 @@ ...@@ -58,13 +58,8 @@
} }
return value; return value;
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
aut_authority_list_validate_query(ds, qpara);
};
]]></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:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PAYMENT_REQ&amp;function_code=CSH501R"/>
</a:view> </a:view>
</a:screen> </a:screen>
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
$jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_DELETE_layout_dynamic_button_id').hide(); $jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_DELETE_layout_dynamic_button_id').hide();
} }
} }
//进项发票信息 //进项发票信息
var first = document.getElementsByClassName("item-input-wrap"); var first = document.getElementsByClassName("item-input-wrap");
var second = first[5].getElementsByClassName('item-textField'); var second = first[5].getElementsByClassName('item-textField');
...@@ -501,14 +500,12 @@ ...@@ -501,14 +500,12 @@
//上传附件 //上传附件
function upload_csh_file(id,name,record_id,query_only) { function upload_csh_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if(record.data['payment_req_id']){
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){ if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record_id; var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record.data['payment_req_id'];
}else{ }else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record_id; var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record.data['payment_req_id'];
} }
if(record_id == 'undefined' || record_id == null || record_id == ''){
Leaf.showMessage('提示','请先保存后再上传附件!');
}else{
var win = new Leaf.Window({ var win = new Leaf.Window({
url: url, url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}', title: '${l:HLS.SUPPORTING_DOCUMENT}',
...@@ -518,6 +515,8 @@ ...@@ -518,6 +515,8 @@
}); });
win.on('close', function () { win.on('close', function () {
}); });
}else{
Leaf.showMessage('提示','请先保存后再上传附件!');
} }
} }
...@@ -525,14 +524,12 @@ ...@@ -525,14 +524,12 @@
//上传发票附件:用于电子档案 //上传发票附件:用于电子档案
function upload_invoice_file(id,name,record_id,query_only) { function upload_invoice_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if(record.data['payment_req_id']){
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){ if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=HL_COMM_PAYMENT_ACP&header_id=' + record_id; var url = $('csh_downloadFile_id').getUrl() + '?table_name=HL_COMM_PAYMENT_ACP&header_id=' + record.data['payment_req_id'];
}else{ }else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=HL_COMM_PAYMENT_ACP&header_id=' + record_id; var url = $('csh_uploadFile_id').getUrl() + '?table_name=HL_COMM_PAYMENT_ACP&header_id=' + record.data['payment_req_id'];
} }
if(record_id == 'undefined' || record_id == null || record_id == ''){
Leaf.showMessage('提示','请先保存后再上传附件!');
}else{
var win = new Leaf.Window({ var win = new Leaf.Window({
url: url, url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}', title: '${l:HLS.SUPPORTING_DOCUMENT}',
...@@ -542,9 +539,12 @@ ...@@ -542,9 +539,12 @@
}); });
win.on('close', function () { win.on('close', function () {
}); });
}else{
Leaf.showMessage('提示','请先保存后再上传附件!');
} }
} }
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'contract_number'&& value) { if (name == 'contract_number'&& value) {
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
$Revision: 1.0 $Revision: 1.0
$Purpose:佣金支付选择对账单 $Purpose:佣金支付选择对账单
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:screen xmlns:a="http://www.leaf-framework.org/application" >
<a:init-procedure> <a:init-procedure>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="csh_payment_comm_cashflow_id_link" <a:link id="csh_payment_comm_cashflow_id_link"
...@@ -40,7 +41,11 @@ ...@@ -40,7 +41,11 @@
var param = {}; var param = {};
var contract_id_list = []; var contract_id_list = [];
if (record == undefined) { if (record == undefined) {
Leaf.showMessage('${l:PROMPT_MESSAGE}', '至少选择一条对账单!', null, 250, 100); Leaf.showMessage('${l:PROMPT_MESSAGE}', '至少选择一条佣金计提单!', null, 250, 100);
return;
}
if(a.length>490){
Leaf.showMessage('${l:PROMPT_MESSAGE}', '一笔付款选择计提单条数最多不能超过490条!', null, 250, 100);
return; return;
} }
//对是否为同一个代理店进行检查 //对是否为同一个代理店进行检查
...@@ -48,7 +53,7 @@ ...@@ -48,7 +53,7 @@
for (i = 0; i < a.length; i++) { for (i = 0; i < a.length; i++) {
if (a[i].get('bp_id_agent_level1_n') != bp_id_agent) { if (a[i].get('bp_id_agent_level1_n') != bp_id_agent) {
vender_flag = false; vender_flag = false;
$L.showErrorMessage("提示", '请选择代理店相同的对账单!'); $L.showErrorMessage("提示", '请选择代理店相同的佣金计提单据!');
return; return;
} }
cashflow_id = a[i].get('cashflow_id'); cashflow_id = a[i].get('cashflow_id');
...@@ -223,12 +228,13 @@ ...@@ -223,12 +228,13 @@
</a:field> </a:field>
<a:field name="division_n" displayField="value_name" options="comm_division_name_ds" <a:field name="division_n" displayField="value_name" options="comm_division_name_ds"
returnField="division" valueField="value_code"/> returnField="division" valueField="value_code"/>
<a:field name="overdue_max_days"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="headUpdateFunction"/> <a:event name="update" handler="headUpdateFunction"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_payment_comm_selectedDs" fetchAll="true" autoQuery="true" <a:dataSet id="csh_payment_comm_selectedDs" pageSize="100" autoQuery="true"
model="csh.CSH501R.csh_payment_req_comm_selected" queryDataSet="csh_payment_req_comm_ds" model="csh.CSH501R.csh_payment_req_comm_selected" queryDataSet="csh_payment_req_comm_ds"
selectable="true"> selectable="true">
</a:dataSet> </a:dataSet>
...@@ -247,6 +253,10 @@ ...@@ -247,6 +253,10 @@
<a:lov name="bp_id_agent_level1_n" bindTarget="csh_payment_req_comm_ds" prompt="代理店"></a:lov> <a:lov name="bp_id_agent_level1_n" bindTarget="csh_payment_req_comm_ds" prompt="代理店"></a:lov>
<a:lov name="policy_name" bindTarget="csh_payment_req_comm_ds" prompt="佣金政策"/> <a:lov name="policy_name" bindTarget="csh_payment_req_comm_ds" prompt="佣金政策"/>
<a:comboBox name="division_n" bindTarget="csh_payment_req_comm_ds" prompt="产品线"/> <a:comboBox name="division_n" bindTarget="csh_payment_req_comm_ds" prompt="产品线"/>
<a:numberField name="overdue_max_days_f" allowFormat="true" bindTarget="csh_payment_req_comm_ds"
prompt="最新逾期天数从"/>
<a:numberField name="overdue_max_days_t" allowFormat="true" bindTarget="csh_payment_req_comm_ds"
prompt="最新逾期天数到"/>
</a:form> </a:form>
<a:grid id="csh_payment_commi_maintain_grid_ds" bindTarget="csh_payment_comm_selectedDs" marginHeight="200" <a:grid id="csh_payment_commi_maintain_grid_ds" bindTarget="csh_payment_comm_selectedDs" marginHeight="200"
marginWidth="40" navBar="true" rowRenderer="change_background_color"> marginWidth="40" navBar="true" rowRenderer="change_background_color">
......
...@@ -86,16 +86,20 @@ ...@@ -86,16 +86,20 @@
Leaf.request({ Leaf.request({
url: url, url: url,
para: record.data, para: record.data,
success: function() { success: function(args) {
if (args.result.p_err_msg) {
record.set('period_status_code','C'); $L.showConfirm('提示', args.result.p_err_msg, function () {
record.set('period_status_code', 'C');
});
} else {
record.set('period_status_code', 'C');
Leaf.SideBar.enable = true; Leaf.SideBar.enable = true;
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '关闭成功', msg: '关闭成功',
duration: 3000 duration: 3000
}); });
}
}, },
scope: this scope: this
}); });
......
...@@ -351,8 +351,13 @@ ...@@ -351,8 +351,13 @@
Leaf.request({ Leaf.request({
url: url, url: url,
para: record.data, para: record.data,
success: function () { success: function (args) {
if (args.result.p_err_msg) {
$L.showConfirm('提示', args.result.p_err_msg, function () {
record.set('period_status_code', 'C');
});
} else {
record.set('period_status_code', 'C'); record.set('period_status_code', 'C');
Leaf.SideBar.enable = true; Leaf.SideBar.enable = true;
...@@ -360,7 +365,7 @@ ...@@ -360,7 +365,7 @@
msg: '关闭成功', msg: '关闭成功',
duration: 3000 duration: 3000
}); });
}
}, },
scope: this scope: this
}); });
......
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