Browse Source

商品模板功能

billisme 3 năm trước cách đây
mục cha
commit
a3551d0c5c

+ 1 - 1
.env.production

@@ -9,5 +9,5 @@ VUE_APP_IM_API = 'https://lymall-im.58for.com'
 VUE_APP_WS_IM_API = 'wss://lymall-im.58for.com'
 
 # 静态资源文件url
-VUE_APP_RESOURCES_URL = 'http://lymall-minio.58for.com/mall4j/'
+VUE_APP_RESOURCES_URL = 'https://ecard-oss.58for.com/'
 

+ 1 - 1
src/components/elx-imgbox/index.vue

@@ -207,7 +207,7 @@ export default {
       options: {
         multiple: true, // 是否支持选取多个图片
         limit: 20, // 最多可选择图片数量
-        maxSize: 2, // 最大尺寸(M)
+        maxSize: 10, // 最大尺寸(M)
         activeTab: 'pick',
         enableUpload: true, // 是否启用图片上传
         callback: null

+ 17 - 1
src/i18n/langs/zhCn.js

@@ -544,6 +544,20 @@ const zhCn = {
     pass: '审核通过',
     waitPass: '未审核'
   },
+  prodTemplate: {
+    templateSide: '正反面',
+    templateStyle: '风格',
+    templateSeries: '系列',
+    templatePic: '图片',
+    status: '是否禁用',
+    createTime: '创建时间'
+  },
+  prodTemplateStyle: {
+    styleName: '风格名称'
+  },
+  prodTemplateSeries: {
+    seriesName: '系列名称'
+  },
   users: {
     name: '用户昵称'
   },
@@ -646,6 +660,8 @@ const zhCn = {
     fileSuccess: '文件导入成功',
     sureToExport: '确定进行导出操作?',
     BulkShipping: '批量发货',
+    BulkPdfGenerate: '生成PDF',
+    DownloadPdf: '下载PDF',
     confirm: '确定',
     cancel: '取消',
     addressee: '收货人',
@@ -2340,7 +2356,7 @@ const zhCn = {
     revName: '修改名称',
     inputNewName: '请输入新的图片名称',
     superiorLimit: '可选择照片数量已达上限',
-    onlyPictures: '只支持图片格式、大小不能超过2m,其他文件已清除',
+    onlyPictures: '只支持图片格式、大小不能超过10m,其他文件已清除',
     onlySupported: '仅支持',
     pic: '图片',
     imageSize: '图片尺寸为',

+ 163 - 0
src/views/modules/prod/prodTemplate-add-or-update.vue

@@ -0,0 +1,163 @@
+<template>
+  <el-dialog
+    :title="!dataForm.templateId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
+      <el-form-item label="模板正反面" prop="templateSide">
+        <el-select v-model="dataForm.templateSide" clearable filterable>
+          <el-option key="Front" label="正面" value="Front"></el-option>
+          <el-option key="Back" label="背面" value="Back"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="模板风格" prop="templateStyle">
+        <el-select v-model="dataForm.templateStyleId" clearable filterable @change="handleStyleChange">
+          <el-option
+                  v-for="node in styleList"
+                  :key="node.styleId"
+                  :label="node.styleName"
+                  :value="node.styleId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="模板系列" prop="templateSeries">
+        <el-select v-model="dataForm.templateSeriesId" clearable filterable @change="handleSeriesChange">
+          <el-option
+                  v-for="node in seriesList"
+                  :key="node.seriesId"
+                  :label="node.seriesName"
+                  :value="node.seriesId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="模板图片" prop="templatePic">
+        <img-upload v-model="dataForm.templatePic" :maxSize="10"></img-upload>
+      </el-form-item>
+      <!--<el-form-item label="商家ID" prop="shopId">
+        <el-input v-model="dataForm.shopId"></el-input>
+      </el-form-item>-->
+      <el-form-item label="是否禁用" prop="status">
+        <el-select v-model="dataForm.status" clearable filterable>
+          <el-option key="1" label="启用" :value=1></el-option>
+          <el-option key="0" label="禁用" :value=0></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import ImgUpload from '@/components/img-upload'
+export default {
+  components: {
+    ImgUpload
+  },
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        templateId: null,
+        templateSide: null,
+        templateStyleId: null,
+        templateSeriesId: null,
+        templateStyle: null,
+        templateSeries: null,
+        templatePic: null,
+        shopId: this.$store.state.user.shopId,
+        status: null,
+        createTime: null
+      },
+      seriesList: [],
+      styleList: [],
+      dataRule: {
+      }
+    }
+  },
+  created () {
+    this.getStyleList()
+    this.getSeriesList()
+  },
+  methods: {
+    init (templateId) {
+      this.dataForm.templateId = templateId || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.templateId) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodTemplate/info/' + this.dataForm.templateId),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodTemplate'),
+            method: this.dataForm.templateId ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    },
+    getStyleList () {
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplateStyle/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+                Object.assign({
+                          size: 100,
+                          shopId: this.$store.state.user.shopId
+                        }
+                )
+        )
+      }).then(({data}) => {
+        this.styleList = data.records
+      })
+    },
+    getSeriesList () {
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplateSeries/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+                Object.assign({
+                          size: 100,
+                          shopId: this.$store.state.user.shopId
+                        }
+                )
+        )
+      }).then(({data}) => {
+        this.seriesList = data.records
+      })
+    },
+    handleStyleChange (index) {
+      this.dataForm.templateStyleId = this.styleList[index-1].styleId
+      this.dataForm.templateStyle = this.styleList[index-1].styleName
+    },
+    handleSeriesChange (index) {
+      this.dataForm.templateSeriesId = this.seriesList[index-1].seriesId
+      this.dataForm.templateSeries = this.seriesList[index-1].seriesName
+    }
+  }
+}
+</script>

