diff --git a/ayanova/src/components/work-order-item-parts.vue b/ayanova/src/components/work-order-item-parts.vue index 8043dcd3..7893e57d 100644 --- a/ayanova/src/components/work-order-item-parts.vue +++ b/ayanova/src/components/work-order-item-parts.vue @@ -419,10 +419,13 @@ $ay.t("Cancel") }} - - {{ - $ay.t("Add") - }} + {{ $ay.t("Add") }} - @@ -528,6 +520,9 @@ export default { when done sb able to view current available serials not selected, quickly pick them off and then add en-masse */ + this.availableSerials.splice(0); + this.selectedSerials.splice(0); + const partId = this.value.items[this.activeWoItemIndex].parts[ this.activeItemIndex ].partId; @@ -542,16 +537,25 @@ export default { ); } else { this.availableSerials = res.data; - - for (let a = 0; a < 1000; a++) { - this.availableSerials.push(`serial-${a}`); - } - this.serialDialog = true; } }, addSelectedSerials() { - console.log(this.selectedSerials); + let serials = this.value.items[this.activeWoItemIndex].parts[ + this.activeItemIndex + ].serials; + + serials = serials.trim(); + + if (!window.$gz.util.stringIsNullOrEmpty(serials)) { + serials += ","; + } + + serials += this.selectedSerials.join(","); + + this.value.items[this.activeWoItemIndex].parts[ + this.activeItemIndex + ].serials = serials; }, async addPartAssembly() { let res = await window.$gz.api.get(