Commit fd55a10c authored by 38823's avatar 38823

合同签约前,4个商业伙伴必填项校验的增加

parent a604da98
...@@ -528,6 +528,19 @@ ...@@ -528,6 +528,19 @@
return false; return false;
} }
} }
}
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
if(head_record.get('bp_class')=='ORG'){
if(head_record.get('bp_type')=='TENANT' || head_record.get('bp_type')=='GUTA_ORG'){
var bank_flag=true;
if(bank_record.length==0){
bank_flag=false;
if(bank_flag==false){
Leaf.showErrorMessage('${l:PROMPT}','请在银行账户信息中维护[银行账号信息]!');
return false;
}
}
}
} }
//若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是” 18083 2022/11/30 //若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是” 18083 2022/11/30
if (head_record.get('invoice_type')=='PAPER'){ if (head_record.get('invoice_type')=='PAPER'){
...@@ -580,6 +593,23 @@ ...@@ -580,6 +593,23 @@
//验证是否有户籍地址,或者通讯地址 //验证是否有户籍地址,或者通讯地址
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address'); var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var records_addr = $(address_ds_id).getAll(); var records_addr = $(address_ds_id).getAll();
//新增校验,承租人(自然人)商业伙伴创建必须维护居住地址(为电子签约做准备)
if(head_record.get('bp_class')=='NP' && head_record.get('bp_type')=='TENANT'){
var check_flag=true;
for(var i=0;i<records_addr.length;i++){
if(records_addr[i].get('address_type')=='HOUSE_ADDRESS'){
check_flag=true;
break;
}else {
check_flag=false;
}
}
if(check_flag==false){
Leaf.showErrorMessage('${l:PROMPT}','必填项[居住住址]为空,请在地址信息新增!');
return false;
}
}
if (head_record.get('bp_class') =='NP'&&head_record.get('bp_type')!='THIRD_PARTY'){ if (head_record.get('bp_class') =='NP'&&head_record.get('bp_type')!='THIRD_PARTY'){
//判断户籍地址 //判断户籍地址
var flag = true; var flag = true;
......
...@@ -89,6 +89,35 @@ ...@@ -89,6 +89,35 @@
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address'); var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var records_addr = $(address_ds_id).getAll(); var records_addr = $(address_ds_id).getAll();
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
if(bp_record.get('bp_class') == 'ORG'){
if(bp_record.get('bp_type')=='TENANT' || bp_record.get('bp_type')=='GUTA_ORG'){
if(bank_record.length==0){
flag=false;
if(flag==false){
Leaf.showErrorMessage('${l:PROMPT}','请在银行账户信息中维护[银行账号信息]!');
return false;
}
}
}
}
//新增校验,承租人(自然人)商业伙伴创建必须维护居住地址(为电子签约做准备)
if(bp_record.get('bp_class')=='NP' && bp_record.get('bp_type')=='TENANT'){
var check_flag=true;
for(var i=0;i<records_addr.length;i++){
if(records_addr[i].get('address_type')=='HOUSE_ADDRESS'){
check_flag=true;
break;
}else {
check_flag=false;
}
}
if(check_flag==false){
Leaf.showErrorMessage('${l:PROMPT}','必填项[居住住址]为空,请在地址信息新增!');
return false;
}
}
if (bp_record.get('bp_class') == 'NP'){ if (bp_record.get('bp_class') == 'NP'){
//判断户籍地址 //判断户籍地址
var flag = true; var flag = true;
......
...@@ -81,6 +81,36 @@ ...@@ -81,6 +81,36 @@
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req'); var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var bank_record = $(bank_ds_id).getAll(); var bank_record = $(bank_ds_id).getAll();
var flag = true; var flag = true;
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
if(bp_record.get('bp_class') == 'ORG'){
if(bp_record.get('bp_type')=='TENANT' || bp_record.get('bp_type')=='GUTA_ORG'){
if(bank_record.length==0){
flag=false;
if(flag==false){
Leaf.showErrorMessage('${l:PROMPT}','请在银行账户信息中维护[银行账号信息]!');
return false;
}
}
}
}
//新增校验,承租人(自然人)商业伙伴创建必须维护居住地址(为电子签约做准备)
if(bp_record.get('bp_class')=='NP' && bp_record.get('bp_type')=='TENANT'){
var check_flag=true;
for(var i=0;i<records_addr.length;i++){
if(records_addr[i].get('address_type')=='HOUSE_ADDRESS'){
check_flag=true;
break;
}else {
check_flag=false;
}
}
if(check_flag==false){
Leaf.showErrorMessage('${l:PROMPT}','必填项[居住住址]为空,请在地址信息新增!');
return false;
}
}
if(bank_record.length>0){ if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){ for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name'); var full_name=bank_record[i].get('bank_full_name');
......
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