zhaolf 3 年之前
父節點
當前提交
46e9d4ef45

+ 18 - 1
src/pages/brand/brandDetail/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="wrapper">
         <div class="left">
-            <div class="title">品牌申请</div>
+            <div class="title">品牌详情</div>
             <div class="status">
                 <div class="line">
                     <div class="label">申请状态:</div><span :class="status==9?'statustext':''">{{statusName}}</span>
@@ -299,8 +299,25 @@
             initPage() {
                 this.loading = false
                 this.$refs.form.clearValidate()
+                this.form={
+                    brand_audit_type: '',
+                    trademark_type: '',
+                    brand_management_type: '',
+                    commodity_origin_type: '',
+                    trademark_registrant: '',
+                    trademark_registrant_nu: '',
+                    trademark_authorization_period: '',
+                    trademark_applicant: '',
+                    trademark_application_time: '',
+                    remark: '',
+                    brand_wording:''
+                }
                 if (this.$route.params.brand_info_id) {
                     this.brand_info_id = this.$route.params.brand_info_id
+                    store.commit('SET_BRAND_INDO_ID',this.brand_info_id)
+                    this.getDetail()
+                }else if(store.getters.getBrand_info_id!=0){
+                    this.brand_info_id = store.getters.getBrand_info_id
                     this.getDetail()
                 }
             },

+ 21 - 4
src/pages/goods/goodsDetail/index.vue

@@ -144,7 +144,7 @@
                     this.form.sale_price = res.data.sale_price
                     this.form.market_price = res.data.market_price
                     this.form.path = res.data.path
-                    this.form.third_cat_id =res.data.third_cat_audit==0?'-1':res.data.third_cat_audit
+                    this.form.third_cat_id =res.data.third_cat_audit==0?'-1':res.data.third_cat_id
                     this.goodsList = [{
                         url: res.data.thumb_img
                     }]
@@ -196,19 +196,36 @@
             initPage() {
                 this.getCategoryList()
                 this.getBrandList()
+                this.form={
+                    title: '',
+                    third_cat_audit: '',
+                    out_product_id: '',
+                    has_brand: '',
+                    stock_num: '',
+                    sale_price: '',
+                    market_price: '',
+                    path: '',
+                    third_cat_id: '',
+                    commodity_id: null,
+                    third:''
+                }
                 if (this.$route.params.outProductId) {
                     this.outProductId = this.$route.params.outProductId
+                    store.commit('SET_OUTPRODUCTID',this.outProductId)
+                    this.getDetail()
+                }else if(store.getters.getOutProductId!=0){
+                    this.outProductId = store.getters.getOutProductId
                     this.getDetail()
                 }
             }
-
         },
-        created() {},
+        created() {
+        },
         activated() {
             this.initPage()
         },
         mounted() {
-        }
+        },
     };
 </script>
 <style lang="less" scoped>

+ 7 - 3
src/pages/goods/index.vue

