export function createSchedulingColumns() { return [ { width: 45, type: 'selection', columnKey: 'selection', align: 'center', slot: 'selection' }, { label: '序号', prop: 'serialNumber', width: 55, align: 'center', showOverflowTooltip: true }, { prop: 'batchNo', label: '批次号', align: 'center', minWidth: 140 }, { prop: 'code', label: '计划编号', align: 'center', minWidth: 160 }, { prop: 'productionLineName', label: '产线名称', align: 'center', minWidth: 160 }, { prop: 'productionLineRhythm', label: '产线节拍', align: 'center', minWidth: 160 }, { prop: 'startTime', label: '计划开始时间', align: 'center', width: 150, showOverflowTooltip: true }, { prop: 'endTime', label: '计划结束时间', align: 'center', width: 150, showOverflowTooltip: true }, { prop: 'deliveryTime', label: '交期', align: 'center', minWidth: 150 }, { prop: 'productCode', label: '编码', align: 'center', showOverflowTooltip: true, minWidth: 140 }, { prop: 'productName', label: '名称', align: 'center', showOverflowTooltip: true, minWidth: 140 }, { prop: 'specification', label: '规格', align: 'center', minWidth: 150, showOverflowTooltip: true }, { prop: 'brandNo', label: '牌号', minWidth: 150, align: 'center', showOverflowTooltip: true }, { prop: 'model', minWidth: 150, label: '型号', align: 'center', showOverflowTooltip: true }, { prop: 'productionType', label: '生产类型', align: 'center', showOverflowTooltip: true, minWidth: 140 }, { prop: 'productNum', label: '计划数量', minWidth: 140, showOverflowTooltip: true, align: 'center' }, { prop: 'unit', label: '单位', minWidth: 140, showOverflowTooltip: true, align: 'center' }, { prop: 'assignmentName', label: '作业名称', minWidth: 140, showOverflowTooltip: true, align: 'center' }, { prop: 'contractor', label: '承制单位', minWidth: 140, showOverflowTooltip: true, align: 'center' }, { prop: 'planType', label: '计划类别', minWidth: 140, showOverflowTooltip: true, align: 'center', formatter: (row) => { const planTypeMap = [ { label: '内销计划', value: '1' }, { label: '外销计划', value: '2' }, { label: '预制计划', value: '3' }, { label: '改型计划', value: '4' }, { label: '返工返修计划', value: '5' } ]; const obj = planTypeMap.find((i) => i.value == row.planType); return obj && obj.label; } }, { prop: 'dotLineStatus', slot: 'dotLineStatus', label: '布点状态', align: 'center', width: 80, showOverflowTooltip: true }, { prop: 'produceType', label: 'BOM类型', align: 'center', showOverflowTooltip: true, width: 120, formatter: (row) => { if (row.produceType == 1) { return 'PBOM'; } if (row.produceType == 2) { return 'MBOM'; } if (row.produceType == 3) { return 'ABOM'; } return ''; } }, { prop: 'bomCategoryName', label: 'BOM版本', align: 'center', showOverflowTooltip: true, width: 130, formatter: (row) => { if (row.bomCategoryName) { return `${row.bomCategoryName} (V${row.bomCategoryVersions}.0)`; } return ''; } }, { prop: 'produceRoutingName', label: '工艺路线', align: 'center', width: 140, showOverflowTooltip: true }, { prop: 'priority', label: '优先级', align: 'center', minWidth: 120, slot: 'priority', sortable: 'custom' }, { label: '操作', align: 'center', width: 100, slot: 'action', fixed: 'right' } ]; } export function createWorkOrderSchedulingColumns() { return [ { width: 45, type: 'selection', columnKey: 'selection', align: 'center', slot: 'selection' }, { label: '序号', prop: 'serialNumber', width: 55, align: 'center', showOverflowTooltip: true }, { prop: 'batchNo', label: '批次号', align: 'center', minWidth: 120, showOverflowTooltip: true }, { prop: 'code', label: '生产订单号', align: 'center', minWidth: 170, showOverflowTooltip: true }, { prop: 'workOrderType', label: '订单类型', align: 'center', width: 100, slot: 'workOrderType' }, { prop: 'productionPlanCode', label: '计划编号', align: 'center', minWidth: 160, showOverflowTooltip: true }, { prop: 'productCode', label: '产品编码', align: 'center', minWidth: 140, showOverflowTooltip: true }, { prop: 'productName', label: '产品名称', align: 'center', minWidth: 170, showOverflowTooltip: true }, { prop: 'productionCodes', label: '生产编号', align: 'center', minWidth: 150, showOverflowTooltip: true }, { prop: 'formingNum', label: '订单数量', align: 'center', minWidth: 120, showOverflowTooltip: true, formatter: (row) => { const unit = row.measuringUnit || row.unit; return [row.formingNum, unit] .filter((item) => item !== null && item !== undefined && item !== '') .join(''); } }, { prop: 'planStartTime', label: '计划开始时间', align: 'center', width: 150, showOverflowTooltip: true }, { prop: 'planCompleteTime', label: '计划结束时间', align: 'center', width: 150, showOverflowTooltip: true }, { prop: 'firstTaskName', label: '首工序', align: 'center', minWidth: 120, showOverflowTooltip: true }, { prop: 'workCenterName', label: '工作中心', align: 'center', minWidth: 120, showOverflowTooltip: true }, { label: '操作', align: 'center', width: 100, slot: 'action', fixed: 'right' } ]; }