diff --git a/ayanova/src/components/work-order-item-units.vue b/ayanova/src/components/work-order-item-units.vue index 6b794ec7..f7c8d95e 100644 --- a/ayanova/src/components/work-order-item-units.vue +++ b/ayanova/src/components/work-order-item-units.vue @@ -233,7 +233,7 @@ - + {{ $ay.t("AddMultipleUnits") }} - {{ @@ -389,37 +381,37 @@ export default { }, addSelectedBulkUnits() { - if (res.data && res.data.items) { - let newIndex = this.value.items[this.activeWoItemIndex].parts.length; + if (this.selectedBulkUnits.length > 0) { + let newIndex = this.value.items[this.activeWoItemIndex].units.length; res.data.items.forEach(z => { newIndex++; - this.value.items[this.activeWoItemIndex].parts.push({ - id: 0, - concurrency: 0, - 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(), - partWarehouseViz: null, - partViz: z.partViz, - taxCodeViz: null - }); + // this.value.items[this.activeWoItemIndex].parts.push({ + // id: 0, + // concurrency: 0, + // 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(), + // partWarehouseViz: null, + // partViz: z.partViz, + // taxCodeViz: null + // }); }); this.$emit("change"); this.selectedRow = [{ index: newIndex }]; this.activeItemIndex = newIndex; } - this.partAssemblyDialog = false; + this.bulkUnitsDialog = false; }, unitChange(newName) { this.value.items[this.activeWoItemIndex].units[ diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index 4ea08130..8bf5c570 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -2137,7 +2137,8 @@ async function fetchTranslatedText(vm) { "Name", "PartAssemblyList", "PartAssembly", - "PartSerialNumbersAvailable" + "PartSerialNumbersAvailable", + "AddMultipleUnits" ]); }