From 7f97968e2f94ac53532a60f08c134c74a3a24847 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 27 三月 2024 17:35:59 +0800
Subject: [PATCH] 采购数量的产品信息请求接口修改+数量是0的时候没有显示的问题修改

---
 src/components/makepager/TableCommonView.vue |    9 ++++++++-
 src/views/purchaseManage/purchase/index.vue  |   21 +++++++++++----------
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index 50ac390..46faad2 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -126,7 +126,14 @@
               item.getCallMethod(scope.row[item.prop], scope.row)
             }}</span>
           </div>
-          <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span>
+          <span v-else>
+            {{  
+            scope.row[item.prop]
+              ? scope.row[item.prop]
+              : scope.row[item.prop] === 0
+              ? scope.row[item.prop]
+              : "--"}}
+          </span>
         </template>
       </el-table-column>
       <slot name="tableButton" />
diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index 9240ba5..775a993 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -716,15 +716,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) ||
@@ -741,7 +742,7 @@
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }
         })
-      } else if (
+      } else if (this.TabsIndex == 0||
         (this.TabsIndex == 2 && row.status == 8) ||
         (this.TabsIndex == 2 && row.status == 2) ||
         (this.TabsIndex == 2 && row.status == 3)

--
Gitblit v1.8.0