Commit ea6d0b24 authored by panhong18943's avatar panhong18943

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

parents b223dda6 9a27c1a0
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
trunc(t2.due_date) < trunc(cc.CCR_LEASE_DATE)) trunc(t2.due_date) < trunc(cc.CCR_LEASE_DATE))
--合同状态为解约回购中、解约回购完成的合同 --合同状态为解约回购中、解约回购完成的合同
or (cc.contract_status in ('REPUR', 'REPURING') and( 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小规模纳税人(自然人)→暂不开票→按季度展示未开票现金流 --合同状态为起租→开票对象:非深圳美鹏HCS小规模纳税人(自然人)→暂不开票→按季度展示未开票现金流
or or
(cc.contract_status = 'INCEPT' and (cc.contract_status = 'INCEPT' and
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-15 下午01:13:07
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_BP_MASTER_V">
<bm:fields>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="HLS_BP_MASTER_V.BP_ID"/>
<bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="80" forDisplay="true" forQuery="true" physicalName="BP_CODE" prompt="HLS.BP_TITLE"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="160" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="HLS.BP_NAME_SHORT"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HLS_BP_MASTER_V.COMPANY_ID"/>
<bm:field name="company_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_CODE" prompt="HLS_BP_MASTER_V.COMPANY_CODE"/>
<bm:field name="company_short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_SHORT_NAME" prompt="HLS_BP_MASTER_V.COMPANY_SHORT_NAME"/>
<bm:field name="company_full_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_FULL_NAME" prompt="HLS_BP_MASTER_V.COMPANY_FULL_NAME"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY"/>
<bm:field name="bp_category_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY_NAME" prompt="商业伙伴类型"/>
<bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS"/>
<bm:field name="bp_class_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS_NAME"/>
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
<!--<bm:field name="id_card_no" displayWidth="200" forDisplay="true" prompt="身份证"/>-->
</bm:fields>
<bm:features>
<f:standard-who/>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
</bm:features>
<bm:query-fields>
<bm:query-field field="bp_id" queryOperator="="/>
<bm:query-field field="bp_code" queryOperator="like"/>
<bm:query-field field="bp_name" queryExpression="t1.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos;"/>
<!-- <bm:query-field field="bp_category" queryOperator="="/> -->
<bm:query-field field="bp_category" queryExpression="(t1.bp_category = ${@bp_category} or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.bp_category = ${@bp_category} and br.bp_type = ${@bp_category}))"/>
<bm:query-field field="bp_category_name" queryExpression="(t1.bp_category_name like &apos;%&apos;||${@bp_category_name}||&apos;%&apos;)"/>
<!-- <bm:query-field name="contract_bp_flag" queryExpression="(exists (select 1 from con_contract_bp b where b.contract_id in (${:@contract_id}) and b.bp_id = t1.bp_id and b.bp_category in (&apos;VENDER&apos;,&apos;TENANT&apos;,&apos;TENANT_SEC&apos;) )or nvl(${@contract_bp_flag},&apos;N&apos;) != &apos;Y&apos; )"/> -->
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.bp_category in('TENANT','AGENT') and br.bp_type in('TENANT','AGENT')))"/>
</bm:data-filters>
</bm:model>
...@@ -150,10 +150,25 @@ ...@@ -150,10 +150,25 @@
WHERE WHERE
t.bp_id_tenant = b.bp_id(+) AND 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 t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type 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# ) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </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
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
<bm:field name="guarantor_name_duty_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t1.guarantor_name_duty)" forInsert="false" forUpdate="false" prompt="担保人履行担保义务" /> <bm:field name="guarantor_name_duty_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t1.guarantor_name_duty)" forInsert="false" forUpdate="false" prompt="担保人履行担保义务" />
<bm:field name="guarantor_name_duty" /> <bm:field name="guarantor_name_duty" />
<bm:field name="extra_nam" expression="(Select u.unit_name From exp_org_unit_v u Where u.unit_id = (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_id = t1.bp_id))" forInsert="false" forUpdate="false"/> <bm:field name="extra_nam" expression="(Select u.unit_name From exp_org_unit_v u Where u.unit_id = (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_id = t1.bp_id))" forInsert="false" forUpdate="false"/>
<bm:field name="import_source"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -164,5 +165,6 @@ ...@@ -164,5 +165,6 @@
<bm:query-field name="bank_account_num" queryExpression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id) like &apos;%&apos;||upper(${@bank_account_num})||&apos;%&apos;"/> <bm:query-field name="bank_account_num" queryExpression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id) like &apos;%&apos;||upper(${@bank_account_num})||&apos;%&apos;"/>
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||upper(${@contract_number})||&apos;%&apos;"/> <bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||upper(${@contract_number})||&apos;%&apos;"/>
<bm:query-field name="extra_nam" queryExpression="(SELECT cc.extra_nam FROM hls_bp_master cc WHERE cc.enabled_flag = 'Y' and cc.bp_category = 'AGENT' and cc.bp_id = t1.bp_id ) like &apos;%&apos;||upper(${@extra_nam})||&apos;%&apos;"/> <bm:query-field name="extra_nam" queryExpression="(SELECT cc.extra_nam FROM hls_bp_master cc WHERE cc.enabled_flag = 'Y' and cc.bp_category = 'AGENT' and cc.bp_id = t1.bp_id ) like &apos;%&apos;||upper(${@extra_nam})||&apos;%&apos;"/>
<bm:query-field field="import_source" queryOperator="="/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
li.line_number, li.line_number,
hd.created_by, hd.created_by,
li.source_table, li.source_table,
'03399500040009165' bank_num, --update by xsh35973
'人民币' currency_type, --update by xsh35973
li.attribute_1, li.attribute_1,
li.attribute_2, li.attribute_2,
li.attribute_3, li.attribute_3,
...@@ -165,7 +167,8 @@ ...@@ -165,7 +167,8 @@
p_ref_v05 =>${@ref_v05}, p_ref_v05 =>${@ref_v05},
p_status =>${@status}, p_status =>${@status},
p_bank_account_num =>${@bank_account_num}, p_bank_account_num =>${@bank_account_num},
p_guarantor_name_duty =>${@guarantor_name_duty} p_guarantor_name_duty =>${@guarantor_name_duty},
p_import_source => 'EXCEL_ADD'
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
......
...@@ -75,7 +75,8 @@ ...@@ -75,7 +75,8 @@
p_paid_byother_flag =>${@paid_byother_flag}, p_paid_byother_flag =>${@paid_byother_flag},
p_ref_v05 =>${@ref_v05}, p_ref_v05 =>${@ref_v05},
p_status =>${@status}, p_status =>${@status},
p_guarantor_name_duty=>${@guarantor_name_duty} p_guarantor_name_duty=>${@guarantor_name_duty},
p_import_source =>'HAND_ADD'
); );
end; end;
......
<?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>
...@@ -108,7 +108,7 @@ end; ...@@ -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="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_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="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" 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="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" /> <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 @@ ...@@ -53,7 +53,15 @@
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG"/> <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="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_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="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="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"/> <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>
...@@ -446,7 +446,40 @@ ...@@ -446,7 +446,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 () { window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
...@@ -630,7 +663,7 @@ ...@@ -630,7 +663,7 @@
Leaf.request({ Leaf.request({
url: $('con731_cancel_link').getUrl(), url: $('con731_cancel_link').getUrl(),
para: { para: {
change_req_id: ${/parameter/@change_req_id} change_req_id: '${/parameter/@change_req_id}'
}, },
success: function (res) { success: function (res) {
// $('${/parameter/@layout_code}_user_button1').enable(); // $('${/parameter/@layout_code}_user_button1').enable();
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure> <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.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:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_repo_detail_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="con_contract_repo_detail_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
/**提前结清利率**/ /**提前结清利率**/
et_interest_rate: record.get('et_interest_rate'), 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) { success: function (res) {
//record.set('et_fee', res.result.et_fee); //record.set('et_fee', res.result.et_fee);
...@@ -158,6 +159,7 @@ ...@@ -158,6 +159,7 @@
record.set('ccr_penalty', res.result.penalty || 0); record.set('ccr_penalty', res.result.penalty || 0);
record.set('fund_possession_time', res.result.fund_possession_time); record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_cost', res.result.fund_possession_cost); 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('fund_possession_rate', res.result.fund_possession_rate);
record.set('last_rent_due_date', res.result.last_rent_due_date); record.set('last_rent_due_date', res.result.last_rent_due_date);
record.set('sum_unreceived_principal', res.result.sum_unreceived_principal); record.set('sum_unreceived_principal', res.result.sum_unreceived_principal);
...@@ -191,7 +193,43 @@ ...@@ -191,7 +193,43 @@
scope: this 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);
}
} }
}; };
...@@ -221,7 +259,28 @@ ...@@ -221,7 +259,28 @@
// $('${/parameter/@layout_code}_user_button3').disable(); // $('${/parameter/@layout_code}_user_button3').disable();
//setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000); //setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000);
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit); // 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(); con_repo001_submit();
};
} else { } else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} }
...@@ -243,7 +302,7 @@ ...@@ -243,7 +302,7 @@
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(), url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: { para: {
contract_id: ${/parameter/@change_req_id} contract_id: '${/parameter/@change_req_id}'
}, },
scope: this, scope: this,
success: function (res) { success: function (res) {
...@@ -258,7 +317,7 @@ ...@@ -258,7 +317,7 @@
Leaf.request({ Leaf.request({
url: $('con_et002_submit_link').getUrl(), url: $('con_et002_submit_link').getUrl(),
para: { para: {
change_req_id: ${/parameter/@change_req_id}, change_req_id: '${/parameter/@change_req_id}',
layout_code: '${/parameter/@layout_code}' layout_code: '${/parameter/@layout_code}'
}, },
success: function(res) { success: function(res) {
...@@ -310,7 +369,7 @@ ...@@ -310,7 +369,7 @@
Leaf.request({ Leaf.request({
url: $('con_et002_submit_link').getUrl(), url: $('con_et002_submit_link').getUrl(),
para: { para: {
change_req_id: ${/parameter/@change_req_id}, change_req_id: '${/parameter/@change_req_id}',
layout_code: '${/parameter/@layout_code}' layout_code: '${/parameter/@layout_code}'
}, },
success: function(res) { success: function(res) {
...@@ -417,7 +476,7 @@ ...@@ -417,7 +476,7 @@
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(), url: $('${/parameter/@layout_code}_con_ele_sign_cancel_link_id').getUrl(),
para: { para: {
contract_id: ${/parameter/@change_req_id} contract_id: '${/parameter/@change_req_id}'
}, },
scope: this, scope: this,
success: function (res) { success: function (res) {
...@@ -429,7 +488,7 @@ ...@@ -429,7 +488,7 @@
Leaf.request({ Leaf.request({
url: $('con_et002_cancel_link').getUrl(), url: $('con_et002_cancel_link').getUrl(),
para: { para: {
change_req_id: ${/parameter/@change_req_id} change_req_id: '${/parameter/@change_req_id}'
}, },
success: function(res) { success: function(res) {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用 $('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
...@@ -473,6 +532,11 @@ ...@@ -473,6 +532,11 @@
Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约'); Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约');
return; 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'){ if(bussiness_type == 'LEASEBACK' && bp_tenant_class == 'NP'){
Leaf.showMessage('${l:PROMPT}', '业务类型为售后回租且是个人承租人的合同,不能发起电子签约'); Leaf.showMessage('${l:PROMPT}', '业务类型为售后回租且是个人承租人的合同,不能发起电子签约');
return; return;
......
...@@ -29,8 +29,14 @@ ...@@ -29,8 +29,14 @@
var records = $('contractQueryScreen_mainDs').getSelected(); var records = $('contractQueryScreen_mainDs').getSelected();
var record = records[0], var record = records[0],
contract_id = record.get('contract_id'); contract_id = record.get('contract_id');
var ccr_document_type;
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在回购期间无法进行后续操作,请谨慎操作!!!如果需要取消提前结清,请一定点击取消按钮!!!</span>', function () { 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.Masker.mask(Ext.getBody());
Leaf.request({ Leaf.request({
url: $('con_et_create_change_link').getUrl(), url: $('con_et_create_change_link').getUrl(),
...@@ -75,8 +81,14 @@ ...@@ -75,8 +81,14 @@
var records = $('contractQueryScreen_mainDs').getSelected(); var records = $('contractQueryScreen_mainDs').getSelected();
var record = records[0], var record = records[0],
contract_id = record.get('contract_id'); contract_id = record.get('contract_id');
var ccr_document_type;
Leaf.showConfirm('提示', '<span style="color: #ff0000;font-size: 15px; ">该操作不会对合同还款计划产生变更,仅试算用途;若需提交提前结清申请,请点击主界面【创建】按钮!</span>', function () { 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.Masker.mask(Ext.getBody(), '正在创建试算,,,');
Leaf.request({ Leaf.request({
url: $('con_et_create_change_link').getUrl(), url: $('con_et_create_change_link').getUrl(),
......
...@@ -47,7 +47,13 @@ ...@@ -47,7 +47,13 @@
return false; return false;
} }
var record = records[0]; 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 req_status = record.get('req_status');
var contract_id = record.get('change_req_id'); var contract_id = record.get('change_req_id');
......
...@@ -500,6 +500,7 @@ ...@@ -500,6 +500,7 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="bp_category_ds" lookupCode="BP_CATEGORY"> <a:dataSet id="bp_category_ds" lookupCode="BP_CATEGORY">
</a:dataSet> </a:dataSet>
<a:dataSet id="import_source_ds" lookupCode="CSH510_IMPORT_SOURCE"/>
<!-- <a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">--> <!-- <a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">-->
<!-- </a:dataSet>--> <!-- </a:dataSet>-->
<a:dataSet id="payment_method_ds"> <a:dataSet id="payment_method_ds">
...@@ -685,14 +686,16 @@ ...@@ -685,14 +686,16 @@
<a:map from="extra_nam" to="extra_nam"/> <a:map from="extra_nam" to="extra_nam"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="import_source_desc" options="import_source_ds" valueField="code_value" displayField="code_value_name" returnField="import_source"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/> <a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true" model="csh.CSH510.csh_transaction_miantain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true"> <a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true" model="csh.CSH510.csh_transaction_miantain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true">
<a:fields>
<a:field name="import_source_desc" options="import_source_ds" valueField="code_value" displayField="code_value_name" returnField="import_source"/>
</a:fields>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
...@@ -738,6 +741,7 @@ ...@@ -738,6 +741,7 @@
<!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>--> <!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>-->
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/> <a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
<a:lov name="extra_nam" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="代理店简称"/> <a:lov name="extra_nam" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="代理店简称"/>
<a:comboBox name="import_source_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="新增路径"/>
</a:fieldSet> </a:fieldSet>
...@@ -763,6 +767,7 @@ ...@@ -763,6 +767,7 @@
<a:column name="guarantor_name_duty_desc" prompt="担保人履行担保义务" align="center"/> <a:column name="guarantor_name_duty_desc" prompt="担保人履行担保义务" align="center"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/> <a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/> <a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="import_source_desc" prompt="新增路径" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据审批状态" align="center"/> <a:column name="confirmed_flag_desc" prompt="单据审批状态" align="center"/>
<!-- <a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS" align="center"/>--> <!-- <a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS" align="center"/>-->
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT"> <a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT">
......
...@@ -63,17 +63,17 @@ ...@@ -63,17 +63,17 @@
} }
//否则的话添加必要的字段 //否则的话添加必要的字段
record.set('receipt_type', 'IMPORT'); record.set('receipt_type', 'IMPORT');
record.set('bank_account_num', record.get('attribute_1')); record.set('bank_account_num', record.get('bank_num'));
// record.set('transaction_date', Leaf.formatDate(record.get('attribute_3'))); // record.set('transaction_date', Leaf.formatDate(record.get('attribute_3')));
record.set('bank_slip_num', record.get('attribute_5')); record.set('bank_slip_num', record.get('attribute_17'));
record.set('currency_code', 'CNY'); record.set('currency_code', 'CNY');
record.set('transaction_amount', record.get('attribute_14')); record.set('transaction_amount', record.get('attribute_3'));
record.set('exchange_rate', 1); record.set('exchange_rate', 1);
record.set('bp_bank_account_num', record.get('attribute_8')); record.set('bp_bank_account_num', record.get('attribute_11'));
record.set('bp_bank_account_name', record.get('attribute_9')); record.set('bp_bank_account_name', record.get('attribute_12'));
record.set('opposite_band_na', record.get('attribute_10')); record.set('opposite_band_na', record.get('attribute_8'));
record.set('description', record.get('attribute_23')); record.set('description', record.get('attribute_14'));
record.set('ref_v05', record.get('attribute_24')); record.set('ref_v05', record.get('attribute_15'));
record.set('write_off_flag', 'DISABLED'); record.set('write_off_flag', 'DISABLED');
...@@ -456,25 +456,25 @@ ...@@ -456,25 +456,25 @@
width="980" rowRenderer="change_background_color"> width="980" rowRenderer="change_background_color">
<a:columns> <a:columns>
<a:column name="error_message" editor="textArea_e" prompt="错误信息" width="180"/> <a:column name="error_message" editor="textArea_e" prompt="错误信息" width="180"/>
<a:column name="attribute_1" prompt="账号" width="80"/> <a:column name="bank_num" prompt="账号" width="80"/>
<a:column name="attribute_2" prompt="货币" width="80"/> <a:column name="currency_type" prompt="货币" width="80"/>
<a:column name="transaction_date" prompt="交易日期" renderer="Leaf.formatDate" width="80"/> <a:column name="attribute_1" prompt="交易日期" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="attribute_4" prompt="交易时间" width="80"/>--> <!-- <a:column name="attribute_4" prompt="交易时间" width="80"/>-->
<a:column name="attribute_5" prompt="日志号" width="80"/> <a:column name="attribute_17" prompt="日志号" width="80"/>
<a:column name="attribute_8" prompt="对方账号" width="80"/> <a:column name="attribute_11" prompt="对方账号" width="80"/>
<a:column name="attribute_9" prompt="对方账号户名" width="80"/> <a:column name="attribute_12" prompt="对方账号户名" width="80"/>
<a:column name="attribute_10" prompt="对方银行名称" width="80"/> <a:column name="attribute_8" prompt="对方银行名称" width="80"/>
<a:column name="bp_name" prompt="收款对象" editor="grid_lov" width="120"/> <a:column name="bp_name" prompt="收款对象" editor="grid_lov" width="120"/>
<a:column name="paid_byother_flag_desc" prompt="是否代付" editor="grid_cb"/> <a:column name="paid_byother_flag_desc" prompt="是否代付" editor="grid_cb"/>
<a:column name="attribute_14" prompt="收款金额" renderer="Leaf.formatMoney" align="right" <a:column name="attribute_3" prompt="收款金额" renderer="Leaf.formatMoney" align="right"
width="80"/> width="80"/>
<a:column name="attribute_23" prompt="摘要" width="80"/> <a:column name="attribute_14" prompt="摘要" width="80"/>
<a:column name="collection_classes_desc" prompt="款项分类" editor="grid_cb"/> <a:column name="collection_classes_desc" prompt="款项分类" editor="grid_cb"/>
<a:column name="attribute_24" prompt="附言" width="80"/> <a:column name="attribute_15" prompt="附言" width="80"/>
<a:column name="extra_nam" prompt="代理店简称" width="80" editor="grid_lov" /> <a:column name="extra_nam" prompt="代理店简称" width="80" editor="grid_lov" />
<a:column name="bp_code" prompt="代理店简称code" hidden="true"/> <a:column name="bp_code" prompt="代理店简称code" hidden="true"/>
......
...@@ -575,7 +575,7 @@ ...@@ -575,7 +575,7 @@
<a:field name="functional_currency_code" <a:field name="functional_currency_code"
defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/> defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<a:field name="bp_name" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" <a:field name="bp_name" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="550" title="HLS.BP_TITLE"> lovService="basic.hls_bp_master_v_for_agent_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
<a:map from="bp_id" to="bp_id"/> <a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_name"/>
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/> <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:init-procedure>
<a:view> <a:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/> <a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
...@@ -37,16 +38,30 @@ ...@@ -37,16 +38,30 @@
// // window.open(url, '_self'); // // 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) { 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 transaction_amount = ${/parameter/@transaction_amount}||0;
var return_amount = ${/parameter/@returned_amount}||0; var return_amount = ${/parameter/@returned_amount}||0;
var write_off_amount = ${/parameter/@write_off_amount}||0; var write_off_amount = ${/parameter/@write_off_amount}||0;
var remain_total_amount = ${/parameter/@remain_total_amount}||0; var remain_total_amount = ${/parameter/@remain_total_amount}||0;
var bank_slip_num = '${/parameter/@bank_slip_num}';*/ var bank_slip_num = '${/parameter/@bank_slip_num}';*/
record.set('remain_total_amount',remain_total_amount); // record.set('remain_total_amount',remain_total_amount);
record.set('bank_slip_num',bank_slip_num); // 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() { 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'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
...@@ -58,11 +73,17 @@ ...@@ -58,11 +73,17 @@
var return_amount = $(ds_id).getAt(0).get('return_amount'); var return_amount = $(ds_id).getAt(0).get('return_amount');
var write_off_amount = $(ds_id).getAt(0).get('write_off_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 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); // var check_amount = parseFloat(transaction_amount) - parseFloat(this_return_amount) - parseFloat(return_amount) - parseFloat(write_off_amount);
if (!return_id) { if (!return_id) {
Leaf.showMessage('提示', '请先保存再提交'); Leaf.showMessage('提示', '请先保存再提交');
return; return;
} }
if(bank_branch_name.indexOf(band_na)==-1){
Leaf.showMessage('提示', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return;
}
if(this_return_amount > parseFloat(remain_total_amount)){ if(this_return_amount > parseFloat(remain_total_amount)){
Leaf.showMessage('提示', '退款金额不能大于可退款金额!'); Leaf.showMessage('提示', '退款金额不能大于可退款金额!');
return; return;
...@@ -128,14 +149,18 @@ ...@@ -128,14 +149,18 @@
//更新时调用 //更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { 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'); var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) { if (return_ds == ds.id) {
if (name == 'return_bp_type' && value == 'OTHER') { if (name == 'return_bp_type' && value == 'THIRD_PARTY') {
record.getField('return_bp_code').setRequired(true); record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(false); record.getField('bp_bank_account_name').setReadOnly(true);
}else if(name == 'return_bp_type' && value != 'OTHER'){ record.getField('opposite_band_na').setReadOnly(true);
record.getField('return_bp_code').setRequired(false); 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('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 @@ ...@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/> <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:init-procedure>
<a:view> <a:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/> <a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
...@@ -18,12 +19,56 @@ ...@@ -18,12 +19,56 @@
<a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[ <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) { 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 transaction_amount = record.get('transaction_amount') || 0;
var return_amount = record.get('return_amount') || 0; var return_amount = record.get('return_amount') || 0;
var write_off_amount = record.get('write_off_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); var deposit_total_amount = parseFloat(transaction_amount - write_off_amount - return_amount).toFixed(2);
record.set('deposit_total_amount', deposit_total_amount); 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 () { 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'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
...@@ -130,6 +175,8 @@ ...@@ -130,6 +175,8 @@
//add by zhuxianfei 20181108 拒绝需要输入意见 //add by zhuxianfei 20181108 拒绝需要输入意见
function zjwfl5110_beforeapproveCheck(type) { 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 (type == 'refuse') {
if ('${/parameter/@instance_id}') { if ('${/parameter/@instance_id}') {
var root_ds = $('${/parameter/@layout_code}_virtual_ds'); var root_ds = $('${/parameter/@layout_code}_virtual_ds');
...@@ -145,8 +192,23 @@ ...@@ -145,8 +192,23 @@
}else { }else {
return true; 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> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
$Purpose: 商业伙伴创建 入口界面 $Purpose: 商业伙伴创建 入口界面
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <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:view>
<a:link id="hls_bp_master_link" url="${/request/@context_path}/modules/hls/HLS213N/hls_bp_master_create.lview"/> <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"/> <a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -14,6 +18,15 @@ ...@@ -14,6 +18,15 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(ds_id).getCurrentRecord(); var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) { 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_code', 'HLS213D');
record.set('function_usage', 'CREATE'); record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id); record.set('default_value_dsid', ds_id);
...@@ -21,6 +34,7 @@ ...@@ -21,6 +34,7 @@
var param = record.data; var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}'); 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){ window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq){
...@@ -50,14 +64,22 @@ ...@@ -50,14 +64,22 @@
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) { 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'); var bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if(ds.id == bp_create_ds_id){ debugger;
var r= $(bp_create_ds_id).getCurrentRecord(); if(ds.id == bp_create_ds_id) {
if(!r.get('bp_category')){ var r = $(bp_create_ds_id).getCurrentRecord();
r.set('bp_category','TENANT'); if (!r.get('bp_category')) {
r.set('bp_category_n','承租人'); 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> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
...@@ -47,6 +47,26 @@ ...@@ -47,6 +47,26 @@
// return; // 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 role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var v_primary_flag_count=0; var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll(); var role_records = $(role_ds_id).getAll();
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<a:init-procedure> <a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/> <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 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:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
...@@ -41,6 +42,10 @@ ...@@ -41,6 +42,10 @@
var record=$(ds_id).selected[0]; var record=$(ds_id).selected[0];
var param = record.data; var param = record.data;
var bp_class = record.get('bp_class'); 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'){ if(record.get('invoice_wfl_status') == 'APPROVING' || record.get('bp_wfl_status') == 'APPROVING'){
//审批中调用 //审批中调用
param['function_code'] = 'HLS214BR_Q'; param['function_code'] = 'HLS214BR_Q';
...@@ -96,7 +101,6 @@ ...@@ -96,7 +101,6 @@
success: function (res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.change_req_id) { if (res.result.change_req_id) {
param['winid'] = 'bp_master_invoice_detail_win'; param['winid'] = 'bp_master_invoice_detail_win';
param['function_code'] = 'HLS214B'; param['function_code'] = 'HLS214B';
param['bp_class'] = bp_class; param['bp_class'] = bp_class;
...@@ -140,6 +144,16 @@ ...@@ -140,6 +144,16 @@
param['query_only'] = 'Y'; param['query_only'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id); 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'){ }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'){ if(submit_flag == 'Y'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
...@@ -151,7 +165,20 @@ ...@@ -151,7 +165,20 @@
success: function (res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if(res.result.change_req_id){ 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_code'] = 'HLS214F';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class; param['bp_class'] = bp_class;
...@@ -165,6 +192,43 @@ ...@@ -165,6 +192,43 @@
// param['layout_debugger_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); 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 () { failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...@@ -183,6 +247,8 @@ ...@@ -183,6 +247,8 @@
param['query_only'] = 'N'; param['query_only'] = 'N';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
} }
}
} }
} }
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
// } // }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req'); 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 v_primary_flag_count=0;
var role_flag=true;
var role_records = $(role_ds_id).getAll(); var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) { for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){ if(role_records[i].get('primary_flag') == 'Y'){
...@@ -61,14 +62,69 @@ ...@@ -61,14 +62,69 @@
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!'); Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false; 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 ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord(); 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 address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
var records_addr = $(address_ds_id).getAll(); 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; var flag = true;
if (records_addr.length <=0){ if (records_addr.length <=0){
...@@ -99,7 +155,7 @@ ...@@ -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; var flag1 = true;
if (records_addr.length <= 0){ if (records_addr.length <= 0){
...@@ -325,7 +381,9 @@ ...@@ -325,7 +381,9 @@
var new_id_card; var new_id_card;
var old_bp_name; var old_bp_name;
var new_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 //新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) { 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) { // if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
...@@ -337,6 +395,16 @@ ...@@ -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) { 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}'; var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
...@@ -403,6 +471,7 @@ ...@@ -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'); 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("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){ if(role_ds_id == ds.id){
var records = $(ds.id).getAll(); var records = $(ds.id).getAll();
...@@ -890,6 +959,26 @@ ...@@ -890,6 +959,26 @@
Leaf.showMessage('提示', '请先保存!'); Leaf.showMessage('提示', '请先保存!');
return; 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()) { if ($(ds_id).validate()) {
var record = $(ds_id).getAt(0); var record = $(ds_id).getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function () { Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function () {
......
...@@ -150,6 +150,26 @@ ...@@ -150,6 +150,26 @@
var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division'); 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 ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record_agent =$(agent_id).getAll(); 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 head_record = $(ds_id).getCurrentRecord();
var english_name= head_record.get('english_name'); var english_name= head_record.get('english_name');
...@@ -178,11 +198,12 @@ ...@@ -178,11 +198,12 @@
return false; return false;
}} }}
if(social_code){ if(social_code){
if(!CheckSocialCreditCode(social_code)){ // if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null); // $L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; // return false;
}} // }
}
}; };
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
...@@ -308,6 +329,9 @@ ...@@ -308,6 +329,9 @@
record.getField('agent_bs_area_level').setPropertity('validator', 'hls303_record_field_validator'); 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_from').setPropertity('validator', 'hls303_record_field_validator');
record.getField('validity_period_to').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) { if (ds_renew_id == ds.id) {
ds.getField('valid_date_to').setPropertity('validator', 'hls303d_record_field_validator'); ds.getField('valid_date_to').setPropertity('validator', 'hls303d_record_field_validator');
......
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