Commit b5db9ded authored by 陆正友's avatar 陆正友

新业务-厂商担保

parent 0b53f655
......@@ -18,20 +18,18 @@
<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>
$ctx.parameter.asset_fee_flag = $ctx.get('/model/asset_fee_path/record/@asset_fee_flag');
]]></s:server-script>
</a:init-procedure>
<a:view>
<a:link id="prj501N_prj_lease_item_maintain_link" model="prj.PRJ500N.prj_project_lease_item_delete" modelaction="execute"/>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
<a:link id="${/parameter/@pre_layout}get_special_fields_link_id"
model="cont.CON500.con_contract_get_special_fields" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
......@@ -128,7 +126,7 @@
});
};
function check_empty(value){
function check_empty(value){
if(Ext.isEmpty(value)||typeof(value)=='undefined'||value==''||value==null){
return true;
}else{
......@@ -137,10 +135,8 @@
}
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
......@@ -181,7 +177,7 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入
if (!record.get('calc_session_id')) {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'|| division=='99'){
......@@ -193,7 +189,7 @@
return;
}
}
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
......@@ -269,10 +265,11 @@
return;
}
}
var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('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');
......@@ -291,18 +288,16 @@
if(check_empty(int_rate_display)){
int_rate_display=0;
}
if(check_empty(cal_btb_int_rate)){
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({
id: 'hls_fin_calc_quotation_update_link_winid',
......@@ -722,27 +717,25 @@
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');
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');
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(name == 'send_message_n'){
......@@ -758,7 +751,6 @@
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);
......@@ -932,23 +924,83 @@
}
//add by niminmin
//当“二次租赁”字段选择‘是’时,“回购合同编号”字段为必填。当选择‘否’时,“回购合同编号”字段为只读。
if (name == 'secondary_lease') {
if (value == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (value == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
if(record.get('division') !='91') {
if (name == 'secondary_lease') {
if (value == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (value == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}else {
//当“旧机二次租赁”、“新机二次租赁”中任意一个为“是”,则系统提示只能任选其一(两个都选择是,则提示)
//当“旧机二次租赁”、 “新机二次租赁”中任意一个为“是”,则校验结清合同号必填
if (name == 'secondary_lease_new'){
if (value == 'YES') {
if (record.get('secondary_lease') == 'YES') {
record.set('secondary_lease_new','NO');
record.set('secondary_lease_new_n','否');
Leaf.showMessage('${l:HLS.PROMPT}', '旧机二次租赁、新机二次租赁只能任选其一!');
return false;
}
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
}else if (value == 'NO') {
if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
if (name == 'secondary_lease'){
if (value == 'YES') {
if (record.get('secondary_lease_new') == 'YES') {
record.set('secondary_lease','NO');
record.set('secondary_lease_n','否');
Leaf.showMessage('${l:HLS.PROMPT}', '旧机二次租赁、新机二次租赁只能任选其一!');
return false;
}
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
}else if (value == 'NO') {
if (record.get('secondary_lease_new') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
}
//新增 “限制金额”字段;
......@@ -1046,7 +1098,6 @@
$(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);
......@@ -1082,7 +1133,7 @@
$(gridId).hideColumn('created_by_n');
}
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='30'||division=='50'||division=='80'|| division=='99'){
if(division=='30'||division=='50'||division=='80'||division=='99'){
record.getField('set_number').setRequired(true);
}else{
record.getField('set_number').setReadOnly(true);
......@@ -1102,9 +1153,9 @@
record.getField('bp_id_n').setReadOnly(true);
}
}
//现金流列表加载时隐藏资管费 18083
//现金流列表加载时隐藏资管费 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');
//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');
......@@ -1112,23 +1163,35 @@
}
}else{
if (check_empty(hd_user_col_v06)||hd_user_col_v06=='N' ) {
if(Ext.isEmpty($(cashflow_ds_id).getAt(0))){
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 (Ext.isEmpty($(cashflow_ds_id).getAt(0).get('hd_user_col_v06'))) {
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($(cashflow_ds_id).getAt(0).get('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) {
......@@ -1142,11 +1205,9 @@
}
var division='';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, 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');
if(tenant_ds_id == ds.id){
//debugger;
if (Leaf.isEmpty(record.get('send_message'))){
record.set('send_message', 'YES');
record.set('send_message_n', '是');
......@@ -1183,31 +1244,73 @@
document.getElementById('${/parameter/@layout_code}_F_PAY_INFO_PRJ_PROJECT_DEDUCTION_LIMIT').style.display = 'none';
record.getField('deduction_limit').setRequired(false);
}
if ('${/parameter/@function_usage}' != 'QUERY') {
if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
if('${/parameter/@function_usage}'!='QUERY') {
if(division!='91') {
if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
//“新机二次租赁”字段仅展示在神钢产品线的页面中,其余产品线不展示
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'none';
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'block';
// 神钢建机时,当“旧机二次租赁”、 “新机二次租赁”中任意一个为“是”,则校验结清合同号必填
if (record.get('secondary_lease') == 'YES' || record.get('secondary_lease_new') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO' && record.get('secondary_lease_new') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
} else {
if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
} else if (record.get('secondary_lease') == 'NO') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
if(division!='91') {
if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
} else if (record.get('secondary_lease') == 'NO') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
//“新机二次租赁”字段仅展示在神钢产品线的页面中,其余产品线不展示
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'none';
}else {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'block';
// 神钢建机时,当“旧机二次租赁”、 “新机二次租赁”中任意一个为“是”,则校验结清合同号必填
if (record.get('secondary_lease') == 'YES' || record.get('secondary_lease_new') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
} else if (record.get('secondary_lease') == 'NO' && record.get('secondary_lease_new') == 'NO') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
//业务类型回租时,默认只读“首付款抵扣”选项
......@@ -1254,20 +1357,19 @@
record.getField('branch_code_n').setRequired(false);
}
//获取员工类型
debugger;
var description = '${/model/description/record/@employee_type_code}';
var bp_code='${/model/user_agent_description/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord();
var invoice_agent_id=record.get('invoice_agent_id');
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)){
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)){
if(bp_code !== 'D00000026' && bp_code !== 'D00000029' && bp_code !== 'D00000030' && bp_code !== 'D00000031'){
......@@ -1300,7 +1402,7 @@
}
}
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';
......@@ -1310,6 +1412,7 @@
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);
......@@ -1333,7 +1436,10 @@
}
}
if(division !='93'){
record.getField('customer_margin').setReadOnly(true);
record.getField('customer_margin_n').setReadOnly(true);
}
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'
......@@ -1452,7 +1558,7 @@
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
//不为租赁二手机业务时隐藏资管费相关字段及费率 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';
......@@ -1462,15 +1568,11 @@
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')){
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) {
......@@ -1772,7 +1874,7 @@
var show = down_payment_rate_new * 100;
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
if(current_record.get('division')!='91') {
if(current_record.get('division')!='91'&&current_record.get('division')!='93') {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
......@@ -1988,14 +2090,11 @@
return false;
}
if (record.get('signing_city')){
// 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 () {});
var reg = /^(.){4,}$/;
if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
return false;
}
}
}
......@@ -2067,7 +2166,7 @@
sync: true
});
}
}
if (machine_number_num>0 && count == 0){
......@@ -2079,6 +2178,17 @@
return false;
}
}
//神钢建机,新报单的机号与关联的合同机号必须相同
if(division == '91'){
var machine_number1 = lease_item_record.get('machine_number');
var machine_number2 = project_record.get('machine_number');
if(typeof(machine_number1) != 'undefined' && typeof(machine_number2) != 'undefined'){
if( machine_number1 != machine_number2){
$L.showErrorMessage('提示', '新报单的机号与关联的合同机号必须相同!');
return false;
}
}
}
return true;
......
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