From b0b8b22fc4ac2e76d5e7ab6bc5e6662b2c7fb092 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期三, 22 十一月 2023 16:52:16 +0800
Subject: [PATCH] fix:产品管理列表调整

---
 src/views/supplierManage/supplier/index.vue                  |    6 +++---
 src/views/productManage/product/index.vue                    |    6 +++---
 src/views/purchaseManage/purchase/components/AddPurchase.vue |    4 ++--
 src/views/other/commonDialog/SelectCommonDialog.vue          |    9 ++++-----
 src/views/supplierManage/supplier/RaleteSupplierList.vue     |    4 ++--
 5 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 2256300..e4d3bc0 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -159,16 +159,15 @@
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
-        console.log(res.data)
-        if (res.data.code === 200) {
-          if (res.data.data.list && res.data.data.list.length > 0) {
-            const list = res.data.data.list.map((item) => {
+        if (res.code === 200) {
+          if (res.data.list && res.data.list.length > 0) {
+            const list = res.data.list.map((item) => {
               return {
                 ...item
               }
             })
             this.tableList.tableInfomation = list
-            this.pagerOptions.totalCount = res.data.data.total
+            this.pagerOptions.totalCount = res.data.total
           } else {
             this.tableList.tableInfomation = []
           }
diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index 5979391..4549c5c 100644
--- a/src/views/productManage/product/index.vue
+++ b/src/views/productManage/product/index.vue
@@ -126,8 +126,8 @@
         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.list.map((item) => {
             return {
               ...item,
               supplierName: item.supplier.name,
@@ -135,7 +135,7 @@
             }
           })
           this.tableList.tableInfomation = list || []
-          this.pagerOptions.totalCount = res.data.data.total
+          this.pagerOptions.totalCount = res.data.total
         }
       })
     },
diff --git a/src/views/purchaseManage/purchase/components/AddPurchase.vue b/src/views/purchaseManage/purchase/components/AddPurchase.vue
index 7edbafb..b29c0e1 100644
--- a/src/views/purchaseManage/purchase/components/AddPurchase.vue
+++ b/src/views/purchaseManage/purchase/components/AddPurchase.vue
@@ -602,8 +602,8 @@
         page:1,
         pageSize:100
       }).then((res)=>{
-        if(res.data.code===200){
-          this.productTableList.tableProductList = res.data.data.list
+        if(res.code===200){
+          this.productTableList.tableProductList = res.data.list
           console.log(this.productTableList.tableProductList,"pop")
         }
       })
diff --git a/src/views/supplierManage/supplier/RaleteSupplierList.vue b/src/views/supplierManage/supplier/RaleteSupplierList.vue
index 9f70e62..371fbe2 100644
--- a/src/views/supplierManage/supplier/RaleteSupplierList.vue
+++ b/src/views/supplierManage/supplier/RaleteSupplierList.vue
@@ -107,7 +107,7 @@
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         console.log(res.data)
-        const list = res.data.data.list.map((item) => {
+        const list = res.data.list.map((item) => {
           return {
             ...item,
             supplierNumber: item.supplier.number,
@@ -115,7 +115,7 @@
           }
         })
         this.tableList.tableInfomation = list || []
-        this.pagerOptions.totalCount = res.data.data.total
+        this.pagerOptions.totalCount = res.data.total
       })
     },
     handleClose() {
diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
index 8eb6b99..9a42042 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -422,9 +422,9 @@
       this.getProductList()
     },
     // 璇︽儏
-    selCommonClick(row) {
-      getPurchaseList({pageSize:10,page:1,supplierId:row.ID}).then((res)=>{
-        this.commonDetail.productListInfo=res.data.data.list
+    async selCommonClick(row) {
+      await getPurchaseList({pageSize:10,page:1,supplierId:row.ID}).then((res)=>{
+        this.commonDetail.productListInfo=res.data.list
       })
       this.commonDetail.visible = true
       this.commonDetail.infomation = { ...row }

--
Gitblit v1.8.0