Commit 24dbd7af authored by 18083's avatar 18083

法人供应商改造

parent 303534f4
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
} else if (head_record.get('bp_category') == 'VENDER') { } else if (head_record.get('bp_category') == 'VENDER') {
bp_record.getField('unit_id_n').setReadOnly(true); bp_record.getField('unit_id_n').setReadOnly(true);
bp_record.getField('unit_id_n').setRequired(false); bp_record.getField('unit_id_n').setRequired(false);
bp_record.getField('unit_id').setRequired(false);
} else { } else {
current_record.getField('bp_type_n').setReadOnly(true); current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true); current_record.getField('enabled_flag').setReadOnly(true);
...@@ -170,6 +171,21 @@ ...@@ -170,6 +171,21 @@
} }
}; };
//法人供应商经办人身份证号非必填 18083 2022/11/28
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');
var bp_record=$(bp_ds_id).getCurrentRecord();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
//第三方创建页面隐藏角色新增按钮 //第三方创建页面隐藏角色新增按钮
debugger; debugger;
...@@ -186,6 +202,10 @@ ...@@ -186,6 +202,10 @@
if ((ds.id).indexOf('hls_bp_master') != -1) { if ((ds.id).indexOf('hls_bp_master') != -1) {
// record.getField('cell_phone').setRequired(true); // record.getField('cell_phone').setRequired(true);
//record.getField('cell_phone').setRequired(true); //record.getField('cell_phone').setRequired(true);
//法人供应商非必填 18083 2022/11/25
if(record.get('bp_class') == 'ORG' && record.get("bp_type") == 'VENDER'){
record.getField('id_card_no_leg').setRequired(false);
}
//身份证验证 //身份证验证
if (ds.fields.id_card_no) { if (ds.fields.id_card_no) {
......
...@@ -384,6 +384,30 @@ ...@@ -384,6 +384,30 @@
// } // }
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) { if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
if(record.get('bp_class') && record.get('bp_class') == 'ORG'){
if(record.get('bp_type') == 'TENANT'){
record.getField('etp_sts').setRequired(true);
record.getField('credit_code').setRequired(true);
record.getField('etp_sts_n').setRequired(true);
record.getField('org_type').setRequired(true);
record.getField('org_type_n').setRequired(true);
record.getField('org_type_sub').setRequired(true);
record.getField('org_type_sub_n').setRequired(true);
record.getField('enterprise_scale').setRequired(true);
record.getField('enterprise_scale_n').setRequired(true);
record.getField('due_date').setRequired(true);
record.getField('org_unit_property').setRequired(true);
record.getField('org_unit_property_n').setRequired(true);
record.getField('industry').setRequired(true);
record.getField('industry_n').setRequired(true);
record.getField('nationalities').setRequired(true);
}
}
//法人供应商非必填 18083 2022/11/25
if(record.get('bp_class') == 'ORG' && record.get("bp_type") == 'VENDER'){
record.getField('id_card_no_leg').setRequired(false);
}
var employee_type_id = '${/model/modify_user/record/@employee_type_id}'; var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
old_bp_name = record.get('bp_name'); old_bp_name = record.get('bp_name');
new_bp_name = record.get('bp_name'); new_bp_name = record.get('bp_name');
...@@ -395,6 +419,7 @@ ...@@ -395,6 +419,7 @@
if (record.get('bp_category') == 'VENDER') { if (record.get('bp_category') == 'VENDER') {
record.getField('unit_id_n').setReadOnly(true); record.getField('unit_id_n').setReadOnly(true);
record.getField('unit_id_n').setRequired(false); record.getField('unit_id_n').setRequired(false);
record.getField('unit_id').setRequired(false);
} else { } else {
if (employee_type_id == '64') { if (employee_type_id == '64') {
record.getField('unit_id_n').setReadOnly(true); record.getField('unit_id_n').setReadOnly(true);
...@@ -444,6 +469,18 @@ ...@@ -444,6 +469,18 @@
} }
} }
} }
//法人供应商非必填 18083 2022/11/25
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');
var bp_record=$(bp_ds_id).getCurrentRecord();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
}; };
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) {
...@@ -457,6 +494,18 @@ ...@@ -457,6 +494,18 @@
} }
} }
} }
//法人供应商非必填 18083 2022/11/25
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');
var bp_record=$(bp_ds_id).getCurrentRecord();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
} }
//更新时调用 add by liukang //更新时调用 add by liukang
...@@ -466,6 +515,31 @@ ...@@ -466,6 +515,31 @@
var gird_ds_id = 'BP_NP_MODIFY_N_BP_ASSETS01_hls_bp_assets_ds'; var gird_ds_id = 'BP_NP_MODIFY_N_BP_ASSETS01_hls_bp_assets_ds';
var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds'; var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds';
var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow'); var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow');
//中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else {
return true;
}
}else {
Leaf.showMessage('提示', '请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
}
}
if (gird_ds_id == ds.id || gird_ds_id2 == ds.id) { if (gird_ds_id == ds.id || gird_ds_id2 == ds.id) {
if (name == 'relationship_with_bp') { if (name == 'relationship_with_bp') {
if (value == 'A7501') { if (value == 'A7501') {
......
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