From c675695faef95b623a6b3de6a02066118a42b98b Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 13 十一月 2025 17:27:19 +0800
Subject: [PATCH] fix: bug
---
src/views/EmploymentManage/components/CheckManageDialog.vue | 90 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/src/views/EmploymentManage/components/CheckManageDialog.vue b/src/views/EmploymentManage/components/CheckManageDialog.vue
index 81a4ecb..bf67829 100644
--- a/src/views/EmploymentManage/components/CheckManageDialog.vue
+++ b/src/views/EmploymentManage/components/CheckManageDialog.vue
@@ -1,5 +1,9 @@
<template>
<ProDialog :title="title" v-model="visible" destroy-on-close draggable>
+ <ProTabs v-model="form.tabType" hasBorder v-if="form.checkReceiveMethods?.length > 1">
+ <ProTabPane lazy label="绛惧埌璁板綍" name="signRecord"></ProTabPane>
+ <ProTabPane lazy label="鎻愪氦璁板綍" name="submitRecord"></ProTabPane>
+ </ProTabs>
<ProDialogTableWrapper :height="400">
<ProTableV2 v-bind="proTableProps" :columns="columns" :operationBtns="operationBtns">
</ProTableV2>
@@ -20,6 +24,8 @@
defineColumns,
defineOperationBtns,
useTable,
+ ProTabs,
+ ProTabPane,
} from '@bole-core/components';
import * as taskCheckReceiveServices from '@/services/api/taskCheckReceive';
import { setOSSLink } from '@/utils';
@@ -32,11 +38,15 @@
type Form = {
id: string;
+ checkReceiveMethods: EnumTaskCheckReceiveMethod[];
+ isInternal: boolean;
+ tabType: string;
isDetail: boolean;
};
const visible = defineModel({ type: Boolean });
const form = defineModel<Form>('form');
+
const title = computed(() => (form.value.isDetail ? '璇︽儏' : '楠屾敹'));
const emit = defineEmits<{
(e: 'onCancel'): void;
@@ -44,7 +54,7 @@
const eventContext = useGlobalEventContext();
-const columns = defineColumns([
+const submitColumns = defineColumns([
{
id: '1',
enCode: 'date',
@@ -70,7 +80,69 @@
enCode: 'checkReceiveTime',
name: '楠屾敹鏃堕棿',
},
+ {
+ id: '6',
+ enCode: 'checkOperator',
+ name: '楠屾敹浜�',
+ },
]);
+
+const checkInColumns = defineColumns([
+ {
+ id: '1',
+ enCode: 'date',
+ name: '浠诲姟鏃ユ湡',
+ },
+ {
+ id: '2',
+ enCode: 'userCheckInTime',
+ name: '鐢ㄦ埛绛惧埌鏃堕棿',
+ },
+ {
+ id: '3',
+ enCode: 'userCheckOutTime',
+ name: '鐢ㄦ埛绛惧嚭鏃堕棿',
+ },
+ {
+ id: '4',
+ enCode: 'userCheckHistoryType',
+ name: '鐢ㄦ埛楠屾敹鐘舵��',
+ },
+ {
+ id: '5',
+ enCode: 'checkInTime',
+ name: '绛惧埌鏃堕棿',
+ },
+ {
+ id: '6',
+ enCode: 'checkOutTime',
+ name: '绛惧嚭鏃堕棿',
+ },
+ {
+ id: '7',
+ enCode: 'checkHistoryType',
+ name: '楠屾敹鐘舵��',
+ },
+ {
+ id: '8',
+ enCode: 'operator',
+ name: '鎿嶄綔浜�',
+ },
+]);
+
+const columns = computed(() => {
+ if (form.value.checkReceiveMethods.every((x) => x == EnumTaskCheckReceiveMethod.CheckIn)) {
+ return checkInColumns;
+ } else if (form.value.checkReceiveMethods.every((x) => x == EnumTaskCheckReceiveMethod.Submit)) {
+ return submitColumns;
+ } else {
+ if (form.value.tabType === 'signRecord') {
+ return checkInColumns;
+ } else {
+ return submitColumns;
+ }
+ }
+});
const operationBtns = defineOperationBtns([
{
@@ -86,7 +158,10 @@
!(
row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitSubmit ||
row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitCheckReceive
- ) || form.value.isDetail,
+ ) ||
+ form.value.isDetail ||
+ form.value.tabType === 'signRecord' ||
+ !form.value.isInternal,
},
},
{
@@ -102,7 +177,10 @@
!(
row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitSubmit ||
row.checkReceiveStatus === EnumTaskUserSubmitCheckReceiveStatus.WaitCheckReceive
- ) || form.value.isDetail,
+ ) ||
+ form.value.isDetail ||
+ form.value.tabType === 'signRecord' ||
+ !form.value.isInternal,
},
},
{
@@ -164,8 +242,14 @@
columnsRenderProps: {
createdTime: { type: 'date' },
checkReceiveTime: { type: 'date' },
+ userCheckInTime: { type: 'date' },
+ userCheckOutTime: { type: 'date' },
+ checkInTime: { type: 'date' },
+ checkOutTime: { type: 'date' },
date: { type: 'date', format: 'YYYY-MM-DD' },
checkReceiveStatus: { type: 'enum', valueEnum: EnumTaskUserSubmitCheckReceiveStatusText },
+ userCheckHistoryType: { type: 'enum', valueEnum: EnumTaskUserSubmitCheckHistoryTypeText },
+ checkHistoryType: { type: 'enum', valueEnum: EnumTaskUserSubmitCheckHistoryTypeText },
files: {
type: 'url',
//@ts-ignore
--
Gitblit v1.9.1