From 3d04f62e6c9124e2d37b5d09191a02fc6390d16f Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 13 十月 2023 17:07:10 +0800
Subject: [PATCH] bug修复

---
 src/views/other/commonDialog/SelectCommonDialog.vue |   46 ++++++++++++++++++++++++++++------------------
 1 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 024bfe4..cb6563e 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -66,6 +66,7 @@
         return {
           editVisible: false,
           title: "",
+          clientId: 0,
           tableInfomation: []
         }
       }
@@ -93,6 +94,9 @@
     }
   },
   created() {
+    this.search_map = {
+      client_id: this.editConfig.clientId
+    }
     this.setTable()
     this.getData()
   },
@@ -279,8 +283,8 @@
       await getServiceContractList({
         keyword: this.keyword,
         keywordType: this.keywordType,
-        page: 0,
-        pageSize: 0
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           if (res.data.list && res.data.list.length > 0) {
@@ -292,7 +296,8 @@
                 serviceContractStatus: item.serviceContractStatus.name
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.count
           } else {
             this.tableList.tableInfomation = []
           }
@@ -304,8 +309,8 @@
     async getQuotationList() {
       await getQuotationList({
         search_map: this.search_map,
-        page: 0,
-        pageSize: 0
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           if (res.data.list && res.data.list.length > 0) {
@@ -315,7 +320,8 @@
                 member_name: item.member.username
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.count
           } else {
             this.tableList.tableInfomation = []
           }
@@ -328,8 +334,8 @@
       await getSalesDetailsList({
         keyword: this.keyword,
         keywordType: this.keywordType,
-        page: 0,
-        pageSize: 0
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           if (res.data.list && res.data.list.length > 0) {
@@ -340,7 +346,8 @@
                 member_name: item.Member.username
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.count
           } else {
             this.tableList.tableInfomation = []
           }
@@ -353,8 +360,8 @@
       await getServiceOrderList({
         keyword: this.keyword,
         keywordType: this.keywordType,
-        page: 0,
-        pageSize: 0
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           if (res.data.data && res.data.data.length > 0) {
@@ -370,7 +377,8 @@
                 serviceOrderStatus_name: item.ServiceOrderStatus_name
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.count
           } else {
             this.tableList.tableInfomation = []
           }
@@ -383,8 +391,8 @@
       await getProductList({
         productName: this.keywordType === "浜у搧鍚嶇О" ? this.keyword : "",
         productNumber: this.keywordType === "浜у搧缂栧彿" ? this.keyword : "",
-        page: 1,
-        pageSize: 5
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         console.log(res.data)
         if (res.data.code === 200) {
@@ -394,7 +402,8 @@
                 ...item
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.data.count
           } else {
             this.tableList.tableInfomation = []
           }
@@ -406,8 +415,8 @@
       await getSalesReturnList({
         keyword: this.keyword,
         keywordType: this.keywordType,
-        page: 0,
-        pageSize: 0
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           if (res.data.list && res.data.list.length > 0) {
@@ -417,7 +426,8 @@
                 salesReturnStatus_name: item.SalesReturnStatus.name
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.count
           } else {
             this.tableList.tableInfomation = []
           }

--
Gitblit v1.8.0