From d3fb6bb2c0f5708cc199216a6eaf3da703a3ff23 Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Tue, 28 Jul 2026 05:38:07 +0000
Subject: [PATCH] 项目报销页添加企微删除限制

---
 eladmin-web-master/src/views/project/projectReimburse/index.vue |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/eladmin-web-master/src/views/project/projectReimburse/index.vue b/eladmin-web-master/src/views/project/projectReimburse/index.vue
index 8ee253c..a3a4c8e 100644
--- a/eladmin-web-master/src/views/project/projectReimburse/index.vue
+++ b/eladmin-web-master/src/views/project/projectReimburse/index.vue
@@ -316,6 +316,8 @@
       </el-table>
       <!--分页组件-->
       <pagination />
+
+      <cp-approval-del-dialog ref="cpApprovalDelDialog" />
     </div>
   </div>
 </template>
@@ -330,6 +332,7 @@
 import udOperation from '@crud/UD.operation'
 import pagination from '@crud/Pagination'
 import approvalLine from '@/components/ApprovalLine'
+import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
 import fileUpload from '@/views/assembly/fileUpload'
 import { mapGetters } from 'vuex'
 import constant from '@/utils/constant'
@@ -337,7 +340,7 @@
 const defaultForm = { id: null, userId: null, approvalUserId: null, projectId: null, reimburseType: null, reimburseReason: null, expenseType: null, startTime: null, endTime: null, expenseAmount: null, expenseComment: null, originFileName: null, filePath: null, approvalStatus: null, approvalDescription: null, createTime: null, createBy: null, updateTime: null, updateBy: null, wecomSpNo: null, event: null, userName: null, appUserName: null, projectName: null, reimburseTypes: null, expenseTypes: null }
 export default {
   name: 'ProjectReimburse',
-  components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, fileUpload },
+  components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, fileUpload, cpApprovalDelDialog },
   mixins: [presenter(), header(), form(defaultForm), crud()],
   dicts: [constant.REIMBURSE_APPROVE_STATUS, constant.REIMBURSE_TYPE, constant.REIMBURSE_EXPENSE_TYPE, constant.APPROVAL_SITE_TYPE],
   cruds() {
@@ -482,6 +485,16 @@
       that.$set(that.form, 'expenseTypes', undefined)
       return true
     },
+    // 钩子:删除 - 之前
+    [CRUD.HOOK.beforeDelete]() {
+      const that = this
+      if (that.crud.selections.some(selection => selection.wecomSpNo !== null && selection.wecomSpNo !== undefined && selection.wecomSpNo !== '')) {
+        that.$refs.cpApprovalDelDialog.handleOpen()
+        that.crud.delAllLoading = false
+        return false
+      }
+      return true
+    },
 
     // 查询员工
     getUsers() {

--
Gitblit v1.9.3