Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
ba44fab6
Commit
ba44fab6
authored
Aug 02, 2023
by
yangzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:工单管理
parent
7948aeff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
158 additions
and
62 deletions
+158
-62
src/common/api/order.js
+2
-5
src/views/taskManage/index.vue
+156
-57
No files found.
src/common/api/order.js
View file @
ba44fab6
...
...
@@ -15,11 +15,8 @@ export function workConfirmed(id) {
)
}
export
function
workAssigned
(
id
,
user
)
{
return
axios
.
post
(
'platform/platformWorkOrder/assign'
,
{
id
:
id
,
leaders
:
user
,
})
export
function
workAssigned
(
data
)
{
return
axios
.
post
(
'platform/platformWorkOrder/assign'
,
data
)
}
export
function
startWorder
(
id
,
estimateCompleteTime
)
{
...
...
src/views/taskManage/index.vue
View file @
ba44fab6
...
...
@@ -67,6 +67,14 @@
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"工单标题"
>
<el-input
style=
"width: 120px"
v-model=
"searchForm.title"
placeholder=
"请输入"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"工单类型"
>
<el-select
v-model=
"searchForm.orderType"
...
...
@@ -84,21 +92,11 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"工单标题"
>
<el-input
style=
"width: 120px"
v-model=
"searchForm.title"
placeholder=
"请输入"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"负责人"
>
<el-select
style=
"width: 120px"
placeholder=
"请选择"
clearable
multiple
collapse-tags
v-model=
"searchForm.leaders"
>
<el-option
...
...
@@ -409,21 +407,63 @@
title=
"指派给"
:close-on-click-modal=
"false"
:visible
.
sync=
"assignVisible"
width=
"
30
0px"
width=
"
65
0px"
>
<el-select
style=
"width: 100%"
size=
"small"
v-model=
"user"
multiple
<el-form
:inline=
"true"
size=
"mini"
:model=
"assignForm"
ref=
"assignForm"
:rules=
"assignFormRules"
label-width=
"110px"
>
<el-option
v-for=
"user in userList"
:key=
"user.id"
:label=
"user.realName"
:value=
"user.id"
></el-option>
</el-select>
<el-form-item
label=
"负责人"
prop=
"leaders"
>
<el-select
style=
"width: 100%"
size=
"small"
v-model=
"assignForm.leaders"
>
<el-option
v-for=
"user in userList"
:key=
"user.id"
:label=
"user.realName"
:value=
"user.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"参与人"
prop=
"participator"
>
<el-select
style=
"width: 100%"
size=
"small"
v-model=
"assignForm.participator"
multiple
>
<el-option
v-for=
"user in userList"
:key=
"user.id"
:label=
"user.realName"
:value=
"user.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"验收人"
prop=
"acceptanceUserId"
>
<el-select
style=
"width: 100%"
size=
"small"
v-model=
"assignForm.acceptanceUserId"
>
<el-option
v-for=
"user in userList"
:key=
"user.id"
:label=
"user.realName"
:value=
"user.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
>
<el-button
size=
"mini"
...
...
@@ -517,6 +557,29 @@ export default {
data
()
{
const
userInfo
=
localStorage
.
getItem
(
'user'
)
return
{
assignFormRules
:
{
leaders
:
[
{
required
:
true
,
message
:
'请选择负责人'
,
trigger
:
'blur'
,
},
],
fromUser
:
[
{
required
:
true
,
message
:
'请选择参与人'
,
trigger
:
'blur'
,
},
],
acceptanceUserId
:
[
{
required
:
true
,
message
:
'请选择验收人'
,
trigger
:
'blur'
,
},
],
},
priorityStatusList
:
[
{
value
:
1
,
...
...
@@ -533,7 +596,7 @@ export default {
],
loading
:
false
,
detailLoading
:
false
,
user
:
[]
,
assignForm
:
{}
,
textarea
:
''
,
centerPageOptions
:
{
pageSize
:
100
,
...
...
@@ -549,7 +612,6 @@ export default {
statusCode
:
'PRE_HANDLING'
,
searchForm
:
{
timeProp
:
'create_time'
,
leaders
:
[],
prop
:
'createTime'
,
},
isEdit
:
false
,
...
...
@@ -573,6 +635,7 @@ export default {
editDialog
:
false
,
completeVisible
:
false
,
estimateCompleteTime
:
''
,
currentItem
:
null
,
}
},
mounted
()
{
...
...
@@ -624,7 +687,7 @@ export default {
width
:
80
,
},
{
label
:
'
验收意见
'
,
label
:
'
用户评价
'
,
key
:
'evaluations'
,
width
:
140
,
},
...
...
@@ -644,16 +707,25 @@ export default {
width
:
80
,
},
{
label
:
'参与人'
,
key
:
'fromBusiness'
,
width
:
80
,
},
{
label
:
'优先级'
,
key
:
'priorityStatus'
,
width
:
80
,
render
:
item
=>
{
if
(
item
.
priorityStatus
)
{
return
this
.
priorityStatusList
.
find
(
v
=>
{
return
v
.
value
===
item
.
priorityStatus
}).
name
if
(
item
.
orderStatus
===
'TO_BE_ASSIGN'
)
{
console
.
log
(
132
)
}
else
{
return
''
if
(
item
.
priorityStatus
)
{
return
this
.
priorityStatusList
.
find
(
v
=>
{
return
v
.
value
===
item
.
priorityStatus
}).
name
}
else
{
return
''
}
}
},
},
...
...
@@ -788,7 +860,8 @@ export default {
/
>
<
/span
>
)}
{
item
.
orderStatus
===
'PRE_HANDLING'
&&
(
{(
item
.
orderStatus
===
'PRE_HANDLING'
||
item
.
orderStatus
===
'IN_COMPLETE'
)
&&
(
<
span
title
=
"关闭"
class
=
"icon-view"
>
<
img
width
=
"24"
...
...
@@ -818,6 +891,7 @@ export default {
},
},
methods
:
{
setStatus
()
{},
handlePriorityStatus
(
data
)
{
if
(
data
)
{
return
this
.
priorityStatusList
.
find
(
v
=>
{
...
...
@@ -959,42 +1033,52 @@ export default {
this
.
currentRowId
=
item
.
id
this
.
taskLeader
=
''
this
.
assignVisible
=
true
this
.
user
=
''
this
.
assignForm
=
JSON
.
parse
(
JSON
.
stringify
({
leaders
:
''
,
participator
:
[],
acceptanceUserId
:
''
,
}),
)
},
// 开始工单
async
startWorkOrder
(
item
)
{
this
.
estimateCompleteTime
=
''
this
.
completeVisible
=
true
this
.
rowId
=
item
.
id
this
.
currentItem
=
item
},
// 提交分派
async
submitAssign
()
{
if
(
this
.
user
.
length
===
0
)
{
return
this
.
$message
.
warning
(
'请选择负责人'
)
}
const
user
=
this
.
user
.
join
(
','
)
try
{
const
res
=
await
workAssigned
(
this
.
currentRowId
,
user
,
)
if
(
res
.
code
===
200
)
{
this
.
assignVisible
=
false
this
.
getOrderTree
()
this
.
getlist
()
this
.
$refs
.
assignForm
.
validate
(
v
=>
{
if
(
v
)
{
try
{
workAssigned
({
id
:
this
.
currentRowId
,
...
this
.
assignForm
,
participator
:
this
.
assignForm
.
participator
.
join
(
','
,
),
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
assignVisible
=
false
this
.
getOrderTree
()
this
.
getlist
()
}
})
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
}
catch
(
e
)
{
console
.
error
(
e
)
}
})
},
handleNodeClick
(
data
)
{
if
(
data
.
statusCode
===
'IN_PROGRESS'
)
{
this
.
$set
(
this
.
searchForm
,
'leaders'
,
[
this
.
$set
(
this
.
searchForm
,
'leaders'
,
this
.
userInfo
.
id
,
])
}
if
(
data
.
statusCode
!==
'IN_PROGRESS'
)
{
this
.
searchForm
.
leaders
=
[]
)
}
this
.
statusCode
=
data
.
statusCode
this
.
getlist
()
...
...
@@ -1013,9 +1097,6 @@ export default {
startTime
:
this
.
periodTime
&&
this
.
periodTime
[
0
],
endTime
:
this
.
periodTime
&&
this
.
periodTime
[
1
],
...
this
.
searchForm
,
leaders
:
this
.
searchForm
.
leaders
&&
this
.
searchForm
.
leaders
.
join
(
','
),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
200
)
return
...
...
@@ -1124,10 +1205,28 @@ export default {
})
}
catch
{}
},
formaTime
(
data
)
{
const
date1
=
new
Date
()
const
date2
=
new
Date
(
data
)
if
(
date2
>=
date1
)
{
return
true
}
else
{
return
false
}
},
async
submitTime
()
{
if
(
!
this
.
estimateCompleteTime
)
{
return
this
.
$message
.
warning
(
'请选择预计完成时间'
)
}
if
(
this
.
formaTime
(
this
.
currentItem
.
estimateCompleteTime
,
)
)
{
return
this
.
$message
.
warning
(
'预计完成时间不能小于当前时间'
,
)
}
try
{
const
res
=
await
startWorder
(
this
.
rowId
,
...
...
Write
Preview
Markdown
is supported
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