diff --git a/ayanova/src/components/work-order-item-parts.vue b/ayanova/src/components/work-order-item-parts.vue index d7b300c4..c02c732d 100644 --- a/ayanova/src/components/work-order-item-parts.vue +++ b/ayanova/src/components/work-order-item-parts.vue @@ -373,6 +373,19 @@ ref="selectedPartAssembly" data-cy="selectedPartAssembly" > + + {{ @@ -408,7 +421,8 @@ export default { activeItemIndex: null, selectedRow: [], partAssemblyDialog: false, - selectedPartAssembly: null + selectedPartAssembly: null, + selectedPartWarehouse: 1 }; }, props: { @@ -456,27 +470,32 @@ export default { methods: { async addPartAssembly() { let res = await window.$gz.api.get( - `task-group/${this.selectedTaskGroup}` + `part-assembly/${this.selectedPartAssembly}` ); if (res.data && res.data.items) { let newIndex = this.value.items[this.activeWoItemIndex].parts.length; - res.data.items.forEach(z => { newIndex++; - this.value.items[this.activeWoItemIndex].parts.push({ id: 0, concurrency: 0, - sequence: newIndex, - task: z.task, - status: 1, //incomplete==1 - statusViz: incompleteViz, - completedByUserId: null, - completedDate: null, + userId: null, + description: null, + serials: null, + partId: z.partId, + partWarehouseId: this.selectedPartWarehouse, + quantity: z.quantity, + taxPartSaleId: null, + price: 0, + priceOverride: null, + cost: 0, + listPrice: 0, isDirty: true, workOrderItemId: this.value.items[this.activeWoItemIndex].id, uid: Date.now(), - completedByUserViz: null + partWarehouseViz: null, + partViz: z.partViz, + taxCodeViz: null }); }); this.$emit("change"); @@ -484,7 +503,7 @@ export default { this.activeItemIndex = newIndex; } - this.taskGroupDialog = false; + this.partAssemblyDialog = false; }, doRequest() { const requestQuantity = this.value.items[this.activeWoItemIndex].parts[