From af954da9234a18abb087bb64c362e1955315615e Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 25 九月 2023 19:06:12 +0800
Subject: [PATCH] 产品类别-产品列表

---
 src/views/productManage/productCategory/ProductList.vue |   68 +++++++++++++++++-----------------
 1 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/src/views/productManage/productCategory/ProductList.vue b/src/views/productManage/productCategory/ProductList.vue
index 1ab6b68..a548d31 100644
--- a/src/views/productManage/productCategory/ProductList.vue
+++ b/src/views/productManage/productCategory/ProductList.vue
@@ -56,11 +56,18 @@
         infomation: {}
       },
       isIconIndex: "1", // 1 鍥炬爣 2 鍒楄〃
-      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
+      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
+      keyWord: "",
+      categoryId: null
     }
   },
   created() {
     this.setTable()
+    let query = this.$route.query
+    if (query) {
+      this.categoryId = query.id ? Number(query.id) : null
+      this.pagerOptions.currPage = 1
+    }
     this.getData()
   },
   methods: {
@@ -85,81 +92,74 @@
       let tableColumn = [
         {
           label: "浜у搧鍚嶇О",
-          prop: "id",
+          prop: "name",
           isShowColumn: true,
           default: true
         },
         {
           label: "鍐呴儴鍙傝��",
-          prop: "deviceName",
+          prop: "internalReference",
           isShowColumn: showcol.includes("鍐呴儴鍙傝��"),
           default: false
         },
         {
           label: "璐熻矗浜�",
-          prop: "id",
+          prop: "principal",
           isShowColumn: true,
           default: true
         },
         {
           label: "浜у搧鏍囩",
-          prop: "deviceId",
+          prop: "productTagName",
           isShowColumn: showcol.includes("浜у搧鏍囩"),
           default: false
         },
         {
           label: "鏉$爜",
-          prop: "shopName",
+          prop: "barcode",
           isShowColumn: showcol.includes("鏉$爜"),
           default: false
         },
         {
-          label: "鍏徃",
-          prop: "shopName",
-          isShowColumn: showcol.includes("鍏徃"),
-          default: false
-        },
-        {
           label: "閿�鍞环鏍�",
-          prop: "faultLevel",
+          prop: "salePrice",
           isShowColumn: showcol.includes("閿�鍞环鏍�"),
           default: false
         },
         {
           label: "鎴愭湰",
-          prop: "status",
+          prop: "cost",
           isShowColumn: showcol.includes("鎴愭湰"),
-          default: false,
-          status: true
+          default: false
         },
         {
           label: "浜у搧绫诲埆",
-          prop: "faultTime",
+          prop: "categoryName",
           isShowColumn: showcol.includes("浜у搧绫诲埆"),
           default: false
         },
         {
           label: "浜у搧绫诲瀷",
-          prop: "shopName",
+          prop: "model",
           isShowColumn: showcol.includes("浜у搧绫诲瀷"),
           default: false
         },
         {
           label: "鍦ㄥ簱鏁伴噺",
-          prop: "faultLevel",
+          prop: "amount",
           isShowColumn: showcol.includes("鍦ㄥ簱鏁伴噺"),
           default: false
         },
-        {
-          label: "棰勬祴鏁伴噺",
-          prop: "status",
-          isShowColumn: showcol.includes("棰勬祴鏁伴噺"),
-          default: false,
-          status: true
-        },
+        // {
+        //   label: "棰勬祴鏁伴噺",
+        //   prop: "status",
+        //   isShowColumn: showcol.includes("棰勬祴鏁伴噺"),
+        //   default: false,
+        //   status: true
+        // },
         {
           label: "璁¢噺鍗曚綅",
-          prop: "faultTime",
+          prop: "unit",
           isShowColumn: showcol.includes("璁¢噺鍗曚綅"),
           default: false
         }
@@ -171,21 +171,21 @@
       this.tableList.tableColumn = this.setTableColumn(val)
     },
     // 璇锋眰鏁版嵁
-    async getData(val, content) {
+    async getData() {
       await getProductList({
-        [val]: content,
+        keyWord: this.keyWord,
+        categoryId: this.categoryId ? this.categoryId : null,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
-        if (res.data.code === 200) {
-          const list = res.data.data.list.map((item) => {
+        if (res.code === 200) {
+          const list = res.data.map((item) => {
             return {
-              ...item,
-              supplierNumber: item.supplier.number
+              ...item
             }
           })
           this.tableList.tableInfomation = list || []
-          this.pagerOptions.totalCount = res.data.data.total
+          this.pagerOptions.totalCount = res.total
         }
       })
     },

--
Gitblit v1.8.0