From d167d685abfcf09a6269932fb7603ccea66e3dfa Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Tue, 16 Dec 2025 16:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E3=80=81=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E3=80=81=E7=BB=B4=E4=BF=AE=E3=80=81=E6=8A=A5=E5=BA=9F=E7=9A=84?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=AE=A1=E6=89=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/EquipmentRetireApply/audit.vue | 48 ++++++- src/views/business/audit/auditList.vue | 39 +++++ .../components/BatchApproveDialog.vue | 134 ++++++++++++++++++ src/views/business/warehouse/auditList.vue | 43 +++++- .../repairAudit/repairAuditList.vue | 39 +++++ 5 files changed, 297 insertions(+), 6 deletions(-) create mode 100644 src/views/business/components/BatchApproveDialog.vue diff --git a/src/views/EquipmentRetireApply/audit.vue b/src/views/EquipmentRetireApply/audit.vue index a928d23c..c9c9509d 100644 --- a/src/views/EquipmentRetireApply/audit.vue +++ b/src/views/EquipmentRetireApply/audit.vue @@ -44,11 +44,30 @@ - + 退役审核列表 - + + + 批量审批({{ selectedRows.length }}) + + + + + + @@ -82,6 +101,7 @@ + @@ -89,11 +109,13 @@ import { getRetireApplyListAPI } from '@/api/EquipmentRetireApply/index.js' import pagination from '@/components/Pagination' import ApproveDialog from '@/views/business/components/ApproveDialog' +import BatchApproveDialog from '@/views/business/components/BatchApproveDialog' export default { components: { pagination, - ApproveDialog + ApproveDialog, + BatchApproveDialog }, data() { return { @@ -104,7 +126,8 @@ export default { pageSize: 10 }, tableData: [], - total: 0 + total: 0, + selectedRows: [] } }, methods: { @@ -180,6 +203,23 @@ export default { }, openDialog(row) { this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_SCRAP') + }, + // 选择行变化 + handleSelectionChange(selection) { + this.selectedRows = selection + }, + // 批量审批 + handleBatchApprove() { + if (this.selectedRows.length === 0) { + this.$message.warning('请先选择要审批的项目') + return + } + this.$refs.batchApproveDialog.openDialog(this.selectedRows, 'EQUIPMENT_SCRAP') + }, + // 批量审批成功后的回调 + handleBatchApproveSuccess() { + this.selectedRows = [] + this.getRetireApplyAuditList() } }, diff --git a/src/views/business/audit/auditList.vue b/src/views/business/audit/auditList.vue index dd60dd2a..5c53f798 100644 --- a/src/views/business/audit/auditList.vue +++ b/src/views/business/audit/auditList.vue @@ -71,6 +71,17 @@ 自用审核列表 + + + 批量审批({{ selectedRows.length }}) + + + + @@ -131,11 +150,13 @@ import { getUseProjectListAPI, } from '@/api/EquipmentLedger/equ-out' import ApproveDialog from '@/views/business/components/ApproveDialog' +import BatchApproveDialog from '@/views/business/components/BatchApproveDialog' export default { name: 'AuditList', components: { ApproveDialog, + BatchApproveDialog, }, data() { return { @@ -160,6 +181,7 @@ export default { // 表格数据 tableList: [], useProjectList: [], // 使用项目下拉选 + selectedRows: [], // 选中的行 } }, created() { @@ -220,6 +242,23 @@ export default { }, openDialog(row) { this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_OUT') + }, + // 选择行变化 + handleSelectionChange(selection) { + this.selectedRows = selection + }, + // 批量审批 + handleBatchApprove() { + if (this.selectedRows.length === 0) { + this.$message.warning('请先选择要审批的项目') + return + } + this.$refs.batchApproveDialog.openDialog(this.selectedRows) + }, + // 批量审批成功后的回调 + handleBatchApproveSuccess() { + this.selectedRows = [] + this.getList() } }, } diff --git a/src/views/business/components/BatchApproveDialog.vue b/src/views/business/components/BatchApproveDialog.vue new file mode 100644 index 00000000..5c712d3a --- /dev/null +++ b/src/views/business/components/BatchApproveDialog.vue @@ -0,0 +1,134 @@ + + + + + + diff --git a/src/views/business/warehouse/auditList.vue b/src/views/business/warehouse/auditList.vue index 0acf4a1f..db59cd99 100644 --- a/src/views/business/warehouse/auditList.vue +++ b/src/views/business/warehouse/auditList.vue @@ -87,6 +87,17 @@ 退库审核列表 + + + 批量审批({{ selectedRows.length }}) + + + + @@ -151,11 +170,13 @@ import { } from '@/api/EquipmentLedger/equ-out' import { deptTreeSelect } from '@/api/system/user' import ApproveDialog from '@/views/business/components/ApproveDialog' +import BatchApproveDialog from '@/views/business/components/BatchApproveDialog' export default { name: 'AuditList', components: { - ApproveDialog + ApproveDialog, + BatchApproveDialog }, data() { return { @@ -180,7 +201,8 @@ export default { total: 0, // 总条数 // 表格数据 tableList: [], - useProjectList: [] // 使用项目下拉选 + useProjectList: [], // 使用项目下拉选 + selectedRows: [] // 选中的行 } }, created() { @@ -258,6 +280,23 @@ export default { }, openDialog(row) { this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_RETURN') + }, + // 选择行变化 + handleSelectionChange(selection) { + this.selectedRows = selection + }, + // 批量审批 + handleBatchApprove() { + if (this.selectedRows.length === 0) { + this.$message.warning('请先选择要审批的项目') + return + } + this.$refs.batchApproveDialog.openDialog(this.selectedRows, 'EQUIPMENT_RETURN') + }, + // 批量审批成功后的回调 + handleBatchApproveSuccess() { + this.selectedRows = [] + this.getList() } } } diff --git a/src/views/equipmentRepair/repairAudit/repairAuditList.vue b/src/views/equipmentRepair/repairAudit/repairAuditList.vue index 89c7f4c4..dd31a879 100644 --- a/src/views/equipmentRepair/repairAudit/repairAuditList.vue +++ b/src/views/equipmentRepair/repairAudit/repairAuditList.vue @@ -47,6 +47,17 @@ 维修审核列表 + + + 批量审批({{ selectedRows.length }}) + + + + @@ -112,11 +131,13 @@ import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage' import {deleteRepairList, getRepairList} from "@/api/equipmentRepair"; import ApproveDialog from '@/views/business/components/ApproveDialog' +import BatchApproveDialog from '@/views/business/components/BatchApproveDialog' export default { name: 'ApplicantList', components: { ApproveDialog, + BatchApproveDialog, }, data() { return { @@ -138,6 +159,7 @@ export default { { label: '已审批', value: '2' }, { label: '审批驳回', value: '3' }, ], + selectedRows: [], statusTextMap: { '1': '待审核', '4': '审核中', @@ -267,6 +289,23 @@ export default { }, openDialog(row) { this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_REPAIR') + }, + // 选择行变化 + handleSelectionChange(selection) { + this.selectedRows = selection + }, + // 批量审批 + handleBatchApprove() { + if (this.selectedRows.length === 0) { + this.$message.warning('请先选择要审批的项目') + return + } + this.$refs.batchApproveDialog.openDialog(this.selectedRows, 'EQUIPMENT_REPAIR') + }, + // 批量审批成功后的回调 + handleBatchApproveSuccess() { + this.selectedRows = [] + this.getList() } }, }