Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
4e63caa8
Commit
4e63caa8
authored
Nov 05, 2019
by
25484
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]商业伙伴问题修改
parent
2031067e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
151 additions
and
119 deletions
+151
-119
hls_bp_master_create.lview
...ain/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
+151
-119
No files found.
src/main/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
View file @
4e63caa8
...
@@ -130,7 +130,7 @@
...
@@ -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) {
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) {
if ((ds.id).indexOf('hls_bp_master') != -1) {
record.getField('cell_phone').setRequired(true);
//身份证验证
//身份证验证
if (ds.fields.id_card_no) {
if (ds.fields.id_card_no) {
...
@@ -146,97 +146,116 @@
...
@@ -146,97 +146,116 @@
var sp_identity_flag;
var sp_identity_flag;
function id_card_no_validate(record, name, value) {
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') {
if (name == 'id_card_no') {
var bp_name = record.get('bp_name');
var bp_name = record.get('bp_name');
} else if (name == 'id_no_sp') {
} else if (name == 'id_no_sp') {
bp_name = record.get('bp_name_sp');
bp_name = record.get('bp_name_sp');
}
}
if (!checkCard(value)) {
if (id_type == 'ID_CARD') {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
var id_card_no = record.get('id_card_no');
return '请输入正确格式的身份证';
if (!checkCard(id_card_no)) {
} else {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
card_identity_flag = 'N';
return '请输入正确格式的身份证';
sp_identity_flag = 'N';
} else {
//
card_identity_flag = 'N';
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
sp_identity_flag = 'N';
// if(value=='123456199001011233'){
//
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
// var url1 = $('identity_query_link').getUrl();
//if(value=='123456199001011233'){
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// var url1 = $('identity_query_link').getUrl();
/* Leaf.request({
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
url: url1,
/* Leaf.request({
para: {
url: url1,
id_card_no: value,//身份证号码
para: {
bp_name: bp_name
id_card_no: value,//身份证号码
},
bp_name: bp_name
success: function (res) {
},
var resmsg_1 = res.result.resmsg_1;
success: function (res) {
if (resmsg_1 == '1') {
var resmsg_1 = res.result.resmsg_1;
if (name == 'id_card_no') {
if (resmsg_1 == '1') {
record.set('ccx_resmsg', '身份验证成功');
if (name == 'id_card_no') {
card_identity_flag = 'Y';
record.set('ccx_resmsg', '身份验证成功');
card_identity_flag = 'Y';
} else {
record.set('ccx_resmsg1', '身份验证成功');
sp_identity_flag = 'Y';
}
} else {
} else {
record.set('ccx_resmsg1', '身份验证成功');
//个人身份验证
sp_identity_flag = 'Y';
var url = $('Identity_ccx_link').getUrl();
}
} else {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//个人身份验证
Leaf.request({
var url = $('Identity_ccx_link').getUrl();
url: url,
para: {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
bp_name: bp_name,//姓名
Leaf.request({
id_card_no: value//身份证号码
url: url,
},
para: {
success: function (res) {
bp_name: bp_name,//姓名
id_card_no: value//身份证号码
},
var resmsg = res.result.resmsg;
success: function (res) {
if (name == 'id_card_no') {
record.set('ccx_resmsg', resmsg);
if (resmsg == '身份验证成功') {
var resmsg = res.result.resmsg;
card_identity_flag = 'Y';
if (name == 'id_card_no') {
}
record.set('ccx_resmsg', resmsg);
} else {
if (resmsg == '身份验证成功') {
record.set('ccx_resmsg1', resmsg);
card_identity_flag = 'Y';
if (resmsg == '身份验证成功') {
}
sp_identity_flag = 'Y';
} else {
}
record.set('ccx_resmsg1', resmsg);
if (resmsg == '身份验证成功') {
sp_identity_flag = 'Y';
}
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.SideBar.show({
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
msg: '${l:HLS.SUBMIT_SUCCESS}',
Leaf.SideBar.show({
duration: 2000
msg: '${l:HLS.SUBMIT_SUCCESS}',
});
duration: 2000
},
});
failure: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
failure: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
error: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
error: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
scope: this,
},
sync: true
scope: this,
});
sync: true
}
});
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
failure: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
failure: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
error: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
error: function () {
},
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
scope: this,
},
sync: true
scope: this,
});*/
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) {
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('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));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
...
@@ -279,50 +298,56 @@
...
@@ -279,50 +298,56 @@
//保存前调用,生成商机编号
//保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
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 ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class');
var bp_class = head_record.get('bp_class');
var extra_nam = head_record.get('extra_nam');
var regax = /^[A-Z]+$/;
//alert('${/parameter/@unbrand}');
//alert('${/parameter/@unbrand}');
if (bp_class == 'NP') {
if (bp_class == 'NP') {
if (card_identity_flag == 'N' || sp_identity_flag == 'N') {
if (card_identity_flag == 'N' || sp_identity_flag == 'N') {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
if (regax.test(extra_nam) && extra_nam.length == 3) {
var check_flag = false;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
if (head_record.get('bp_code')) {
var check_flag = false;
return true;
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 {
Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
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 {
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '身份证校验未通过,不能保存!');
Leaf.showMessage('${l:HLS.PROMPT}', '身份证校验未通过,不能保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...
@@ -469,6 +494,13 @@
...
@@ -469,6 +494,13 @@
record.getField('parent_id_n').setReadOnly(true);
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');
var hls_bp_master_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment