|
|
@@ -603,7 +603,6 @@
|
|
|
},
|
|
|
hasOrderSchedulingGanttSelection() {
|
|
|
return (
|
|
|
- this.isOrderScheduling &&
|
|
|
Array.isArray(this.selection) &&
|
|
|
this.selection.length > 0
|
|
|
);
|
|
|
@@ -690,46 +689,57 @@
|
|
|
collectSelectedOrderSchedulingGanttMatchGroups(rows = []) {
|
|
|
const groups = this.createOrderSchedulingGanttMatchGroups();
|
|
|
(Array.isArray(rows) ? rows : []).forEach((row) => {
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'orderIds',
|
|
|
- row?.workOrderId || row?.id
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'orderIds',
|
|
|
- row?.apsWorkOrderId
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'orderIds',
|
|
|
- row?.sourceWorkOrderId || row?.orderId
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'orderCodes',
|
|
|
- row?.productionOrderNumber || row?.code
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'orderCodes',
|
|
|
- row?.apsWorkOrderCode || row?.workOrderCode
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'orderCodes',
|
|
|
- row?.productionOrderCode || row?.orderCode
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'planIds',
|
|
|
- row?.productionPlanId || row?.planId
|
|
|
- );
|
|
|
- this.addOrderSchedulingGanttMatchValue(
|
|
|
- groups,
|
|
|
- 'planCodes',
|
|
|
- row?.productionPlanCode || row?.planCode
|
|
|
- );
|
|
|
+ if (this.isOrderScheduling) {
|
|
|
+ // 班组排程:行是工单数据,同时收集工单键与关联计划键
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'orderIds',
|
|
|
+ row?.workOrderId || row?.id
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'orderIds',
|
|
|
+ row?.apsWorkOrderId
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'orderIds',
|
|
|
+ row?.sourceWorkOrderId || row?.orderId
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'orderCodes',
|
|
|
+ row?.productionOrderNumber || row?.code
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'orderCodes',
|
|
|
+ row?.apsWorkOrderCode || row?.workOrderCode
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'orderCodes',
|
|
|
+ row?.productionOrderCode || row?.orderCode
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'planIds',
|
|
|
+ row?.productionPlanId || row?.planId
|
|
|
+ );
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'planCodes',
|
|
|
+ row?.productionPlanCode || row?.planCode
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 工厂排产:行是生产计划数据,id 即计划主键、code 即计划编号
|
|
|
+ this.addOrderSchedulingGanttMatchValue(groups, 'planIds', row?.id);
|
|
|
+ this.addOrderSchedulingGanttMatchValue(
|
|
|
+ groups,
|
|
|
+ 'planCodes',
|
|
|
+ row?.code
|
|
|
+ );
|
|
|
+ }
|
|
|
});
|
|
|
return groups;
|
|
|
},
|