Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 6ed7bda4
authored
Nov 22, 2021
by
test
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
活码调整
1 parent
52f42204
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
28 deletions
linkwe-ui/src/api/drainageCode/staff.js
linkwe-ui/src/views/drainageCode/staff/add.vue
linkwe-ui/src/views/drainageCode/staff/detail.vue
linkwe-ui/src/api/drainageCode/staff.js
View file @
6ed7bda
...
...
@@ -24,13 +24,13 @@ const service = '/wecom/category'
}]
}
*/
export
function
update
(
data
)
{
return
request
({
url
:
service
+
'/update'
,
method
:
'put'
,
data
})
}
//
export function update (data) {
//
return request({
//
url: service + '/update',
//
method: 'put',
//
data
//
})
//
}
/**
...
...
@@ -138,6 +138,14 @@ export function add (data) {
})
}
export
function
update
(
data
)
{
return
request
({
url
:
'/wecom/qr/update'
,
method
:
'put'
,
data
})
}
// 活码详情
export
function
getDetail
(
id
)
{
return
request
({
...
...
linkwe-ui/src/views/drainageCode/staff/add.vue
View file @
6ed7bda
...
...
@@ -78,7 +78,7 @@
<div
v-if=
"codeForm.weEmpleCodeUseScops.length > 0"
>
<el-tag
size=
"medium"
v-for=
"(item, index) in codeForm.weEmpleCodeUseScops"
:key=
"index"
>
{{ item.businessName }}
</el-tag>
</div>
<el-button
type=
"primary"
plain
size=
"mini"
@
click=
"onSelectUser"
>
{{ codeForm.weEmpleCodeUseScops.length ? '修改' : '选择' }}员工
</el-button>
<el-button
style=
"margin-left:10px;"
type=
"primary"
plain
size=
"mini"
@
click=
"onSelectUser"
>
{{ codeForm.weEmpleCodeUseScops.length ? '修改' : '选择' }}员工
</el-button>
<div
class=
"sub-des"
>
单人活码只能选择一个员工,多人活码支持选择多个员工
</div>
</el-form-item>
<el-form-item
v-if=
"codeForm.qrRuleType == 2"
label=
"活码排班"
prop=
"empleCodeRosterDto"
>
...
...
@@ -86,7 +86,7 @@
<el-card
class=
"box-card roster-card"
:key=
"item.id"
>
<el-form-item
label=
"排班员工"
>
<el-tag
size=
"medium"
v-for=
"(tag, key) in item.weEmpleCodeUseScops"
:key=
"key"
>
{{
tag
.
businessName
}}
</el-tag>
<el-button
size=
"mini"
type=
"primary"
plain
@
click=
"onSelectUser(index)"
>
{{
item
.
weEmpleCodeUseScops
.
length
?
'修改'
:
'选择'
}}
员工
</el-button>
<el-button
s
tyle=
"margin-left:10px;"
s
ize=
"mini"
type=
"primary"
plain
@
click=
"onSelectUser(index)"
>
{{
item
.
weEmpleCodeUseScops
.
length
?
'修改'
:
'选择'
}}
员工
</el-button>
</el-form-item>
<el-form-item
label=
"工作周期"
>
<el-checkbox-group
v-model=
"item.weekday"
@
change=
"checkStartEnd($event, index)"
>
...
...
@@ -288,7 +288,6 @@
}
})
})
// 重复人员下的时间校验
let
repeatWeek
=
[]
let
currentWeekday
=
this
.
codeForm
.
empleCodeRosterDto
[
this
.
operationIndex
].
weekday
...
...
@@ -457,26 +456,69 @@
this
.
formTemp
=
res
.
data
let
base
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
this
.
baseForm
=
{
qrName
:
base
.
qrN
ame
,
qrGroupId
:
base
.
qrG
roupId
,
qrAutoAdd
:
base
.
qrA
utoAdd
,
// 自动通过
qrName
:
base
.
n
ame
,
qrGroupId
:
base
.
g
roupId
,
qrAutoAdd
:
base
.
a
utoAdd
,
// 自动通过
weEmpleCodeTags
:
base
.
qrTags
,
// 标签
}
this
.
codeForm
.
qrType
=
base
.
qrType
this
.
codeForm
.
qrRuleType
=
base
.
qrRuleType
if
(
base
.
qrRuleType
===
1
)
{
this
.
codeForm
.
weEmpleCodeUseScops
=
base
.
weEmpleCodeUseScops
this
.
codeForm
.
qrType
=
base
.
type
this
.
codeForm
.
qrRuleType
=
base
.
ruleType
// if (this.codeForm.qrRuleType === 1) {
// let obj = {
// type: 1,
// userIds: this.codeForm.weEmpleCodeUseScops.map(dd => dd.businessId)
// }
// this.codeForm.qrUserInfos = [obj]
// } else {
// this.codeForm.qrUserInfos = []
// this.codeForm.empleCodeRosterDto.forEach(fff => {
// let obj = {
// type: fff.type,
// beginTime: fff.startDate,
// endTime: fff.endDate,
// userIds: fff.weEmpleCodeUseScops.map(dd => dd.businessId),
// workCycle: fff.weekday
// }
// this.codeForm.qrUserInfos.push(obj)
// })
// }
if
(
base
.
ruleType
===
1
)
{
let
arr
=
[]
base
.
qrUserInfos
[
0
].
weQrUserList
.
forEach
(
dd
=>
{
let
obj
=
{
scopeId
:
base
.
qrUserInfos
[
0
].
scopeId
,
businessId
:
dd
.
userId
,
businessName
:
dd
.
userName
}
arr
.
push
(
obj
)
})
this
.
codeForm
.
weEmpleCodeUseScops
=
arr
}
else
{
this
.
codeForm
.
empleCodeRosterDto
=
base
.
empleCodeRosterDto
let
arr
=
[]
base
.
qrUserInfos
.
forEach
(
dd
=>
{
let
obj
=
{
type
:
dd
.
type
,
startDate
:
dd
.
beginTime
,
endDate
:
dd
.
endTime
,
weekday
:
dd
.
workCycle
?
dd
.
workCycle
.
split
(
','
).
map
(
i
=>
parseInt
(
i
,
0
))
:
[],
scopeId
:
dd
.
scopeId
,
weEmpleCodeUseScops
:
dd
.
weQrUserList
.
map
(
ff
=>
{
return
{
businessId
:
ff
.
userId
,
businessName
:
ff
.
userName
}
})
}
arr
.
push
(
obj
)
console
.
log
(
obj
)
})
this
.
codeForm
.
empleCodeRosterDto
=
arr
}
this
.
materialData
=
{
welcomeMsg
:
base
.
welcomeMsg
,
mediaId
:
base
.
mediaId
,
materialMsgList
:
base
.
materialMsgList
?
base
.
materialMsgList
:
[]
welcomeMsg
:
base
.
qrAttachments
?
base
.
qrAttachments
[
0
].
content
:
''
,
materialMsgList
:
base
.
qrAttachments
?
base
.
qrAttachments
.
slice
(
1
)
:
[]
}
this
.
materialData
.
materialMsgList
.
forEach
(
ddd
=>
{
ddd
.
msgType
=
Number
(
ddd
.
msgType
)
})
//
this.materialData.materialMsgList.forEach(ddd => {
//
ddd.msgType = Number(ddd.msgType)
//
})
this
.
loading
=
false
})
},
...
...
@@ -591,6 +633,7 @@
console
.
log
(
this
.
codeForm
)
let
obj
=
{
type
:
1
,
scopeId
:
this
.
codeForm
.
weEmpleCodeUseScops
[
0
].
scopeId
?
this
.
codeForm
.
weEmpleCodeUseScops
[
0
].
scopeId
:
''
,
userIds
:
this
.
codeForm
.
weEmpleCodeUseScops
.
map
(
dd
=>
dd
.
businessId
)
}
this
.
codeForm
.
qrUserInfos
=
[
obj
]
...
...
@@ -598,6 +641,7 @@
this
.
codeForm
.
qrUserInfos
=
[]
this
.
codeForm
.
empleCodeRosterDto
.
forEach
(
fff
=>
{
let
obj
=
{
scopeId
:
fff
.
scopeId
?
fff
.
scopeId
:
''
,
type
:
fff
.
type
,
beginTime
:
fff
.
startDate
,
endTime
:
fff
.
endDate
,
...
...
@@ -613,7 +657,8 @@
delete
obj
.
weEmpleCodeUseScops
delete
obj
.
empleCodeRosterDto
if
(
this
.
formTemp
.
id
)
{
obj
.
id
=
this
.
formTemp
.
id
obj
.
qrId
=
this
.
formTemp
.
id
obj
.
configId
=
this
.
formTemp
.
configId
}
(
this
.
formTemp
.
id
?
update
:
add
)(
obj
)
.
then
(({
...
...
linkwe-ui/src/views/drainageCode/staff/detail.vue
View file @
6ed7bda
...
...
@@ -79,10 +79,16 @@
<el-checkbox
label=
"7"
disabled
>
周日
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
style=
"margin-bottom: 10px"
label=
"在线时间"
>
<el-form-item
v-if=
"unit.type === 1"
v-model=
"checkList"
style=
"margin-bottom: 10px"
label=
"在线时间"
>
<el-time-select
disabled
value=
"00:00"
placeholder=
"任意时间点"
>
</el-time-select>
<el-time-select
arrow-control
disabled
value=
"23:59"
placeholder=
"任意时间点"
>
<el-time-select
disabled
value=
"23:59"
placeholder=
"任意时间点"
>
</el-time-select>
</el-form-item>
<el-form-item
v-else
style=
"margin-bottom: 10px"
label=
"在线时间"
>
<el-time-select
disabled
:value=
"unit.beginTime"
placeholder=
"任意时间点"
>
</el-time-select>
<el-time-select
disabled
:value=
"unit.endTime"
placeholder=
"任意时间点"
>
</el-time-select>
</el-form-item>
</el-form>
...
...
@@ -235,10 +241,13 @@
this
.
loading
=
true
getDetail
(
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
if
(
this
.
form
.
qrAttachments
)
{
if
(
this
.
form
.
qrAttachments
&&
this
.
form
.
qrAttachments
.
length
)
{
this
.
form
.
welcomeMsg
=
this
.
form
.
qrAttachments
[
0
].
content
this
.
form
.
materialMsgList
=
this
.
form
.
qrAttachments
.
slice
(
1
)
}
this
.
form
.
qrUserInfos
.
forEach
(
dd
=>
{
dd
.
weekday
=
dd
.
workCycle
.
split
(
','
)
})
this
.
loading
=
false
this
.
setTime
(
7
)
})
...
...
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