| | |
| | | pauseRecords?: PauseRecord[]; // 停工记录 |
| | | reportableQuantity?: number; // 可报工数量 |
| | | assigneeUserIds?: number[]; // 报工人 |
| | | feedbackApprove?: boolean; // 是否报工审批(派生自工单) |
| | | } |
| | | |
| | | /** MES 生产任务分页查询参数 */ |
| | |
| | | } |
| | | |
| | | /** 查询待报工台账(分页) */ |
| | | export interface BatchScheduleRequest { |
| | | workOrderIds: number[]; |
| | | startTime: string; |
| | | previewHash?: string; |
| | | previewTime?: string; |
| | | allowLate?: boolean; |
| | | } |
| | | |
| | | export interface BatchSchedulePreview { |
| | | canExecute: boolean; |
| | | previewHash: string; |
| | | previewTime: string; |
| | | warnings: string[]; |
| | | orders: { |
| | | workOrderId: number; |
| | | workOrderCode?: string; |
| | | workOrderName?: string; |
| | | quantity?: number; |
| | | taskCount: number; |
| | | requestDate?: string; |
| | | endTime?: string; |
| | | late: boolean; |
| | | error?: string; |
| | | }[]; |
| | | tasks: { |
| | | workOrderId: number; |
| | | workOrderCode: string; |
| | | processId: number; |
| | | processName: string; |
| | | workstationId: number; |
| | | workstationName: string; |
| | | machineryNames: string; |
| | | quantity: number; |
| | | hourlyCapacity: number; |
| | | duration: number; |
| | | startTime: string; |
| | | endTime: string; |
| | | }[]; |
| | | } |
| | | |
| | | export function previewBatchSchedule(data: BatchScheduleRequest) { |
| | | return requestClient.post<BatchSchedulePreview>('/mes/pro/task/auto-schedule/preview', data); |
| | | } |
| | | |
| | | export function executeBatchSchedule(data: BatchScheduleRequest) { |
| | | return requestClient.post<{ taskIds: number[] }>('/mes/pro/task/auto-schedule', data); |
| | | } |
| | | |
| | | /** 查询待报工台账(分页) */ |
| | | export function getPendingFeedbackPage( |
| | | params: MesProTaskApi.PendingFeedbackPageParams, |
| | | ) { |