Commit 548b70d2 authored by 38823's avatar 38823

商业伙伴角色信息改造

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