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 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<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:view>
<a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields"
......@@ -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="hls214N_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.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="hls213_sap_eai_create_customer_link"-->
<!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls213_sap_eai_create_vender_link"-->
<!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<!-- <a:link id="hls213_sap_eai_create_customer_link"-->
<!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls213_sap_eai_create_vender_link"-->
<!-- url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<!-- <a:link id="Identity_ccx_link"
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"/>-->
<!-- <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>-->
<!-- <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"/>-->
<script type="text/javascript"><![CDATA[
Leaf.onReady(function () {
var agent_name = '${/model/user_agent_description/record/@bp_id}';
var agent_name_n = '${/model/user_agent_description/record/@bp_name}';
var unit_id = '${/model/user_agent_description/record/@unit_id}';
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');
......@@ -37,15 +38,15 @@
var bp_record = $(bp_ds_id).getCurrentRecord();
bp_record.set('bp_category','${/parameter/@bp_category}');
bp_record.set('owner_user_id','${/session/@user_id}');
bp_record.set('agent_name', agent_name);
bp_record.set('agent_name_n', agent_name_n);
if(agent_name && agent_name_n){
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.set('bp_category', '${/parameter/@bp_category}');
bp_record.set('owner_user_id', '${/session/@user_id}');
bp_record.set('unit_id', unit_id);
bp_record.set('unit_id_n', unit_id_n);
if (unit_id && unit_id_n) {
bp_record.getField('unit_id_n').setReadOnly(true);
} else {
bp_record.getField('unit_id_n').setReadOnly(false);
bp_record.getField('unit_id_n').setRequired(true);
// bp_record.getField('agent_type_n').setRequired(true);
}
if ('${/parameter/@bp_type}' == 'AGENT') {
......@@ -88,10 +89,10 @@
bp_record.getField('brand_unbrand_n').setReadOnly(true);
current_record.getField('bp_type_n').setReadOnly(true);
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 {
} else if (head_record.get('bp_category') == 'VENDER') {
bp_record.getField('unit_id_n').setReadOnly(true);
bp_record.getField('unit_id_n').setRequired(false);
} else {
current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true);
}
......@@ -112,10 +113,10 @@
//alert(records.length);
for (var i = 0; i < records.length; i++) {
var primary_flag = records[i].get('primary_flag');
if(primary_flag == 'Y'){
if (primary_flag == 'Y') {
Leaf.showMessage('${l:PROMPT}', '主角色无法被删除!');
continue;
}else{
} else {
$(ds_id).remove(records[i]);
}
}
......@@ -335,9 +336,9 @@
// }
// });
var social_credit_code_flag;
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
if ((Code.length != 18) || (patrn.test(Code) == false)) {
......@@ -435,10 +436,12 @@
// }
} else {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
if (social_credit_code_flag != 'N'){
var check_flag = false;
if (!CheckSocialCreditCode(head_record.get('social_code'))) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if (head_record.get('bp_code')) {
return true;
}
......@@ -474,11 +477,6 @@
scope: this
});
}else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
return false;
}
}
return check_flag;
};
......@@ -553,11 +551,9 @@
if (name == 'relationship_with_bp') {
if (value == 'A7501') {
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'));
}
else {
} else {
record.set('owership', '');
}
}
......@@ -566,11 +562,9 @@
if (name == 'relationship_with_bp') {
if (value == 'A7501') {
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'));
}
else {
} else {
record.set('owner_name', '');
}
}
......@@ -592,9 +586,9 @@
if (!value) {
record.set('ccx_resmsg', '');
}
if(record.get('id_type') == 'ID_CARD'){
if (record.get('id_type') == 'ID_CARD') {
if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}','个人身份证号错误!');
Leaf.showMessage('${l:HLS.PROMPT}', '个人身份证号错误!');
return false;
}
}
......@@ -607,9 +601,9 @@
if (!value) {
record.set('ccx_resmsg1', '');
}
if(record.get('card_type_sp') == 'ID_CARD'){
if (record.get('card_type_sp') == 'ID_CARD') {
if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}','配偶身份证号错误!');
Leaf.showMessage('${l:HLS.PROMPT}', '配偶身份证号错误!');
return false;
}
}
......@@ -626,14 +620,13 @@
}
var id_card_no_leg = record.get('id_card_no_leg');
if (!checkCard(id_card_no_leg)) {
Leaf.showMessage('${l:HLS.PROMPT}','法人代表身份证号格式错误!');
Leaf.showMessage('${l:HLS.PROMPT}', '法人代表身份证号格式错误!');
return false;
}
}
if(name == 'social_code') {
if (name == 'social_code') {
if (!CheckSocialCreditCode(value)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
social_credit_code_flag ='N';
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
......@@ -655,13 +648,13 @@
// record.set('resident_addres_sp', get_native_place(value))
// }
// }
if(name=='marital_status'){
if(value=='30'){
if (name == 'marital_status') {
if (value == '30') {
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
}else{
} else {
record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false);
......@@ -669,8 +662,6 @@
}
};
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