| | |
| | | import type { MesMdProductBomApi } from '#/api/mes/md/item/productBom'; |
| | | import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder'; |
| | | import type { MesProWorkOrderBomApi } from '#/api/mes/pro/workorder/bom'; |
| | | import type { MesProWorkOrderProcessApi } from '#/api/mes/pro/workorder/process'; |
| | | |
| | | import { h, markRaw } from 'vue'; |
| | | |
| | |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | | /** 订单工序列表的字段 */ |
| | | export function useProcessGridColumns( |
| | | draggable = false, |
| | | ): VxeTableGridOptions<MesProWorkOrderProcessApi.WorkOrderProcess>['columns'] { |
| | | return [ |
| | | ...(draggable |
| | | ? [ |
| | | { |
| | | field: 'drag', |
| | | title: '', |
| | | width: 40, |
| | | fixed: 'left', |
| | | slots: { default: 'dragHandle' }, |
| | | } as const, |
| | | ] |
| | | : []), |
| | | { |
| | | field: 'sort', |
| | | title: '序号', |
| | | width: 80, |
| | | }, |
| | | { |
| | | field: 'processCode', |
| | | title: '工序编码', |
| | | width: 120, |
| | | }, |
| | | { |
| | | field: 'processName', |
| | | title: '工序名称', |
| | | minWidth: 150, |
| | | }, |
| | | { |
| | | field: 'nextProcessName', |
| | | title: '下一道工序', |
| | | width: 120, |
| | | }, |
| | | { |
| | | field: 'linkType', |
| | | title: '工序关系', |
| | | width: 100, |
| | | formatter: ({ cellValue }) => { |
| | | const map: Record<number, string> = { |
| | | 0: '开始-开始', |
| | | 1: '结束-结束', |
| | | 2: '开始-结束', |
| | | 3: '结束-开始', |
| | | }; |
| | | return map[cellValue] ?? '-'; |
| | | }, |
| | | }, |
| | | { |
| | | field: 'prepareTime', |
| | | title: '准备时间(分)', |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'waitTime', |
| | | title: '等待时间(分)', |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'keyFlag', |
| | | title: '关键工序', |
| | | width: 80, |
| | | slots: { default: 'keyFlag' }, |
| | | }, |
| | | { |
| | | field: 'checkFlag', |
| | | title: '质检工序', |
| | | width: 80, |
| | | slots: { default: 'checkFlag' }, |
| | | }, |
| | | { |
| | | field: 'backflushFlag', |
| | | title: '倒冲', |
| | | width: 80, |
| | | slots: { default: 'backflushFlag' }, |
| | | }, |
| | | { |
| | | field: 'outputItemCode', |
| | | title: '产出物料编码', |
| | | width: 120, |
| | | }, |
| | | { |
| | | field: 'outputItemName', |
| | | title: '产出物料名称', |
| | | width: 120, |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '备注', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | | ]; |
| | | } |