From dd91f74054bb724d40dc82e9d70eacde2374af51 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 31 Jul 2026 11:10:44 +0800 Subject: [PATCH] =?UTF-8?q?2026-07-31=20RoHS=E5=92=8CLab=EF=BC=9A=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=90=E6=B5=81=E7=A8=8B=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/lab/labRecord.vue | 30 ++++++++++++++++++++++++++- src/views/modules/rohs/rohsRecord.vue | 30 ++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/src/views/modules/lab/labRecord.vue b/src/views/modules/lab/labRecord.vue index 3504bf6..1032393 100644 --- a/src/views/modules/lab/labRecord.vue +++ b/src/views/modules/lab/labRecord.vue @@ -48,6 +48,7 @@ 导出 搜索 + 流程关闭 @@ -872,7 +873,7 @@ import * as api from '@/api/lab/lab' import { getSiteList, searchUserListForRole } from '@/api/base/site' import { queryOss, previewOssFileById } from '@/api/oss/oss' -import { checkSuperAdmin } from '@/api/changeManagement/changeManagement' +import { checkSuperAdmin, closeProcess } from '@/api/changeManagement/changeManagement' import { verifyData } from '@/api/chooselist/chooselist.js' import { searchProjectInfoList } from '@/api/quotation/quotationInformation.js' import { queryCustomer } from '@/api/customer/customerInformation' @@ -2942,6 +2943,33 @@ export default { }) }) }, + closeProcessModal () { + const approvedRows = (this.dataListSelections || []).filter(item => item && item.status === '审批中' && item.referenceNo) + if (!approvedRows.length) { + this.$message.warning('请勾选状态为"审批中"的单据!') + return + } + this.$confirm(`确定关闭这 ${approvedRows.length} 条实验室单据的OA流程?关闭后状态将变为"草稿"。`, '流程关闭', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + closeProcess({ + site: this.$store.state.user.site, + documentNos: approvedRows.map(row => row.referenceNo), + documentType: 'LAB' + }).then(({data}) => { + if (data && data.code === 0) { + this.$message.success('流程关闭成功') + this.getDataList() + } else { + this.$message.error((data && data.msg) || '流程关闭失败') + } + }).catch(err => { + this.$message.error((err && err.message) || '流程关闭失败') + }) + }).catch(() => {}) + }, deleteHandle () { if (!this.authDelete) { this.$message.warning('没有删除权限') diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue index 942125d..3781727 100644 --- a/src/views/modules/rohs/rohsRecord.vue +++ b/src/views/modules/rohs/rohsRecord.vue @@ -75,6 +75,7 @@ {{ "导出" }} 搜索 + 流程关闭 @@ -1642,7 +1643,7 @@