Commit 3ab00003 authored by 18083's avatar 18083

资管费报单一阶段报单

parent 8d654a51
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<bm:query-field field="display_flag" queryExpression="d.display_flag=${@display_flag}"/> <bm:query-field field="display_flag" queryExpression="d.display_flag=${@display_flag}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression=" ((d.column_name not in('BTB_INTEREST','BTB_FEE') and nvl((select h.hd_user_col_v06 from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id}),'N')!='Y') OR nvl((select h.hd_user_col_v06 from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id}),'N')='Y')"></bm:data-filter>
<bm:data-filter name="query" expression="(d.price_list =nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id})) and d.layout_area_seq = &apos;L&apos; and lower(d.column_name)=nvl(${@column_name},lower(d.column_name)) and d.price_list=p.price_list)"/> <bm:data-filter name="query" expression="(d.price_list =nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id})) and d.layout_area_seq = &apos;L&apos; and lower(d.column_name)=nvl(${@column_name},lower(d.column_name)) and d.price_list=p.price_list)"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -22,13 +22,38 @@ ...@@ -22,13 +22,38 @@
t.validation_type, t.validation_type,
t.validation_sql, t.validation_sql,
t.layout_area_seq, t.layout_area_seq,
t.input_mode, (CASE
decode(t.input_mode, 'REQUIRED', 'TRUE', 'FALSE') required_input_mode, WHEN T.COLUMN_CODE = 'H54' AND
nvl((select h.hd_user_col_v06
from hls_fin_calculator_hd h
where h.calc_session_id = ${@calc_session_id}),
'N') = 'Y' then
'READONLY'
else
t.input_mode
end) input_mode,
(CASE
WHEN T.COLUMN_CODE = 'H54' AND
nvl((select h.hd_user_col_v06
from hls_fin_calculator_hd h
where h.calc_session_id = ${@calc_session_id}),
'N') = 'Y' then
'FALSE'
else
decode(t.input_mode, 'REQUIRED', 'TRUE', 'FALSE')
end) required_input_mode,
(case when ${@maintain_type}='READONLY' then (case when ${@maintain_type}='READONLY' then
'TRUE' 'TRUE'
when T.COLUMN_CODE = 'H54' AND
nvl((select h.hd_user_col_v06
from hls_fin_calculator_hd h
where h.calc_session_id = ${@calc_session_id}),
'N') = 'Y' then
'TRUE'
else else
decode(t.input_mode, 'READONLY', 'TRUE', 'FALSE') decode(t.input_mode, 'READONLY', 'TRUE', 'FALSE')
end) readonly_input_mode, end) readonly_input_mode,
nvl(t.allow_format,'FALSE') allow_format, nvl(t.allow_format,'FALSE') allow_format,
nvl(t.allow_decimal,'FALSE') allow_decimal, nvl(t.allow_decimal,'FALSE') allow_decimal,
nvl(t.zero_fill,'FALSE') zero_fill, nvl(t.zero_fill,'FALSE') zero_fill,
...@@ -56,7 +81,8 @@ ...@@ -56,7 +81,8 @@
lower(t.lov_cascade_para2) lov_cascade_para2, lower(t.lov_cascade_para2) lov_cascade_para2,
lower(t.lov_cascade_para3) lov_cascade_para3, lower(t.lov_cascade_para3) lov_cascade_para3,
t.lower_limit, t.lower_limit,
t.upper_limit t.upper_limit,
(select h.source_doc_category from hls_fin_calculator_hd h where h.calc_session_id = ${@calc_session_id} )source_doc_category
from hls_fin_calc_config t,hls_price_list p from hls_fin_calc_config t,hls_price_list p
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t.display_order,t.column_name order by t.display_order,t.column_name
...@@ -64,6 +90,7 @@ ...@@ -64,6 +90,7 @@
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:fields> <bm:fields>
<bm:field name="source_doc_category" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_CODE"/> <bm:field name="column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_CODE"/>
<bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/> <bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/>
<bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/> <bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/>
...@@ -109,5 +136,6 @@ ...@@ -109,5 +136,6 @@
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="(t.layout_area_seq = &apos;H&apos; and t.price_list=p.price_list and t.price_list = nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id})))"/> <bm:data-filter enforceOperations="query" expression="(t.layout_area_seq = &apos;H&apos; and t.price_list=p.price_list and t.price_list = nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id})))"/>
</bm:data-filters> <bm:data-filter enforceOperations="query" expression=" ((t.column_name not in('BTB_INT_RATE') and nvl((select h.hd_user_col_v06 from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id}),'N')!='Y') OR nvl((select h.hd_user_col_v06 from hls_fin_calculator_hd h where h.calc_session_id=${@calc_session_id}),'N')='Y')"></bm:data-filter>
</bm:data-filters>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="true">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select nvl((SELECT 'Y'
from dual
where ${/parameter/@project_id} is null
and exists
(select 1
from asset_management_fee t,
hls_bp_master_agent_division d
where t.bp_id = ${/parameter/@invoice_agent_id}
and d.agent_division_id = t.agent_division_id
and d.division = ${/parameter/@division}
AND t.wfl_status = 'APPROVED')
union
select 'Y'
from dual
where ${/parameter/@project_id} is not null
and exists
(select 1
from asset_management_fee t,
hls_bp_master_agent_division d,
prj_project p
where t.bp_id = p.INVOICE_AGENT_ID
and d.agent_division_id = t.agent_division_id
and d.division = p.division
AND t.wfl_status = 'APPROVED'
and p.project_id = ${/parameter/@project_id})),
'N') asset_fee_flag
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -9,8 +9,12 @@ ...@@ -9,8 +9,12 @@
<bm:operations> <bm:operations>
<bm:operation name="insert"> <bm:operation name="insert">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin declare
prj_quotation_pkg.insert_prj_quotation( v_int_rate_display prj_quotation.int_rate_display%type;
begin
select decode(${@hd_user_col_v06},'Y',${@int_rate_display},null) into
v_int_rate_display from dual;
prj_quotation_pkg.insert_prj_quotation(
p_quotation_id=>${@quotation_id}, p_quotation_id=>${@quotation_id},
p_document_category=>${@document_category}, p_document_category=>${@document_category},
p_document_id=>${@document_id}, p_document_id=>${@document_id},
...@@ -49,7 +53,11 @@ ...@@ -49,7 +53,11 @@
p_ref_d02=>to_date(${@ref_d02},'yyyy-mm-dd hh24:mi:ss'), p_ref_d02=>to_date(${@ref_d02},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d03=>to_date(${@ref_d03},'yyyy-mm-dd hh24:mi:ss'), p_ref_d03=>to_date(${@ref_d03},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d04=>to_date(${@ref_d04},'yyyy-mm-dd hh24:mi:ss'), p_ref_d04=>to_date(${@ref_d04},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d05=>to_date(${@ref_d05},'yyyy-mm-dd hh24:mi:ss')); p_ref_d05=>to_date(${@ref_d05},'yyyy-mm-dd hh24:mi:ss'),
p_int_rate_display=>v_int_rate_display,
p_btb_int_rate=>${@btb_int_rate},
p_hd_user_col_v06=>${@hd_user_col_v06}
);
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
...@@ -59,8 +67,12 @@ ...@@ -59,8 +67,12 @@
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
declare
v_int_rate_display prj_quotation.int_rate_display%type;
begin begin
prj_quotation_pkg.update_prj_quotation( select decode(${@hd_user_col_v06},'Y',${@int_rate_display},null) into
v_int_rate_display from dual;
prj_quotation_pkg.update_prj_quotation(
p_quotation_id=>${@quotation_id}, p_quotation_id=>${@quotation_id},
p_document_category=>${@document_category}, p_document_category=>${@document_category},
p_document_id=>${@document_id}, p_document_id=>${@document_id},
...@@ -99,7 +111,12 @@ ...@@ -99,7 +111,12 @@
p_ref_d02=>to_date(${@ref_d02},'yyyy-mm-dd hh24:mi:ss'), p_ref_d02=>to_date(${@ref_d02},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d03=>to_date(${@ref_d03},'yyyy-mm-dd hh24:mi:ss'), p_ref_d03=>to_date(${@ref_d03},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d04=>to_date(${@ref_d04},'yyyy-mm-dd hh24:mi:ss'), p_ref_d04=>to_date(${@ref_d04},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d05=>to_date(${@ref_d05},'yyyy-mm-dd hh24:mi:ss')); p_ref_d05=>to_date(${@ref_d05},'yyyy-mm-dd hh24:mi:ss'),
p_int_rate_display=>v_int_rate_display,
p_btb_int_rate=>${@btb_int_rate},
p_hd_user_col_v06=>${@hd_user_col_v06}
);
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
......
...@@ -14,10 +14,12 @@ ...@@ -14,10 +14,12 @@
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;,&apos;0019&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/> <a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;,&apos;0019&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.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<s:server-script import="contract_print_path.js"><![CDATA[ <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_asset_fee_flag" rootPath="asset_fee_path" ></a:model-query>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> $ctx.parameter.asset_fee_flag = $ctx.get('/model/asset_fee_path/record/@asset_fee_flag');
]]>
</s:server-script> </s:server-script>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
...@@ -66,13 +68,49 @@ ...@@ -66,13 +68,49 @@
// alert('${/parameter/@division}') // alert('${/parameter/@division}')
//add by zhuxianfei //add by zhuxianfei
Leaf.onReady(function() { Leaf.onReady(function() {
if(division!='30' && division!='50'){ if(division!='30' && division!='50'&& division!='99'){
var gridId= 'PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id'; var gridId= 'PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id';
$(gridId).hideColumn('machine_number_n'); $(gridId).hideColumn('machine_number_n');
} }
//不为租赁二手机业务时隐藏资管费相关字段及费率 18083 2023/1/15
if('${/parameter/@asset_fee_flag}'=='N'){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06_prompt').style.display = 'none';
}
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
//新建页面直接隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}
}); });
function check_empty(value){
if(Ext.isEmpty(value)||typeof(value)=='undefined'||value==''||value==null){
return true;
}else{
return false;
}
}
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url; var url;
...@@ -109,10 +147,10 @@ ...@@ -109,10 +147,10 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入 //首次插入
if (!record.get('calc_session_id')) { 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 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(); var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){ if(division=='30' || division=='50'||division=='99'){
var set_number=current_red.get('set_number'); var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number'); var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){ if(total_number!=0 && set_number!=total_number){
...@@ -121,7 +159,7 @@ ...@@ -121,7 +159,7 @@
return; return;
} }
} }
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD'); record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula; var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y'; calc_recreate_L_formula = 'Y';
...@@ -185,7 +223,7 @@ ...@@ -185,7 +223,7 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); 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 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(); var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){ if(division=='30' || division=='50'||division=='99'){
var set_number=current_red.get('set_number'); var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number'); var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){ if(total_number!=0 && set_number!=total_number){
...@@ -194,10 +232,38 @@ ...@@ -194,10 +232,38 @@
return; return;
} }
} }
var cal_hd_price_list = record.get('cal_hd_price_list'); var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list'); var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) { //追加二手机报价重算条件,选择了适用或者调整了利率组合则需要重算报价
var cal_hd_user_col_v06 = record.get('cal_hd_user_col_v06');
var hd_user_col_v06 = record.get('hd_user_col_v06');
var cal_btb_int_rate = record.get('cal_btb_int_rate');
var btb_int_rate = record.get('btb_int_rate');
var cal_int_rate_display = record.get('cal_int_rate_display');
var int_rate_display = record.get('int_rate_display');
if(check_empty(cal_hd_user_col_v06)){
cal_hd_user_col_v06='N';
}
if(check_empty(hd_user_col_v06)){
hd_user_col_v06='N';
}
if(check_empty(btb_int_rate)){
btb_int_rate=0;
}
if(check_empty(int_rate_display)){
int_rate_display=0;
}
if(check_empty(cal_btb_int_rate)){
cal_btb_int_rate =0;
}
if(check_empty(cal_int_rate_display)){
cal_int_rate_display=0;
}
if ((cal_hd_price_list == price_list&&'${/parameter/@asset_fee_flag}'=='N')
||(cal_hd_price_list == price_list&&'${/parameter/@asset_fee_flag}'=='Y'&&cal_hd_user_col_v06==hd_user_col_v06
&&cal_btb_int_rate==btb_int_rate&&cal_int_rate_display==int_rate_display)) {
//直接进入报价页面 //直接进入报价页面
var win = new Leaf.Window({ var win = new Leaf.Window({
...@@ -252,6 +318,7 @@ ...@@ -252,6 +318,7 @@
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid', id: 'hls_fin_calc_quotation_link_winid',
params: { params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value, document_id: parent_pk_value,
document_category: 'PROJECT', document_category: 'PROJECT',
maintain_type: 'MODIFY', maintain_type: 'MODIFY',
...@@ -464,10 +531,13 @@ ...@@ -464,10 +531,13 @@
return false; return false;
} }
if (record.get('signing_city')){ if (record.get('signing_city')){
var reg = /^([\u2E80-\u9FFF]){4,}$/; // var reg = /^([\u2E80-\u9FFF]){4,}$/;
if (!reg.test(record.get('signing_city'))) { // if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!'); // $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
return false; // return false;
// }
if (record.get('signing_city').indexOf('州') == -1 && record.get('signing_city').indexOf('县') == -1 && record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
} }
} }
} }
...@@ -550,9 +620,9 @@ ...@@ -550,9 +620,9 @@
return check_flag; return check_flag;
}; };
function prj501n_lease_number_renderer(record_id, ds_id){ 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 prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = {}; var param = {};
param['project_status'] = 'NEW'; param['project_status'] = 'NEW';
...@@ -638,7 +708,7 @@ ...@@ -638,7 +708,7 @@
if (prj_project_lease_item_ds_id==ds.id){ if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query(); $(prj_quotation_ds_id).query();
} }
var record = $(ds_id).getCurrentRecord(); 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'); 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).setQueryUrl(url);
...@@ -743,7 +813,7 @@ ...@@ -743,7 +813,7 @@
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', '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(tenant_ds_id == ds.id){
if (Leaf.isEmpty(record.get('send_message'))){ if (Leaf.isEmpty(record.get('send_message'))){
record.set('send_message', 'YES'); record.set('send_message', 'YES');
record.set('send_message_n', '是'); record.set('send_message_n', '是');
...@@ -760,7 +830,32 @@ ...@@ -760,7 +830,32 @@
} }
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation'); 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 (prj_quotation_ds_id == ds.id && prj_quotation_ds_id) {
debugger; //产品线不为二手机业务,将资管费等字段置空
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
record.getField('hd_user_col_v06').setRequired(false);
record.getField('hd_user_col_v06_n').setRequired(false);
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
}else{
if (check_empty(record.get('hd_user_col_v06'))||record.get('hd_user_col_v06')=='N' ) {
record.set('asset_id', null);
record.set('asset_id_n', null);
record.set('btb_int_rate', '');
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
}
}
if (division != '70'&&division!='92' && division != '') { if (division != '70'&&division!='92' && division != '') {
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_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none' document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none'
...@@ -861,11 +956,14 @@ ...@@ -861,11 +956,14 @@
var description = '${/model/description/record/@employee_type_code}'; var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}'; var bp_code='${/model/user_agent_description/record/@bp_code}';
var invoice_agent_id=record.get('invoice_agent_id'); var invoice_agent_id=record.get('invoice_agent_id');
if(!Ext.isEmpty(description) && description == 'AGENT'){
if((division=='80'||division=='30'||division=='50') && invoice_agent_id !== "25321"){ if(!Ext.isEmpty(bp_code)){
if((division=='80'||division=='30'||division=='50'||division=='99') && bp_code !== 'D00010019'){
record.set('credit_line','TENANT'); record.set('credit_line','TENANT');
record.set('credit_line_n','承租人'); record.set('credit_line_n','承租人');
} }
}
}
if(!Ext.isEmpty(description) && description == 'AGENT'){ if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){ if(!Ext.isEmpty(bp_code)){
if(bp_code !== 'D00000029' && bp_code !== 'D00000031' && bp_code !== 'D00000026' && bp_code !== 'D00000030'){ if(bp_code !== 'D00000029' && bp_code !== 'D00000031' && bp_code !== 'D00000026' && bp_code !== 'D00000030'){
...@@ -876,7 +974,7 @@ ...@@ -876,7 +974,7 @@
record.getField('credit_line_n').setRequired(false); record.getField('credit_line_n').setRequired(false);
record.getField('credit_line').setReadOnly(true); record.getField('credit_line').setReadOnly(true);
record.getField('credit_line_n').setReadOnly(true); record.getField('credit_line_n').setReadOnly(true);
}else { }else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none'; document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none'; document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
...@@ -915,10 +1013,47 @@ ...@@ -915,10 +1013,47 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); 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_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var quo_rate_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_RATE_N', '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 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 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'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
if (prj_quotation_ds_id == ds.id) {
if (name == 'hd_user_col_v06') {
if('${/parameter/@asset_fee_flag}'=='Y'){
if (value== 'N'||Ext.isEmpty(value)||value==''||typeof(value) == 'undefined' ) {
record.set('asset_id', null);
record.set('asset_id_n', null);
record.set('btb_int_rate', '');
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
} else {
record.getField('asset_id').setRequired(true);
record.getField('asset_id_n').setRequired(true);
//展示组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}
if(tenant_ds_id == ds.id&&tenant_ds_id){ if(tenant_ds_id == ds.id&&tenant_ds_id){
...@@ -934,7 +1069,7 @@ ...@@ -934,7 +1069,7 @@
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_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 (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='30'||division=='50'||division=='80'){ if(division=='30'||division=='50'||division=='80'||division=='99'){
record.getField('set_number').setRequired(true); record.getField('set_number').setRequired(true);
}else{ }else{
record.getField('set_number').setReadOnly(true); record.getField('set_number').setReadOnly(true);
...@@ -1179,9 +1314,12 @@ ...@@ -1179,9 +1314,12 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) { 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 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'); 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 cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id'; var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){ if(division!='30' && division!='50'&& division!='99'){
$(gridId).hideColumn('machine_number_n'); $(gridId).hideColumn('machine_number_n');
} }
if(division=='70'|| division=='92'){ if(division=='70'|| division=='92'){
...@@ -1212,6 +1350,31 @@ ...@@ -1212,6 +1350,31 @@
record.getField('bp_id_n').setReadOnly(true); record.getField('bp_id_n').setReadOnly(true);
} }
} }
//现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id &&cashflow_ds_id){
var hd_user_col_v06 = $(cashflow_ds_id).getAt(0).get('hd_user_col_v06');
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if (check_empty(hd_user_col_v06)||hd_user_col_v06=='N' ) {
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}; };
...@@ -1385,10 +1548,10 @@ ...@@ -1385,10 +1548,10 @@
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { 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 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'); 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'){ if(division=='30'||division=='50'||division=='99'){
var record=$(lease_ds_id).getCurrentRecord(); var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord(); var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number'); var set_number=records.get('set_number');
...@@ -1396,7 +1559,7 @@ ...@@ -1396,7 +1559,7 @@
var total_price=records.get('total_price'); var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount'); var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value'); var residual_value=record.get('residual_value');
var q_value=records.get('q_value'); var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){ if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!'); Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
...@@ -1409,8 +1572,8 @@ ...@@ -1409,8 +1572,8 @@
return; return;
} }
} }
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj_approval_link_id').getUrl(),
...@@ -1447,7 +1610,7 @@ ...@@ -1447,7 +1610,7 @@
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { 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 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'); 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'){ if(division=='30'||division=='50'||division=='99'){
var record=$(lease_ds_id).getCurrentRecord(); var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord(); var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number'); var set_number=records.get('set_number');
......
...@@ -17,10 +17,13 @@ ...@@ -17,10 +17,13 @@
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_residual_value" rootPath="residual_value"/> <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_residual_value" rootPath="residual_value"/>
<!-- <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_residual_value_from" rootPath="prj_residual_value"/>--> <!-- <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_residual_value_from" rootPath="prj_residual_value"/>-->
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_asset_fee_flag" rootPath="asset_fee_path" ></a:model-query>
<s:server-script import="contract_print_path.js"><![CDATA[ <s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
$ctx.parameter.asset_fee_flag = $ctx.get('/model/asset_fee_path/record/@asset_fee_flag');
]]> ]]>
</s:server-script> </s:server-script>
</a:init-procedure> </a:init-procedure>
...@@ -125,6 +128,15 @@ ...@@ -125,6 +128,15 @@
}); });
}; };
function check_empty(value){
if(Ext.isEmpty(value)||typeof(value)=='undefined'||value==''||value==null){
return true;
}else{
return false;
}
}
//add by zhuxianfei //add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
...@@ -169,10 +181,10 @@ ...@@ -169,10 +181,10 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入 //首次插入
if (!record.get('calc_session_id')) { 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 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(); var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){ if(division=='30' || division=='50'|| division=='99'){
var set_number=current_red.get('set_number'); var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number'); var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){ if(total_number!=0 && set_number!=total_number){
...@@ -181,7 +193,7 @@ ...@@ -181,7 +193,7 @@
return; return;
} }
} }
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD'); record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula; var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y'; calc_recreate_L_formula = 'Y';
...@@ -248,7 +260,7 @@ ...@@ -248,7 +260,7 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); 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 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(); var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){ if(division=='30' || division=='50'|| division=='99'){
var set_number=current_red.get('set_number'); var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number'); var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){ if(total_number!=0 && set_number!=total_number){
...@@ -257,10 +269,39 @@ ...@@ -257,10 +269,39 @@
return; return;
} }
} }
var cal_hd_price_list = record.get('cal_hd_price_list'); var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list'); var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) { //追加二手机报价重算条件,选择了适用或者调整了利率组合则需要重算报价
var cal_hd_user_col_v06 = record.get('cal_hd_user_col_v06');
var hd_user_col_v06 = record.get('hd_user_col_v06');
var cal_btb_int_rate = record.get('cal_btb_int_rate');
var btb_int_rate = record.get('btb_int_rate');
var cal_int_rate_display = record.get('cal_int_rate_display');
var int_rate_display = record.get('int_rate_display');
if(check_empty(cal_hd_user_col_v06)){
cal_hd_user_col_v06='N';
}
if(check_empty(hd_user_col_v06)){
hd_user_col_v06='N';
}
if(check_empty(btb_int_rate)){
btb_int_rate=0;
}
if(check_empty(int_rate_display)){
int_rate_display=0;
}
if(check_empty(cal_btb_int_rate)){
cal_btb_int_rate =0;
}
if(check_empty(cal_int_rate_display)){
cal_int_rate_display=0;
}
if ((cal_hd_price_list == price_list&&'${/parameter/@asset_fee_flag}'=='N')
||(cal_hd_price_list == price_list&&'${/parameter/@asset_fee_flag}'=='Y'&&cal_hd_user_col_v06==hd_user_col_v06
&&cal_btb_int_rate==btb_int_rate&&cal_int_rate_display==int_rate_display)) {
//直接进入报价页面 //直接进入报价页面
var win = new Leaf.Window({ var win = new Leaf.Window({
...@@ -586,7 +627,7 @@ ...@@ -586,7 +627,7 @@
$(prj_quotation_ds_id).query(); $(prj_quotation_ds_id).query();
$(score_ds_id).query(); $(score_ds_id).query();
} }
if (prj_project_lease_item_ds_id==ds.id){ if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query(); $(prj_quotation_ds_id).query();
} }
...@@ -666,6 +707,41 @@ ...@@ -666,6 +707,41 @@
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation'); 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'); var 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'], 'F_BASIC_INFO_1', 'prj_project'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
if (prj_quotation_ds_id == ds.id) {
if (name == 'hd_user_col_v06') {
if('${/parameter/@asset_fee_flag}'=='Y'){
if (value== 'N'||Ext.isEmpty(value)||value==''||typeof(value) == 'undefined'||value==null) {
record.set('asset_id', null);
record.set('asset_id_n', null);
record.set('btb_int_rate', '');
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
} else {
record.getField('asset_id').setRequired(true);
record.getField('asset_id_n').setRequired(true);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}
if(tenant_ds_id == ds.id&&tenant_ds_id){ if(tenant_ds_id == ds.id&&tenant_ds_id){
...@@ -682,6 +758,7 @@ ...@@ -682,6 +758,7 @@
if (lease_item_ds_id == ds.id && lease_item_ds_id) { if (lease_item_ds_id == ds.id && lease_item_ds_id) {
debugger;
if(division=='70'||division=='92'){ if(division=='70'||division=='92'){
record.getField('lease_name_n').setRequired(true); record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true); record.getField('brand_value').setRequired(true);
...@@ -957,17 +1034,19 @@ ...@@ -957,17 +1034,19 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) { 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 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'); var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
//控制资管费现金流隐藏
var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
/* var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_HISTORY_INFO_1', 'prj_project_bp'); /* var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_HISTORY_INFO_1', 'prj_project_bp');
$(bp_ds_ids).setQueryParameter('bp_id','${/parameter/@bp_id_tenant}'); $(bp_ds_ids).setQueryParameter('bp_id','${/parameter/@bp_id_tenant}');
$(bp_ds_ids).query();*/ $(bp_ds_ids).query();*/
debugger;
if(lease_item_ds_id == ds.id &&lease_item_ds_id){ if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id'; var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){ if(division!='30' && division!='50'&& division!='99'){
$(gridId).hideColumn('machine_number_n'); $(gridId).hideColumn('machine_number_n');
} }
if((division=='70'||division=='92')&&division!=''){ if((division=='70'||division=='92')&&division!=''){
//debugger;
if(record!=''){ if(record!=''){
record.getField('lease_name_n').setRequired(true); record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true); record.getField('brand_value').setRequired(true);
...@@ -1003,7 +1082,7 @@ ...@@ -1003,7 +1082,7 @@
$(gridId).hideColumn('created_by_n'); $(gridId).hideColumn('created_by_n');
} }
if (lease_item_ds_id == ds.id && lease_item_ds_id) { if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='30'||division=='50'||division=='80'){ if(division=='30'||division=='50'||division=='80'|| division=='99'){
record.getField('set_number').setRequired(true); record.getField('set_number').setRequired(true);
}else{ }else{
record.getField('set_number').setReadOnly(true); record.getField('set_number').setReadOnly(true);
...@@ -1023,6 +1102,32 @@ ...@@ -1023,6 +1102,32 @@
record.getField('bp_id_n').setReadOnly(true); record.getField('bp_id_n').setReadOnly(true);
} }
} }
//现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id &&cashflow_ds_id){
var hd_user_col_v06 = $(cashflow_ds_id).getAt(0).get('hd_user_col_v06');
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if (check_empty(hd_user_col_v06)||hd_user_col_v06=='N' ) {
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}; };
...@@ -1153,12 +1258,16 @@ ...@@ -1153,12 +1258,16 @@
var description = '${/model/description/record/@employee_type_code}'; var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}'; var bp_code='${/model/user_agent_description/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord(); var credit_record = $(ds_id).getCurrentRecord();
var invoice_agent_id=record.get('invoice_agent_id'); var invoice_agent_id=record.get('invoice_agent_id');
if((division=='80'||division=='30'||division=='50') && invoice_agent_id !== 25321){ if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){
if((division=='80'||division=='30'||division=='50'|| division=='99') && bp_code !== 'D00010019'){
credit_record.set('credit_line','TENANT'); credit_record.set('credit_line','TENANT');
credit_record.set('credit_line_n','承租人'); credit_record.set('credit_line_n','承租人');
} }
}
}
if(!Ext.isEmpty(description) && description == 'AGENT'){ if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){ if(!Ext.isEmpty(bp_code)){
if(bp_code !== 'D00000026' && bp_code !== 'D00000029' && bp_code !== 'D00000030' && bp_code !== 'D00000031'){ if(bp_code !== 'D00000026' && bp_code !== 'D00000029' && bp_code !== 'D00000030' && bp_code !== 'D00000031'){
...@@ -1169,7 +1278,7 @@ ...@@ -1169,7 +1278,7 @@
credit_record.getField('credit_line_n').setReadOnly(true); credit_record.getField('credit_line_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false); credit_record.getField('credit_line').setRequired(false);
credit_record.getField('credit_line_n').setRequired(false); credit_record.getField('credit_line_n').setRequired(false);
}else { }else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none'; document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
...@@ -1191,6 +1300,40 @@ ...@@ -1191,6 +1300,40 @@
} }
} }
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){ if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){
//产品线维护了组合利率的调整加载事件显示
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
record.getField('hd_user_col_v06').setRequired(false);
record.getField('hd_user_col_v06_n').setRequired(false);
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
}else{
if (check_empty(record.get('hd_user_col_v06'))||record.get('hd_user_col_v06')=='N' ) {
record.set('asset_id', null);
record.set('asset_id_n', null);
record.set('btb_int_rate', '');
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
}else{
record.getField('asset_id').setRequired(true);
record.getField('asset_id_n').setRequired(true);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
}
}
if(division!='70'&&division!='92'&&division!=''){ if(division!='70'&&division!='92'&&division!=''){
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_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none' document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN').style.display = 'none'
...@@ -1309,6 +1452,23 @@ ...@@ -1309,6 +1452,23 @@
var billing_url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_bp/query?project_id=${/parameter/@project_id}'; 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).setQueryUrl(billing_url);
$(billing_ds_id).query(); $(billing_ds_id).query();
//不为租赁二手机业务时隐藏资管费相关字段及费率 18083 2023/1/15
if('${/parameter/@asset_fee_flag}'=='N'){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06_prompt').style.display = 'none';
}
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}
}); });
...@@ -1623,7 +1783,7 @@ ...@@ -1623,7 +1783,7 @@
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { 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 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'); 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'){ if(division=='30'||division=='50'|| division=='99'){
var record=$(lease_ds_id).getCurrentRecord(); var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord(); var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number'); var set_number=records.get('set_number');
...@@ -1631,7 +1791,7 @@ ...@@ -1631,7 +1791,7 @@
var total_price=records.get('total_price'); var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount'); var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value'); var residual_value=record.get('residual_value');
var q_value=records.get('q_value'); var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){ if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!'); Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
...@@ -1683,7 +1843,7 @@ ...@@ -1683,7 +1843,7 @@
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation'); 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'); 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'){ if(division=='30'||division=='50'|| division=='99'){
var record=$(lease_ds_id).getCurrentRecord(); var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord(); var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number'); var set_number=records.get('set_number');
...@@ -1692,7 +1852,7 @@ ...@@ -1692,7 +1852,7 @@
var lease_item_amount=record.get('lease_item_amount'); var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value'); var residual_value=record.get('residual_value');
var q_value=records.get('q_value'); var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){ if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!'); Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return; return;
...@@ -1828,11 +1988,14 @@ ...@@ -1828,11 +1988,14 @@
return false; return false;
} }
if (record.get('signing_city')){ if (record.get('signing_city')){
// var reg = /^([\u2E80-\u9FFF]){4,}$/;
var reg = /^(.){4,}$/; // var reg = /^(.){4,}$/;
if (!reg.test(record.get('signing_city'))) { // if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!'); // $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
return false; // return false;
// }
if (record.get('signing_city').indexOf('州') == -1 && record.get('signing_city').indexOf('县') == -1 && record.get('signing_city').indexOf('区') == -1) {
Leaf.showConfirm('${HLS.PROMPT}', '合同签订地所填写内容,未细化到区/县/州级别,是否确认?', function () {});
} }
} }
} }
...@@ -1904,7 +2067,7 @@ ...@@ -1904,7 +2067,7 @@
sync: true sync: true
}); });
} }
if (machine_number_num>0 && count == 0){ if (machine_number_num>0 && count == 0){
......
...@@ -12,10 +12,12 @@ ...@@ -12,10 +12,12 @@
rootPath="user_name_path"/> 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="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"/> <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[ <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_asset_fee_flag" rootPath="asset_fee_path" ></a:model-query>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> $ctx.parameter.asset_fee_flag = $ctx.get('/model/asset_fee_path/record/@asset_fee_flag');
]]>
</s:server-script> </s:server-script>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
...@@ -114,6 +116,15 @@ ...@@ -114,6 +116,15 @@
}); });
}; };
function check_empty(value){
if(Ext.isEmpty(value)||typeof(value)=='undefined'||value==''||value==null){
return true;
}else{
return false;
}
}
//add by zhuxianfei //add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
...@@ -218,7 +229,35 @@ ...@@ -218,7 +229,35 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var cal_hd_price_list = record.get('cal_hd_price_list'); var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list'); var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) { //追加二手机报价重算条件,选择了适用或者调整了利率组合则需要重算报价
var cal_hd_user_col_v06 = record.get('cal_hd_user_col_v06');
var hd_user_col_v06 = record.get('hd_user_col_v06');
var cal_btb_int_rate = record.get('cal_btb_int_rate');
var btb_int_rate = record.get('btb_int_rate');
var cal_int_rate_display = record.get('cal_int_rate_display');
var int_rate_display = record.get('int_rate_display');
if(check_empty(cal_hd_user_col_v06)){
cal_hd_user_col_v06='N';
}
if(check_empty(hd_user_col_v06)){
hd_user_col_v06='N';
}
if(check_empty(btb_int_rate)){
btb_int_rate=0;
}
if(check_empty(int_rate_display)){
int_rate_display=0;
}
if(check_empty(cal_btb_int_rate)){
cal_btb_int_rate =0;
}
if(check_empty(cal_int_rate_display)){
cal_int_rate_display=0;
}
if ((cal_hd_price_list == price_list&&'${/parameter/@asset_fee_flag}'=='N')
||(cal_hd_price_list == price_list&&'${/parameter/@asset_fee_flag}'=='Y'&&cal_hd_user_col_v06==hd_user_col_v06
&&cal_btb_int_rate==btb_int_rate&&cal_int_rate_display==int_rate_display)) {
//直接进入报价页面 //直接进入报价页面
var win = new Leaf.Window({ var win = new Leaf.Window({
...@@ -629,22 +668,22 @@ ...@@ -629,22 +668,22 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) { 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 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'); 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 cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id'; var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){ if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n'); $(gridId).hideColumn('machine_number_n');
} }
debugger;
if((division=='70'||division=='92')&&division!=''){ if((division=='70'||division=='92')&&division!=''){
debugger;
if(record!=''){ if(record!=''){
record.getField('lease_name_n').setRequired(true); record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true); record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false); record.getField('produce_date').setReadOnly(false);
record.getField('produce_date').setRequired(true); record.getField('produce_date').setRequired(true);
record.getField('using_hour').setRequired(true); record.getField('using_hour').setRequired(true);
record.getField('modelcd').setReadOnly(true); record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(false); record.getField('modelcd').setRequired(true);
record.getField('ownership_flag_n').setRequired(true); record.getField('ownership_flag_n').setRequired(true);
record.getField('residual_value_amount').setRequired(true); record.getField('residual_value_amount').setRequired(true);
record.getField('full_name').setRequired(false); record.getField('full_name').setRequired(false);
...@@ -695,6 +734,31 @@ ...@@ -695,6 +734,31 @@
record.getField('bp_id_n').setReadOnly(true); record.getField('bp_id_n').setReadOnly(true);
} }
} }
//现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id &&cashflow_ds_id){
var hd_user_col_v06 = $(cashflow_ds_id).getAt(0).get('hd_user_col_v06');
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if (check_empty(hd_user_col_v06)||hd_user_col_v06=='N' ) {
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}; };
...@@ -767,6 +831,24 @@ ...@@ -767,6 +831,24 @@
var billing_url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_bp/query?project_id=${/parameter/@project_id}'; 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).setQueryUrl(billing_url);
$(billing_ds_id).query(); $(billing_ds_id).query();
//不为租赁二手机业务时隐藏资管费相关字段及费率 18083 2023/1/15
if('${/parameter/@asset_fee_flag}'=='N'){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06_prompt').style.display = 'none';
}
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}
}) })
//序号自增 add by lijingjing //序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
...@@ -992,6 +1074,12 @@ ...@@ -992,6 +1074,12 @@
record.getField('bank_account_id_n').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显示分公司,其他隐藏 //深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}'; var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') { if (!Ext.isEmpty(bp_code) && bp_code !== 'D00010001' && bp_code !== 'D00000009') {
...@@ -1011,7 +1099,7 @@ ...@@ -1011,7 +1099,7 @@
var credit_record = $(ds_id).getCurrentRecord(); var credit_record = $(ds_id).getCurrentRecord();
if(!Ext.isEmpty(create_bp_code)){ if(!Ext.isEmpty(create_bp_code)){
debugger; debugger;
if(create_bp_code == 'C00010180' || create_bp_code == 'C00010175' || create_bp_code == 'C00010176' || create_bp_code == 'C00010187'){ 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'){ if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
credit_record.getField('credit_line').setReadOnly(false); credit_record.getField('credit_line').setReadOnly(false);
credit_record.getField('credit_line_n').setReadOnly(false); credit_record.getField('credit_line_n').setReadOnly(false);
...@@ -1023,7 +1111,7 @@ ...@@ -1023,7 +1111,7 @@
document.getElementById('${/parameter/@layout_code}_save').style.display = "none"; document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
} }
} }
}else if(create_bp_code =='D00010001') { }else if(create_bp_code =='X00010005' || create_bp_code =='J00010006') {
credit_record.getField('credit_line').setReadOnly(true); credit_record.getField('credit_line').setReadOnly(true);
credit_record.getField('credit_line_n').setReadOnly(true); credit_record.getField('credit_line_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false); credit_record.getField('credit_line').setRequired(false);
...@@ -1050,6 +1138,43 @@ ...@@ -1050,6 +1138,43 @@
} }
} }
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){ if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){
//产品线维护了组合利率的调整加载事件显示
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
record.getField('hd_user_col_v06').setRequired(false);
record.getField('hd_user_col_v06_n').setRequired(false);
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
}else{
if (check_empty(record.get('hd_user_col_v06'))||record.get('hd_user_col_v06')=='N' ) {
record.set('asset_id', null);
record.set('asset_id_n', null);
record.set('btb_int_rate', '');
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
}else{
record.getField('asset_id').setRequired(true);
record.getField('asset_id_n').setRequired(true);
//显示组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
}
}
if(division!='70'&&division!='92'&&division!=''){ if(division!='70'&&division!='92'&&division!=''){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN')){ 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_prompt').style.display = 'none';
...@@ -1189,6 +1314,7 @@ ...@@ -1189,6 +1314,7 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
var prj_quotation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
if(tenant_ds_id == ds.id&&tenant_ds_id){ if(tenant_ds_id == ds.id&&tenant_ds_id){
...@@ -1201,6 +1327,42 @@ ...@@ -1201,6 +1327,42 @@
} }
} }
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
if (prj_quotation_ds_id == ds.id) {
if (name == 'hd_user_col_v06') {
if('${/parameter/@asset_fee_flag}'=='Y'){
if (value== 'N'||Ext.isEmpty(value)||value==''||typeof(value) == 'undefined'||value==null) {
record.set('asset_id', null);
record.set('asset_id_n', null);
record.set('btb_int_rate', '');
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
} else {
//显示组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}
//选择承租人带出开票信息 //选择承租人带出开票信息
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
...@@ -1211,7 +1373,6 @@ ...@@ -1211,7 +1373,6 @@
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_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 (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'||division=='92'){ if(division=='70'||division=='92'){
debugger;
record.getField('lease_name_n').setRequired(true); record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true); record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false); record.getField('produce_date').setReadOnly(false);
...@@ -1479,6 +1640,11 @@ ...@@ -1479,6 +1640,11 @@
} }
} }
} }
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 () { window['${/parameter/@layout_code}_ACY_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
......
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