Commit 3ab00003 authored by 18083's avatar 18083

资管费报单一阶段报单

parent 8d654a51
......@@ -79,6 +79,7 @@
<bm:query-field field="display_flag" queryExpression="d.display_flag=${@display_flag}"/>
</bm:query-fields>
<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-filters>
</bm:model>
......@@ -22,13 +22,38 @@
t.validation_type,
t.validation_sql,
t.layout_area_seq,
t.input_mode,
decode(t.input_mode, 'REQUIRED', 'TRUE', 'FALSE') required_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
'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
'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
decode(t.input_mode, 'READONLY', 'TRUE', 'FALSE')
end) readonly_input_mode,
nvl(t.allow_format,'FALSE') allow_format,
nvl(t.allow_decimal,'FALSE') allow_decimal,
nvl(t.zero_fill,'FALSE') zero_fill,
......@@ -56,7 +81,8 @@
lower(t.lov_cascade_para2) lov_cascade_para2,
lower(t.lov_cascade_para3) lov_cascade_para3,
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
#WHERE_CLAUSE#
order by t.display_order,t.column_name
......@@ -64,6 +90,7 @@
</bm:operation>
</bm:operations>
<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_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME"/>
<bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/>
......@@ -109,5 +136,6 @@
</bm:query-fields>
<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.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>
<?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,7 +9,11 @@
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
declare
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_document_category=>${@document_category},
......@@ -49,7 +53,11 @@
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_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;
]]></bm:update-sql>
<bm:parameters>
......@@ -59,7 +67,11 @@
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
declare
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.update_prj_quotation(
p_quotation_id=>${@quotation_id},
p_document_category=>${@document_category},
......@@ -99,7 +111,12 @@
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_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;
]]></bm:update-sql>
<bm:parameters>
......
......@@ -14,9 +14,11 @@
<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.prj_project_get_description" rootPath="description"/>
<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.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>
</a:init-procedure>
......@@ -66,12 +68,48 @@
// alert('${/parameter/@division}')
//add by zhuxianfei
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';
$(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 () {
......@@ -112,7 +150,7 @@
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'){
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){
......@@ -185,7 +223,7 @@
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'){
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){
......@@ -197,7 +235,35 @@
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 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({
......@@ -252,6 +318,7 @@
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',
......@@ -464,10 +531,13 @@
return false;
}
if (record.get('signing_city')){
var reg = /^([\u2E80-\u9FFF]){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
return false;
// var reg = /^([\u2E80-\u9FFF]){4,}$/;
// if (!reg.test(record.get('signing_city'))) {
// $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
// 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 () {});
}
}
}
......@@ -760,7 +830,32 @@
}
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) {
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 != '') {
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'
......@@ -861,10 +956,13 @@
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
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'){
record.set('credit_line','TENANT');
record.set('credit_line_n','承租人');
}
}
}
if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){
......@@ -915,10 +1013,47 @@
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 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 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 (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){
......@@ -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');
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);
}else{
record.getField('set_number').setReadOnly(true);
......@@ -1179,9 +1314,12 @@
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');
//控制资管费现金流隐藏
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';
if(division!='30' && division!='50'){
if(division!='30' && division!='50'&& division!='99'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'|| division=='92'){
......@@ -1212,6 +1350,31 @@
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');
}
}
}
}
};
......@@ -1388,7 +1551,7 @@
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'){
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');
......@@ -1447,7 +1610,7 @@
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'){
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');
......
......@@ -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_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_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.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>
</a:init-procedure>
......@@ -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
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
......@@ -172,7 +184,7 @@
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'){
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){
......@@ -248,7 +260,7 @@
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'){
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){
......@@ -260,7 +272,36 @@
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 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({
......@@ -666,6 +707,41 @@
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 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){
......@@ -682,6 +758,7 @@
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
debugger;
if(division=='70'||division=='92'){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
......@@ -957,17 +1034,19 @@
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');
//控制资管费现金流隐藏
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');
$(bp_ds_ids).setQueryParameter('bp_id','${/parameter/@bp_id_tenant}');
$(bp_ds_ids).query();*/
debugger;
if(lease_item_ds_id == ds.id &&lease_item_ds_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');
}
if((division=='70'||division=='92')&&division!=''){
//debugger;
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
......@@ -1003,7 +1082,7 @@
$(gridId).hideColumn('created_by_n');
}
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);
}else{
record.getField('set_number').setReadOnly(true);
......@@ -1022,8 +1101,34 @@
record.getField('bp_category_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');
}
}
}
}
};
function arrToObject(arr) {
......@@ -1155,9 +1260,13 @@
var credit_record = $(ds_id).getCurrentRecord();
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_n','承租人');
}
}
}
if(!Ext.isEmpty(description) && description == 'AGENT'){
if(!Ext.isEmpty(bp_code)){
......@@ -1191,6 +1300,40 @@
}
}
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!=''){
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'
......@@ -1309,6 +1452,23 @@
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();
//不为租赁二手机业务时隐藏资管费相关字段及费率 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 @@
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'){
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');
......@@ -1683,7 +1843,7 @@
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'){
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');
......@@ -1828,11 +1988,14 @@
return false;
}
if (record.get('signing_city')){
var reg = /^(.){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
return false;
// var reg = /^([\u2E80-\u9FFF]){4,}$/;
// var reg = /^(.){4,}$/;
// if (!reg.test(record.get('signing_city'))) {
// $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
// 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 () {});
}
}
}
......
......@@ -12,9 +12,11 @@
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"/>
<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.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>
</a:init-procedure>
......@@ -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
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
......@@ -218,7 +229,35 @@
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 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({
......@@ -629,22 +668,22 @@
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');
//控制资管费现金流隐藏
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';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
debugger;
if((division=='70'||division=='92')&&division!=''){
debugger;
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(true);
record.getField('modelcd').setRequired(false);
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);
......@@ -695,6 +734,31 @@
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 @@
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();
//不为租赁二手机业务时隐藏资管费相关字段及费率 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
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
......@@ -992,6 +1074,12 @@
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') {
......@@ -1011,7 +1099,7 @@
var credit_record = $(ds_id).getCurrentRecord();
if(!Ext.isEmpty(create_bp_code)){
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'){
credit_record.getField('credit_line').setReadOnly(false);
credit_record.getField('credit_line_n').setReadOnly(false);
......@@ -1023,7 +1111,7 @@
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_n').setReadOnly(true);
credit_record.getField('credit_line').setRequired(false);
......@@ -1050,6 +1138,43 @@
}
}
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(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';
......@@ -1189,6 +1314,7 @@
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 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){
......@@ -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');
......@@ -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');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'||division=='92'){
debugger;
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false);
......@@ -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 () {
......
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