From 141f70dec1ddcee8ef6c0152e7fef56f96cd5628 Mon Sep 17 00:00:00 2001 From: andy <1042025947@qq.com> Date: Fri, 6 Nov 2026 13:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E6=96=99=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index.vue | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/views/index.vue b/src/views/index.vue index 0f4b26b..d451b0c 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -63,6 +63,15 @@
+
+ 自主查询 + +
+ 勾选自主查询后,可自行输入查询格式统一的物料编码或物料名称 +
+ +
+
按编码 @@ -74,6 +83,7 @@ filterable remote reserve-keyword + :allow-create="useAutonomous" collapse-tags :placeholder="searchMode === 'code' ? '可选:搜索并多选物料后查询库存' : '可选:按名称搜索并多选'" :remote-method="remoteSearchMaterial" @@ -93,7 +103,7 @@ 清除指定
-
+
{ const rows = response.rows || []; @@ -331,12 +343,18 @@ export default { clearSelection() { this.selectedMaterials = []; this.materialOptions = []; + this.queryParams.materialCode = "" + this.queryParams.materialName = "" + this.queryParams.pageNum = 0 this.getList(); }, /** 指定物料:一次批量查库存 */ async handleQueryInventory() { if (!this.selectedMaterials.length) { this.$message.info("未指定物料,已按默认列表查询"); + this.queryParams.materialCode = "" + this.queryParams.materialName = "" + this.queryParams.pageNum = 0 this.getList(); return; } @@ -344,6 +362,17 @@ export default { this.$message.warning("单次最多查询 50 个物料"); return; } + //使用自主查询 + if(this.useAutonomous){ + if(this.searchMode === 'code'){ + this.queryParams.materialCode = this.selectedMaterials.join(',') + }else{ + this.queryParams.materialName = this.selectedMaterials.join(',') + } + this.queryParams.pageNum = 0 + this.getList(); + return; + } this.selectedMode = true; const reqSeq = ++this.inventoryReqSeq; const codes = this.selectedMaterials.map(m => m.materialCode).filter(Boolean);