mo 2 年之前
父節點
當前提交
b0cc3b7c81

+ 1 - 0
src/views/pms/product/components/ProductAttrDetail.vue

@@ -410,6 +410,7 @@ export default {
           }
           if (this.isEdit) {
             //编辑模式下刷新商品属性图片
+            console.log('编辑模式刷新属性')
             this.refreshProductAttrPics();
           }
         } else {

+ 6 - 5
src/views/pms/product/components/ProductInfoDetail.vue

@@ -171,9 +171,9 @@ export default {
       },
     };
   },
-  created() {
-    this.getProductCateList();
-    this.getBrandList();
+  async created  () {
+  await  this.getProductCateList();
+  await  this.getBrandList();
   },
   computed: {
     //商品的编号
@@ -190,7 +190,7 @@ export default {
       this.handleEditCreated();
     },
     selectProductCateValue: function (newValue) {
-      console.log(newValue, "newValue");
+      console.log(newValue, "newValue",this.value);
       if (newValue != null && newValue.length === 2) {
         this.value.productCategoryId = newValue[1];
         this.value.productCategoryName = this.getCateNameById(
@@ -200,6 +200,7 @@ export default {
         this.value.productCategoryId = null;
         this.value.productCategoryName = null;
       }
+      // this.handleEditCreated();
     },
   },
   methods: {
@@ -212,7 +213,6 @@ export default {
       this.hasEditCreated = true;
     },
     getProductCateList() {
-      console.log("获取商品分类");
       fetchListWithChildren().then((response) => {
         let list = response.data;
         this.productCateOptions = [];
@@ -232,6 +232,7 @@ export default {
             children: children,
           });
         }
+
       });
     },
     getBrandList() {