Commit 0db0d008 authored by 18083's avatar 18083

佣金uat调整

parent 8c3283c9
......@@ -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 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_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"/>
......
......@@ -35,7 +35,7 @@
join con_contract t
on t.contract_id = f.contract_id
join hlcm_comsn_reconcilia hc
on t.contract_id = hc.contract_id
on f.cashflow_id = hc.cashflow_id
where EXISTS (SELECT 1
FROM CSH_PAYMENT_CASHFLOW_ID_TEMP tmp
WHERE tmp.session_id = ${/session/@session_id}
......
......@@ -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="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="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:model>
......@@ -3,6 +3,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from(
select h.policy_hd_id,
h.policy_name,
h.policy_ext_name,
......@@ -12,41 +13,8 @@
where d.division = h.division) division_n
from hlcm_comsn_policy_hd h
where h.wfl_status = 'APPROVED'
and h.bp_id = ${@bp_id}
and exists
(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')))
and h.bp_id = ${@bp_id}) t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......@@ -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: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_ext_name" queryExpression="t1.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="policy_name" queryExpression="t.policy_name like &apos;%&apos;||${@policy_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="t.division_n like &apos;%&apos;||${@division_n}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -13,9 +13,13 @@
gld_period_pkg.close_period(${/session/@company_id},
${@period_set_code},
${@period_name},
${/session/@user_id});
${/session/@user_id},
${@p_err_msg});
end;
]]></update-sql>
</operation>
</operations>
<parameters>
<parameter name="p_err_msg" dataType="java.lang.String" input="false" output="true" outputPath="@p_err_msg"/>
</parameters>
</operation>
</operations>
</model>
remove_query_field('approval_status_n');
var override_queryfields = [
{
name : 'amount_from',
......@@ -18,7 +19,11 @@ var override_queryfields = [
{
name:'payment_req_number',
queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'"
}
},
{
name:'approval_status',
queryexpression:"t1.approval_status = ${@approval_status}"
}
];
var add_datafilters = [
{
......
remove_query_field('approval_status_n');
var override_queryfields = [
{
name : 'req_date_from',
......@@ -10,7 +11,11 @@ var override_queryfields = [
{
name:'payment_req_number',
queryexpression:"t1.payment_req_number like '%'||${@payment_req_number}||'%'"
}
},
{
name:'approval_status',
queryexpression:"t1.approval_status = ${@approval_status}"
}
];
var add_datafilters = [
{
......
......@@ -58,13 +58,8 @@
}
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_authority_list_validate.lview?document_category=PAYMENT_REQ&amp;function_code=CSH501R"/>
</a:view>
</a:screen>
......@@ -2,8 +2,8 @@
<!--
$Author: trd
$Date: 2024-1-18 上午09:27:36
$Revision: 1.0
$Purpose:
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
customizationEnabled="true" dynamiccreateenabled="true" trace="true">
......@@ -59,8 +59,7 @@
$jq('#${/parameter/@layout_code}_AP_INVOICE_DETAIL_G_DELETE_layout_dynamic_button_id').hide();
}
}
//进项发票信息
//进项发票信息
var first = document.getElementsByClassName("item-input-wrap");
var second = first[5].getElementsByClassName('item-textField');
var third = second[0];
......@@ -501,15 +500,13 @@
//上传附件
function upload_csh_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
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;
}else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record_id;
}
if(record_id == 'undefined' || record_id == null || record_id == ''){
Leaf.showMessage('提示','请先保存后再上传附件!');
}else{
var win = new Leaf.Window({
if(record.data['payment_req_id']){
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record.data['payment_req_id'];
}else{
var url = $('csh_uploadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_COMM_HD&header_id=' + record.data['payment_req_id'];
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'csh_attachment_uploadFile_id',
......@@ -518,22 +515,22 @@
});
win.on('close', function () {
});
}else{
Leaf.showMessage('提示','请先保存后再上传附件!');
}
}
//上传发票附件:用于电子档案
function upload_invoice_file(id,name,record_id,query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
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 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'){
var url = $('csh_downloadFile_id').getUrl() + '?table_name=HL_COMM_PAYMENT_ACP&header_id=' + record.data['payment_req_id'];
}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,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'invoice_attachment_uploadFile_id',
......@@ -542,9 +539,12 @@
});
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}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'contract_number'&& value) {
......
......@@ -5,8 +5,9 @@
$Revision: 1.0
$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:view>
<a:link id="csh_payment_comm_cashflow_id_link"
......@@ -40,15 +41,19 @@
var param = {};
var contract_id_list = [];
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;
}
//对是否为同一个代理店进行检查
var bp_id_agent = record.get('bp_id_agent_level1_n');
for (i = 0; i < a.length; i++) {
if (a[i].get('bp_id_agent_level1_n') != bp_id_agent) {
vender_flag = false;
$L.showErrorMessage("提示", '请选择代理店相同的对账单!');
$L.showErrorMessage("提示", '请选择代理店相同的佣金计提单据!');
return;
}
cashflow_id = a[i].get('cashflow_id');
......@@ -223,12 +228,13 @@
</a:field>
<a:field name="division_n" displayField="value_name" options="comm_division_name_ds"
returnField="division" valueField="value_code"/>
<a:field name="overdue_max_days"/>
</a:fields>
<a:events>
<a:event name="update" handler="headUpdateFunction"/>
</a:events>
</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"
selectable="true">
</a:dataSet>
......@@ -242,11 +248,15 @@
<a:gridButton id="comm_receipt_posted_id" click="comm_confirmFun" text="确定"/>
</a:screenTopToolbar>
<a:form column="4" labelWidth="100" marginWidth="40" title="查询条件">
<a:textField name="batch_number" bindTarget="csh_payment_req_comm_ds" prompt="计提单号"/>
<a:textField name="contract_number" bindTarget="csh_payment_req_comm_ds" prompt="合同编号"/>
<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:comboBox name="division_n" bindTarget="csh_payment_req_comm_ds" prompt="产品线"/>
<a:textField name="batch_number" bindTarget="csh_payment_req_comm_ds" prompt="计提单号"/>
<a:textField name="contract_number" bindTarget="csh_payment_req_comm_ds" prompt="合同编号"/>
<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: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:grid id="csh_payment_commi_maintain_grid_ds" bindTarget="csh_payment_comm_selectedDs" marginHeight="200"
marginWidth="40" navBar="true" rowRenderer="change_background_color">
......
......@@ -86,16 +86,20 @@
Leaf.request({
url: url,
para: record.data,
success: function() {
record.set('period_status_code','C');
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '关闭成功',
duration: 3000
});
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');
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '关闭成功',
duration: 3000
});
}
},
scope: this
});
......
......@@ -351,8 +351,13 @@
Leaf.request({
url: url,
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');
Leaf.SideBar.enable = true;
......@@ -360,7 +365,7 @@
msg: '关闭成功',
duration: 3000
});
}
},
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