Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
commit
64a01a3d6f
@ -29,6 +29,8 @@ export interface GroupVO {
|
||||
|
||||
attendanceList:any[];
|
||||
|
||||
scheduleCycleList:any[];
|
||||
|
||||
}
|
||||
|
||||
export interface GroupForm extends BaseEntity {
|
||||
|
@ -65,7 +65,19 @@ async function handleOpenChange(open: boolean) {
|
||||
})
|
||||
groupDetail.value.isAutomatic=true
|
||||
}else {
|
||||
cycleData.value=[];
|
||||
cycleData.value=res.scheduleCycleList;
|
||||
cycleData.value.forEach(item => {
|
||||
if(item.shiftId){
|
||||
const shift = res.attendanceList.find(i => item.shiftId == i.id);
|
||||
let str = ''
|
||||
if (shift.isRest) {
|
||||
str = `${shift.name}:${shift.startTime}~${shift.restStartTime} ${shift.restEndTime}~${shift.endTime}`;
|
||||
} else {
|
||||
str = `${shift.name}:${shift.startTime}~${shift.endTime}`;
|
||||
}
|
||||
item.shiftValue=str
|
||||
}
|
||||
})
|
||||
}
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
@ -201,7 +213,7 @@ async function showHoliday() {
|
||||
<span>{{ '第' + (index + 1) + '天' }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'shiftId'">
|
||||
{{record.shiftId}}
|
||||
{{record.shiftValue}}
|
||||
</template>
|
||||
</template>
|
||||
</Table>
|
||||
|
@ -108,7 +108,20 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
settingData.cycleData=record.scheduleCycleList
|
||||
settingData.cycleData.forEach(item => {
|
||||
if(item.shiftId){
|
||||
const shift = record.attendanceList.find(i => item.shiftId == i.id);
|
||||
let str = ''
|
||||
if (shift.isRest) {
|
||||
str = `${shift.name}:${shift.startTime}~${shift.restStartTime} ${shift.restEndTime}~${shift.endTime}`;
|
||||
} else {
|
||||
str = `${shift.name}:${shift.startTime}~${shift.endTime}`;
|
||||
}
|
||||
item.shiftValue=str
|
||||
}
|
||||
})
|
||||
shiftList.value=record.attendanceList
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
} else {
|
||||
@ -121,7 +134,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
shiftId: null,
|
||||
})
|
||||
})
|
||||
settingData.cycleData = [{scheduleId: ''}, {scheduleId: ''}];
|
||||
settingData.cycleData = [{shiftId: ''}, {shiftId: ''}];
|
||||
}
|
||||
await markInitialized();
|
||||
modalApi.modalLoading(false);
|
||||
@ -140,7 +153,7 @@ async function handleConfirm() {
|
||||
if (data.attendanceType == 1) {
|
||||
let hasError = true;
|
||||
settingData.cycleData.some((item, index) => {
|
||||
if (!item.scheduleId) {
|
||||
if (!item.shiftId) {
|
||||
hasError = false
|
||||
message.warning('请选择周期天数对应班次。');
|
||||
return;
|
||||
@ -179,6 +192,8 @@ async function handleClosed() {
|
||||
checkInData: [],
|
||||
shiftId: '',
|
||||
});
|
||||
shiftInfo.value = undefined
|
||||
shiftList.value = []
|
||||
}
|
||||
|
||||
const [HolidayCalendar, holidayApi] = useVbenModal({
|
||||
@ -236,7 +251,7 @@ function handleShiftList(list: any[]) {
|
||||
function addCycleHandle() {
|
||||
if (settingData.cycleData.length < 31) {
|
||||
settingData.cycleData.push({
|
||||
scheduleId: '',
|
||||
shiftId: '',
|
||||
})
|
||||
} else {
|
||||
message.warning('周期天数最多31天。');
|
||||
@ -476,7 +491,7 @@ function getUnCheckInData(val: any) {
|
||||
<Select
|
||||
ref="select"
|
||||
style="width: 100%"
|
||||
v-model:value="record.scheduleId"
|
||||
v-model:value="record.shiftId"
|
||||
placeholder="请选择班次"
|
||||
>
|
||||
<SelectOption v-for="item in shiftList" :value="item.id">
|
||||
|
Loading…
Reference in New Issue
Block a user