소스 검색

商品管理新增、编辑默认选择商品大类

qymljy 1 년 전
부모
커밋
4a326b938b
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/HDrpManagement/ProductMag/modules/add.vue
  2. 2 0
      src/HDrpManagement/ProductMag/modules/edit.vue

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

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

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

@@ -451,7 +451,9 @@ export default {
         },
       })
       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=>{
         return e.tradefield
       })