diff --git a/src/api/sylive/activity/index.js b/src/api/sylive/activity/index.js index 0810f30..2515511 100644 --- a/src/api/sylive/activity/index.js +++ b/src/api/sylive/activity/index.js @@ -14,6 +14,20 @@ export async function pageActivity(params) { return Promise.reject(new Error(res.data.message)); } +/** + * 获取活动信息 + * @param params 查询条件 + */ +export async function getActivityInfo(params) { + const res = await request.get('/sylive/activity/info', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + /** * 根据id查询活动 * @param id 活动id @@ -336,7 +350,7 @@ export async function getStatisticsStackedWatchOrder(params) { /** * 修改抽奖配置 - * @param data 活动信息 + * @param data 信息 */ export async function updateActivityDraw(data) { const res = await request.put('/sylive/activity/draw', data); @@ -345,3 +359,15 @@ export async function updateActivityDraw(data) { } return Promise.reject(new Error(res.data.message)); } + +/** + * 修改回访标签 + * @param data 信息 + */ +export async function updateActivityVisitTag(data) { + const res = await request.put('/sylive/activity/visit_tag', data); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/sylive/groups-customer/index.js b/src/api/sylive/groups-customer/index.js new file mode 100644 index 0000000..8f215f7 --- /dev/null +++ b/src/api/sylive/groups-customer/index.js @@ -0,0 +1,44 @@ +import request from '@/utils/request'; + +/** + * 查询订单列表 + * @param params 查询条件 + */ +export async function listGroupsCustomer(params) { + const res = await request.get('/sylive/groupsCustomer/', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 导出订单 + * @param params 查询条件 + */ +export async function exportGroupsCustomer(params) { + const res = await request.get('/sylive/groupsCustomer/export', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 导入用户 + * @param file excel文件 + */ +export async function importGroupsCustomer(file, activityId) { + const formData = new FormData(); + formData.append('file', file); + formData.append('activityId', activityId); + const res = await request.post('/sylive/groupsCustomer/import', formData); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/views/sylive/activity/components/activity-draw.vue b/src/views/sylive/activity/components/activity-draw.vue index 1950b10..c606610 100644 --- a/src/views/sylive/activity/components/activity-draw.vue +++ b/src/views/sylive/activity/components/activity-draw.vue @@ -80,7 +80,7 @@ - + @@ -151,6 +159,7 @@ import ActivityItem from './components/activity-item.vue'; import ActivityCoupon from './components/activity-coupon.vue'; import ActivityDraw from './components/activity-draw.vue'; + import ActivityVisitTag from './components/activity-visit-tag'; import { pageActivity, removeActivity, @@ -163,6 +172,7 @@ export default { name: 'syliveActivity', components: { + ActivityVisitTag, QrCode, ActivitySearch, ActivityEdit, @@ -254,6 +264,7 @@ showEditCoupon: false, // 是否显示编辑券弹窗 showEditDraw: false, + showEditVisitTag: false, // 是否显示二维码弹窗 showCode: false }; @@ -279,6 +290,12 @@ this.current = row.draw; this.current.activityId = row.activityId; this.showEditDraw = true; + } else if (command === 'visitTag') { + this.current = { + visitTag: row.visitTag, + activityId: row.activityId + }; + this.showEditVisitTag = true; } else if (command === 'goods') { this.$router.replace('/sylive/goods?id=' + row.activityId); } else if (command === 'groups') { @@ -327,6 +344,9 @@ } else if (command === 'exchange') { url = '/sylive/groups-exchange?id=' + row.activityId; this.$router.replace(url); + } else if (command === 'customer') { + url = '/sylive/groups-customer?id=' + row.activityId; + this.$router.replace(url); } else if (command === 'code') { this.current = row; this.showCode = true; diff --git a/src/views/sylive/goods/components/goods-edit.vue b/src/views/sylive/goods/components/goods-edit.vue index 03036cf..ced4b0e 100644 --- a/src/views/sylive/goods/components/goods-edit.vue +++ b/src/views/sylive/goods/components/goods-edit.vue @@ -80,7 +80,7 @@ class="ele-fluid" /> - + diff --git a/src/views/sylive/groups-customer/components/gro-customer-import.vue b/src/views/sylive/groups-customer/components/gro-customer-import.vue new file mode 100644 index 0000000..7672358 --- /dev/null +++ b/src/views/sylive/groups-customer/components/gro-customer-import.vue @@ -0,0 +1,101 @@ + + + + + + diff --git a/src/views/sylive/groups-customer/components/gro-customer-search.vue b/src/views/sylive/groups-customer/components/gro-customer-search.vue new file mode 100644 index 0000000..7ec9ca7 --- /dev/null +++ b/src/views/sylive/groups-customer/components/gro-customer-search.vue @@ -0,0 +1,164 @@ + + + + diff --git a/src/views/sylive/groups-customer/index.vue b/src/views/sylive/groups-customer/index.vue new file mode 100644 index 0000000..95e7c8e --- /dev/null +++ b/src/views/sylive/groups-customer/index.vue @@ -0,0 +1,255 @@ + + + diff --git a/src/views/sylive/groups-exchange/components/gro-exchange-detail.vue b/src/views/sylive/groups-exchange/components/gro-exchange-detail.vue index 1d6b4cb..3051724 100644 --- a/src/views/sylive/groups-exchange/components/gro-exchange-detail.vue +++ b/src/views/sylive/groups-exchange/components/gro-exchange-detail.vue @@ -42,6 +42,11 @@ {{ item.cfTime }} + +
+ {{ item.address }} +
+
import { importGroupsExchange } from '@/api/sylive/groups-exchange'; + import { API_BASE_URL } from '@/config/setting'; export default { props: { @@ -48,7 +49,7 @@ // 导入请求状态 loading: false, // 导入模板下载地址 - url: 'http://market.dev.liche.cn/temp/exchange.xlsx' + url: API_BASE_URL.replace('api', '') + 'temp/exchange.xlsx' }; }, methods: { diff --git a/src/views/sylive/groups-exchange/components/gro-exchange-status.vue b/src/views/sylive/groups-exchange/components/gro-exchange-status.vue index 091996b..9da82de 100644 --- a/src/views/sylive/groups-exchange/components/gro-exchange-status.vue +++ b/src/views/sylive/groups-exchange/components/gro-exchange-status.vue @@ -70,6 +70,10 @@ methods: { /* 保存编辑 */ save() { + if (this.form.useStatus != 2 && !this.form.descrip) { + this.$message.error('请输入驳回理由'); + return; + } this.$refs.form.validate((valid) => { if (!valid) { return false;