浏览代码

2024.06.28
- 改全局平台端标题;
- 修改活动配置类型字段显示;
- 修复等级分佣页面规则相关字段bug;
- 完成代金券配置页并对接相关接口;

zweiqin 9 月之前
父节点
当前提交
35e383fe74

+ 1 - 1
.eslintignore

@@ -1,7 +1,7 @@
 build/*.js
 src/assets
 src/canvas-container
-src/views/business/businessList
+# src/views/business/businessList
 canvas-container
 public
 dist

文件差异内容过多而无法显示
+ 2 - 22010
package-lock.json


+ 2 - 1
package.json

@@ -36,7 +36,8 @@
     "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vuedraggable": "^2.24.3",
-    "vuex": "3.1.0"
+    "vuex": "3.1.0",
+    "xe-utils": "^3.5.24"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "4.4.4",

+ 1 - 1
src/api/active/combinationActivities.js

@@ -111,7 +111,7 @@ export function getPlatformComposeShop(data) {
 // 数据效果查询
 export function getPlatformComposeData(data) {
   return request({
-    url: '/platformCompose/getCurrencyData',
+    url: '/platformCompose/getComposeData',
     method: 'post',
     data
   })

+ 38 - 0
src/api/marketingManagement/voucherConfiguration.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+
+// 分页查询平台代金券
+export function getAllPlatformVoucher(params) {
+  return request({
+    url: '/platformVoucher/getAll',
+    method: 'get',
+    params
+  })
+}
+
+// 修改平台代金券
+export function updatePlatformVoucher(data) {
+  return request({
+    url: '/platformVoucher/update',
+    method: 'post',
+    data
+  })
+}
+
+// 新增平台代金券
+export function savePlatformVoucher(data) {
+  return request({
+    url: '/platformVoucher/save',
+    method: 'post',
+    data
+  })
+}
+
+// 删除平台代金券
+export function deletePlatformVoucherById(params) {
+  return request({
+    url: '/platformVoucher/deleteById',
+    method: 'get',
+    params
+  })
+}
+

+ 2 - 2
src/layout/components/Sidebar/Logo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="sidebar-logo-container" :class="{ collapse: collapse }">
+  <div class="sidebar-logo-container" :class="{ collapse }">
     <transition name="sidebarLogoFade">
       <router-link
         v-if="collapse"
@@ -29,7 +29,7 @@ export default {
   },
   data() {
     return {
-      title: 'shop平台端'
+      title: '团蜂平台端'
     }
   }
 }

+ 1 - 1
src/settings.js

@@ -1,6 +1,6 @@
 module.exports = {
 
-  title: 'shop平台端',
+  title: '团蜂平台端',
 
   /**
    * @type {boolean} true | false

+ 2 - 2
src/views/active/combinationActivityConfiguration/components/DetailModal.vue

@@ -32,8 +32,8 @@
         <span v-if="formData.configType === 1">升级角色</span>
         <span v-else-if="formData.configType === 2">分佣</span>
         <span v-else-if="formData.configType === 3">社区服务</span>
-        <span v-else-if="formData.configType === 4">代金券</span>
-        <span v-else-if="formData.configType === 5">消费金</span>
+        <span v-else-if="formData.configType === 4">赠送代金券</span>
+        <span v-else-if="formData.configType === 5">赠送消费金</span>
         <span v-else>--</span>
       </el-form-item>
       <el-form-item label="是否参与" prop="joinRole">

+ 2 - 2
src/views/active/combinationActivityConfiguration/components/EditModal.vue

@@ -17,8 +17,8 @@
           <el-option label="升级角色" :value="1" />
           <el-option label="分佣" :value="2" />
           <el-option label="社区服务" :value="3" />
-          <el-option label="代金券" :value="4" />
-          <el-option label="消费金" :value="5" />
+          <el-option label="赠送代金券" :value="4" />
+          <el-option label="赠送消费金" :value="5" />
         </el-select>
       </el-form-item>
       <el-form-item label="是否参与" prop="joinRole">

+ 6 - 6
src/views/active/combinationActivityConfiguration/index.vue

@@ -9,8 +9,8 @@
         <el-option label="升级角色" :value="1" />
         <el-option label="分佣" :value="2" />
         <el-option label="社区服务" :value="3" />
-        <el-option label="代金券" :value="4" />
-        <el-option label="消费金" :value="5" />
+        <el-option label="赠送代金券" :value="4" />
+        <el-option label="赠送消费金" :value="5" />
       </el-select>
       <el-button
         size="mini" class="filter-item" type="primary" icon="el-icon-search"
@@ -42,20 +42,20 @@
               <el-button
                 v-if="row.composeId"
                 style="margin-left: 14px;" type="warning" size="mini"
-                @click="$refs.DetailModal1 && $refs.DetailModal1.handleOpen({ composeId: row.composeId })"
+                @click="$refs.DetailModal2 && $refs.DetailModal2.handleOpen({ composeId: row.composeId })"
               >
                 详情
               </el-button>
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="活动配置类型" prop="configType">
+        <el-table-column align="center" width="110" label="活动配置类型" prop="configType">
           <template slot-scope="{ row }">
             <el-tag v-if="row.configType === 1" effect="plain">升级角色</el-tag>
             <el-tag v-else-if="row.configType === 2" effect="plain">分佣</el-tag>
             <el-tag v-else-if="row.configType === 3" effect="plain">社区服务</el-tag>
-            <el-tag v-else-if="row.configType === 4" effect="plain">代金券</el-tag>
-            <el-tag v-else-if="row.configType === 5" effect="plain">消费金</el-tag>
+            <el-tag v-else-if="row.configType === 4" effect="plain">赠送代金券</el-tag>
+            <el-tag v-else-if="row.configType === 5" effect="plain">赠送消费金</el-tag>
             <span v-else>--</span>
           </template>
         </el-table-column>

+ 112 - 0
src/views/business/businessList/components/DetailModal.vue

@@ -0,0 +1,112 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      size="mini"
+      label-position="left"
+      label-suffix=":"
+      label-width="200px"
+    >
+      <!-- 定时任务信息 -->
+      <el-form-item label="ID" prop="jobId">
+        {{ formData.jobId || '--' }}
+      </el-form-item>
+      <el-form-item label="定时器名称" prop="jobName">
+        {{ formData.jobName || '--' }}
+      </el-form-item>
+      <el-form-item label="spring bean 名称" prop="beanName">
+        {{ formData.beanName || '--' }}
+      </el-form-item>
+      <el-form-item label="方法名" prop="methodName">
+        {{ formData.methodName || '--' }}
+      </el-form-item>
+      <el-form-item label="参数" prop="params">
+        {{ formData.params || '--' }}
+      </el-form-item>
+      <el-form-item label="cron表达式" prop="cronExpression">
+        {{ formData.cronExpression || '--' }}
+      </el-form-item>
+      <el-form-item label="任务状态" prop="status">
+        <span v-if="formData.status === 0">正常</span>
+        <span v-else-if="formData.status === 1">暂停</span>
+        <span v-else>--</span>
+      </el-form-item>
+      <el-form-item label="任务类型" prop="taskType">
+        {{ formData.taskType || '--' }}
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        {{ formData.remark || '--' }}
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        {{ formData.createTime || '--' }}
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import { getIdQuartzJob } from '@/api/timedTasksManagement/timedTasksList'
+
+export default {
+  name: 'DetailModal',
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '800px',
+        title: '查看定时任务详情'
+      },
+      visible: false,
+      formData: {
+        jobId: '',
+        jobName: '',
+        beanName: '',
+        methodName: '',
+        params: '',
+        cronExpression: '',
+        status: '',
+        taskType: '',
+        remark: '',
+        createTime: ''
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    handleOpen(params = {}) {
+      this.formData = Object.assign(this.$options.data().formData, params)
+      if (params.jobId) {
+        this.getInfo(params.jobId)
+      }
+      this.visible = true
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await getIdQuartzJob({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          jobId: res.data.jobId || '',
+          jobName: res.data.jobName || '',
+          beanName: res.data.beanName || '',
+          methodName: res.data.methodName || '',
+          params: res.data.params || '',
+          cronExpression: res.data.cronExpression || '',
+          status: res.data.status,
+          taskType: res.data.taskType || '',
+          remark: res.data.remark || '',
+          createTime: res.data.createTime || ''
+        })
+      } finally {
+        loading.close()
+      }
+    }
+  }
+}
+</script>
+

+ 393 - 0
src/views/business/businessList/components/EditModal.vue

@@ -0,0 +1,393 @@
+<template>
+  <el-dialog :visible.sync="visible" v-bind="modalOptions">
+    <div>
+      <el-form ref="formData" :model="formData" :rules="formRules" size="mini" label-suffix=":" label-width="150px">
+        <div>
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="授权信息" name="first">
+              <el-form-item label="店铺名称" prop="shopName">
+                <el-input v-model="ruleForm.shopName" maxlength="20" />
+              </el-form-item>
+              <el-form-item label="是否支持消费金" prop="isBeeCoin">
+                <el-radio-group v-model="ruleForm.isBeeCoin">
+                  <el-radio :label="1">支持</el-radio>
+                  <el-radio :label="2">不支持</el-radio>
+                </el-radio-group>
+              </el-form-item>
+              <el-form-item v-if="ruleForm.isBeeCoin === 1" label="商家消费金提现比例" prop="beeCoinRatio">
+                <el-input-number v-model="ruleForm.beeCoinRatio" :precision="2" :step="0.01" :max="1"></el-input-number>
+                <span style="margin-left: 10px;">比例*100</span>
+              </el-form-item>
+              <el-form-item label="店铺负责人" prop="chargePersonName">
+                <el-input v-model="ruleForm.chargePersonName" maxlength="20" />
+              </el-form-item>
+              <el-form-item label="负责人电话" prop="chargePersonPhone">
+                <!-- .replace(/(\d{3})\d+(\d{4})$/, '$1****$2') -->
+                <el-input v-model="ruleForm.chargePersonPhone" maxlength="11" clearable />
+              </el-form-item>
+              <el-form-item label="请选择区域" prop="areaId">
+                <el-cascader
+                  v-if="!isEdit" ref="cascaderRef" :props="areaData"
+                  @change="handleCascaderChange"
+                ></el-cascader>
+                <div v-else>
+                  {{ ruleForm.areaId }}
+                  <el-button size="mini" type="primary" style="margin-left: 15px;" @click="isEdit = !isEdit">
+                    {{ isEdit ? '修改' : '取消' }}
+                  </el-button>
+                </div>
+              </el-form-item>
+              <el-form-item label="官方分类" prop="classifyId">
+                <el-cascader
+                  v-model="ruleForm.classificationArr" placeholder="请选择官方分类" :options="categoryList"
+                  :props="{ checkStrictly: false, expandTrigger: 'hover', label: 'storeName', value: 'id', children: 'childs' }"
+                  clearable
+                />
+              </el-form-item>
+              <el-form-item label="店铺地址" prop="shopAdress">
+                <el-input v-model="ruleForm.shopAdress" maxlength="60" />
+              </el-form-item>
+              <el-form-item label="店铺经纬度" prop="longitude">
+                <div>
+                  <span v-if="ruleForm.longitude">
+                    {{ ruleForm.longitude }} - {{ ruleForm.latitude }}
+                  </span>
+                  <el-button
+                    size="mini" type="primary" style="margin-left: 20px;"
+                    @click="$refs.selectAddressMapRef && $refs.selectAddressMapRef.show()"
+                  >
+                    {{ ruleForm.longitude ? '修改' : '选择' }}
+                  </el-button>
+                </div>
+              </el-form-item>
+              <el-form-item label="生效日期" prop="effectiveDate">
+                <el-date-picker
+                  v-model="ruleForm.effectiveDate" value-format="yyyy-MM-dd" type="date"
+                  placeholder="选择日期"
+                />
+              </el-form-item>
+              <el-form-item label="生效年限" prop="effectiveYear">
+                <el-input
+                  v-model="ruleForm.effectiveYear" type="text" placeholder="请输入内容" maxlength="4"
+                  class="elipt"
+                  style="width: 50%" show-word-limit
+                />
+                <span class="elspan">年</span>
+              </el-form-item>
+              <el-form-item label="合同状态" prop="contractState">
+                <el-radio-group v-model="ruleForm.contractState">
+                  <el-radio :label="1">
+                    有效
+                  </el-radio>
+                  <el-radio :label="0">
+                    无效
+                  </el-radio>
+                </el-radio-group>
+              </el-form-item>
+              <el-form-item label="店铺类型" prop="shopType">
+                <el-radio-group v-model="ruleForm.shopType">
+                  <!-- <el-radio :label="1">品牌厂家</el-radio> -->
+                  <el-radio :label="2">本地</el-radio>
+                </el-radio-group>
+              </el-form-item>
+              <el-form-item
+                v-if="ruleForm.shopType === 2" prop="startTime" label="营业开始时间" :rules="[
+                  { required: true, message: '请选择营业开始时间', trigger: 'blur' }
+                ]"
+              >
+                <el-time-select
+                  v-model="ruleForm.startTime" placeholder="起始时间"
+                  :picker-options="{ start: '00:00', step: '00:05' }"
+                >
+                </el-time-select>
+              </el-form-item>
+              <el-form-item
+                v-if="ruleForm.shopType === 2" prop="endTime" label="营业结束时间" :rules="[
+                  { required: true, message: '请选择营业结束时间', trigger: 'blur' }
+                ]"
+              >
+                <el-time-select
+                  v-model="ruleForm.endTime" placeholder="营业结束时间"
+                  :picker-options="{ start: '00:00', step: '00:05', end: '24:00' }"
+                >
+                </el-time-select>
+              </el-form-item>
+              <el-form-item label="是否支持代金券" prop="isVoucher">
+                <el-radio-group v-model="ruleForm.isVoucher">
+                  <el-radio :label="1">
+                    允许
+                  </el-radio>
+                  <el-radio :label="2">
+                    拒绝
+                  </el-radio>
+                </el-radio-group>
+              </el-form-item>
+              <el-form-item
+                v-if="ruleForm.isVoucher === 1" :rules="[
+                  { required: true, message: '请输入代金券返还比例', trigger: 'blur' },
+                  { type: 'number', max: 100, min: 0, message: '请输入正确的代金券返还比例,0 ~ 100', trigger: ['blur', 'change'] }
+                ]" label="代金券返还比例" prop="voucherReturn"
+              >
+                <el-input v-model.number="ruleForm.voucherReturn" placeholder="请填写代金券返还比例,范围0 ~ 100">
+                  <template #append>%</template>
+                </el-input>
+              </el-form-item>
+              <el-form-item label="惠市宝商家编号">
+                <el-input v-model="ruleForm.hsbMrchId" maxlength="60" />
+              </el-form-item>
+              <el-form-item label="直播间审核" prop="auditLive">
+                <el-radio-group v-model="ruleForm.auditLive">
+                  <el-radio :label="1">开启</el-radio>
+                  <el-radio :label="0">关闭</el-radio>
+                </el-radio-group>
+              </el-form-item>
+              <el-form-item label="直播间商品审核" prop="auditLiveProduct">
+                <el-radio-group v-model="ruleForm.auditLiveProduct">
+                  <el-radio :label="1">
+                    开启
+                  </el-radio>
+                  <el-radio :label="0">
+                    关闭
+                  </el-radio>
+                </el-radio-group>
+              </el-form-item>
+
+              <el-form-item class="b-shop-rate" prop="score" label="评分">
+                <el-rate v-model="ruleForm.score"></el-rate>
+              </el-form-item>
+
+              <el-form-item prop="monthlySales" label="月售">
+                <el-input v-model.number="ruleForm.monthlySales" placeholder="请输入商家月售额" type="number"></el-input>
+              </el-form-item>
+
+              <el-form-item prop="perCapita" label="人均">
+                <el-input v-model.number="ruleForm.perCapita" type="number" placeholder="请输入人均消费额" closeable></el-input>
+              </el-form-item>
+
+              <el-form-item prop="shopBrief" label="商家简介">
+                <el-input
+                  v-model="ruleForm.shopBrief" autosize maxlength="250" show-word-limit
+                  type="textarea"
+                  placeholder="请输入商家简介" closeable
+                ></el-input>
+              </el-form-item>
+
+              <el-form-item prop="advertisement" label="广告图">
+                <el-upload
+                  class="avatar-uploader" list-type="picture-card" :file-list="formData.advertisement"
+                  :action="uploadUrl"
+                  :on-success="(r) => formData.advertisement.push({ url: r.url, uid: r.url + Math.random() + Date.now() })"
+                  :on-remove="(e) => formData.advertisement.filter((item) => item.uid !== e.uid)"
+                >
+                  <i class="el-icon-plus avatar-uploader-icon" />
+                </el-upload>
+              </el-form-item>
+            </el-tab-pane>
+            <el-tab-pane label="客户信息" name="second">
+              <el-form-item label="账号" prop="shopPhone" maxlength="20" />
+              </el-form-item>
+              <el-form-item label="密码" prop="shopPassword">
+                <el-input v-model="ruleForm.shopPassword" type="password" maxlength="16" />
+              </el-form-item>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+      </el-form>
+
+      <!-- 选择经纬度 -->
+      <SelectAddressMap
+        ref="selectAddressMapRef"
+        @select="(ruleForm.longitude = address[0]) && (ruleForm.latitude = address[1])"
+      ></SelectAddressMap>
+    </div>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="handleClose">取 消</el-button>
+        <el-button v-if="activeName === 'first'" type="primary" size="mini" @click="activeName = 'second'">
+          下一步
+        </el-button>
+        <el-button v-else-if="activeName === 'second'" type="primary" size="mini" @click="handleSubmit">确 定</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import SelectAddressMap from './SelectAddressMap'
+import { businessListGetById, businessListUpdate, businessListSave, businessClassList } from '@/api/business'
+import { uploadUrl } from '@/utils/request'
+import XeUtils from 'xe-utils'
+
+export default {
+  name: 'EditModal',
+  components: {
+    SelectAddressMap
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '820px',
+        title: ''
+      },
+      visible: false,
+      formData: {
+        shopId: '',
+        shopName: '', // 店铺名称
+        isBeeCoin: '', // 是否支持消费金
+        beeCoinRatio: '', // 商家消费金提现比例
+        chargePersonName: '', // 店铺负责人
+        chargePersonPhone: '', // 负责人电话
+        shopAdress: '', // 地址
+        effectiveDate: '', // 生效日期
+        effectiveYear: '', // 生效年限
+        shopType: 2, // 商家类型 1 商家 2 本地
+        isVoucher: 1, // 是否支持代金卷 1 true 2 false
+        contractState: 1, // 合同状态 1-有效 0-无效
+        auditLive: 1,
+        auditLiveProduct: 1,
+        shopPhone: '', // 账号
+        shopPassword: '', // 密码
+        perCapita: '', // 人均
+        score: 5, // 评分
+        advertisement: [], // 广告图
+        areaId: '', // 区域id
+        hsbMrchId: '', // 惠市宝商家编号,不是必填
+        longitude: '', // 经纬度
+        latitude: '', // 经纬度
+        classificationId: '', // 商家分类id
+        classificationArr: [], // 非后端参数
+        startTime: '',
+        endTime: '',
+        shopBrief: '', // 商家简介
+        monthlySales: ''
+      },
+      formRules: {
+        shopName: [ { required: true, message: '请输入店铺名称' } ],
+        effectiveDate: [ { required: true, message: '请输入生效日期' } ],
+        effectiveYear: [ { required: true, message: '请输入生效年限' } ],
+        chargePersonName: [ { required: true, message: '请输入店铺负责人', trigger: 'blur' } ],
+        chargePersonPhone: [
+          { required: true, message: '请输入负责人电话', trigger: 'blur' },
+          { pattern: /^1[3456789]\d{9}$/, message: '目前只支持中国大陆的手机号码' }
+        ],
+        shopAdress: [ { required: true, message: '请输入地址', trigger: 'blur' } ],
+        contractState: [ { required: true, message: '请选择合同状态', trigger: 'change' } ],
+        shopType: [ { required: true, message: '请选择店铺类型', trigger: 'change' } ],
+        perCapita: [ { required: true, message: '请输入人均消费额', trigger: 'blur' } ],
+        shopBrief: [ { required: true, message: '请填写商家介绍', trigger: 'blur' } ],
+        isVoucher: [ { required: true, message: '请选择是否允许使用代金卷', trigger: 'change' } ],
+        auditLive: [ { required: true, message: '请选择状态', trigger: 'change' } ],
+        auditLiveProduct: [ { required: true, message: '请选择状态', trigger: 'change' } ],
+        score: [ { required: true, message: '请选择商家评分', trigger: 'change' } ],
+        monthlySales: [ { required: true, message: '请输入商家月售额', trigger: 'trigger' } ],
+        // advertisement: [ { required: true, message: '请上传广告图', trigger: 'trigger' } ],
+        // classificationArr: [ { required: true, type: 'array', message: '请选择分类' } ],
+        areaId: [ { required: true, message: '请选择地址', trigger: 'blur' } ],
+        longitude: [ { required: true, message: '请选择商家经纬度', trigger: 'blur' } ],
+        isBeeCoin: [ { required: true, message: '请选择是否支持消费金' } ],
+        beeCoinRatio: []
+      },
+      uploadUrl,
+      categoryList: []
+    }
+  },
+  watch: {
+    'formData.isBeeCoin': {
+      deep: true,
+      handler(val) {
+        if (val === 1) {
+          this.formRules.beeCoinRatio = [
+            { required: true, message: '请输入商家消费金提现比例' },
+            { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+          ]
+        } else {
+          this.formRules.beeCoinRatio = []
+        }
+      }
+    }
+  },
+  created() {
+    this.getCategoryTreeList()
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    async getCategoryTreeList() {
+      const res = await businessClassList({ page: 1, pageSize: 9999 })
+      XeUtils.eachTree(res.data, (item) => {
+        if (Array.isArray(item.childs) && item.childs.length === 0) {
+          item.childs = undefined
+        }
+      }, { children: 'childs' })
+      this.categoryList = res.data
+    },
+    initList() {
+    },
+    handleOpen(params = {}) {
+      this.modalOptions.title = params.shopId ? '修改商家' : '新增商家'
+      this.formData = Object.assign(this.$options.data().formData, params, {
+        advertisement: params.advertisement ? params.advertisement.split(',').map((item) => ({ url: item, uid: item + Math.random() + new Date() })) : []
+      })
+      const categoryItem = XeUtils.findTree(this.categoryList, (item) => item.id === String(params.classificationId))
+      if (categoryItem && Array.isArray(categoryItem.nodes)) {
+        this.formData.classificationArr = categoryItem.nodes.map((v) => v.id)
+      }
+      this.visible = true
+      this.initList()
+      if (params.shopId) {
+        this.getInfo(params.shopId)
+      } else {
+        this.$refs.formData && this.$refs.formData.resetFields()
+      }
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await businessListGetById({ shopId: id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          shopId: res.data.shopId || '',
+          advertisement: res.data.advertisement ? res.data.advertisement.split(',').map((item) => ({ url: item, uid: item + Math.random() + new Date() })) : []
+        })
+        const categoryItem = XeUtils.findTree(this.categoryList, (item) => item.id === String(res.data.classificationId))
+        if (categoryItem && Array.isArray(categoryItem.nodes)) {
+          this.formData.classificationArr = categoryItem.nodes.map((v) => v.id)
+        }
+        this.$nextTick(() => {
+          this.$refs.formData && this.$refs.formData.validate()
+        })
+      } finally {
+        loading.close()
+      }
+    },
+    handleSubmit() {
+      this.$refs.formData.validate(async (valid) => {
+        if (valid) {
+          const loading = this.$loading({ text: '加载中' })
+          try {
+            const { advertisement, classificationArr, ...otps } = this.formData
+            const params = {
+              ...otps,
+              advertisement: Array.isArray(advertisement) ? advertisement.map((v) => v.url || v).join(',') : '',
+              classificationId: Array.isArray(classificationArr) && classificationArr.length ? classificationArr[classificationArr.length - 1] : ''
+            }
+            this.formData.shopId ? await businessListUpdate(params) : await businessListSave(params)
+            loading.close()
+            this.$message({ message: `${this.formData.shopId ? '编辑' : '添加'}成功!`, type: 'success' })
+            this.$emit('success')
+            this.visible = false
+          } catch (e) {
+            loading.close()
+          } finally {
+            loading.close()
+          }
+        } else {
+          this.$message({ message: '请输入相关信息', type: 'warning' })
+          return false
+        }
+      })
+    }
+  }
+}
+</script>

+ 348 - 0
src/views/business/businessList/index copy.vue

@@ -0,0 +1,348 @@
+<!--  -->
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input
+        v-model="listQuery.shopName" clearable size="mini" class="filter-item"
+        style="width: 200px;"
+        placeholder="请输入店铺名称"
+      />
+      <el-input
+        v-model="listQuery.shopCode" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请输入店铺编码"
+      />
+      <el-input
+        v-model="listQuery.chargePersonName" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请输入负责人"
+      />
+      <el-select
+        v-model="listQuery.contractState" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请选择合同状态"
+      >
+        <el-option label="有效" :value="1" />
+        <el-option label="无效" :value="0" />
+      </el-select>
+      <el-button
+        size="mini" class="filter-item" type="primary" icon="el-icon-search"
+        style="margin-left:10px;"
+        @click="handleSearch"
+      >
+        查找
+      </el-button>
+      <br />
+      <el-button
+        size="mini" type="primary" icon="el-icon-plus"
+        @click="$refs.EditModal && $refs.EditModal.handleOpen({ shopId: '' })"
+      >
+        新建商家
+      </el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <div v-tableHeight>
+      <el-table
+        v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
+        v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+      >
+        <el-table-column label="店铺名称" width="220">
+          <template slot-scope="scope">{{ scope.row.shopName }}</template>
+        </el-table-column>
+        <el-table-column prop="shopCode" label="店铺编码" />
+        <el-table-column label="是否支持消费金">
+          <template slot-scope="scope">
+            <span v-if="scope.row.isBeeCoin === 1">支持</span>
+            <span v-else-if="scope.row.isBeeCoin === 2">不支持</span>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column align="center" min-width="120" label="商家消费金提现比例" prop="beecoinRatio">
+          <template slot-scope="{ row }">
+          <span v-if="row.beeCoinRatio">{{ row.beeCoinRatio }}:1</span>
+          <span v-else>--</span>
+          </template>
+          </el-table-column> -->
+        <el-table-column prop="chargePersonName" label="负责人" />
+        <el-table-column prop="chargePersonPhone" label="联系电话" />
+        <el-table-column label="合同状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.contractState === 0">无效</span>
+            <span v-if="scope.row.contractState === 1">有效</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="createTime" label="创建时间" />
+        <el-table-column label="操作" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div class="btnList">
+              <el-button type="text" @click="seeMore(scope.row)">
+                查看
+              </el-button>
+              <el-button type="text" @click="edit(scope.row)">
+                编辑
+              </el-button>
+              <el-button v-if="scope.row.state == 1" type="text" @click="del(scope.row)">
+                禁用
+              </el-button>
+              <el-button v-else type="text" @click="del(scope.row)">
+                启用
+              </el-button>
+              <el-button type="text" @click="delBusiness(scope.row)">
+                删除
+              </el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div>
+      <el-pagination
+        :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total"
+        @size-change="(val) => ((listQuery.pageSize = val) && getList())"
+        @current-change="(val) => ((listQuery.page = val) && getList())"
+      />
+    </div>
+
+    <!-- 新增编辑 -->
+    <EditModal ref="EditModal" @success="getList" />
+    <!-- 查看详情 -->
+    <DetailModal ref="DetailModal" />
+  </div>
+</template>
+
+<script>
+import EditModal from './components/EditModal'
+import DetailModal from './components/DetailModal'
+import {
+  businessListGetAll,
+  businessListGetById,
+  businessListStart,
+  delBusinessById
+} from '@/api/business'
+import { getProvinceList, getChildAreaList } from '@/api/address'
+
+export default {
+  name: 'BusinessList',
+  components: {
+    EditModal,
+    DetailModal
+  },
+  data() {
+    // 这里存放数据
+    return {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        pageSize: 20,
+        shopName: '', // 店铺名称
+        shopCode: '', // 店铺编码
+        chargePersonName: '', // 店铺负责人
+        contractState: '', // 合同状态 1-有效 0-无效
+        shopType: 2
+      },
+      areaData: {
+        lazy: true,
+        label: 'name',
+        value: 'id',
+        lazyLoad(node, resolve) {
+          const { level, value } = node
+          if (level === 0) {
+            getProvinceList().then((res) => {
+              resolve(res.data)
+            })
+          } else if (level != 0) {
+            getChildAreaList(value).then((res) => {
+              resolve(res.data.map((item) => {
+                item.leaf = level === 3
+                return item
+              }))
+            })
+          }
+        }
+      },
+      // 新建商家弹框
+      dialogVisible: false,
+      isEdit: false, // 是否是编辑
+      activeName: 'first',
+      disabled: false,
+      ruleForm: {
+        shopName: '', // 店铺名称
+        isBeeCoin: '', // 是否支持消费金
+        beeCoinRatio: '', // 商家消费金提现比例
+        chargePersonName: '', // 店铺负责人
+        chargePersonPhone: '', // 负责人电话
+        shopType: 2, // 店铺类型 1商城 2本地
+        isVoucher: 1, // 是否支持代金卷 1 true 2 false
+        shopAdress: '', // 地址
+        effectiveDate: '', // 生效日期
+        effectiveYear: '', // 生效年限
+        contractState: 1, // 合同状态 1-有效 0-无效
+        hsbMrchId: '',  // 惠市宝商家编号,不是必填
+        auditLive: 1,
+        auditLiveProduct: 1,
+        shopPhone: '', // 账号
+        shopPassword: '', // 密码
+        perCapita: '', // 人均
+        score: 5, // 评分
+        advertisement: '',
+        classificationId: null, // 商家分类id
+        startTime: '',
+        endTime: '',
+        shopBrief: '' // 商家簡介
+      },
+      rules: {
+        shopPhone: [
+          { required: true, message: '请输入账号', trigger: 'blur' },
+          { pattern: /^1[3456789]\d{9}$/, message: '目前只支持中国大陆的手机号码' }
+        ],
+        shopPassword: [
+          { required: true, message: '请输入密码', trigger: 'blur' },
+          { pattern: /^[~!@#$%^&*\-+=_.0-9a-zA-Z]{8,16}$/, message: '8-16密码数字英文混合' }
+        ]
+      },
+      currentPage: 1,
+      userState: 1
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await businessListGetAll(this.listQuery)
+        this.list = res.data.list
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    // 查看
+    async seeMore(row) {
+      const res = await businessListGetById({ shopId: row.shopId })
+      if (res.code === '') {
+        this.userState = 3
+        this.disabled = true
+        this.ruleForm = res.data
+        this.dialogVisible = true
+        this.initShopClassPath(this.ruleForm.classificationId)
+        this.ruleForm.voucherReturn *= 1
+        const advertisementStr = this.ruleForm.advertisement
+        if (advertisementStr && typeof advertisementStr === 'string') {
+          this.advertisementList = advertisementStr.split(',').map((item) => ({
+            url: item,
+            uid: item + Math.random() + new Date()
+          }))
+        }
+      }
+    },
+    // 删除
+    async del(row) {
+      console.log(row)
+      if (row.state === 1) {
+        const res = await businessListStart({
+          shopName: row.shopName,
+          state: 0,
+          shopId: row.shopId
+        })
+        if (res.code === '') {
+          this.$message({
+            message: '停用成功',
+            type: 'success'
+          })
+          this.getList()
+        }
+      } else {
+        const res = await businessListStart({
+          shopName: row.shopName,
+          state: 1,
+          shopId: row.shopId
+        })
+        if (res.code === '') {
+          this.$message({
+            message: '启用成功',
+            type: 'success'
+          })
+          this.getList()
+        }
+      }
+    },
+    delBusiness(row) {
+      this.$confirm('此操作将永久删除该商家, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await delBusinessById({
+          shopId: row.shopId
+        })
+        if (res.code === '') {
+          this.$message({
+            message: '操作成功',
+            type: 'success'
+          })
+          this.getList()
+        }
+      })
+    },
+
+    // 获取省数据
+    handleCascaderChange() {
+      const checkedNode = this.$refs.cascaderRef.getCheckedNodes()
+      const nodeData = checkedNode[0].data
+      this.ruleForm.areaId = nodeData.id
+    },
+
+    // 获取路径信息
+    initShopClassPath(classId) {
+      const allLevelThereList = []
+      this.allShopCategoryList.forEach((item) => {
+        item.childs.forEach((item1) => {
+          allLevelThereList.push(...item1.childs)
+        })
+      })
+      const currentClassInfo = allLevelThereList.find((item) => item.levelId.includes(classId))
+      if (currentClassInfo) {
+        this.ruleForm.classificationId = currentClassInfo.levelId.slice(1).split('/')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-container {
+	padding: 20px;
+	display: flex;
+	flex-direction: column;
+
+	.filter-container {
+		.filter-item {
+			display: inline-block;
+			vertical-align: middle;
+			margin-bottom: 10px;
+		}
+	}
+
+	.small-padding {
+		.cell {
+			padding-left: 5px;
+			padding-right: 5px;
+		}
+	}
+
+	.fixed-width {
+		.el-button--mini {
+			padding: 7px 10px;
+		}
+	}
+}
+</style>

+ 9 - 4
src/views/commissionAllocation/gradeCommission/components/DetailModal.vue

@@ -35,16 +35,21 @@
         <span v-else>--</span>
       </el-form-item>
       <el-form-item label="直接团长规则" prop="leadersMoney">
-        {{ formData.leadersMoney || '--' }}
+        {{ formData.leadersMoney }}
       </el-form-item>
       <el-form-item label="间接团长规则" prop="leadersInMoney">
-        {{ formData.leadersInMoney || '--' }}
+        {{ formData.leadersInMoney }}
+      </el-form-item>
+      <el-form-item label="合伙人规则" prop="partnerRule">
+        <span v-if="formData.partnerRule === 1">比例</span>
+        <span v-else-if="formData.partnerRule === 2">金额</span>
+        <span v-else>--</span>
       </el-form-item>
       <el-form-item label="直接合伙人规则" prop="partnerMoney">
-        {{ formData.partnerMoney || '--' }}
+        {{ formData.partnerMoney }}
       </el-form-item>
       <el-form-item label="间接合伙人规则" prop="partnerInMoney">
-        {{ formData.partnerInMoney || '--' }}
+        {{ formData.partnerInMoney }}
       </el-form-item>
       <el-form-item label="分佣来源" prop="sourceType">
         <span v-if="formData.sourceType === 1">订单金额</span>

+ 96 - 0
src/views/marketingManagement/voucherConfiguration/components/DetailModal.vue

@@ -0,0 +1,96 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      size="mini"
+      label-position="left"
+      label-suffix=":"
+      label-width="200px"
+    >
+      <!-- 代金券信息 -->
+      <el-form-item label="ID" prop="platformVoucherId">
+        {{ formData.platformVoucherId || '--' }}
+      </el-form-item>
+      <el-form-item label="代金券代码" prop="voucherCode">
+        {{ formData.voucherCode || '--' }}
+      </el-form-item>
+      <el-form-item label="代金券名称" prop="voucherName">
+        {{ formData.voucherName || '--' }}
+      </el-form-item>
+      <el-form-item label="代金券购买比例" prop="purchaseRatio">
+        {{ formData.purchaseRatio || '--' }}:1
+      </el-form-item>
+      <el-form-item label="代金券抵扣比例" prop="paymentRatio">
+        {{ formData.paymentRatio || '--' }}:1
+      </el-form-item>
+      <el-form-item label="状态" prop="enabled">
+        <span v-if="formData.enabled === 0">正常</span>
+        <span v-else-if="formData.enabled === 1">暂停</span>
+        <span v-else>--</span>
+      </el-form-item>
+      <el-form-item label="平台操作者ID" prop="operatorId">
+        {{ formData.operatorId || '--' }}
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        {{ formData.createTime || '--' }}
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+
+export default {
+  name: 'DetailModal',
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '800px',
+        title: '查看代金券详情'
+      },
+      visible: false,
+      formData: {
+        platformVoucherId: '',
+        voucherCode: '', // 代金券代码(唯一)
+        voucherName: '', // 代金券名称
+        desc: '', // 代金券描述
+        purchaseRatio: '', // 代金券购买比例(与现金比例)
+        paymentRatio: '', // 代金券抵扣比例(与现金比例)
+        enabled: '', // 启停:0-为启用  1-为停用
+        operatorId: '', // 平台操作者ID
+        createTime: '',
+        updateTime: ''
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    handleOpen(params = {}) {
+      this.formData = Object.assign(this.$options.data().formData, params)
+      if (params.platformVoucherId) {
+        // this.getInfo(params.platformVoucherId)
+      }
+      this.visible = true
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await xxx({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          platformVoucherId: res.data.platformVoucherId || ''
+        })
+      } finally {
+        loading.close()
+      }
+    }
+  }
+}
+</script>
+

+ 154 - 0
src/views/marketingManagement/voucherConfiguration/components/EditModal.vue

@@ -0,0 +1,154 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      :rules="formRules"
+      size="mini"
+      label-suffix=":"
+      label-width="150px"
+    >
+      <el-form-item label="代金券名称" prop="voucherName">
+        <el-input v-model="formData.voucherName" placeholder="请输入代金券名称" maxlength="30" show-word-limit />
+      </el-form-item>
+      <el-form-item label="代金券描述" prop="desc">
+        <el-input v-model="formData.desc" type="textarea" placeholder="请输入代金券描述" maxlength="520" :rows="3" show-word-limit />
+      </el-form-item>
+      <el-form-item label="代金券购买比例(与现金比例)" prop="purchaseRatio">
+        <el-input v-model="formData.purchaseRatio" placeholder="请输入代金券购买比例" style="width: 250px;">
+          <template #append>
+            <div>:1</div>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="代金券抵扣比例(与现金比例)" prop="paymentRatio">
+        <el-input v-model="formData.purchaseRatio" placeholder="请输入代金券抵扣比例" style="width: 250px;">
+          <template #append>
+            <div>:1</div>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="状态" prop="enabled">
+        <el-select v-model="formData.enabled" size="mini" placeholder="请选择任务状态">
+          <el-option label="启用" :value="0" />
+          <el-option label="停用" :value="1" />
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="handleClose">取 消</el-button>
+        <el-button type="primary" size="mini" @click="handleSubmit">确 定</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { savePlatformVoucher, updatePlatformVoucher } from '@/api/timedTasksManagement/timedTasksList'
+
+export default {
+  name: 'EditModal',
+  components: {
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '820px',
+        title: ''
+      },
+      visible: false,
+      formData: {
+        platformVoucherId: '',
+        voucherCode: '', // 代金券代码(唯一)
+        voucherName: '', // 代金券名称
+        desc: '', // 代金券描述
+        purchaseRatio: '', // 代金券购买比例(与现金比例)
+        paymentRatio: '', // 代金券抵扣比例(与现金比例)
+        enabled: '', // 启停:0-为启用  1-为停用
+        operatorId: '', // 平台操作者ID
+        createTime: '',
+        updateTime: ''
+      },
+      formRules: {
+        voucherName: [
+          { required: true, message: '请输入代金券名称' }
+        ],
+        purchaseRatio: [
+          { required: false, message: '请输入参与值' },
+          { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+        ],
+        paymentRatio: [
+          { required: false, message: '请输入参与值' },
+          { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+        ],
+        enabled: [
+          { required: true, message: '请选择状态' }
+        ]
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    initList() {
+    },
+    handleOpen(params = {}) {
+      this.modalOptions.title = params.platformVoucherId ? '编辑代金券' : '添加代金券'
+      this.formData = Object.assign(this.$options.data().formData, params)
+      this.visible = true
+      this.initList()
+      if (params.platformVoucherId) {
+        // this.getInfo(params.platformVoucherId)
+      } else {
+        this.$refs.formData && this.$refs.formData.resetFields()
+      }
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await xxx({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          platformVoucherId: res.data.platformVoucherId || ''
+        })
+        this.$nextTick(() => {
+          this.$refs.formData && this.$refs.formData.validate()
+        })
+      } finally {
+        loading.close()
+      }
+    },
+    handleSubmit() {
+      this.$refs.formData.validate(async (valid) => {
+        if (valid) {
+          const loading = this.$loading({ text: '加载中' })
+          try {
+            const { ...otps } = this.formData
+            const params = {
+              ...otps
+            }
+            this.formData.platformVoucherId ? await updatePlatformVoucher(params) : await savePlatformVoucher(params)
+            loading.close()
+            this.$message({ message: `${this.formData.platformVoucherId ? '编辑' : '添加'}成功!`, type: 'success' })
+            this.$emit('success')
+            this.visible = false
+          } catch (e) {
+            loading.close()
+          } finally {
+            loading.close()
+          }
+        } else {
+          this.$message({ message: '请输入相关信息', type: 'warning' })
+          return false
+        }
+      })
+    }
+  }
+}
+</script>
+

+ 172 - 0
src/views/marketingManagement/voucherConfiguration/index.vue

@@ -0,0 +1,172 @@
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input
+        v-model="listQuery.voucherName" clearable size="mini" class="filter-item"
+        style="width: 200px;" placeholder="请输入代金券代码"
+      />
+      <el-input
+        v-model="listQuery.voucherName" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请输入代金券名称"
+      />
+      <el-button
+        size="mini" class="filter-item" type="primary" icon="el-icon-search"
+        style="margin-left:10px;"
+        @click="handleSearch"
+      >
+        查找
+      </el-button>
+      <br />
+      <el-button
+        size="mini" type="primary" icon="el-icon-plus"
+        @click="$refs.EditModal && $refs.EditModal.handleOpen({ platformVoucherId: '' })"
+      >
+        添加
+      </el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <div v-tableHeight>
+      <el-table
+        v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
+        v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+      >
+        <el-table-column align="center" width="100" label="ID" prop="platformVoucherId" fixed="left" />
+        <el-table-column align="center" width="150" label="代金券代码" prop="voucherCode" show-overflow-tooltip />
+        <el-table-column align="center" width="100" label="代金券名称" prop="voucherName" show-overflow-tooltip />
+        <el-table-column align="center" width="200" label="代金券描述" prop="desc" show-overflow-tooltip />
+        <el-table-column align="center" label="代金券购买比例" prop="purchaseRatio">
+          <template slot-scope="{ row }">
+            <span>{{ row.purchaseRatio }}:1</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="代金券抵扣比例" prop="paymentRatio">
+          <template slot-scope="{ row }">
+            <span>{{ row.paymentRatio }}:1</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="状态" prop="status">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.status === 0" effect="plain">启用</el-tag>
+            <el-tag v-else-if="row.status === 1" effect="plain" type="danger">停用</el-tag>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="150" label="平台操作者ID" prop="operatorId" />
+        <el-table-column align="center" width="150" label="创建时间" prop="createTime" />
+        <el-table-column align="center" label="操作" width="300" fixed="right" class-name="small-padding fixed-width">
+          <template slot-scope="{ row }">
+            <el-button size="mini" @click="handleDetail(row)">
+              查看
+            </el-button>
+            <el-button type="danger" size="mini" @click="handleDelete(row)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div>
+      <el-pagination
+        :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total"
+        @size-change="(val) => ((listQuery.pageSize = val) && getList())"
+        @current-change="(val) => ((listQuery.page = val) && getList())"
+      />
+    </div>
+
+    <!-- 新增编辑 -->
+    <EditModal ref="EditModal" @success="getList" />
+    <!-- 查看详情 -->
+    <DetailModal ref="DetailModal" />
+  </div>
+</template>
+
+<script>
+import EditModal from './components/EditModal'
+import DetailModal from './components/DetailModal'
+import { getAllPlatformVoucher, deletePlatformVoucherById } from '@/api/marketingManagement/voucherConfiguration'
+
+export default {
+  name: 'VoucherConfiguration',
+  components: {
+    EditModal,
+    DetailModal
+  },
+  data() {
+    return {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        pageSize: 20,
+        voucherName: '',
+        voucherCode: ''
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await getAllPlatformVoucher(this.listQuery)
+        this.list = res.data.items
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    handleDetail(row) {
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
+    },
+    handleDelete(row) {
+      this.$confirm('确定删除此项?')
+        .then(async () => {
+          await deletePlatformVoucherById({ id: row.composeId })
+          this.$message({ message: '删除成功!', type: 'success' })
+          this.handleSearch()
+        })
+        .catch(() => { })
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.app-container {
+	padding: 20px;
+	display: flex;
+	flex-direction: column;
+
+	.filter-container {
+		.filter-item {
+			display: inline-block;
+			vertical-align: middle;
+			margin-bottom: 10px;
+		}
+	}
+
+	.small-padding {
+		.cell {
+			padding-left: 5px;
+			padding-right: 5px;
+		}
+	}
+
+	.fixed-width {
+		.el-button--mini {
+			padding: 7px 10px;
+		}
+	}
+}
+</style>

+ 1 - 0
src/views/setup/timedTasksList/components/EditModal.vue

@@ -111,6 +111,7 @@ export default {
     },
     handleOpen(params = {}) {
       this.modalOptions.title = params.jobId ? '编辑定时任务' : '添加定时任务'
+      this.formData = Object.assign(this.$options.data().formData, params)
       this.visible = true
       this.initList()
       if (params.jobId) {

+ 1 - 1
src/views/setup/timedTasksList/index.vue

@@ -76,7 +76,7 @@
     <!-- 新增编辑 -->
     <EditModal ref="EditModal" @success="getList" />
     <!-- 查看详情 -->
-    <DetailModal ref="DetailModal" @success="getList" />
+    <DetailModal ref="DetailModal" />
   </div>
 </template>
 

+ 6 - 9
vue.config.js

@@ -42,27 +42,24 @@ module.exports = {
     // before: require('./mock/mock-server.js'),
     proxy: {
       '/api': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
-        // target: 'http://192.168.0.91:9103', // 平台端
-        // target: 'http://192.168.0.91:9003', // 商家端
+        // target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'http://192.168.0.91:9103', // 平台端
         changeOrigin: true,
         pathRewrite: {
           '^/api': ''
         }
       },
       '/adminapi': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
-        // target: 'http://192.168.0.91:9103', // 平台端
-        // target: 'http://192.168.0.91:9003', // 商家端
+        // target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'http://192.168.0.91:9103', // 平台端
         changeOrigin: true,
         pathRewrite: {
           '^/adminapi': ''
         }
       },
       '/': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
-        // target: 'http://192.168.0.91:9103', // 平台端
-        // target: 'http://192.168.0.91:9003', // 商家端
+        // target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'http://192.168.0.91:9103', // 平台端
         changeOrigin: true
       }
     }

部分文件因为文件数量过多而无法显示