From b39bf36c1c380285582b7daffb5dd656aa1e1389 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期一, 06 十一月 2023 17:20:04 +0800
Subject: [PATCH] 退出动态跳转登录页

---
 src/views/other/payment/saleInvoice/index.vue |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/src/views/other/payment/saleInvoice/index.vue b/src/views/other/payment/saleInvoice/index.vue
index ac90903..0ed89c1 100644
--- a/src/views/other/payment/saleInvoice/index.vue
+++ b/src/views/other/payment/saleInvoice/index.vue
@@ -101,7 +101,7 @@
       keyword: "",
       keywordType: "",
       tableColumn: [
-        { label: "鍙戠エ缂栧彿", prop: "invoiceNumber", default: true },
+        { label: "鍙戠エ缂栧彿", prop: "number", default: true },
         { label: "涓婚", prop: "subject" },
         { label: "瀹㈡埛鍚嶇О", prop: "client_name" },
         { label: "绁ㄦ嵁绫诲瀷", prop: "invoiceType_name" },
@@ -169,17 +169,29 @@
     // 璇锋眰鏁版嵁
     async getData() {
       this.loading = true
-      await getInvoiceList({
-        keyword: this.keyword,
-        keywordType: this.keywordType,
-        page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
-        sourceId:this.addConfig.id
-      })
+      console.log(this.addConfig)
+      let params = {}
+      let sourceTyle = this.addConfig.keywordType === "閿�鍞槑缁嗗崟" ? 1 : 2
+      if (this.addConfig.id) {
+        params = {
+          sourceId: this.addConfig.id,
+          sourceType: sourceTyle,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        }
+      } else {
+        params = {
+          keyword: this.keyword,
+          keywordType: this.keywordType,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        }
+      }
+      await getInvoiceList(params)
         .then((res) => {
-          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,
                   client_name: item.Client.name,
@@ -188,7 +200,7 @@
                 }
               })
               this.tableList.tableInfomation = list || []
-              this.pagerOptions.totalCount = res.data.data.count
+              this.pagerOptions.totalCount = res.data.count
             } else {
               this.tableList.tableInfomation = []
             }

--
Gitblit v1.8.0