Commit aa5462e3 authored by lizhe's avatar lizhe

Merge remote-tracking branch 'origin/master'

parents b8aa9206 fb87419b
......@@ -144,7 +144,7 @@
trunc(t2.due_date) < trunc(cc.CCR_LEASE_DATE))
--合同状态为解约回购中、解约回购完成的合同
or (cc.contract_status in ('REPUR', 'REPURING') and(
trunc(t2.due_date) < trunc(cc.REPURCHASE_DATE) or t2.je_transaction_code='CON_REPURCHASE' ) )
trunc(t2.due_date) < trunc(cc.REPURCHASE_DATE) or t2.je_transaction_code='CON_REPURCHASE') or (t2.document_type = 'REPUR_CHAG'and t2.write_off_flag = 'FULL' ) ) --update by xsh35973 添加解约回购提前结清完全核销数据
--合同状态为起租→开票对象:非深圳美鹏HCS小规模纳税人(自然人)→暂不开票→按季度展示未开票现金流
or
(cc.contract_status = 'INCEPT' and
......
......@@ -40,6 +40,7 @@
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="rl_flag"/>
<bm:field name="business_type" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -112,7 +113,8 @@
'N'
else
''
end rl_flag
end rl_flag,
con.business_type
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf,
......
......@@ -10,32 +10,52 @@
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
and cc.contract_id=t.contract_id
AND cc.business_type !='LEASEBACK'
AND t.invoice_type = 'PAPER'
AND v.code_value IN ('PAPER_GENERAL','PAPER_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
AND v.code_value IN ('PAPER_GENERAL', 'PAPER_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS (SELECT 1
FROM acr_invoice_create_tmp t
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
AND cc.business_type !='LEASEBACK'
AND t.invoice_type = 'ECT'
and cc.contract_id=t.contract_id
AND v.code_value IN ('ELECTRONIC_GENERAL','ELECTRONIC_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS (SELECT 1
FROM acr_invoice_create_tmp t
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
AND t.invoice_type not in('PAPER','ECT')
AND cc.business_type !='LEASEBACK'
AND t.invoice_type not in ('PAPER', 'ECT')
and cc.contract_id=t.contract_id
AND v.code_value IN ('RECEIPT'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
and cc.contract_id=t.contract_id
AND cc.business_type='LEASEBACK'
AND v.code_value IN ('PAPER_GENERAL','ELECTRONIC_GENERAL'))
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -150,10 +150,25 @@
WHERE
t.bp_id_tenant = b.bp_id(+) AND
t.contract_status = 'INCEPT' AND
t.contract_status in ('INCEPT','REPURING') AND
t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type
and (t.bp_id_agent_level1 = (select t.bp_id from sys_user s, exp_employees e, exp_employee_assigns a, exp_org_position pp,hls_bp_master t
where a.position_id = pp.position_id
and a.employee_id = e.employee_id
and s.employee_id = e.employee_id
and pp.unit_id = t.unit_id
and a.enabled_flag = 'Y'
and e.enabled_flag = 'Y'
and a.primary_position_flag = 'Y'
and pp.enabled_flag = 'Y'
and t.bp_type = 'AGENT'
and s.user_id = ${/session/@user_id}) or not exists (select 1
from sys_user_role_groups g, sys_role r
where g.role_id = r.role_id
and g.user_id = ${/session/@user_id}
and r.role_code in ('0018','0019')
and trunc(sysdate) <= nvl(g.end_date, trunc(sysdate))))
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
@Author: xsh 35973
@Date: 2022/6/13 13:59
@Revision: 1.0
@Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="contract_status"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select contract_status from con_contract t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
cus_con_et_pkg.check_cashflow_write_off(p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-24 下午2:19:04
$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[
select t.*
from exp_org_position_vl t
WHERE t.POSITION_ID in
(SELECT t.POSITION_ID
FROM exp_employee_assigns t
where t.employee_id =
(SELECT t.employee_id FROM sys_user t where t.user_id = ${/session/@user_id}))
and t.position_code='012'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$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[
select count(1) trans_review_number
from csh_transaction_contemp t,con_contract cc
where (t.trans_review_status ='REVIEWING'
or t.trans_review_status ='REVIEWING1')
and cc.contract_id = t.source_contract_id
and cc.data_class = 'NORMAL'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="trans_review_number"></bm:field>
</bm:fields>
</bm:model>
......@@ -108,7 +108,7 @@ end;
<bm:field name="unreceived_amount" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="left_principal" expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="left_interest" expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="unreceived_penalty" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9)" forInsert="false" forUpdate="false"/>
<bm:field name="unreceived_penalty" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9 and cf_status = 'RELEASE')" forInsert="false" forUpdate="false"/>
<bm:field name="agent_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="agent_id_desc" expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)" forUpdate="false" forInsert="false"/>
<bm:field name="write_off_classification" lookupField="write_off_classification_desc" lookupCode="DS_CSH_WRITE_OFF_CLASSIFICATION" databaseType="VARCHAR2" datatype="java.lang.String" />
......
......@@ -53,7 +53,15 @@
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="CSH511.CSH_TRANSACTION.GLD_INTERFACE_FLAG"/>
<bm:field name="bp_code" expression="(select d.bp_code from hls_bp_master_v d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" expression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="bp_name" expression="(select d.bp_name
from hls_bp_master_v d
where d.bp_id = (case
when ( SELECT c.division
FROM con_contract c
WHERE c.contract_id = t1.ref_contract_id) = '70' then
(SELECT cc.bp_id_agent_level1
FROM con_contract cc
WHERE cc.contract_id = t1.ref_contract_id) else t1.bp_id end))" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="unit_id" expression="(select d.unit_id from hls_bp_master d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false"/>
<bm:field name="payment_method_display" expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)" forInsert="false" forUpdate="false" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="currency_name" expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)" forInsert="false" forUpdate="false" prompt="HLS.CURRENCY"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WW
$Date: 2014-11-13 下午5:36:09
$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[
SELECT t1.user_id,t1.user_name FROM sys_user t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t1.user_id=${@user_id}"/>
</bm:query-fields>
</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="delete">
<bm:update-sql><![CDATA[
delete from hl_hsbc_doc_temp t where t.session_id = ${/session/@session_id}
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hl_hsbc_interface_pkg.insert_doc_temp_return(
p_session_id=>${/session/@session_id},
p_return_id=>${@return_id},
p_return_transaction_id=>${@return_transaction_id},
p_tranamount =>${@this_return_amount},
p_user_id=>${/session/@user_id},
p_button_id => ${/parameter/@button_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hl_hsbc_interface_pkg.create_batch_return(p_session_id => ${/session/@session_id},
p_bank_account_id => ${@bank_account_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$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[
select count(1) bp_number
from hls_bp_master_address t
where t.bp_id = ${@bp_id_tenant}
and t.address_type = 'HOUSE_ADDRESS'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_number"></bm:field>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
contract_sign_message_pkg.send_mobile_remind_info(p_user_id =>${/session/@user_id}, p_batch_id =>${@batch_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="batch_id" dataType="java.lang.Long" input="true" output="true"
outputPath="/parameter/@batch_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_SMS_LIST" needAccessControl="false">
<bm:fields>
<bm:field name="sms_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SMS_ID" prompt="SYS_SMS_LIST.SMS_ID"/>
<bm:field name="sms_date" databaseType="DATE" datatype="java.util.Date" physicalName="SMS_DATE" prompt="SYS_SMS_LIST.SMS_DATE"/>
<bm:field name="priority" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRIORITY" prompt="SYS_SMS_LIST.PRIORITY"/>
<bm:field name="phone_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE_NUMBER" prompt="SYS_SMS_LIST.PHONE_NUMBER"/>
<bm:field name="text" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TEXT" prompt="SYS_SMS_LIST.TEXT"/>
<bm:field name="error_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_STATUS" prompt="SYS_SMS_LIST.ERROR_STATUS"/>
<bm:field name="error_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_MSG" prompt="SYS_SMS_LIST.ERROR_MSG"/>
<bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="SYS_SMS_LIST.STATUS"/>
<bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="SYS_SMS_LIST.PROJECT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="SYS_SMS_LIST.CONTRACT_NUMBER"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="SYS_SMS_LIST.BP_NAME"/>
<bm:field name="sms_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SMS_TYPE" prompt="SYS_SMS_LIST.SMS_TYPE"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="SYS_SMS_LIST.CONTRACT_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="SYS_SMS_LIST.BATCH_ID"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="sms_id"/>
</bm:primary-key>
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_payment_msm_send_pkg.after_sys_sms_send_loop(p_sms_id =>${@sms_id},
p_send_result =>${@result},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" enforceOperations="query" expression="t1.status = &apos;NEW&apos; and t1.batch_id=${@batch_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-12-26 下午3:25:40
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_SMS_SERVER" needAccessControl="false">
<bm:fields>
<bm:field name="server_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SERVER_ID" prompt="SYS_SMS_SERVER.SERVER_ID"/>
<bm:field name="account_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ACCOUNT_ID" prompt="SYS_SMS_SERVER.ACCOUNT_ID"/>
<bm:field name="password" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PASSWORD" prompt="SYS_SMS_SERVER.PASSWORD"/>
<bm:field name="serviceid" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERVICEID" prompt="SYS_SMS_SERVER.SERVICEID"/>
<bm:field name="server_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERVER_CODE" prompt="SYS_SMS_SERVER.SERVER_CODE"/>
<bm:field name="server_url" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERVER_URL" prompt="SYS_SMS_SERVER.SERVER_URL"/>
<bm:field name="subcode" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="sign" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="server_id"/>
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="t1.server_code = &apos;HLCM_SMS&apos;"/>
</bm:data-filters>
</bm:model>
var override_queryfields = [
{
name : 'payment_req_number',
queryexpression : "transaction_num = ${@payment_req_number}"
},
{
name : 'approval_date_from',
queryexpression : "trunc(t1.approval_date) >= to_date(${@approval_date_from},'yyyy-mm-dd')"
},
{
name : 'approval_date_to',
queryexpression : "trunc(t1.approval_date) <= to_date(${@approval_date_to},'yyyy-mm-dd')"
}
];
override();
......@@ -12,7 +12,7 @@
var add_datafilters = [
{
name : 'init_filter',
expression : "t1.status in ('NEW','ERROR','FINISHED','SEND_MID','CONFIRM1_ERROR','CONFIRM2_FULL_ERROR')"
expression : "t1.status in ('NEW','ERROR','FINISHED','SEND_MID','CONFIRM1_ERROR','CONFIRM2_FULL_ERROR') and t1.cf_item = '0'"
}
];
......
var override_queryfields = [
{
name : 'creationdate_from',
queryexpression : "trunc(t1.creationdate) >= to_date(${@creationdate_from},'yyyy-mm-dd')"
},
{
name : 'creationdate_to',
queryexpression : "trunc(t1.creationdate) <= to_date(${@creationdate_to},'yyyy-mm-dd')"
}
];
var add_datafilters = [
{
name : 'init_filter',
expression : "t1.status in ('NEW','ERROR','FINISHED','SEND_MID','CONFIRM1_ERROR','CONFIRM2_FULL_ERROR') and t1.collection_classes = 'REFUND'"
}
];
add_datafilter();
override();
......@@ -43,7 +43,7 @@
function createScreen_create()
{
debugger;
var message_flag =false;
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
if(!ds.validate(true))
......@@ -54,6 +54,7 @@
//判断本次开票金额是否为租金,本金,和利息之中某一个
var selectedDs=$('selectedDs').getAll();
for(var i=0;i<selectedDs.length;i++){
debugger;
var billing_amount=selectedDs[i].get('billing_amount');
var due_amount=selectedDs[i].get('due_amount');
var principal=selectedDs[i].get('principal');
......@@ -70,18 +71,33 @@
$L.showErrorMessage("提示","该金额已经开票过!");
return;
}
//add by gzj 售后回租只能开普票
var business_type= selectedDs[i].get('business_type');
var kind_type=selectedDs[i].get('invoice_kind_type');
if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL')){
Leaf.showMessage("提示","售后回租只能开普通发票!");
return;
}
if(business_type=='LEASEBACK'&&kind_type!='ELECTRONIC_GENERAL'){
message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!");
}
if(received_amount<plus(cf_billing_amount,billing_amount)&&selectedDs[i].get('cf_item')==1&&selectedDs[i].get('cf_status')=='BLOCK'&&selectedDs[i].get('contract_status')=='REPURING'){
$L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!");
return;
}
}
var datas = ds.getJsonData();
Leaf.showConfirm('${l:HLS.PROMPT}','是否确认开票?',function()
var message_info;
if(message_flag==false){
message_info= '是否确认开票?';
}else {
message_info= "回租建议选择增值税电子普票!是否确认开票?";
}
Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function()
{
Leaf.Masker.mask(Ext.getBody(),'${l:HLS.EXECUTING}');
Leaf.request({
......@@ -100,7 +116,8 @@
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
scope: this,
sync: true
});
},function (){
Leaf.Masker.unmask(Ext.getBody());
......@@ -109,6 +126,8 @@
}
function unSelect_selectedDs(ds,record){
record.dirty = false;
}
......
......@@ -119,7 +119,8 @@
||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN'
||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN_A4'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_TJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_SURE'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_FR'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_D_ESWJ' ||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ_OEC'||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ') {
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_D_ESWJ' ||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ_OEC'||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_FR_TJ') { //update by xsh35973 添加法人铁甲保证函
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
......@@ -447,7 +447,40 @@
}
}
//add by xsh35973 调整后不为默认值高亮显示
//调整后逾期罚息
debugger;
var ds_id_req = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
if (ds_id_req == ds.id && ds_id_req) {
if (record.get('ccr_penalty') != record.get('penalty')) {
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_CCR_PENALTY');
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
req_change_input_1[0].style.setProperty('background-color', '#FF9965', 'important');
}
;
//调整后资金占用费
if (record.get('fund_possession_cost') != record.get('ccr_fund_possession_cost')) {
var req_change_id_2 = document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_FUND_POSSESSION_COST');
var req_change_input_2 = req_change_id_2.getElementsByTagName('input');
req_change_input_2[0].style.setProperty('background-color', '#FF9965', 'important');
}
;
//调整后提前结清手续费
var et_fee = record.get('et_fee');
if (et_fee != 500 && typeof (et_fee) != 'undefined') {
var req_change_id_3 = document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_ET_FEE');
var req_change_input_3 = req_change_id_3.getElementsByTagName('input');
req_change_input_3[0].style.setProperty('background-color', '#FF9965', 'important');
}
;
//调整后留购价
var residual_value = record.get('residual_value')
if (residual_value != 0 && typeof (residual_value) != 'undefined') {
var req_change_id_4 = document.getElementById('${/parameter/@layout_code}_F_QUOTATION_01_CON_CONTRACT_CHANGE_REQ_RESIDUAL_VALUE');
var req_change_input_4 = req_change_id_4.getElementsByTagName('input');
req_change_input_4[0].style.setProperty('background-color', '#FF9965', 'important');
};
}
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
......@@ -631,7 +664,7 @@
Leaf.request({
url: $('con731_cancel_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id}
change_req_id: '${/parameter/@change_req_id}'
},
success: function (res) {
// $('${/parameter/@layout_code}_user_button1').enable();
......
......@@ -5,6 +5,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="wx.WX100.sys_pilot_run_user" rootPath="pilot_run_user"/>
<a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON_ET001.con_get_contract_status" rootPath="get_contract_status"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_repo_detail_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
......@@ -123,7 +124,7 @@
/**提前结清利率**/
et_interest_rate: record.get('et_interest_rate'),
/**留购价**/
residual_value: record.get('residual_value')
residual_value: record.get('ccr_residual_value') //update by xsh35973 20220613
},
success: function (res) {
//record.set('et_fee', res.result.et_fee);
......@@ -134,6 +135,7 @@
record.set('ccr_penalty', res.result.penalty || 0);
record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_cost', res.result.fund_possession_cost);
record.set('ccr_fund_possession_cost', res.result.fund_possession_cost); //add by xsh35973 20220610
record.set('fund_possession_rate', res.result.fund_possession_rate);
record.set('last_rent_due_date', res.result.last_rent_due_date);
record.set('sum_unreceived_principal', res.result.sum_unreceived_principal);
......@@ -167,7 +169,43 @@
scope: this
});
}
//add by xsh35973 添加修改调整后资源占用费提前结清租金跟随变动
if(name == 'fund_possession_cost'){
if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的资金占用费金额应大于等于0!');
setTimeout(function () {
record.set('fund_possession_cost', 0);
}, 5);
return;
}
var sum_unreceived_principal = record.get('sum_unreceived_principal') || 0;
if(sum_unreceived_principal !=0) {
var et_due_amount_result = plus(sum_unreceived_principal, value);
record.set('et_due_amount', et_due_amount_result);
}
}
if(name == 'residual_value'){
if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的留购金金额应大于等于0!');
setTimeout(function () {
record.set('residual_value', 0);
}, 5);
return;
}
var et_total_amount_result=plus(plus(plus(plus(record.get('et_due_amount') || 0, record.get('et_fee') || 0), record.get('residual_value') || 0), record.get('overdue_amount') || 0), record.get('ccr_penalty'));
record.set('et_total_amount',et_total_amount_result);
}
if(name == 'et_due_amount'){
if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的提前结清租金金额应大于等于0!');
setTimeout(function () {
record.set('et_due_amount', 0);
}, 5);
return;
}
var et_total_amount_result=plus(plus(plus(plus(record.get('et_due_amount') || 0, record.get('et_fee') || 0), record.get('residual_value') || 0), record.get('overdue_amount') || 0), record.get('ccr_penalty'));
record.set('et_total_amount',et_total_amount_result);
}
}
};
......@@ -197,7 +235,28 @@
// $('${/parameter/@layout_code}_user_button3').disable();
//setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000);
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit);
//解约回购合同增加提交审批前是否完全核销校验 add by xsh35973
if('${/model/get_contract_status/record/@contract_status}' =='REPURING'){
Leaf.request({
url: '${/request/@context_path}/autocrud/cont.CON_ET001.con_get_contract_status/execute',
para: {
contract_id: '${/parameter/@contract_id}'
},
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
con_repo001_submit();
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}else {
con_repo001_submit();
};
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
......@@ -219,7 +278,7 @@
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: {
contract_id: ${/parameter/@change_req_id}
contract_id: '${/parameter/@change_req_id}'
},
scope: this,
success: function (res) {
......@@ -234,7 +293,7 @@
Leaf.request({
url: $('con_et002_submit_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id},
change_req_id: '${/parameter/@change_req_id}',
layout_code: '${/parameter/@layout_code}'
},
success: function(res) {
......@@ -286,7 +345,7 @@
Leaf.request({
url: $('con_et002_submit_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id},
change_req_id: '${/parameter/@change_req_id}',
layout_code: '${/parameter/@layout_code}'
},
success: function(res) {
......@@ -393,7 +452,7 @@
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: {
contract_id: ${/parameter/@change_req_id}
contract_id: '${/parameter/@change_req_id}'
},
scope: this,
success: function (res) {
......@@ -405,7 +464,7 @@
Leaf.request({
url: $('con_et002_cancel_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id}
change_req_id: '${/parameter/@change_req_id}'
},
success: function(res) {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
......@@ -449,6 +508,11 @@
Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约');
return;
}*/
//解约回购的合同发起提前结清时,不能发起电子签约 add by xsh35973
if('${/model/get_contract_status/record/@contract_status}' =='REPURING'){
Leaf.showMessage('${l:PROMPT}', '解约回购的合同发起提前结清时,不能发起电子签约');
return;
};
if(bussiness_type == 'LEASEBACK' && bp_tenant_class == 'NP'){
Leaf.showMessage('${l:PROMPT}', '业务类型为售后回租且是个人承租人的合同,不能发起电子签约');
return;
......
......@@ -29,8 +29,14 @@
var records = $('contractQueryScreen_mainDs').getSelected();
var record = records[0],
contract_id = record.get('contract_id');
var ccr_document_type;
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在回购期间无法进行后续操作,请谨慎操作!!!如果需要取消提前结清,请一定点击取消按钮!!!</span>', function () {
var ccr_document_type = 'ET_CHAG';
//新增解约回购提前结清单据类型addby xsh35973 20220615
if (record.get('contract_status')=='REPURING'){
ccr_document_type = 'REPUR_CHAG';
}else {
ccr_document_type = 'ET_CHAG';
};
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('con_et_create_change_link').getUrl(),
......@@ -75,8 +81,14 @@
var records = $('contractQueryScreen_mainDs').getSelected();
var record = records[0],
contract_id = record.get('contract_id');
var ccr_document_type;
Leaf.showConfirm('提示', '<span style="color: #ff0000;font-size: 15px; ">该操作不会对合同还款计划产生变更,仅试算用途;若需提交提前结清申请,请点击主界面【创建】按钮!</span>', function () {
var ccr_document_type = 'ET_CHAG';
//新增解约回购提前结清单据类型addby xsh35973 20220615
if (record.get('contract_status')=='REPURING'){
ccr_document_type = 'REPUR_CHAG';
}else {
ccr_document_type = 'ET_CHAG';
};
Leaf.Masker.mask(Ext.getBody(), '正在创建试算,,,');
Leaf.request({
url: $('con_et_create_change_link').getUrl(),
......
......@@ -47,7 +47,13 @@
return false;
}
var record = records[0];
var ccr_document_type = 'ET';
//update by xsh35973 增加回购提前结清合同文本生成
var ccr_document_type;
if (record.get('contract_status') == 'REPURING'){
ccr_document_type = 'REPUR_CHAG'
}else{
ccr_document_type = 'ET';
};
//var req_status = record.get('req_status');
var contract_id = record.get('change_req_id');
......
......@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/>
<a:model-query model="csh.CSH515.get_sys_post" rootPath="post_info"/>
</a:init-procedure>
<a:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
......@@ -37,16 +38,30 @@
// // window.open(url, '_self');
// }
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
/* var transaction_amount = ${/parameter/@transaction_amount}||0;
var return_amount = ${/parameter/@returned_amount}||0;
var write_off_amount = ${/parameter/@write_off_amount}||0;
var remain_total_amount = ${/parameter/@remain_total_amount}||0;
var bank_slip_num = '${/parameter/@bank_slip_num}';*/
record.set('remain_total_amount',remain_total_amount);
record.set('bank_slip_num',bank_slip_num);
// record.set('remain_total_amount',remain_total_amount);
// record.set('bank_slip_num',bank_slip_num);
if("${/model/post_info/record/@position_code}"!="012") {
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG_prompt").style.display = "none";
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG").style.display = "none";
}
};
//保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var band_na = $(ds_id).getAt(0).get('opposite_band_na');
var bank_branch_name = $(ds_id).getAt(0).get('bp_bank_branch_name');
if(bank_branch_name.indexOf(band_na)==-1){
Leaf.showMessage('提示', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
}
//提交按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
......@@ -58,11 +73,17 @@
var return_amount = $(ds_id).getAt(0).get('return_amount');
var write_off_amount = $(ds_id).getAt(0).get('write_off_amount');
var remain_total_amount = $(ds_id).getAt(0).get('remain_total_amount');
var band_na = $(ds_id).getAt(0).get('opposite_band_na');
var bank_branch_name = $(ds_id).getAt(0).get('bp_bank_branch_name');
// var check_amount = parseFloat(transaction_amount) - parseFloat(this_return_amount) - parseFloat(return_amount) - parseFloat(write_off_amount);
if (!return_id) {
Leaf.showMessage('提示', '请先保存再提交');
return;
}
if(bank_branch_name.indexOf(band_na)==-1){
Leaf.showMessage('提示', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return;
}
if(this_return_amount > parseFloat(remain_total_amount)){
Leaf.showMessage('提示', '退款金额不能大于可退款金额!');
return;
......@@ -73,7 +94,7 @@
// return;
// }
$L.showConfirm("提示",'确认提交审批?',function(){
$L.showConfirm("提示",'确认提交审批?</br>【注意】“退款对方账户银行及分行”需填写完整的银行及分行全称,请检查填写是否正确!',function(){
var detail_mask = $('${/parameter/@winid}').wrap;
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
......@@ -128,14 +149,18 @@
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) {
if (name == 'return_bp_type' && value == 'OTHER') {
record.getField('return_bp_code').setRequired(true);
record.getField('bp_bank_account_name').setReadOnly(false);
}else if(name == 'return_bp_type' && value != 'OTHER'){
record.getField('return_bp_code').setRequired(false);
if (name == 'return_bp_type' && value == 'THIRD_PARTY') {
record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(true);
record.getField('opposite_band_na').setReadOnly(true);
record.getField('bp_bank_branch_name').setReadOnly(true);
}
if (name == 'return_bp_type' && (value == 'AGENT'||value == 'TENANT')){
record.getField('bp_bank_account_num').setReadOnly(false);
record.getField('bp_bank_account_name').setReadOnly(true);
record.getField('opposite_band_na').setReadOnly(false);
record.getField('bp_bank_branch_name').setReadOnly(false);
}
}
};
......
......@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/>
<a:model-query model="csh.CSH515.get_sys_post" rootPath="post_info"/>
</a:init-procedure>
<a:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
......@@ -18,12 +19,56 @@
<a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var transaction_amount = record.get('transaction_amount') || 0;
var return_amount = record.get('return_amount') || 0;
var write_off_amount = record.get('write_off_amount') || 0;
var deposit_total_amount = parseFloat(transaction_amount - write_off_amount - return_amount).toFixed(2);
record.set('deposit_total_amount', deposit_total_amount);
//调整后不为默认值高亮显示
if (record.get('bp_bank_branch_name') != record.get('bp_bank_branch_name_n')){
// 获取对应字段div的id
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_FORM_CSH_TRANSACTION_RETURN_BP_BANK_BRANCH_NAME');
// 获取当前div下所有input组件
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
// 设定第一个input组件background的color
req_change_input_1[0].style.setProperty('background-color','#ff8465','important');
};
if (record.get('bp_bank_account_num') != record.get('bp_bank_account_num_n')){
// 获取对应字段div的id
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_FORM_CSH_TRANSACTION_RETURN_BP_BANK_ACCOUNT_NUM');
// 获取当前div下所有input组件
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
// 设定第一个input组件background的color
req_change_input_1[0].style.setProperty('background-color','#ff8465','important');
};
if (record.get('opposite_band_na') != record.get('opposite_band_na_n')){
// 获取对应字段div的id
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_FORM_CSH_TRANSACTION_RETURN_OPPOSITE_BAND_NA');
// 获取当前div下所有input组件
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
// 设定第一个input组件background的color
req_change_input_1[0].style.setProperty('background-color','#ff8465','important');
};
if("${/model/post_info/record/@position_code}"!="012") {
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG_prompt").style.display = "none";
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG").style.display = "none";
}
if("${/model/post_info/record/@position_code}"=="012") {
record.getField('this_return_amount').setReadOnly(true);
record.getField('return_date').setReadOnly(true);
record.getField('bp_bank_branch_name').setReadOnly(true);
record.getField('notes').setReadOnly(true);
record.getField('return_bp_type').setReadOnly(true);
record.getField('return_bp_type_n').setReadOnly(true);
}
var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) {
record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(true);
record.getField('opposite_band_na').setReadOnly(true);
record.getField('bp_bank_branch_name').setReadOnly(true);
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
......@@ -130,6 +175,8 @@
//add by zhuxianfei 20181108 拒绝需要输入意见
function zjwfl5110_beforeapproveCheck(type) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var return_recode = $(ds_id).getCurrentRecord();
if (type == 'refuse') {
if ('${/parameter/@instance_id}') {
var root_ds = $('${/parameter/@layout_code}_virtual_ds');
......@@ -145,8 +192,23 @@
}else {
return true;
}
}
if("${/model/post_info/record/@position_code}"=="012") {
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var return_recode = $(ds_id).getCurrentRecord();
var root_ds = $('${/parameter/@layout_code}_virtual_ds');
if (type == 'agree') {
if (Leaf.isEmpty(return_recode.get('finance_flag'))||return_recode.get('finance_flag')!='Y') {
Leaf.showMessage('提示', '请先审核第三方银行信息,并进行勾选通过。');
return false;
} else {
return true;
}
}else return true;
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -27,6 +27,10 @@
var deposit_records = $('deposit_transfer_detail_result_ds').getAll();
var param = {};
var saveData = [];
if(Leaf.isEmpty(deposit_records)){
Leaf.showMessage('提示', "请完整填写划转信息");
return;
}
for (var i = 0; i < deposit_records.length; i++) {
if(deposit_records[i].get('file_num') == 0){
Leaf.showMessage('${l:PROMPT}', "请完成附件上传!");
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query fetchAll="true" model="hls.HLS213N.hls_bp_master_unit" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="get_special_fields_link_id" model="hls.HLS213N.social_code_exist" modelaction="update"/>
......@@ -29,17 +30,19 @@
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var bp_record = $(bp_ds_id).getCurrentRecord();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getCurrentRecord();
bp_record.set('bp_category', '${/parameter/@bp_category}');
bp_record.set('owner_user_id', '${/session/@user_id}');
bp_record.set('unit_id', unit_id);
bp_record.set('unit_id_n', unit_id_n);
if(bp_record.get('bp_type')!='THIRD_PARTY'){
if (employee_type_id == '64') {
bp_record.getField('unit_id_n').setReadOnly(true);
bp_record.getField('unit_id_n').setRequired(false);
......@@ -47,9 +50,12 @@
bp_record.getField('unit_id_n').setReadOnly(false);
bp_record.getField('unit_id_n').setRequired(true);
}
}
if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false);
// bp_record.getField('agent_type_n').setRequired(true);
} else {
bp_record.getField('agent_type_n').setReadOnly(true);
// bp_record.getField('agent_type_n').setRequired(false);
......@@ -75,7 +81,7 @@
bp_master_role_ds.add(record);
var address_ds_id_ds = $(address_ds_id);
var address_bp_record = $('${/parameter/@default_value_dsid}').getCurrentRecord();
if (address_bp_record.get('bp_class') == 'NP'){
if (address_bp_record.get('bp_class') == 'NP'&&record.get('bp_type') != 'THIRD_PARTY'){
//POSTAL_ADDRESS 通讯地址
var record1 = new Leaf.Record({
'address_type': 'HOUSEHOLD_ADDRESS',
......@@ -100,9 +106,10 @@
address_record1.getField('address_type_n').setReadOnly(true);
address_record1.getField('country_id_n').setReadOnly(true);
}else if (address_bp_record.get('bp_class') == 'ORG'){
}else if (address_bp_record.get('bp_class') == 'ORG'&&record.get('bp_type') != 'THIRD_PARTY'){
//法人
//POSTAL_ADDRESS 通讯地址
if(bp_record.get('bp_type')!='THIRD_PARTY') {
var record2 = new Leaf.Record({
'address_type': 'POSTAL_ADDRESS',
'address_type_n': '通讯地址',
......@@ -115,6 +122,7 @@
address_record.getField('address_type_n').setReadOnly(true);
address_record.getField('country_id_n').setReadOnly(true);
}
}
var current_record = bp_master_role_ds.getAt(0);
current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true);
......@@ -163,6 +171,17 @@
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
//第三方创建页面隐藏角色新增按钮
debugger;
if( record.get('bp_type')== 'THIRD_PARTY'){
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_button_id').style.display = "none";
}
}
if ((ds.id).indexOf('hls_bp_master') != -1) {
// record.getField('cell_phone').setRequired(true);
......@@ -176,6 +195,7 @@
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
}
if (record.get('bp_class') && record.get('bp_class') == 'ORG') {
if (record.get('invoice_method') == 'BILLING') {
record.getField('taxpayer_type').setRequired(true);
......@@ -216,7 +236,7 @@
}
record.set('invoice_title', record.get('bp_name'));
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'&&record.get('bp_type') != 'THIRD_PARTY'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
......@@ -225,7 +245,7 @@
record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'&&record.get('bp_type') != 'THIRD_PARTY'){
record.set('invoice_type','ECT');
record.set('invoice_type_n','电子发票');
record.getField('invoice_type').setRequired(true);
......@@ -407,11 +427,72 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getAll();
var file_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var file_record = $(file_ds_id).getAll();
if(bank_record.length>0){
var flag = true;
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
}
}
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var role_records = $(role_ds_id).getAll();
var role_flag=true;
if(role_records.length>1){
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('bp_type')=='THIRD_PARTY'){
role_flag=false;
}
}
}
if(role_flag==false){
Leaf.showErrorMessage('${l:PROMPT}', '第三方不能含有其他角色类型');
return false;
}
if(head_record.get('bp_type')=='THIRD_PARTY'){
var flag = true;
if (bank_record.length <=0){
Leaf.showErrorMessage('${l:PROMPT}', '第三方必填[银行帐户信息],请在银行帐户信息新增!');
return false;
} else{
for(var i=0;i<bank_record.length;i++){
if (Leaf.isEmpty(bank_record[i].get('bank_account_name'))||
Leaf.isEmpty(bank_record[i].get('bank_account_num'))||
Leaf.isEmpty(bank_record[i].get('bank_full_name'))){
flag = false;
break;
}
else{
flag = true;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请将银行账户信息填写完整');
return false;
}
}
}
//验证是否有户籍地址,或者通讯地址
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var records_addr = $(address_ds_id).getAll();``
if (head_record.get('bp_class') =='NP'){
if (head_record.get('bp_class') =='NP'&&head_record.get('bp_type')!='THIRD_PARTY'){
//判断户籍地址
var flag = true;
if (records_addr.length <=0){
......@@ -441,7 +522,7 @@
return false;
}
}
}else if (head_record.get('bp_class') == 'ORG'){
}else if (head_record.get('bp_class') == 'ORG'&&head_record.get('bp_type')!='THIRD_PARTY'){
//判断通讯地址
var flag1 = true;
if (records_addr.length <= 0){
......@@ -767,7 +848,7 @@
}
}
if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') {
if (record.get('bp_class') == 'ORG'&&record.get('bp_type') != 'THIRD_PARTY') {
if (value == 'SMALL_SCALE_TAXPAYER') {
record.getField('taxpayer_type').setRequired(true);
......@@ -832,6 +913,7 @@
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
var flag=true;
var bp_type_flag='N';
var records = $(ds.id).getAll();
if(name=='bp_type'){
......@@ -849,8 +931,10 @@
}
}
}
}
var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
......@@ -865,6 +949,7 @@
};
function upload_file(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
......
......@@ -6,6 +6,10 @@
$Purpose: 商业伙伴创建 入口界面
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="hls.HLS214N.sys_user_lv" rootPath="user_name_path"/>
</a:init-procedure>
<a:view>
<a:link id="hls_bp_master_link" url="${/request/@context_path}/modules/hls/HLS213N/hls_bp_master_create.lview"/>
<a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
......@@ -14,6 +18,15 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) {
if(record.get('bp_type')=='THIRD_PARTY'){
record.set('function_code', 'HLS213D_N');
record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id);
record.data['url_title'] = '商业伙伴创建';
var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}else{
record.set('function_code', 'HLS213D');
record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id);
......@@ -21,6 +34,7 @@
var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}
}
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq){
......@@ -50,14 +64,22 @@
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if(ds.id == bp_create_ds_id){
var r= $(bp_create_ds_id).getCurrentRecord();
if(!r.get('bp_category')){
r.set('bp_category','TENANT');
r.set('bp_category_n','承租人');
}
debugger;
if(ds.id == bp_create_ds_id) {
var r = $(bp_create_ds_id).getCurrentRecord();
if (!r.get('bp_category')) {
r.set('bp_category', 'TENANT');
r.set('bp_category_n', '承租人');
}
if("${/model/user_name_path/record/@user_name}"=="DSF001"||"${/model/user_name_path/record/@user_name}"=="DSF002"){
r.set('bp_type','THIRD_PARTY');
r.set('bp_type_n', '第三方');
}else{
r.set('bp_type','TENANT') ;
r.set('bp_type_n', '承租人');
}
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -47,6 +47,26 @@
// return;
// }
// }
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll();
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query fetchAll="true" model="basic.hls_sys_time_default_value" rootPath="default_value"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="hls.HLS214N.sys_user_lv" rootPath="user_name_path"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
......@@ -41,6 +42,10 @@
var record=$(ds_id).selected[0];
var param = record.data;
var bp_class = record.get('bp_class');
if(record.get('bp_type')=='THIRD_PARTY'){
Leaf.showMessage('提示', '第三方不能开票申请');
return;
}
if(record.get('invoice_wfl_status') == 'APPROVING' || record.get('bp_wfl_status') == 'APPROVING'){
//审批中调用
param['function_code'] = 'HLS214BR_Q';
......@@ -96,7 +101,6 @@
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.change_req_id) {
param['winid'] = 'bp_master_invoice_detail_win';
param['function_code'] = 'HLS214B';
param['bp_class'] = bp_class;
......@@ -140,6 +144,16 @@
param['query_only'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}else if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){
if (record.get('bp_type')=='THIRD_PARTY'&&"${/model/role_info/record/@role_code}"!="HAND"&&"${/model/user_name_path/record/@user_name}"!="DSF001"&&"${/model/user_name_path/record/@user_name}"!="DSF002") {
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
param['bp_class'] = bp_class;
param['cond_para1'] = user_category;
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
return;
}
if(submit_flag == 'Y'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......@@ -151,7 +165,20 @@
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if(res.result.change_req_id){
if(record.get('bp_type')=='THIRD_PARTY'){
param['function_code'] = 'HLS214F_N';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['bp_name_updated_flag'] = record.get('bp_name_updated_flag');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
param['delete_flag'] = 'Y';
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}else{
param['function_code'] = 'HLS214F';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
......@@ -165,6 +192,43 @@
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}
}
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}else{
if(record.get('bp_type')=='THIRD_PARTY'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/execute';
Leaf.request({
url: url,
para: {
bp_id: record.get('bp_id')
},
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if(res.result.change_req_id){
param['function_code'] = 'HLS214F_N';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['bp_name_updated_flag'] = record.get('bp_name_updated_flag');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
param['delete_flag'] = 'Y';
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -183,6 +247,8 @@
param['query_only'] = 'N';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}
}
}
}
......
......@@ -50,6 +50,7 @@
// }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
var v_primary_flag_count=0;
var role_flag=true;
var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){
......@@ -61,14 +62,69 @@
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false;
}
if(role_records.length>1){
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('bp_type')=='THIRD_PARTY'){
role_flag=false;
}
}
}
if(role_flag==false){
Leaf.showErrorMessage('${l:PROMPT}', '第三方不能含有其他角色类型');
return false;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
var records_addr = $(address_ds_id).getAll();
if (bp_record.get('bp_class') == 'NP'){
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
if(bp_record.get('bp_type')=='THIRD_PARTY'){
var flag = true;
if (bank_record.length <=0){
Leaf.showErrorMessage('${l:PROMPT}', '第三方必填[银行帐户信息],请在银行帐户信息新增!');
return false;
} else{
for(var i=0;i<bank_record.length;i++){
if (Leaf.isEmpty(bank_record[i].get('bank_account_name'))||
Leaf.isEmpty(bank_record[i].get('bank_account_num'))||
Leaf.isEmpty(bank_record[i].get('bank_full_name'))){
flag = false;
break;
}
else{
flag = true;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请将银行账户信息填写完整');
return false;
}
}
}
if (bp_record.get('bp_class') == 'NP'&&bp_record.get('bp_type')!='THIRD_PARTY'){
//判断户籍地址
var flag = true;
if (records_addr.length <=0){
......@@ -99,7 +155,7 @@
}
}
}else if (bp_record.get('bp_class') == 'ORG'){
}else if (bp_record.get('bp_class') == 'ORG'&&bp_record.get('bp_type')!='THIRD_PARTY'){
//判断通讯地址
var flag1 = true;
if (records_addr.length <= 0){
......@@ -325,7 +381,9 @@
var new_id_card;
var old_bp_name;
var new_bp_name;
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add_and_load'] = function (ds, record, config_records, bp_seq) {
//
// }
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
// if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
......@@ -337,6 +395,16 @@
// }
// }
// }
if( record.get('bp_type')== 'THIRD_PARTY'){
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_DELETE_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_DELETE_layout_dynamic_button_id').style.display = "none";
}
}
if ((ds.id).indexOf('hls_bp_master_req') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
......@@ -403,6 +471,7 @@
}
}
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
......@@ -890,6 +959,26 @@
Leaf.showMessage('提示', '请先保存!');
return;
}
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
if ($(ds_id).validate()) {
var record = $(ds_id).getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function () {
......
......@@ -150,6 +150,26 @@
var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record_agent =$(agent_id).getAll();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getAll();
if(bank_record.length>0){
var flag = true;
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
}
}
//增加三位字母大写的校验
var head_record = $(ds_id).getCurrentRecord();
var english_name= head_record.get('english_name');
......@@ -178,11 +198,12 @@
return false;
}}
if(social_code){
if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}}
// if(!CheckSocialCreditCode(social_code)){
// $L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// return false;
// }
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......@@ -308,6 +329,9 @@
record.getField('agent_bs_area_level').setPropertity('validator', 'hls303_record_field_validator');
record.getField('validity_period_from').setPropertity('validator', 'hls303_record_field_validator');
record.getField('validity_period_to').setPropertity('validator', 'hls303_record_field_validator');
if(record.get('extra_nam')=='茂甲'||record.get('extra_nam')=='铁甲'){
record.getField('agent_phone').setRequired(true);
}
}
if (ds_renew_id == ds.id) {
ds.getField('valid_date_to').setPropertity('validator', 'hls303d_record_field_validator');
......
......@@ -577,13 +577,44 @@
}
function csh_transaction_confirm() {
//gzj 111
var role_flag = '${/model/sys_role_path/record/@role_code}';
var record = $('csh_transaction_confirm_ds').getSelected()[0];
//校验是否还有未审核的保证金划转
var trans_review_count;
$L.request({
url: '${/request/@context_path}/autocrud/csh.CSH531.get_trans_review_status/query',
para: {
csh_date: record.get('csh_date')
},
sync: true,
success: function (res) {
trans_review_count=res.result.record.trans_review_number;
},
error: function () {
},
failure: function () {
},
scope: this,
sync: true,
});
if( trans_review_count >0){
$L.showMessage('提示','有复核中的保证金,请完成复核后,再进行会计关账');
return ;
}
if (role_flag == 'NO') {
if (record.get('csh_confirm_flag') == 'Y') {
$L.showMessage('提示', '该月收款已确认,无需再次确认');
return;
}
$L.showConfirm('提示', '是否进行月结确认?', function () {
$L.Masker.mask(Ext.getBody(), '正在确认......');
$L.request({
......@@ -593,8 +624,8 @@
csh_date: record.get('csh_date'),
role_flag: role_flag
},
success: function (args) {
debugger;
$L.Masker.unmask(Ext.getBody());
if (args.result.p_err_msg) {
$L.showErrorMessage("提示", args.result.p_err_msg, null, 800, 300);
......@@ -614,7 +645,8 @@
error: function () {
$L.Masker.unmask(Ext.getBody());
},
scope: this
scope: this,
sync: true,
});
});
}
......
......@@ -2,14 +2,16 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:view>
<a:link id="hsbc_paying_batch_create_link_id" url="${/request/@context_path}/modules/hsbc/HSBC100/hsbc_paying_batch_create.lsc"/>
<a:link id="hsbc_paying_batch_create_return_link_id" url="${/request/@context_path}/modules/hsbc/HSBC100/hsbc_paying_batch_create_return.lsc"/>
<script><![CDATA[
function create_paying_batch() {
Leaf.Masker.mask(Ext.getBody(), '付款单生成中...');
var winId = '${/parameter/@winId}';
Leaf.Masker.mask($(winId).wrap, '付款单生成中...');
var account_ds = $('csh_bank_account');
var bank_account_id = account_ds.getAt(0).get('bank_account_id');
if (Ext.isEmpty(bank_account_id)) {
Leaf.showMessage('提示', '请先选择账户代码!');
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
} else {
var req_ln_ds = $('${/parameter/@ds_id}');
var button_id = '${/parameter/@button_id}';
......@@ -25,23 +27,32 @@
param['details'] = saveData;
param['bank_account_id'] = bank_account_id;
param['button_id'] = button_id;
var pay_type = '${/parameter/@pay_type}';
var url;
if (pay_type == 'TJ'){
url = $('hsbc_paying_batch_create_link_id').getUrl();
}else if(pay_type == 'RETURN'){
url = $('hsbc_paying_batch_create_return_link_id').getUrl();
}
Leaf.request({
url: $('hsbc_paying_batch_create_link_id').getUrl(),
url: url,
para: param,
success: function() {
Leaf.SideBar.show({
msg: '付款单生成成功!',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
$('${/parameter/@winId}').close();
req_ln_ds.query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask($(winId).wrap);
},
scope: this
});
......
......@@ -14,15 +14,23 @@
//创建代付单
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (req_ln_records.length == 0 || con_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选铁甲付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: req_ln_ds_id,
button_id: 'create_with_sbo'
button_id: 'create_with_sbo',
pay_type: 'TJ'
},
title: '支付账号选择',
height: 260,
......@@ -33,15 +41,76 @@
//创建强制付款单生成
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (req_ln_records.length == 0 || con_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选铁甲付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: req_ln_ds_id,
button_id: 'create_without_sbo'
button_id: 'create_without_sbo',
pay_type: 'TJ'
},
title: '支付账号选择',
height: 260,
width: 680
});
};
//创建代付单
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (con_records.length == 0 || req_ln_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选退款付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: con_ds_id,
button_id: 'create_with_sbo',
pay_type: 'RETURN'
},
title: '支付账号选择',
height: 260,
width: 680
});
};
//创建强制付款单生成
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var req_ln_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var req_ln_ds = $(req_ln_ds_id);
var con_ds = $(con_ds_id);
var req_ln_records = req_ln_ds.getSelected();
var con_records = con_ds.getSelected();
if (con_records.length == 0 || req_ln_records.length > 0) {
Leaf.showMessage('${l:PROMPT}', '只能勾选退款付款单数据!');
return;
}
new Leaf.Window({
id: 'choose_acount_window',
url: $('pageLink_choose_acount').getUrl(),
params: {
winId: 'choose_acount_window',
ds_id: con_ds_id,
button_id: 'create_without_sbo',
pay_type: 'RETURN'
},
title: '支付账号选择',
height: 260,
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-delete model="hsbc.HSBC100.hsbc_paying_batch_create_return"/>
<batch-apply sourcePath="/parameter/details">
<a:model-insert model="hsbc.HSBC100.hsbc_paying_batch_create_return"/>
</batch-apply>
<a:model-update model="hsbc.HSBC100.hsbc_paying_batch_create_return"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -36,10 +36,19 @@
//代付单发送
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var batch_ds = $(ds_id);
var records = batch_ds.getSelected();
if (records.length == 0) {
var r_batch_ds = $(r_ds_id);
var r_records = r_batch_ds.getSelected();
if (records.length != 0 && r_records.length != 0) {
Leaf.showMessage('${l:PROMPT}', '不能同时选择铁甲付款单和退款付款单!');
return;
}
if (records.length == 0 && r_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择至少一条数据!');
return;
}
......@@ -49,6 +58,7 @@
var send_url;
var bank_note='汇丰银行';
if (records.length != 0){
for (var i = 0;i < records.length;i++) {
var rec;
rec = records[i];
......@@ -56,6 +66,15 @@
saveData.push(rec.data);
}
length = records.length;
}else{
for (var i = 0;i < r_records.length;i++) {
var rec;
rec = r_records[i];
rec.set('_status', 'insert');
saveData.push(rec.data);
}
length = r_records.length;
}
param['details'] = saveData;
send_url=$('batch_hsbc_send_link').getUrl();
......@@ -68,6 +87,7 @@
success: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
batch_ds.query();
r_batch_ds.query();
},
failure: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -85,31 +105,55 @@
//人工支付 --add by 24976
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var batch_ds = $(ds_id);
var records = batch_ds.getSelected();
var r_batch_ds = $(r_ds_id);
var r_records = r_batch_ds.getSelected();
var lease_channel;
var reqsn;
var batch_id;
var bank_item;
if (records.length != 1) {
if (records.length != 0 && r_records.length != 0) {
Leaf.showMessage('${l:PROMPT}', '不能同时选择铁甲付款单和退款付款单!');
return;
}
if (records.length != 1 && r_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length == 0 && r_records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length != 0){
reqsn = records[0].get('reqsn');
batch_id = records[0].get('batch_id');
bank_item=records[0].get('bank_item');
}else {
reqsn = r_records[0].get('reqsn');
batch_id = r_records[0].get('batch_id');
bank_item=r_records[0].get('bank_item');
}
var win = new Leaf.showConfirm('${l:HLS.PROMPT}', '使用人工支付将不能再使用银企直连,确认进行人工支付?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('manual_modify_link').getUrl(),
para: {
batch_id : records[0].get('batch_id'),
reqsn : records[0].get('reqsn'),
bank_item : records[0].get('bank_item')
batch_id : batch_id,
reqsn : reqsn,
bank_item : bank_item
},
success: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
batch_ds.query();
r_batch_ds.query();
},
failure: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -125,26 +169,50 @@
//付款单取消
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_RESULT', 'hl_hsbc_paying_batch');
var r_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'R_RESULT', 'hl_hsbc_paying_batch');
var batch_ds = $(ds_id);
var records = batch_ds.getSelected();
if (records.length != 1 ) {
var r_batch_ds = $(r_ds_id);
var r_records = r_batch_ds.getSelected();
if (records.length != 0 && r_records.length != 0) {
Leaf.showMessage('${l:PROMPT}', '不能同时选择铁甲付款单和退款付款单!');
return;
}
if (records.length != 1 && r_records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length == 0 && r_records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '请选择一条数据!');
return;
}
if (records.length != 0){
reqsn = records[0].get('reqsn');
batch_id = records[0].get('batch_id');
bank_item=records[0].get('bank_item');
}else {
reqsn = r_records[0].get('reqsn');
batch_id = r_records[0].get('batch_id');
bank_item=r_records[0].get('bank_item');
}
Leaf.showConfirm('${l:HLS.PROMPT}', '确认取消?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('batch_cancel_link').getUrl(),
para: {
batch_id : records[0].get('batch_id'),
reqsn : records[0].get('reqsn'),
bank_item : records[0].get('bank_item')
batch_id : batch_id,
reqsn : reqsn,
bank_item : bank_item
},
success: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
batch_ds.query();
r_batch_ds.query();
},
failure: function(res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -166,7 +234,7 @@
});
]]></script>
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -1202,6 +1202,36 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if(current_record.get('division')=='70'){
var bp_number;
$L.request({
url: '${/request/@context_path}/autocrud/prj.PRJ500N.get_bp_address/query',
para: {
bp_id_tenant: current_record.get('bp_id_tenant')
},
sync: true,
success: function (res) {
bp_number=res.result.record.bp_number;
},
error: function () {
},
failure: function () {
},
scope: this,
sync: true,
});
if( bp_number ==0){
$L.showMessage('提示','承租人的居住地址不能为空');
return ;
}
}
if (record.get('large_balance') == 'YES') {
var project_number = current_record.get('project_number');
......
......@@ -1341,6 +1341,7 @@
return;
}
}
}else{
if (key != 'bp_detail_id' && key != 'score_name'&& key != 'contract_id' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score' ) {
//if (!bp_tenant_detail_r.get(key)) {
......@@ -1353,6 +1354,32 @@
}
}
if(current_record.get('division')=='70'){
var bp_number;
$L.request({
url: '${/request/@context_path}/autocrud/prj.PRJ500N.get_bp_address/query',
para: {
bp_id_tenant: current_record.get('bp_id_tenant')
},
sync: true,
success: function (res) {
bp_number=res.result.record.bp_number;
},
error: function () {
},
failure: function () {
},
scope: this,
sync: true,
});
if( bp_number ==0){
Leaf.showMessage('提示','承租人的居住地址不能为空');
return ;
}
}
if (current_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc"
xmlns:a="http://www.leaf-framework.org/application"
xmlns:s="leaf.plugin.script"
trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
importPackage(Packages.java.util);
importPackage(Packages.com.hand.hls.hlcm.emay);
importPackage(Packages.com.hand.hap.system.dto);
//step2 发送短信
function sendsms() {
// 查询待发送短信表
var contract_collection = $bm('sys.SYS420.reminder_sms_list');
contract_collection.update();
var sms_list_bm = $bm('sys.SYS420.reminder_sms_loop');
println($ctx.parameter.batch_id);
var sms_list_result = sms_list_bm.queryAsMap({
"batch_id": $ctx.parameter.batch_id
});
var sms_list_records = sms_list_result.getChildren();
for (var i = 0; i < sms_list_records.length; i++) {
println(1);
var Phones = sms_list_records[i].phone_number;
var content = sms_list_records[i].text;
var sms_id = sms_list_records[i].sms_id;
try {
var example = new Example();
var result = example.setSingleSms(content, Phones);
var req_response = result.toString();
} catch (e) {
println("抛出异常:" + e);
}
//发送后请求更新
$bm('sys.SYS420.reminder_sms_loop').update({
sms_id: sms_id,
result: req_response
});
}
}
sendsms();
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
\ No newline at end of file
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