Commit c5ebe9fa authored by 38823's avatar 38823

商业伙伴经办人 身份证号唯一性校验

parent d67c62ef
......@@ -196,7 +196,6 @@
};
//法人供应商经办人身份证号非必填 18083 2022/12/1
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
var sign_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_SIGNER', 'hls_bp_master_signer');
......@@ -209,6 +208,19 @@
}
}
}
//经办人身份信息校验
if(sign_ds_id==ds.id && sign_ds_id){
var sign_record = $(sign_ds_id).getAll();
var check_num=0;
if(sign_record[0].data.id_card != undefined){
check_num++;
}
if(check_num==0){
$(sign_ds_id).remove(sign_record[0]);
Leaf.showErrorMessage("提示","请先保存!");
return false;
}
}
}
......@@ -555,6 +567,24 @@
}
}
}
// 经办人信息校验
var signer_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_signer');
if(signer_ds_id){
var signer_record = $(signer_ds_id).getAll();
var v_signer_count=0;
if(signer_record.length > 1){
for (var i = 1;i < signer_record.length;i++) {
if(signer_record[i].get('id_card') == signer_record[i-1].get('id_card')){
v_signer_count=v_signer_count+1;
}
}
}
if(v_signer_count >= 1){
Leaf.showErrorMessage('提示', '系统当前仅允许维护不同的经办人身份证信息!');
return false;
}
}
//若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是” 18083 2022/11/30
if (head_record.get('invoice_type')=='PAPER'){
if(head_record.get('full_elec_invoice_flag')=='Y'){
......
......@@ -82,7 +82,24 @@
return false;
}
// 经办人信息校验
var signer_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_signer');
if(signer_ds_id){
var signer_record = $(signer_ds_id).getAll();
var v_signer_count=0;
if(signer_record.length > 1){
for (var i = 1;i < signer_record.length;i++) {
if(signer_record[i].get('id_card') == signer_record[i-1].get('id_card')){
v_signer_count=v_signer_count+1;
}
}
}
if(v_signer_count >= 1){
Leaf.showErrorMessage('提示', '系统当前仅允许维护不同的经办人身份证信息!');
return false;
}
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord();
......@@ -571,6 +588,19 @@
}
}
}
//经办人身份信息校验
if(sign_ds_id==ds.id && sign_ds_id){
var sign_record = $(sign_ds_id).getAll();
var check_num=0;
if(sign_record[0].data.id_card != undefined){
check_num++;
}
if(check_num==0){
$(sign_ds_id).remove(sign_record[0]);
Leaf.showErrorMessage("提示","请先保存!");
return false;
}
}
}
//更新时调用 add by liukang
......
......@@ -73,6 +73,24 @@
Leaf.showErrorMessage('${l:PROMPT}', '第三方不能含有其他角色类型');
return false;
}
// 经办人信息校验
var signer_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_signer_req');
if(signer_ds_id){
var signer_record = $(signer_ds_id).getAll();
var v_signer_count=0;
if(signer_record.length > 1){
for (var i = 1;i < signer_record.length;i++) {
if(signer_record[i].get('id_card') == signer_record[i-1].get('id_card')){
v_signer_count=v_signer_count+1;
}
}
}
if(v_signer_count >= 1){
Leaf.showErrorMessage('提示', '系统当前仅允许维护不同的经办人身份证信息!');
return false;
}
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
......
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