From 0e008b2934502896a3426859289511d42286682d Mon Sep 17 00:00:00 2001 From: liaohechuan Date: Mon, 20 Jan 2025 20:07:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=88=E7=BA=BF=E8=BE=B9=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=BA=93=E5=AD=98=E5=B7=AE=E5=BC=82=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=89=EF=BC=9A=E6=89=93=E5=8D=B0=E6=9C=BA=E5=8F=AF=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wip/inventory-difference-adjust/index.vue | 60 ++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/src/views/mes/wip/inventory-difference-adjust/index.vue b/src/views/mes/wip/inventory-difference-adjust/index.vue index 9816c58..5a47f16 100644 --- a/src/views/mes/wip/inventory-difference-adjust/index.vue +++ b/src/views/mes/wip/inventory-difference-adjust/index.vue @@ -14,7 +14,7 @@ - + @@ -26,6 +26,16 @@ + + + + + + + + + + { + this.filteredOptions = this.selectPrinterName.filter(item => + item.label.toLowerCase().includes(query.toLowerCase()) + ); + this.printerLoading = false; + }, 300); // 假设 300ms 后数据返回 + } + }, // 下料跳转初始化方法 init(inventoryIdList) { let me = this @@ -283,13 +318,24 @@ export default { if(optionList[i].optionName === 'STORAGE_LOCATION'){ that.searchForm.storageLocation = optionList[i].optionValue that.storageLocationList = optionList[i].optionValue.split(";") - that.searchForm = Object.assign({}, that.searchForm) } // 打印机 if(optionList[i].optionName === 'PRINTER'){ - that.printer = optionList[i].optionValue + that.printerList = optionList[i].optionValue.split(";") + that.printerList.forEach(item => { + const obj = { + label: item, + value: item + }; + that.selectPrinterName.push(obj); + that.filteredOptions.push(obj); + }) + if (that.printerList.length === 1) { + that.searchForm.printer = that.printerList[0]; + } } } + that.searchForm = Object.assign({}, that.searchForm) }).catch(e => { hideLoading() }) @@ -390,8 +436,8 @@ export default { }, // 标签打印 labelPrint() { - if (!this.printer) { - return this.$message.warning("请先在作业规则维护打印机[PRINTER]!"); + if (!this.searchForm.printer) { + return this.$message.warning("请先选择打印机!"); } else if (this.selectedRows.length === 0) { return this.$message.warning("请先勾选列表中需要打印的数据!"); } else { @@ -402,7 +448,7 @@ export default { }).then(() => { showLoading(); labelPrint({ - printer: this.printer, + printer: this.searchForm.printer, inventoryDifferenceAdjustDTOList: this.selectedRows }).then((response) => { hideLoading();