Commit 20ee2f89 authored by stone's avatar stone

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents 40f60f66 c829bac9
...@@ -39,9 +39,9 @@ var override_queryfields = [ ...@@ -39,9 +39,9 @@ var override_queryfields = [
]; ];
// var add_datafilters = [{ var add_datafilters = [{
// name : 'bp_category_filter', name : 'bp_category_filter',
// expression : "t1.bp_category != 'AGENT'" expression : "t1.bp_category != 'AGENT'"
// }]; }];
// add_datafilter(); add_datafilter();
override(); override();
...@@ -614,6 +614,18 @@ ...@@ -614,6 +614,18 @@
record.set('resident_addres_sp', get_native_place(value)) record.set('resident_addres_sp', get_native_place(value))
} }
} }
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{
record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false);
}
}
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
<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"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="hls214_bp_master_save_link_id" model="hls.HLS214.hls_bp_change_agent" modelaction="update"/> <a:link id="hls214_bp_master_save_link_id" model="hls.HLS214.hls_bp_change_agent" modelaction="update"/>
<!-- <a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>--> <!-- <a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>--> <!-- <a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<!-- <script src="${/request/@context_path}/javascripts/identity_card_info_query.js"--> <!-- <script src="${/request/@context_path}/javascripts/identity_card_info_query.js"-->
<!-- type="text/javascript"></script>--> <!-- type="text/javascript"></script>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//保存前调用 //保存前调用
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) { // window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
...@@ -38,6 +38,43 @@ ...@@ -38,6 +38,43 @@
// } // }
// }; // };
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
var Ancode;//统一社会信用代码的每一个值
var Ancodevalue;//统一社会信用代码每一个值的权重
var total = 0;
var weightedfactors = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];//加权因子
var str = '0123456789ABCDEFGHJKLMNPQRTUWXY';
//不用I、O、S、V、Z
for (var i = 0; i < Code.length - 1; i++) {
Ancode = Code.substring(i, i + 1);
Ancodevalue = str.indexOf(Ancode);
total = total + Ancodevalue * weightedfactors[i];
//权重与加权因子相乘之和
}
var logiccheckcode = 31 - total % 31;
if (logiccheckcode == 31) {
logiccheckcode = 0;
}
var Str = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y";
var Array_Str = Str.split(',');
logiccheckcode = Array_Str[logiccheckcode];
var checkcode = Code.substring(17, 18);
if (logiccheckcode != checkcode) {
return false;
} else {
return true;
}
}
}
//保存submitsuccess调用 //保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...@@ -65,40 +102,40 @@ ...@@ -65,40 +102,40 @@
// Leaf.request({ // Leaf.request({
// url: $('hls214_sap_eai_create_customer_link').getUrl(), // url: $('hls214_sap_eai_create_customer_link').getUrl(),
// para: { // para: {
// bp_id: bp_id // bp_id: bp_id
// }, // },
// scope: this, // scope: this,
// success: function () { // success: function () {
// Leaf.request({ // Leaf.request({
// url: $('hls214_sap_eai_create_vender_link').getUrl(), // url: $('hls214_sap_eai_create_vender_link').getUrl(),
// para: { // para: {
// bp_id: bp_id // bp_id: bp_id
// }, // },
// scope: this, // scope: this,
// success: function () { // success: function () {
// $(bp_ds_id).query(); // $(bp_ds_id).query();
// 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']();
// }, // },
// error: function () { // error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// }, // },
// sync: true // sync: true
// }); // });
// }, // },
// failure: function () { // failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// }, // },
// error: function () { // error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// }, // },
// sync: true // sync: true
// }); // });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
...@@ -217,30 +254,30 @@ ...@@ -217,30 +254,30 @@
var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds'; var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds';
var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow'); var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow');
if(gird_ds_id==ds.id||gird_ds_id2==ds.id){ if(gird_ds_id==ds.id||gird_ds_id2==ds.id){
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','');
} }
} }
} }
if(gird_ds_id3==ds.id){ if(gird_ds_id3==ds.id){
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','');
} }
} }
} }
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role'); var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
...@@ -269,6 +306,13 @@ ...@@ -269,6 +306,13 @@
record.getField('parent_id_n').setReadOnly(true); record.getField('parent_id_n').setReadOnly(true);
} }
} }
if(name == 'social_code') {
if (!CheckSocialCreditCode(value)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
} }
//if (ds.id == hls_bp_master_credit_ds_id){ //if (ds.id == hls_bp_master_credit_ds_id){
// if (name == 'trade_type_code'){ // if (name == 'trade_type_code'){
......
...@@ -385,6 +385,8 @@ ...@@ -385,6 +385,8 @@
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 bp_record = $(ds_id).getCurrentRecord(); var bp_record = $(ds_id).getCurrentRecord();
if (ds_id == ds.id) { if (ds_id == ds.id) {
record.set('taxpayer_type','Y');
record.set('taxpayer_type_n','否');
if (record.get('taxpayer_type') == 'Y') { if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true); record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true); record.getField('invoice_bp_address').setRequired(true);
......
...@@ -71,7 +71,42 @@ ...@@ -71,7 +71,42 @@
// } // }
// //
// } // }
//更新时调用
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);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account_id').setRequired(true);
} else {
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account_id').setRequired(false);
}
}
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') {
// bm_record.set('bp_type', record.get('bp_type'));
// bm_record.set('bp_type_n', record.get('bp_type_n'));
// bm_record.set('bp_category', record.get('bp_category'));
// bm_record.set('bp_category_n', record.get('bp_category_n'));
record.getField('bp_type').setReadOnly(true);
record.getField('bp_type_n').setReadOnly(true);
}
}
};
//保存前调用 //保存前调用
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
......
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