From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期三, 24 七月 2024 17:45:45 +0800
Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。

---
 src/views/purchaseManage/purchase/index.vue |   55 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index 9b7ca55..c8380df 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -9,7 +9,7 @@
           :show-download="false"
           :amount-view="false"
           :show-action-btn="false"
-          :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О/鐗╂枡鍚嶇О/閲囪喘鍗曞悕绉�'"
+          :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О/鐗╂枡鍚嶇О/閲囪喘鍗曞悕绉�/閲囪喘鍗曞彿绛�..'"
           @searchClick="onFilterSearch"
         />
       </div>
@@ -180,7 +180,7 @@
       { label: "瑙勬牸", prop: "specifications" },
       { label: "鍨嬪彿", prop: "modelNumber" },
       { label: "閲囪喘鏁伴噺", prop: "amount" },
-      { label: "宸插彂璐ф暟閲�", prop: "sendAmount" },
+      { label: "宸叉敹璐ф暟閲�", prop: "sendAmount" },
       { label: "宸插叆搴撴暟閲�", prop: "overAmount" },
       { label: "鍗曚綅", prop: "unit" },
       { label: "閲囪喘鍗曚环", prop: "purchasePrice", price: true },
@@ -203,7 +203,7 @@
       { label: "鏀惰揣浠撳簱", prop: "warehouseName" },
       { label: "浜у搧鍚嶇О", prop: "name" },
       { label: "浜у搧缂栫爜", prop: "number" },
-      { label: "鏁伴噺", prop: "amount" },
+      { label: "鏁伴噺", prop: "overAmount" },
       { label: "鍏ュ簱鏃堕棿", prop: "overTime" },
       { label: "鏀惰揣浜�", prop: "principal" },
       { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getWarehouseStatus }
@@ -246,6 +246,7 @@
       tableColumn: [
         { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 },
         { label: "閲囪喘鍗曞彿", prop: "number", min: 150, isCommonClick: true, default: true },
+        { label: "閿�鍞槑缁嗗崟", prop: "sourceOrder", min: 130 },
         { label: "閲囪喘鍗曞悕绉�", prop: "name", min: 130, isCommonClick: true },
         { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
         { label: "閲囪喘鏁伴噺", prop: "quantity", min: 130 },
@@ -253,7 +254,7 @@
         { label: "缁忓姙浜�", prop: "handledBy", min: 130 },
         { label: "鍒跺崟浜�", prop: "creator", min: 130 }
       ],
-      showCol: ["閲囪喘鍗曞彿", "閲囪喘鍗曞悕绉�", "鍗曟嵁绫诲瀷", "渚涘簲鍟嗗悕绉�", "閲囪喘鏁伴噺", "鏀惰揣浠撳簱", "缁忓姙浜�", "鍒跺崟浜�"],
+      showCol: ["閲囪喘鍗曞彿","閿�鍞槑缁嗗崟", "閲囪喘鍗曞悕绉�", "鍗曟嵁绫诲瀷", "渚涘簲鍟嗗悕绉�", "閲囪喘鏁伴噺", "鏀惰揣浠撳簱", "缁忓姙浜�", "鍒跺崟浜�"],
       tableBottomColumn: [],
       showBottomCol: [],
       TabsIndex: 0,
@@ -266,7 +267,7 @@
         "瑙勬牸",
         "鍨嬪彿",
         "閲囪喘鏁伴噺",
-        "宸插彂璐ф暟閲�",
+        "宸叉敹璐ф暟閲�",
         "宸插叆搴撴暟閲�",
         "鍗曚綅",
         "閲囪喘鍗曚环",
@@ -606,9 +607,9 @@
     tableRowClick(row) {
       this.selectRow = row
       if (this.TabsIndex == 0) {
-        getPurchaseInfo({ id: row.id }).then((res) => {
+        getOperationInfo({ id: row.id }).then((res) => {
           if (res.code == 200) {
-            this.productTableList.tableInfomation = res.data.productList
+            this.productTableList.tableInfomation = res.data.productInfos
           } else {
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }
@@ -629,10 +630,14 @@
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }
         })
-      } else if (this.TabsIndex == 2) {
+      } else if (
+        (this.TabsIndex == 2 && row.status == 8) ||
+        (this.TabsIndex == 2 && row.status == 2) ||
+        (this.TabsIndex == 2 && row.status == 3)
+      ) {
         getOperationInfo({ id: row.id }).then((res) => {
           if (res.code == 200) {
-            this.productTableList.tableInfomation = res.data
+            this.productTableList.tableInfomation = res.data.inWarehouseInfos
           } else {
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }
@@ -712,15 +717,16 @@
     },
     // 鑾峰彇浜у搧/鏀惰揣淇℃伅
     async getProductInventoryInfo(row) {
-      if (this.TabsIndex == 0) {
-        getPurchaseInfo({ id: row.id }).then((res) => {
-          if (res.code == 200) {
-            this.productTableList.tableInfomation = res.data.productList
-          } else {
-            this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
-          }
-        })
-      } else if (this.TabsIndex == 1 && row.status == 1) {
+      // if (this.TabsIndex == 0) {
+      //   getPurchaseInfo({ id: row.id }).then((res) => {
+      //     if (res.code == 200) {
+      //       this.productTableList.tableInfomation = res.data.productList
+      //     } else {
+      //       this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
+      //     }
+      //   })
+      // } else
+      if (this.TabsIndex == 1 && row.status == 1) {
         this.productTableList.tableInfomation = []
       } else if (
         (this.TabsIndex == 1 && row.status == 7) ||
@@ -737,10 +743,19 @@
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }
         })
-      } else if (this.TabsIndex == 2) {
+      } else if (
+        this.TabsIndex == 0 ||
+        (this.TabsIndex == 2 && row.status == 8) ||
+        (this.TabsIndex == 2 && row.status == 2) ||
+        (this.TabsIndex == 2 && row.status == 3)
+      ) {
         getOperationInfo({ id: row.id }).then((res) => {
           if (res.code == 200) {
-            this.productTableList.tableInfomation = res.data
+            if(this.TabsIndex == 0){
+              this.productTableList.tableInfomation = res.data.productInfos
+            }else if(this.TabsIndex == 2){
+              this.productTableList.tableInfomation = res.data.inWarehouseInfos
+            }
           } else {
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }

--
Gitblit v1.8.0