|
@@ -140,7 +140,8 @@
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-if="isAuth('order:ctl:info')" type="text" size="small" @click="detailHandle(scope.row.orderId)">查看</el-button>
|
|
|
- <el-button v-if="isAuth('order:ctl:editor') && Number(scope.row.state) === 1" type="text" size="small" @click="addOrUpdateHandle(scope.row.orderId,false)">编辑</el-button>
|
|
|
+ <el-button v-if="isAuth('order:ctl:editor') && Number(scope.row.state) === 2" type="text" size="small" @click="addOrUpdateHandle(scope.row.orderId,false)">编辑</el-button>
|
|
|
+ <el-button v-if="isAuth('order:clt:revoke') && Number(scope.row.state) === 1" type="text" size="small" @click="cancelOrder(scope.row)">撤回</el-button>
|
|
|
<el-button v-if="isAuth('order:ctl:determine') && Number(scope.row.state) === 3 && Number(scope.row.orderState) === 6" type="text" size="small" @click="techConfirm(scope.row)">技术确定</el-button>
|
|
|
<!-- <el-button v-if="isAuth('order:ctl:deliver') && Number(scope.row.orderState) === 3" type="text" size="small" @click="deliverHandle(scope.row.orderId)">发货</el-button>-->
|
|
|
<!-- <el-button v-if="isAuth('order:ctl:arrived') && Number(scope.row.orderState) === 4 " type="text" size="small" @click="arrivedHandle(scope.row)">送达</el-button>-->
|
|
@@ -172,6 +173,7 @@
|
|
|
import CusComponent from '../common/cus-component'
|
|
|
import DispatchArrived from './dispatch-arrived'
|
|
|
import NoticeChangeSetting from './order-notice-change-setting'
|
|
|
+ import {revokeOrder} from '@/api/sale'
|
|
|
export default {
|
|
|
name: 'order',
|
|
|
components: {
|
|
@@ -343,6 +345,29 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.noticeChangeSetting.init()
|
|
|
})
|
|
|
+ },
|
|
|
+ // 撤回订单
|
|
|
+ cancelOrder (row) {
|
|
|
+ this.$confirm(`确定撤回订单${row.orderCode}?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ revokeOrder({id: row.orderId}).then(({data}) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.$message({
|
|
|
+ message: '撤回成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.getDataList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|