zhaolf 3 éve
szülő
commit
b2c09fd917

+ 2 - 1
public/js/config.js

@@ -1,3 +1,4 @@
 window.global_config = {
-  BASE_URL: 'http://221.224.53.27:20038/',
+  // BASE_URL: 'http://221.224.53.27:20038/',
+  BASE_URL: 'http://172.16.0.28:8085/',
 }

+ 50 - 0
src/api/brand.js

@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+
+// 品牌分页列表
+export function list(params) {
+  return request({
+    url: '/brand/page',
+    method: 'get',
+    params
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: '/brand/add',
+    method: 'post',
+    data
+  })
+}
+
+
+// 品牌详情
+export function detail(params) {
+  return request({
+    url: '/brand/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 获取审核通过的品牌
+export function getBrandList(params) {
+  return request({
+    url: '/brand/getBrandList',
+    method: 'get',
+    params
+  })
+}
+
+// 修改
+export function edit(data) {
+  return request({
+    url: '/brand/edit',
+    method: 'put',
+    data
+  })
+}
+
+
+

+ 59 - 0
src/api/category.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 类目分页列表
+export function list(params) {
+  return request({
+    url: '/category/page',
+    method: 'get',
+    params
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: '/category/add',
+    method: 'post',
+    data
+  })
+}
+
+
+// 类目详情
+export function detail(params) {
+  return request({
+    url: '/category/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 获取审核通过的类目
+export function getCategoryList(params) {
+  return request({
+    url: '/category/getCategoryList',
+    method: 'get',
+    params
+  })
+}
+
+// 修改
+export function edit(data) {
+  return request({
+    url: '/category/edit',
+    method: 'put',
+    data
+  })
+}
+
+// 修改
+export function authedEdit(data) {
+  return request({
+    url: '/category/authedEdit',
+    method: 'put',
+    data
+  })
+}
+
+
+

+ 10 - 0
src/api/goods.js

@@ -37,6 +37,16 @@ export function editDetail(params) {
   })
 }
 
+// 商品审核中详情
+export function authDetail(params) {
+  return request({
+    url: '/commodity/authDetail',
+    method: 'get',
+    params
+  })
+}
+
+
 
 // 修改
 export function edit(data) {

+ 5 - 1
src/components/base-table.vue

@@ -4,7 +4,7 @@
  -->
 <template>
   <div class="TableView">
-    <el-table class="elTable" :class="{ 'no-row-line': stripe }" size="medium" ref="dataTable" :data="tableData"
+    <el-table class="elTable" :class="{ 'no-row-line': stripe }" :size="mySize" ref="dataTable" :data="tableData"
       :max-height="tableHeight" :stripe="stripe" :highlight-current-row="highlightCurrentRow"
       @selection-change="selectLine" @current-change="handleCurrentChange" @sort-change="changeSort"
       @row-dblclick="rowdblclick" @row-click="rowClick" :row-key="rowKey"
@@ -254,6 +254,10 @@ export default {
       type: Boolean,
       default: true,
     },
+    mySize:{
+      type:String,
+      default:'medium'
+    }
   },
 
   data() {

+ 270 - 0
src/pages/brand/addBrand/index.vue

@@ -0,0 +1,270 @@
+<template>
+    <div class="wrapper">
+        <div class="left">
+            <div class="title">资质申请</div>
+            <el-form size="small" class="form" ref="form" :model="form" label-width="140px">
+                <el-form-item label="认证审核类型:">
+                    <el-select v-model="form.third_cat_audit" placeholder="请选择" :disabled="isdisable" clearable
+                        filterable>
+                        <el-option label="申请通过的类目" value="1"></el-option>
+                        <el-option label="无需审核类目" value="0"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="商标分类:" label-width="100px">
+                    <el-input placeholder="请输入" v-model="form.level2" maxlength="25">
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="选择品牌经营类型:">
+                    <el-select v-model="form.third_cat_audit" placeholder="请选择" :disabled="isdisable" clearable
+                        filterable>
+                        <el-option label="申请通过的类目" value="1"></el-option>
+                        <el-option label="无需审核类目" value="0"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="商品产地是否进口:" label-width="140px">
+                    <el-select v-model="form.third_cat_audit" placeholder="请选择" :disabled="isdisable" clearable
+                        filterable>
+                        <el-option label="申请通过的类目" value="1"></el-option>
+                        <el-option label="无需审核类目" value="0"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="商标/品牌词:" >
+                    <el-input placeholder="请输入" v-model="form.level2" maxlength="25">
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="商标注册人姓名:" label-width="140px">
+                    <el-input placeholder="请输入" v-model="form.level2" maxlength="25">
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="商标注册号/申请号:" >
+                    <el-input placeholder="请输入" v-model="form.level2" maxlength="25">
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="商标有效期:" label-width="100px">
+                    <el-date-picker v-model="value1" type="date" placeholder="选择日期">
+                    </el-date-picker>
+                </el-form-item>
+                 <el-form-item label="商标申请人姓名:">
+                    <el-input placeholder="请输入" v-model="form.level2" maxlength="25">
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="商标申请时间:" label-width="100px">
+                    <el-date-picker v-model="value1" type="date" placeholder="选择日期">
+                    </el-date-picker>
+                </el-form-item>
+                <el-form-item class="single" label="营业执照或组织机构代码证:">
+                    <upload v-if="updatePic" ref="upload_goods" :file="licenseImgs" limitNum="10"></upload>
+                </el-form-item>
+                <el-form-item class="single" label="销售授权书(如商持人为自然人,还需提供:">
+                    <upload v-if="updatePic" ref="upload_zizhi" :file="certificateImgs" limitNum="10"></upload>
+                </el-form-item>
+                <el-form-item class="single" label="商标注册证书:">
+                    <upload v-if="updatePic" ref="upload_zizhi" :file="certificateImgs" limitNum="10"></upload>
+                </el-form-item>
+                <el-form-item class="single" label="商标变更证明:">
+                    <upload v-if="updatePic" ref="upload_zizhi" :file="certificateImgs" limitNum="10"></upload>
+                </el-form-item>
+                <el-form-item class="single" label="商标注册申请受理通知书:">
+                    <upload v-if="updatePic" ref="upload_zizhi" :file="certificateImgs" limitNum="10"></upload>
+                </el-form-item>
+                <el-form-item class="single" label="中华人民共和国海关进口货物报关单:">
+                    <upload v-if="updatePic" ref="upload_zizhi" :file="certificateImgs" limitNum="10"></upload>
+                </el-form-item>
+                <el-form-item class="single" label="备注:">
+                    <el-input placeholder="请输入" v-model="form.remark" maxlength="25">
+                    </el-input>
+                </el-form-item>
+                <el-form-item class="commit">
+                    <el-button class="blackbtn" :loading="loading" @click.native.prevent="commit">提交
+                    </el-button>
+                </el-form-item>
+
+            </el-form>
+        </div>
+
+        <div class="table">
+            <div class="title">资质申请</div>
+            <showtable class="showtable"></showtable>
+        </div>
+    </div>
+</template>
+
+<script>
+    import store from '@/store/index'
+    import upload from '@/components/upload'
+    import showtable from '../components/showtable.vue'
+    import {
+        add,
+    } from "@/api/category";
+    export default {
+        name: 'addCategory',
+        components: {
+            upload,showtable
+        },
+        props: {},
+        data() {
+            return {
+                licenseImgs: [],
+                certificateImgs: [],
+                outProductId: 0,
+                commodity_id: 0,
+                updatePic: true,
+                form: {
+                    level1: '',
+                    level3: '',
+                    level2: '',
+                    level3_name: '',
+                    remark: ''
+                },
+                loading: false
+            };
+        },
+        watch: {},
+        computed: {},
+        methods: {
+            commit() {
+                if (this.licenseImgs.length == 0) {
+                    this.$message.error('请选择营业执照或组织机构代码证');
+                    return
+                }
+                if (this.certificateImgs.length == 0) {
+                    this.$message.error('请选择资质材料');
+                    return
+                }
+                let licenseImgs_temp = []
+                this.licenseImgs.forEach(element => {
+                    licenseImgs_temp.push(element.url)
+                });
+                let certificateImgs_temp = []
+                this.certificateImgs.forEach(element => {
+                    certificateImgs_temp.push(element.url)
+                });
+                let params = {
+                    certificateImgs: certificateImgs_temp.join(","),
+                    level1: this.form.level1,
+                    level2: this.form.level2,
+                    level3: this.form.level3,
+                    licenseImgs: licenseImgs_temp.join(","),
+                    level3_name: this.form.level3_name,
+                    remark: this.form.remark,
+                }
+                this.loading = true
+                add(params).then(() => {
+                    this.$message.success('添加成功');
+                    store.commit('REMOVETAB', '资质申请')
+                    this.$router.go(-1)
+                }).catch(() => {
+                    this.loading = false
+                });
+            },
+            initPage() {
+                this.loading = false
+                if (this.$route.params.isNew) {
+                    this.form = {
+                        level1: '',
+                        level3: '',
+                        level2: '',
+                        level3_name: '',
+                        remark: ''
+                    }
+                    this.licenseImgs = []
+                    this.certificateImgs = []
+                    //刷新子组件
+                    this.updatePic = false
+                    this.$nextTick(() => {
+                        this.updatePic = true
+                    })
+                }
+            }
+        },
+        created() {},
+        activated() {
+            this.initPage()
+        },
+        mounted() {}
+    };
+</script>
+<style lang="less" scoped>
+    .wrapper {
+        display: flex;
+        flex-direction: row;
+        background: #F6F8F9 !important;
+        padding: 0px !important;
+        .table{
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            background: white !important;
+            border-radius: 5px;
+            width: 37%;
+            margin-left: 10px;
+            .title {
+                font-weight: bold;
+                width: 100%;
+                text-align: left;
+                margin-left: 50px;
+                margin-top: 20px;
+            }
+            .showtable{
+                width: 99%;
+                margin-top: 20px;
+            }
+        }
+
+        .left {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            background: white;
+            border-radius: 5px;
+            padding: 10px;
+            width: 60%;
+
+            .title {
+                font-weight: bold;
+                width: 100%;
+                text-align: left;
+                margin-left: 50px;
+                margin-top: 10px;
+            }
+
+            .form {
+                margin-top: 20px;
+                width: 100%;
+                display: flex;
+                justify-content: space-between;
+                flex-wrap: wrap;
+
+                .el-form-item {
+                    color: #232323;
+                    font-weight: bold;
+                }
+
+                .el-select {
+                    width: 200px;
+                }
+
+                .el-input {
+                    width: 200px;
+                }
+
+                .single {
+                    width: 100%;
+                    .el-input {
+                        width: 575px;
+                    }
+
+                    .el-select {
+                        width: 575px;
+                    }
+                }
+                .commit {
+                    width: 100%;
+                    text-align: center;
+                }
+            }
+
+        }
+
+    }
+</style>

+ 176 - 0
src/pages/brand/components/showtable.vue

@@ -0,0 +1,176 @@
+<template>
+    <div class="wrapper">
+        <e-table class="table" ref="eTable" :tableHeadConfig="tableHeadConfig" :tableLoadData="tableLoadData"
+            :pageShow="false" :align="right" my-size="small">
+            <template v-slot:operation="slotData">
+                <div class="operationDiv">
+                    <el-button type="text" @click="toView(slotData.data.row)">查看</el-button>
+                </div>
+            </template>
+        </e-table>
+    </div>
+</template>
+
+<script>
+    import eTable from '@/components/base-table'
+    export default {
+        components: {
+            eTable
+        },
+        props: {},
+        data() {
+            return {
+                tableHeadConfig: [{
+                        label: '是否必填 自有品牌 R标',
+                        prop: 'A',
+                        isShow: true,
+                    }, {
+                        label: '是否必填 自有品牌 TM标',
+                        prop: 'B',
+                        isShow: true,
+                    }, {
+                        label: '是否必填 代理品牌 R标',
+                        prop: 'C',
+                        isShow: true,
+                    }, {
+                        label: '是否必填 代理品牌 TM标',
+                        prop: 'D',
+                        isShow: true,
+                    },
+                    {
+                        label: '说明',
+                        prop: 'E',
+                        isShow: true,
+                        align: "center",
+                        width: 140,
+                        tooltip: false
+                    }
+                ],
+                tableLoadData: [{
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "营业执照或组织机构代码证,图片url/media_id"
+                    },
+                    {
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "认证审核类型 RegisterType"
+                    },
+                    {
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "商标分类 TrademarkType"
+                    },
+                    {
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "选择品牌经营类型 BrandManagementType"
+                    },
+                    {
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "商品产地是否进口 CommodityOriginType"
+                    },
+                    {
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "商标/品牌词"
+                    },
+                    {
+                        A: "否",
+                        B: "否",
+                        C: "是",
+                        D: "是",
+                        E: "销售授权书(如商持人为自然人,还需提供有其签名的身份证正反面扫描件),图片url/media_id"
+                    },
+                    {
+                        A: "是",
+                        B: "否",
+                        C: "是",
+                        D: "否",
+                        E: "商标注册证书,图片url/media_id"
+                    },
+                    {
+                        A: "否",
+                        B: "否",
+                        C: "否",
+                        D: "否",
+                        E: "商标变更证明,图片url/media_id"
+                    },
+                    {
+                        A: "是",
+                        B: "否",
+                        C: "是",
+                        D: "否",
+                        E: "商标注册人姓名"
+                    },
+                    {
+                        A: "是",
+                        B: "是",
+                        C: "是",
+                        D: "是",
+                        E: "商标注册号/申请号"
+                    },
+                    {
+                        A: "是",
+                        B: "否",
+                        C: "是",
+                        D: "否",
+                        E: "商标有效期,yyyy-MM-dd HH:mm:ss"
+                    },
+                    {
+                        A: "否",
+                        B: "是",
+                        C: "否",
+                        D: "是",
+                        E: "商标注册申请受理通知书,图片url/media_id"
+                    },
+                    {
+                        A: "否",
+                        B: "是",
+                        C: "否",
+                        D: "是",
+                        E: "商标申请人姓名"
+                    },
+                    {
+                        A: "否",
+                        B: "是",
+                        C: "否",
+                        D: "是",
+                        E: "商标申请时间, yyyy-MM-dd HH:mm:ss"
+                    },
+                    {
+                        A: "否",
+                        B: "否",
+                        C: "否",
+                        D: "否",
+                        E: "中华人民共和国海关进口货物报关单,图片url/media_id"
+                    },
+
+                ],
+            };
+        },
+        watch: {},
+        computed: {},
+        methods: {},
+        created() {},
+        mounted() {}
+    };
+</script>
+<style lang="less" scoped>
+    .table {
+        width: 100%;
+    }
+</style>

+ 110 - 14
src/pages/brand/index.vue

@@ -1,21 +1,117 @@
 <template>
-  <div class="wrapper">品牌</div>
+  <div class="index flex column">
+    <div class="serach flex row space-between">
+      <el-button class="blackbtn" icon="el-icon-plus" @click="addCategory">申请新品牌</el-button>
+    </div>
+    <e-table class="table" ref="eTable" :tableHeadConfig="tableHeadConfig" :tableLoadData="tableLoadData"
+      :pageShow="true" :total="searchForm.total" :currentPage="searchForm.page" :pageSize="searchForm.pageSize"
+      @getPageList="getPageList" @changeSort="changeSort" showIndex="true">
+      <template v-slot:operation="slotData">
+        <div class="operationDiv">
+          <el-button type="text" @click="toView(slotData.data.row)">查看</el-button>
+        </div>
+      </template>
+    </e-table>
+  </div>
 </template>
 
 <script>
-export default {
-  components: {},
-  props: {},
-  data() {
-    return {
-    };
-  },
-  watch: {},
-  computed: {},
-  methods: {},
-  created() {},
-  mounted() {}
-};
+  import eTable from '@/components/base-table'
+  import {
+    list,
+  } from '@/api/brand'
+  import store from '@/store/index'
+  export default {
+    name: "brand",
+    components: {
+      eTable
+    },
+    data() {
+      return {
+        searchForm: {
+          total: 0,
+          page: 1,
+          pageSize: 10,
+        },
+        tableHeadConfig: [{
+            label: '申请品牌',
+            prop: 'trademark_registrant',
+            isShow: true,
+          },
+          {
+            label: '商标类',
+            prop: 'trademark_type',
+            isShow: true,
+          },
+          {
+            label: '经营类型',
+            prop: 'brand_management_type',
+            isShow: true,
+          },
+          {
+            label: '申请时间',
+            prop: 'create_time',
+            isShow: true,
+          },
+          {
+            label: '申请结果',
+            prop: 'status',
+            isShow: true,
+          },
+          {
+            label: '操作',
+            columnType: 'operation',
+            slotName: 'operation',
+            width: 200,
+            isShow: true,
+          }
+        ],
+        tableLoadData: [],
+      };
+    },
+    created() {},
+    methods: {
+      getPageList(pageRequest) {
+        if (pageRequest) {
+          this.searchForm.page = pageRequest.pageIndex;
+          this.searchForm.pageSize = pageRequest.pageSize;
+        }
+        list(this.searchForm).then(res => {
+          this.searchForm.total = res.data.total
+          this.tableLoadData = res.data.list
+        })
+      },
+      addCategory() { // 申请品牌
+        this.$router.push({
+            name: "addBrand",
+            params: {
+              isNew:true
+            }
+          });
+      },
+      toView(row) {
+        this.$router.push({
+          name: "categoryDetail",
+          params: {
+            category_info_id: row.category_info_id
+          }
+        });
+      },
+    },
+    activated(){
+       this.getPageList()
+    },
+    mounted() {
+      this.getPageList()
+    }
+  };
 </script>
 <style lang="less" scoped>
+  .btn_search {
+    margin-left: 10px;
+  }
+
+  .serach {
+    margin-bottom: 10px;
+  }
 </style>

+ 87 - 38
src/pages/goods/addGoods/index.vue

@@ -3,60 +3,65 @@
         <div class="title">新增商品</div>
         <el-form class="form" ref="form" :model="form" label-width="80px">
             <el-form-item class="single" label="商品名:" label-width="100px">
-                <el-input class="pr-50" placeholder="请输入" v-model="form.title" maxlength="60" show-word-limit>
+                <el-input class="pr-50" placeholder="请输入" v-model="form.title" maxlength="60" :disabled="isdisable"
+                    show-word-limit>
                 </el-input>
             </el-form-item>
             <el-form-item label="类目:" label-width="100px">
-                <el-select v-model="form.third_cat_audit" placeholder="请选择" clearable filterable>
+                <el-select v-model="form.third_cat_audit" placeholder="请选择" :disabled="isdisable" clearable filterable>
                     <el-option label="申请通过的类目" value="1"></el-option>
                     <el-option label="无需审核类目" value="0"></el-option>
                 </el-select>
             </el-form-item>
             <el-form-item label="商品ID:" label-width="100px">
-                <el-input placeholder="请输入" v-model="form.out_product_id" maxlength="25">
+                <el-input placeholder="请输入" :disabled="isdisable" v-model="form.out_product_id" maxlength="25">
                 </el-input>
             </el-form-item>
             <el-form-item label="品牌:" label-width="100px">
-                <el-select v-model="form.has_brand" placeholder="请选择" clearable filterable>
+                <el-select v-model="form.has_brand" :disabled="isdisable" placeholder="请选择" clearable filterable>
                     <el-option label="申请通过的品牌" value="1"></el-option>
                     <el-option label="无品牌" value="0"></el-option>
                 </el-select>
             </el-form-item>
             <el-form-item label="商品库存:" label-width="100px">
-                <el-input placeholder="请输入" type='number' maxlength="25" v-model="form.stock_num">
+                <el-input placeholder="请输入" :disabled="isdisable" type='number' maxlength="25" v-model="form.stock_num">
                 </el-input>
             </el-form-item>
             <el-form-item label="售卖价格:" label-width="100px">
-                <el-input placeholder="请输入" type='number' maxlength="25" v-model="form.sale_price">
+                <el-input placeholder="请输入" :disabled="isdisable" type='number' maxlength="25"
+                    v-model="form.sale_price">
                 </el-input>
             </el-form-item>
             <el-form-item label="市场价格:" label-width="100px">
-                <el-input placeholder="请输入" type='number' maxlength="25" v-model="form.market_price">
+                <el-input placeholder="请输入" :disabled="isdisable" type='number' maxlength="25"
+                    v-model="form.market_price">
                 </el-input>
             </el-form-item>
             <el-form-item class="single" label="小程序链接:" label-width="100px">
-                <el-input class="pr-50" placeholder="请输入" v-model="form.path" maxlength="100">
+                <el-input class="pr-50" :disabled="isdisable" placeholder="请输入" v-model="form.path" maxlength="100">
                 </el-input>
             </el-form-item>
             <el-form-item label="一级类目:" v-if="false" label-width="100px">
-                <el-input placeholder="请输入" maxlength="25">
+                <el-input placeholder="请输入" :disabled="isdisable" maxlength="25">
                 </el-input>
             </el-form-item>
             <el-form-item label="二级类目:" v-if="false" label-width="100px">
-                <el-input placeholder="请输入" maxlength="25">
+                <el-input placeholder="请输入" :disabled="isdisable" maxlength="25">
                 </el-input>
             </el-form-item>
             <el-form-item label="三级类目:" v-if="form.third_cat_audit=='0'" label-width="100px">
-                <el-input placeholder="请输入" maxlength="25" v-model="form.third_cat_id">
+                <el-input placeholder="请输入" :disabled="isdisable" maxlength="25" v-model="form.third_cat_id">
                 </el-input>
             </el-form-item>
             <el-form-item class="single" label="商品图片:" label-width="100px">
-                <upload ref="upload_goods" :file="goodsList" limitNum="1"></upload>
+                <upload v-if="updatePic" :disabled="isdisable" ref="upload_goods" :file="goodsList" limitNum="1">
+                </upload>
             </el-form-item>
-            <el-form-item class="single" label="商品资质图片:" label-width="100px">
-                <upload ref="upload_zizhi" :file="goodszizhiList" limitNum="10"></upload>
+            <el-form-item class="single" label="商品类目图片:" label-width="100px">
+                <upload v-if="updatePic" :disabled="isdisable" ref="upload_zizhi" :file="goodszizhiList" limitNum="10">
+                </upload>
             </el-form-item>
-            <el-form-item class="commit">
+            <el-form-item class="commit" v-if="!isdisable">
                 <el-button class="blackbtn" :loading="loading" @click.native.prevent="commit">提交
                 </el-button>
             </el-form-item>
@@ -70,7 +75,9 @@
     import upload from '@/components/upload'
     import {
         add,
-        editDetail,edit
+        editDetail,
+        edit,
+        authDetail
     } from "@/api/goods";
     export default {
         name: 'addGoods',
@@ -83,7 +90,9 @@
                 goodsList: [],
                 goodszizhiList: [],
                 outProductId: 0,
-                commodity_id:0,
+                updatePic: true,
+                commodity_id: 0,
+                isdisable: false,
                 form: {
                     title: '',
                     third_cat_audit: '',
@@ -106,17 +115,17 @@
                     this.$message.error('请选择至少一张商品图片');
                     return
                 }
-                 let zizhiarray=[]
-                 this.goodszizhiList.forEach(element => {
+                let zizhiarray = []
+                this.goodszizhiList.forEach(element => {
                     zizhiarray.push(element.url)
-                 });
+                });
                 let params = {
                     brand_id: '2100000000',
                     has_brand: this.form.has_brand,
                     market_price: this.form.market_price,
                     out_product_id: this.form.out_product_id,
                     path: this.form.path,
-                    qualificationImgs:zizhiarray.join(","),
+                    qualificationImgs: zizhiarray.join(","),
                     sale_price: this.form.sale_price,
                     stock_num: this.form.stock_num,
                     third_cat_audit: this.form.third_cat_audit,
@@ -124,21 +133,26 @@
                     thumb_img: this.goodsList[0].url,
                     title: this.form.title
                 }
-                if(this.outProductId==0){ //新增
+                this.loading = true
+                if (this.outProductId == 0) { //新增
                     add(params).then(() => {
                         this.$message.success('添加成功');
                         store.commit('REMOVETAB', '新增商品')
                         this.$router.go(-1)
-                    })
-                }else{ //修改
-                    params.commodity_id=this.commodity_id
+                    }).catch(() => {
+                        this.loading = false
+                    });
+                } else { //修改
+                    params.commodity_id = this.commodity_id
                     edit(params).then(() => {
                         this.$message.success('修改成功');
                         store.commit('REMOVETAB', '新增商品')
                         this.$router.go(-1)
-                    })
+                    }).catch(() => {
+                        this.loading = false
+                    });
                 }
-                
+
             },
             handlePictureCardPreview(file) {
                 this.dialogImageUrl = file.url;
@@ -146,7 +160,7 @@
             },
             getDetail() {
                 if (this.outProductId != 0) {
-                    editDetail({
+                    authDetail({
                         outProductId: this.outProductId
                     }).then(res => {
                         this.form.title = res.data.title
@@ -158,10 +172,11 @@
                         this.form.market_price = res.data.market_price
                         this.form.path = res.data.path
                         this.form.third_cat_id = res.data.third_cat_id
-                        this.commodity_id=res.data.commodity_id
-                        this.goodsList.push({
+                        this.commodity_id = res.data.commodity_id
+                        this.goodsList = [{
                             url: res.data.thumb_img
-                        })
+                        }]
+                        this.goodszizhiList = []
                         if (res.data.qualificationImgs.length > 0) {
                             res.data.qualificationImgs.forEach(element => {
                                 this.goodszizhiList.push({
@@ -169,19 +184,53 @@
                                 })
                             });
                         }
+                        //刷新子组件
+                        this.updatePic = false
+                        this.$nextTick(() => {
+                            this.updatePic = true
+                        })
+
+                    })
+                }
+            },
+            initPage() {
+                this.loading = false
+                this.isdisable = false
+                if (this.$route.params.outProductId) { //新增获取详情
+                    this.outProductId = this.$route.params.outProductId
+                    this.getDetail()
+                    if (this.$route.params.isDisable) {
+                        this.isdisable = true
+                    }
+                }
+                if (this.$route.params.isNew) { //新增清空
+                    this.outProductId = 0
+                    this.form = {
+                        title: '',
+                        third_cat_audit: '',
+                        out_product_id: '',
+                        has_brand: '',
+                        stock_num: '',
+                        sale_price: '',
+                        market_price: '',
+                        path: '',
+                        third_cat_id: '',
+                    }
+                    this.goodsList = []
+                    this.goodszizhiList = []
+                    //刷新子组件
+                    this.updatePic = false
+                    this.$nextTick(() => {
+                        this.updatePic = true
                     })
                 }
             }
         },
         created() {},
+        activated() {
+            this.initPage()
+        },
         mounted() {
-            if (this.$route.params.outProductId) {
-                this.outProductId = this.$route.params.outProductId
-                store.commit('SER_ADDOUTPRODUCTID', this.outProductId)
-            } else {
-                this.outProductId = store.getters.getAddOutProductId
-            }
-            this.getDetail()
         }
     };
 </script>

+ 112 - 96
src/pages/goods/goodsDetail/index.vue

@@ -2,21 +2,27 @@
     <div class="wrapper">
         <div class="title">商品详情</div>
         <div class="status">
-            <div class="line"><div class="label">申请状态:</div><span :class="status==3?'statustext':''">{{statusName}}</span></div>
-            <div class="line" v-if="status==3"><div class="label">原因:</div><span class="reason">{{reject_reason}}</span></div>
-            <div class="line" v-if="status!=4"><div class="label">审核内容:</div><el-button type="text" @click="update">查看审核内容</el-button></div>
-            <div class="line" v-if="status==4"><el-button class="commitnew blackbtn" @click="commitNew">提交新审核</el-button></div>
+            <div class="line">
+                <div class="label">申请状态:</div><span :class="status==3?'statustext':''">{{statusName}}</span>
+            </div>
+            <div class="line" v-if="status==3">
+                <div class="label">原因:</div><span class="reason">{{reject_reason}}</span>
+            </div>
+            <div class="line" v-if="status!=4">
+                <div class="label">审核内容:</div>
+                <el-button type="text" @click="update">查看审核内容</el-button>
+            </div>
+            <div class="line" v-if="status==4">
+                <el-button class="commitnew blackbtn" @click="commitNew">提交新审核</el-button>
+            </div>
         </div>
-
         <el-divider></el-divider>
-
-        <div class="empty" v-if="status==1||status==2">
+        <div class="empty" v-if="!form.commodity_id">
             <span class="emptytitle">暂无过审数据</span>
             <img class="emptyimg" src="../../../../static/images/empty.png" />
         </div>
-
-        <el-form class="form" ref="form" :model="form" label-width="80px" v-if="status==3||status==4">
-            <el-form-item class="single" label="商品名:" label-width="100px" >
+        <el-form class="form" ref="form" :model="form" label-width="80px" v-if="form.commodity_id">
+            <el-form-item class="single" label="商品名:" label-width="100px">
                 <el-input class="pr-50" placeholder="请输入" v-model="form.title" maxlength="60" disabled show-word-limit>
                 </el-input>
             </el-form-item>
@@ -65,10 +71,11 @@
                 </el-input>
             </el-form-item>
             <el-form-item class="single" label="商品图片:" label-width="100px">
-                <upload ref="upload_goods" :file="goodsList" limitNum="1" :disabled="true" ></upload>
+                <upload v-if="updatePic" ref="upload_goods" :file="goodsList" limitNum="1" :disabled="true"></upload>
             </el-form-item>
-            <el-form-item class="single" label="商品资质图片:" label-width="100px">
-                 <upload ref="upload_zizhi" :file="goodszizhiList" limitNum="1" :disabled="true"></upload>
+            <el-form-item class="single" label="商品类目图片:" label-width="100px">
+                <upload v-if="updatePic" ref="upload_zizhi" :file="goodszizhiList" limitNum="1" :disabled="true">
+                </upload>
             </el-form-item>
         </el-form>
     </div>
@@ -78,22 +85,24 @@
     import store from '@/store/index'
     import upload from '@/components/upload'
     import {
-    add,detail
+        add,
+        detail
     } from "@/api/goods";
     export default {
-        name:'goodsDetail',
+        name: 'goodsDetail',
         components: {
             upload
         },
         props: {},
         data() {
             return {
-                goodsList:[],
-                goodszizhiList:[],
-                outProductId:'',
-                status:1,
-                statusName:'',
-                reject_reason:'',
+                goodsList: [],
+                updatePic: true,
+                goodszizhiList: [],
+                outProductId: '',
+                status: 1,
+                statusName: '',
+                reject_reason: '',
                 form: {
                     title: '',
                     third_cat_audit: '',
@@ -104,6 +113,7 @@
                     market_price: '',
                     path: '',
                     third_cat_id: '',
+                    commodity_id: null
                 },
                 loading: false
             };
@@ -111,78 +121,74 @@
         watch: {},
         computed: {},
         methods: {
-            commit(){
-                if(this.goodsList.length==0){
-                    this.$message.error('请选择至少一张商品图片');
-                    return
-                }
-                let params={
-                    brand_id:'2100000000',
-                    has_brand:this.form.has_brand,
-                    market_price:this.form.market_price,
-                    out_product_id:this.form.out_product_id,
-                    path:this.form.path,
-                    qualificationImgs:this.goodszizhiList.join(","),
-                    sale_price:this.form.sale_price,
-                    stock_num:this.form.stock_num,
-                    third_cat_audit:this.form.third_cat_audit,
-                    third_cat_id:this.form.third_cat_id,
-                    thumb_img:this.goodsList[0],
-                    title:this.form.title
-                }
-                add(params).then(()=>{
-                    store.commit('REMOVETAB','新增商品')
-                    this.$router.go(-1)
-                })
-            },
-            handlePictureCardPreview(file) {
-                this.dialogImageUrl = file.url;
-                this.dialogVisible = true
-            },
-            getDetail(){
-                detail({outProductId:this.outProductId}).then(res=>{
-                    if(res.data.auditInfo.status){
-                        this.status=res.data.auditInfo.status
+            getDetail() {
+                detail({
+                    outProductId: this.outProductId
+                }).then(res => {
+                    if (res.data.auditInfo.status) {
+                        this.status = res.data.auditInfo.status
                     }
-                    this.statusName=res.data.auditInfo.statusName
-                    this.reject_reason=res.data.auditInfo.reject_reason
-                    this.form.title=res.data.title
-                    this.form.third_cat_audit=res.data.third_cat_audit
-                    this.form.out_product_id=res.data.out_product_id
-                    this.form.has_brand=res.data.has_brand
-                    this.form.stock_num=res.data.stock_num
-                    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_id
-                    this.goodsList=[{url:res.data.thumb_img}]
-                    this.goodszizhiList=[]
-                    if(res.data.qualificationImgs.length>0){
+                    this.statusName = res.data.auditInfo.statusName
+                    this.form.commodity_id = res.data.commodity_id
+                    this.reject_reason = res.data.auditInfo.reject_reason
+                    this.form.title = res.data.title
+                    this.form.third_cat_audit = res.data.third_cat_audit
+                    this.form.out_product_id = res.data.out_product_id
+                    this.form.has_brand = res.data.has_brand
+                    this.form.stock_num = res.data.stock_num
+                    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_id
+                    this.goodsList = [{
+                        url: res.data.thumb_img
+                    }]
+                    this.goodszizhiList = []
+                    if (res.data.qualificationImgs.length > 0) {
                         res.data.qualificationImgs.forEach(element => {
-                            this.goodszizhiList.push({url:element})
+                            this.goodszizhiList.push({
+                                url: element
+                            })
                         });
-                    }                    
+                    }
+                    //刷新子组件
+                    this.updatePic = false
+                    this.$nextTick(() => {
+                        this.updatePic = true
+                    })
                 })
             },
-            commitNew(){ // 提交新审核
-                store.commit('SER_ADDOUTPRODUCTID',0)
-                this.$router.push("/goods/addGoods");
+            commitNew() { // 提交新审核
+                this.$router.push({
+                    name: "addGoods",
+                    params: {
+                        isNew: true
+                    }
+                });
+            },
+            update() { //更新审核
+                this.$router.push({
+                    name: "addGoods",
+                    params: {
+                        outProductId: this.outProductId,
+                        isDisable: this.status == 2 ? true : false
+                    }
+                });
             },
-            update(){ //更新审核
-                this.$router.push({name:"addGoods",params:{outProductId:this.outProductId}});
+            initPage() {
+                if (this.$route.params.outProductId) {
+                    this.outProductId = this.$route.params.outProductId
+                    this.getDetail()
+                }
             }
 
         },
         created() {},
+        activated() {
+            this.initPage()
+        },
         mounted() {
-            if(this.$route.params.outProductId){
-                 this.outProductId=this.$route.params.outProductId
-                 store.commit('SER_OUTPRODUCTID',this.outProductId)
-            }else{
-                this.outProductId=store.getters.getOutProductId
-            }
-            this.getDetail()
-        }    
+        }
     };
 </script>
 <style lang="less" scoped>
@@ -197,7 +203,8 @@
             text-align: left;
             margin-left: 100px;
         }
-        .status{
+
+        .status {
             width: 75%;
             display: flex;
             margin-top: 20px;
@@ -206,27 +213,33 @@
             color: #232323;
             font-weight: bolder;
             font-family: PingFangSC-Regular, PingFang SC;
-            .line{
+
+            .line {
                 display: flex;
                 margin-top: 20px;
                 align-items: center;
             }
-            .commitnew{
+
+            .commitnew {
                 margin-left: 40px;
             }
-            .label{
+
+            .label {
                 width: 100px;
                 text-align: right;
-                margin-right:30px;
+                margin-right: 30px;
             }
-            .reason{
-                    width: 80%;
+
+            .reason {
+                width: 80%;
             }
-            .statustext{
+
+            .statustext {
                 color: #E02020;
             }
         }
-        .empty{
+
+        .empty {
             width: 75%;
             display: flex;
             justify-content: center;
@@ -234,12 +247,14 @@
             align-items: center;
             margin-top: 30px;
             margin-bottom: 30px;
-            .emptytitle{
+
+            .emptytitle {
                 text-align: center;
-                color: #999999;      
-                font-size: 15px;          
+                color: #999999;
+                font-size: 15px;
             }
-            .emptyimg{
+
+            .emptyimg {
                 width: 400px;
                 height: auto;
             }
@@ -276,7 +291,8 @@
                     width: 875px;
                 }
             }
-            .commit{
+
+            .commit {
                 width: 100%;
                 text-align: center;
             }

+ 27 - 13
src/pages/goods/index.vue

@@ -108,7 +108,7 @@
     methods: {
       getPageList(pageRequest) {
         if (pageRequest) {
-          this.searchForm.pageNum = pageRequest.pageIndex;
+          this.searchForm.page = pageRequest.pageIndex;
           this.searchForm.pageSize = pageRequest.pageSize;
           this.searchForm.sortField = pageRequest.sort;
           this.searchForm.sortOrder = pageRequest.order
@@ -120,8 +120,12 @@
         this.getCount()
       },
       addGoods() { // 新增商品
-        store.commit('SER_ADDOUTPRODUCTID', 0) //新增商品不获取详情
-        this.$router.push("/goods/addGoods");
+        this.$router.push({
+          name: "addGoods",
+          params: {
+            isNew:true
+          }
+        });
       },
       handleClick(tab, event) {
         this.searchForm.searchName = ''
@@ -137,17 +141,24 @@
         });
       },
       toEdit(row) {
-        changeStatus({
-          commodityId: row.commodity_id,
-          editStatus: this.searchForm.type=='1'?11:5
-        }).then(res => {
-          this.$message.success('更新成功');
-          this.searchForm.searchName = ''
-          this.searchForm.page = 1
-          this.getPageList()
-        })
+        this.$confirm('确定' + (this.searchForm.type == '1' ? '下架?' : '上架?'), '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          changeStatus({
+            commodityId: row.commodity_id,
+            editStatus: this.searchForm.type == '1' ? 11 : 5
+          }).then(res => {
+            this.$message.success((this.searchForm.type == '1' ? '下架' : '上架') + '成功');
+            this.searchForm.searchName = ''
+            this.searchForm.page = 1
+            this.getPageList()
+          })
+        }).catch(() => {});
+
       },
-      search(){
+      search() {
         this.searchForm.page = 1
         this.getPageList()
       },
@@ -168,6 +179,9 @@
         })
       }
     },
+    activated() {
+      this.getPageList()
+    },
     mounted() {
       this.getPageList()
     }

+ 185 - 0
src/pages/qualification/addCategory/index.vue

@@ -0,0 +1,185 @@
+<template>
+    <div class="wrapper">
+        <div class="title">资质申请</div>
+        <el-form class="form" ref="form" :model="form" label-width="200px">
+            <el-form-item label="一级类目:">
+                <el-input placeholder="请输入" v-model="form.level1" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item label="二级类目:" label-width="100px">
+                <el-input placeholder="请输入" v-model="form.level2" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item label="三级类目:">
+                <el-input placeholder="请输入" v-model="form.level3" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item label="三级类目名称:" label-width="100px">
+                <el-input placeholder="请输入" v-model="form.level3_name" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item class="single" label="营业执照或组织机构代码证:">
+                <upload v-if="updatePic" ref="upload_goods" :file="licenseImgs" limitNum="10"></upload>
+            </el-form-item>
+            <el-form-item class="single" label="资质材料URL:">
+                <upload v-if="updatePic" ref="upload_zizhi" :file="certificateImgs" limitNum="10"></upload>
+            </el-form-item>
+            <el-form-item class="single" label="备注:">
+                <el-input placeholder="请输入" v-model="form.remark" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item class="commit">
+                <el-button class="blackbtn" :loading="loading" @click.native.prevent="commit">提交
+                </el-button>
+            </el-form-item>
+
+        </el-form>
+    </div>
+</template>
+
+<script>
+    import store from '@/store/index'
+    import upload from '@/components/upload'
+    import {
+        add,
+    } from "@/api/category";
+    export default {
+        name: 'addBrand',
+        components: {
+            upload
+        },
+        props: {},
+        data() {
+            return {
+                licenseImgs: [],
+                certificateImgs: [],
+                outProductId: 0,
+                commodity_id: 0,
+                updatePic: true,
+                form: {
+                    level1: '',
+                    level3: '',
+                    level2: '',
+                    level3_name: '',
+                    remark: ''
+                },
+                loading: false
+            };
+        },
+        watch: {},
+        computed: {},
+        methods: {
+            commit() {
+                if (this.licenseImgs.length == 0) {
+                    this.$message.error('请选择营业执照或组织机构代码证');
+                    return
+                }
+                if (this.certificateImgs.length == 0) {
+                    this.$message.error('请选择资质材料');
+                    return
+                }
+                let licenseImgs_temp = []
+                this.licenseImgs.forEach(element => {
+                    licenseImgs_temp.push(element.url)
+                });
+                let certificateImgs_temp = []
+                this.certificateImgs.forEach(element => {
+                    certificateImgs_temp.push(element.url)
+                });
+                let params = {
+                    certificateImgs: certificateImgs_temp.join(","),
+                    level1: this.form.level1,
+                    level2: this.form.level2,
+                    level3: this.form.level3,
+                    licenseImgs: licenseImgs_temp.join(","),
+                    level3_name: this.form.level3_name,
+                    remark: this.form.remark,
+                }
+                this.loading = true
+                add(params).then(() => {
+                    this.$message.success('添加成功');
+                    store.commit('REMOVETAB', '资质申请')
+                    this.$router.go(-1)
+                }).catch(() => {
+                    this.loading = false
+                });
+            },
+            initPage() {
+                this.loading = false
+                if (this.$route.params.isNew) {
+                    this.form = {
+                        level1: '',
+                        level3: '',
+                        level2: '',
+                        level3_name: '',
+                        remark: ''
+                    }
+                    this.licenseImgs = []
+                    this.certificateImgs = []
+                    //刷新子组件
+                    this.updatePic = false
+                    this.$nextTick(() => {
+                        this.updatePic = true
+                    })
+                }
+            }
+        },
+        created() {},
+        activated() {
+            this.initPage()
+        },
+        mounted() {}
+    };
+</script>
+<style lang="less" scoped>
+    .wrapper {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        .title {
+            font-weight: bold;
+            width: 100%;
+            text-align: left;
+            margin-left: 100px;
+        }
+        .form {
+            margin-top: 20px;
+            width: 90%;
+            display: flex;
+            justify-content: space-between;
+            flex-wrap: wrap;
+
+            .el-form-item {
+                color: #232323;
+                font-weight: bold;
+            }
+
+            .el-select {
+                width: 300px;
+            }
+
+            .el-input {
+                width: 300px;
+            }
+
+            .single {
+                width: 100%;
+
+                .el-input {
+                    width: 875px;
+                }
+
+                .el-select {
+                    width: 875px;
+                }
+            }
+
+            .commit {
+                width: 100%;
+                text-align: center;
+            }
+        }
+
+
+    }
+</style>

+ 329 - 0
src/pages/qualification/categoryDetail/index.vue

@@ -0,0 +1,329 @@
+<template>
+    <div class="wrapper">
+        <div class="title">类目详情</div>
+        <div class="status">
+            <div class="line">
+                <div class="label">申请状态:</div><span :class="status==9?'statustext':''">{{statusName}}</span>
+            </div>
+            <div class="line" v-if="status==9">
+                <div class="label">原因:</div><span class="reason">{{reject_reason}}</span>
+            </div>
+        </div>
+        <el-divider></el-divider>
+        <el-form class="form" ref="form" :model="form" label-width="200px">
+            <el-form-item label="一级类目:">
+                <el-input placeholder="请输入" :disabled="isDisable" v-model="form.level1" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item label="二级类目:" label-width="100px">
+                <el-input placeholder="请输入" :disabled="isDisable" v-model="form.level2" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item label="三级类目:">
+                <el-input placeholder="请输入" :disabled="isDisable" v-model="form.level3" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item label="三级类目名称:" label-width="100px">
+                <el-input placeholder="请输入" :disabled="isDisable&&isSuccessEdit" v-model="form.level3_name"
+                    maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item class="single" label="营业执照或组织机构代码证:">
+                <upload v-if="updatePic" ref="upload_goods" :disabled="isDisable" :file="licenseImgs" limitNum="10">
+                </upload>
+            </el-form-item>
+            <el-form-item class="single" label="资质材料URL:">
+                <upload v-if="updatePic" ref="upload_zizhi" :disabled="isDisable" :file="certificateImgs" limitNum="10">
+                </upload>
+            </el-form-item>
+            <el-form-item class="single" label="备注:">
+                <el-input placeholder="请输入" :disabled="isDisable&&isSuccessEdit" v-model="form.remark" maxlength="25">
+                </el-input>
+            </el-form-item>
+            <el-form-item class="commit" v-if="status!=0">
+                <el-button class="blackbtn" :loading="loading" @click.native.prevent="commit">提交
+                </el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+
+<script>
+    import store from '@/store/index'
+    import upload from '@/components/upload'
+    import {
+        detail,
+        edit,
+        authedEdit
+    } from "@/api/category";
+    export default {
+        name: 'categoryDetail',
+        components: {
+            upload
+        },
+        props: {},
+        data() {
+            return {
+                licenseImgs: [],
+                updatePic: true,
+                certificateImgs: [],
+                category_info_id: '',
+                isDisable: false,
+                isSuccessEdit: true, //成功时可编辑类目  可编辑-false
+                status: 1,
+                statusName: '',
+                reject_reason: '',
+                form: {
+                    level1: '',
+                    level3: '',
+                    level2: '',
+                    level3_name: '',
+                    remark: ''
+                },
+                loading: false
+            };
+        },
+        watch: {},
+        computed: {},
+        methods: {
+            commit() {
+                if (this.licenseImgs.length == 0) {
+                    this.$message.error('请选择营业执照或组织机构代码证');
+                    return
+                }
+                if (this.certificateImgs.length == 0) {
+                    this.$message.error('请选择资质材料');
+                    return
+                }
+                let licenseImgs_temp = []
+                this.licenseImgs.forEach(element => {
+                    licenseImgs_temp.push(element.url)
+                });
+                let certificateImgs_temp = []
+                this.certificateImgs.forEach(element => {
+                    certificateImgs_temp.push(element.url)
+                });
+                if (this.status == 1) {
+                    //通过时修改
+                    let params = {
+                        category_info_id:this.category_info_id,
+                        level3_name: this.form.level3_name,
+                        remark: this.form.remark,
+                    }
+                    this.loading = true
+                    authedEdit(params).then(() => {
+                        this.$message.success('修改成功');
+                        store.commit('REMOVETAB', '类目详情')
+                        this.$router.go(-1)
+                    }).catch(() => {
+                        this.loading = false
+                    });
+                } else {
+                    let params = {
+                        category_info_id:this.category_info_id,
+                        certificateImgs: certificateImgs_temp.join(","),
+                        level1: this.form.level1,
+                        level2: this.form.level2,
+                        level3: this.form.level3,
+                        licenseImgs: licenseImgs_temp.join(","),
+                        level3_name: this.form.level3_name,
+                        remark: this.form.remark,
+                    }
+                    this.loading = true
+                    edit(params).then(() => {
+                        this.$message.success('修改成功');
+                        store.commit('REMOVETAB', '类目详情')
+                        this.$router.go(-1)
+                    }).catch(() => {
+                        this.loading = false
+                    });
+
+                }
+            },
+            getDetail() {
+                detail({
+                    categoryInfoId: this.category_info_id
+                }).then(res => {
+                    this.status = res.data.status
+                    if (this.status == 0) { //审核中全不可编辑
+                        this.isDisable = true
+                    }
+                    if (this.status == 1) { //成功时只能修改三级名称 备注
+                        this.isDisable = true
+                        this.isSuccessEdit = false
+                    }
+                    this.reject_reason = res.data.reject_reason
+                    this.statusName = res.data.statusName
+                    this.form.level1 = res.data.level1
+                    this.form.level2 = res.data.level2
+                    this.form.level3 = res.data.level3
+                    this.form.level3_name = res.data.level3_name
+                    this.category_info_id=res.data.category_info_id
+                    this.licenseImgs = []
+                    if (res.data.licenseImgs ?.length > 0) {
+                        res.data.licenseImgs.forEach(element => {
+                            this.licenseImgs.push({
+                                url: element
+                            })
+                        });
+                    }
+                    this.certificateImgs = []
+                    if (res.data.certificateImgs?.length > 0) {
+                        res.data.certificateImgs.forEach(element => {
+                            this.certificateImgs.push({
+                                url: element
+                            })
+                        });
+                    }
+                    //刷新子组件
+                    this.updatePic = false
+                    this.$nextTick(() => {
+                        this.updatePic = true
+                    })
+                })
+            },
+            commitNew() { // 提交新审核
+                this.$router.push({
+                    name: "addGoods",
+                    params: {
+                        isNew: true
+                    }
+                });
+            },
+            update() { //更新审核
+                this.$router.push({
+                    name: "addGoods",
+                    params: {
+                        outProductId: this.outProductId,
+                        isDisable: this.status == 2 ? true : false
+                    }
+                });
+            },
+            initPage() {
+                this.loading = false
+                this.isDisable = false
+                this.isSuccessEdit = true
+                if (this.$route.params.category_info_id) {
+                    this.category_info_id = this.$route.params.category_info_id
+                    this.getDetail()
+                }
+            }
+
+        },
+        created() {},
+        activated() {
+            this.initPage()
+        },
+        mounted() {}
+    };
+</script>
+<style lang="less" scoped>
+    .wrapper {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+
+        .title {
+            font-weight: bold;
+            width: 100%;
+            text-align: left;
+            margin-left: 100px;
+        }
+
+        .status {
+            width: 75%;
+            display: flex;
+            margin-top: 20px;
+            flex-direction: column;
+            font-size: 14px;
+            color: #232323;
+            font-weight: bolder;
+            font-family: PingFangSC-Regular, PingFang SC;
+
+            .line {
+                display: flex;
+                margin-top: 20px;
+                align-items: center;
+            }
+
+            .commitnew {
+                margin-left: 40px;
+            }
+
+            .label {
+                width: 100px;
+                text-align: right;
+                margin-right: 30px;
+            }
+
+            .reason {
+                width: 80%;
+            }
+
+            .statustext {
+                color: #E02020;
+            }
+        }
+
+        .empty {
+            width: 75%;
+            display: flex;
+            justify-content: center;
+            flex-direction: column;
+            align-items: center;
+            margin-top: 30px;
+            margin-bottom: 30px;
+
+            .emptytitle {
+                text-align: center;
+                color: #999999;
+                font-size: 15px;
+            }
+
+            .emptyimg {
+                width: 400px;
+                height: auto;
+            }
+        }
+
+        .form {
+            margin-top: 20px;
+            width: 75%;
+            display: flex;
+            justify-content: space-between;
+            flex-wrap: wrap;
+
+            .el-form-item {
+                color: #232323;
+                font-weight: bold;
+            }
+
+            .el-select {
+                width: 300px;
+            }
+
+            .el-input {
+                width: 300px;
+            }
+
+            .single {
+                width: 100%;
+
+                .el-input {
+                    width: 875px;
+                }
+
+                .el-select {
+                    width: 875px;
+                }
+            }
+
+            .commit {
+                width: 100%;
+                text-align: center;
+            }
+        }
+
+
+    }
+</style>

+ 116 - 14
src/pages/qualification/index.vue

@@ -1,21 +1,123 @@
 <template>
-  <div class="wrapper">资质管理</div>
+  <div class="index flex column">
+    <div class="serach flex row space-between">
+      <el-button class="blackbtn" icon="el-icon-plus" @click="addCategory">申请新类目</el-button>
+    </div>
+    <e-table class="table" ref="eTable" :tableHeadConfig="tableHeadConfig" :tableLoadData="tableLoadData"
+      :pageShow="true" :total="searchForm.total" :currentPage="searchForm.page" :pageSize="searchForm.pageSize"
+      @getPageList="getPageList" @changeSort="changeSort" showIndex="true">
+      <template v-slot:operation="slotData">
+        <div class="operationDiv">
+          <el-button type="text" @click="toView(slotData.data.row)">查看</el-button>
+        </div>
+      </template>
+    </e-table>
+
+  </div>
 </template>
 
 <script>
-export default {
-  components: {},
-  props: {},
-  data() {
-    return {
-    };
-  },
-  watch: {},
-  computed: {},
-  methods: {},
-  created() {},
-  mounted() {}
-};
+  import eTable from '@/components/base-table'
+  import {
+    list,
+  } from '@/api/category'
+  import store from '@/store/index'
+  export default {
+    name: "qualification",
+    components: {
+      eTable
+    },
+    data() {
+      return {
+        searchForm: {
+          total: 0,
+          page: 1,
+          pageSize: 10,
+        },
+        tableHeadConfig: [{
+            label: '申请类目',
+            prop: 'level3_name',
+            isShow: true,
+          },
+          {
+            label: '一级类目',
+            prop: 'level1',
+            isShow: true,
+          },
+          {
+            label: '二级类目',
+            prop: 'level2',
+            isShow: true,
+          },
+          {
+            label: '三级类目',
+            prop: 'level3',
+            isShow: true,
+          },
+          {
+            label: '申请时间',
+            prop: 'create_time',
+            isShow: true,
+          },
+          {
+            label: '申请结果',
+            prop: 'status',
+            isShow: true,
+          },
+          {
+            label: '操作',
+            columnType: 'operation',
+            slotName: 'operation',
+            width: 200,
+            isShow: true,
+          }
+        ],
+        tableLoadData: [],
+      };
+    },
+    created() {},
+    methods: {
+      getPageList(pageRequest) {
+        if (pageRequest) {
+          this.searchForm.page = pageRequest.pageIndex;
+          this.searchForm.pageSize = pageRequest.pageSize;
+        }
+        list(this.searchForm).then(res => {
+          this.searchForm.total = res.data.total
+          this.tableLoadData = res.data.list
+        })
+      },
+      addCategory() { // 申请类目
+      this.$router.push({
+          name: "addCategory",
+          params: {
+            isNew:true
+          }
+        });
+      },
+      toView(row) {
+        this.$router.push({
+          name: "categoryDetail",
+          params: {
+            category_info_id: row.category_info_id
+          }
+        });
+      },
+    },
+    activated(){
+       this.getPageList()
+    },
+    mounted() {
+      this.getPageList()
+    }
+  };
 </script>
 <style lang="less" scoped>
+  .btn_search {
+    margin-left: 10px;
+  }
+
+  .serach {
+    margin-bottom: 10px;
+  }
 </style>

+ 21 - 3
src/router/routes.js

@@ -17,7 +17,7 @@ export  const menuRouter =[
     id: 1,
     name: 'qualification',
     path: '/qualification',
-    meta: { title: '资质管理', icon: 'icon-zizhiguanli', keepAlive:true},
+    meta: { title: '类目管理', icon: 'icon-zizhiguanli', keepAlive:true},
     component: () => import('@/pages/qualification/index.vue'),
   },
 
@@ -41,13 +41,31 @@ export const otherRouter = [
   {
     name: 'addGoods',
     path: '/goods/addGoods',
-    meta: { title: '新增商品' , keepAlive:false},
+    meta: { title: '新增商品' , keepAlive:true},
     component: () => import('@/pages/goods/addGoods/index.vue'),
   },
   {
     name: 'goodsDetail',
     path: '/goods/goodsDetail',
-    meta: { title: '商品详情' ,keepAlive:false},
+    meta: { title: '商品详情' ,keepAlive:true},
     component: () => import('@/pages/goods/goodsDetail/index.vue'),
   },
+  {
+    name: 'addCategory',
+    path: '/qualification/addCategory',
+    meta: { title: '资质申请' ,keepAlive:true},
+    component: () => import('@/pages/qualification/addCategory/index.vue'),
+  },
+  {
+    name: 'categoryDetail',
+    path: '/qualification/categoryDetail',
+    meta: { title: '类目详情' ,keepAlive:true},
+    component: () => import('@/pages/qualification/categoryDetail/index.vue'),
+  },
+  {
+    name: 'addBrand',
+    path: '/brand/addBrand',
+    meta: { title: '品牌申请' ,keepAlive:true},
+    component: () => import('@/pages/brand/addBrand/index.vue'),
+  },
 ]

+ 1 - 12
src/store/modules/user.js

@@ -4,8 +4,6 @@ const state = {
   menuInfo: {},//菜单点击数据
   tabList:[], //tab页存储
   tabIndex:0, //tab页的坐标
-  outProductId:0, //当前商品详情页id
-  addoutProductId:0//新增时商品详情
 }
 const getters = {
   getToken: state => state.token,
@@ -13,8 +11,6 @@ const getters = {
   getMenuInfo: state => state.menuInfo,
   getTabList:state=>state.tabList,
   getTabIndex:state=>state.tabIndex,
-  getOutProductId:state=>state.outProductId,
-  getAddOutProductId:state=>state.addoutProductId
 }
 const mutations = {
   SET_USER_TOKEN(state, token) {
@@ -38,12 +34,6 @@ const mutations = {
   SET_TABINDEX(state,index){
     state.tabIndex=index
   },
-  SER_OUTPRODUCTID(state,outProductId){
-    state.outProductId=outProductId
-  },
-  SER_ADDOUTPRODUCTID(state,outProductId){
-    state.addoutProductId=outProductId
-  },
   REMOVETAB(state,tabname){
     state.tabList.forEach((element,index) => {
       if(element.name==tabname){
@@ -57,8 +47,7 @@ const mutations = {
     state.menuInfo={},
     state.info={},
     state.token = '',
-    state.tabIndex=0,
-    state.outProductId=0
+    state.tabIndex=0
   }
 }
 export default {

+ 1 - 1
src/utils/request.js

@@ -28,7 +28,7 @@ service.interceptors.response.use(response => {
   } else {
     Message.closeAll();
     Message({
-      message: res.Message,
+      message: res.message,
       type: 'error',
       duration: 3 * 1000
     })

+ 3 - 3
static/iconfont/demo_index.html

@@ -62,7 +62,7 @@
           
             <li class="dib">
               <span class="icon iconfont">&#xe68d;</span>
-                <div class="name">资质管理</div>
+                <div class="name">类目管理</div>
                 <div class="code-name">&amp;#xe68d;</div>
               </li>
           
@@ -130,7 +130,7 @@
           <li class="dib">
             <span class="icon iconfont icon-zizhiguanli"></span>
             <div class="name">
-              资质管理
+              类目管理
             </div>
             <div class="code-name">.icon-zizhiguanli
             </div>
@@ -184,7 +184,7 @@
                 <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-zizhiguanli"></use>
                 </svg>
-                <div class="name">资质管理</div>
+                <div class="name">类目管理</div>
                 <div class="code-name">#icon-zizhiguanli</div>
             </li>
           

+ 1 - 1
static/iconfont/iconfont.json

@@ -14,7 +14,7 @@
     },
     {
       "icon_id": "9058498",
-      "name": "资质管理",
+      "name": "类目管理",
       "font_class": "zizhiguanli",
       "unicode": "e68d",
       "unicode_decimal": 59021