diff --git a/src/api/giftGoods.js b/src/api/giftGoods.js index a7366c5..4741a88 100644 --- a/src/api/giftGoods.js +++ b/src/api/giftGoods.js @@ -300,12 +300,44 @@ export function tourismDetails(params) { }) } -// 营销管理-直推排行数据 -export function getMemberDirectPusht(params) { +// 营销管理-直推人数排行数据 +export function getMemberDirectPush(data) { return request({ - url: '/member/manager/member/get-member-direct-push', - method: 'get', - params + url: '/member/manage/member-statistics/topPeople', + method: 'post', + data + }) +} +// 营销管理-直推金额排行数据 +export function getMemberDirectPushAmount(data) { + return request({ + url: '/member/manage/member-statistics/topAmount', + method: 'post', + data + }) +} + +// params type setShowPeople setShowAmount +export function getMemberDirectPushSwitchStatus(type) { + return request({ + url: `member/manage/member-statistics/${type}`, + method: 'get' + }) +} + +// 直推人数排行开关 +export function setMemberDirectPush(flag) { + return request({ + url: `member/manage/member-statistics/setShowPeople/${flag}`, + method: 'get' + }) +} + +// 直推金额排行开关 +export function setMemberDirectPushAmount(flag) { + return request({ + url: `member/manage/member-statistics/setShowAmount/${flag}`, + method: 'get' }) } diff --git a/src/router/index.js b/src/router/index.js index ef3ee5d..21f3a0c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1928,6 +1928,7 @@ export const constantRoutes = [ } ] }, + { path: 'lotteryDetails', name: 'LotteryDetails', @@ -1941,33 +1942,6 @@ export const constantRoutes = [ } ] }, - { - path: 'rechargeCard', - name: 'RechargeCard', - component: ParentView, - children: [ - { - path: 'rechargeCardList', - name: 'RechargeCardList', - component: () => import('@/views/marketing/rechargeCard/index'), - meta: { title: '充值提货卡' } - }, - { - path: 'addRechargeCard', - name: 'addRechargeCard', - component: () => import('@/views/marketing/rechargeCard/addRechargeCard'), - meta: { title: '充值提货卡-添加' }, - hidden: true - }, - { - path: 'rechargeQc', - name: 'rechargeQc', - component: () => import('@/views/marketing/rechargeCard/rechargeQc'), - meta: { title: '充值提货卡-添加' }, - hidden: true - } - ] - }, { path: 'lottery', name: 'Lottery', @@ -2002,6 +1976,33 @@ export const constantRoutes = [ } ] }, + { + path: 'rechargeCard', + name: 'RechargeCard', + component: ParentView, + children: [ + { + path: 'rechargeCardList', + name: 'RechargeCardList', + component: () => import('@/views/marketing/rechargeCard/index'), + meta: { title: '充值提货卡' } + }, + { + path: 'addRechargeCard', + name: 'addRechargeCard', + component: () => import('@/views/marketing/rechargeCard/addRechargeCard'), + meta: { title: '充值提货卡-添加' }, + hidden: true + }, + { + path: 'rechargeQc', + name: 'rechargeQc', + component: () => import('@/views/marketing/rechargeCard/rechargeQc'), + meta: { title: '充值提货卡-添加' }, + hidden: true + } + ] + }, { path: 'directUpgrade', @@ -2023,6 +2024,34 @@ export const constantRoutes = [ } ] }, + { + path: 'directRanking', + name: 'DirectRanking', + component: ParentView, + meta: { title: '直推排行数据' }, + children: [ + { + path: 'directRankingList', + name: 'DirectRankingList', + component: () => import('@/views/marketing/directRanking/index'), + meta: { title: '直推人数排行数据' } + }, + { + path: 'directAmountRankingList', + name: 'DirectAmountRankingList', + component: () => import('@/views/marketing/directRanking/amount'), + meta: { title: '直推金额排行数据' }, + hidden: true + }, + { + path: 'directConfig', + name: 'DirectConfig', + component: () => import('@/views/marketing/directRanking/config'), + meta: { title: '直推配置' }, + hidden: true + } + ] + }, // { // path: 'benefitsGift', // name: 'BenefitsGift', @@ -2122,19 +2151,6 @@ export const constantRoutes = [ meta: { title: '旅游活动数据' } } ] - }, - { - path: 'directRanking', - name: 'DirectRanking', - component: ParentView, - children: [ - { - path: 'directRankingList', - name: 'DirectRankingList', - component: () => import('@/views/marketing/directRanking/index'), - meta: { title: '直推排行数据' } - } - ] } ] diff --git a/src/views/marketing/directGifts/addDirect.vue b/src/views/marketing/directGifts/addDirect.vue index fdbe81d..6a84cb2 100644 --- a/src/views/marketing/directGifts/addDirect.vue +++ b/src/views/marketing/directGifts/addDirect.vue @@ -204,6 +204,9 @@ export default { } }, methods: { + splitDate(date) { + return date.split(' ')[0] + }, getDetails() { api .recommendDetail({ @@ -223,13 +226,17 @@ export default { this.ruleForm.actEndDate = res.data.activityParam.actEndDate this.ruleForm.disStartDate = res.data.activityParam.disStartDate this.ruleForm.disEndDate = res.data.activityParam.disEndDate + const actStartDate = this.splitDate(res.data.activityParam.actStartDate) + const actEndDate = this.splitDate(res.data.activityParam.actEndDate) + const disStartDate = this.splitDate(res.data.activityParam.disStartDate) + const disEndDate = this.splitDate(res.data.activityParam.disEndDate) this.$set(this.ruleForm, 'ruleFormTime', [ - res.data.activityParam.actStartDate, - res.data.activityParam.actEndDate + actStartDate, + actEndDate ]) this.$set(this.ruleForm, 'ruleFormTime1', [ - res.data.activityParam.disStartDate, - res.data.activityParam.disEndDate + disStartDate, + disEndDate ]) const arr1 = [] const arr2 = [] @@ -267,12 +274,12 @@ export default { ) this.$set(this.ruleForm, 'actCover', this.addData.activityParam.actCover) this.$set(this.ruleForm, 'ruleFormTime', [ - this.addData.activityParam.actStartDate, - this.addData.activityParam.actEndDate + this.splitDate(this.addData.activityParam.actStartDate), + this.splitDate(this.addData.activityParam.actEndDate) ]) this.$set(this.ruleForm, 'ruleFormTime1', [ - this.addData.activityParam.disStartDate, - this.addData.activityParam.disEndDate + this.splitDate(this.addData.activityParam.disStartDate), + this.splitDate(this.addData.activityParam.disEndDate) ]) const arr1 = [] const arr2 = [] @@ -400,7 +407,13 @@ export default { {}, { controlType: this.controlType, - activityParam: this.ruleForm, + activityParam: { + ...this.ruleForm, + actStartDate: this.ruleForm.actStartDate + ' 00:00:00', + actEndDate: this.ruleForm.actEndDate + ' 23:59:59', + disStartDate: this.ruleForm.disStartDate + ' 00:00:00', + disEndDate: this.ruleForm.disEndDate + ' 23:59:59' + }, recommendUpgradeList: this.$refs.directUpdata.recommendUpgradeList, authorityList: this.$refs.directUpdata.form.waresAuthorityList diff --git a/src/views/marketing/directRanking/amount.vue b/src/views/marketing/directRanking/amount.vue new file mode 100644 index 0000000..7cc28a6 --- /dev/null +++ b/src/views/marketing/directRanking/amount.vue @@ -0,0 +1,288 @@ + + + + diff --git a/src/views/marketing/directRanking/config.vue b/src/views/marketing/directRanking/config.vue new file mode 100644 index 0000000..10b60e4 --- /dev/null +++ b/src/views/marketing/directRanking/config.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/views/marketing/directRanking/index.vue b/src/views/marketing/directRanking/index.vue index da441b5..d642299 100644 --- a/src/views/marketing/directRanking/index.vue +++ b/src/views/marketing/directRanking/index.vue @@ -2,171 +2,139 @@
+ />
- - - - - - + :clearable="false" + @change="changeTime" + /> - {{ '搜索' }} + {{ '搜索' }} {{ '重置' }}
-
-
- - {{ '导出' }} -
-
+
- + - - + - + /> - + /> - - - - - - + prop="numberOfPeople" + label="直推人数" + />
- + /> -->
- - - \ No newline at end of file diff --git a/src/views/marketing/directRanking/mixins.js b/src/views/marketing/directRanking/mixins.js new file mode 100644 index 0000000..5348d18 --- /dev/null +++ b/src/views/marketing/directRanking/mixins.js @@ -0,0 +1,48 @@ +import topBar from '@/components/topBarRole' +import { getRouters } from '@/api/settle' + +export default { + data() { + return { + topList: [ + { + name: '直推人数排行数据', + path: 'directRankingList', + url: 'DirectRankingList', + changed: false + }, + { + name: '直推金额排行数据', + path: 'directAmountRankingList', + url: 'DirectAmountRankingList', + changed: false + }, + { + name: '直推配置', + path: 'directConfig', + url: 'DirectConfig', + changed: false + } + ] + } + }, + components: { + topBar + }, + mounted() { + this.getUserRoute() + }, + methods: { + getUserRoute() { + getRouters().then((res) => { + res.data.forEach((item) => { + this.topList.forEach((items) => { + if (item.routeName === items.url) { + items.changed = true + } + }) + }) + }) + } + } +}