Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
work-order-web
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
张圳龙
work-order-web
Commits
39e4701f
Commit
39e4701f
authored
Sep 27, 2020
by
Mr. Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加工单删除功能。
parent
a0427fb7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
work-order.js
src/api/process/work-order.js
+8
-0
all.vue
src/views/process/list/all.vue
+29
-2
No files found.
src/api/process/work-order.js
View file @
39e4701f
...
...
@@ -71,3 +71,11 @@ export function activeOrder(data, workOrderId) {
data
})
}
// 删除工单
export
function
deleteWorkOrder
(
workOrderId
)
{
return
request
({
url
:
`/api/v1/work-order/delete/
${
workOrderId
}
`
,
method
:
'delete'
})
}
src/views/process/list/all.vue
View file @
39e4701f
...
...
@@ -55,7 +55,7 @@
<span>
{{
parseTime
(
scope
.
row
.
create_time
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"
18
0"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"
24
0"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permisaction=
"['process:list:all:select']"
...
...
@@ -80,6 +80,13 @@
icon=
"el-icon-switch-button"
@
click=
"handleUnity(scope.row)"
>
结单
</el-button>
<el-button
v-permisaction=
"['process:list:all:delete']"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -122,7 +129,7 @@
</template>
<
script
>
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
}
from
'@/api/process/work-order'
import
{
workOrderList
,
unityWorkOrder
,
inversionWorkOrder
,
deleteWorkOrder
}
from
'@/api/process/work-order'
import
{
listUser
}
from
'@/api/system/sysuser'
export
default
{
data
()
{
...
...
@@ -174,6 +181,26 @@ export default {
handleView
(
row
)
{
this
.
$router
.
push
({
name
:
'ProcessListHandle'
,
query
:
{
workOrderId
:
row
.
id
,
processId
:
row
.
process
}})
},
handleDelete
(
row
)
{
this
.
$confirm
(
'此操作将删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteWorkOrder
(
row
.
id
).
then
(
response
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
this
.
getList
()
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
handleUnity
(
row
)
{
this
.
$confirm
(
'此操作将会结束该工单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
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