|
@@ -177,6 +177,7 @@
|
|
|
<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) === 0 || 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 && scope.row.creatorId === userId.toString()" type="text" size="small" @click="cancelOrder(scope.row)">撤回</el-button>
|
|
|
+ <el-button v-if="isAuth('order:clt:editor') && Number(scope.row.state) === 0 && scope.row.creatorId === userId.toString()" type="text" size="small" @click="deleteOrder(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 type="text" size="small" @click="exportHandle(scope.row.orderId)">导出</el-button>
|
|
|
</template>
|
|
@@ -207,7 +208,7 @@
|
|
|
import Vue from 'vue'
|
|
|
import AddOrUpdate from './order-add-or-update'
|
|
|
import Detail from './order-detail'
|
|
|
- import { getOrderList, deliverOrder, revokeOrder } from '@/api/sale'
|
|
|
+ import { getOrderList, deliverOrder, revokeOrder, deleteOrder } from '@/api/sale'
|
|
|
import CusComponent from '../common/cus-component'
|
|
|
import DispatchArrived from './dispatch-arrived'
|
|
|
import NoticeChangeSetting from './order-notice-change-setting'
|
|
@@ -407,7 +408,7 @@ export default {
|
|
|
type: 'success',
|
|
|
duration: 1500,
|
|
|
onClose: () => {
|
|
|
- this.getDataList()
|
|
|
+ this.queryData()
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -416,6 +417,37 @@ export default {
|
|
|
})
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
+ // 删除任务单
|
|
|
+ deleteOrder (row) {
|
|
|
+ this.$confirm('是否确认要删除?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ deleteOrder([row.orderId]).then(({data}) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.queryData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: data.msg
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 采购金额屏蔽设置
|
|
|
setAmountMaskHandel () {
|
|
|
this.amountMaskSettingVisible = true
|