Commit 497f645b authored by 38823's avatar 38823

商业伙伴保存前生成编码完善

parent da6ab3f7
......@@ -514,31 +514,6 @@
var file_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var file_record = $(file_ds_id).getAll();
var bank_flag=true;
var check_flag=true;
//保存前生成商业伙伴编码
if(Ext.isEmpty(head_record.get('bp_code'))){
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
bp_type: head_record.get('bp_type')
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
check_flag = true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}
//校验银行账户必须与商业伙伴名称一致 18083 2023/9/5
var bp_name=head_record.get('bp_name');
var bank_flag1=true;
......@@ -720,7 +695,7 @@
}
//=================
var check_flag = false;
var check_flag = true;
if (head_record.get('marital_status') && (head_record.get('marital_status') !== '30' && head_record.get('marital_status') !== '40')) {
head_record.set('bp_name_sp', null);
head_record.set('card_type_sp', null);
......@@ -732,7 +707,32 @@
head_record.set('work_unit_name_sp', null);
head_record.set('work_unit_address_sp', null);
}
check_flag = true;
//保存前生成商业伙伴编码
if(Ext.isEmpty(head_record.get('bp_code'))){
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
bp_type: head_record.get('bp_type')
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
check_flag = true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
check_flag = false;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
check_flag = false;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}
return check_flag;
};
......
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