Explorar el Código

Merge branch 'mergeBranch' into greenUrgent

qymljy hace 1 año
padre
commit
e834ffa091

+ 3 - 0
src/HDrpManagement/ProductMag/modules/add.vue

@@ -669,7 +669,10 @@ export default {
     /*获取可选商品大类*/
     /*获取可选商品大类*/
     async getCategoriesList () {
     async getCategoriesList () {
       let res = await this.$store.dispatch('optiontypeselect','categories')
       let res = await this.$store.dispatch('optiontypeselect','categories')
+
       this.categoriesList= res.data
       this.categoriesList= res.data
+
+      this.form.categories = this.categoriesList.length > 0?this.categoriesList[0].remarks:''
     },
     },
     hasDisabledTag (item) {
     hasDisabledTag (item) {
       let arr = []
       let arr = []

+ 3 - 0
src/HDrpManagement/ProductMag/modules/edit.vue

@@ -451,6 +451,9 @@ export default {
         },
         },
       })
       })
       this.form = Object.assign({},this.form,res.data)
       this.form = Object.assign({},this.form,res.data)
+
+      this.form.categories = this.form.categories?this.form.categories:this.categoriesList.length > 0?this.categoriesList[0].remarks:''
+
       this.form.tradefields = this.form.tradefield.map(e=>{
       this.form.tradefields = this.form.tradefield.map(e=>{
         return e.tradefield
         return e.tradefield
       })
       })