Commit 8f138b87 authored by 25484's avatar 25484

[fix]商业伙伴修改

parent e1348d69
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select h.bp_name, h.bp_code, h.bp_id, h.unit_id
from exp_emp_assign_e_v ee, hls_bp_master h
where ee.user_id = ${/session/@user_id}
and ee.unit_id = h.unit_id
and h.bp_category = 'AGENT'
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true"> trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="hls.HLS213N.hls_bp_master_unit" rootPath="user_agent_description"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields" <a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields"
...@@ -16,20 +16,21 @@ ...@@ -16,20 +16,21 @@
<a:link id="gh_nc_post_addsupplierinfo_link" model="hls.HLS213.hls_bp_master_nc_post" modelaction="update"/> <a:link id="gh_nc_post_addsupplierinfo_link" model="hls.HLS213.hls_bp_master_nc_post" modelaction="update"/>
<a:link id="hls214N_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="hls214N_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="hls214N_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="hls214N_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js" type="text/javascript"/> <script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type="text/javascript"/>
<a:link id="gh_nc_post_addcustomerinfo_link" model="hls.HLS213.hls_bp_master_nc_post" modelaction="execute"/> <a:link id="gh_nc_post_addcustomerinfo_link" model="hls.HLS213.hls_bp_master_nc_post" modelaction="execute"/>
<!-- <a:link id="hls213_sap_eai_create_customer_link"--> <!-- <a:link id="hls213_sap_eai_create_customer_link"-->
<!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>--> <!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls213_sap_eai_create_vender_link"--> <!-- <a:link id="hls213_sap_eai_create_vender_link"-->
<!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>--> <!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<!-- <a:link id="Identity_ccx_link" <!-- <a:link id="Identity_ccx_link"
url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>--> url="${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"/>-->
<!-- <script src="${/request/@context_path}/javascripts/identity_card_info_query.js" type="text/javascript"/>--> <!-- <script src="${/request/@context_path}/javascripts/identity_card_info_query.js" type="text/javascript"/>-->
<!-- <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>--> <!-- <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Leaf.onReady(function () { Leaf.onReady(function () {
var agent_name = '${/model/user_agent_description/record/@bp_id}'; var unit_id = '${/model/user_agent_description/record/@unit_id}';
var agent_name_n = '${/model/user_agent_description/record/@bp_name}'; var unit_id_n = '${/model/user_agent_description/record/@bp_name}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
...@@ -37,16 +38,16 @@ ...@@ -37,16 +38,16 @@
var bp_record = $(bp_ds_id).getCurrentRecord(); var bp_record = $(bp_ds_id).getCurrentRecord();
bp_record.set('bp_category','${/parameter/@bp_category}'); bp_record.set('bp_category', '${/parameter/@bp_category}');
bp_record.set('owner_user_id','${/session/@user_id}'); bp_record.set('owner_user_id', '${/session/@user_id}');
bp_record.set('agent_name', agent_name); bp_record.set('unit_id', unit_id);
bp_record.set('agent_name_n', agent_name_n); bp_record.set('unit_id_n', unit_id_n);
if(agent_name && agent_name_n){ if (unit_id && unit_id_n) {
bp_record.getField('agent_name_n').setReadOnly(true); bp_record.getField('unit_id_n').setReadOnly(true);
}else{ } else {
bp_record.getField('agent_name_n').setReadOnly(false); bp_record.getField('unit_id_n').setReadOnly(false);
bp_record.getField('agent_name_n').setRequired(true); bp_record.getField('unit_id_n').setRequired(true);
// bp_record.getField('agent_type_n').setRequired(true); // bp_record.getField('agent_type_n').setRequired(true);
} }
if ('${/parameter/@bp_type}' == 'AGENT') { if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false); bp_record.getField('agent_type_n').setReadOnly(false);
...@@ -88,10 +89,10 @@ ...@@ -88,10 +89,10 @@
bp_record.getField('brand_unbrand_n').setReadOnly(true); bp_record.getField('brand_unbrand_n').setReadOnly(true);
current_record.getField('bp_type_n').setReadOnly(true); current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true); current_record.getField('enabled_flag').setReadOnly(true);
}else if(head_record.get('bp_category') == 'VENDER'){ } else if (head_record.get('bp_category') == 'VENDER') {
bp_record.getField('agent_name_n').setReadOnly(true); bp_record.getField('unit_id_n').setReadOnly(true);
bp_record.getField('agent_name_n').setRequired(false); bp_record.getField('unit_id_n').setRequired(false);
}else { } else {
current_record.getField('bp_type_n').setReadOnly(true); current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true); current_record.getField('enabled_flag').setReadOnly(true);
} }
...@@ -107,15 +108,15 @@ ...@@ -107,15 +108,15 @@
return false; return false;
} }
//else{ //else{
// Leaf.showMessage('${l:PROMPT}', '是否删除角色?'); // Leaf.showMessage('${l:PROMPT}', '是否删除角色?');
//} //}
//alert(records.length); //alert(records.length);
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
var primary_flag = records[i].get('primary_flag'); var primary_flag = records[i].get('primary_flag');
if(primary_flag == 'Y'){ if (primary_flag == 'Y') {
Leaf.showMessage('${l:PROMPT}', '主角色无法被删除!'); Leaf.showMessage('${l:PROMPT}', '主角色无法被删除!');
continue; continue;
}else{ } else {
$(ds_id).remove(records[i]); $(ds_id).remove(records[i]);
} }
} }
...@@ -335,9 +336,9 @@ ...@@ -335,9 +336,9 @@
// } // }
// }); // });
var social_credit_code_flag;
function CheckSocialCreditCode(Code) { function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/; var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验 //18位校验及大写校验
if ((Code.length != 18) || (patrn.test(Code) == false)) { if ((Code.length != 18) || (patrn.test(Code) == false)) {
...@@ -378,51 +379,51 @@ ...@@ -378,51 +379,51 @@
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 social_code = head_record.get('social_code'); var social_code = head_record.get('social_code');
var extra_nam = head_record.get('extra_nam'); var extra_nam = head_record.get('extra_nam');
var regax = /^[A-Z]+$/; 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') {
//if (regax.test(extra_nam) && extra_nam.length == 3) { //if (regax.test(extra_nam) && extra_nam.length == 3) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false; var check_flag = false;
if (head_record.get('bp_code')) { if (head_record.get('bp_code')) {
return true; return true;
} }
Leaf.request({ Leaf.request({
url: $('get_special_fields_link_id').getUrl(), url: $('get_special_fields_link_id').getUrl(),
para: { para: {
document_category: 'BP', document_category: 'BP',
document_type: head_record.get('bp_type'), document_type: head_record.get('bp_type'),
// document_type: 'TENANT', // document_type: 'TENANT',
bp_class: head_record.get('bp_class'), bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'), id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'), id_card_no: head_record.get('id_card_no'),
bp_info: head_record.get('bp_info'), bp_info: head_record.get('bp_info'),
province_id: head_record.get('province_id'), province_id: head_record.get('province_id'),
organization_code: head_record.get('organization_code'), organization_code: head_record.get('organization_code'),
function_code: '${/parameter/@function_code}', function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}' function_usage: '${/parameter/@function_usage}'
}, },
success: function (res) { success: function (res) {
var document_number = res.result.document_number; var document_number = res.result.document_number;
head_record.set('bp_code', document_number); head_record.set('bp_code', document_number);
head_record.set('company_id', '${/session/@company_id}'); head_record.set('company_id', '${/session/@company_id}');
head_record.set('unbrand', '${/parameter/@unbrand}'); head_record.set('unbrand', '${/parameter/@unbrand}');
check_flag = true; check_flag = true;
}, },
error: function () { error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
failure: function () { failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
sync: true, sync: true,
scope: this 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']();
...@@ -435,50 +436,47 @@ ...@@ -435,50 +436,47 @@
// } // }
} else { } else {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
if (social_credit_code_flag != 'N'){ if (!CheckSocialCreditCode(head_record.get('social_code'))) {
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('提示', '统一社会信用代码有误,请重新输入!'); Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return 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
});
} }
return check_flag; return check_flag;
}; };
...@@ -553,11 +551,9 @@ ...@@ -553,11 +551,9 @@
if (name == 'relationship_with_bp') { if (name == 'relationship_with_bp') {
if (value == 'A7501') { if (value == 'A7501') {
record.set('owership', $(f_bp_create_ds_id).getAt(0).get('bp_name')); record.set('owership', $(f_bp_create_ds_id).getAt(0).get('bp_name'));
} } else if (value == 'A7502') {
else if (value == 'A7502') {
record.set('owership', $(f_bp_create_ds_id).getAt(0).get('bp_name_sp')); record.set('owership', $(f_bp_create_ds_id).getAt(0).get('bp_name_sp'));
} } else {
else {
record.set('owership', ''); record.set('owership', '');
} }
} }
...@@ -566,11 +562,9 @@ ...@@ -566,11 +562,9 @@
if (name == 'relationship_with_bp') { if (name == 'relationship_with_bp') {
if (value == 'A7501') { if (value == 'A7501') {
record.set('owner_name', $(f_bp_create_ds_id).getAt(0).get('bp_name')); record.set('owner_name', $(f_bp_create_ds_id).getAt(0).get('bp_name'));
} } else if (value == 'A7502') {
else if (value == 'A7502') {
record.set('owner_name', $(f_bp_create_ds_id).getAt(0).get('bp_name_sp')); record.set('owner_name', $(f_bp_create_ds_id).getAt(0).get('bp_name_sp'));
} } else {
else {
record.set('owner_name', ''); record.set('owner_name', '');
} }
} }
...@@ -592,9 +586,9 @@ ...@@ -592,9 +586,9 @@
if (!value) { if (!value) {
record.set('ccx_resmsg', ''); record.set('ccx_resmsg', '');
} }
if(record.get('id_type') == 'ID_CARD'){ if (record.get('id_type') == 'ID_CARD') {
if (!checkCard(value)) { if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}','个人身份证号错误!'); Leaf.showMessage('${l:HLS.PROMPT}', '个人身份证号错误!');
return false; return false;
} }
} }
...@@ -607,9 +601,9 @@ ...@@ -607,9 +601,9 @@
if (!value) { if (!value) {
record.set('ccx_resmsg1', ''); record.set('ccx_resmsg1', '');
} }
if(record.get('card_type_sp') == 'ID_CARD'){ if (record.get('card_type_sp') == 'ID_CARD') {
if (!checkCard(value)) { if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}','配偶身份证号错误!'); Leaf.showMessage('${l:HLS.PROMPT}', '配偶身份证号错误!');
return false; return false;
} }
} }
...@@ -626,14 +620,13 @@ ...@@ -626,14 +620,13 @@
} }
var id_card_no_leg = record.get('id_card_no_leg'); var id_card_no_leg = record.get('id_card_no_leg');
if (!checkCard(id_card_no_leg)) { if (!checkCard(id_card_no_leg)) {
Leaf.showMessage('${l:HLS.PROMPT}','法人代表身份证号格式错误!'); Leaf.showMessage('${l:HLS.PROMPT}', '法人代表身份证号格式错误!');
return false; return false;
} }
} }
if(name == 'social_code') { if (name == 'social_code') {
if (!CheckSocialCreditCode(value)) { if (!CheckSocialCreditCode(value)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!'); Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
social_credit_code_flag ='N';
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
...@@ -655,13 +648,13 @@ ...@@ -655,13 +648,13 @@
// record.set('resident_addres_sp', get_native_place(value)) // record.set('resident_addres_sp', get_native_place(value))
// } // }
// } // }
if(name=='marital_status'){ if (name == 'marital_status') {
if(value=='30'){ if (value == '30') {
record.getField('bp_name_sp').setRequired(true); record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true); record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true); record.getField('id_no_sp').setRequired(true);
}else{ } else {
record.getField('bp_name_sp').setRequired(false); record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false); record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false); record.getField('id_no_sp').setRequired(false);
...@@ -669,8 +662,6 @@ ...@@ -669,8 +662,6 @@
} }
}; };
function upload_file(id, name, query_only) { function upload_file(id, name, query_only) {
......
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