From 81ecb0659805d38cd14978c40653b4bef72d1a4a Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Mon, 20 Oct 2025 03:07:42 +0000
Subject: [PATCH] 企微申请相关不可系统内删除
---
eladmin-web-master/src/assets/images/cp_approval_del/app/5.jpg | 0
eladmin-web-master/src/assets/images/cp_approval_del/web/2.png | 0
eladmin-web-master/src/components/CpApprovalDelDialog/index.vue | 86 ++++++++++++++++++++++++++++
eladmin-web-master/src/assets/images/cp_approval_del/web/3.png | 0
eladmin-web-master/src/views/attendance/attendanceBusinessTravel/index.vue | 20 ++++--
eladmin-web-master/src/views/attendance/attendanceLeave/index.vue | 15 ++++
eladmin-web-master/src/assets/images/cp_approval_del/app/1.jpg | 0
eladmin-web-master/src/assets/images/cp_approval_del/app/3.jpg | 0
eladmin-web-master/src/assets/images/cp_approval_del/web/1.png | 0
eladmin-web-master/src/views/attendance/attendanceOvertime/index.vue | 15 ++++
eladmin-web-master/src/assets/images/cp_approval_del/web/4.png | 0
eladmin-web-master/src/views/attendance/attendanceCardReplacement/index.vue | 15 ++++
eladmin-web-master/src/assets/images/cp_approval_del/app/2.jpg | 0
eladmin-web-master/src/views/attendance/attendanceGoOut/index.vue | 15 ++++
eladmin-web-master/src/assets/images/cp_approval_del/app/4.jpg | 0
15 files changed, 154 insertions(+), 12 deletions(-)
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/app/1.jpg b/eladmin-web-master/src/assets/images/cp_approval_del/app/1.jpg
new file mode 100644
index 0000000..68a79c3
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/app/1.jpg
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/app/2.jpg b/eladmin-web-master/src/assets/images/cp_approval_del/app/2.jpg
new file mode 100644
index 0000000..2a7167f
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/app/2.jpg
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/app/3.jpg b/eladmin-web-master/src/assets/images/cp_approval_del/app/3.jpg
new file mode 100644
index 0000000..a038e68
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/app/3.jpg
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/app/4.jpg b/eladmin-web-master/src/assets/images/cp_approval_del/app/4.jpg
new file mode 100644
index 0000000..5a25c98
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/app/4.jpg
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/app/5.jpg b/eladmin-web-master/src/assets/images/cp_approval_del/app/5.jpg
new file mode 100644
index 0000000..0fae61e
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/app/5.jpg
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/web/1.png b/eladmin-web-master/src/assets/images/cp_approval_del/web/1.png
new file mode 100644
index 0000000..05876af
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/web/1.png
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/web/2.png b/eladmin-web-master/src/assets/images/cp_approval_del/web/2.png
new file mode 100644
index 0000000..f50ae78
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/web/2.png
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/web/3.png b/eladmin-web-master/src/assets/images/cp_approval_del/web/3.png
new file mode 100644
index 0000000..6a1f3b5
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/web/3.png
Binary files differ
diff --git a/eladmin-web-master/src/assets/images/cp_approval_del/web/4.png b/eladmin-web-master/src/assets/images/cp_approval_del/web/4.png
new file mode 100644
index 0000000..4777a0d
--- /dev/null
+++ b/eladmin-web-master/src/assets/images/cp_approval_del/web/4.png
Binary files differ
diff --git a/eladmin-web-master/src/components/CpApprovalDelDialog/index.vue b/eladmin-web-master/src/components/CpApprovalDelDialog/index.vue
new file mode 100644
index 0000000..1f778e9
--- /dev/null
+++ b/eladmin-web-master/src/components/CpApprovalDelDialog/index.vue
@@ -0,0 +1,86 @@
+<template>
+ <el-dialog
+ title="删除提示"
+ :visible.sync="dialogVisible"
+ width="800px"
+ :before-close="handleClose"
+ >
+ <div style="max-height: calc(80vh - 160px); overflow-y: scroll;">
+ <div style="font-size: 16px; font-weight: 600; margin-bottom: 20px;">当前删除的申请使用了【企微审核】,无法在系统内删除,请根据不同操作设备参照以下步骤在【企业微信】操作撤回申请:</div>
+ <el-collapse v-model="activeNames" @change="handleChange">
+ <el-collapse-item name="WEB">
+ <template slot="title">
+ <span style="font-size: 16px; font-weight: 600;">1.电脑端操作</span>
+ <span v-if="!activeNames.includes('WEB')" style="font-size: 12px; color: #999999; margin-left: 20px;">点击展开查看</span>
+ </template>
+ <div class="steps-image-box">
+ <el-image v-for="(webImage, webIndex) in webImageList" :key="'web_image_' + webIndex" class="steps-image" :src="webImage" fit="contain" :preview-src-list="webImageList" />
+ </div>
+ </el-collapse-item>
+ <el-collapse-item name="APP">
+ <template slot="title">
+ <span style="font-size: 16px; font-weight: 600;">2.手机端操作</span>
+ <span v-if="!activeNames.includes('APP')" style="font-size: 12px; color: #999999; margin-left: 20px;">点击展开查看</span>
+ </template>
+ <div class="steps-image-box">
+ <el-image v-for="(appImage, appIndex) in appImageList" :key="'web_image_' + appIndex" class="steps-image" :src="appImage" fit="contain" :preview-src-list="appImageList" />
+ </div>
+ </el-collapse-item>
+ </el-collapse>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="dialogVisible = false">我已知晓</el-button>
+ </span>
+ </el-dialog>
+</template>
+
+<script>
+import Web1 from '@/assets/images/cp_approval_del/web/1.png'
+import Web2 from '@/assets/images/cp_approval_del/web/2.png'
+import Web3 from '@/assets/images/cp_approval_del/web/3.png'
+import Web4 from '@/assets/images/cp_approval_del/web/4.png'
+import App1 from '@/assets/images/cp_approval_del/app/1.jpg'
+import App2 from '@/assets/images/cp_approval_del/app/2.jpg'
+import App3 from '@/assets/images/cp_approval_del/app/3.jpg'
+import App4 from '@/assets/images/cp_approval_del/app/4.jpg'
+import App5 from '@/assets/images/cp_approval_del/app/5.jpg'
+
+export default {
+ data() {
+ return {
+ dialogVisible: false,
+ activeNames: [],
+ webImageList: [Web1, Web2, Web3, Web4],
+ appImageList: [App1, App2, App3, App4, App5]
+ }
+ },
+ methods: {
+ handleOpen() {
+ const that = this
+ that.dialogVisible = true
+ },
+ handleClose() {
+ const that = this
+ that.dialogVisible = false
+ },
+ handleChange(val) {
+ const that = this
+ that.activeNames = val
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.steps-image-box {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px;
+ padding: 12px;
+}
+.steps-image {
+ width: 200px;
+ border-radius: 5px;
+ border: 1px solid #999999;
+}
+</style>
diff --git a/eladmin-web-master/src/views/attendance/attendanceBusinessTravel/index.vue b/eladmin-web-master/src/views/attendance/attendanceBusinessTravel/index.vue
index 050c1c0..da545f9 100644
--- a/eladmin-web-master/src/views/attendance/attendanceBusinessTravel/index.vue
+++ b/eladmin-web-master/src/views/attendance/attendanceBusinessTravel/index.vue
@@ -628,6 +628,8 @@
</el-table>
<!--分页组件-->
<pagination />
+
+ <cp-approval-del-dialog ref="cpApprovalDelDialog" />
</div>
</div>
</template>
@@ -643,6 +645,7 @@
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import approvalLine from '@/components/ApprovalLine'
+import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
import constant from '../../../utils/constant'
const defaultForm = {
@@ -670,7 +673,7 @@
}
export default {
name: 'AttendanceBusinessTravel',
- components: { pagination, crudOperation, rrOperation, udOperation, approvalLine },
+ components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
@@ -774,14 +777,15 @@
this.getProjects()
return true
},
- // 钩子:新建 - 之前
- [CRUD.HOOK.beforeToAdd]() {
- this.form.durationUnit = this.dictLeaveTimeTypeDay
- // 判断用户最大角色级别是否大于总经理角色:赋值
- if (this.userRolesLevelMin > this.roleLevelGenerl) {
- // 表单赋值
- this.form.userId = this.user.id
+ // 钩子:删除 - 之前
+ [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
},
// 禁用
disabledUser(data) {
diff --git a/eladmin-web-master/src/views/attendance/attendanceCardReplacement/index.vue b/eladmin-web-master/src/views/attendance/attendanceCardReplacement/index.vue
index 1a0834f..b84aecc 100644
--- a/eladmin-web-master/src/views/attendance/attendanceCardReplacement/index.vue
+++ b/eladmin-web-master/src/views/attendance/attendanceCardReplacement/index.vue
@@ -264,6 +264,8 @@
</el-table>
<!--分页组件-->
<pagination />
+
+ <cp-approval-del-dialog ref="cpApprovalDelDialog" />
</div>
</div>
</template>
@@ -278,12 +280,13 @@
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import approvalLine from '@/components/ApprovalLine'
+import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
import constant from '../../../utils/constant'
const defaultForm = { id: null, userId: null, userName: null, approvalUserId: null, cardReplacementTime: null, cardReplacementReason: null, approvalStatus: null, approvalDescription: null, cardReplacementDistinguish: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null, wecomSpNo: null, event: null }
export default {
name: 'AttendanceCardreplacement',
- components: { pagination, crudOperation, rrOperation, udOperation, approvalLine },
+ components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
// 数据字典
dicts: [constant.CARD_REPLACEMENT_DIFFERENTIATION, constant.CARD_APPROVE_STATUS, constant.APPROVAL_SITE_TYPE],
@@ -388,6 +391,16 @@
this.form.approvalUserId = 0
}
},
+ // 钩子:删除 - 之前
+ [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
+ },
// 禁用
disabledUser(data) {
if (this.userRolesLevelMin > this.roleLevelGenerl) {
diff --git a/eladmin-web-master/src/views/attendance/attendanceGoOut/index.vue b/eladmin-web-master/src/views/attendance/attendanceGoOut/index.vue
index c39edd8..f1d2024 100644
--- a/eladmin-web-master/src/views/attendance/attendanceGoOut/index.vue
+++ b/eladmin-web-master/src/views/attendance/attendanceGoOut/index.vue
@@ -607,6 +607,8 @@
</el-table>
<!--分页组件-->
<pagination />
+
+ <cp-approval-del-dialog ref="cpApprovalDelDialog" />
</div>
</div>
</template>
@@ -621,6 +623,7 @@
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import approvalLine from '@/components/ApprovalLine'
+import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
import constant from '@/utils/constant'
const defaultForm = {
@@ -645,7 +648,7 @@
}
export default {
name: 'AttendanceGoOut',
- components: { pagination, crudOperation, rrOperation, udOperation, approvalLine },
+ components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
@@ -755,6 +758,16 @@
this.form.userId = this.user.id
}
},
+ // 钩子:删除 - 之前
+ [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
+ },
// 禁用
disabledUser(data) {
if (this.userRolesLevelMin > this.roleLevelGenerl) {
diff --git a/eladmin-web-master/src/views/attendance/attendanceLeave/index.vue b/eladmin-web-master/src/views/attendance/attendanceLeave/index.vue
index 5732ddd..42c6577 100644
--- a/eladmin-web-master/src/views/attendance/attendanceLeave/index.vue
+++ b/eladmin-web-master/src/views/attendance/attendanceLeave/index.vue
@@ -324,6 +324,8 @@
</el-table>
<!--分页组件-->
<pagination />
+
+ <cp-approval-del-dialog ref="cpApprovalDelDialog" />
</div>
</div>
</template>
@@ -338,12 +340,13 @@
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import approvalLine from '@/components/ApprovalLine'
+import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
import constant from '@/utils/constant'
const defaultForm = { id: null, userId: null, approvalUserId: null, leaveType: null, leaveStartTime: null, leaveEndTime: null, leaveDuration: null, leaveDurationUnit: null, leaveReason: null, approvalStatus: null, approvalDescription: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null, wecomSpNo: null, event: null }
export default {
name: 'AttendanceLeave',
- components: { pagination, crudOperation, rrOperation, udOperation, approvalLine },
+ components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({ title: '请假记录', url: 'api/attendanceLeave', idField: 'id', sort: 'leaveStartTime,desc', crudMethod: { ...crudAttendanceLeave }})
@@ -447,6 +450,16 @@
this.form.userId = this.user.id
}
},
+ // 钩子:删除 - 之前
+ [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
+ },
// 钩子:在编辑之前执行
// [CRUD.HOOK.beforeToEdit]() {
// this.getUserTimes()
diff --git a/eladmin-web-master/src/views/attendance/attendanceOvertime/index.vue b/eladmin-web-master/src/views/attendance/attendanceOvertime/index.vue
index 2c6f646..be835a0 100644
--- a/eladmin-web-master/src/views/attendance/attendanceOvertime/index.vue
+++ b/eladmin-web-master/src/views/attendance/attendanceOvertime/index.vue
@@ -257,6 +257,8 @@
</el-table>
<!--分页组件-->
<pagination />
+
+ <cp-approval-del-dialog ref="cpApprovalDelDialog" />
</div>
</div>
</template>
@@ -270,13 +272,14 @@
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import approvalLine from '@/components/ApprovalLine'
+import cpApprovalDelDialog from '@/components/CpApprovalDelDialog'
import constant from '@/utils/constant'
import { mapGetters } from 'vuex'
const defaultForm = { id: null, userId: null, approvalUserId: null, overtimeStartTime: null, overtimeEndTime: null, overtimeDuration: null, overtimeDurationUnit: null, approvalStatus: null, approvalDescription: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null, wecomSpNo: null, event: null }
export default {
name: 'AttendanceOvertime',
- components: { pagination, crudOperation, rrOperation, udOperation, approvalLine },
+ components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({ title: '考勤加班', url: 'api/attendanceOvertime', idField: 'id', sort: 'id,desc', crudMethod: { ...crudAttendanceOvertime }})
@@ -367,6 +370,16 @@
this.form.userId = this.user.id
}
},
+ // 钩子:删除 - 之前
+ [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() {
crudUser.getAll().then(res => {
--
Gitblit v1.9.3