Commit a6513cc7 by crushh

update: 文案

parent 8cc9eff7
......@@ -10,7 +10,8 @@ export default {
name: '卡券库',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/list.vue'),
meta: {
path: '/card/list'
path: '/card/list',
keepAlive: true
}
},
{
......
......@@ -21,7 +21,6 @@ let _requests = [];
axios.defaults.baseURL = _apiHost;
console.log(axios.defaults);
// 创建一个请求实例
/**
* 添加请求,显示loading
......
......@@ -10,7 +10,7 @@ import Vue from 'vue';
*/
export const log = msg => {
if (_isDev && console && console.log) {
console.log(msg);
// console.log(msg);
}
};
......
......@@ -70,7 +70,10 @@ const initForm = {
bannerJumpUrl: {},
giveRule: '1.卡券新老用户同享。\n2.用户使用卡券下单,订单取消后,卡券将自动失效',
wmCouponJson: {},
wmCouponFlag: 0
wmCouponFlag: 0,
cardCodePrefixFlag: 0, // 是否 code类型随机生成时 展示 前缀
cardCodePrefixCheck: 0, //code类型随机生时 前缀复选框的值
cardCodePrefix: '' // code类型随机生成 前缀值
};
const sale_limit = { fee: 0, goods: '', flag: false, type: 0 }; //最低消费
const goods = { ok: '', no: '', flag: false };
......@@ -585,7 +588,8 @@ export default {
this.form.erpDemoCode = card.erpDemoCode || '';
this.form.cardColor = card.cardColor;
this.form.cardDenomination = card.cardDenomination || 0;
this.form.cardCodePrefixFlag = card.cardCodePrefixFlag;
this.form.cardCodePrefix = card.cardCodePrefixDefault || '';
if (this.isCopy && !res.result.giveEnable) {
this.form.giveFlag = 0;
}
......@@ -873,7 +877,12 @@ export default {
return;
}
}
if (!this.form.useCustomCode) {
if (this.form.cardCodePrefixCheck && !this.form.cardCodePrefix) {
this.$tips({ type: 'warning', message: '前缀不能为空' });
return;
}
}
// 验证号段 不能为空 起始号段和结尾号段必须位数一致
if (this.form.useCustomCode) {
if (!this.form.customCodeBegin || !this.form.customCodeEnd) {
......@@ -1075,6 +1084,7 @@ export default {
}
card.cardCodeCount = this.form.customCodeEnd - this.form.customCodeBegin + 1;
} else {
card.cardCodePrefix = this.form.cardCodePrefix;
card.cardCodeCount = this.form.cardCodeCount;
}
// 用户使用有效期
......
......@@ -39,7 +39,10 @@
<!-- 微盟微商城 微盟券号 -->
<template v-if="showWeimobDemoSelector || (form.cardApplyChannel.indexOf('WMmicroMall') !== -1 && countFlag)">
<el-alert type="warning" show-icon :closable="false" class="f-alert" style="margin-bottom: 10px;margin-left:130px;">
<span slot="title">选择设置微盟微商城-微盟券号时,卡券信息将以微盟侧为准,本页填写信息将视为无效。</span>
<span slot="title">
1、请在下方选择对应的微盟卡券。GIC卡券的相关信息应与对应的微盟卡券保持一致,避免核销客诉!<br />
2、请确保下方所选的微盟卡券在微盟侧的“售后退券设置”为“支付前整单取消,退优惠券”,而不是其他设置,否则会导致微盟订单自动取消!
</span>
</el-alert>
<el-form-item label="微盟券号">
<div class="mb10" v-for="(saveItem, idx) in weimobDemoCodeList" :key="idx">
......@@ -226,7 +229,14 @@
<el-radio v-model="form.useCustomCode" :label="0" :disabled="isEdit || isInfo">随机生成</el-radio>
<el-radio v-model="form.useCustomCode" :label="1" :disabled="isEdit || isInfo">自定义号段</el-radio>
</el-form-item>
<el-form-item prop="cardCodePrefix" label="code号段" v-show="form.useCustomCode === 0">
<span class="fz13 gray">卡券code格式: 12位随机编码</span>
<div class="pt20">
<el-checkbox v-model="form.cardCodePrefixCheck" :true-label="1" :false-label="0" :disabled="isEdit || isInfo">前缀</el-checkbox>
<el-input class="w400" :disabled="isEdit || isInfo" @focus="form.cardCodePrefixCheck = 1" v-model="form.cardCodePrefix" :maxlength="3" @blur="checkInputString(form.cardCodePrefix, 'cardCodePrefix')"></el-input>
<span class="fz13 gray">限制3位以内字母/数字</span>
</div>
</el-form-item>
<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>
......@@ -350,6 +360,7 @@
<el-radio :disabled="isEdit" v-model="storeMode" :label="0">所有门店</el-radio>
<el-radio :disabled="isEdit" v-model="storeMode" :label="1">部分门店</el-radio>
<span v-if="isEdit" class="fz12 gray ml20">编辑适用门店前会员领取该卡券不包含新增的适用门店;编辑适用门店后会员领取该卡券包含新增的适用门店。</span>
<span class="fz12 gray ml20">仅支持选择账号管辖门店范围内的门店;</span>
<!-- :readonly="isEdit" -->
<vue-gic-store-card class="pt10" :readonly="isInfo" v-bind="storeParams" v-show="storeMode" ref="storeCard" :uuid.sync="uuid"></vue-gic-store-card>
<el-alert v-show="storeMode && form.cardApplyChannel.indexOf('WMmicroMall') !== -1" title="选择的门店必须保持与微盟侧门店一致,请确认选择无误" type="warning" show-icon :closable="false" class="mt20 width80"></el-alert>
......@@ -408,7 +419,6 @@ export default cardForm;
.f-alert {
width: 900px !important;
/deep/ .el-alert__content {
height: 18px;
line-height: 18px;
}
}
......
<template>
<div>
<router-view />
<keep-alive>
<router-view v-if="$route.meta.keepAlive" />
</keep-alive>
<router-view v-if="!this.$route.meta.keepAlive" />
</div>
</template>
<script>
......
......@@ -37,6 +37,7 @@ import adjustStock from './partials/adjust-Stock';
import cardItem from './partials/card-item';
import tableMethods from '@/mixins/tableMethods.js';
import { appletUnableAlert } from '@/utils/index.js';
import form from './form';
export default {
name: 'card-list',
mixins: [tableMethods],
......@@ -65,24 +66,53 @@ export default {
'adjust-stock': adjustStock,
'card-item': cardItem
},
created() {
window.scrollTo(0, 0);
this.getTableList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '' }]); // eslint-disable-line
},
mounted() {
// this.$store.commit(
// 'mutations_layoutTips',
// `<div class="layout--tips">
// <i class="el-icon-info"></i>
// 由于微信侧对卡券业务的调整,2021年1月5日0点起,达摩GIC将从原先的微信卡券切换至GIC卡券,主体功能保持不变。届时与微信相关的微信卡包将不再支持,敬请谅解。
// </div>
// `
// );
console.log('mounted');
// window.scrollTo(0, 0);
// this.getTableList();
// this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '' }]); // eslint-disable-line
},
beforeDestroy() {
this.$store.commit('mutations_layoutTips', '');
},
beforeRouteEnter(to, from, next) {
const {
meta: { type, path }
} = from;
console.log(to);
console.log(from);
if (path !== to.meta.path) {
to.meta.refresh = true;
} else {
if (type === 'add') {
to.meta.refresh = true;
} else {
to.meta.refresh = false;
}
}
next();
},
activated() {
console.log('activated');
window.scrollTo(0, 0);
console.log(this.$route);
if (this.$route.meta.refresh) {
this.listParams = {
shelfId: '',
sortBy: '',
searchParam: '',
currentPage: 1,
pageSize: 20,
cardType: '',
showSelfFlag: '',
effectiveFlag: 0 // 1有效 0全部
};
} else {
// this.$route.meta.refresh = false;
}
this.getTableList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '' }]); // eslint-disable-line
},
methods: {
//编辑库存 前置
preAdjustStock(val) {
......@@ -112,8 +142,12 @@ export default {
return v;
}) || [];
this.total = res.result.totalCount;
console.log('getTableList');
} catch (err) {
this.$tips({ type: 'error', message: '加载列表失败' });
if (err) {
console.log(err);
this.$tips({ type: 'error', message: '加载列表失败' });
}
}
this.loading = false;
},
......
......@@ -28,7 +28,10 @@
<p>销售额</p>
</div>
<el-tooltip class="item" effect="dark" open-delay="300">
<div slot="content">{{ item.isApiCreate ? '该卡券为外部接口创建卡券无法用于营销' : '卡券的领取数量\使用数量\核销率\销售额统计数据每隔3小时更新一次' }}</div>
<div slot="content">
<span v-if="item.isApiCreate">该卡券为外部接口创建卡券无法用于营销</span>
<span v-else> 1.卡券的领取数量\使用数量\核销率\销售额统计数据每隔3小时更新一次;</br>2.销售额=扣除退款后的去重订单应收金额</span>
</div>
<i style="position:absolute;right:10px;top:10px;cursor:pointer;color:#c0c4cc;font-size:18px;" class="el-icon-question"></i>
</el-tooltip>
</div>
......
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