diff --git a/src/api/mch/vipLevel.js b/src/api/mch/vipLevel.js new file mode 100644 index 0000000..b1b98cd --- /dev/null +++ b/src/api/mch/vipLevel.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +export function mchListVipLevel(params) { + return request({ + url: "/mch/vipLevel/list", + method: 'get', + params + }) +} + +export function mchGetVipLevel(id) { + return request({ + url: `/mch/vipLevel/${id}`, + method: 'get' + }) +} + +export function mchAddVipLevel(data) { + return request({ + url: '/mch/vipLevel', + method: 'post', + data + }) +} + +export function mchUpdateVipLevel(data) { + return request({ + url: '/mch/vipLevel', + method: 'put', + data + }) +} + +export function mchDeleteVipLevel(ids) { + return request({ + url: `/mch/vipLevel/${ids}`, + method: 'delete' + }) +} diff --git a/src/api/ss/vip.js b/src/api/ss/vip.js new file mode 100644 index 0000000..35c3de5 --- /dev/null +++ b/src/api/ss/vip.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询会员列表 +export function listVip(query) { + return request({ + url: '/ss/vip/list', + method: 'get', + params: query + }) +} + +// 查询会员详细 +export function getVip(id) { + return request({ + url: '/ss/vip/' + id, + method: 'get' + }) +} + +// 新增会员 +export function addVip(data) { + return request({ + url: '/ss/vip', + method: 'post', + data: data + }) +} + +// 修改会员 +export function updateVip(data) { + return request({ + url: '/ss/vip', + method: 'put', + data: data + }) +} + +// 删除会员 +export function delVip(id) { + return request({ + url: '/ss/vip/' + id, + method: 'delete' + }) +} diff --git a/src/api/ss/vipLevel.js b/src/api/ss/vipLevel.js new file mode 100644 index 0000000..e95c7b9 --- /dev/null +++ b/src/api/ss/vipLevel.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询会员等级列表 +export function listVipLevel(query) { + return request({ + url: '/ss/vipLevel/list', + method: 'get', + params: query + }) +} + +// 查询会员等级列表 +export function listVipLevelByIds(ids) { + return request({ + url: '/ss/vipLevel/listByIds', + method: 'post', + data: ids + }) +} + +// 查询会员等级详细 +export function getVipLevel(id) { + return request({ + url: '/ss/vipLevel/' + id, + method: 'get' + }) +} + +// 新增会员等级 +export function addVipLevel(data) { + return request({ + url: '/ss/vipLevel', + method: 'post', + data: data + }) +} + +// 修改会员等级 +export function updateVipLevel(data) { + return request({ + url: '/ss/vipLevel', + method: 'put', + data: data + }) +} + +// 删除会员等级 +export function delVipLevel(id) { + return request({ + url: '/ss/vipLevel/' + id, + method: 'delete' + }) +} diff --git a/src/assets/icons/svg/vip.svg b/src/assets/icons/svg/vip.svg new file mode 100644 index 0000000..0e0f589 --- /dev/null +++ b/src/assets/icons/svg/vip.svg @@ -0,0 +1 @@ + diff --git a/src/components/BooleanTag/index.vue b/src/components/BooleanTag/index.vue index a6b6045..e0aaeab 100644 --- a/src/components/BooleanTag/index.vue +++ b/src/components/BooleanTag/index.vue @@ -1,5 +1,5 @@ diff --git a/src/components/Business/VipLevel/VipLevelInput.vue b/src/components/Business/VipLevel/VipLevelInput.vue new file mode 100644 index 0000000..0025e56 --- /dev/null +++ b/src/components/Business/VipLevel/VipLevelInput.vue @@ -0,0 +1,199 @@ + + + + + + diff --git a/src/router/mchRouter.js b/src/router/mchRouter.js index e06e524..55ee55b 100644 --- a/src/router/mchRouter.js +++ b/src/router/mchRouter.js @@ -59,6 +59,40 @@ export const mchRoutes = [ }, ] }, + { + path: '/sale', + component: Layout, + hidden: false, + alwaysShow: true, + meta: { + title: '营销活动管理', + icon: 'shopping', + }, + children: [ + { + path: 'vipLevel', + component: () => import('@/views/mch/vipLevel'), + hidden: false, + name: "MchVipLevel", + meta: { + noCache: false, + title: '会员等级', + icon: 'chart', + } + }, + { + path: 'vip', + component: () => import('@/views/mch/vip'), + hidden: false, + name: "MchVip", + meta: { + noCache: false, + title: '会员列表', + icon: 'vip', + } + }, + ] + }, { path: '/device', component: Layout, diff --git a/src/utils/constants.js b/src/utils/constants.js index 1a879a5..6b1dfff 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -283,3 +283,9 @@ export const TransactionBillType = { RECHARGE: "1", // 充值 WITHDRAW: "2", // 提现 } + +// VIP有效期类型 +export const VipExpireType = { + FOREVER: "1", // 永久有效 + TIME: "2", // 有效期 +} diff --git a/src/utils/mixins.js b/src/utils/mixins.js index e0792f0..a699b1b 100644 --- a/src/utils/mixins.js +++ b/src/utils/mixins.js @@ -9,6 +9,7 @@ import { views } from '@/utils/constants' import { mapGetters } from 'vuex' +import { addVip, getVip, updateVip } from '@/api/ss/vip' export const $view = { props: { @@ -52,10 +53,27 @@ export const $view = { /** * 显隐列 **/ + export const $showColumns = { + props: { + // 隐藏的列 + hideColumns: { + type: Array, + default: () => { + return [] + } + }, + // 隐藏的查询 + hideSearch: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { - columns: [] + columns: [], } }, computed: { @@ -76,10 +94,19 @@ export const $showColumns = { } }, methods: { - /** - * 隐藏某些列 - * @param columns - */ + // 是否展示查询 + visibleSearch(key) { + return this.visibleColumn(key) && !this.hideSearch.includes(key); + }, + // 是否展示列 + visibleColumn(key) { + return !this.hideColumns.includes(key); + }, + // 初始化列 + initColumns() { + this.hideColumn(this.hideColumns); + }, + // 隐藏列 hideColumn(columns) { if (this.columns != null) { this.columns.filter(item => columns.includes(item.key)) @@ -88,10 +115,7 @@ export const $showColumns = { }) } }, - /** - * 删除某些列 - * @param columns - */ + // 删除列 removeColumn(columns) { if (columns != null) { columns.forEach(column => { @@ -192,3 +216,67 @@ export const $smRoles = { }, }, } + +/** + * 编辑弹窗 + */ +export const $editDialog = { + props: { + show: { + type: Boolean, + default: false + }, + id: { + type: String, + default: null, + }, + rules: { + type: Object, + default: () => ({}) + } + }, + data() { + return { + title: null, + form: {} + } + }, + computed: { + open: { + set(val) { + this.$emit('update:show', val); + }, + get() { + return this.show; + } + }, + }, + methods: { + // 取消按钮 + cancel() { + this.open = false; + }, + // open事件处理 + onOpen(){ + if (this.id == null) { + this.reset(); + } else { + this.getDetail(); + } + }, + // 需要实现 获取明细 + getDetail() { + }, + // 需要实现 表单重置 + reset() { + this.title = "新增"; + this.form = { + expireType: '1', + }; + this.resetForm("form"); + }, + /** 需要实现 提交按钮 */ + submitForm() { + }, + } +} diff --git a/src/views/dashboard/component/TodoList.vue b/src/views/dashboard/component/TodoList.vue index eb9683d..f6a556c 100644 --- a/src/views/dashboard/component/TodoList.vue +++ b/src/views/dashboard/component/TodoList.vue @@ -1,6 +1,6 @@ diff --git a/src/views/ss/storeApply/component/ChangeField.vue b/src/views/ss/storeApply/component/ChangeField.vue index d0e796e..d9c99d7 100644 --- a/src/views/ss/storeApply/component/ChangeField.vue +++ b/src/views/ss/storeApply/component/ChangeField.vue @@ -1,5 +1,5 @@ diff --git a/src/views/ss/storeApply/detail.vue b/src/views/ss/storeApply/detail.vue index 02e37ce..42dac40 100644 --- a/src/views/ss/storeApply/detail.vue +++ b/src/views/ss/storeApply/detail.vue @@ -45,7 +45,7 @@ + + diff --git a/src/views/ss/vip/components/VipEditDialog.vue b/src/views/ss/vip/components/VipEditDialog.vue new file mode 100644 index 0000000..1ad1836 --- /dev/null +++ b/src/views/ss/vip/components/VipEditDialog.vue @@ -0,0 +1,139 @@ + + + diff --git a/src/views/ss/vip/components/VipTable.vue b/src/views/ss/vip/components/VipTable.vue new file mode 100644 index 0000000..f4825cf --- /dev/null +++ b/src/views/ss/vip/components/VipTable.vue @@ -0,0 +1,163 @@ + + diff --git a/src/views/ss/vip/index.vue b/src/views/ss/vip/index.vue new file mode 100644 index 0000000..92a4145 --- /dev/null +++ b/src/views/ss/vip/index.vue @@ -0,0 +1,121 @@ + + + diff --git a/src/views/ss/vipLevel/components/VipLevelEditDialog.vue b/src/views/ss/vipLevel/components/VipLevelEditDialog.vue new file mode 100644 index 0000000..6d781b2 --- /dev/null +++ b/src/views/ss/vipLevel/components/VipLevelEditDialog.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/views/ss/vipLevel/components/VipLevelTable.vue b/src/views/ss/vipLevel/components/VipLevelTable.vue new file mode 100644 index 0000000..095e2d1 --- /dev/null +++ b/src/views/ss/vipLevel/components/VipLevelTable.vue @@ -0,0 +1,170 @@ + + diff --git a/src/views/ss/vipLevel/index.vue b/src/views/ss/vipLevel/index.vue new file mode 100644 index 0000000..8bef577 --- /dev/null +++ b/src/views/ss/vipLevel/index.vue @@ -0,0 +1,119 @@ + + + diff --git a/src/views/system/channel/index.vue b/src/views/system/channel/index.vue index 14d55b3..d206829 100644 --- a/src/views/system/channel/index.vue +++ b/src/views/system/channel/index.vue @@ -50,14 +50,11 @@ - - - - - - - - + + + @@ -136,9 +133,9 @@ import ConfigDialog from '@/components/Business/Config/ConfigDialog.vue' export default { name: "Channel", - components: { ConfigDialog }, mixins: [$serviceType, $withdrawServiceType], - dicts: ['withdraw_service_type', 'service_type'], + dicts: ['withdraw_service_type', 'service_type', 'channel_platform'], + components: { ConfigDialog }, data() { return { showConfig: false,