+ 265 - 0
src/views/modules/prod/prodTemplate.vue

@@ -0,0 +1,265 @@
+<template>
+  <div class="mod-prod-prodTemplate">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" label-width="auto" size="small">
+        <!-- 表单项 -->
+        <div class="input-row">
+          <el-form-item :label="$t('prodTemplate.templateStyle')+':'">
+            <el-select v-model="searchForm.templateStyleId" clearable filterable>
+              <el-option
+                      v-for="node in styleList"
+                      :key="node.styleId"
+                      :label="node.styleName"
+                      :value="node.styleId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item :label="$t('prodTemplate.templateSeries')+':'">
+            <el-select v-model="searchForm.templateSeriesId" clearable filterable>
+              <el-option
+                      v-for="node in seriesList"
+                      :key="node.seriesId"
+                      :label="node.seriesName"
+                      :value="node.seriesId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(true)">{{ $t('crud.searchBtn') }}</div>
+            <div class="default-btn" @click="resetForm()">{{ $t('shop.resetMap') }}</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()"
+             >{{$t("crud.addTitle")}}</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 模板图片地址 -->
+          <!--<el-table-column :label="$t('prodTemplate.templatePic')" prop="templatePic" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.templatePic}}</span>
+            </template>
+          </el-table-column>-->
+          <el-table-column
+                  align="center"
+                  prop="templatePic"
+                  :label="$t('prodTemplate.templatePic')"
+                  width="300">
+            <template slot-scope="scope">
+              <img
+                  :src="resourcesUrl + scope.row.templatePic"
+                  width="100"
+                  height="100"
+                  v-if="scope.row.templatePic"
+              />
+            </template>
+          </el-table-column>
+          <!-- 模板风格 -->
+          <el-table-column :label="$t('prodTemplate.templateStyle')" prop="templateStyle" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.templateStyle}}</span>
+            </template>
+          </el-table-column>
+          <!-- 模板下风格的系列,比如二次元风格的海贼王系列 -->
+          <el-table-column :label="$t('prodTemplate.templateSeries')" prop="templateSeries" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.templateSeries}}</span>
+            </template>
+          </el-table-column>
+          <!-- 商家ID -->
+<!--          <el-table-column :label="$t('prodTemplate.shopId')" prop="shopId" align="center">-->
+<!--            <template slot-scope="scope">-->
+<!--              <span>{{ scope.row.shopId}}</span>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+          <!-- 1启用 0禁用 -->
+          <!-- 模板面,Front:正面,Back:背面 -->
+          <el-table-column :label="$t('prodTemplate.templateSide')" prop="templateSide" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.templateSide == 'Front'">正面</span>
+              <span v-if="scope.row.templateSide == 'Back'">背面</span>
+            </template>
+          </el-table-column>
+          <el-table-column :label="$t('prodTemplate.status')" prop="status" align="center">
+            <template slot-scope="scope">
+              <el-tag type="success" v-if="scope.row.status == 1">启用</el-tag>
+              <el-tag type="danger" v-if="scope.row.status == 0">禁用</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.templateId)"
+                     >{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.templateId)"
+                     >{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './prodTemplate-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      seriesList: [],
+      styleList: [],
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList()
+    this.getStyleList()
+    this.getSeriesList()
+  },
+  mounted () {
+  },
+  methods: {
+    getStyleList () {
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplateStyle/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+                Object.assign({
+                          size: 100,
+                          shopId: this.$store.state.user.shopId
+                        },
+                )
+        )
+      }).then(({data}) => {
+        this.styleList = data.records
+      })
+    },
+    getSeriesList () {
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplateSeries/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+                Object.assign({
+                          size: 100,
+                          shopId: this.$store.state.user.shopId
+                        },
+                )
+        )
+      }).then(({data}) => {
+        this.seriesList = data.records
+      })
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplate/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            shopId: this.$store.state.user.shopId
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/prod/prodTemplate/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 1500,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    resetForm () {
+      this.searchForm = {
+        templateStyleId: null,
+        templateSeriesId: null
+      }
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.searchForm = params
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-prod-prodTemplate {
+}
+</style>

+ 73 - 0
src/views/modules/prod/prodTemplateSeries-add-or-update.vue

@@ -0,0 +1,73 @@
+<template>
+  <el-dialog
+    :title="!dataForm.seriesId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
+      <el-form-item label="系列名称" prop="seriesName">
+        <el-input v-model="dataForm.seriesName"></el-input>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        seriesId: null,
+        seriesName: null,
+        shopId: this.$store.state.user.shopId
+      },
+      dataRule: {
+      }
+    }
+  },
+  methods: {
+    init (seriesId) {
+      this.dataForm.seriesId = seriesId || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.seriesId) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodTemplateSeries/info/' + this.dataForm.seriesId),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodTemplateSeries'),
+            method: this.dataForm.seriesId ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 174 - 0
src/views/modules/prod/prodTemplateSeries.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="mod-prod-prodTemplateSeries">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" label-width="auto" size="small">
+        <div class="input-row">
+          <el-form-item prop="seriesName" :label="$t('prodTemplateSeries.seriesName')" class="search-form-item">
+            <el-input type="text" v-model="searchForm.styleName" :placeholder="$t('prodTemplateSeries.seriesName')"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(searchForm)">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()"
+             >{{$t("crud.addTitle")}}</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 系列名称 -->
+          <el-table-column :label="$t('prodTemplateSeries.seriesName')" prop="seriesName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.seriesName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 商家ID -->
+<!--          <el-table-column :label="$t('prodTemplateSeries.shopId')" prop="shopId" align="center">-->
+<!--            <template slot-scope="scope">-->
+<!--              <span>{{ scope.row.shopId}}</span>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.seriesId)"
+                     >{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.seriesId)"
+                     >{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './prodTemplateSeries-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList()
+  },
+  mounted () {
+  },
+  methods: {
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplateSeries/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            shopId: this.$store.state.user.shopId
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/prod/prodTemplateSeries/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 1500,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.searchForm = params
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    },
+    /**
+     * 重置表单
+     * @param {String} formName 表单名称
+     */
+    resetSearchForm (formName) {
+      this.$refs[formName].resetFields()
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-prod-prodTemplateSeries {
+}
+</style>

+ 73 - 0
src/views/modules/prod/prodTemplateStyle-add-or-update.vue

@@ -0,0 +1,73 @@
+<template>
+  <el-dialog
+    :title="!dataForm.styleId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
+      <el-form-item label="风格名称" prop="styleName">
+        <el-input v-model="dataForm.styleName"></el-input>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        styleId: null,
+        styleName: null,
+        shopId: this.$store.state.user.shopId
+      },
+      dataRule: {
+      }
+    }
+  },
+  methods: {
+    init (styleId) {
+      this.dataForm.styleId = styleId || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.styleId) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodTemplateStyle/info/' + this.dataForm.styleId),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodTemplateStyle'),
+            method: this.dataForm.styleId ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 174 - 0
src/views/modules/prod/prodTemplateStyle.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="mod-prod-prodTemplateStyle">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" label-width="auto" size="small">
+        <div class="input-row">
+          <el-form-item prop="styleName" :label="$t('prodTemplateStyle.styleName')" class="search-form-item">
+            <el-input type="text" v-model="searchForm.styleName" :placeholder="$t('prodTemplateStyle.styleName')"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(searchForm)">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()"
+             >{{$t("crud.addTitle")}}</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 风格名称 -->
+          <el-table-column :label="$t('prodTemplateStyle.styleName')" prop="styleName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.styleName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 商家ID -->
+<!--          <el-table-column :label="$t('prodTemplateStyle.shopId')" prop="shopId" align="center">-->
+<!--            <template slot-scope="scope">-->
+<!--              <span>{{ scope.row.shopId}}</span>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.styleId)"
+                     >{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.styleId)"
+                     >{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './prodTemplateStyle-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList()
+  },
+  mounted () {
+  },
+  methods: {
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/prod/prodTemplateStyle/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            shopId: this.$store.state.user.shopId
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/prod/prodTemplateStyle/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 1500,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.searchForm = params
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    },
+    /**
+     * 重置表单
+     * @param {String} formName 表单名称
+     */
+    resetSearchForm (formName) {
+      this.$refs[formName].resetFields()
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-prod-prodTemplateStyle {
+}
+</style>

+ 1 - 1
src/views/modules/resource/picture-store/picture-store.vue

@@ -164,7 +164,7 @@ export default {
       options: {
         multiple: true, // 是否支持选取多个图片
         limit: 20, // 最多可选择图片数量
-        maxSize: 2, // 最大尺寸(M)
+        maxSize: 10, // 最大尺寸(M)
         activeTab: 'pick',
         enableUpload: true, // 是否启用图片上传
         callback: null

+ 2 - 2
src/views/modules/resource/picture-store/upload-pic.vue

@@ -84,7 +84,7 @@ export default {
       options: {
         multiple: true, // 是否支持选取多个图片
         limit: 20, // 最多可选择图片数量
-        maxSize: 2, // 最大尺寸(M)
+        maxSize: 10, // 最大尺寸(M)
         enableUpload: true, // 是否启用图片上传
         callback: null
       },
@@ -286,7 +286,7 @@ export default {
         this.errMsg()
         return false
       }
-      const isSize = file.size / (1024 * 1024) < 2
+      const isSize = file.size / (1024 * 1024) < 10
       if (!isSize) {
         this.errShow = true
         this.errMsg()