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();