From e7a7f4f1215e5fc437e417076c68cd191ea859bb Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 16 十月 2023 14:03:11 +0800
Subject: [PATCH] 编辑合同管理销售报价单问题修复

---
 src/views/other/commonDialog/SelectCommonDialog.vue |   52 +++++++++++++++++++++++++++++++---------------------
 1 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 024bfe4..4ea3c14 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,18 +391,19 @@
       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) {
-          if (res.data.data.data && res.data.data.data.length > 0) {
-            const list = res.data.data.data.map((item) => {
+        if (res.code === 200) {
+          if (res.data.data && res.data.data.length > 0) {
+            const list = res.data.data.map((item) => {
               return {
                 ...item
               }
             })
-            this.tableList.tableInfomation = list.slice(0, 5) || []
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.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