Commit c3968ac6 by zhangmeng

add:迭代4提交测试

parent b14262fb
No preview for this file type
<!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/app.b9377c6fd241453c784f5df393c81bdc.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.d058dfa6ef5c5be87db9.js></script><script type=text/javascript src=/marketing/static/js/app.34abcdb65b4e558bb76e.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/app.e6b839baa37b864395366ec6e8245019.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.c0031d22d59edae1dff4.js></script><script type=text/javascript src=/marketing/static/js/app.779d38d3be45172838f8.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.
......@@ -188,6 +188,11 @@
.el-table .table-img .cell{
line-height: 0px;
}
.message-box--btn-center{
.el-message-box__btns {
text-align: center;
}
}
.left-aside-contain {
......
<template>
<el-input v-model="input" placeholder="请输入内容"></el-input>
</template>
<template>
<div class="layout-container" :style="{height:bodyHeight+'px'}">
<vue-gic-header class="user-header-pop" style="z-index: 1999;" :projectName="projectName" :collapseFlag="collapseFlag" @collapseTag="collapseTagHandler" @toRouterView="toRouterView"></vue-gic-header>
<vue-gic-header-test class="user-header-pop" style="z-index: 1999;" :projectName="projectName" :collapseFlag="collapseFlag" @collapseTag="collapseTagHandler" @toRouterView="toRouterView"></vue-gic-header-test>
<div class="layout">
<vue-gic-aside-menu class="layout-left" v-if="asideShow" :projectName="projectName" :leftModulesName="leftModulesName" :collapseFlag.sync="collapseFlag"></vue-gic-aside-menu>
<div class="layout-right" :class="[{'asideShow': asideShow},{'collapseFlag':asideShow && collapseFlag}]">
......@@ -26,7 +26,11 @@
</div>
</template>
<script>
import vueGicHeader from '@gic-test/vue-gic-header/src/lib/vue-gic-header.vue'
export default {
components:{
'vue-gic-header-test':vueGicHeader
},
data () {
return {
collapseFlag: false,
......
......@@ -183,6 +183,15 @@ export default {
}
},
{
path: 'znm/info/:id',
name: '找你马查看',
component: znmForm,
meta: {
type: 'info',
path:'/game/znm'
}
},
{
path: 'znm/record/:id',
name: '找你马统计',
component: znmRecord,
......@@ -217,6 +226,15 @@ export default {
}
},
{
path: 'klfl/info/:id',
name: '口令福利查看',
component: klflForm,
meta: {
type: 'info',
path:'/game/klfl'
}
},
{
path: 'klfl/record/:id',
name: '口令福利中奖记录',
component: klflRecord,
......
......@@ -35,3 +35,6 @@ export const rechargeStep1 = (params) => requests(PREFIX + 'recharge-step-2', pa
//计费中心--点击充值后--第二步后进行定时刷新(判断是否充值成功)
export const rechargeStep2 = (params) => requests(PREFIX + 'recharge-step-3', params);
//获取账户状态 是否欠费
export const getAccountStateInfo = (params) => requests(PREFIX + 'account-state-info', params);
......@@ -248,6 +248,13 @@
.dm-store__total--tag {
margin: 5px;
}
.dm-store__line::after {
display: block;
content: ' ';
height:1px;
width:100%;
background:#E4E7ED;
}
/* 公共样式END */
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<!-- 左侧 -->
<div class="dm-store__left">
......@@ -48,6 +48,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="rightList.length">{{params.isAll?rightTotal:rightList.length}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......@@ -75,6 +79,7 @@ export default {
},
data() {
return {
popoverShow:false,
leftList:[],
rightList:[],
leftValue:'',
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<div class="dm-store__left">
<div class="dm-store__state">
......@@ -55,6 +55,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="rightList.length">{{rightTotal}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......@@ -83,6 +87,7 @@ export default {
},
data() {
return {
popoverShow:false,
leftList:[],
rightList:[],
leftValue:'',
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<div class="dm-store__left">
<div class="dm-store__state">
......@@ -50,6 +50,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="rightList.length">{{params.isAll?rightTotal:rightList.length}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......@@ -77,6 +81,7 @@ export default {
},
data() {
return {
popoverShow:false,
leftList:[],
rightList:[],
leftValue:'',
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="214" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="214" trigger="click" v-model="popoverShow">
<el-checkbox-group v-model="checkedList" @change="saveToRight">
<label :name="v.value" class="dm-store__type__item" v-for="(v,i) in typeList" :key="i">
<el-checkbox :label="v.value">{{v.label}}</el-checkbox>
</label>
</el-checkbox-group>
<div class="dm-store__line"></div>
<div class="el-input dm-store__reference w240" slot="reference">
<div class="el-input__inner dm-store__inputtag">
<el-tag v-for="(v,i) in checkedList" size="small" :key="i" closable @close="delItem(v)">{{filterLabel(v)}}</el-tag>
......@@ -15,6 +16,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="checkedList.length">{{checkedList.length}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<!-- 左侧 -->
<div class="dm-store__left">
......@@ -48,6 +48,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="rightList.length">{{params.isAll?rightTotal:rightList.length}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......@@ -75,6 +79,7 @@ export default {
},
data() {
return {
popoverShow:false,
leftList:[],
rightList:[],
leftValue:'',
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<div class="dm-store__left">
<div class="dm-store__state">
......@@ -55,6 +55,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="rightList.length">{{rightTotal}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......@@ -83,6 +87,7 @@ export default {
},
data() {
return {
popoverShow:false,
leftList:[],
rightList:[],
leftValue:'',
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="446" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<!-- 左侧 -->
<div class="dm-store__left">
......@@ -48,6 +48,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="rightList.length">{{params.isAll?rightTotal:rightList.length}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......@@ -75,6 +79,7 @@ export default {
},
data() {
return {
popoverShow:false,
leftList:[],
rightList:[],
leftValue:'',
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="214" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="214" trigger="click" v-model="popoverShow">
<el-checkbox-group v-model="checkedList" @change="saveToRight">
<label :name="v.value" class="dm-store__type__item" v-for="(v,i) in typeList" :key="i">
<el-checkbox :label="v.value">{{v.label}}</el-checkbox>
</label>
</el-checkbox-group>
<div class="dm-store__line"></div>
<div class="el-input dm-store__reference w240" slot="reference">
<div class="el-input__inner dm-store__inputtag">
<el-tag v-for="(v,i) in checkedList" size="small" :key="i" closable @close="delItem(v)">{{filterLabel(v)}}</el-tag>
......@@ -15,6 +16,10 @@
<span slot="reference" class="dm-store__inputtag--total" v-show="checkedList.length">{{checkedList.length}}</span>
</el-popover>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">关 闭</el-button>
</div>
</el-popover>
</template>
<script>
......
/**
* 逻辑太多
* 卡券新增编辑
*/
import dmUploadImg from '../../components/upload/img'
import imgTextDrag from './partials/imgtext-drag'
import {formateDateTimeByType} from '../../utils/index.js'
......@@ -48,6 +47,7 @@ export default {
return {
uuid:'',
loading:false,
submitLoading:false,
cardShelfsLoading:false, //卡券展架loading
testList:[],
form:JSON.parse(JSON.stringify(initForm)),
......@@ -120,6 +120,7 @@ export default {
this.sale_limit = JSON.parse(JSON.stringify(sale_limit));
this.goods = JSON.parse(JSON.stringify(goods));
this.form.cardType = e;
console.log(e)
this.$nextTick(_ => {
this.$refs.storeCard.initLeftList();
})
......@@ -163,7 +164,6 @@ export default {
this.form.subName = card.subName || '';
this.form.subTitle = card.subTitle || '';
this.form.erpDemoCode = card.erpDemoCode || '';
this.form.cardColor = card.cardColor;
this.form.cardDenomination = card.cardDenomination || 0;
if(card.useCondition) {
......@@ -179,17 +179,14 @@ export default {
} else {
this.sale_limit.type = 0;
}
this.goods.ok = useCondition.goods? (useCondition.goods.ok || ''):'';
this.goods.no = useCondition.goods? (useCondition.goods.no || ''):'';
if (this.goods.ok || this.goods.no) {
this.goods.flag = true;
}
this.only = (!!useCondition.only) || false;
this.form.proNoList = useCondition.proNo ? [{name:useCondition.proNo,id:useCondition.proNo}]:[];
}
this.form.cardLimit = card.cardLimit;
if (this.form.cardLimit === 1) {
this.cardLimitRadio = 1;
......@@ -198,9 +195,7 @@ export default {
} else {
this.cardLimitRadio = 0;
}
this.form.useCustomCode = card.useCustomCode;
if (this.isCopy && this.form.useCustomCode === 1) {
this.form.customCodeBegin = '';
this.form.customCodeEnd = '';
......@@ -226,11 +221,9 @@ export default {
this.form.useDescript = card.useDescript || '';
this.form.coverDescript = card.coverDescript || '';
this.uuid = card.storeWidgetKey || '';
this.$nextTick(_ => {
this.$refs.storeCard.init();
})
this.form.image = {
imgUrl:card.qcloudImageUrl || '',
code:card.imageFieldCode || ''
......@@ -469,9 +462,9 @@ export default {
// 门店展架
params.shelfIds = JSON.stringify(this.form.shelfIds);
params.card = JSON.stringify(card);
this.submitLoading = true;
saveUpdateCard(params).then(res => {
console.log('2'+res)
this.submitLoading = false;
if (res.errorCode === 0) {
if (this.isEdit) {
this.$confirm('保存成功, 是否返回列表?', '提示', {
......@@ -491,7 +484,7 @@ export default {
this.$tips({type:'error',message:res.message || '保存卡券失败'});
}
}).catch(err => {
console.log('3'+err)
this.submitLoading = false;
this.$tips({type:'error',message:'保存卡券失败'});
})
},
......
......@@ -29,41 +29,41 @@
</el-form-item>
<!-- 抵金券 -->
<el-form-item prop="cardDenomination" label="减免金额" v-if="form.cardType === 0">
<el-form-item prop="cardDenomination" label="减免金额" v-show="form.cardType === 0">
<el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="form.cardDenomination" class="200" :precison="0" :min="0"></el-input-number><span class="fz12 gray">请输入大于0的整数</span>
</el-form-item>
<!-- 折扣券 -->
<el-form-item prop="cardDenomination" label="折扣额度" v-if="form.cardType === 1">
<el-form-item prop="cardDenomination" label="折扣额度" v-show="form.cardType === 1">
<el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="form.cardDenomination" class="200" :precision="1" :step="0.1" :max="9.9" :min="0"></el-input-number><span class="fz12 gray">请填写1-9.9之间的数字</span>
</el-form-item>
<!-- 兑换券无 -->
<el-form-item prop="" label="使用条件">
<div v-if="form.cardType === 0" class="mb10">
<div v-show="form.cardType === 0" class="mb10">
<el-checkbox :disabled="isEdit || isInfo" v-model="sale_limit.flag">最低消费满</el-checkbox>
<el-input-number controls-position="right" :min="0" @focus="sale_limit.flag = true" :disabled="isEdit || isInfo" v-model="sale_limit.fee" class="w200"></el-input-number> 元可使用
</div>
<div v-if="form.cardType !== 2">
<div v-show="form.cardType !== 2">
<el-checkbox :disabled="isEdit || isInfo" v-model="goods.flag">适用商品</el-checkbox> <span class="fz12 gray">(至少填写一项)</span>
</div>
<div class="mb10" v-if="form.cardType!== 2">
<div class="mb10" v-show="form.cardType!== 2">
<span class="inline-block w100 text-right">适用商品</span> <dm-input @focus="goods.flag = true" v-model="goods.ok" :disabled="isEdit || isInfo" class="w300" placeholder="限制18个汉字内" :maxlength="18"></dm-input>
</div>
<div v-if="form.cardType !== 2" class="mb10">
<div v-show="form.cardType !== 2" class="mb10">
<span class="inline-block w100 text-right">不适用商品</span> <dm-input @focus="goods.flag = true" v-model="goods.no" :disabled="isEdit || isInfo" class="w300" placeholder="限制18个汉字内" :maxlength="18"></dm-input>
</div>
<!-- 兑换券 -->
<div v-if="form.cardType === 2" class="mb10">
<div v-show="form.cardType === 2" class="mb10">
<el-checkbox :disabled="isEdit || isInfo" v-model="sale_limit.flag">消费条件</el-checkbox> <span class="fz12 gray">(至少填写一项)</span>
</div>
<div class="mb10" v-if="form.cardType === 2">
<div class="mb10" v-show="form.cardType === 2">
<el-radio v-model="sale_limit.type" :label="1" :disabled="isEdit || isInfo">
消费金额满 <el-input-number controls-position="right" @focus="sale_limit.type = 1;sale_limit.flag = true" :disabled="isEdit || isInfo" :precision="1" :min="0" class="w300" v-model="sale_limit.fee"></el-input-number> 元可使用
</el-radio>
</div>
<div v-if="form.cardType === 2" class="mb10">
<div v-show="form.cardType === 2" class="mb10">
<el-radio v-model="sale_limit.type" :label="2" :disabled="isEdit || isInfo">
消费指定商品 <el-input @focus="sale_limit.type = 2;sale_limit.flag = true" :disabled="isEdit || isInfo" class="w300" v-model="sale_limit.goods"></el-input> 可使用
<div class="inline-block pl10">指定商品货号<dm-goods-input :disabled="isEdit || isInfo" class="w300 inline-block" v-model="form.proNoList" :multiple="false"></dm-goods-input></div>
<div class="inline-block pl10">指定商品货号 <dm-goods-input :disabled="isEdit || isInfo" class="w300 inline-block" v-model="form.proNoList" :multiple="false"></dm-goods-input></div>
</el-radio>
</div>
<div>
......@@ -81,7 +81,7 @@
</el-radio-group>
</el-form-item>
<el-form-item prop="costValue" label="成本费用" v-if="form.cardType !== 1">
<el-form-item prop="costValue" label="成本费用" v-show="form.cardType !== 1">
<el-input-number controls-position="right" :disabled="isEdit || isInfo" :precision="2" :min="0" class="w200" v-model="form.costValue"></el-input-number><span class="fz13 gray">请填写大于0的数字(限制两位小数)</span>
</el-form-item>
......@@ -90,7 +90,7 @@
<el-radio v-model="form.useCustomCode" :label="1" :disabled="isEdit || isInfo">自定义号段</el-radio>
</el-form-item>
<el-form-item prop="customCodeBegin" label="code号段" v-if="form.useCustomCode === 1">
<el-form-item prop="customCodeBegin" label="code号段" v-show="form.useCustomCode === 1">
<el-input :disabled="isEdit || isInfo" :min="0" :maxlength="16" class="w250" v-model="form.customCodeBegin" @blur="checkInputNumber(form.customCodeBegin,'customCodeBegin')"></el-input>
<el-input :disabled="isEdit || isInfo" :min="0" :maxlength="16" class="w250" v-model="form.customCodeEnd" @blur="checkInputNumber(form.customCodeEnd,'customCodeEnd')"></el-input>
<span class="fz13 gray">限制16位以内纯数字</span>
......@@ -107,9 +107,9 @@
</el-form-item>
<el-form-item prop="cardCodeCount" :label="form.useCustomCode?'默认数量':'新建数量'">
<div v-if="!form.useCustomCode">
<div v-show="!form.useCustomCode">
<el-input-number controls-position="right" :min="0" :max="10000000" :disabled="isEdit || isInfo" class="w200" v-model="form.cardCodeCount"></el-input-number><span class="fz13 gray">优惠券创建数量,如不填,则默认为100,000张</span></div>
<div v-if="form.useCustomCode">
<div v-show="form.useCustomCode">
<el-input-number controls-position="right" :min="0" :max="100000" disabled class="w200" :value="form.customCodeEnd - form.customCodeBegin + 1"></el-input-number><span class="fz13 gray">优惠券创建数量,如不填,则默认为100,000张</span></div>
</el-form-item>
......@@ -166,13 +166,13 @@
</el-transfer>
</el-form-item>
<el-form-item prop="verificationType" label="核销方式" v-if="form.cardType === 2">
<el-form-item prop="verificationType" label="核销方式" v-show="form.cardType === 2">
<el-radio v-model="form.verificationType" :label="0" :disabled="isEdit || isInfo">会员自助核销</el-radio>
<el-radio v-model="form.verificationType" :label="1" :disabled="isEdit || isInfo">收银台录入核销</el-radio>
</el-form-item>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="submitForm('form')" v-if="!isInfo">保存并提交审核</el-button>
<el-button type="primary" @click="submitForm('form')" v-loading="submitLoading" v-show="!isInfo">保存并提交审核</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</el-form>
......
<template>
<el-form :model="form" ref="form" :rules="rules" label-width="80px" v-loading="loading">
<el-form :model="form" ref="form" :rules="rules" label-width="100px" v-loading="loading">
<div class="dm-form__wrap">
<h3 class="dm-title__label">基础设置</h3>
<el-form-item label="活动名称" prop="putOnName">
......@@ -59,6 +59,12 @@
</el-tooltip>
</el-radio>
</el-form-item>
<!-- 模板消息选择 -->
<el-form-item label="模板消息选择" v-show="form.noticeType === 2">
<el-select style="width:262px;" :disabled="!isEditTemplate || isInfo" v-model="triggerCode" placeholder="请选择模板消息" @change="changeTemplate">
<el-option v-for="(v,i) in templateOptions" :key="i" :label="v.templateName" :value="v.triggerCode"></el-option>
</el-select>
</el-form-item>
<!-- 通知非 不通知-->
<el-form-item label="效果预览" v-if="form.noticeType">
<div class="mt20">
......@@ -211,7 +217,9 @@ export default {
defaltSelected:[],
projectName:'marketing',
headerList: ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate'],
effectiveStatus: 1 // 不传: 所有状态 1: 有效 0: 失效
effectiveStatus: 1, // 不传: 所有状态 1: 有效 0: 失效
templateOptions:[],
triggerCode:'',
}
},
computed: {
......@@ -307,65 +315,22 @@ export default {
brandLogo:res.result.enterprise.qcloudImageUrl
}
}
// 模板消息的处理
const template = res.result.marketingTemplate;
if (template) {
this.template.templateKeyDataList = template.templateKeyDataList;
this.template.templateKeyDataList.map((v,i) => {
v.type = v.datas ? v.datas.split('#')[0] :'';
v.color = v.datas ? '#'+ (v.datas.split('#')[1] || '173177') : '#173177';
this.$set(this.template.templateKeyDataList,i,{
color: v.color,
type: v.type,
createTime:v.createTime,
datas:v.datas,
keyName:v.keyName,
keywords:v.keywords,
orders:v.orders,
queryMap:v.queryMap,
queryOrder:v.queryOrder,
querySize:v.querySize,
querySort:v.querySort,
queryStart:v.queryStart,
templateId:v.templateId,
templateKeyDataId:v.templateKeyDataId,
updateTime:v.updateTime
})
});
this.template.weixinTemplateId = template.weixinTemplateId;
this.template.templateBusiness = template.templateBusiness;
this.template.typeCode = template.typeCode;
this.template.templateName = template.templateName;
this.template.title = template.title;
this.template.urlType = template.urlType;
this.template.header = template.header;
this.template.remark = template.remark;
this.template.headerText = this.template.header ? this.template.header.split('#')[0] : '';
this.template.headerColor = this.template.header ? '#'+ (this.template.header.split('#')[1] || '173177') :'#173177';
this.template.remarkText = this.template.remark ? this.template.remark.split('#')[0] :'';
this.template.remarkColor = this.template.remark ? '#'+ (this.template.remark.split('#')[1] || '173177') : '#173177';
this.template.updateTime = template.updateTime;
this.template.jumpUrl = template.jumpUrl;
this.template.jumpUrlInfo = template.jumpUrlInfo;
this.template.triggerCode = template.triggerCode;
this.options.map(v => {
console.log(this.template.headerText.indexOf(v.value)>-1)
if (this.template.headerText.indexOf(v.value)>-1) {
this.template.headerText = this.template.headerText.replace(v.value,v.label);
}
if (this.template.remarkText.indexOf(v.value)>-1) {
this.template.remarkText = this.template.remarkText.replace(v.value,v.label);
}
});
console.log(this.template);
}
// 如果是新增,调用详情接口获取卡券详情
if (this.isAdd) {
this.getCardDetail(res.result.enterprise.qcloudImageUrl);
}
// 模板消息
let template = null;
this.templateOptions = res.result.marketingTemplateList || [];
if (!this.isAdd) {
template = res.result.customMarketingTemplate;
} else {
template = res.result.marketingTemplateList[0];
}
this.triggerCode = template.triggerCode;
if (template) {
this.templateInit(template);
}
}
},
//卡券详情
......@@ -390,6 +355,67 @@ export default {
this.$tips({type:'error',message:'初始化数据失败'});
}
},
// 模板消息初始化
templateInit(template) {
this.template.templateKeyDataList = template.templateKeyDataList;
this.template.templateKeyDataList.map((v,i) => {
v.type = v.datas ? v.datas.split('#')[0] :'';
v.color = v.datas ? '#'+ (v.datas.split('#')[1] || '173177') : '#173177';
this.$set(this.template.templateKeyDataList,i,{
color: v.color,
type: v.type,
createTime:v.createTime,
datas:v.datas,
keyName:v.keyName,
keywords:v.keywords,
orders:v.orders,
queryMap:v.queryMap,
queryOrder:v.queryOrder,
querySize:v.querySize,
querySort:v.querySort,
queryStart:v.queryStart,
templateId:v.templateId,
templateKeyDataId:v.templateKeyDataId,
updateTime:v.updateTime
})
});
this.template.weixinTemplateId = template.weixinTemplateId;
this.template.templateBusiness = template.templateBusiness;
this.template.typeCode = template.typeCode;
this.template.templateName = template.templateName;
this.template.title = template.title;
this.template.urlType = template.urlType;
this.template.header = template.header;
this.template.remark = template.remark;
this.template.headerText = this.template.header ? this.template.header.split('#')[0] : '';
this.template.headerColor = this.template.header ? '#'+ (this.template.header.split('#')[1] || '173177') :'#173177';
this.template.remarkText = this.template.remark ? this.template.remark.split('#')[0] :'';
this.template.remarkColor = this.template.remark ? '#'+ (this.template.remark.split('#')[1] || '173177') : '#173177';
this.template.updateTime = template.updateTime;
this.template.jumpUrl = template.jumpUrl;
this.template.jumpUrlInfo = template.jumpUrlInfo;
this.template.triggerCode = template.triggerCode;
this.options.map(v => {
console.log(this.template.headerText.indexOf(v.value)>-1)
if (this.template.headerText.indexOf(v.value)>-1) {
this.template.headerText = this.template.headerText.replace(v.value,v.label);
}
if (this.template.remarkText.indexOf(v.value)>-1) {
this.template.remarkText = this.template.remarkText.replace(v.value,v.label);
}
});
},
// 下拉触发模板消息的改变
changeTemplate() {
let template = null;
this.templateOptions.map(v => {
if (this.triggerCode === v.triggerCode) {
template = v;
}
})
this.templateInit(template);
},
// 预修改模板
editTemplatePre() {
this.editDialogShow = true;
......
......@@ -156,6 +156,13 @@
</el-tooltip>
</el-radio>
</el-form-item>
<!-- 模板消息选择 -->
<el-form-item label="模板消息选择" v-show="form.cardNoticeType === 2">
<el-select style="width:262px;" v-model="triggerCode" v-if="form.templateUseEnable" placeholder="请选择模板消息" @change="changeTemplate">
<el-option v-for="(v,i) in templateOptions" :key="i" :label="v.templateName" :value="v.triggerCode"></el-option>
</el-select>
</el-form-item>
<!-- 如果时效是实时(0)并且通知方式是微信群发接口(1) 出现补发设置-->
<el-form-item label="补发设置" prop="templateNoticeFlag" v-if="form.cardNoticeType === 1 && form.effectType === 0">
<el-checkbox v-model="form.templateNoticeFlag" :true-label="1" :false-label="0">发送失败使用微信模板消息补发该通知
......@@ -345,7 +352,10 @@ export default {
defaltSelected: [], // 默认穿梭窗已选入数据
projectName:'marketing', // 默认是memberTag
headerList: ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate'],
effectiveStatus: 1 // 不传: 所有状态 1: 有效 0: 失效
effectiveStatus: 1, // 不传: 所有状态 1: 有效 0: 失效
templateOptions:[],
triggerCode:'',
}
},
components:{
......@@ -496,61 +506,81 @@ export default {
})
}
}
const template = res.result.marketingTemplate;
if (!this.form.templateUseEnable) return;
let template = null;
this.templateOptions = res.result.marketingTemplateList || [];
if (!this.isAdd) {
template = res.result.customMarketingTemplate;
} else {
template = res.result.marketingTemplateList[0];
}
this.triggerCode = template.triggerCode;
// 模板消息
if (template) {
this.template.templateKeyDataList = template.templateKeyDataList;
this.template.templateKeyDataList.map((v,i) => {
v.type = v.datas ? v.datas.split('#')[0] :'';
v.color = v.datas ? '#'+ (v.datas.split('#')[1] || '173177') : '#173177';
this.$set(this.template.templateKeyDataList,i,{
color: v.color,
type: v.type,
createTime:v.createTime,
datas:v.datas,
keyName:v.keyName,
keywords:v.keywords,
orders:v.orders,
queryMap:v.queryMap,
queryOrder:v.queryOrder,
querySize:v.querySize,
querySort:v.querySort,
queryStart:v.queryStart,
templateId:v.templateId,
templateKeyDataId:v.templateKeyDataId,
updateTime:v.updateTime
})
});
this.template.weixinTemplateId = template.weixinTemplateId;
this.template.templateBusiness = template.templateBusiness;
this.template.typeCode = template.typeCode;
this.template.templateName = template.templateName;
this.template.title = template.title;
this.template.urlType = template.urlType;
this.template.header = template.header;
this.template.remark = template.remark;
this.template.headerText = this.template.header ? this.template.header.split('#')[0] : '';
this.template.headerColor = this.template.header ? '#'+ (this.template.header.split('#')[1] || '173177') :'#173177';
this.template.remarkText = this.template.remark ? this.template.remark.split('#')[0] :'';
this.template.remarkColor = this.template.remark ? '#'+ (this.template.remark.split('#')[1] || '173177') : '#173177';
this.template.updateTime = template.updateTime;
this.template.jumpUrl = template.jumpUrl;
this.template.jumpUrlInfo = template.jumpUrlInfo;
this.template.triggerCode = template.triggerCode;
this.options.map(v => {
console.log(this.template.headerText.indexOf(v.value)>-1)
if (this.template.headerText.indexOf(v.value)>-1) {
this.template.headerText = this.template.headerText.replace(v.value,v.label);
}
if (this.template.remarkText.indexOf(v.value)>-1) {
this.template.remarkText = this.template.remarkText.replace(v.value,v.label);
}
});
console.log(this.template);
this.templateInit(template);
}
},
// 模板消息初始化
templateInit(template) {
this.template.templateKeyDataList = template.templateKeyDataList;
this.template.templateKeyDataList.map((v,i) => {
v.type = v.datas ? v.datas.split('#')[0] :'';
v.color = v.datas ? '#'+ (v.datas.split('#')[1] || '173177') : '#173177';
this.$set(this.template.templateKeyDataList,i,{
color: v.color,
type: v.type,
createTime:v.createTime,
datas:v.datas,
keyName:v.keyName,
keywords:v.keywords,
orders:v.orders,
queryMap:v.queryMap,
queryOrder:v.queryOrder,
querySize:v.querySize,
querySort:v.querySort,
queryStart:v.queryStart,
templateId:v.templateId,
templateKeyDataId:v.templateKeyDataId,
updateTime:v.updateTime
})
});
this.template.weixinTemplateId = template.weixinTemplateId;
this.template.templateBusiness = template.templateBusiness;
this.template.typeCode = template.typeCode;
this.template.templateName = template.templateName;
this.template.title = template.title;
this.template.urlType = template.urlType;
this.template.header = template.header;
this.template.remark = template.remark;
this.template.headerText = this.template.header ? this.template.header.split('#')[0] : '';
this.template.headerColor = this.template.header ? '#'+ (this.template.header.split('#')[1] || '173177') :'#173177';
this.template.remarkText = this.template.remark ? this.template.remark.split('#')[0] :'';
this.template.remarkColor = this.template.remark ? '#'+ (this.template.remark.split('#')[1] || '173177') : '#173177';
this.template.updateTime = template.updateTime;
this.template.jumpUrl = template.jumpUrl;
this.template.jumpUrlInfo = template.jumpUrlInfo;
this.template.triggerCode = template.triggerCode;
this.options.map(v => {
console.log(this.template.headerText.indexOf(v.value)>-1)
if (this.template.headerText.indexOf(v.value)>-1) {
this.template.headerText = this.template.headerText.replace(v.value,v.label);
}
if (this.template.remarkText.indexOf(v.value)>-1) {
this.template.remarkText = this.template.remarkText.replace(v.value,v.label);
}
});
},
// 下拉触发模板消息的改变
changeTemplate() {
let template = null;
this.templateOptions.map(v => {
if (this.triggerCode === v.triggerCode) {
template = v;
}
})
this.templateInit(template);
},
// 预修改模板
editTemplatePre() {
this.editDialogShow = true;
......@@ -587,7 +617,11 @@ export default {
async submit (formName) {
// 判断时间
if(this.checkBeginEndTime()) return;
if(this.isMessageForbidden()) return;
const hasMessageInList = this.$refs.marketingEvent.hasMessageInList();
// 判断是否能发送短信
if(hasMessageInList && this.isMessageForbidden()) return;
// 判断账户是否欠费
if(hasMessageInList && this.checkAccountState()) return;
if (this.form.expireType && (!this.form.beginDate || !this.form.endDate)) {
this.$tips({type:'warning',message:'固定期限不能为空'});
......@@ -772,7 +806,7 @@ export default {
// 是否禁止发短信 逻辑 => 当用户选择每天发送,且短信模板选择为营销短信时,需要判断定时发送时间是否在08:00至22:00之间,若否则停留在新建计划页面,禁止短信群发并进行提醒。
isMessageForbidden() {
// console.log(this.$refs.marketingEvent.hasMessageInList(),this.form.effectType === 1,this.form.effectTime)
if (this.$refs.marketingEvent.hasMessageInList() && this.form.effectType === 1 && (this.form.effectTime >= 22 || this.form.effectTime <= 8)) {
if (this.form.effectType === 1 && (this.form.effectTime >= 22 || this.form.effectTime <= 8)) {
this.$alert(`<div>
<i class="el-icon-warning warning-color fz30 vertical-middle mr20"></i>
<p class="inline-block vertical-middle w300">短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送</p>
......@@ -845,7 +879,25 @@ export default {
},
handleDataLeft(selectedData, selectionToRemove) {
console.log(selectedData, selectionToRemove)
}
},
// 账户状态判断
checkAccountState() {
if (localStorage.getItem('accountStatus') == 3) {
this.$alert(`<div>
<i class="el-icon-warning warning-color fz30 vertical-middle mr20"></i>
<p class="inline-block vertical-middle w300">当前账户已欠费,无法正常使用短信服务。为了保障您的权益,请及时充值。</p>
</div>`, '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText:'前往充值中心',
customClass:'message-box--btn-center'
}).then(res => {
if (res === 'confirm') {
this.$router.push('/recharge/do');
}
})
return true;
}
},
},
filters:{
filterDate(val) {
......
......@@ -38,7 +38,7 @@
</div>
</el-form-item>
<el-form-item label="游戏时间" prop="dateTime" class="width50">
<el-date-picker :default-time="['00:00:00', '23:59:59']" class="w400" v-model="form.dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" class="w400" v-model="form.dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item label="规则文案色" prop="gameRuleTitleFontColor" class="width50">
<el-color-picker class="vertical-middle" v-model="form.gameRuleTitleFontColor"></el-color-picker>
......@@ -185,7 +185,7 @@
</el-form-item>
</section>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="klflSave('form')">保 存</el-button>
<el-button type="primary" @click="klflSave('form')" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
......@@ -208,6 +208,7 @@ import config from '@/config';
let result = {};
export default {
data () {
const that = this;
return {
loading:false,
tableLoading:false,
......@@ -274,6 +275,14 @@ export default {
//传到strategy的卡券
strategyDialog:{},
isdialogCard:false,
isInfo: this.$route.meta.type === 'info',
isEdit: this.$route.meta.type === 'edit',
isAdd: this.$route.meta.type === 'add',
pickerOptions: {
disabledDate(now) {
return now.getTime() < (Date.now() - 24*60*60*1000) && that.isAdd;
}
}
}
},
components:{
......@@ -289,12 +298,12 @@ export default {
}
},
created(){
if (this.$route.meta.type === 'edit') {
if (this.isEdit || this.isInfo) {
this.klflDetail();
this.klflStrategyList();
this.klflPrizeList()
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'游戏营销',path:''},{name:'口令福利',path:'/game/klfl'},{name:'口令福利编辑',path:''}]);
} else if (this.$route.meta.type === 'add') {
} else if (this.isAdd) {
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'游戏营销',path:''},{name:'口令福利',path:'/game/klfl'},{name:'口令福利新增',path:''}]);
(async () => {
let res = await this.klflDetail(true)
......@@ -532,7 +541,7 @@ export default {
shareTitle: this.form.shareTitle,
shareTextInfo: this.form.shareTextInfo,
strategyIds: this.tableList.map(v => v.gamePrizeStrategyId).join(','),
gameActivityId: this.$route.meta.type === "edit" ? this.form.gameActivityId : '',
gameActivityId: this.isEdit ? this.form.gameActivityId : '',
activityCustom: {
gameRuleTitleFontColor: this.form.gameRuleTitleFontColor,
tipUrl: this.form.tipUrl,
......@@ -541,55 +550,55 @@ export default {
errorTipType: this.form.errorTipType,
gameActivityCustomId: this.form.gameActivityCustomId, // get-game-klfl-edit编辑回显的 游戏自定义配置表主键ID
},
tempActivityId: this.$route.meta.type === "add" ? this.form.gameActivityId : '' // 与上面新建不同, 这个没
tempActivityId: this.isAdd ? this.form.gameActivityId : '' // 与上面新建不同, 这个没
}
let gameCodePrizeList = [];
this.prizeList.map((v,i) => {
if (v.prizeReferType == 1) { // 积分
gameCodePrizeList.push({
"codeId":this.form.codeType==1?'':(v.codeId || ''),
"prizeReferType":1, // 奖品类型: 积分 类型 1: '积分'; 2: '卡券'; 3: '礼品'
"prizeIntegral":v.prizeIntegral || '', // 奖项设置 积分数
"prizeSort":i,
"gameActivityId": this.$route.meta.type==="edit"?this.form.gameActivityId:'',
"prizeCount":v.prizeId?v.prizeCount:v.prizeStock, // 奖品设置 数量
"prizeStock":v.prizeStock // 奖品设置 库存数 = 数量
codeId: this.form.codeType==1?'':(v.codeId || ''),
prizeReferType: 1, // 奖品类型: 积分 类型 1: '积分'; 2: '卡券'; 3: '礼品'
prizeIntegral: v.prizeIntegral || '', // 奖项设置 积分数
prizeSort: i,
gameActivityId: this.isEdit ? this.form.gameActivityId : '',
prizeCount: v.prizeId ? v.prizeCount : v.prizeStock, // 奖品设置 数量
prizeStock: v.prizeStock // 奖品设置 库存数 = 数量
})
} else if (v.prizeReferType == 2) { // 卡券
gameCodePrizeList.push({
"codeId":this.form.codeType==1?'':(v.codeId || ''), // 口令ID, 唯一口令为null, 多个口令 load-game-code-list中选择的 gameWinCodeId, 多个口令每个只能匹配一个奖项
"prizeReferType":2, // 奖品类型: 卡券 类型 1: '积分'; 2: '卡券'; 3: '礼品'
"prizeIntegral":0,
"prizeReferId":v.card.coupCardId || '', // 奖项设置 所选卡券主键ID
"prizeSort":i, // 奖品排序
"gameActivityId":this.$route.meta.type==="edit"?this.form.gameActivityId:'', // 新建游戏为空
"prizeCount":v.prizeId?v.prizeCount:v.prizeStock, // 奖品设置 数量
"prizeStock":v.prizeStock // 奖品设置 库存数 = 数量
codeId: this.form.codeType == 1 ? '' : (v.codeId || ''), // 口令ID, 唯一口令为null, 多个口令 load-game-code-list中选择的 gameWinCodeId, 多个口令每个只能匹配一个奖项
prizeReferType: 2, // 奖品类型: 卡券 类型 1: '积分'; 2: '卡券'; 3: '礼品'
prizeIntegral: 0,
prizeReferId: v.card.coupCardId || '', // 奖项设置 所选卡券主键ID
prizeSort: i, // 奖品排序
gameActivityId: this.isEdit ? this.form.gameActivityId:'', // 新建游戏为空
prizeCount: v.prizeId ? v.prizeCount : v.prizeStock, // 奖品设置 数量
prizeStock: v.prizeStock // 奖品设置 库存数 = 数量
})
console.log(v)
} else if (v.prizeReferType == 3) { // 礼品
gameCodePrizeList.push({
"codeId":this.form.codeType==1?'':(v.codeId || ''),
"prizeReferType":3, // 奖品类型: 礼品 类型 1: '积分'; 2: '卡券'; 3: '礼品'
"prizeIntegral":0,
"proGift":{
"giftName":v.proGift.giftName, // 奖项设置 礼品名称
"mainPicUrl":v.proGift.mainPic?v.proGift.mainPic.imgUrl:'', // 奖项设置 礼品图片URL
"mainPicFieldCode":v.proGift.mainPic?v.proGift.mainPic.code:'', // 奖项设置 礼品图片CODE
"giftStock":v.proGift.giftStock // 奖品设置 库存数 = 数量
codeId: this.form.codeType==1?'':(v.codeId || ''),
prizeReferType: 3, // 奖品类型: 礼品 类型 1: '积分'; 2: '卡券'; 3: '礼品'
prizeIntegral: 0,
proGift: {
giftName: v.proGift.giftName, // 奖项设置 礼品名称
mainPicUrl: v.proGift.mainPic?v.proGift.mainPic.imgUrl:'', // 奖项设置 礼品图片URL
mainPicFieldCode: v.proGift.mainPic?v.proGift.mainPic.code:'', // 奖项设置 礼品图片CODE
giftStock: v.proGift.giftStock // 奖品设置 库存数 = 数量
},
"prizeSort":i,
"gameActivityId": this.$route.meta.type==="edit"?this.form.gameActivityId:'',
"prizeCount":v.prizeId?v.prizeCount:v.prizeStock, // 奖品设置 数量
"prizeStock":v.prizeStock // 奖品设置 库存数 = 数量
prizeSort: i,
gameActivityId: this.isEdit ? this.form.gameActivityId:'',
prizeCount: v.prizeId?v.prizeCount:v.prizeStock, // 奖品设置 数量
prizeStock: v.prizeStock // 奖品设置 库存数 = 数量
})
}
})
params.gameCodePrizeList = gameCodePrizeList;
let res = klflSave({reqData:JSON.stringify(params)}).then(res => {
if (res.errorCode === 0) {
this.$tips({type: 'success', message: this.$route.meta.type === 'add'?'新增成功':'编辑成功'});
if (this.$route.meta.type === 'add') {
this.$tips({type: 'success', message: this.isAdd ? '新增成功':'编辑成功'});
if (this.isAdd) {
this.$router.push('/game/klfl');
} else {
this.$confirm('操作成功,是否返回列表?', '提示', {
......
......@@ -20,8 +20,9 @@
<el-table-column label="操作" align="left" width="220px" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="setLinks(scope.row,5)">链接</el-button>
<el-button type="text" v-if="scope.row.sendStatus!==0" @click="$router.push('/game/klfl/record/'+scope.row.gameActivityId)">记录</el-button>
<el-button type="text" @click="$router.push('/game/klfl/edit/'+scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-if="scope.row.sendStatus !== 0" @click="$router.push('/game/klfl/record/'+scope.row.gameActivityId)">记录</el-button>
<el-button type="text" v-if="scope.row.activityStatus === 0 || scope.row.activityStatus === 1" @click="$router.push('/game/klfl/edit/'+scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-else @click="$router.push('/game/klfl/info/'+scope.row.gameActivityId)">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
</dm-delete>
......@@ -52,26 +53,25 @@ export default {
},
total:0,
tableHeader:[
{label:'游戏名称',prop:'gameName',width:'120',align:'left',fixed:'left'},
{label:'游戏状态',prop:'activityStatus',width:'80',align:'left',formatter:function(row){
if (row.activityStatus === 1) {
return `<div><span class="dm-status--primary--flash"></span>进行中</div>`
} else {
return `<div class="${row.activityStatus === 0?'dm-status--warning':'dm-status--info'}">
${row.activityStatus === 0 ? '待开始':'已结束'}
</div>`
}
}},
{label:'开始时间',prop:'gameStartTime',minWidth:'170', tooltip:true,align:'left',formatter:function(row){
return formateDateTimeByType(row.gameStartTime,'yyyy-MM-dd-HH-mm-ss');
}},
{label:'结束时间',prop:'gameEndTime',minWidth:'170', tooltip:true,align:'left',formatter:function(row){
return formateDateTimeByType(row.gameEndTime,'yyyy-MM-dd-HH-mm-ss');
}},
{label:'参与人数',prop:'cyrs',width:'80',align:'left'},
{label:'参与次数',prop:'cyrc',width:'80',align:'left'}],
{label:'游戏名称',prop:'gameName',width:'120',align:'left',fixed:'left'},
{label:'游戏状态',prop:'activityStatus',width:'80',align:'left',formatter:function(row){
if (row.activityStatus === 1) {
return `<div><span class="dm-status--primary--flash"></span>进行中</div>`
} else {
return `<div class="${row.activityStatus === 0?'dm-status--warning':'dm-status--info'}">
${row.activityStatus === 0 ? '待开始':'已结束'}
</div>`
}
}},
{label:'开始时间',prop:'gameStartTime',minWidth:'170', tooltip:true,align:'left',formatter:function(row){
return formateDateTimeByType(row.gameStartTime,'yyyy-MM-dd-HH-mm-ss');
}},
{label:'结束时间',prop:'gameEndTime',minWidth:'170', tooltip:true,align:'left',formatter:function(row){
return formateDateTimeByType(row.gameEndTime,'yyyy-MM-dd-HH-mm-ss');
}},
{label:'参与人数',prop:'cyrs',width:'80',align:'left'},
{label:'参与次数',prop:'cyrc',width:'80',align:'left'}],
tableList:[],
// multipleSelection:[]
}
},
created() {
......@@ -79,9 +79,6 @@ export default {
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'游戏营销',path:''},{name:'口令福利',path:'/game/klfl'}])
},
methods: {
// handleSelectionChange(val) {
// this.multipleSelection = val;
// },
async getTableList() {
this.loading = true;
try {
......@@ -106,23 +103,7 @@ export default {
} catch (err) {
this.$tips({type: 'error',message: '删除失败!'});
}
},
//下载二维码
// async downLoadQr(){
// if (this.multipleSelection.length === 0) {
// this.$tips({type:'warning',message:'请先勾选游戏'});
// return;
// }
// const params = {
// urlInfos:JSON.stringify(this.multipleSelection.map(v => {return {gameName:v.gameName,gameUrl:v.gameUrl || 'null'}}))
// }
// try {
// let resCreate = await createQrCode(params);
// window.location = downloadQrCode+'?zipName='+resCreate.result+'&requestProject=gic-web';
// } catch (err){
// this.$tips({type:'error',message:'下载二维码失败'});
// }
// }
}
}
}
</script>
......
......@@ -8,6 +8,7 @@
<el-form-item label="游戏时间" prop="dateTime" class="width50">
<el-date-picker class="w400" :disabled="isInfo"
v-model="form.dateTime"
:picker-options="pickerOptions"
type="datetimerange" :default-time="['00:00:00', '23:59:59']"
range-separator="至"
start-placeholder="开始日期"
......@@ -171,8 +172,8 @@
<dm-input type="textarea" class="w400" :rows="4" v-model="form.shareTextInfo" placeholder="请输入分享描述" :disabled="isInfo" :maxlength="50"></dm-input>
</el-form-item>
</section>
<div class="btn-wrap_fixed" :class="{'on':asideShow}" v-if="!isInfo">
<el-button type="primary" @click="savePtyx('form')">保 存</el-button>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="savePtyx('form')" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</el-form>
......@@ -199,6 +200,7 @@ export default {
},
mixins:[nonnegative],
data () {
const that = this;
return {
defaultImg:require('../../../assets/img/loaderror.png'),
loading:false,
......@@ -264,7 +266,12 @@ export default {
attendCondition: {},
accessGame:{},
startGame:{},
shareGame:{}
shareGame:{},
pickerOptions: {
disabledDate(now) {
return now.getTime() < (Date.now() - 24*60*60*1000) && that.isAdd;
}
}
}
},
computed: {
......
......@@ -19,8 +19,8 @@
<template slot-scope="scope" >
<el-button type="text" @click="setLinks(scope.row,3)">链接</el-button>
<el-button type="text" v-if="scope.row.activityStatus !== 0" @click="$router.push('/game/ptyx/record/'+scope.row.gameActivityId)">记录</el-button>
<el-button type="text" v-if="scope.row.activityStatus === 0" @click="$router.push('/game/ptyx/edit/'+scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-if="scope.row.activityStatus !== 0" @click="$router.push('/game/ptyx/query/'+scope.row.gameActivityId)">详情</el-button>
<el-button type="text" v-if="scope.row.activityStatus === 0 || scope.row.activityStatus === 1" @click="$router.push('/game/ptyx/edit/'+scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-else @click="$router.push('/game/ptyx/query/'+scope.row.gameActivityId)">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
</dm-delete>
......
......@@ -9,7 +9,7 @@
<dm-upload-avatar :model.sync="form.logoImg" width="auto" label="上传图片" tips=" 请上传高度为80px的PNG透明背景图片"></dm-upload-avatar>
</el-form-item>
<el-form-item label="游戏时间" prop="dateTime" class="width50">
<el-date-picker :default-time="['00:00:00', '23:59:59']" class="w400" v-model="form.dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" class="w400" v-model="form.dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item label="游戏说明" prop="gameIntroduction" class="width50">
<dm-input class="w400" type="textarea" :rows="4" v-model="form.gameIntroduction" :maxlength="200"></dm-input>
......@@ -68,7 +68,7 @@
</el-form-item>
</section>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="znmSave('form')">保 存</el-button>
<el-button type="primary" @click="znmSave('form')" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" :cardLimit="3" @selectCard="selectCard"></vue-gic-card>
......@@ -85,6 +85,7 @@ let gameInfo = {};
let cardType = 'firstStrategy'
export default {
data () {
const that = this;
return {
loading:false,
tableLoading:false,
......@@ -122,8 +123,14 @@ export default {
lastStrategy:{},
dialogStrategy:{},
gamePrizeStrategyId:'',
editFlag:this.$route.meta.type === 'edit',
addFlag:this.$route.meta.type === 'add',
isEdit:this.$route.meta.type === 'edit',
isAdd:this.$route.meta.type === 'add',
isInfo:this.$route.meta.type === 'info',
pickerOptions: {
disabledDate(now) {
return now.getTime() < (Date.now() - 24*60*60*1000) && that.isAdd;
}
}
}
},
components:{
......@@ -136,11 +143,11 @@ export default {
}
},
created(){
if (this.editFlag) {
if (this.isEdit || this.isInfo) {
this.znmDetail();
this.znmStrategyList();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'游戏营销',path:'/game'},{name:'找你马',path:'/game/znm'},{name:'找你马详情',path:''}])
}else if (this.addFlag) {
}else if (this.isAdd) {
this.znmDetail(true);
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'游戏营销',path:'/game'},{name:'找你马',path:'/game/znm'},{name:'找你马新增',path:''}])
}
......@@ -192,9 +199,9 @@ export default {
this.tableLoading = false;
},
//加载详情
async znmDetail(addFlag) {
async znmDetail(isAdd) {
this.loading = true;
let res = await znmDetail({gameActivityId:addFlag?'':this.$route.params.id});
let res = await znmDetail({gameActivityId:isAdd?'':this.$route.params.id});
this.loading = false;
gameInfo = res.result;
if (typeof gameInfo === 'string') {
......@@ -244,15 +251,15 @@ export default {
shareTitle: this.form.shareTitle, // 是 string 分享标题
shareTextInfo: this.form.shareTextInfo, // 是 string 分享描述
};
if (this.editFlag) {
if (this.isEdit) {
params.gameActivityId = this.form.gameActivityId; //否 String 游戏主键ID(新增不传—前面回显的NEWxxxxx不用传, 修改必传)
params.firstStrategyId = this.firstStrategy.gamePrizeStrategyId; // 否 string (新建不传)首次奖项设置 load-game-znm-strategy-list 返回的firstStrategy—gamePrizeStrategyId
params.lastStrategyId = this.lastStrategy.gamePrizeStrategyId; // 否 string (新建不传)后续奖项设置 load-game-znm-strategy-list 返回的lastStrategy—gamePrizeStrategyId
}
let res = znmSave(params).then(res => {
if (res.errorCode === 0) {
this.$tips({type: 'success', message: this.$route.meta.type === 'add'?'新增成功':'编辑成功'});
if (this.$route.meta.type === 'add') {
this.$tips({type: 'success', message: this.isAdd ? '新增成功':'编辑成功'});
if (this.isAdd) {
this.$router.push('/game/znm');
} else {
this.$confirm('操作成功,是否返回列表?', '提示', {
......
......@@ -18,7 +18,8 @@
<template slot-scope="scope" >
<el-button type="text" @click="setLinks(scope.row,4)">链接</el-button>
<el-button type="text" v-if="scope.row.activityStatus!==0" @click="$router.push('/game/znm/record/'+scope.row.gameActivityId)">记录</el-button>
<el-button type="text" @click="$router.push('/game/znm/edit/'+scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-if="scope.row.activityStatus === 0 || scope.row.activityStatus === 1" @click="$router.push('/game/znm/edit/'+scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-else @click="$router.push('/game/znm/info/'+scope.row.gameActivityId)">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
</dm-delete>
......
......@@ -203,13 +203,14 @@ export default {
},
//提交表单
sendSms(){
if (this.checkAccountState()) return;
let nowHour = null;
if (this.info.sendType) {
nowHour = new Date(this.info.sendTime).getHours();
} else {
nowHour = new Date().getHours();
}
// TODO 编辑情况下的判断
// 编辑情况下的判断
if (this.smsType === 1 && (nowHour >= 22 || nowHour < 8)) {
this.$alert(`<div>
<i class="el-icon-warning warning-color fz30 vertical-middle mr20"></i>
......@@ -241,8 +242,23 @@ export default {
}
this.checkMessageSendCount();
},
checkAccountState() {
if (localStorage.getItem('accountStatus') == 3) {
this.$alert(`<div>
<i class="el-icon-warning warning-color fz30 vertical-middle mr20"></i>
<p class="inline-block vertical-middle w300">当前账户已欠费,无法正常使用短信服务。为了保障您的权益,请及时充值。</p>
</div>`, '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText:'前往充值中心',
customClass:'message-box--btn-center'
}).then(res => {
if (res === 'confirm') {
this.$router.push('/recharge/do');
}
})
return true;
}
},
/** ----------人群筛选器的方法----------- */
//获取指定会员
......
......@@ -19,18 +19,18 @@
<div class="step0-box">
<div>
<span class="fz14 w80 inline-block text-right">余额</span>
<span class="inline-block ml10">{{(balance/100).toFixed(2)}}</span>
<span class="inline-block ml10">{{(balance).toFixed(2)}}</span>
</div>
<div class="pt20">
<span class="fz14 w80 inline-block text-right">充值金额</span>
<el-input-number controls-position="right" class="w200 ml10" v-model="count" :precision="0" :min="0" placeholder="填写大于100的整数" @blur="checkCount"></el-input-number>
<el-input-number controls-position="right" class="w200 ml10" v-model="count" :precision="0" :min="100" placeholder="填写大于100的整数"></el-input-number>
</div>
<div class="pt20">
<span class="fz14 w80 inline-block text-right">充值方式</span>
<img width="120" height="26" class="wechat-icon inline-block ml10 vertical-middle border1 border-radius__default" src="../../assets/img/bank_weui.png">
</div>
<div class="wechat-btn pt20">
<el-button type="primary" @click="toStep1" :disabled="disabled">下一步</el-button>
<el-button type="primary" @click="toStep1">下一步</el-button>
</div>
</div>
......@@ -68,7 +68,7 @@
</section>
</template>
<script>
import {rechargeStep0,rechargeStep1,rechargeStep2} from '@/service/api/rechargeApi.js'
import {rechargeStep0,rechargeStep1,rechargeStep2,getAccountStateInfo} from '@/service/api/rechargeApi.js'
import VueQr from 'vue-qr'
let timer = null;
......@@ -83,7 +83,6 @@ export default {
transactionCode:'',
allUnitFee:{},
count:100,
disabled:true,
countDown:5,
wexinLogo:require('../../assets/img/qclogo.png'),
qcText:''
......@@ -105,29 +104,10 @@ export default {
if (val !== 1) {
clearInterval(timer);
}
},
count:{
handler(val) {
if (parseInt(val) >=100) {
this.disabled = false;
} else {
this.disabled = true;
}
},
immediate:true
}
},
methods:{
checkCount(){
if (this.count<100 || this.count%1 !== 0) {
this.$tips({type:"warning",message:'金额必须为大于100的整数'});
this.disabled = true;
} else {
this.disabled = false;
}
},
toStep1() {
this.checkCount();
this.step = 1;
this.rechargeStep1();
},
......@@ -137,14 +117,17 @@ export default {
try {
let res = await rechargeStep0();
if (res.errorCode === 0) {
this.balance = res.result.balance;
this.balance = res.result.balance / 100;
if (this.balance <= 0 && Math.abs(this.balance) > 100 ) {
this.count = Math.ceil(Math.abs(this.balance));
};
this.transactionCode = res.result.transactionCode;
this.allUnitFee = res.result.allUnitFee;
} else {
this.$tips({type:"error",message:'初始化失败'});
}
} catch (err) {
console.log(err);
}
},
async rechargeStep1() {
......@@ -175,17 +158,27 @@ export default {
if (res.errorCode === 0 && res.result) {
clearInterval(timer);
this.step = 2;
// 更新账户状态
this.getAccountStateInfo();
countDown = setInterval(_ => {
this.countDown --;
if (this.countDown === 0) {
this.$router.go(-1);
}
},1000)
},1000);
}
} catch (err) {
console.log(err)
}
},
//获取账户状态
async getAccountStateInfo() {
let res = await getAccountStateInfo();
if (res.errorCode === 0) {
// 状态存到localStorage中
localStorage.setItem('accountStatus',res.data.result.status || 1);
}
}
}
}
</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