admin-vue3/src/api/mes/cal/shift/index.ts.bak

38 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/config/axios'
// TODO @AI挪到 plan/shift 目录下
// MES 计划班次 VO
export interface CalPlanShiftVO {
id: number
planId: number // 排班计划编号
sort: number // 显示顺序
name: string // 班次名称
startTime: string // 开始时间
endTime: string // 结束时间
remark: string // 备注
}
// MES 计划班次 API
export const CalPlanShiftApi = {
// 查询指定排班计划的班次列表
getPlanShiftListByPlan: async (planId: number) => {
return await request.get({ url: `/mes/cal/plan-shift/list-by-plan?planId=` + planId })
},
// 新增计划班次
createPlanShift: async (data: CalPlanShiftVO) => {
return await request.post({ url: `/mes/cal/plan-shift/create`, data })
},
// 修改计划班次
updatePlanShift: async (data: CalPlanShiftVO) => {
return await request.put({ url: `/mes/cal/plan-shift/update`, data })
},
// 删除计划班次
deletePlanShift: async (id: number) => {
return await request.delete({ url: `/mes/cal/plan-shift/delete?id=` + id })
}
}