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[];
|
attendanceList:any[];
|
||||||
|
|
||||||
|
scheduleCycleList:any[];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GroupForm extends BaseEntity {
|
export interface GroupForm extends BaseEntity {
|
||||||
|
@ -65,7 +65,19 @@ async function handleOpenChange(open: boolean) {
|
|||||||
})
|
})
|
||||||
groupDetail.value.isAutomatic=true
|
groupDetail.value.isAutomatic=true
|
||||||
}else {
|
}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);
|
modalApi.modalLoading(false);
|
||||||
}
|
}
|
||||||
@ -201,7 +213,7 @@ async function showHoliday() {
|
|||||||
<span>{{ '第' + (index + 1) + '天' }}</span>
|
<span>{{ '第' + (index + 1) + '天' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'shiftId'">
|
<template v-if="column.dataIndex === 'shiftId'">
|
||||||
{{record.shiftId}}
|
{{record.shiftValue}}
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
|
@ -96,6 +96,20 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
settingData.checkInData = record.clockDateList.filter(item => item.mustNoCheck == 1)
|
settingData.checkInData = record.clockDateList.filter(item => item.mustNoCheck == 1)
|
||||||
settingData.weekdayData = record.weekList
|
settingData.weekdayData = record.weekList
|
||||||
settingData.weekdayData.forEach(item => {
|
settingData.weekdayData.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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
settingData.cycleData=record.scheduleCycleList
|
||||||
|
settingData.cycleData.forEach(item => {
|
||||||
if(item.shiftId){
|
if(item.shiftId){
|
||||||
const shift = record.attendanceList.find(i => item.shiftId == i.id);
|
const shift = record.attendanceList.find(i => item.shiftId == i.id);
|
||||||
let str = ''
|
let str = ''
|
||||||
@ -107,8 +121,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
item.shiftValue=str
|
item.shiftValue=str
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
shiftList.value=record.attendanceList
|
||||||
|
|
||||||
}
|
}
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
} else {
|
} else {
|
||||||
@ -121,7 +134,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
shiftId: null,
|
shiftId: null,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
settingData.cycleData = [{scheduleId: ''}, {scheduleId: ''}];
|
settingData.cycleData = [{shiftId: ''}, {shiftId: ''}];
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
modalApi.modalLoading(false);
|
modalApi.modalLoading(false);
|
||||||
@ -140,7 +153,7 @@ async function handleConfirm() {
|
|||||||
if (data.attendanceType == 1) {
|
if (data.attendanceType == 1) {
|
||||||
let hasError = true;
|
let hasError = true;
|
||||||
settingData.cycleData.some((item, index) => {
|
settingData.cycleData.some((item, index) => {
|
||||||
if (!item.scheduleId) {
|
if (!item.shiftId) {
|
||||||
hasError = false
|
hasError = false
|
||||||
message.warning('请选择周期天数对应班次。');
|
message.warning('请选择周期天数对应班次。');
|
||||||
return;
|
return;
|
||||||
@ -179,6 +192,8 @@ async function handleClosed() {
|
|||||||
checkInData: [],
|
checkInData: [],
|
||||||
shiftId: '',
|
shiftId: '',
|
||||||
});
|
});
|
||||||
|
shiftInfo.value = undefined
|
||||||
|
shiftList.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
const [HolidayCalendar, holidayApi] = useVbenModal({
|
const [HolidayCalendar, holidayApi] = useVbenModal({
|
||||||
@ -236,7 +251,7 @@ function handleShiftList(list: any[]) {
|
|||||||
function addCycleHandle() {
|
function addCycleHandle() {
|
||||||
if (settingData.cycleData.length < 31) {
|
if (settingData.cycleData.length < 31) {
|
||||||
settingData.cycleData.push({
|
settingData.cycleData.push({
|
||||||
scheduleId: '',
|
shiftId: '',
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
message.warning('周期天数最多31天。');
|
message.warning('周期天数最多31天。');
|
||||||
@ -476,7 +491,7 @@ function getUnCheckInData(val: any) {
|
|||||||
<Select
|
<Select
|
||||||
ref="select"
|
ref="select"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model:value="record.scheduleId"
|
v-model:value="record.shiftId"
|
||||||
placeholder="请选择班次"
|
placeholder="请选择班次"
|
||||||
>
|
>
|
||||||
<SelectOption v-for="item in shiftList" :value="item.id">
|
<SelectOption v-for="item in shiftList" :value="item.id">
|
||||||
|
Loading…
Reference in New Issue
Block a user