Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f490a1da
authored
Oct 19, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
8c4dc39c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
146 additions
and
16 deletions
html/employee/add.html
html/employee/detail.html
js/load.js
html/employee/add.html
View file @
f490a1d
...
@@ -221,6 +221,54 @@
...
@@ -221,6 +221,54 @@
class=
"layui-input"
/>
class=
"layui-input"
/>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所属部门:
</label>
<div
class=
"layui-input-block"
>
<select
name=
"department"
id=
"departmentAuth"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
销售部
</option>
<option
value=
"2"
>
售后部
</option>
<option
value=
"3"
>
客服部
</option>
<option
value=
"4"
>
续保部
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
员工标签:
</label>
<div
class=
"layui-input-block"
>
<select
name=
"staffLabel"
id=
"tagAuth"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
1.0新车权益销售
</option>
<option
value=
"1"
>
1.1次新车精品升级
</option>
<option
value=
"2"
>
1.2次新车线上转化
</option>
<option
value=
"3"
>
1.3存量用户众筹
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item hide"
id=
"wechatNick"
>
<label
class=
"layui-form-label"
>
微信昵称:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffJob"
readonly
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item hide"
id=
"wechatPhone"
>
<label
class=
"layui-form-label"
>
微信手机号:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffJob"
readonly
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item hide"
id=
"wechatId"
>
<label
class=
"layui-form-label"
>
微信openid:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffJob"
readonly
class=
"layui-input"
/>
</div>
</div>
<div
class=
"footer-close"
>
<div
class=
"footer-close"
>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"employeeSubmit"
>
确定
</button>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"employeeSubmit"
>
确定
</button>
<button
type=
"reset"
class=
"layui-btn"
id=
"return"
>
取消
</button>
<button
type=
"reset"
class=
"layui-btn"
id=
"return"
>
取消
</button>
...
@@ -249,6 +297,9 @@
...
@@ -249,6 +297,9 @@
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
resetpsw
=
$
(
'#resetpsw'
)
var
resetpsw
=
$
(
'#resetpsw'
)
var
roleAuth
=
$
(
'#roleAuth'
)
var
roleAuth
=
$
(
'#roleAuth'
)
var
wechatNick
=
$
(
'#wechatNick'
)
var
wechatPhone
=
$
(
'#wechatPhone'
)
var
wechatId
=
$
(
'#wechatId'
)
var
merchantName
=
$
(
'#merchantName'
)
var
merchantName
=
$
(
'#merchantName'
)
var
merchantId
=
''
var
merchantId
=
''
var
visibleMerchant
=
{}
var
visibleMerchant
=
{}
...
@@ -310,6 +361,12 @@
...
@@ -310,6 +361,12 @@
// 判断是否是编辑
// 判断是否是编辑
resetpsw
.
removeClass
(
'hide'
)
resetpsw
.
removeClass
(
'hide'
)
resetpsw
.
addClass
(
'show'
)
resetpsw
.
addClass
(
'show'
)
wechatNick
.
removeClass
(
'hide'
)
wechatNick
.
addClass
(
'show'
)
wechatPhone
.
removeClass
(
'hide'
)
wechatPhone
.
addClass
(
'show'
)
wechatId
.
removeClass
(
'hide'
)
wechatId
.
addClass
(
'show'
)
merchantId
=
encodeURI
(
qs
(
'merchantId'
))
merchantId
=
encodeURI
(
qs
(
'merchantId'
))
$
(
'#merchantIdText'
).
text
(
decodeURIComponent
(
qs
(
'merchantName'
)))
$
(
'#merchantIdText'
).
text
(
decodeURIComponent
(
qs
(
'merchantName'
)))
$
(
'#merchantIdText'
).
removeClass
(
'hide'
)
$
(
'#merchantIdText'
).
removeClass
(
'hide'
)
...
@@ -598,7 +655,9 @@
...
@@ -598,7 +655,9 @@
// visibleInferiorMer: "1",
// visibleInferiorMer: "1",
roleIds
:
data
.
roleIds
?
+
data
.
roleIds
.
join
(
''
)
:
''
,
roleIds
:
data
.
roleIds
?
+
data
.
roleIds
.
join
(
''
)
:
''
,
staffEmail
:
data
.
staffEmail
,
staffEmail
:
data
.
staffEmail
,
staffJob
:
data
.
staffJob
staffJob
:
data
.
staffJob
,
department
:
data
.
department
,
staffLabel
:
data
.
staffLabel
}
}
if
(
data
.
merchantFileResponse
)
{
if
(
data
.
merchantFileResponse
)
{
merchantFileRequest
=
{
fileName
:
data
.
merchantFileResponse
.
fileName
,
fileUrl
:
data
.
merchantFileResponse
.
fileUrl
}
merchantFileRequest
=
{
fileName
:
data
.
merchantFileResponse
.
fileName
,
fileUrl
:
data
.
merchantFileResponse
.
fileUrl
}
...
...
html/employee/detail.html
View file @
f490a1d
...
@@ -172,6 +172,36 @@
...
@@ -172,6 +172,36 @@
<div
class=
"layui-form-mid layui-word-aux"
id=
"createdAccount"
></div>
<div
class=
"layui-form-mid layui-word-aux"
id=
"createdAccount"
></div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所属部门:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"department"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
员工标签:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"staffLabel"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信昵称:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatNickName"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信手机号:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatPhone"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信openid:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatOpenId"
></div>
</div>
</div>
</div>
</div>
<div
class=
"topmidwrap"
>
<div
class=
"topmidwrap"
>
<div
class=
"grayLine"
></div>
<div
class=
"grayLine"
></div>
...
@@ -232,7 +262,7 @@
...
@@ -232,7 +262,7 @@
var
table
=
layui
.
table
var
table
=
layui
.
table
var
laypage
=
layui
.
laypage
var
laypage
=
layui
.
laypage
var
merchantId
=
qs
(
'merchantId'
)
var
merchantId
=
qs
(
'merchantId'
)
var
basicArr
=
[
'staffName'
,
'staffPhone'
,
'entmicroName'
,
'staffJob'
,
'roleName'
,
'roleCode'
,
'merchantName'
,
'createdAccount'
]
var
basicArr
=
[
'staffName'
,
'staffPhone'
,
'entmicroName'
,
'staffJob'
,
'roleName'
,
'roleCode'
,
'merchantName'
,
'createdAccount'
,
'department'
,
'staffLabel'
,
'weChatNickName'
,
'weChatPhone'
,
'weChatOpenId'
]
var
employeeData
=
{}
var
employeeData
=
{}
var
visibleInferiorMerName
=
$
(
'#visibleInferiorMerName'
)
var
visibleInferiorMerName
=
$
(
'#visibleInferiorMerName'
)
...
@@ -340,6 +370,44 @@
...
@@ -340,6 +370,44 @@
for
(
var
i
in
basicArr
)
{
for
(
var
i
in
basicArr
)
{
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
employeeData
[
basicArr
[
i
]]
?
employeeData
[
basicArr
[
i
]]
:
'无'
)
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
employeeData
[
basicArr
[
i
]]
?
employeeData
[
basicArr
[
i
]]
:
'无'
)
}
}
// 所属部门
if
(
employeeData
.
department
)
{
switch
(
employeeData
.
department
)
{
case
1
:
$
(
'#department'
).
text
(
'销售部'
)
break
;
case
2
:
$
(
'#department'
).
text
(
'售后部'
)
break
;
case
3
:
$
(
'#department'
).
text
(
'客服部'
)
break
;
case
4
:
$
(
'#department'
).
text
(
'续保部'
)
break
;
default
:
$
(
'#department'
).
text
(
'无'
)
}
}
// 员工标签
if
(
employeeData
.
staffLabel
)
{
switch
(
employeeData
.
staffLabel
)
{
case
0
:
$
(
'#staffLabel'
).
text
(
'1.0新车权益销售'
)
break
;
case
1
:
$
(
'#staffLabel'
).
text
(
'1.1次新车精品升级'
)
break
;
case
2
:
$
(
'#staffLabel'
).
text
(
'1.2次新车线上转化'
)
break
;
case
3
:
$
(
'#staffLabel'
).
text
(
'1.3存量用户众筹'
)
break
;
default
:
$
(
'#staffLabel'
).
text
(
'无'
)
}
}
if
(
employeeData
.
visibleInferiorMerName
)
{
if
(
employeeData
.
visibleInferiorMerName
)
{
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
$
.
each
(
visibleName
,
function
(
idx
,
i
)
{
$
.
each
(
visibleName
,
function
(
idx
,
i
)
{
...
...
js/load.js
View file @
f490a1d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* @LastEditTime: 2022-03-29 18:53:12
* @LastEditTime: 2022-03-29 18:53:12
* @FilePath: \account\js\load.js
* @FilePath: \account\js\load.js
*/
*/
;
(
function
load
()
{
;(
function
load
()
{
loadLayConfig
()
loadLayConfig
()
loadConfig
()
loadConfig
()
loadHeaderFooter
()
loadHeaderFooter
()
...
@@ -17,30 +17,33 @@
...
@@ -17,30 +17,33 @@
* 跳转方法 TODO
* 跳转方法 TODO
*/
*/
function
go
(
module
,
page
,
params
,
blank
)
{
function
go
(
module
,
page
,
params
,
blank
)
{
var
_p
=
(
!
params
||
layui
.
$
.
isEmptyObject
(
params
)
)
?
''
:
genurl
(
params
)
var
_p
=
!
params
||
layui
.
$
.
isEmptyObject
(
params
)
?
''
:
genurl
(
params
)
var
href
=
'/html/'
+
module
+
'/'
+
page
+
'.html'
var
href
=
'/html/'
+
module
+
'/'
+
page
+
'.html'
if
(
blank
)
{
if
(
blank
)
{
window
.
open
(
href
,
'_blank'
)
window
.
open
(
href
,
'_blank'
)
}
else
{
}
else
{
window
.
location
.
href
=
_p
?
href
+
'?'
+
_p
:
href
window
.
location
.
href
=
_p
?
href
+
'?'
+
_p
:
href
}
}
}
}
function
loadLayConfig
()
{
function
loadLayConfig
()
{
layui
.
config
({
layui
base
:
'/js/'
.
config
({
}).
extend
({
base
:
'/js/'
xmSelect
:
'xm-select'
})
})
.
extend
({
xmSelect
:
'xm-select'
})
}
}
function
loadHeaderFooter
()
{
function
loadHeaderFooter
()
{
layui
.
use
([
'store'
],
function
()
{
layui
.
use
([
'store'
],
function
()
{
var
isExternal
=
isAppend
()
var
isExternal
=
isAppend
()
var
store
=
layui
.
store
var
store
=
layui
.
store
if
(
isExternal
)
{
//运营平台外部系统
if
(
isExternal
)
{
//运营平台外部系统
append
()
append
()
}
else
{
//嵌入运营平台 或者是登录页面
}
else
{
//嵌入运营平台 或者是登录页面
if
(
qs
(
'sessionId'
))
{
if
(
qs
(
'sessionId'
))
{
// SCRM 系统
// SCRM 系统
store
.
set
(
'accountInfo'
,
{
store
.
set
(
'accountInfo'
,
{
...
@@ -51,7 +54,8 @@ function loadHeaderFooter() {
...
@@ -51,7 +54,8 @@ function loadHeaderFooter() {
store
.
set
(
'token'
,
qs
(
'sessionId'
))
store
.
set
(
'token'
,
qs
(
'sessionId'
))
}
else
{
}
else
{
// 运营平台
// 运营平台
if
(
isLoginPage
())
{
//如果是登陆页面 直接返回 登录成功会设置token
if
(
isLoginPage
())
{
//如果是登陆页面 直接返回 登录成功会设置token
return
return
}
}
var
t
=
qs
(
't'
)
//运营平台子系统从 父系统的iframe src获取 TGT.
var
t
=
qs
(
't'
)
//运营平台子系统从 父系统的iframe src获取 TGT.
...
@@ -69,7 +73,6 @@ function append() {
...
@@ -69,7 +73,6 @@ function append() {
$
(
header
).
load
(
'/html/components/header.html'
)
$
(
header
).
load
(
'/html/components/header.html'
)
$
(
footer
).
load
(
'/html/components/footer.html'
)
$
(
footer
).
load
(
'/html/components/footer.html'
)
$
(
'main'
).
before
(
header
).
after
(
footer
)
$
(
'main'
).
before
(
header
).
after
(
footer
)
}
}
function
isAppend
()
{
function
isAppend
()
{
...
@@ -90,8 +93,8 @@ function loadConfig() {
...
@@ -90,8 +93,8 @@ function loadConfig() {
}
}
var
ajax
=
layui
.
$
.
ajax
var
ajax
=
layui
.
$
.
ajax
ajax
({
ajax
({
url
:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config'
,
//
url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config',
//
url: 'http://oss-config.dev.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config',
url
:
'http://oss-config.dev.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config'
,
async
:
false
,
async
:
false
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
store
.
setEx
(
'external'
,
res
.
external
,
10
*
60
*
1000
)
store
.
setEx
(
'external'
,
res
.
external
,
10
*
60
*
1000
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment