优化角色和按钮权限
This commit is contained in:
@@ -1,22 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"text": "导入导出"
|
||||
"text": "编辑"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"text": "启用禁用"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"text": "审核反审核"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"text": "导入导出"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"text": "打印"
|
||||
"text": "启用禁用"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"text": "打印"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"text": "作废"
|
||||
}
|
||||
]
|
||||
@@ -26,9 +26,11 @@
|
||||
var btnEnableList = getBtnStr(); //获取按钮的权限
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
var defaultAccountId = 0; //默认账户id
|
||||
var roleType = ""; //角色类型
|
||||
$(function(){
|
||||
//初始化系统基础信息
|
||||
getType();
|
||||
getRoleType();
|
||||
initSystemData_UB();
|
||||
initSystemData_depot();
|
||||
initSystemData_account();
|
||||
@@ -142,6 +144,21 @@
|
||||
amountNum = "CXD";
|
||||
}
|
||||
}
|
||||
function getRoleType(){
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: "/user/getRoleTypeByUserId",
|
||||
async: false,
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
roleType = res.data.roleType;
|
||||
}
|
||||
else {
|
||||
roleType = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB(){
|
||||
$.ajax({
|
||||
@@ -360,8 +377,8 @@
|
||||
}
|
||||
}
|
||||
];
|
||||
//如果允许的按钮列表中存在就显示,3-代表审核|反审核的权限
|
||||
if(btnEnableList && btnEnableList.indexOf(3)>-1 && listTitle.indexOf("订单")>-1){
|
||||
//如果允许的按钮列表中存在就显示,2-代表审核|反审核的权限
|
||||
if(btnEnableList && btnEnableList.indexOf(2)>-1 && listTitle.indexOf("订单")>-1){
|
||||
isHiddenStatus = false; //显示
|
||||
tableToolBar.push({
|
||||
id:'okDepotHead',
|
||||
@@ -2214,6 +2231,7 @@
|
||||
search: JSON.stringify({
|
||||
type: listType,
|
||||
subType: listSubType,
|
||||
roleType: roleType,
|
||||
state: $.trim($("#searchState").val()),
|
||||
number: $.trim($("#searchNumber").val()),
|
||||
beginTime: beginTime,
|
||||
|
||||
Reference in New Issue
Block a user