Commit 4e63caa8 authored by 25484's avatar 25484

[fix]商业伙伴问题修改

parent 2031067e
......@@ -130,7 +130,7 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
if ((ds.id).indexOf('hls_bp_master') != -1) {
record.getField('cell_phone').setRequired(true);
//身份证验证
if (ds.fields.id_card_no) {
......@@ -146,22 +146,24 @@
var sp_identity_flag;
function id_card_no_validate(record, name, value) {
var id_type = record.get('id_type');
var card_type_sp = record.get('card_type_sp');
if (name == 'id_card_no') {
var bp_name = record.get('bp_name');
} else if (name == 'id_no_sp') {
bp_name = record.get('bp_name_sp');
}
if (!checkCard(value)) {
if (id_type == 'ID_CARD') {
var id_card_no = record.get('id_card_no');
if (!checkCard(id_card_no)) {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
return '请输入正确格式的身份证';
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
//
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
// if(value=='123456199001011233'){
//
//if(value=='123456199001011233'){
// var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({
......@@ -236,7 +238,24 @@
sync: true
});*/
}
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
}
if (card_type_sp == 'ID_CARD') {
var id_no_sp = record.get('id_no_sp');
if (!checkCard(id_no_sp)) {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
return '请输入正确格式的身份证';
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N'
}
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
}
if (value.length == 18) {
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
......@@ -279,14 +298,15 @@
//保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
//
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class');
var extra_nam = head_record.get('extra_nam');
var regax = /^[A-Z]+$/;
//alert('${/parameter/@unbrand}');
if (bp_class == 'NP') {
if (card_identity_flag == 'N' || sp_identity_flag == 'N') {
if (regax.test(extra_nam) && extra_nam.length == 3) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
if (head_record.get('bp_code')) {
......@@ -323,6 +343,11 @@
sync: true,
scope: this
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '身份证校验未通过,不能保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -469,6 +494,13 @@
record.getField('parent_id_n').setReadOnly(true);
}
}
if (name == 'marital_status') {
if (value == '30') {
record.getField('bp_name_sp').setRequired(true);
// record.getField('card_type_sp').setRequired(true);
record.getField('id_no_sp').setRequired(true);
}
}
}
var hls_bp_master_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
......
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