Commit 548b70d2 authored by 38823's avatar 38823

商业伙伴角色信息改造

parent 986801ad
...@@ -195,8 +195,11 @@ ...@@ -195,8 +195,11 @@
//删除角色按钮 //删除角色按钮
window['${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_tab_click'] = function () { window['${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
debugger;
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');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var records = $(ds_id).getSelected(); var records = $(ds_id).getSelected();
var bp_records = $(bp_ds_id).getCurrentRecord();
if (!records.length) { if (!records.length) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录'); Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录');
return false; return false;
...@@ -206,14 +209,27 @@ ...@@ -206,14 +209,27 @@
//} //}
//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'); if(!Ext.isEmpty(bp_records.get('bp_id'))){
if (primary_flag == 'Y') { if(!Ext.isEmpty(records[i].get('primary_flag_bak'))){
Leaf.showMessage('${l:PROMPT}', '主角色无法被删除!'); if(records[i].get('primary_flag_bak') == 'Y'){
continue; $L.showMessage('提示','主角色无法被删除!');
} else { return;
}
}
$(ds_id).remove(records[i]);
}else{
if(records[i].get('primary_flag') == 'Y'){
$L.showMessage('提示','主角色无法被删除!');
return;
}
$(ds_id).remove(records[i]); $(ds_id).remove(records[i]);
} }
} }
if(!Ext.isEmpty(bp_records.get('bp_id'))){
setTimeout(function () {
$(ds_id).query();
}, 100)
}
}; };
//法人供应商经办人身份证号非必填 18083 2022/12/1 //法人供应商经办人身份证号非必填 18083 2022/12/1
...@@ -819,6 +835,7 @@ ...@@ -819,6 +835,7 @@
// $(ds_id).query(); // $(ds_id).query();
//add by zc //add by zc
var signer_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_signer'); var signer_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_signer');
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if(head_record.get('bp_id')){ if(head_record.get('bp_id')){
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}_signer_create_link_id').getUrl(), url: $('${/parameter/@layout_code}_signer_create_link_id').getUrl(),
...@@ -829,6 +846,9 @@ ...@@ -829,6 +846,9 @@
if($(signer_ds_id)){ if($(signer_ds_id)){
$(signer_ds_id).query(); $(signer_ds_id).query();
} }
if($(role_ds_id)){
$(role_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
failure: function (res) { failure: function (res) {
......
...@@ -232,7 +232,29 @@ ...@@ -232,7 +232,29 @@
}; };
//商业伙伴角色信息删除
window['${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_tab_click'] = function() {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var records = $(ds_id).getSelected();
Leaf.showConfirm('提示', '是否确认删除', function() {
debugger;
var records = $(ds_id).getSelected();
if(records.length ==0){
$L.showMessage('提示','请至少选择一条数据!');
return;
}
for(var i=0;i<records.length;i++){
if(!Ext.isEmpty(records[i].get('primary_flag_bak'))){
if(records[i].get('primary_flag_bak') == 'Y'){
$L.showMessage('提示','主角色无法被删除!');
return;
}
}
$(ds_id).remove(records[i]);
}
});
};
function CheckSocialCreditCode(Code) { function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/; var patrn = /^[0-9A-Z]+$/;
...@@ -278,6 +300,7 @@ ...@@ -278,6 +300,7 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var records = $(ds_id); var records = $(ds_id);
if (!(records == 'undefined' || records == null)) { if (!(records == 'undefined' || records == null)) {
$(ds_id).query(); $(ds_id).query();
...@@ -296,6 +319,7 @@ ...@@ -296,6 +319,7 @@
}, },
success: function (res) { success: function (res) {
$(signer_ds_id).query(); $(signer_ds_id).query();
$(role_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
failure: function (res) { failure: function (res) {
...@@ -1610,6 +1634,7 @@ ...@@ -1610,6 +1634,7 @@
} }
Leaf.onReady(function () { Leaf.onReady(function () {
debugger;
//自然人不展示财报按钮 //自然人不展示财报按钮
if('${/parameter/@bp_class}' == 'NP' && document.getElementById('${/parameter/@layout_code}_user_button2') ){ if('${/parameter/@bp_class}' == 'NP' && document.getElementById('${/parameter/@layout_code}_user_button2') ){
document.getElementById('${/parameter/@layout_code}_user_button2').style.display = 'none'; document.getElementById('${/parameter/@layout_code}_user_button2').style.display = 'none';
......
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