Browse Source

增加废弃功能

java8
赵宏斌 2 months ago
parent
commit
d37e94f9a2
  1. 2
      src/api/eam/eam.js
  2. 63
      src/views/modules/eam/eamWorkOrderForDefect.vue
  3. 64
      src/views/modules/eam/eamWorkOrderForDefect2.vue

2
src/api/eam/eam.js

@ -244,3 +244,5 @@ export const updateRepairTypes = data => createAPI(`/pms/eam/updateRepairTypes`,
export const goUpItemEam = data => createAPI(`/pms/eam/goUpItemEam`,'post',data)
export const goDownItemEam = data => createAPI(`/pms/eam/goDownItemEam`,'post',data)
// 废弃工单
export const abandonedEamWorkOrder = data => createAPI(`/pms/eam/abandonedEamWorkOrder`,'post',data)

63
src/views/modules/eam/eamWorkOrderForDefect.vue

@ -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: '确定',

64
src/views/modules/eam/eamWorkOrderForDefect2.vue

@ -73,6 +73,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="'单据来源'">
@ -264,6 +265,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">
@ -366,6 +379,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>-->
@ -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) {

Loading…
Cancel
Save