Commit 8e7df1b0 by chenxin

Merge branch 'dev' into 'master'

fix:game-人群筛选器 编辑需要主动掉人群筛选器组件的回显

See merge request !15
parents a22e84a2 44723f3a
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.5b7ec6853197907c0f1cffee07a72e97.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.41e915fffb6fa2b1b49e.js></script><script type=text/javascript src=/marketing/static/js/main.83e91bafbdbb5ef46a10.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.8669ad78e4a2357ff9010d8f646ba426.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.41e915fffb6fa2b1b49e.js></script><script type=text/javascript src=/marketing/static/js/main.3e21ef2a9d0efc5583e6.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,6 +3,7 @@ import card from '../../views/card';
import cardList from '../../views/card/list';
import cardRecord from '../../views/card/record';
import cardRecordSend from '../../views/card/record-send';
import cardRecordSendInfo from '../../views/card/record-send-info';
import cardRecordGet from '../../views/card/record-get';
import cardRecordCache from '../../views/card/record-cache';
import cardGroupSend from '../../views/card/group-send';
......@@ -49,6 +50,12 @@ export default {
meta: {}
},
{
path: 'sendInfo/:id',
name: '投放记录',
component: cardRecordSendInfo,
meta: {}
},
{
path: 'cache',
name: '临时领取记录',
component: cardRecordCache,
......
<template>
<section class="card-record-send">
<div class="pb22">
<el-select class="vertical-middle w150" v-model="listParams.sendStatus" placeholder="投放状态" @change="search">
<el-option label="成功" :value="1"></el-option>
<el-option label="失败" :value="0"></el-option>
</el-select>
<el-input class="w300" v-model="listParams.search" placeholder="输入卡券名称/备注名/活动名" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<el-table v-show="listParams.sendStatus === 1" tooltipEffect="light" :data="recordList" style="width: 100%" row-key="putonTime" v-loading="loading">
<el-table-column width="150" align="left" prop="cardName" label="卡券名称">
<template slot-scope="scope">
<p style="line-height:22px;">{{ scope.row.cardName }}</p>
<p class="fz13 gray" style="line-height:20px;">{{ scope.row.subName }}</p>
</template>
</el-table-column>
<el-table-column v-for="(v, i) in successHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter"></el-table-column>
<el-table-column width="150" align="left" prop="cardName" label="卡券状态">
待领取
</el-table-column>
<el-table-column width="100" align="left" prop="putonTime" label="领取时间">
<template slot-scope="scope">
<p style="color:#606266;">{{ formatDateTimeByType(scope.row.putonTime, 'yyyy-MM-dd-HH-mm', true).y }}</p>
<p style="color:#606266;">{{ formatDateTimeByType(scope.row.putonTime, 'yyyy-MM-dd-HH-mm', true).h }}</p>
</template>
</el-table-column>
<el-table-column width="100" align="left" prop="putonTime" label="核销时间">
<template slot-scope="scope">
<p style="color:#606266;">{{ formatDateTimeByType(scope.row.putonTime, 'yyyy-MM-dd-HH-mm', true).y }}</p>
<p style="color:#606266;">{{ formatDateTimeByType(scope.row.putonTime, 'yyyy-MM-dd-HH-mm', true).h }}</p>
</template>
</el-table-column>
<el-table-column width="100" align="left" prop="putonTime" label="订单流水">
?????
</el-table-column>
</el-table>
<el-table v-show="listParams.sendStatus === 0" tooltipEffect="light" :data="recordList" style="width: 100%" row-key="putonTime" v-loading="loading">
<el-table-column :min-width="100" align="left" prop="putonTime" label="会员信息" fixed="left">
<!-- <template slot-scope="scope">
<p style="color:#606266;">{{ formatDateTimeByType(scope.row.putonTime, 'yyyy-MM-dd-HH-mm', true).y }}</p>
<p style="color:#606266;">{{ formatDateTimeByType(scope.row.putonTime, 'yyyy-MM-dd-HH-mm', true).h }}</p>
</template> -->
陈昕
</el-table-column>
<el-table-column align="left" prop="cardName" label="卡券类型">
<!-- <template slot-scope="scope">
<p style="line-height:22px;">{{ scope.row.cardName }}</p>
<p class="fz13 gray" style="line-height:20px;">{{ scope.row.subName }}</p>
</template> -->
????
</el-table-column>
<!-- <el-table-column v-for="(v, i) in recordHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter"></el-table-column> -->
<el-table-column align="left" prop="cardName" label="投放状态">
<!-- <template slot-scope="scope">
<div v-if="scope.row.putonStatus === 2"><span class="dm-status--primary--flash"></span><span>正在发送</span></div>
<span v-else :class="'dm-status--' + filterStatus(scope.row.putonStatus).type">{{ filterStatus(scope.row.putonStatus).label }}</span>
<div v-if="scope.row.putonStatus === 1">
<time-counts class="primary-color fz12" :defaultVal="scope.row.putonTime" :autoStart="true"></time-counts>
</div>
</template> -->
失败
</el-table-column>
<el-table-column align="left" prop="cardName" label="备注">
?????
</el-table-column>
</el-table>
<el-pagination v-show="recordList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import { cardRecordPage } from '@/service/api/cardApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import tableMethods from '@/mixins/tableMethods.js';
export default {
name: 'record-send',
mixins: [tableMethods],
data() {
return {
formatDateTimeByType,
loading: false,
recordList: [],
successHeader: [
{ label: '活动名称', prop: 'putonName', minWidth: '150', tooltip: true, align: 'left' },
{ label: '投放人数', prop: 'issuingQuantity', width: '80', align: 'left' },
{ label: '领取数量', prop: 'getedQuantity', width: '80', align: 'left' },
{
label: '领取率',
prop: 'getedQuantity',
width: '80',
align: 'left',
formatter(row) {
return ((row.getedQuantity * 100) / (row.issuingQuantity === 0 ? 1 : row.issuingQuantity)).toFixed(2) + '%';
}
},
{ label: '使用数量', prop: 'usageQuantity', width: '80', align: 'left' },
{
label: '核销率',
prop: 'usageQuantity',
width: '80',
align: 'left',
formatter(row) {
return ((row.usageQuantity * 100) / (row.getedQuantity === 0 ? 1 : row.getedQuantity)).toFixed(2) + '%';
}
},
{ label: '销售额', prop: 'saleAmount', width: '80', align: 'left' }
],
listParams: {
beginTime: '',
endTime: '',
cardStatus: 1,
sendStatus: 1,
recordType: 0,
search: '',
currentPage: 1,
pageSize: 20
},
total: 0
};
},
created() {
this.getTableList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券记录', path: '' }, { name: '投放记录', path: '' }]);
},
methods: {
//获取列表
getTableList() {
this.loading = true;
cardRecordPage(this.listParams).then(res => {
if (res.errorCode === 0) {
this.recordList = res.result.result;
this.total = res.result.totalCount;
}
this.loading = false;
});
},
filterStatus(val) {
let result = { label: '执行错误', type: 'danger' };
switch (val) {
case 1:
result = { label: '待发送', type: 'warning' };
break;
case 2:
result = { label: '正在发送', type: 'primary--flash' };
break;
case 3:
result = { label: '已发送', type: 'success' };
break;
case 4:
result = { label: '无接收人', type: 'info' };
break;
case 5:
result = { label: '库存不足', type: 'info' };
break;
default:
result = { label: '投放错误', type: 'danger' };
break;
}
return result;
}
}
};
</script>
......@@ -30,6 +30,7 @@
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.putonStatus === 2 || scope.row.putonStatus === 3" @click="$router.push('/card/groupinfo/' + scope.row.putonId)">详情</el-button>
<el-button type="text" v-if="scope.row.putonStatus !== 2 && scope.row.putonStatus !== 3" @click="$router.push('/card/groupsend/' + scope.row.putonId)">编辑</el-button>
<!-- <el-button type="text" @click="$router.push('/card/record/sendInfo/' + scope.row.putonId)">记录</el-button> -->
<dm-delete v-if="scope.row.putonStatus !== 2" @confirm="delData(scope.row)" tips="是否删除该投放记录?">
<el-button type="text">删除</el-button>
</dm-delete>
......
......@@ -486,7 +486,8 @@ export default {
if (this.isAdd) {
params.sceneSettingId = this.form.sceneSettingId; // 否 String 营销场景
}
// 如果适用人群-人群筛选器可编辑:需要调用await this.$refs.threshold.triggerPeopleSet(); 强制触发回显,否则数据保存有错误
// await this.triggerPeopleSet();
/* 模板消息的处理 */
if (this.currentCard.comName === 'item-card' && ((this.form.cardNoticeType === 1 && this.form.effectType === 0 && this.form.templateNoticeFlag === 1) || this.form.cardNoticeType === 2)) {
let marketingTemplate = {};
......@@ -697,6 +698,9 @@ export default {
}
},
/* ----------------人群筛选器的方法--------------- */
// async triggerPeopleSet() {
// await this.$refs.peopleFilter.confirmSet();
// },
getData() {
this.$refs.peopleFilter.confirmSet();
},
......
......@@ -121,7 +121,7 @@ export default {
storeGroupData: {},
formatDateTimeByType,
loading: false,
dateTime: [],
dateTime: [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()],
tableList: [],
listParams: { searchName: '', currentPage: 1, pageSize: 20, isBad: 0, isContent: 0, currentStoreGroupId: '', visiteStatus: -1, beginTime: '', endTime: '' },
visiteStatusOptions: [{ value: -1, label: '所有' }, { value: 0, label: '待分配' }, { value: 1, label: '已分配' }, { value: 2, label: '回访结束' }, { value: 3, label: '回访逾期' }, { value: 5, label: '无需回访' }, { value: 6, label: '回访取消' }],
......
......@@ -13,7 +13,7 @@
<div class="">
<!-- 会员筛选 -->
<el-form-item label="选择会员" v-if="form.memberType === 1" class="calc1">
<vue-gic-people :projectName="projectName" :isAdd="isAdd" :triggerReset="true" :useId="thresholdData.useId" :hasSearchData="thresholdData.hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn" />
<vue-gic-people :projectName="projectName" :isAdd="false" :triggerReset="true" :useId="thresholdData.useId" :hasSearchData="thresholdData.hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn" />
<div class="gic-people--button" v-show="toggleTag">
<el-button size="small" type="primary" @click="getData">确 定</el-button>
<el-button size="small" @click="cancelFilter">取 消</el-button>
......@@ -85,6 +85,9 @@ export default {
dmUploadAvatar
},
methods: {
async triggerPeopleSet() {
await this.$refs.peopleFilter.confirmSet();
},
/**---------人群筛选器的方法-------------*/
getData() {
this.$refs.peopleFilter.confirmSet();
......
......@@ -414,6 +414,10 @@ export default {
// this.$tips({ type: 'warning', message: `开始时间不能小于当前时间` });
// return;
// }
if (this.form.memberType === 1) {
await this.$refs.threshold.triggerPeopleSet();
}
if (await this.editAlert()) return;
this.$refs[formName].validate(valid => {
......@@ -423,11 +427,6 @@ export default {
gameName: this.form.gameName, // 1.游戏名称
gameStartTimeStr: this.form.dateTime ? formatDateTimeByType(this.form.dateTime[0], 'yyyy-MM-dd-HH-mm-ss') : '', // 2.游戏时间 startDate
gameEndTimeStr: this.form.dateTime ? formatDateTimeByType(this.form.dateTime[1], 'yyyy-MM-dd-HH-mm-ss') : '', // 2.游戏时间 endDate
// 原 - 自定义可以上传图片
// skinType: this.form.skinType, // 1.皮肤模板: 0-自定义 1-黑金 2-红色 3- 霓虹灯 (不为0时, banner图标和 背景颜色隐藏, 对应属性不用传值)
// gameImageFieldCode: this.form.skinType === 0 ? this.form.gameImage.code : '', // 3.上传后返回的banner图标 code (skinType!=0 时为空)
// gameImageUrl: this.form.skinType === 0 ? this.form.gameImage.imgUrl : '', // 3.上传后返回的banner图标 URL (skinType!=0为空)
// 新 - 每个类型都可以上传图片
skinType: this.form.skinType,
gameImageFieldCode: this.banner[this.form.skinType].code, // 上传skinType对应的banner图片
......@@ -471,6 +470,8 @@ export default {
tipImageUrl: tipsImg.imgUrl || '',
tipImageFieldCode: tipsImg.code || ''
};
// console.log(attendCondition.searchJson);
// return;
if (this.isEdit) {
attendCondition.gameActivityAttendConditionId = this.form.gameActivityAttendConditionId;
}
......
......@@ -372,8 +372,10 @@ export default {
// return;
// }
// 编辑弹窗提示 方法editAlertMixin里
if (await this.editAlert()) return;
if (this.form.memberType === 1) {
await this.$refs.threshold.triggerPeopleSet();
}
await this.$refs.threshold.triggerPeopleSet();
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
......
......@@ -593,6 +593,9 @@ export default {
// }
// 编辑弹窗提示
if (await this.editAlert()) return;
if (this.form.memberType === 1) {
await this.$refs.threshold.triggerPeopleSet();
}
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
......
......@@ -408,8 +408,9 @@ export default {
// }
// 编辑弹窗提示
if (await this.editAlert()) return;
if (this.form.memberType === 1) {
await this.$refs.threshold.triggerPeopleSet();
}
this.$refs[formName].validate(valid => {
if (valid) {
if (!this.isEdit) {
......
......@@ -307,7 +307,9 @@ export default {
// 编辑弹窗提示
if (await this.editAlert()) return;
if (this.form.memberType === 1) {
await this.$refs.threshold.triggerPeopleSet();
}
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
......@@ -368,7 +370,7 @@ export default {
shareSetting: JSON.stringify(shareSetting)
});
console.log(postParam);
// console.log(postParam);
znmSave(postParam).then(res => {
if (res.errorCode === 0) {
this.$tips({ type: 'success', message: this.isAdd ? '新增成功' : '编辑成功' });
......
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