|
|
|
@ -52,6 +52,7 @@ |
|
|
|
<el-option label="待审核" value="待审核"></el-option> |
|
|
|
<el-option label="已完工" value="已完工"></el-option> |
|
|
|
<el-option label="已取消" value="已取消"></el-option> |
|
|
|
<el-option label="已废弃" value="已废弃"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'单据来源'"> |
|
|
|
@ -241,6 +242,18 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="废弃" :close-on-click-modal="false" v-drag :visible.sync="abandonedModelFlag" width="375px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="'废弃原因'"> |
|
|
|
<el-input v-model="abandonedData.abandonedReason" style="width: 350px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="abandonedConfirm()">确定</el-button> |
|
|
|
<el-button @click="abandonedModelFlag = false">取消</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog top="12vh" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="960px"> |
|
|
|
<template v-slot:title> |
|
|
|
<div style="padding-top: 5px;padding-left: 15px"> |
|
|
|
@ -342,6 +355,7 @@ |
|
|
|
<el-checkbox v-model="detailData.knowledgeFlag" true-label="Y">维修记录移至知识库</el-checkbox> |
|
|
|
<el-button v-if="detailData.status === '已完工'" type="primary" @click="revokeModel()" style="margin-left: 10px">审核撤销</el-button> |
|
|
|
<el-button v-else type="primary" @click="checkModal()" style="margin-left: 10px">审核</el-button> |
|
|
|
<el-button v-if="detailData.status === '待审核'" type="primary" @click="abandonedModel()" style="margin-left: 10px">废弃</el-button> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item :label="' '">--> |
|
|
|
<!-- <el-button type="primary" @click="coreComponentModal">核心备件</el-button>--> |
|
|
|
@ -773,7 +787,7 @@ import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/user |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {isAuth} from '../../../utils' |
|
|
|
import excel from "@/utils/excel-util.js"; |
|
|
|
import {cancelDefectOrder} from "../../../api/eam/eam"; |
|
|
|
import {abandonedEamWorkOrder, cancelDefectOrder} from "../../../api/eam/eam"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Chooselist |
|
|
|
@ -1389,6 +1403,14 @@ export default { |
|
|
|
knowledgeFlag: '', |
|
|
|
}, |
|
|
|
submitModelFlag: false, |
|
|
|
abandonedData: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
orderNo: '', |
|
|
|
abandonedReason: '', |
|
|
|
updateBy: '' |
|
|
|
}, |
|
|
|
abandonedModelFlag: false, |
|
|
|
detailData: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
@ -2256,6 +2278,45 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 废弃按钮 |
|
|
|
abandonedModel(){ |
|
|
|
this.abandonedData.site = this.detailData.site |
|
|
|
this.abandonedData.buNo = this.detailData.buNo |
|
|
|
this.abandonedData.orderNo = this.detailData.orderNo |
|
|
|
this.abandonedData.updateBy = this.$store.state.user.name |
|
|
|
this.abandonedData.abandonedReason = '' |
|
|
|
this.abandonedModelFlag = true |
|
|
|
}, |
|
|
|
// 废弃确认 |
|
|
|
abandonedConfirm(){ |
|
|
|
if (this.abandonedData.abandonedReason === '' || this.abandonedData.abandonedReason == null) { |
|
|
|
this.$message.warning('请输入废弃原因!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm(`确定废弃该工单?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
abandonedEamWorkOrder(this.abandonedData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.abandonedModelFlag = false |
|
|
|
this.detailModelFlag = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
revokeModel(){ |
|
|
|
this.$confirm(`是否撤销审核,回退到‘待审核’状态?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
|