考勤-班次管理
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
FLL
2025-07-21 20:41:47 +08:00
parent 33f2e117f6
commit a74b2516c7
9 changed files with 315 additions and 106 deletions

View File

@@ -33,14 +33,22 @@ export const columns: VxeGridProps['columns'] = [
title: '班次名称',
field: 'name',
},
{
title: '考勤开始时间',
field: 'startTime',
},
{
title: '考勤结束时间',
field: 'endTime',
title: '考勤时间',
field: 'timeRange',
slots: {
default: ({ row }) => {
const startTime = row.startTime || '';
const endTime = row.endTime || '';
const restStartTime = row.restStartTime || '';
const restEndTime = row.restEndTime || '';
if(restStartTime&&restEndTime){
return `${startTime} - ${restStartTime} ${restEndTime} - ${endTime}`;
}else{
return `${startTime} - ${endTime}`;
}
},
},
},
{
title: '状态',
@@ -106,13 +114,13 @@ export const modalSchema: FormSchemaGetter = () => [
triggerFields: ['isRest'],
},
},
// {
// label: '状态',
// fieldName: 'status',
// component: 'Select',
// componentProps: {
// options: getDictOptions('wy_state'),
// },
// rules: 'required',
// },
{
label: '状态',
fieldName: 'status',
component: 'Select',
componentProps: {
options: getDictOptions('wy_state'),
},
rules: 'required',
},
];

View File

@@ -56,10 +56,12 @@ const [BasicModal, modalApi] = useVbenModal({
dayjs(record.startTime, 'HH:mm:ss'),
dayjs(record.endTime, 'HH:mm:ss')
];
record.restTimeRange = [
dayjs(record.restStartTime, 'HH:mm:ss'),
dayjs(record.restEndTime, 'HH:mm:ss')
];
if(record.restStartTime !== null && record.restEndTime !== null){
record.restTimeRange = [
dayjs(record.restStartTime, 'HH:mm:ss'),
dayjs(record.restEndTime, 'HH:mm:ss')
];
}
record.status = record.status?.toString();
console.log(record);
await formApi.setValues(record);