Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
714624c1
Commit
714624c1
authored
Aug 02, 2020
by
季圣华
Browse files
优化用户模块
parent
1ea88a2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
erp_web/js/common/common.js
View file @
714624c1
...
...
@@ -422,6 +422,22 @@
return
res
;
}
/**
* 检查当前用户是否是管理员-用户模块
*/
function
checkPowerForUser
()
{
var
res
=
false
;
var
loginName
=
sessionStorage
.
getItem
(
"
loginName
"
);
if
(
loginName
==
"
admin
"
)
{
$
.
messager
.
alert
(
'
提示:本系统为多租户SAAS系统
'
,
'
请先到<a target="_parent" href="/register.html">注册页面</a>
'
+
'
进行租户注册,<br/>然后使用租户账号登录系统,<br/>最后通过租户去创建用户!
'
,
'
warning
'
);
res
=
true
;
}
else
{
res
=
false
;
}
return
res
;
}
/**
* 判断一个值是否数字
* @param value
...
...
erp_web/pages/manage/user.html
View file @
714624c1
...
...
@@ -186,7 +186,20 @@
return
str
;
}
},
{
title
:
'
登录名称
'
,
field
:
'
loginName
'
,
width
:
80
},
{
title
:
'
登录名称
'
,
field
:
'
loginName
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
用户类型
'
,
field
:
'
userType
'
,
width
:
80
,
formatter
:
function
(
value
,
rec
,
index
)
{
var
str
=
''
;
if
(
rec
.
id
==
rec
.
tenantId
)
{
str
=
"
租户
"
;
}
else
if
(
rec
.
tenantId
==
null
){
str
=
"
超管
"
;
}
else
{
str
=
"
普通
"
;
}
return
str
;
}
},
{
title
:
'
用户姓名
'
,
field
:
'
username
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
职位
'
,
field
:
'
position
'
,
width
:
115
,
align
:
"
center
"
},
{
title
:
'
部门
'
,
field
:
'
orgAbr
'
,
width
:
115
,
align
:
"
center
"
},
...
...
@@ -354,7 +367,7 @@
var
userID
=
0
;
function
addUser
()
{
if
(
checkPower
()){
if
(
checkPower
ForUser
()){
return
;
}
$
(
'
#userDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui/themes/icons/edit_add.png"/> 增加用户
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment