From 27876781629d64545777c069ed60717b34f46b2c Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 03 十一月 2023 17:05:49 +0800
Subject: [PATCH] 库存预览跳转带出单据的状态及仓库位置列表默认展示内部位置

---
 src/components/makepager/SearchCommonView.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/components/makepager/SearchCommonView.vue b/src/components/makepager/SearchCommonView.vue
index dd328e8..3c280c3 100644
--- a/src/components/makepager/SearchCommonView.vue
+++ b/src/components/makepager/SearchCommonView.vue
@@ -54,7 +54,7 @@
             <template v-if="selectArr?.length > 0" slot="prepend">
               <div style="display: flex">
                 <div v-for="(val, i) in selectArr" :key="i" class="pre-views">
-                  <span style="margin-left: 5px">{{ val.title }}</span>
+                  <span style="margin-left: 5px">{{ val?.title ?? val }}</span>
                   <i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i>
                 </div>
               </div>
@@ -80,7 +80,7 @@
             trigger="click"
             :hide-on-click="false"
             placement="bottom"
-            @command="switchStatusKeywords($event, selList)"
+            @command="switchKeywords($event, selList)"
           >
             <div class="common yes-cursor">
               <img src="@/assets/img/shaixuan.png" style="width: 10px" />
@@ -90,7 +90,7 @@
               <el-dropdown-item
                 v-for="(item, key) in screenArray"
                 :key="key"
-                :command="{ command: item.title, ...item }"
+                :command="item.title"
                 :class="{ selected: status == item.title }"
               >
                 <div class="dropdown-view">
@@ -256,6 +256,9 @@
     }
   },
   mounted() {
+    this.searchTaskMap.forEach((ele) => {
+      this.selList.push(ele.title)
+    })
     this.selectArr = this.searchTaskMap
   },
   methods: {
@@ -287,8 +290,8 @@
     inspectionConfigClick() {
       this.$emit("inspectionConfigClick")
     },
-    switchStatusKeywords(command, item) {
-      console.log("index", command)
+    switchKeywords(command, item) {
+      console.log("index", command, item)
       this.status = command
       const oldValue = item
       console.log(oldValue)
@@ -301,6 +304,7 @@
       } else {
         oldValue.push(command)
       }
+      this.$emit("switchKeywords", item)
     },
     // 鍒犻櫎绛涢�夊唴瀹�
     delSelectClick(item) {
@@ -427,7 +431,7 @@
   }
 }
 .selected {
-  color: #409eff;
+  color: #606266;
 }
 .dropdown-view {
   position: relative;

--
Gitblit v1.8.0