From a63d71177a2899b01da37e5bfc2d498bec5f80be Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 17 十月 2023 15:10:13 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into zhengwenfeng/modify-style

---
 src/views/other/payment/receipt/index.vue |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/views/other/payment/receipt/index.vue b/src/views/other/payment/receipt/index.vue
index ff6411b..ec12224 100644
--- a/src/views/other/payment/receipt/index.vue
+++ b/src/views/other/payment/receipt/index.vue
@@ -146,6 +146,7 @@
     }
     this.getData()
   },
+  mounted() {},
   methods: {
     setTable() {
       this.tableList = {
@@ -176,16 +177,31 @@
     },
     // 璇锋眰鏁版嵁
     async getData() {
+      // console.log()
       this.loading = true
-      await getReceiptList({
-        keyword: this.keyword,
-        keywordType: this.keywordType,
-        page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize
-      })
+      let params = {}
+      let sourceTyle = this.addConfig.keywordType === "閿�鍞槑缁嗗崟" || this.addConfig.keywordType === "瀹㈡埛鍚嶇О" ? 1 : 2
+      if (this.addConfig.id) {
+        params = {
+          sourceId: this.addConfig.id,
+          sourceType: sourceTyle,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize,
+          client_id: this.addConfig.client_id
+        }
+      } else {
+        params = {
+          keyword: this.keyword,
+          keywordType: this.keywordType,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize,
+          client_id: this.addConfig.client_id
+        }
+      }
+      await getReceiptList(params)
         .then((res) => {
-          if (res.data.code === 200) {
-            const resList = res?.data?.data?.data ?? []
+          if (res.code === 200) {
+            const resList = res?.data?.data ?? []
             if (resList.length > 0) {
               const list = resList.map((item) => {
                 return {
@@ -196,7 +212,7 @@
                 }
               })
               this.tableList.tableInfomation = list || []
-              this.pagerOptions.totalCount = res.data.data.count
+              this.pagerOptions.totalCount = res.data.count
             } else {
               this.tableList.tableInfomation = []
             }
@@ -230,8 +246,8 @@
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
-      this.editConfig.sourceType = this.sourceType
-      this.editConfig.infomation = { ...this.addConfig, number: "" }
+      this.editConfig.sourceType = this.addConfig.keywordType === "瀹㈡埛鍚嶇О" ? 1 : this.sourceType
+      this.editConfig.infomation = { ...this.addConfig, saleDetailNumber: "" }
     }
   }
 }

--
Gitblit v1.8.0