@@ -342,6 +355,7 @@
维修记录移至知识库
审核撤销
审核
+
废弃
@@ -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: '确定',
diff --git a/src/views/modules/eam/eamWorkOrderForDefect2.vue b/src/views/modules/eam/eamWorkOrderForDefect2.vue
index d736cc6..b4b5d37 100644
--- a/src/views/modules/eam/eamWorkOrderForDefect2.vue
+++ b/src/views/modules/eam/eamWorkOrderForDefect2.vue
@@ -73,6 +73,7 @@
+
@@ -264,6 +265,18 @@
+
+
+
+
+
+
+
+ 确定
+ 取消
+
+
+
@@ -366,6 +379,7 @@
维修记录移至知识库
审核撤销
审核
+ 废弃
@@ -799,7 +813,7 @@ import Chooselist from '@/views/modules/common/Chooselist_eam'
import {isAuth} from '../../../utils'
import excel from "@/utils/excel-util.js";
import {deleteSchedulingRecord} from "../../../api/scheduling/scheduling";
-import {coreComponentsExpiortExcel, eamWorkOrderExpiortExcel} from "../../../api/eam/eam";
+import {abandonedEamWorkOrder, coreComponentsExpiortExcel, eamWorkOrderExpiortExcel} from "../../../api/eam/eam";
export default {
components: {
Chooselist
@@ -1495,6 +1509,14 @@ export default {
actualOperatorName: '',
knowledgeFlag: '',
},
+ abandonedData: {
+ site: '',
+ buNo: '',
+ orderNo: '',
+ abandonedReason: '',
+ updateBy: ''
+ },
+ abandonedModelFlag: false,
submitModelFlag: false,
detailData: {
site: '',
@@ -2372,6 +2394,46 @@ export default {
this.submitModelFlag = true
},
+ // 废弃按钮
+ 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: '确定'
+ })
+ }
+ })
+ })
+ },
+
// 确认审核
submitModel (param) {
if (param === 1) {