Commit bef37e01 by 陈羽

update:字段更新

parent 56fcec35
......@@ -7,11 +7,20 @@ export const url = config.api + PREFIX;
// 弹窗计划分页列表
export const popPlanList = params => requests(PREFIX + 'query-popup-plan-page-list', params);
// 弹窗计划分页列表
// 弹窗计划详情
export const getPopupPlan = params => requests(PREFIX + 'get-popup-plan', params);
// 保存或更新弹窗计划
export const saveOrUpdatePopupPlan = params => requests(PREFIX + 'save-or-update-popup-plan', params);
// 投放页面列表
export const queryPopupLinkList = params => requests(PREFIX + 'query-popup-link-list', params);
// 删除弹窗
export const removePopup = params => requests(PREFIX + 'remove-popup', params);
// 删除弹窗
// 删除弹窗计划
export const removePopupPlan = params => requests(PREFIX + 'remove-popup-plan', params);
// 停止弹窗
export const stopPopup = params => requests(PREFIX + 'stop-popup', params);
......@@ -81,7 +81,6 @@ import { popPlanList, removePopup, stopPopup } from '@/service/api/popApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import timeCounts from '@/components/timeCount/index.vue';
import tableMethods from '@/mixins/tableMethods.js';
import templatePic from './img.jpg';
const activeStatusOpt = [
{ value: 1, label: '未开始' },
{ value: 2, label: '进行中' },
......@@ -102,160 +101,7 @@ export default {
activeStatusOpt: activeStatusOpt,
putonTypeOpt: putonTypeOpt,
loading: false,
tableList: [
{
// 弹窗计划id
id: '23',
// 商户id
enterpriseId: '',
// 计划名称
name: '235454',
// 推广场景(逗号分隔,中文名称[新品推广,活动预热,卡券发放,进群有礼,引流开卡,签到日历])
scene: '新品推广,活动预热',
// 计划开始时间(时间戳)
beginTime: 123456,
// 计划结束时间(时间戳)
endTime: 123456,
// 创建日期(时间戳)
createTime: 123456,
// 更新时间(时间戳)
updateTime: 123456,
// 创建人id
creatorId: '',
// 创建人名称
creatorName: '',
// 弹窗列表
popupList: [
{
// 弹窗id
id: '',
// 商户id
enterpriseId: '',
// 弹窗计划id
popupPlanId: '',
// 投放类型(1:图片,2:卡券)
putonType: 0,
// 投放页面列表
putonPageList: [
{
// 弹窗链接id
id: '1',
// 节点类型(1:普通链接, 6:自定义链接)
type: 0,
// 链接名称
name: 'asdasdsad',
// 链接内容
content: '',
// 自定义链接pageId
customPageId: '',
// 自定义链接名称
customPageName: ''
},
{
// 弹窗链接id
id: '1',
// 节点类型(1:普通链接, 6:自定义链接)
type: 0,
// 链接名称
name: 'asdasdsad',
// 链接内容
content: '',
// 自定义链接pageId
customPageId: '',
// 自定义链接名称
customPageName: ''
},
{
// 弹窗链接id
id: '1',
// 节点类型(1:普通链接, 6:自定义链接)
type: 0,
// 链接名称
name: 'asdasdsad',
// 链接内容
content: '',
// 自定义链接pageId
customPageId: '',
// 自定义链接名称
customPageName: ''
}
],
// 投放的会员分组
popupMemberGroupList: [
{
// 会员分组id
memberTagGroupId: '1',
// 会员分组名称
groupName: 'sedfsdf'
},
{
// 会员分组id
memberTagGroupId: '3',
// 会员分组名称
groupName: '567efdghsedfvsdd'
},
{
// 会员分组id
memberTagGroupId: '2',
// 会员分组名称
groupName: 'yujhmnhfg'
}
],
// 投放详情 - 图片
popupImageDetails: {
// 图片链接
imageUrl: templatePic,
// 链接信息(链接小工具)
link: ''
},
// 投放详情 - 卡券
popupCouponDetails: {
// 样式(1:系统默认样式)
styleType: 0,
// 卡券列表
couponList: [
{
// 优惠券id
coupCardId: '',
// 卡券类型(0:抵金券,1:折扣券,2:兑换券)
cardType: 0,
// 卡券名称
cardName: ''
}
]
},
// 是否自动关闭(0否 1是)
autoCloseFlag: 0,
// 自动关闭时间(秒)
autoCloseDelay: 0,
// 是否手动结束(0否 1是)
manualEndFlag: 0,
// 手动结束时间(时间戳)
manualEndTime: 123456,
// 排序优先级(从1开始)
sortNum: 0,
// 投放开始时间(时间戳)
beginTime: 123456,
// 投放结束时间(时间戳)
endTime: 123456,
// 弹出类型(1首次弹出 2每次弹出)
popupType: 0,
// 创建日期(时间戳)
createTime: 123456,
// 更新时间(时间戳)
updateTime: 123456,
// 创建人id
creatorId: '',
// 创建人名称
creatorName: '',
// 弹窗活动状态(1:未开始,2:进行中,3:已结束)
activeStatus: 1
}
],
// 弹窗数量
popupCount: 0
}
],
tableList: [],
listParams: {
currentPage: 1,
pageSize: 20
......@@ -299,7 +145,7 @@ export default {
{ name: '弹窗推广', path: '' },
{ name: '计划列表', path: '' }
]);
// this.getTableList();
this.getTableList();
},
methods: {
formatDateTimeByType,
......@@ -312,7 +158,6 @@ export default {
}
console.log(params);
const res = await popPlanList(params);
console.log(res);
if (res.errorCode === 0 && res.result) {
this.tableList = res.result.result;
}
......
<template>
<section class="dm-wrap" v-loading="recordLoading">
<div class="clearfix pb22">
<el-input v-model="listParams.search" class="w350" placeholder="请输入用户信息/兑换码名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-date-picker class="w350" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="兑换开始日期" end-placeholder="兑换结束日期" @change="refresh"></el-date-picker>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column :show-overflow-tooltip="true" min-width="120" header-align="left" fixed="left" align="left" prop="memberId" label="会员信息">
<template slot-scope="scope">
<a :href="'/member/#/wechatmemberDetail?memberId=' + scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar--40" :src="scope.row.memberImgUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p class="table-name--ellipsis">{{ scope.row.memberName || '--' }}</p>
<!-- <p class="fz13 gray">{{ scope.row.phoneNumber || '--' }}</p> -->
</div>
</a>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" label="兑换时间">
<template slot-scope="scope">
<p class="cell-time">
{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm-ss', true).y }}<br />
<span>{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm-ss', true).h }}</span>
</p>
</template>
</el-table-column>
<el-table-column min-width="140" align="left" prop="cdkeyName" label="兑换码名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" label="兑换码类型">
<template slot-scope="scope">
<!-- 兑换码类型(1:专属,2:通用) -->
{{ scope.row.cdkeyType == 1 ? '专属码' : '通用码' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="cdkey" label="兑换码码值"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="cdkeyContentDescribe" label="兑换内容"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="createTime" label="兑换码状态">
<template slot-scope="scope">
<div v-if="scope.row.convertibilityStatus == 1" class="dm-status--success">成功</div>
<div v-if="scope.row.convertibilityStatus == 2" class="dm-status--error">失败</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="convertibilityRemark" label="备注">
<template slot-scope="scope">
{{ scope.row.convertibilityRemark || '--' }}
</template>
</el-table-column>
</el-table>
<dm-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></dm-pagination>
</section>
</template>
<script>
import { cdkeyLogRecord } from '@/service/api/cdKeyApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import tableMethods from '@/mixins/tableMethods.js';
export default {
name: 'cdkey-record',
mixins: [tableMethods],
data() {
return {
recordLoading: false,
tableList: [],
listParams: {
beginTime: '',
endTime: '',
search: '',
currentPage: 1,
pageSize: 20
},
dateTime: ['', ''],
total: 0
};
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '兑换码', path: '' }, { name: '兑换记录', path: '' }]); // eslint-disable-line
this.getTableList();
},
methods: {
formatDateTimeByType,
async getTableList() {
try {
this.recordLoading = true;
if (this.dateTime) {
this.listParams.beginTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
this.listParams.endTime = formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd');
} else {
this.listParams.beginTime = this.listParams.endTime = '';
}
let res = await cdkeyLogRecord(this.listParams);
if (res.errorCode === 0 && res.result) {
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
} else {
this.tableList = [];
this.total = 0;
}
this.recordLoading = false;
} catch (err) {
this.recordLoading = false;
}
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment