From aa6c4d503b54bb18e5f3207c62640a9b81073e9e Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 17 十月 2023 20:02:20 +0800
Subject: [PATCH] 产品列表内部参考改为内部编码

---
 src/views/overview/OverviewListView.vue |   85 ++++++++++++++++++++++++++----------------
 1 files changed, 52 insertions(+), 33 deletions(-)

diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index aab7906..98c0581 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -3,7 +3,7 @@
     <div class="top">
       <SearchCommonView
         :add-title="'鏂板缓'"
-        :placeholder="'璇疯緭鍏ュ崟鍙�'"
+        :placeholder="'璇疯緭鍏ュ崟鍙�/鏉ユ簮鍗曟嵁'"
         :amount-view="false"
         @addCommonClick="addBtnClick"
         @searchClick="getList"
@@ -59,13 +59,28 @@
         title: "鏂板缓",
         infomation: {}
       },
-      workType: this.$route.params.workType
+      workType: this.$route.params.workType,
+      keyword: "",
+      params: {}
     }
   },
   created() {
     this.setTable()
+    var paramsData = sessionStorage.getItem("paramsData")
+    let params = {}
+    if (paramsData) {
+      params = JSON.parse(sessionStorage.getItem("paramsData"))
+    } else {
+      params = this.$route.params
+      sessionStorage.setItem("paramsData", JSON.stringify(params))
+    }
+    this.params = params
     this.getData()
-    console.log(this.$route.params.workType)
+    // console.log(this.$route.params.workType)
+  },
+  // 椤甸潰閿�姣佷箣鍓�
+  beforeDestroy() {
+    sessionStorage.removeItem("paramsData")
   },
   methods: {
     setTable() {
@@ -124,39 +139,39 @@
           default: false,
           date: true
         },
-        {
-          label: "浜у搧鍙敤鎬�",
-          prop: "status",
-          isShowColumn: showcol.includes("浜у搧鍙敤鎬�"),
-          default: false
-        },
-        {
-          label: "鎴鏃ユ湡",
-          prop: "faultTime",
-          isShowColumn: showcol.includes("鎴鏃ユ湡"),
-          default: false
-        },
-        {
-          label: "瀹為檯鏃ユ湡",
-          prop: "shopName",
-          isShowColumn: showcol.includes("瀹為檯鏃ユ湡"),
-          default: false
-        },
+        // {
+        //   label: "浜у搧鍙敤鎬�",
+        //   prop: "status",
+        //   isShowColumn: showcol.includes("浜у搧鍙敤鎬�"),
+        //   default: false
+        // },
+        // {
+        //   label: "鎴鏃ユ湡",
+        //   prop: "faultTime",
+        //   isShowColumn: showcol.includes("鎴鏃ユ湡"),
+        //   default: false
+        // },
+        // {
+        //   label: "瀹為檯鏃ユ湡",
+        //   prop: "shopName",
+        //   isShowColumn: showcol.includes("瀹為檯鏃ユ湡"),
+        //   default: false
+        // },
         {
           label: "鏉ユ簮鍗曟嵁",
           prop: "sourceNumber",
           isShowColumn: showcol.includes("鏉ユ簮鍗曟嵁"),
           default: false
         },
-        {
-          label: "娆犲崟",
-          prop: "status",
-          isShowColumn: showcol.includes("娆犲崟"),
-          default: false
-        },
+        // {
+        //   label: "娆犲崟",
+        //   prop: "status",
+        //   isShowColumn: showcol.includes("娆犲崟"),
+        //   default: false
+        // },
         {
           label: "鍏ュ簱绫诲瀷",
-          prop: "faultTime",
+          prop: "operationTypeName",
           isShowColumn: showcol.includes("鍏ュ簱绫诲瀷"),
           default: false
         },
@@ -180,13 +195,14 @@
     // 璇锋眰鏁版嵁
     async getData() {
       await getOperation({
-        operationTypeId: this.$route.params.id,
+        number: this.keyword,
+        operationTypeId: this.params.id,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
-        console.log(res.data.data)
-        if (res.data.code === 200) {
-          const list = res.data.data.map((item) => {
+        console.log(res.data)
+        if (res.code === 200) {
+          const list = res.data.map((item) => {
             return {
               ...item,
               from: item.fromLocation.name,
@@ -194,13 +210,16 @@
             }
           })
           this.tableList.tableInfomation = list || []
-          this.pagerOptions.totalCount = res.data.total
+          this.pagerOptions.totalCount = res.total
         }
       })
     },
     // 鎼滅储
     getList(val) {
       console.log(val)
+      this.keyword = val
+      this.pagerOptions.currPage = 1
+      this.getData()
     },
     // 琛岀偣鍑�
     tableRowClick(row) {

--
Gitblit v1.8.0