diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index aa2dafe..6cbbaeb 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -196,6 +196,7 @@ export const saveFQASSubDetailed = data => createAPI(`/pms/qc/saveFQASSubDetaile export const checkFQASIsSubmit = data => createAPI(`/pms/qc/checkFQASIsSubmit`,'post',data) export const saveFQASDetailedRecord = data => createAPI(`/pms/qc/saveFQASDetailedRecord`,'post',data) export const saveFQASSubmitResult = data => createAPI(`/pms/qc/saveFQASSubmitResult`,'post',data) +export const reverseFQASSubmitResult = data => createAPI(`/pms/qc/reverseFQASSubmitResult`,'post',data) export const fqasRecordDelete = data => createAPI(`/pms/qc/fqasRecordDelete`,'post',data) export const fqasRecordOverLoad = data => createAPI(`/pms/qc/fqasRecordOverLoad`,'post',data) export const batchSaveIQCDetailedRecord = data => createAPI(`/pms/qc/batchSaveIQCDetailedRecord`,'post',data) diff --git a/src/views/modules/qc/FQASResultEntry.vue b/src/views/modules/qc/FQASResultEntry.vue index 00d934f..1d7d61c 100644 --- a/src/views/modules/qc/FQASResultEntry.vue +++ b/src/views/modules/qc/FQASResultEntry.vue @@ -93,6 +93,7 @@ 查询 审核 + 取消审核 删除 任务重载 批量合格处理 @@ -811,6 +812,7 @@ checkFQASIsSubmit, // 检查是否已提交 saveFQASSubDetailed, // 新增子明细信息 saveFQASSubmitResult, // 审核 + reverseFQASSubmitResult, // 取消审核 fqasRecordDelete, // 删除检验记录 disposalMeasuresSearch, // 获取处置措施列表 fqasRecordOverLoad, // 重载检验单 @@ -1903,6 +1905,7 @@ userBuList: [], authSearch: false, authCheck: false, + authCancel: false, authOverLoad: false, authDelete: false, authDetail: false, @@ -3148,6 +3151,49 @@ }) }, + // 取消审核按钮 + reverseSubmitResult () { + let tempData1 = '' // 记录不是已完成状态的单号 + if (this.FQASSelections.length === 0) { + this.$message.warning('请勾选要取消审核的检验单!') + return + } + for (let i = 0; i < this.FQASSelections.length; i++) { + if (this.FQASSelections[i].state !== '已完成') { + tempData1 = tempData1 + this.FQASSelections[i].inspectionNo + '、' + } + } + if (tempData1 !== '') { + tempData1 = tempData1.substring(0, tempData1.length - 1) + this.$message.warning('检验单号 ' + tempData1 + ' 不是已完成状态!') + return + } + this.$confirm(`已确认单据信息无误,确定取消审核该 ` + this.FQASSelections.length + ` 条记录`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.submitData.submitList = this.FQASSelections + reverseFQASSubmitResult(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.FQASSelections = [] + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + // 子明细每页数 sizeChangeHandle2 (val) { this.pageSize2 = val @@ -3525,6 +3571,7 @@ getButtonAuthData () { let searchFlag = this.isAuth(this.menuId+":search") let checkFlag = this.isAuth(this.menuId+":check") + let cancelFlag = this.isAuth(this.menuId+":cancel") let overLoadFlag = this.isAuth(this.menuId+":overLoad") let deleteFlag = this.isAuth(this.menuId+":delete") let detailFlag = this.isAuth(this.menuId+":detail") @@ -3533,6 +3580,7 @@ //处理页面的权限数据 this.authSearch = !searchFlag this.authCheck = !checkFlag + this.authCancel = !cancelFlag this.authOverLoad = !overLoadFlag this.authDelete = !deleteFlag this.authDetail = !detailFlag