BAOLH
2025-10-20 81ecb0659805d38cd14978c40653b4bef72d1a4a
企微申请相关不可系统内删除
10 files added
5 files modified
166 ■■■■■ changed files
eladmin-web-master/src/assets/images/cp_approval_del/app/1.jpg patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/app/2.jpg patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/app/3.jpg patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/app/4.jpg patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/app/5.jpg patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/web/1.png patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/web/2.png patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/web/3.png patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/web/4.png patch | view | raw | blame | history
eladmin-web-master/src/components/CpApprovalDelDialog/index.vue 86 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/attendance/attendanceBusinessTravel/index.vue 20 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/attendance/attendanceCardReplacement/index.vue 15 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/attendance/attendanceGoOut/index.vue 15 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/attendance/attendanceLeave/index.vue 15 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/attendance/attendanceOvertime/index.vue 15 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/assets/images/cp_approval_del/app/1.jpg
eladmin-web-master/src/assets/images/cp_approval_del/app/2.jpg
eladmin-web-master/src/assets/images/cp_approval_del/app/3.jpg
eladmin-web-master/src/assets/images/cp_approval_del/app/4.jpg
eladmin-web-master/src/assets/images/cp_approval_del/app/5.jpg
eladmin-web-master/src/assets/images/cp_approval_del/web/1.png
eladmin-web-master/src/assets/images/cp_approval_del/web/2.png
eladmin-web-master/src/assets/images/cp_approval_del/web/3.png
eladmin-web-master/src/assets/images/cp_approval_del/web/4.png
eladmin-web-master/src/components/CpApprovalDelDialog/index.vue
New file
@@ -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>
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) {
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) {
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) {
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()
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 => {