Commit 70d48183 authored by panhong18943's avatar panhong18943

Merge branch 'remote_dev' of https://hel.hand-china.com/hlcm/leaf-hlcm into remote_dev

parents c2eb2816 7387f28b
<?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
hlcm_monthly_report_pkg.query_hlcm_monthly_report_job(
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hlcm_monthly_report_pkg.insert_hlcm_monthly_report_job(
p_month =>${@month},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -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"/>
......
......@@ -6,6 +6,7 @@
SELECT
to_char(sysdate,'yyyy') as year,
to_char(sysdate,'mm') as current_month,
to_char(add_months(sysdate,-1),'yyyy-mm') as last_month,
sysdate as current_period
FROM
dual
......
......@@ -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>
var override_queryfields = [
{
name:'inception_of_lease_from',
queryexpression:"t1.inception_of_lease between to_date(${@inception_of_lease_from},'yyyy-mm-dd') and nvl(to_date(${@inception_of_lease_to},'yyyy-mm-dd'),t1.inception_of_lease)"
},
{
name:'inception_of_lease_to',
queryexpression:"t1.inception_of_lease between nvl(to_date(${@inception_of_lease_from},'yyyy-mm-dd'),t1.inception_of_lease) and to_date(${@inception_of_lease_to},'yyyy-mm-dd')"
}
];
var add_datafilters=[{
name:'commission_month',
......
......@@ -12,7 +12,7 @@ var add_datafilters = [ {
},
{
name : 'divisions',
expression : 't1.division in (${@division1},${@division2},${@division3},${@division4},${@division5},${@division6},${@division7},${@division8},{@division9},{@division10}) '
expression : 't1.division in (${@division1},${@division2},${@division3},${@division4},${@division5},${@division6},${@division7},${@division8},{@division9},{@division10},{@division14}) '
}
];
......
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 = [
{
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="cont.CON780.get_current_date" rootPath="default_date_path"/>
</a:init-procedure>
<a:view>
<a:link id="con1380_query_id" model="cont.CON1380.con1380_result_query_job" modelaction="execute"/>
<a:link id="query_job" model="cont.CON1380.con1380_result_query_job" modelaction="update"/>
<script><![CDATA[
$L.onReady(function(){
debugger;
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUERY', 'con_contract');
var re_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'con_contract');
var record = $(ds_id).getCurrentRecord();
var baseDate = record.get('base_date');
if(baseDate == undefined){
$(re_ds_id).setQueryParameter('commission_month','1');
$(re_ds_id).query();
}
var headers_ds = $('${/parameter/@layout_code}_F_QUERY__ds');
var record = headers_ds.getCurrentRecord();
record.set('base_date','${/model/default_date_path/record/@last_month}');
record.set('base_date_n','${/model/default_date_path/record/@last_month}');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hlcm_monthly_report_temp');
$(ds_id).setQueryParameter('commission_month',record.get('base_date'));
$(ds_id).query();
});
//查询时调用(grid,table,gridBox)
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function(ds, record, config_records, bp_seq) {
debugger;
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUERY', 'con_contract');
var re_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'con_contract');
var record = $(ds_id).getCurrentRecord();
var baseDate = record.get('base_date');
if(baseDate == undefined){
$L.showMessage('提示','请先选择基准日期!');
//更新全量数据
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var headers_ds = $('${/parameter/@layout_code}_F_QUERY__ds');
var record = headers_ds.getAt(0);
if (Ext.isEmpty(record.get('base_date'))) {
$L.showMessage('提示', '请选择基准日期');
return;
}else {
$(re_ds_id).setQueryParameter('commission_month',baseDate);
$(re_ds_id).query();
}
Leaf.showConfirm('${l:HLS.PROMPT}', '<font color="red">该任务需执行约30分钟,请耐心等待!</font></br></br><font color="red">【特别注意】任务发起后30分钟内请勿重复点击</font>', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:BEING_IMPLEMENTED}');
Leaf.request({
url: $('con1380_query_id').getUrl(),
para: {
month: record.get('base_date')
},
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);
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var headers_ds = $('${/parameter/@layout_code}_F_QUERY__ds');
var record = headers_ds.getCurrentRecord();
if (Ext.isEmpty(record.get('base_date'))) {
$L.showMessage('提示', '请选择基准日期');
return;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hlcm_monthly_report_temp');
$(ds_id).setQueryParameter('commission_month',record.get('base_date'));
$(ds_id).query();
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -103,11 +103,13 @@
// record.getField('guarantee_letter_f_n').setReadOnly(true);
// }else
if (record.get('division')!='70'&&record.get('division')!='92'){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
if(document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt')!=null){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT').style.display = 'none';
if (record.get('division')!='93'){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_CUSTOMER_MARGIN').style.display = 'none';
if(document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt')!=null){
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_WRITE_OFF_AMOUNT').style.display = 'none';
}
}
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_BRAND_VALUE').style.display = 'none';
......
......@@ -118,6 +118,9 @@
};
if(record.data.lease_name99=='Y'){//add by gzj
record.data.division=record.data.division+',99';
};
if(record.data.lease_name93=='Y'){//add by gzj
record.data.division=record.data.division+',93';
};
record.data.division=record.data.division.substr(1,record.data.division.length);
$('contract_sales_result_ds').query();
......@@ -214,6 +217,7 @@
<a:checkBox name="lease_name91" bindTarget="contract_sales_report_ds" prompt="神钢建机"/>//addby xsh35973 20221011 I-12357新增产品线
<a:checkBox name="lease_name92" bindTarget="contract_sales_report_ds" prompt="北京心诚"/>
<a:checkBox name="lease_name99" bindTarget="contract_sales_report_ds" prompt="工程机械"/>
<a:checkBox name="lease_name93" bindTarget="contract_sales_report_ds" prompt="新业务-厂商担保"/>
</a:form>
<a:grid id="contract_sales_result_ds_grid" bindTarget="contract_sales_result_ds" marginHeight="150" navBar="true" marginWidth="40">
......
......@@ -41,6 +41,7 @@
record.data.division10='';
record.data.division11='';
record.data.division12='';
record.data.division14='';
if(record.data.lease_name10=='Y'){
record.data.division1='10';
}
......@@ -77,9 +78,12 @@
if(record.data.lease_name99=='Y'){
record.data.divisio12='99';
};
if(record.data.lease_name93=='Y'){
record.data.divisio14='93';
};
// record.data.division=record.data.division.substr(1,record.data.division.length);
if(record.data.division1 == ''&&record.data.division2 == ''&&record.data.division3 == ''&&record.data.division4 == ''
&&record.data.division5 == ''&&record.data.division6 == ''&&record.data.division7 == ''&&record.data.division8 == ''&&record.data.division9 == ''&&record.data.division10 == ''&&record.data.division11 == ''&&record.data.division12 == ''){
&&record.data.division5 == ''&&record.data.division6 == ''&&record.data.division7 == ''&&record.data.division8 == ''&&record.data.division9 == ''&&record.data.division10 == ''&&record.data.division11 == ''&&record.data.division12 == ''&&record.data.division14 == ''){
// record.data.division1='10,20,30,40,50,60,70,80';
record.data.division1='10';
record.data.division2='20';
......@@ -93,6 +97,7 @@
record.data.division10='91';
record.data.division11='92';
record.data.division12='99';
record.data.division14='93';
};
param['division1']= record.data.division1;
......@@ -107,6 +112,7 @@
param['division10']= record.data.division10;
param['division11']= record.data.division11;
param['division12']= record.data.division12;
param['division14']= record.data.division14;
param['period_name']=period_name;
param['function_code'] = 'CON3400N';
param['function_usage'] = 'MODIFY';
......
......@@ -75,6 +75,7 @@
$(ds_id).setQueryParameter("division9",'${/parameter/@division9}');
$(ds_id).setQueryParameter("division10",'${/parameter/@division10}');
$(ds_id).setQueryParameter("division11",'${/parameter/@division11}');
$(ds_id).setQueryParameter("division14",'${/parameter/@division14}');
$(ds_id).query();
})
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -54,6 +54,9 @@
if(record.data.lease_name99=='Y'){//add by gzj 2022-12-19 10:17:53
record.data.division=record.data.division+',99';
};
if(record.data.lease_name93=='Y'){//add by gzj 2022-12-19 10:17:53
record.data.division=record.data.division+',93';
};
record.data.division=record.data.division.substr(1,record.data.division.length);
Leaf.Masker.mask(Ext.getBody(), '正在统计并查询,请稍等...');
Leaf.request({
......@@ -166,6 +169,7 @@
<a:field checkedValue="Y" name="lease_name90" uncheckedValue="N" defaultValue="N"/>
<a:field checkedValue="Y" name="lease_name92" uncheckedValue="N" defaultValue="N"/>
<a:field checkedValue="Y" name="lease_name99" uncheckedValue="N" defaultValue="N"/>
<a:field checkedValue="Y" name="lease_name93" uncheckedValue="N" defaultValue="N"/>
<a:field name="division" />
<a:field name="overdue_day1" required="true" prompt="已到期1个月界定天数" defaultValue="30"/>
<a:field name="overdue_day2" required="true" prompt="已到期2个月界定天数" defaultValue="60"/>
......@@ -218,6 +222,7 @@
<a:checkBox name="lease_name91" bindTarget="con_contract_cashflow_monthly_query_ds" prompt="神钢建机"/>//addby xsh35973 20221011 I-12357新增产品线
<a:checkBox name="lease_name92" bindTarget="con_contract_cashflow_monthly_query_ds" prompt="北京心诚"/>
<a:checkBox name="lease_name99" bindTarget="con_contract_cashflow_monthly_query_ds" prompt="工程机械"/>
<a:checkBox name="lease_name93" bindTarget="con_contract_cashflow_monthly_query_ds" prompt="新业务-厂商担保"/>
......
......@@ -239,10 +239,11 @@
url: $(ocr_query_link ).getUrl(),
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.SideBar.show({
msg:'获取数据'+res.result.page_number+'页'+'共'+res.result.total+'条',
duration: 10000
})
// Leaf.SideBar.show({
// msg:'获取数据'+res.result.page_number+'页'+'共'+res.result.total+'条',
// duration: 10000
// })
Leaf.showMessage('提示', '获取数据'+res.result.page_number+'页'+'共'+res.result.total+'条');
$("OcrQueryDs").query();
},
failure: function() {
......
......@@ -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
});
......
......@@ -46,9 +46,11 @@
if(wflStatus=='NEW' || wflStatus=='APPROVED_RETURN'){
param['function_code'] = 'HLS303_BD';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'MODIFY';
param['url_title'] = '佣金政策维护';
param['policy_hd_id'] = policy_hd_id;
param['bp_id'] = bpId;
param['extra_nam'] = record.get('extra_nam');
}
if(wflStatus=='APPROVING' || wflStatus=='APPROVED'){
param['function_code'] = 'HLS303_BD';
......
......@@ -33,6 +33,13 @@
if(document.getElementById('${/parameter/@layout_code}_save')){
$jq('#${/parameter/@layout_code}_save').hide();
}
//uat环境设置query只读不能对grid按钮隐藏处理
if($jq('#${/parameter/@layout_code}_G_RESULT_ADD_layout_dynamic_button_id')){
$jq('#${/parameter/@layout_code}_G_RESULT_ADD_layout_dynamic_button_id').hide();
}
if($jq('#${/parameter/@layout_code}_G_RESULT_DELETE_layout_dynamic_button_id')){
$jq('#${/parameter/@layout_code}_G_RESULT_DELETE_layout_dynamic_button_id').hide();
}
}
});
//更新时调用
......@@ -76,6 +83,18 @@
}
}
};
/* 时间戳转换为时间 */
function RetimestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : String(date.getMonth() + 1)) + '-';
var D = (date.getDate() < 10 ? '0' + date.getDate() : String(date.getDate()));
// var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
// var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
};
//提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
debugger;
......@@ -86,8 +105,8 @@
var policyHdId=record.get('policy_hd_id');
var bpId=record.get('bp_id');
var division=record.get('division');
var calcStartDate = timestampToTime(Date.parse(record.get('calc_start_date')));
var calcEndDate = timestampToTime(Date.parse(record.get('calc_end_date')));
var calcStartDate = RetimestampToTime(Date.parse(record.get('calc_start_date')));
var calcEndDate = RetimestampToTime(Date.parse(record.get('calc_end_date')));
if(record.dirty==true){
Leaf.showMessage('${l:PROMPT}','${l:HLS.EXECUTE_AFTER_SAVE}');
return;
......@@ -113,17 +132,17 @@
success: function(res) {
if(res.result.record !=undefined){
if(res.result.record.length ==undefined){
var resStartDate=timestampToTime(Date.parse(res.result.record.calc_start_date));
var resEndDate=timestampToTime(Date.parse(res.result.record.calc_end_date));
if(resStartDate<calcStartDate<resEndDate || resStartDate<calcEndDate<resEndDate){
var resStartDate=RetimestampToTime(Date.parse(res.result.record.calc_start_date));
var resEndDate=RetimestampToTime(Date.parse(res.result.record.calc_end_date));
if((resStartDate<calcStartDate && calcStartDate<resEndDate) || (resStartDate<calcEndDate && calcEndDate<resEndDate)){
$L.showErrorMessage('提示','该代理店项下存在重叠的政策时间,请先检查!');
return;
}
}else {
for(var i=0;i<res.result.record.length;i++){
var resStartDate=timestampToTime(Date.parse(res.result.record[i].calc_start_date));
var resEndDate=timestampToTime(Date.parse(res.result.record[i].calc_end_date));
if(resStartDate<calcStartDate<resEndDate || resStartDate<calcEndDate<resEndDate){
var resStartDate=RetimestampToTime(Date.parse(res.result.record[i].calc_start_date));
var resEndDate=RetimestampToTime(Date.parse(res.result.record[i].calc_end_date));
if((resStartDate<calcStartDate && calcStartDate<resEndDate) || (resStartDate<calcEndDate && calcEndDate<resEndDate)){
$L.showErrorMessage('提示','该代理店项下存在重叠的政策时间,请先检查!');
return;
}
......@@ -196,7 +215,7 @@
}
}
var division = record.get('division_n');
if(record.isNew==true && record.get('wfl_status') !='APPROVING' && record.get('policy_name') == undefined){
if(record.get('wfl_status') !='APPROVING'){
var calcStartDate = timestampToTime(Date.parse(record.get('calc_start_date')));
var calcEndDate = timestampToTime(Date.parse(record.get('calc_end_date')));
record.set('policy_name','${/parameter/@extra_nam}'+'-'+division+calcStartDate+'-'+calcEndDate);
......
......@@ -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
});
......
......@@ -860,6 +860,10 @@
}
}
if(division !='93'){
record.getField('customer_margin').setReadOnly(true);
record.getField('customer_margin_n').setReadOnly(true);
}
if (division != '70'&&division!='92' && division != '') {
if(division != '93'){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
......
......@@ -1437,6 +1437,10 @@
}
}
if(division !='93'){
record.getField('customer_margin').setReadOnly(true);
record.getField('customer_margin_n').setReadOnly(true);
}
if(division!='70'&&division!='92'&&division!=''){
if(division != '93'){
......@@ -1776,7 +1780,7 @@
var show = down_payment_rate_new * 100;
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if(current_record.get('division')!='91'){
if(current_record.get('division')!='91'&&current_record.get('division')!='93'){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
......@@ -1874,7 +1878,7 @@
var show = down_payment_rate_new * 100;
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if(current_record.get('division')!='91') {
if(current_record.get('division')!='91'&&current_record.get('division')!='93') {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
......
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