Commit f53ff72e authored by stone's avatar stone

【fix】增加代理店代理校验

parent d7f1420f
......@@ -74,6 +74,8 @@
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if (ds_id == ds.id) {
if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true);
......@@ -111,7 +113,20 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record_agent =$(agent_id).getAll();
//增加三位字母大写的校验
var head_record = $(ds_id).getCurrentRecord();
var english_name= head_record.get('english_name');
var patrn = /^[A-Z]{3}$/;
//对统一社会信用代码和身份生进行校验
if(patrn.test(english_name)==false){
$L.showErrorMessage('错误','代理店代码为三位大写字母!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(record_agent.length == 0){
Leaf.showMessage('${l:PROMPT}', '必须维护租赁物信息且每种租赁物只能维护一次!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......
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