Pārlūkot izejas kodu

修复查看sku信息框报400的问题

macro 5 gadi atpakaļ
vecāks
revīzija
9b8e39f3d1
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      src/views/pms/product/index.vue

+ 5 - 3
src/views/pms/product/index.vue

@@ -441,9 +441,11 @@
         fetchSkuStockList(row.id,{keyword:this.editSkuInfo.keyword}).then(response=>{
           this.editSkuInfo.stockList=response.data;
         });
-        fetchProductAttrList(row.productAttributeCategoryId,{type:0}).then(response=>{
-          this.editSkuInfo.productAttr=response.data.list;
-        });
+        if(row.productAttributeCategoryId!=null){
+          fetchProductAttrList(row.productAttributeCategoryId,{type:0}).then(response=>{
+            this.editSkuInfo.productAttr=response.data.list;
+          });
+        }
       },
       handleSearchEditSku(){
         fetchSkuStockList(this.editSkuInfo.productId,{keyword:this.editSkuInfo.keyword}).then(response=>{