浏览代码

Merge branch 'blueBranch' into allTestUrgent

qymljy 3 月之前
父节点
当前提交
130b11f785
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/template/addProduct/index1.vue

+ 4 - 4
src/template/addProduct/index1.vue

@@ -258,9 +258,6 @@ export default {
       this.$store.dispatch("optiontypeselect", "itemmaterial").then((res) => {
         this.options.itemmaterials = res.data;
       });
-      this.querySa_brandid !== ""
-          ? (this.sa_brandid = this.querySa_brandid)
-          : (this.sa_brandid = "");
       this.queryBrands();
       this.queryClass();
       this.listData((this.params.content.pageNumber = 1));
@@ -308,7 +305,10 @@ export default {
       });
       this.options.brands = res.data;
       console.log("获取品牌", res.data);
-      this.sa_brandid = res.data[0].sa_brandid;
+      // this.sa_brandid = res.data[0].sa_brandid;
+      this.querySa_brandid !== "" && this.querySa_brandid !== 0
+          ? (this.sa_brandid = this.querySa_brandid)
+          : (this.sa_brandid = res.data[0].sa_brandid);
       this.queryClass();
     },
     brandChange() {