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 37ace8ca
authored
Oct 26, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改多选
1 parent
7d8e33ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
17 deletions
html/employee/add.html
html/employee/detail.html
html/employee/add.html
View file @
37ace8c
...
@@ -122,6 +122,10 @@
...
@@ -122,6 +122,10 @@
xm-select
>
.xm-body
.scroll-body
{
xm-select
>
.xm-body
.scroll-body
{
width
:
360px
;
width
:
360px
;
}
}
xm-select
:hover
{
border
:
1px
solid
#5850ff
!important
;
}
</style>
</style>
</head>
</head>
...
@@ -236,12 +240,13 @@
...
@@ -236,12 +240,13 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
员工标签:
</label>
<label
class=
"layui-form-label"
>
员工标签:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<select
name=
"staffLabel"
id=
"tagAuth"
>
<div
id=
"tagAuth"
name=
"staffLabel"
class=
"xm-select-demo"
></div>
<!-- <select name="staffLabel" id="tagAuth" xm-select="selectId">
<option value="0">1.0新车权益销售</option>
<option value="0">1.0新车权益销售</option>
<option value="1">1.1次新车精品升级</option>
<option value="1">1.1次新车精品升级</option>
<option value="2">1.2次新车线上转化</option>
<option value="2">1.2次新车线上转化</option>
<option value="3">1.3存量用户众筹</option>
<option value="3">1.3存量用户众筹</option>
</select>
</select>
-->
</div>
</div>
</div>
</div>
...
@@ -317,6 +322,45 @@
...
@@ -317,6 +322,45 @@
}
}
}
}
// 员工标签
var
tagAuth
=
xmSelect
.
render
({
el
:
'#tagAuth'
,
prop
:
{
name
:
'name'
,
value
:
'value'
},
// layVerify: `${qs('channel') ? '' : 'required'}`,
// model: {
// label: {
// type: 'text',
// text: {}
// }
// },
name
:
'staffLabel'
,
selected
:
true
,
data
:
[
{
name
:
'1.0新车权益销售'
,
value
:
'0'
},
{
name
:
'1.1次新车精品升级'
,
value
:
'1'
},
{
name
:
'1.2次新车线上转化'
,
value
:
'2'
},
{
name
:
'1.3存量用户众筹'
,
value
:
'3'
}
],
on
:
function
(
data
)
{
staffLabel
=
data
.
change
[
0
].
value
}
})
var
merchantNameSelect
=
xmSelect
.
render
({
var
merchantNameSelect
=
xmSelect
.
render
({
el
:
'#merchantNameSelect'
,
el
:
'#merchantNameSelect'
,
...
@@ -337,7 +381,6 @@
...
@@ -337,7 +381,6 @@
radio
:
true
,
radio
:
true
,
data
:
[],
data
:
[],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
console
.
log
(
data
)
merchantId
=
data
.
change
[
0
].
id
merchantId
=
data
.
change
[
0
].
id
getList
(
merchantId
)
getList
(
merchantId
)
}
}
...
@@ -545,7 +588,6 @@
...
@@ -545,7 +588,6 @@
function
getVisibleMerchant
(
merchantId
)
{
function
getVisibleMerchant
(
merchantId
)
{
var
visibleMerchantParams
=
{
id
:
merchantId
,
method
:
'merchants.api.merchant.findMerchantTree'
}
var
visibleMerchantParams
=
{
id
:
merchantId
,
method
:
'merchants.api.merchant.findMerchantTree'
}
request
(
visibleMerchantParams
,
function
(
res
)
{
request
(
visibleMerchantParams
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
const
data
=
res
.
data
const
data
=
res
.
data
if
(
id
)
{
if
(
id
)
{
...
@@ -584,7 +626,6 @@
...
@@ -584,7 +626,6 @@
}
}
function
createMerchant
(
arr
,
data
)
{
function
createMerchant
(
arr
,
data
)
{
console
.
log
(
arr
,
data
)
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
data
,
null
,
{
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
data
,
null
,
{
check
:
{
check
:
{
enable
:
true
,
enable
:
true
,
...
@@ -655,11 +696,14 @@
...
@@ -655,11 +696,14 @@
staffEmail
:
data
.
staffEmail
,
staffEmail
:
data
.
staffEmail
,
staffJob
:
data
.
staffJob
,
staffJob
:
data
.
staffJob
,
department
:
data
.
department
,
department
:
data
.
department
,
staffLabel
:
data
.
staffLabel
,
weChatNickName
:
data
.
weChatNickName
,
weChatNickName
:
data
.
weChatNickName
,
weChatPhone
:
data
.
weChatPhone
,
weChatPhone
:
data
.
weChatPhone
,
weChatOpenId
:
data
.
weChatOpenId
weChatOpenId
:
data
.
weChatOpenId
}
}
if
(
data
.
staffLabel
)
{
var
item
=
data
.
staffLabel
.
split
(
','
.
toString
())
tagAuth
.
setValue
(
item
)
}
if
(
data
.
merchantFileResponse
)
{
if
(
data
.
merchantFileResponse
)
{
merchantFileRequest
=
{
fileName
:
data
.
merchantFileResponse
.
fileName
,
fileUrl
:
data
.
merchantFileResponse
.
fileUrl
}
merchantFileRequest
=
{
fileName
:
data
.
merchantFileResponse
.
fileName
,
fileUrl
:
data
.
merchantFileResponse
.
fileUrl
}
$
(
'#img'
).
attr
(
'src'
,
merchantFileRequest
.
fileUrl
)
$
(
'#img'
).
attr
(
'src'
,
merchantFileRequest
.
fileUrl
)
...
...
html/employee/detail.html
View file @
37ace8c
...
@@ -372,7 +372,7 @@
...
@@ -372,7 +372,7 @@
}
}
// 所属部门
// 所属部门
if
(
employeeData
.
department
)
{
if
(
employeeData
.
department
)
{
switch
(
employeeData
.
department
)
{
switch
(
employeeData
.
department
)
{
case
1
:
case
1
:
$
(
'#department'
).
text
(
'销售部'
)
$
(
'#department'
).
text
(
'销售部'
)
break
;
break
;
...
@@ -388,25 +388,32 @@
...
@@ -388,25 +388,32 @@
default
:
default
:
$
(
'#department'
).
text
(
'无'
)
$
(
'#department'
).
text
(
'无'
)
}
}
}
}
// 员工标签
// 员工标签
if
(
employeeData
.
staffLabel
)
{
if
(
employeeData
.
staffLabel
)
{
switch
(
employeeData
.
staffLabel
)
{
employeeData
.
staffLabel
=
employeeData
.
staffLabel
.
split
(
','
)
case
0
:
console
.
log
(
employeeData
.
staffLabel
,
'0'
);
$
(
'#staffLabel'
).
text
(
'1.0新车权益销售'
)
employeeData
.
staffLabel
.
map
((
item
,
index
)
=>
{
switch
(
item
)
{
case
'0'
:
employeeData
.
staffLabel
[
index
]
=
'1.0新车权益销售'
break
;
break
;
case
1
:
case
'1'
:
$
(
'#staffLabel'
).
text
(
'1.1次新车精品升级'
)
employeeData
.
staffLabel
[
index
]
=
'1.1次新车精品升级'
break
;
break
;
case
2
:
case
'2'
:
$
(
'#staffLabel'
).
text
(
'1.2次新车线上转化'
)
employeeData
.
staffLabel
[
index
]
=
'1.2次新车线上转化'
break
;
break
;
case
3
:
case
'3'
:
$
(
'#staffLabel'
).
text
(
'1.3存量用户众筹'
)
employeeData
.
staffLabel
[
index
]
=
'1.3存量用户众筹'
break
;
break
;
default
:
default
:
$
(
'#staffLabel'
).
text
(
'无'
)
employeeData
.
staffLabel
[
index
]
=
'无'
}
}
})
console
.
log
(
employeeData
.
staffLabel
.
join
(
','
),
'1'
);
$
(
'#staffLabel'
).
text
(
employeeData
.
staffLabel
.
join
(
','
))
}
}
if
(
employeeData
.
visibleInferiorMerName
)
{
if
(
employeeData
.
visibleInferiorMerName
)
{
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
...
...
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