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