From af5d3b3cd35bf2d26eb56b4691690cd75c7aa93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=AE=8F=E6=96=8C?= <2164406372@qq.com> Date: Mon, 4 Aug 2025 10:33:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=AE=A1=E6=A0=B8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=A0=B8=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/eam/eamWorkOrderForApprove.vue | 190 +++++++++++++----- 1 file changed, 140 insertions(+), 50 deletions(-) diff --git a/src/views/modules/eam/eamWorkOrderForApprove.vue b/src/views/modules/eam/eamWorkOrderForApprove.vue index 966d69e..9886d11 100644 --- a/src/views/modules/eam/eamWorkOrderForApprove.vue +++ b/src/views/modules/eam/eamWorkOrderForApprove.vue @@ -203,8 +203,8 @@ - 确定 - 取消 + 通过 + 退回 @@ -279,7 +279,7 @@ - 审核退回 + 审核撤销 审核 @@ -1467,62 +1467,152 @@ this.submitData.remark = this.detailData.remark this.submitData.difficultyLevel = '' this.submitData.difficultyRemark = '' - if (this.detailData.status === '已完工') { - this.$confirm(`是否取消审核?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - this.submitData.status = '已到达' - submitDefect(this.submitData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.detailData.status = '待审核' - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) - }).catch(() => { + // if (this.detailData.status === '已完工') { + // this.$confirm(`是否取消审核?`, '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + // type: 'warning' + // }).then(() => { + // this.submitData.status = '已到达' + // submitDefect(this.submitData).then(({data}) => { + // if (data && data.code === 0) { + // this.getDataList() + // this.detailData.status = '待审核' + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => {} + // }) + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + // }).catch(() => { + // }) + // } else { + // this.submitData.status = '已完工' + // this.submitModelFlag = true + // } + this.submitData.status = '已完工' + this.submitModelFlag = true + }, + revokeModel(){ + this.$confirm(`是否撤销审核,回退到‘待审核’状态?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (this.authCheck) { + this.$message.warning('无审核权限!') + return + } + this.submitData.site = this.detailData.site + this.submitData.buNo = this.detailData.buNo + this.submitData.orderNo = this.detailData.orderNo + this.submitData.planID = this.detailData.planID + this.submitData.objectID = this.detailData.objectID + this.submitData.planDesc = this.detailData.feedBackDesc + this.submitData.disposalMeasures = this.detailData.disposalMeasures + this.submitData.defectID = this.detailData.defectID + this.submitData.defectDesc = this.detailData.defectDesc + this.submitData.remark = this.detailData.remark + this.submitData.difficultyLevel = '' + this.submitData.difficultyRemark = '' + this.submitData.faultReason = this.detailData.faultReason + this.submitData.handlingMethod = this.detailData.handlingMethod + this.submitData.preventiveMeasure = this.detailData.preventiveMeasure + this.submitData.feedbackBy = this.detailData.createBy + this.submitData.actualOperatorName = this.detailData.actualOperatorName + this.submitData.knowledgeFlag = this.detailData.knowledgeFlag + this.submitData.updateBy = this.$store.state.user.name + this.submitData.status = '待审核' + submitDefect(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.detailData.status = '待审核' + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } }) - } else { - this.submitData.status = '已完工' - this.submitModelFlag = true - } + }) }, - // 确认审核 - submitModel () { + submitModel (param) { if (this.submitData.difficultyLevel === ''||this.submitData.difficultyLevel == null) { this.$alert('请选择难度等级!', '提示', { confirmButtonText: '确定' }) return false } - submitDefect(this.submitData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.detailData.status = '已完工' - this.submitModelFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + // submitDefect(this.submitData).then(({data}) => { + // if (data && data.code === 0) { + // this.getDataList() + // this.detailData.status = '已完工' + // this.submitModelFlag = false + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => {} + // }) + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + if (param === 1) { + submitDefect(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.detailData.status = '已完工' + this.submitModelFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } else { + this.submitData.status = '已到达' + submitDefect(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.detailData.status = '待审核' + this.submitModelFlag = false + this.detailModelFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, submitModels () {