Commit 00fba136 authored by 25484's avatar 25484

Merge branch 'refs/heads/feature/ap_invoice_import' into develop

parents 912c0232 e1348d69
......@@ -45,6 +45,8 @@
bp_record.getField('agent_name_n').setReadOnly(true);
}else{
bp_record.getField('agent_name_n').setReadOnly(false);
bp_record.getField('agent_name_n').setRequired(true);
// bp_record.getField('agent_type_n').setRequired(true);
}
if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false);
......@@ -88,6 +90,7 @@
current_record.getField('enabled_flag').setReadOnly(true);
}else if(head_record.get('bp_category') == 'VENDER'){
bp_record.getField('agent_name_n').setReadOnly(true);
bp_record.getField('agent_name_n').setRequired(false);
}else {
current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true);
......@@ -332,6 +335,8 @@
// }
// });
var social_credit_code_flag;
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
......@@ -430,44 +435,51 @@
// }
} else {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
if (head_record.get('bp_code')) {
return true;
}
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: 'BP',
document_type: head_record.get('bp_type'),
// document_type: 'TENANT',
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
bp_info: head_record.get('bp_info'),
province_id: head_record.get('province_id'),
organization_code: head_record.get('organization_code'),
function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}'
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
head_record.set('company_id', '${/session/@company_id}');
head_record.set('unbrand', '${/parameter/@unbrand}');
check_flag = true;
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}
if (social_credit_code_flag != 'N'){
var check_flag = false;
if (head_record.get('bp_code')) {
return true;
}
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: 'BP',
document_type: head_record.get('bp_type'),
// document_type: 'TENANT',
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
bp_info: head_record.get('bp_info'),
province_id: head_record.get('province_id'),
organization_code: head_record.get('organization_code'),
function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}'
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
head_record.set('company_id', '${/session/@company_id}');
head_record.set('unbrand', '${/parameter/@unbrand}');
check_flag = true;
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
return false;
}
}
return check_flag;
};
......@@ -621,6 +633,7 @@
if(name == 'social_code') {
if (!CheckSocialCreditCode(value)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
social_credit_code_flag ='N';
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
......
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