Commit 8c57e809 authored by xy's avatar xy

[建机]-虚拟代理店需求

parent a8ed4f93
......@@ -70,6 +70,11 @@
<bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/>
<bm:field name="pay_method"/>
<bm:field name="pay_method_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = &apos;PAY_METHODS&apos; and v.code_value=t1.pay_method)" forInsert="false" forUpdate="false"/>
<bm:field name="is_buyout"/>
<bm:field name="is_buyout_n" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;YES_OR_NO&apos; And v.code_enabled_flag = &apos;Y&apos; And v.code_value_enabled_flag = &apos;Y&apos; And v.code_value = t1.is_buyout)" forInsert="false" forUpdate="false"/>
<bm:field name="is_constru_unit"/>
<bm:field name="is_constru_unit_n" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;YES_OR_NO&apos; And v.code_enabled_flag = &apos;Y&apos; And v.code_value_enabled_flag = &apos;Y&apos; And v.code_value = t1.is_constru_unit)" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<o:sequence-pk sequenceName="con_contract_tmpt_clause_s"/>
......
......@@ -53,6 +53,7 @@
<bm:field name="sign_contract_status_n"/>
<bm:field name="bp_id_tenant_n"/>
<bm:field name="bp_id_agent_level1_n"/>
<bm:field name="is_constru_unit"/>
</bm:fields>
<bm:primary-key>
<bm:pk-field name="contract_id"/>
......
......@@ -88,7 +88,9 @@
v.write_off_date,
v.write_off_amount,
v.division,
v.finance_amount
v.finance_amount,
v.lease_item_amount,
v.is_buyout
FROM (SELECT t.contract_id,
(SELECT hbbc.bank_account_id
FROM hls_bp_master_bank_account hbbc
......@@ -220,7 +222,9 @@
from csh_write_off cwo
where cwo.write_off_type='DEPOSIT_ENTRY' and cwo.contract_id=t.contract_id),0) write_off_amount,
t.division,
t.finance_amount
t.finance_amount,
t.lease_item_amount,
nvl(t.is_buyout,'N') is_buyout
FROM con_contract_cashflow f
join con_contract t
on t.contract_id = f.contract_id
......
......@@ -60,7 +60,7 @@
cpr.bp_bank_account_name BP_BANK_ACCOUNT_NAME,
--应付我司金额
cpr.amount_agent,
nvl(cpr.amount_agent,0) amount_agent,
cpr.amount_vender,
to_char(cpr.amount_agent,'FM999,999,999,990.00') amount_agent_print,
to_char(cpr.amount_vender,'FM999,999,999,990.00') amount_vender_print,
......@@ -131,7 +131,8 @@
nvl((select sum(cwo.write_off_due_amount) write_off_amount
from csh_write_off cwo
where cwo.write_off_type='DEPOSIT_ENTRY' and cwo.contract_id=c.contract_id),0) write_off_amount,
c.division
c.division,
nvl(c.is_buyout,'N') is_buyout
from csh_payment_req_ln cpr,
con_contract c,
hls_bp_master hbm,
......
......@@ -158,6 +158,11 @@
(select bp_name
from hls_bp_master
where hls_bp_master.bp_id = t.bp_id_agent_level1) bp_id_agent_n,
--add by 18938
(select nvl(is_constru_unit,'N')
from hls_bp_master
where hls_bp_master.bp_id = t.bp_id_agent_level1) is_constru_unit,
nvl(t.is_buyout,'N') is_buyout,
--查找厂商
(SELECT bp_name FROM hls_bp_master h WHERE h.bp_id=hli.vender_id) vender_name_n,
hli.vender_name,
......@@ -255,6 +260,8 @@
<bm:field name="con_business_type_n"/>
<bm:field name="cdd_list_id"/>
<bm:field name="bp_id_agent_n"/>
<bm:field name="is_constru_unit"/>
<bm:field name="is_buyout"/>
<bm:field name="bp_id_tenant"/>
<!-- <bm:field name="vender_name"/>-->
<bm:field name="vender_name_n"/>
......
......@@ -4,7 +4,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select h.bp_name, h.bp_code, h.bp_id
select h.bp_name, h.bp_code, h.bp_id,nvl(h.is_constru_unit,'N') as is_constru_unit
from exp_emp_assign_e_v ee, hls_bp_master h
where ee.user_id = ${/session/@user_id}
and ee.unit_id = h.unit_id
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select nvl((Select distinct zw.workflow_code
From zj_wfl_workflow zw, zj_wfl_workflow_instance zi
Where zw.workflow_id = zi.workflow_id
And zi.instance_id = t1.instance_id),'N') as workflow_code,
nvl((Select hm.is_constru_unit
From prj_project pp, hls_bp_master hm
Where pp.invoice_agent_id = hm.bp_id
And pp.wfl_instance_id = t1.instance_id),
'N') as is_constru_unit
From zj_wfl_instance_node_rcpt_ht t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select nvl((Select distinct zw.workflow_code
From zj_wfl_workflow zw
Where zw.workflow_id = t1.workflow_id),'N') as workflow_code,
nvl((Select hm.is_constru_unit
From prj_project pp, hls_bp_master hm
Where pp.invoice_agent_id = hm.bp_id
And pp.wfl_instance_id = t1.instance_id),
'N') as is_constru_unit
From zj_wfl_workflow_instance t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select nvl((Select distinct zw.workflow_code
From zj_wfl_workflow zw, zj_wfl_workflow_instance zi
Where zw.workflow_id = zi.workflow_id
And zi.instance_id = t1.instance_id),'N') as workflow_code,
nvl((Select hm.is_constru_unit
From prj_project pp, hls_bp_master hm
Where pp.invoice_agent_id = hm.bp_id
And pp.wfl_instance_id = t1.instance_id),
'N') as is_constru_unit
From zj_wfl_instance_node_recipient t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -3,10 +3,13 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select zj_wfl_core_pkg.get_node_service_url(t1.record_id,
Select t1.*,replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru
From (select zj_wfl_core_pkg.get_node_service_url(tt.record_id,
${/parameter/@url_type},
${/session/@user_id}) as service_url
from zj_wfl_instance_node_rcpt_ht t1
${/session/@user_id}) as service_url,tt.*
from zj_wfl_instance_node_rcpt_ht tt) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
......@@ -3,11 +3,14 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select zj_wfl_core_pkg.get_node_service_url(t1.record_id,
${/parameter/@url_type},
${/session/@user_id}) as service_url
from zj_wfl_instance_node_recipient t1
#WHERE_CLAUSE#
Select t1.*,replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru
From (select zj_wfl_core_pkg.get_node_service_url(tt.record_id,
${/parameter/@url_type},
${/session/@user_id}) as service_url,tt.*
from zj_wfl_instance_node_recipient tt) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -3,9 +3,12 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select zj_wfl_core_pkg.get_wfl_service_url(t1.instance_id,
${/session/@user_id}) as service_url
from zj_wfl_workflow_instance t1
Select t1.*,replace(t1.service_url,
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview',
'modules/prj/PRJ501N/prj_project_maintain_constru_wfl.lview') as service_url_constru
From (select zj_wfl_core_pkg.get_wfl_service_url(tt.instance_id,
${/session/@user_id}) as service_url,tt.*
from zj_wfl_workflow_instance tt) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
......@@ -19,6 +19,7 @@
<a:dataSet id="pay_methods_ds" lookupCode="PAY_METHODS"/>
<a:dataSet id="con202_withway_ds" lookupCode="WITHHOLD_WAYS"/>
<a:dataSet id="secondary_lease_ds" lookupCode="SECONDARY_LEASE"/>
<a:dataSet id="is_buyout_ds" lookupCode="YES_OR_NO"/>
<a:dataSet id="con202_finance_type" lookupCode="FINANCE_TYPE"/>
<a:dataSet id="hls_bp_class_ds" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="other_tmpt_clause_ds" lookupCode="CON202_CON_PRINT_OTHER_CONDITON"/>
......@@ -36,6 +37,9 @@
<a:field name="withhold_way_n" displayField="code_value_name" options="con202_withway_ds" returnField="withhold_way" valueField="code_value"/>
<a:field name="pay_method_n" displayField="code_value_name" options="pay_methods_ds" returnField="pay_method" valueField="code_value"/>
<a:field name="secondary_lease_n" displayField="code_value_name" options="secondary_lease_ds" returnField="secondary_lease" valueField="code_value"/>
<a:field name="is_buyout_n" displayField="code_value_name" options="is_buyout_ds" returnField="is_buyout" valueField="code_value"/>
<a:field name="is_constru_unit_n" displayField="code_value_name" options="is_buyout_ds" returnField="is_constru_unit" valueField="code_value"/>
<a:field name="marital_status_flag_n" displayField="code_value_name" options="marital_status_flag_ds" returnField="marital_status_flag" valueField="code_value"/>
<a:field name="sp_sign_flag_n" displayField="code_value_name" options="sp_sign_flag_ds" returnField="sp_sign_flag" valueField="code_value"/>
<a:field name="finance_type"/>
......@@ -127,6 +131,8 @@
<a:column name="bp_category_n" editor="lov" prompt="商业伙伴类型" width="100"/>
<a:column name="vender_id_n" editor="lov" prompt="厂商" width="100"/>
<a:column name="secondary_lease_n" editor="cb" prompt="二次租赁" width="100"/>
<a:column name="is_buyout_n" editor="cb" prompt="是否买断机" width="100"/>
<a:column name="is_constru_unit_n" editor="cb" prompt="宏菱建机部" width="100"/>
<a:column name="bp_class_n" editor="cb" prompt="商业伙伴分类" width="100"/>
<a:column name="business_type_n" editor="lov" prompt="业务类型" width="80"/>
<a:column name="business_type" editor="lov" prompt="业务类型" width="80"/>
......
......@@ -126,7 +126,11 @@
//add by gzj 2022-12-23 北京卡家
||record_data.templet_code =='CON_COLLECTION_PAYMENT_KJ'||record_data.templet_code =='LEASE_CONTRACT_PAR_KJ_1'||record_data.templet_code =='CSH_PAYMENT_REQ_KJ'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_KJ_SURE'
||record_data.templet_code =='CSH_PAYMENT_REQ_KJ_1'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_KJ'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_KJ_FR'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_FR_KJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_KJ'||record_data.templet_code =='LEASE_CONTRACT_PAR_KJ'||record_data.templet_code =='PERSONAL_CREDIT_KJ'||record_data.templet_code =='ENTERPRISE_CREDIT_KJ') {
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_KJ'||record_data.templet_code =='LEASE_CONTRACT_PAR_KJ'||record_data.templet_code =='PERSONAL_CREDIT_KJ'||record_data.templet_code =='ENTERPRISE_CREDIT_KJ'
//add by 18938
||record_data.templet_code == 'BUSINESS_CONTRACT_XN' || record_data.templet_code == 'LEASE_CONTRACT_PAR_XN2' || record_data.templet_code == 'LEASE_CONTRACT_PAR_XN' || record_data.templet_code == 'DOWN_PAYMENT_OFFSET'
||record_data.templet_code == 'FINANCE_LEASEBACK_CONTRACT_XN' || record_data.templet_code == 'LEASE_ORDER_XN' || record_data.templet_code == 'LEASE_ORDER_XN2' || record_data.templet_code == 'FINANCE_LEASE_CONTRACT_XN'
||record_data.templet_code == 'CON_CONTRACT_MORTGAGE_XN') {
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
......@@ -230,7 +230,9 @@
param['division'] = record.get('division');
param['approval_status'] = record.get('approval_status');
param['con_business_type'] = record.get('con_business_type');
param['division'] = record.get('division');
param['division'] = record.get('division');
//add by 18938
param['is_constru_unit'] = record.get('is_constru_unit');
if (record.get('business_type') == 'PAYMENT') {
param['function_code'] = 'CSH501D';
} else if (record.get('business_type') == 'PREPAYMENT') {
......
......@@ -39,6 +39,8 @@
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
var con_business_type='${/parameter/@con_business_type}'||'${/model/loan_flag_path/record/@business_type}'||'LEASE';
var is_constru_unit='${/parameter/@is_constru_unit}' || 'N';
var is_buyout='${/parameter/@is_buyout}' || 'N';
//工作流审批界面校验发票状态
if ('${/parameter/@source_type}' == 'WFL_Y') {
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
......@@ -145,6 +147,19 @@
}, 5);
}
}
//add by 18938 承租人金额为0时 承租人账户信息为可输
if(is_constru_unit == 'Y'){
if(name == 'amount_tenant'){
if(record.get('amount_tenant') == 0){
record.getField('tenant_bank_account_number').setRequired(false);
record.getField('tenant_bank_account_number_n').setRequired(false);
}else{
record.getField('tenant_bank_account_number').setRequired(true);
record.getField('tenant_bank_account_number_n').setRequired(true);
}
}
}
//end
}
};
......@@ -184,6 +199,26 @@
records[i].getField('tenant_bank_account_name').setRequired(false);
}
}
//add by 18938
if(is_constru_unit == 'Y'){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = $(ds_id).getAll();
for (i = 0; i < records.length; i++) {
if(records[i].get('is_buyout') == 'Y'){
//买断机 应付承租人金额为必填项 应付我司金额为只读项且默认为0
records[i].getField('amount_tenant').setRequired(true);
records[i].getField('amount_agent').setReadOnly(true);
}else{
//非买断机 应付承租人金额为只读项,默认为0,承租人账号为非必填 应付我司金额为只读项且默认为0 委托付款金额为必填项(界面已配置)
records[i].getField('amount_tenant').setReadOnly(true);
records[i].getField('amount_agent').setReadOnly(true);
}
if(records[i].get('amount_tenant') > 0){
records[i].getField('tenant_bank_account_number').setRequired(true);
records[i].getField('tenant_bank_account_number_n').setRequired(true);
}
}
}
}
var lnds_records = $(ds_id).getAll();
if (ds.id == ds_id) {
......@@ -194,6 +229,19 @@
}
}
}
//非虚拟店 应付承租人金额非必填且未只读
if(is_constru_unit != 'Y'){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = $(ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('amount_tenant').setRequired(false);
records[i].getField('amount_tenant').setReadOnly(true);
if(con_business_type == 'LEASEBACK'){
records[i].getField('tenant_bank_account_number').setRequired(true);
records[i].getField('tenant_bank_account_number_n').setRequired(true);
}
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
......@@ -247,6 +295,41 @@
};
}
}
//add by 18938
if(is_constru_unit == 'Y'){
if(con_business_type == 'LEASEBACK'){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = $(ds_id).getAll();
for (i = 0; i < records.length; i++) {
if(is_buyout == 'Y'){
//买断机 应付承租人金额为必填项 应付我司金额为只读项且默认为0 承租人账号必填
records[i].getField('amount_tenant').setRequired(true);
records[i].getField('amount_agent').setReadOnly(true);
}else{
//非买断机 应付承租人金额为只读项,默认为0,承租人账号为非必填 应付我司金额为只读项且默认为0 委托付款金额为必填项(界面已配置)
records[i].getField('amount_tenant').setReadOnly(true);
records[i].getField('amount_agent').setReadOnly(true);
}
if(records[i].get('amount_tenant') > 0){
records[i].getField('tenant_bank_account_number').setRequired(true);
records[i].getField('tenant_bank_account_number_n').setRequired(true);
}
}
}
}else{
//非虚拟店 应付承租人金额非必填且未只读
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records = $(ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('amount_tenant').setRequired(false);
records[i].getField('amount_tenant').setReadOnly(true);
if(con_business_type == 'LEASEBACK'){
records[i].getField('tenant_bank_account_number').setRequired(true);
records[i].getField('tenant_bank_account_number_n').setRequired(true);
}
}
}
//end
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
......@@ -356,6 +439,8 @@
var repur_con_ddct_amt = get_current_amount(line_data.get('repur_con_ddct_amt'));
//应付承租人金额
var amount_tenant = get_current_amount(line_data.get('amount_tenant'));
//设备款 add by 18938
var lease_item_amount = get_current_amount(line_data.get('lease_item_amount'));
if (amount_agent < 0 || amount_vender < 0) {
$L.showErrorMessage("提示", '应付我司金额和首付款抵冲金额不能为负数!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -384,9 +469,17 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//add by 18938
if(is_constru_unit == 'Y'){
if(plus(plus(other_payment2, amount_vender), repur_con_ddct_amt) != lease_item_amount){
$L.showErrorMessage("提示", '首付款抵扣金额,委托付款金额,回购租金抵冲金额之和应等于设备款!',null,500,300);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
} else if (con_business_type == 'LEASEBACK') {
var entrusted_amount = get_current_amount(line_data.get('entrusted_amount'));
if (plus(plus(amount_agent, amount_vender),repur_con_ddct_amt) != entrusted_amount) {
if (plus(plus(amount_agent, amount_vender),repur_con_ddct_amt) != entrusted_amount && is_constru_unit =!= 'Y') {
$L.showErrorMessage("提示", '应付代理店金额、应付厂商金额、回购租金抵冲金额合计不等于合同签约时承租人所填写委托付款金额,请重新填写!',null,500,300);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
......@@ -396,6 +489,15 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//add by 18938
if(is_constru_unit == 'Y'){
if(plus(plus(plus(other_payment2, amount_tenant), amount_vender), repur_con_ddct_amt) != lease_item_amount){
$L.showErrorMessage("提示", '首付款抵扣金额,应付承租人金额,委托付款金额,回购租金抵冲金额之和应等于设备款!',null,500,300);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
//end
}
//本次申请金额等于委托加我司加应付承租人金额
......@@ -410,6 +512,23 @@
$L.showErrorMessage("提示", '买断机合同(即厂商的付款金额为0)不可与其他正常合同同时进行付款申请支付');
return false;
}
//add by 18938
if(is_constru_unit == 'Y'){
if(con_business_type == 'LEASEBACK'){
if(plus(plus(total_amount_agent, total_amount_vender), total_amount_tenant) != total_apply_amount){
$L.showErrorMessage("提示", '应付代理店总金额,应付厂商总金额,应付承租人总金额之和应等于申请总金额!',null,500,300);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}else{
if(plus(total_amount_agent, total_amount_vender) != total_apply_amount){
$L.showErrorMessage("提示", '应付代理店总金额,应付厂商总金额之和应等于申请总金额!',null,500,300);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
}
//end
//给头表赋值
$(ds_id).getAt(0).set('amount_agent_total', total_amount_agent);
$(ds_id).getAt(0).set('amount_vender_total', total_amount_vender);
......@@ -489,6 +608,26 @@
record.getField('las_compensatory_amount').setReadOnly(true);
}
}
//add by 18938
if(is_constru_unit == 'Y'){
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID_prompt').style.display = 'block';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_THIRD_BP_ID').style.display = 'block';
}
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NAME')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NAME_prompt').style.display = 'block';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NAME').style.display = 'block';
}
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NUM')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NUM_prompt').style.display = 'block';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_ACCOUNT_NUM').style.display = 'block';
}
if(document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_FULL_NAME')){
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_FULL_NAME_prompt').style.display = 'block';
document.getElementById('CSH501D_PAYMENT_REQ_HD_CSH_PAYMENT_REQ_HD_T_BANK_FULL_NAME').style.display = 'block';
}
}
//end
}
};
//保存submitsuccess调用
......
......@@ -129,6 +129,9 @@
param['product_type_n'] = record.get('product_type_n');
param['product_name_write'] = record.get('product_name_write');
}
//add by 18938
param['is_constru_unit'] = record.get('is_constru_unit');
param['is_buyout'] = record.get('is_buyout');
param['winid'] = 'csh501_csh_payment_req_link_winid';
param['url_title'] = '付款申请';
hls_doc_get_layout_code('csh501_get_layout_code_link_id', param, 'csh501_csh_payment_req_link_id', 'csh_payment_req_selectedDs');
......
......@@ -115,6 +115,7 @@
function hls_hls500_save(nextStep, source_procedure) {
debugger;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
var is_constru_unit = '${/parameter/@is_constru_unit}' || 'N';
var H1,H54;
for (var i = 0; i < temp_head_records.length; i++) {
if (temp_head_records[i].get('column_code') == 'H1') {
......@@ -177,9 +178,9 @@
// Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
// return false;
//}
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new && is_constru_unit != 'Y') {
if ('${/parameter/@division}'==91){
if ('${/parameter/@division}'==91){
Leaf.SideBar.show({
// msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%</br>租赁期为一年及以内的,利率为6.75%,大于一年的7.3%</br>利率最低值不能低于4.75%',
msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%',
......@@ -370,7 +371,8 @@
id_num: id_num,
recreate_H_formula: recreate_H_formula,
recreate_L_formula: recreate_L_formula,
division:'${/parameter/@division}'
division:'${/parameter/@division}',
is_constru_unit: '${/parameter/@is_constru_unit}'
},
url: url,
title: '${l:HLS.FIN_CALCULATOR}',
......@@ -1560,6 +1562,7 @@
debugger;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
var H1, H54, H159, H16, H12,H99,H102,H15,H44;
var is_constru_unit = '${/parameter/@is_constru_unit}' || 'N';
for (var i = 0; i < temp_head_records.length; i++) {
if (temp_head_records[i].get('column_code') == 'H1') {
H1 = temp_head_records[i].get('column_value') || 0;
......@@ -1623,7 +1626,7 @@
unlock_calc_current_window();
return false;
}
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}'=='LEASEBACK') {
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}'=='LEASEBACK' && is_constru_unit != 'Y') {
var dowm_payment = div(H16, plus(H99,H102)).toFixed(2) * 100;
if (dowm_payment < 15) {
if ('${/parameter/@division}'!=91) {
......@@ -1682,7 +1685,7 @@
// Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
// return false;
//}
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new && is_constru_unit != 'Y') {
if ('${/parameter/@division}'==91) {
Leaf.SideBar.show({
// msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%</br>租赁期为一年及以内的,利率为6.75%,大于一年的7.3%</br>利率最低值不能低于4.75%',
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 18938
$Date: 2023-5-25
$Revision: 1.0
$purpose: 虚拟代理店租赁申请创建
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="hls.HLS303.hls_bp_agentemployee_id" rootPath="employee_id_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.amount_check" rootPath="amount_check"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}lease_prj_create_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="get_special_fields_link_id" model="prj.PRJ500.get_two_prj_number" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_principal_eq_pymt_adj_link_n" model="hls.HLS500N.query_principal_eq_pymt_adj" modelaction="update"/>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type="text/javascript"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_quotation_header.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_for_deron_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation_for_deron.lsc"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id"
model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/>
<a:link id="get_if_self_definition" model="db.prj_project_pkg.get_if_self_definition" modelaction="execute"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_occu_object_display" rootPath="occu_object"/>
<a:link id="prj_two_secondary_lease_link_id" model="prj.PRJ501N.insert_two_secondary_lease"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<script type="text/javascript"><![CDATA[
//add by zhuxianfei
Leaf.onReady(function() {
if(division!='30' && division!='50'&& division!='99'){
var gridId= 'PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id';
$(gridId).hideColumn('machine_number_n');
}
});
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
var item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var record = $(quotation_ds_id).getCurrentRecord();
var head_record = $(ds_id).getAt(0);
if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id').getUrl();
} else if ('${/parameter/@calc_type}' == 'CLASSIC_CALCULATOR') {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
} else {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if ($(quotation_ds_id).validate()) {
var parent_pk_value = head_record.get('project_id');
record.set('function_code', 'PRJ505_QUOTATION');
record.set('function_usage', 'UPDATE');
record.set('project_id', parent_pk_value);
//拆分合同可维护
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入
if (!record.get('calc_session_id')) {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'||division=='99'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 0,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula,
division:'${/parameter/@division}',
is_constru_unit: 'Y'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
$(item_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
} else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'||division=='99'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 0,
calc_type: '${/parameter/@calc_type}',
recreate_L_formula: 'N',
division:'${/parameter/@division}',
is_constru_unit: 'Y'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
$(item_ds_id).query();
});
} else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 0,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula,
division:'${/parameter/@division}',
is_constru_unit: 'Y'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
$(item_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
}
}
};
function prj501n_upload_file(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_upload_file_new(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
}
param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_project_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('project_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'PRJ501D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['prj_bp_id'] = record.get('prj_bp_id');
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}project_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_contract_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}contract_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
var bp_rate_flag;
/*保存前调用,生成项目编号*/
var count = 0;
var item_count = 0;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var check_flag = true;
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_record = $(prj_project_ds_id).getAt(0);
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var quotation_record = $(quotation_ds_id).getCurrentRecord();
var project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
// var lease_item_ds_id = '${/parameter/@layout_code}' + '_G_CAR_INFO_prj_project_lease_item_ds';
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var project_record = $(project_ds_id).getCurrentRecord();
var lease_item_ds_id_n = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var lease_item_record = $(lease_item_ds_id_n).getCurrentRecord();
var project_lease_item_id = $(lease_item_ds_id).getAll();
if(project_lease_item_id.length<1 && item_count == 0){
$L.showErrorMessage('提示', '租赁物信息不能为空!');
item_count = item_count+1;
return false;
}else if(project_lease_item_id.length<1 && item_count != 0){
item_count = 0;
return false;
}
var machine_number = lease_item_record.get('machine_number_70');
var project_id = project_record.get('project_id');
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES'){
if(division == '92' && !Leaf.isEmpty(machine_number)){
Leaf.request({
url: $('check_machine_number_id').getUrl(),
para: {
machine_number: machine_number,
project_id :project_id
},
scope: this,
success: function (res) {
machine_number_num= res.result.record.v_count;
},
failure: function () {
return false;
},
scope: this,
sync: true
});
}
if (machine_number_num>0 && count == 0){
count = count+1;
$L.showErrorMessage('提示', '该机号已存在,请重新确认!');
return false;
}else if(machine_number_num>0 && count != 0){
count = 0;
return false;
}
}
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if ((record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') && record.get('deduction_limit') <=0) {
Leaf.showMessage('${l:HLS.PROMPT}', '扣款限额应大于0');
return false;
}
if (record.get('signing_city')){
if (record.get('signing_city').indexOf('州') == -1 && record.get('signing_city').indexOf('县') == -1 && record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
}
}
}
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if(division!='70'&&division!='92'){
//非铁甲排除铁甲必填
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'contract_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score'&& key != 'tj_score' ) {
if(!bp_tenant_detail_r.get(key)){
Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方担保附件分数\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
}else{
bp_rate_flag = true;
}
}
}else if(division == '92'){
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age'&& key != 'contract_id' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score'&&key != 'tj_score') {
//if (!bp_tenant_detail_r.get(key)) {
if (typeof bp_tenant_detail_r.get(key) == "null" || typeof bp_tenant_detail_r.get(key) == "undefined" || bp_tenant_detail_r.get(key) === "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方担保附件得分\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
} else {
bp_rate_flag = true;
}
}
} else{
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'contract_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score' ) {
if(!bp_tenant_detail_r.get(key)){
Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方担保附件分数\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
}else{
bp_rate_flag = true;
}
}
}
}
}
if(!bp_rate_flag){
return false;
}
if (prj_record.get('project_number')) {
return true;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: '${/parameter/@document_category}',
document_type: record.get('document_type'),
business_type: record.get('business_type'),
function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}',
lease_channel: prj_record.get('lease_channel'),
first_flag: prj_record.get('first_flag'),
ka_prj_id: prj_record.get('ka_prj_id'),
quotation_ds_id: quotation_record.get('large_balance')
},
success: function (res) {
var document_number = res.result.document_number;
prj_record.set('project_number', document_number);
check_flag = true;
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
};
function prj501n_lease_number_renderer(record_id, ds_id){
var prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id);
var param = {};
param['project_status'] = 'NEW';
param['division'] = record.get('division');
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501INC';
param['function_usage'] = 'UPDATE';
param['winid'] = '${/parameter/@layout_code}_project_create_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_prj_create_query_link', prj_quotation_ds, null);
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
if(record.get('cdd_item') == 'ADD_ATTACH'||record.get('cdd_item') == 'TJ_SCORE_SHEET'){
link_function = 'prj501n_upload_file_new';
}
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i < str.length; i++) {
//
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'bp_link' && !record.isNew) {
link_function = 'prj501n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'project_number') {
link_function = 'prj501n_project_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
} else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name=='machine_number_n' && record.get('project_lease_item_id')!=null){
link_function = 'prj501n_lease_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + '查看明细' + '</a>';
}
};
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id == ds.id || virtual_ds_id == ds.id) {
$(cdd_item_ds_id).query();
$(bp_ds_id).query();
$(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query();
$(prj_quotation_ds_id).query();
}
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
var record = $(ds_id).getCurrentRecord();
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=' + record.get('bp_id_tenant');
$(tenant_ds_id).setQueryUrl(url);
$(tenant_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//查询时调用(form,fieldboxcolumn)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_query'] = function (ds, qpara, bp_seq) {
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_INFO', 'prj_project_bp');
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
if (ds.id == tenant_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara['project_id'] = prj_record.get('project_id');
}
if (ds.id == quotation_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara['document_id'] = prj_record.get('project_id');
qpara['project_id'] = prj_record.get('project_id');
}
};
/*查询前调用*/
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
if (ds.id == prj_project_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara.project_id = prj_record.get('project_id');
}
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
if (ds.id == prj_project_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara['cdd_list_id'] = prj_record.get('cdd_list_id');
}
};
//选择事件(grid,attach,gridbox,table)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function (ds, record, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除主承租人!');
ds.unSelect(record);
ds.Select(record);
}
if (record.get('bp_category') == 'AGENT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除经销商!');
ds.unSelect(record);
ds.Select(record);
}
}
};
function jsGetAge(strBirthday) {
var returnAge;
var strBirthdayArr = strBirthday.split("-");
var birthYear = strBirthdayArr[0];
var birthMonth = strBirthdayArr[1];
var birthDay = strBirthdayArr[2];
var d = new Date();
var nowYear = d.getFullYear();
var nowMonth = d.getMonth() + 1;
var nowDay = d.getDate();
if (nowYear == birthYear) {
returnAge = 0;//同年 则为0岁  
} else {
var ageDiff = nowYear - birthYear; //年之差  
if (ageDiff > 0) {
if (nowMonth == birthMonth) {
var dayDiff = nowDay - birthDay;//日之差  
if (dayDiff < 0) {
returnAge = ageDiff - 1;
} else {
returnAge = ageDiff;
}
} else {
var monthDiff = nowMonth - birthMonth;//月之差  
if (monthDiff < 0) {
returnAge = ageDiff - 1;
} else {
returnAge = ageDiff;
}
}
} else {
returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天  
}
}
return returnAge;//返回周岁年龄  
}
var division='';
//新增和加载时调用(form)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id){
if (Leaf.isEmpty(record.get('send_message'))){
record.set('send_message', 'YES');
record.set('send_message_n', '是');
record.getField('cell_phone').setRequired(true);
} else if( record.get('send_message') == 'YES'){
record.getField('cell_phone').setRequired(true);
}
if (Leaf.isEmpty(record.get('cell_phone'))){
record.set('cell_phone', record.get('phone_number'));
}
}
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id) {
if (division != '70'&&division!='92' && division != '') {
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_BRAND_VALUE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_BRAND_VALUE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_BRAND_VALUE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_MODELCD')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_MODELCD_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_MODELCD').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_USING_HOUR')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_USING_HOUR_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_USING_HOUR').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_RESIDUAL_VALUE_AMOUNT')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_RESIDUAL_VALUE_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_RESIDUAL_VALUE_AMOUNT').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OWNERSHIP_FLAG')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OWNERSHIP_FLAG_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OWNERSHIP_FLAG').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_PRODUCE_DATE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_PRODUCE_DATE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_PRODUCE_DATE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT').style.display = 'none';
}
} else if ((division=='70'|| division=='92')&&division!='') {
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_THIRD_PARTY_DEPOSIT')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_THIRD_PARTY_DEPOSIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_THIRD_PARTY_DEPOSIT').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE2')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE2_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE2').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
if (division=='92' && division != '') {
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none';
}
}
}
if (ds_id == ds.id && ds_id) {
division=record.get('division');
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
//业务类型回租时,默认只读“首付款抵扣”选项
if (record.get('business_type') == 'LEASEBACK') {
record.set('pay_method', 'WIRE_TRANSFER');
record.set('pay_method_n', "电汇");
record.getField('pay_method').setReadOnly(true);
record.getField('pay_method_n').setReadOnly(true);
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
if(division == '92'){
record.getField('pay_method').setReadOnly(false);
record.getField('pay_method_n').setReadOnly(false);
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE').style.display = 'none';
}
}
//获取员工类型
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
if(division=='80'){
record.set('credit_line','TENANT');
record.set('credit_line_n','承租人');
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”或"建行扣款(两方)"时展示,必填,大于0,默认20万,可修改;
if (record.get('PAY_METHOD') == 'CCB_THREE'||record.get('PAY_METHOD') == 'CCB_TWO') {
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
}
record.getField('deduction_limit').setRequired(true);
} else {
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
record.getField('deduction_limit').setRequired(false);
}
if(document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
//add by wangwei 非铁甲业务隐藏铁甲评分
var bp_tenant_rate_detail_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'bp_tenant_rate_detail');
if (bp_tenant_rate_detail_ds_id == ds.id && bp_tenant_rate_detail_ds_id) {
if (division != '70' && division != '') {
if(document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE')){
document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE').style.display = 'none';
}
}
}
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id&&tenant_ds_id){
if(name == 'send_message_n'){
if(value=='是'){
record.getField('cell_phone').setRequired(true);
} else if(value=='否'){
record.getField('cell_phone').setRequired(false);
}
}
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='30'||division=='50'||division=='80'||division=='99'){
record.getField('set_number').setRequired(true);
}else{
record.getField('set_number').setReadOnly(true);
if(Ext.isEmpty(record.get('set_number'))){
record.set('set_number',1);
}
}
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70' || division=='92'){
if(name=='lease_name_n'){
record.data.type_name=value;
}else if(name=='modelcd'){
record.data.pattern=value;
}
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
}
}
//选择承租人带出开票信息
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (name == "payment_deduction" && value=="DOWN_PAYMENT_DEDUCTION") {
//业务类型回租时,默认只读“首付款抵扣”选项
if ($(prj_project_ds_id).getAt(0).get('business_type') == 'LEASE') {
Leaf.showInfoMessage("提示", "直租业务不能选择首付款抵扣");
setTimeout(function () {
$(prj_project_ds_id).getAt(0).set('payment_deduction', null);
$(prj_project_ds_id).getAt(0).set('payment_deduction_n', null);
}, 10);
}
}
if (name == "bp_id_tenant_n" && value) {
var bp_id_tenant = record.get('bp_id_tenant');
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('hls_bp_master_billing_link').getUrl(),
para: {
bp_id: bp_id_tenant
},
success: function (res) {
var billing_into = res.result.record;
var prj_project_bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type_n', billing_into.taxpayer_type_n);
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type', billing_into.taxpayer_type);
$(prj_project_bp_ds_id).getAt(0).set('invoice_title', billing_into.invoice_title);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_address', billing_into.invoice_bp_address);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_phone_num', billing_into.invoice_bp_phone_num);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank', billing_into.invoice_bp_bank);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank_account', billing_into.invoice_bp_bank_account);
$(prj_project_bp_ds_id).getAt(0).set('tax_registry_num', billing_into.tax_registry_num);
$(prj_project_bp_ds_id).getAt(0).set('ref_v07', billing_into.ref_v07);
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
//根据承租人查找该承租人的历史合同信息
$(prj_project_history_ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query');
$(prj_project_history_ds_id).setQueryParameter("bp_id", bp_id_tenant);
$(prj_project_history_ds_id).query();
Leaf.Masker.mask(Ext.getBody());
$(score_ds_id).getCurrentRecord().set('score_name', value);
Leaf.request({
url: $('bp_tenant_detail_query_link').getUrl(),
para: {
bp_id: bp_id_tenant
},
success: function (res) {
var obj = res.result.record;
if (obj) {
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age') {
var vl = obj[key];
if (key == 'bp_birth' && obj[key]) {
vl = new Date(obj[key].toString());
}
if (vl != "null" && vl != "undefined") {
bp_tenant_detail_r.set(key, vl);
}
}
}
}
}
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
if(name == 'legal_person' && value){
$(score_ds_id).getCurrentRecord().set('score_name', value);
}
if(name == 'bp_id_tenant'){
if(!value){
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
bp_tenant_detail_r.set(key,'');
}
}
}
record.getField('bank_account_id').setLovPara('bp_id_tenant', record.get('bp_id_tenant'));
}
if (name == 'pay_method') {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.set('bank_branch_num', '');
record.set('bank_account_name', '');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}
//add by niminmin
//当“二次租赁”字段选择‘是’时,“回购合同编号”字段为必填。当选择‘否’时,“回购合同编号”字段为只读。
if (name == 'secondary_lease') {
if (value=='YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
}else if(value=='NO'){
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id',null);
record.set('repur_contract_id_n',null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)或建行扣款(两方)”时展示,必填,大于0,默认20万,可修改;
if (name=='pay_method') {
if(value=='CCB_THREE'||value=='CCB_TWO'){
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
}
record.getField('deduction_limit').setRequired(true);
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
}else{
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit',null);
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
}
if (score_ds_id == ds.id) {
if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
setTimeout(function () {
record.set('bp_birth', old_value);
}, 0);
} else {
record.set('bp_age', jsGetAge(value.format('yyyy-mm-dd').toString()));
}
}
if(name=='third_guar_score'&&!Ext.isEmpty(value)){
if(value<0||value>10){
setTimeout(function () {
record.set('third_guar_score', '');
}, 0);
Leaf.showInfoMessage("提示", "第三方担保附件分数范围为0-10,请重新输入!");
}
}
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
if (device_ds_id == ds.id) {
if (name == 'quantity') {
if (value <= 0) {
Leaf.showInfoMessage("提示", "数量必须大于0");
setTimeout(function () {
record.set('quantity', old_value);
}, 0);
}
}
}
var bp_code='${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)){
if (bp_code == 'D00000041' || bp_code =='D00010001' || bp_code=='D00000026') {
if (prj_quotation_ds_id == ds.id) {
if (name == 'price_list' && value) {
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(prj_project_ds_id).getAt(0).get('business_type') == 'LEASE') {
if (value == 'HL_PRICR_E' || value == 'HL_PRICR_EN') {
if(document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt')){
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}
} else {
if(document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt')){
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
quotation_record.set('large_balance', 'NO');
quotation_record.set('large_balance_n', '否');
}
}
}
}
}
}
if(document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt')){
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('PROJECT_CONSTRU_CREATE_NP_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
};
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'&& division!='99'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'|| division=='92'){
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('machine_number_70').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true);
}else {
record.getField('modelcd').setReadOnly(true);
}
}
}
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true);
}
if (record.get('bp_category') == 'AGENT') {
record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true);
}
}
};
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
//租赁物序号
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if (ds_id == ds.id && ds_id) {
//设置序号
var measure_records = ds.getAll(),
seq_num = 0;
if (measure_records.length) {
for (var j = 0; j < measure_records.length; j++) {
var measure_record = measure_records[j],
rk = measure_record.get('lease_item_seq');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
if(division=='70'|| division=='92'){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('machine_number_70').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true);
}else {
record.getField('modelcd').setReadOnly(true);
}
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
var traffic_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_TRAFFIC', 'bp_tenant_rate_item');
if ((device_ds_id == ds.id && device_ds_id) || (traffic_ds_id == ds.id && traffic_ds_id)) {
//设置序号
var rs = ds.getAll(),
seq_num = 0;
if (rs.length) {
for (var j = 0; j < rs.length; j++) {
var r = rs[j],
rk = r.get('seq_num');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('seq_num', rk_value);
}
};
//客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
if (record) {
var param = record.data;
if (record.get('project_id')) {
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var r = $(score_ds_id).getCurrentRecord();
if (r.dirty) {
Leaf.showInfoMessage('提示', '评分数据发生修改,请先保存再进行评分');
return;
}
if ($(ds_id).validate()) {
var win = new Leaf.Window({
id: param['winid'],
params: param,
url: $('${/parameter/@layout_code}_tenant_rate_query_link').getUrl(),
title: param['url_title'],
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(ds_id).setQueryParameter('project_id',record.get('project_id'));
$(ds_id).query();
});
}
} else {
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
var record = $(quotation_ds_id).getCurrentRecord();
var current_record = $(ds_id).getCurrentRecord();
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var bp_record = $(bp_ds_id).getCurrentRecord();
var project_id = current_record.get('project_id');
if (current_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (lease_item_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (bp_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if(current_record.get('division')=='70' || current_record.get('division')=='92'){
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');
Leaf.request({
url: $('${/parameter/@layout_code}_principal_eq_pymt_adj_link_n').getUrl(),
para: {p_project_number: project_number},
scope: this,
success: function (res) {
//先查询数量
var principal_eq_pymt_adj = res.result.principal_eq_pymt_adj;
//根据数量,一个直接查询显示,多个显示空
if (principal_eq_pymt_adj == null || principal_eq_pymt_adj == undefined || principal_eq_pymt_adj <= 0) {
Leaf.showMessage('${l:PROMPT}', '大额尾款报价需调整且只能调整最后一期租金');
return;
}else{
if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(division=='30'||division=='50'||division=='99'){
var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number');
var total_number=records.get('total_number');
var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value');
var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}', '支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else if(total_number!=0 && set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
}
});
}else {
if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(division=='30'||division=='50'||division=='99'){
var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number');
var total_number=records.get('total_number');
var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value');
var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}', '支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else if(total_number!=0 && set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
}
Leaf.onReady(function(){
if(division=='70'|| division=='92'){
if($('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id')){
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('full_name_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('division_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('equipments');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('machine_model_class_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('item_type_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('equipment_type_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('machine_number');
}
}else if (division=='91'){ //若为神钢建机
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var current_record = $(ds_id).getCurrentRecord();
current_record.set('payment_deduction','TRI_AGREEMENT');
current_record.set('payment_deduction_n','三方协议');
current_record.getField('payment_deduction').setReadOnly(true);
current_record.getField('payment_deduction_n').setReadOnly(true);
if($('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id')){
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('machine_number_70');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('lease_name_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('brand_value');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('type_name');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('produce_date');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('using_hour');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('detention_amount');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('residual_value_amount');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('ownership_flag_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('created_by_n');
}
}
else {
if($('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id')){
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('machine_number_70');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('lease_name_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('brand_value');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('type_name');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('produce_date');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('using_hour');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('detention_amount');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('residual_value_amount');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('ownership_flag_n');
$('PROJECT_CONSTRU_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id').hideColumn('created_by_n');
}
}
})
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -20,6 +20,8 @@
<a:view>
<a:link id="prj_chance_create_link"
url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create.lview"/>
<a:link id="prj_chance_constru_create_link"
url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_constru.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="prj500n_create_project_interface_link" model="prj.PRJ500N.ds_project_interface_query" modelaction="execute" />
......@@ -39,15 +41,22 @@
return false;
}
if ($(ds_id).validate()) {
record.set('function_code', 'PRJ500D');
var url;
if(record.data.is_constru_unit == 'Y' || '${/model/user_agent_description/record/@is_constru_unit}' == 'Y'){
record.set('function_code', 'PRJ500D_CONSTRU');
url = "prj_chance_constru_create_link";
}else{
record.set('function_code', 'PRJ500D');
url = "prj_chance_create_link";
}
record.data['url_title'] = '报价申请创建';
record.set('function_usage', 'CREATE');
record.set('document_category', 'PROJECT');
record.set('default_value_dsid', ds_id);
record.data['url_title'] = '报价申请创建';
var param = record.data;
record.set('winid', 'prj_porject_create_win_id');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'prj_chance_create_link');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url);
}
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 18938
$Date: 2023-5-25
$Revision: 1.0
$purpose: 虚拟代理店租赁申请-工作流
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="zjwfl.ZJWFL1060.zi_wfl_approve_get_submitted" rootPath="approve_history_rp"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}lease_number_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
model="cont.CON500.con_contract_get_special_fields" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_quotation_header.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_for_deron_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation_for_deron.lsc"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id"
model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<a:link id="get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
<script type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
Leaf.showConfirm('提示', '是否确认生成合同?', function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var quo_record = $(quotation_ds_id).getCurrentRecord();
var cal_hd_price_list = quo_record.get('cal_hd_price_list');
var price_list = quo_record.get('price_list');
if (cal_hd_price_list == price_list) {
var url = $('${/parameter/@layout_code}_prj_project_create_contract_link_id').getUrl();
var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request(
{
url: url,
para: {
project_id: record.get('project_id'),
contract_seq: 1,
bp_contract_seq: 1,
contract_type: 'CARCON',
contract_name: record.get('project_name'),
billing_method: record.get('billing_method'),
},
success: function (res) {
$('${/parameter/@winid}').close();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
}
);
}
} else {
Leaf.showMessage('${l:PROMPT}', '报价有变动请重新计算!');
return;
}
});
};
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
var item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var record = $(quotation_ds_id).getCurrentRecord();
var head_record = $(ds_id).getAt(0);
if ('${/parameter/@calc_type}' == 'LITE_CALCULATOR') {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id').getUrl();
} else if ('${/parameter/@calc_type}' == 'CLASSIC_CALCULATOR') {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
} else {
url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
}
if (head_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if ($(quotation_ds_id).validate()) {
var parent_pk_value = head_record.get('project_id');
record.set('function_code', 'PRJ505_QUOTATION');
record.set('function_usage', 'UPDATE');
record.set('project_id', parent_pk_value);
//拆分合同可维护
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入
if (!record.get('calc_session_id')) {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula,
division:division,
is_constru_unit: 'Y'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
$(item_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
} else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: '${/parameter/@calc_type}',
recreate_L_formula: 'N',
division:division,
is_constru_unit: 'Y'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
$(item_ds_id).query();
});
} else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
Leaf.request({
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 1,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula,
division:division,
is_constru_unit: 'Y'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
$(item_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
}
}
};
var bp_rate_flag;
/*保存前调用,生成项目编号*/
var count = 0;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if ((record.get('pay_method') == 'CCB_THREE' ||record.get('pay_method') == 'CCB_TWO') && record.get('deduction_limit') < 0) {
Leaf.showMessage('${l:HLS.PROMPT}', '扣款限额不能小于0');
return false;
}
if (record.get('signing_city')){
if (record.get('signing_city').indexOf('州') == -1 && record.get('signing_city').indexOf('县') == -1 && record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
}
}
}
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if(division!='70'&&division != '92'){
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'contract_id'&& key != 'third_guar_score'&&key != 'tj_score') {
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)== "") {
Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方担保附件分数\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
}else{
bp_rate_flag = true;
}
}
}else if(division == '92'){
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age'&& key != 'contract_id' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'third_guar_score'&&key != 'tj_score') {
if (typeof bp_tenant_detail_r.get(key) == "null" || typeof bp_tenant_detail_r.get(key) == "undefined" || bp_tenant_detail_r.get(key) === "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方担保附件得分\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
}else{
bp_rate_flag = true;
}
}
} else{
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'third_party_credibility' && key != 'third_party_credibility_n'&& key != 'contract_id'&& key != 'third_guar_score') {
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)== "") {
Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方担保附件分数\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
}else{
bp_rate_flag = true;
}
}
}
}
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var project_record = $(prj_project_ds_id).getCurrentRecord();
var project_id = project_record.get('project_id');
var machine_number = lease_item_record.get('machine_number_70');
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') {
if (division == '92' && !Leaf.isEmpty(machine_number)) {
Leaf.request({
url: $('check_machine_number_id').getUrl(),
para: {
machine_number: machine_number,
project_id: project_id
},
scope: this,
success: function (res) {
machine_number_num = res.result.record.v_count;
},
failure: function () {
return false;
},
scope: this,
sync: true
});
}
if (machine_number_num > 0 && count == 0) {
count = count + 1;
$L.showErrorMessage('提示', '该机号已存在,请重新确认!');
return false;
} else if (machine_number_num > 0 && count != 0) {
count = 0;
return false;
}
}
if(!bp_rate_flag){
return false;
}
return true;
};
function prj501n_upload_file(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
}
param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_project_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('project_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'PRJ501D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['prj_bp_id'] = record.get('prj_bp_id');
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}project_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_contract_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}contract_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_lease_number_renderer(record_id, ds_id){
var record = $(ds_id).findById(record_id);
var param = {};
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
param['document_id'] = record.get('project_id');
param['hide_flag'] ='Y';
param['function_code'] = 'PRJ501INC';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i < str.length; i++) {
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
link_function = 'show_viewer_more';
url = url + '<a href="javascript:window[\'' + link_function + '\'](\'' + link + '\',\'' + temp[1] + '\',\'' + temp[0] + '\',\'' + value + '\');">' + temp[0] + '</a>' + ',';
}
else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'bp_link' && !record.isNew) {
link_function = 'prj501n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'project_number') {
link_function = 'prj501n_project_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
} else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name=='machine_number_n' && record.get('project_lease_item_id')!=null){
link_function = 'prj501n_lease_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + '查看明细' + '</a>';
}
};
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id == ds.id || virtual_ds_id == ds.id) {
$(cdd_item_ds_id).query();
$(bp_ds_id).query();
$(tenant_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//选择事件(grid,attach,gridbox,table)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function (ds, record, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除主承租人!');
setTimeout(function () {
ds.unSelect(record);
}, 1);
}
if (record.get('bp_category') == 'AGENT') {
//实际为不选中
Leaf.showMessage('${l:HLS.PROMPT}', '无法删除经销商!');
setTimeout(function () {
ds.unSelect(record);
}, 1);
}
}
};
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'&& division!='99'){
$(gridId).hideColumn('machine_number_n');
}
if((division=='70'||division=='92')&&division!=''){
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
}else {
record.getField('modelcd').setReadOnly(true);
}
$(gridId).hideColumn('full_name_n');
$(gridId).hideColumn('division_n');
$(gridId).hideColumn('equipments');
$(gridId).hideColumn('machine_model_class_n');
$(gridId).hideColumn('item_type_n');
$(gridId).hideColumn('equipment_type_n');
$(gridId).hideColumn('machine_number');
}else if(division!=''){
$(gridId).hideColumn('machine_number_70');
$(gridId).hideColumn('lease_name_n');
$(gridId).hideColumn('brand_value');
$(gridId).hideColumn('type_name');
$(gridId).hideColumn('produce_date');
$(gridId).hideColumn('using_hour');
$(gridId).hideColumn('detention_amount');
$(gridId).hideColumn('residual_value_amount');
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
if(record.get('division')=='30'||record.get('division')=='50'||record.get('division')=='80'){
record.getField('set_number').setRequired(true);
}else{
record.getField('set_number').setReadOnly(true);
if(Ext.isEmpty(record.get('set_number'))){
record.set('set_number',1);
}
}
}
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true);
}
if (record.get('bp_category') == 'AGENT') {
record.getField('bp_category_n').setReadOnly(true);
record.getField('bp_id_n').setReadOnly(true);
}
}
};
function jsGetAge(strBirthday) {
var returnAge;
var strBirthdayArr = strBirthday.split("-");
var birthYear = strBirthdayArr[0];
var birthMonth = strBirthdayArr[1];
var birthDay = strBirthdayArr[2];
var d = new Date();
var nowYear = d.getFullYear();
var nowMonth = d.getMonth() + 1;
var nowDay = d.getDate();
if (nowYear == birthYear) {
returnAge = 0;//同年 则为0岁  
} else {
var ageDiff = nowYear - birthYear; //年之差  
if (ageDiff > 0) {
if (nowMonth == birthMonth) {
var dayDiff = nowDay - birthDay;//日之差  
if (dayDiff < 0) {
returnAge = ageDiff - 1;
} else {
returnAge = ageDiff;
}
} else {
var monthDiff = nowMonth - birthMonth;//月之差  
if (monthDiff < 0) {
returnAge = ageDiff - 1;
} else {
returnAge = ageDiff;
}
}
} else {
returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天  
}
}
return returnAge;//返回周岁年龄  
}
//pdf预览 add by zhuxianfei
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function (res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path;
var oWin = window.open(source_path);
},
scope: this
});
}
Leaf.onReady(function () {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
//ADD BY SHEN
var billing_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
var billing_url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_bp/query?project_id=${/parameter/@project_id}';
$(billing_ds_id).setQueryUrl(billing_url);
$(billing_ds_id).query();
})
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
//租赁物序号
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if (ds_id == ds.id && ds_id) {
//设置序号
var measure_records = ds.getAll(),
seq_num = 0;
if (measure_records.length) {
for (var j = 0; j < measure_records.length; j++) {
var measure_record = measure_records[j],
rk = measure_record.get('lease_item_seq');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
var traffic_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_TRAFFIC', 'bp_tenant_rate_item');
if ((device_ds_id == ds.id && device_ds_id) || (traffic_ds_id == ds.id && traffic_ds_id)) {
//设置序号
var rs = ds.getAll(),
seq_num = 0;
if (rs.length) {
for (var j = 0; j < rs.length; j++) {
var r = rs[j],
rk = r.get('seq_num');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('seq_num', rk_value);
}
};
//客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
if (record) {
var param = record.data;
if (record.get('project_id')) {
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var r = $(score_ds_id).getCurrentRecord();
if (r.dirty) {
Leaf.showInfoMessage('提示', '评分数据发生修改,请先保存再进行评分');
return;
}
if ($(ds_id).validate()) {
var win = new Leaf.Window({
id: param['winid'],
params: param,
url: $('${/parameter/@layout_code}_tenant_rate_query_link').getUrl(),
title: param['url_title'],
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(ds_id).setQueryParameter('project_id', record.get('project_id'));
$(ds_id).query();
});
}
} else {
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var current_record = $(ds_id).getCurrentRecord();
var project_id = current_record.get('project_id');
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
var division='';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id){
if (Leaf.isEmpty(record.get('send_message'))){
record.set('send_message', 'YES');
record.set('send_message_n', '是');
record.getField('cell_phone').setRequired(true);
} else if( record.get('send_message') == 'YES'){
record.getField('cell_phone').setRequired(true);
}
if (Leaf.isEmpty(record.get('cell_phone'))){
record.set('cell_phone', record.get('phone_number'));
}
}
//addby xsh35973 20221014 神钢建机首付款抵扣只读
if (division=='91') { //若为神钢建机
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var current_record = $(ds_id).getCurrentRecord();
current_record.getField('payment_deduction').setReadOnly(true);
current_record.getField('payment_deduction_n').setReadOnly(true);
}
//add by wangwei 非铁甲业务隐藏铁甲评分
var bp_tenant_rate_detail_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'bp_tenant_rate_detail');
if (bp_tenant_rate_detail_ds_id == ds.id && bp_tenant_rate_detail_ds_id) {
if (record.get('division') != '70' && division != '') {
if(document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE')){
document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_TENANT_SCORE_INFO_BP_TENANT_RATE_DETAIL_TJ_SCORE').style.display = 'none';
}
}
}
if (ds_id == ds.id && ds_id) {
division=record.get('division');
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.getField('bank_branch_name').setReadOnly(true);
record.getField('bank_branch_name_n').setReadOnly(true);
record.getField('bank_branch_name').setRequired(false);
record.getField('bank_branch_name_n').setRequired(false);
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') {
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
}
record.getField('deduction_limit').setRequired(true);
} else {
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
record.getField('deduction_limit').setRequired(false);
}
if('${/parameter/@function_usage}'!='QUERY') {
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
} else {
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
} else if (record.get('secondary_lease') == 'NO') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
//业务类型回租时,默认只读“首付款抵扣”选项
if (record.get('business_type') == 'LEASEBACK') {
record.set('pay_method', 'WIRE_TRANSFER');
record.set('pay_method_n', "电汇");
record.getField('pay_method').setReadOnly(true);
record.getField('pay_method_n').setReadOnly(true);
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
if ('${/parameter/@function_usage}' != 'QUERY') {
if (division == '92') {
record.getField('pay_method').setReadOnly(false);
record.getField('pay_method_n').setReadOnly(false);
}
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
if (document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE')) {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_BRANCH_CODE').style.display = 'none';
}
}
if (Ext.isEmpty(bp_code)) {
record.getField('branch_code').setRequired(false);
record.getField('branch_code_n').setRequired(false);
}
//获取员工类型
var create_bp_code = '${/model/approve_history_rp/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord();
if(!Ext.isEmpty(create_bp_code)){
debugger;
if(create_bp_code == 'D00000029' || create_bp_code == 'D00000026' || create_bp_code == 'D00000030' || create_bp_code == 'D00000031'){
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
credit_record.getField('credit_line').setReadOnly(false);
credit_record.getField('credit_line_n').setReadOnly(false);
credit_record.getField('credit_line').setRequired(true);
credit_record.getField('credit_line_n').setRequired(true);
record.set('editable_flag','Y');
}else {
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
}else if(create_bp_code =='X00010005' || create_bp_code =='J00010006') {
credit_record.getField('credit_line').setReadOnly(true);
credit_record.getField('credit_line_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false);
if('${/parameter/@editable_flag}' != 'YE'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
}else if('${/parameter/@editable_flag}' != 'YE'){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}else {
}
}
}
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){
if(division!='70'&&division!='92'&&division!=''){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_BRAND_VALUE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_BRAND_VALUE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_BRAND_VALUE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_MODELCD')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_MODELCD_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_MODELCD').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_USING_HOUR')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_USING_HOUR_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_USING_HOUR').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_RESIDUAL_VALUE_AMOUNT')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_RESIDUAL_VALUE_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_RESIDUAL_VALUE_AMOUNT').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OWNERSHIP_FLAG')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OWNERSHIP_FLAG_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OWNERSHIP_FLAG').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_PRODUCE_DATE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_PRODUCE_DATE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_PRODUCE_DATE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CONTRACT_AMOUNT').style.display = 'none';
}
}else if((division=='70'||division=='92')&&division!=''){
if( document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_THIRD_PARTY_DEPOSIT')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_THIRD_PARTY_DEPOSIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_THIRD_PARTY_DEPOSIT').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE2')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE2_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_OTHER_FEE2').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
if (division=='92' && division != '') {
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none';
}
}
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)){
if (bp_code == 'D00000041' || bp_code =='D00010001' || bp_code=='D00000026') {
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(ds_id).getAt(0).get('business_type') == 'LEASE') {
if (quotation_record.get('price_list') == 'HL_PRICR_E' || quotation_record.get('price_list') == 'HL_PRICR_EN'){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}
}else{
quotation_record.set('large_balance','NO');
quotation_record.set('large_balance_n','否');
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}
}else{
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}else {
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}
}
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
if('${/parameter/@function_usage}' == 'QUERY' && '${/parameter/@editable_flag}' != 'YE' && '${/parameter/@editable_flag}' != 'Y' ){
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
};
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
var prj_project_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if (type == 'agree') {
if ($(prj_project_ds).validate()) {
if ($(prj_project_ds).isModified()&&document.getElementById('${/parameter/@layout_code}_save').style.display != "none") {
Leaf.showMessage('${HLS.PROMPT}', '请先保存');
return false;
}
//提交先保存
return true;
} else {
return false;
}
} else return true;
});
}
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id&&tenant_ds_id){
if(name == 'send_message_n'){
if(value=='是'){
record.getField('cell_phone').setRequired(true);
} else if(value=='否'){
record.getField('cell_phone').setRequired(false);
}
}
}
//选择承租人带出开票信息
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
;
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'||division=='92'){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false);
record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true);
record.getField('machine_number_70').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('full_name').setRequired(false);
record.getField('full_name_n').setRequired(false);
record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true);
if(name=='lease_name_n'){
record.data.type_name=value;
}else if(name=='modelcd'){
record.data.pattern=value;
}
}else {
record.getField('modelcd').setReadOnly(true);
}
if(division=='30'||division=='50'||division=='80'||division=='99'){
record.getField('set_number').setRequired(true);
}else{
record.getField('set_number').setReadOnly(true);
if(Ext.isEmpty(record.get('set_number'))){
record.set('set_number',1);
}
}
}
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (name == "payment_deduction" && value=="DOWN_PAYMENT_DEDUCTION") {
//业务类型回租时,默认只读“首付款抵扣”选项
if ($(prj_project_ds_id).getAt(0).get('business_type') == 'LEASE') {
Leaf.showInfoMessage("提示", "直租业务不能选择首付款抵扣");
setTimeout(function () {
$(prj_project_ds_id).getAt(0).set('payment_deduction', null);
$(prj_project_ds_id).getAt(0).set('payment_deduction_n', null);
}, 10);
}
}
if (name == "bp_id_tenant" && value) {
//根据承租人查找该承租人的历史合同信息
$(prj_project_history_ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query');
$(prj_project_history_ds_id).setQueryParameter("bp_id", value);
$(prj_project_history_ds_id).query();
}
if (name == 'bp_id_tenant_n' && value) {
Leaf.Masker.mask(Ext.getBody());
var bp_id_tenant = record.get('bp_id_tenant');
$(score_ds_id).getCurrentRecord().set('score_name', value);
Leaf.request({
url: $('bp_tenant_detail_query_link').getUrl(),
para: {
bp_id: bp_id_tenant
},
success: function (res) {
var obj = res.result.record;
if (obj) {
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age') {
var vl = obj[key];
if (key == 'bp_birth' && obj[key]) {
vl = new Date(obj[key].toString());
}
if (vl != "null" && vl != "undefined") {
bp_tenant_detail_r.set(key, vl);
}
}
}
}
}
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
if (name == 'legal_person' && value) {
$(score_ds_id).getCurrentRecord().set('score_name', value);
}
if (name == 'bp_id_tenant') {
if (!value) {
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
bp_tenant_detail_r.set(key, '');
}
}
}
record.getField('bank_account_id').setLovPara('bp_id_tenant', record.get('bp_id_tenant'));
}
if(name == 'credit_line' && value) {
$(prj_project_ds_id).get(0).set('credit_line',value);
}
}
if (name == 'pay_method') {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.set('bank_branch_num', '');
record.set('bank_account_name', '');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}
if (name == 'payment_deduction') {
var quoation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var quoation_record = $(quoation_ds_id).getCurrentRecord();
var down_payment = quoation_record.get('down_payment') || 0;
var calc_session_id = quoation_record.get('calc_session_id');
var other_payment2;
if (value &&calc_session_id&& value == 'NO_DEDUCTION') {
other_payment2 = 0;
} else if (value &&calc_session_id&& value != 'NO_DEDUCTION'){
other_payment2=down_payment;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_prj_project_update_status_link_id').getUrl(),
para: {
other_payment2: other_payment2,
calc_session_id: calc_session_id
},
success: function (arg) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
//add by niminmin
//当“二次租赁”字段选择‘是’时,“回购合同编号”字段为必填。当选择‘否’时,“回购合同编号”字段为只读。
if (name == 'secondary_lease') {
if (value == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (value == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示,必填,大于0,默认20万,可修改;
if (name=='pay_method') {
if(value=='CCB_THREE' || value=='CCB_TWO'){
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'block';
}
record.getField('deduction_limit').setRequired(true);
if(Ext.isEmpty(record.get('deduction_limit'))){
record.set('deduction_limit',200000);
}
}else{
record.getField('deduction_limit').setRequired(false);
record.set('deduction_limit',null);
if(document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT')){
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
}
}
}
if (score_ds_id == ds.id) {
if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
setTimeout(function () {
record.set('bp_birth', old_value);
}, 0);
} else {
record.set('bp_age', jsGetAge(value.format('yyyy-mm-dd').toString()));
}
}
if(name=='third_guar_score'&&!Ext.isEmpty(value)){
if(value<0||value>10){
setTimeout(function () {
record.set('third_guar_score', '');
}, 0);
Leaf.showInfoMessage("提示", "第三方担保附件分数范围为0-10,请重新输入!");
}
}
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
if (device_ds_id == ds.id) {
if (name == 'quantity') {
if (value <= 0) {
Leaf.showInfoMessage("提示", "数量必须大于0");
setTimeout(function () {
record.set('quantity', old_value);
}, 0);
}
}
}
var bp_code='${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)){
if (bp_code == 'D00000041' || bp_code =='D00010001' || bp_code=='D00000026') {
if (prj_quotation_ds_id == ds.id){
if (name == 'price_list' && value){
var quotation_record = $(prj_quotation_ds_id).getCurrentRecord();
if ($(prj_project_ds_id).getAt(0).get('business_type') == 'LEASE') {
if (value == 'HL_PRICR_E' || value == 'HL_PRICR_EN'){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'block';
}
}else{
quotation_record.set('large_balance','NO');
quotation_record.set('large_balance_n','否');
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
}
}
}
}
}
}
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
};
//附件打包下载
window['${/parameter/@layout_code}_ACY_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_project_record = $(prj_project_ds_id).getAt(0);
var project_id = prj_project_record.get('project_id');
var project_number = prj_project_record.get('project_number');
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT'+ '&doc_code=' + project_number;
window.open(href = url_l, target = "_self");
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -16,6 +16,7 @@
<a:link id="prj_project_modify_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/>
<a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_constru_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="car_modify_dff_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_mananger_link"
......@@ -32,6 +33,7 @@
function open_project_modify_win(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var project_status = record.get('project_status');
var url;
//项目类layout_code
if (record.get('document_type') == 'PRJ') {
var maintain_type = 'UPDATE';
......@@ -52,18 +54,23 @@
param = record.data;
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501_WFL';
param['function_usage'] = 'QUERY';
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
param['prj_bp_id'] = record.get('prj_bp_id');
param['url_title'] = '报价申请维护';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
if(record.get('is_constru_unit') == 'Y'){
param['function_code'] = 'PRJ501_CONSTRU_WFL';
url = 'car_modify_constru_link';
}else{
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_link';
}
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, url, ds_id);
} else {
maintain_type = 'UPDATE';
param = record.data;
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501D';
param['function_usage'] = 'MODIFY';
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
......@@ -71,7 +78,14 @@
param['prj_bp_id'] = record.get('prj_bp_id');
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['url_title'] = '报价申请维护';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
if(record.get('is_constru_unit') == 'Y'){
param['function_code'] = 'PRJ500D_CONSTRU';
url = 'car_modify_constru_link';
}else{
param['function_code'] = 'PRJ501D';
url = 'car_modify_link';
}
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, url, ds_id);
}
}
}
......
......@@ -17,6 +17,7 @@
<a:link id="prj_project_bp_parameter_link" url="${/request/@context_path}/modules/prj/PRJ501/prj_project_bp_parameter.lview"/>
<!-- <a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>-->
<a:link id="car_modify_link_readonly" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="car_modify_mananger_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_manager.lview"/>
<a:link id="prj_project_close_link_id" model="prj.PRJ501.prj_project_close" modelaction="update"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"/>
......@@ -27,17 +28,27 @@
function open_project_modify_win(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var url;
//项目类layout_code
maintain_type = 'QUERY';
param = record.data;
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501Q';
param['function_usage'] = 'MODIFY';
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link_readonly', ds_id);
//add by 18938
if(record.get('is_constru_unit') == 'Y'){
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}else{
param['function_code'] = 'PRJ501Q';
url = 'car_modify_link_readonly';
}
//end
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, url, ds_id);
}
......
......@@ -3,6 +3,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.instance_id=${/parameter/@instance_id}" model="zjwfl.zj_wfl_workflow_service_display" rootPath="workflow_service_record"/>
<a:model-query defaultWhereClause="t1.instance_id=${/parameter/@instance_id}" model="zjwfl.zj_wfl_workflow_instance" rootPath="instance_simple_record"/>
<a:model-query defaultWhereClause="t1.instance_id=${/parameter/@instance_id}" model="zjwfl.zj_wfl_node_info_display" rootPath="node_service_record"/>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
......@@ -16,7 +17,21 @@
<div style="color:red;"><![CDATA[自定义页面获取失败]]></div>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url}"/>
<a:switch test="/model/node_service_record/record/@workflow_code">
<a:case value="PROJECT_WFL">
<a:switch test="/model/node_service_record/record/@is_constru_unit">
<a:case value="Y">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url_constru}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/workflow_service_record/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
<a:screen-include screen="modules/zjwfl/zj_wfl_approve_history.lview?instance_id=${/parameter/@instance_id}&amp;reader_type=ADMIN"/>
......
......@@ -4,6 +4,7 @@
<a:model-query defaultWhereClause="t1.instance_id=${/parameter/@instance_id}" model="zjwfl.zj_wfl_workflow_instance" rootPath="submiter_ht_instance"/>
<a:model-query defaultWhereClause="t1.workflow_id = ${/model/submiter_ht_instance/record/@workflow_id}" model="zjwfl.zj_wfl_workflow" rootPath="submiter_ht_workflow"/>
<a:model-query defaultWhereClause="t1.instance_id=${/parameter/@instance_id}" model="zjwfl.zj_wfl_workflow_service_display" rootPath="submiter_ht_wfl_service"/>
<a:model-query defaultWhereClause="t1.instance_id=${/parameter/@instance_id}" model="zjwfl.zj_wfl_node_info_display" rootPath="node_service_info"/>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
......@@ -16,7 +17,21 @@
<div style="color:red;"><![CDATA[自定义页面获取失败]]></div>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url}"/>
<a:switch test="/model/node_service_info/record/@workflow_code">
<a:case value="PROJECT_WFL">
<a:switch test="/model/node_service_info/record/@is_constru_unit">
<a:case value="Y">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url_constru}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/submiter_ht_wfl_service/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
<a:switch test="/model/submiter_ht_workflow/record/@show_approve_history_flag">
......
......@@ -4,31 +4,32 @@
<a:model-query defaultWhereClause="t1.record_id = ${/parameter/@rcpt_record_id} " model="zjwfl.zj_wfl_node_service_approve_history" rootPath="approver_ht_node_service"/>
<a:model-query defaultWhereClause="t1.record_id = ${/parameter/@approve_record_id}" model="zjwfl.zj_wfl_approve_record" rootPath="approver_ht_approve"/>
<a:model-query defaultWhereClause="t1.node_id = ${/model/approver_ht_approve/record/@node_id}" model="zjwfl.zj_wfl_workflow_node_filter_node_id" rootPath="approver_ht_node"/>
<a:model-query defaultWhereClause="t1.record_id = ${/parameter/@rcpt_record_id} " model="zjwfl.zj_wfl_node_info_approve_history" rootPath="node_service_info"/>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
(function() {
var checker_list = {};
zjwfl5110_ApproveChecker_add = function(name, fun) {
checker_list[name] = fun;
};
zjwfl5110_ApproveChecker_remove = function(name) {
delete checker_list[name];
};
zjwfl5110_ApproveChecker_check = function(type) {
for (var key in checker_list) {
if (checker_list[key](type) == true) {
} else {
return false;
}
}
return true;
};
})();
]]></script>
<a:switch test="/model/approver_ht_node_service/record/@service_url">
......@@ -39,7 +40,21 @@
<div style="color:red;"><![CDATA[自定义页面获取失败]]></div>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url}"/>
<a:switch test="/model/node_service_info/record/@workflow_code">
<a:case value="PROJECT_WFL">
<a:switch test="/model/node_service_info/record/@is_constru_unit">
<a:case value="Y">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url_constru}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/approver_ht_node_service/record/@service_url}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
<a:switch test="/model/approver_ht_node/record/@show_approve_history_flag">
......
......@@ -21,6 +21,7 @@
<a:model-query autocount="true" fetchall="true" model="zjwfl.zj_wfl_workflow_node_action_group" rootpath="node_action_group"/>
<a:model-query autoCount="true" defaultWhereClause="t1.record_id = ${/parameter/@record_id}" fetchAll="true" model="zjwfl.ZJWFL5110.cus_zj_wfl_instance_node_recipient" rootPath="instance_one"/>
<a:model-query defaultWhereClause="t1.record_id = ${/parameter/@record_id}" model="zjwfl.zj_wfl_node_service_wait_to_do" rootPath="node_service_record" trace="true"/>
<a:model-query defaultWhereClause="t1.record_id = ${/parameter/@record_id}" model="zjwfl.zj_wfl_node_info_query" rootPath="node_info_record" trace="true"/>
<s:server-script import="zjwfl_user_define.js"/>
</a:init-procedure>
<a:view>
......@@ -28,39 +29,39 @@
.buttongroup .item-btn-tl,.buttongroup .item-btn-tc,.buttongroup .item-btn-tr,.buttongroup .item-btn-bl,.buttongroup .item-btn-bc,.buttongroup .item-btn-br,.buttongroup .item-btn-mr{
display:none;
}
.buttongroup .item-btn{
height:30px;
border:none;
}
.buttongroup .item-btn-ml{
background:url(${/request/@context_path}/images/button2.gif)
}
.buttongroup .item-btn-mc{
background:url(${/request/@context_path}/images/button2.gif) right 0;
padding:9px 8px 5px 0;
}
.buttongroup .item-btn-mc button div{
color:#ffffff;
}
.buttongroup .item-btn-over .item-btn-mc{
background:url(${/request/@context_path}/images/button2.gif) right -30px;
}
.buttongroup .item-btn-over .item-btn-ml{
background:url(${/request/@context_path}/images/button2.gif) left -30px;
}
.buttongroup .item-btn-over button div{
color:#000000;
}
.fixed {
position:fixed;
position:fixed;
left:10px;
bottom:10px;
height:100px;
......@@ -98,9 +99,9 @@
function zjwfl_before_approve_procedure(out_type){
var params ={out_object:'out_object',
out_type:'no_win'};
return params;
return params;
}
function zjwfl5110_approveCheck_type(type) {
if (type == 'agree') {
return true;
......@@ -123,31 +124,31 @@
return false;
}
}
(function() {
var checker_list = {};
zjwfl5110_ApproveChecker_add = function(name, fun) {
checker_list[name] = fun;
};
zjwfl5110_ApproveChecker_remove = function(name) {
delete checker_list[name];
};
zjwfl5110_ApproveChecker_check = function(type) {
for (var key in checker_list) {
if (checker_list[key](type) == true) {
} else {
return false;
}
}
return true;
};
})();
function zjwfl5110_approveCheckNew(type) {
if (zjwfl5110_approveCheck_type(type) && zjwfl5110_ApproveChecker_check(type)) {
return true;
......@@ -155,7 +156,7 @@
return false;
}
}
function zjwfl5110_uploadAttach() {
debugger;
var rcpt_record_id = '${/parameter/@record_id}';
......@@ -185,12 +186,12 @@
}
function zjwfl5110_approvePage_close() {
// wflCmp('zj_wfl_approve_win').close();
window.parent.location.reload();
}
function zjwfl5110_approvePage_mask() {
if(parent.$jq("iframe[id='wfl_common_iframe']").length > 0) {
Leaf.Masker.mask(document.documentElement, '正在提交');
......@@ -198,7 +199,7 @@
Leaf.Masker.mask($('zj_wfl_approve_win').wrap);
}
}
function zjwfl5110_approvePage_noMask() {
if(parent.$jq("iframe[id='wfl_common_iframe']").length > 0) {
Leaf.Masker.unmask(document.documentElement);
......@@ -206,8 +207,8 @@
Leaf.Masker.unmask($('zj_wfl_approve_win').wrap);
}
}
function zjwfl5110_actionTypeRenderer(value, record, name) {
var action_type = record.get('action_type');
var action_type_desc = record.get('action_type_desc');
......@@ -221,7 +222,7 @@
return "";
}
}
function zjwfl5110_viewGraphics() {
new Leaf.Window({
id: 'zj_wfl_graphics',
......@@ -234,9 +235,9 @@
fullScreen: true
});
}
//初始化意见框内容
function comment_text_ds_add(ds,record,index) {
// var comment_text = '';
// var position_code = '${/model/instance_one/record/@position_code}';
......@@ -334,7 +335,21 @@
<div style="color:red;"><![CDATA[自定义页面获取失败]]></div>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/node_service_record/record/@service_url}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
<a:switch test="/model/node_info_record/record/@workflow_code">
<a:case value="PROJECT_WFL">
<a:switch test="/model/node_info_record/record/@is_constru_unit">
<a:case value="Y">
<a:screen-include screen="${/model/node_service_record/record/@service_url_constru}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/node_service_record/record/@service_url}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
</a:switch>
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/node_service_record/record/@service_url}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
<a:switch test="/model/node_record/record/@show_approve_history_flag">
......
......@@ -36,7 +36,9 @@
]]></style>
<a:screen-include screen="modules/zjwfl/zj_wfl_common_javascript.lview"/>
<script type="text/javascript"><![CDATA[
document.getElementById('zj_wfl_approve_history_table_id_tb').style.display = 'none';
if(document.getElementById('zj_wfl_approve_history_table_id_tb')){
document.getElementById('zj_wfl_approve_history_table_id_tb').style.display = 'none';
}
function render_action_type_desc(value, record, name) {
return f_zjwfl.getApproveImg(record.get('record_type'), value);
}
......
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