@@ -132,10 +132,14 @@
         });
       },
       handleClick(tab, event) {
-        if(this.searchForm.type==3){
-          this.tableHeadConfig[6].isShow=false
-        }else{
+        if(this.searchForm.type==1){
+          this.tableHeadConfig[6].isShow=true
+          this.tableHeadConfig[6].label='上架时间'
+        }else if(this.searchForm.type==2){
           this.tableHeadConfig[6].isShow=true
+          this.tableHeadConfig[6].label='下架时间'
+        }else{
+           this.tableHeadConfig[6].isShow=false
         }
         this.searchForm.searchName = ''
         this.searchForm.page = 1

+ 2 - 2
src/pages/qualification/addCategory/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="wrapper">
-        <div class="title">资质申请</div>
+        <div class="title">类目申请</div>
         <el-form class="form" ref="form" :model="form" label-width="200px" :rules="rules">
             <el-form-item label="一级类目:" prop="level1">
                 <el-input placeholder="请输入" v-model="form.level1" maxlength="9" show-word-limit>
@@ -125,7 +125,7 @@
                         this.loading = true
                         add(params).then(() => {
                             this.$message.success('添加成功');
-                            store.commit('REMOVETAB', '资质申请')
+                            store.commit('REMOVETAB', '类目申请')
                             this.$router.push('/qualification')
                         }).catch(() => {
                             this.loading = false

+ 21 - 1
src/pages/qualification/categoryDetail/index.vue

@@ -23,7 +23,7 @@
                 <el-input placeholder="请输入" :disabled="isDisable" v-model="form.level3" maxlength="9" show-word-limit>
                 </el-input>
             </el-form-item>
-            <el-form-item label="三级类目名称:" label-width="100px">
+            <el-form-item label="三级类目名称:" label-width="100px" prop="level3_name">
                 <el-input placeholder="请输入" :disabled="isDisable&&isSuccessEdit" v-model="form.level3_name"
                     maxlength="25" show-word-limit>
                 </el-input>
@@ -100,6 +100,11 @@
                         validator: validnumber,
                         trigger: 'blur'
                     }],
+                    level3_name:[{
+                        required: true,
+                        message: '请输入必填项',
+                        trigger: 'blur'
+                    }]
                 }
             };
         },
@@ -109,6 +114,10 @@
             commit() {
                 if (this.status == 1) {
                     //通过时修改
+                    if(!this.form.level3_name){
+                        this.$message.error('请输入三级类目名称!');
+                        return
+                    }
                     let params = {
                         category_info_id: this.category_info_id,
                         level3_name: this.form.level3_name,
@@ -227,8 +236,19 @@
             initPage() {
                 this.loading = false
                 this.$refs.form.clearValidate()
+                this.form={
+                    level1: '',
+                    level3: '',
+                    level2: '',
+                    level3_name: '',
+                    remark: ''
+                }
                 if (this.$route.params.category_info_id) {
                     this.category_info_id = this.$route.params.category_info_id
+                    store.commit('SET_CATEGORY_INFO_ID',this.category_info_id)
+                    this.getDetail()
+                }else if(store.getters.getCategory_info_id!=0){
+                    this.category_info_id = store.getters.getCategory_info_id
                     this.getDetail()
                 }
             }

+ 1 - 1
src/router/routes.js

@@ -53,7 +53,7 @@ export const otherRouter = [
   {
     name: 'addCategory',
     path: '/qualification/addCategory',
-    meta: { title: '资质申请' ,keepAlive:true},
+    meta: { title: '类目申请' ,keepAlive:true},
     component: () => import('@/pages/qualification/addCategory/index.vue'),
   },
   {

+ 15 - 0
src/store/modules/user.js

@@ -4,6 +4,9 @@ const state = {
   menuInfo: {},//菜单点击数据
   tabList:[], //tab页存储
   tabIndex:0, //tab页的坐标
+  outProductId:0,//商品详情id
+  category_info_id:0,//类目详情id
+  brand_info_id:0,//品牌详情id
 }
 const getters = {
   getToken: state => state.token,
@@ -11,6 +14,9 @@ const getters = {
   getMenuInfo: state => state.menuInfo,
   getTabList:state=>state.tabList,
   getTabIndex:state=>state.tabIndex,
+  getOutProductId:state=>state.outProductId,
+  getCategory_info_id:state=>state.category_info_id,
+  getBrand_info_id:state=>state.brand_info_id
 }
 const mutations = {
   SET_USER_TOKEN(state, token) {
@@ -34,6 +40,15 @@ const mutations = {
   SET_TABINDEX(state,index){
     state.tabIndex=index
   },
+  SET_OUTPRODUCTID(state,outProductId){
+    state.outProductId=outProductId
+  },
+  SET_CATEGORY_INFO_ID(state,category_info_id){
+    state.category_info_id=category_info_id
+  },
+  SET_BRAND_INDO_ID(state,brand_info_id){
+    state.brand_info_id=brand_info_id
+  },
   REMOVETAB(state,tabname){
     state.tabList.forEach((element,index) => {
       if(element.name==tabname){