diff --git a/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts index 0bc06bd2..940efe53 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts @@ -19,9 +19,17 @@ export interface GroupVO { /** * 考勤类型(0:固定班制,1:排班制) */ - attendanceType: number; + attendanceType: number| string; - isAutomatic: number; + isAutomatic: boolean; + + clockDateList: any[]; + + weekList: any[]; + + attendanceList:any[]; + + scheduleCycleList:any[]; } diff --git a/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts index 6350b7c2..4f89a0b2 100644 --- a/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts +++ b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts @@ -61,6 +61,8 @@ export interface MaintainPlanVO { userId: string[]; machineMaintainPlanStaffBoList:any[]; + + machineMaintainPlanStaffVos:any[]; } export interface MaintainPlanForm extends BaseEntity { diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts index 56008843..7467c144 100644 --- a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts @@ -19,7 +19,7 @@ export interface InspectionPlanVO { /** * 巡检周期 */ - inspectionPlanPeriod: number; + inspectionPlanPeriod: string; /** * 任务提前分组 diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue index def438ed..5c656941 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/attendance-group-detail.vue @@ -45,7 +45,7 @@ async function handleOpenChange(open: boolean) { } modalApi.modalLoading(true); const {id,attendanceType} = modalApi.getData() as { id?: number | string,attendanceType?:string }; - const res = await groupInfo(id,attendanceType); + const res = await groupInfo(id as string,attendanceType as string); groupDetail.value=res; if(res.attendanceType==0){ unCheckInData.value=res.clockDateList.filter(item=>item.mustNoCheck==0) @@ -65,7 +65,19 @@ async function handleOpenChange(open: boolean) { }) groupDetail.value.isAutomatic=true }else { - cycleData.value=res; + 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); } @@ -115,7 +127,7 @@ async function showHoliday() { size="small" :pagination="false" > - diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue index bce2bccb..10663dcb 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue @@ -89,13 +89,27 @@ const [BasicModal, modalApi] = useVbenModal({ }; isUpdate.value = !!id; if (isUpdate.value && id) { - const record = await groupInfo(id, attendanceType); + const record = await groupInfo(id, attendanceType as string); record.attendanceType = record.attendanceType.toString() if (record.attendanceType == '0') { settingData.unCheckInData = record.clockDateList.filter(item => item.mustNoCheck == 0) settingData.checkInData = record.clockDateList.filter(item => item.mustNoCheck == 1) settingData.weekdayData = record.weekList 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){ const shift = record.attendanceList.find(i => item.shiftId == i.id); let str = '' @@ -107,8 +121,7 @@ const [BasicModal, modalApi] = useVbenModal({ item.shiftValue=str } }) - } else { - + 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) {