Commit 6f23ecc0 by crushh

update: dist

parent 06ba4686
......@@ -71,7 +71,7 @@ const initForm = {
giveRule: '1.卡券新老用户同享。\n2.用户使用卡券下单,订单取消后,卡券将自动失效',
wmCouponJson: {},
wmCouponFlag: 0,
cardCodePrefixCheck: 0, //code类型随机生时 前缀复选框的值
useCardCodePrefix: 0, //code类型随机生时 前缀复选框的值
cardCodePrefix: '', // code类型随机生成 前缀值
only: true // 默认优惠不共享 true
};
......@@ -138,6 +138,12 @@ export default {
}
callback();
};
const validCardCodePrefix = (rule, value, callback) => {
if (this.form.useCardCodePrefix && !value) {
callback(new Error('请输入卡券code前缀'));
}
callback();
};
const that = this;
return {
isEffective: false,
......@@ -171,7 +177,8 @@ export default {
// giveRule: { required: true, message: '请输入卡券转赠规则', trigger: 'blur' },
// giveImage: { required: true, message: '请上传转赠封面', trigger: 'change' },
// bannerImage: { required: true, message: '请上传转赠页面首图', trigger: 'change' },
bannerJumpUrl: { validator: validBannerJumpUrl, trigger: 'change' }
bannerJumpUrl: { validator: validBannerJumpUrl, trigger: 'change' },
cardCodePrefix: { validator: validCardCodePrefix, trigger: 'change' }
},
startDayOptions: [],
cardApplyChannelOptions: [],
......@@ -508,8 +515,8 @@ export default {
},
//切换卡券类型 表单置为默认值
reset(e) {
if (this.form.cardCodePrefixCheck || this.form.cardCodePrefix) {
initForm.cardCodePrefixCheck = this.form.cardCodePrefixCheck;
if (this.form.useCardCodePrefix || this.form.cardCodePrefix) {
initForm.useCardCodePrefix = this.form.useCardCodePrefix;
initForm.cardCodePrefix = this.form.cardCodePrefix;
}
this.form = JSON.parse(JSON.stringify(initForm));
......@@ -536,7 +543,6 @@ export default {
this.cardCodePrefixFlag = manualGetFlagSettingRes.result.cardCodePrefixFlag;
if (this.isAdd && manualGetFlagSettingRes.result.cardCodePrefixDefault) {
this.form.cardCodePrefix = manualGetFlagSettingRes.result.cardCodePrefixDefault;
this.form.cardCodePrefixCheck = 1;
}
let res = null;
......@@ -599,7 +605,7 @@ export default {
this.form.cardDenomination = card.cardDenomination || 0;
if (!this.isAdd) {
this.form.cardCodePrefix = card.cardCodePrefix;
card.cardCodePrefix ? (this.form.cardCodePrefixCheck = 1) : '';
this.form.useCardCodePrefix = card.useCardCodePrefix;
}
if (this.isCopy && !res.result.giveEnable) {
this.form.giveFlag = 0;
......@@ -887,10 +893,7 @@ export default {
return;
}
}
if (!this.form.useCustomCode && this.cardCodePrefixFlag && this.form.cardCodePrefixCheck && !this.form.cardCodePrefix) {
this.$tips({ type: 'warning', message: '前缀不能为空' });
return;
}
// 验证号段 不能为空 起始号段和结尾号段必须位数一致
if (this.form.useCustomCode) {
if (!this.form.customCodeBegin || !this.form.customCodeEnd) {
......@@ -948,6 +951,10 @@ export default {
if (valid) {
this.saveUpdateCard();
} else {
if (!this.form.useCustomCode && this.cardCodePrefixFlag && this.form.useCardCodePrefix && !this.form.cardCodePrefix) {
this.$tips({ type: 'warning', message: '卡券code前缀不能为空' });
return false;
}
this.$tips({ type: 'warning', message: '表单提交错误,请检查表单是否填写完整' });
return false;
}
......@@ -1092,9 +1099,10 @@ export default {
}
card.cardCodeCount = this.form.customCodeEnd - this.form.customCodeBegin + 1;
} else {
if(this.form.cardCodePrefixCheck){
if(this.form.useCardCodePrefix ){
card.cardCodePrefix = this.form.cardCodePrefix
}
card.useCardCodePrefix =this.form.useCardCodePrefix
card.cardCodeCount = this.form.cardCodeCount;
}
// 用户使用有效期
......
......@@ -36,20 +36,26 @@
<el-input v-model="form.erpDemoCode" class="w400" placeholder="请输入demo券号" :disabled="isEdit || isInfo" @blur="checkErpDemoCode"></el-input>
</el-form-item>
<!-- 微盟微商城 微盟券号 -->
<!-- 微盟微商城 微盟卡券 -->
<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;">
<el-alert type="warning" :closable="false" class="f-alert" style="margin-bottom: 10px;margin-left:130px;">
<span slot="title">
1、请在下方选择对应的微盟卡券。GIC卡券的相关信息应与对应的微盟卡券保持一致,避免核销客诉!<br />
2、请确保下方所选的微盟卡券在微盟侧的“售后退券设置”为“支付前整单取消,退优惠券”,而不是其他设置,否则会导致微盟订单自动取消!
<div class="info-line">
<div class="dot"></div>
1、若需创建在微盟微商城与线下都可用的卡券,请在下方选择对应的微盟卡券。GIC卡券的相关信息应与对应的微盟卡券保持一致,避免核销客诉!
</div>
<div class="info-line">
<div class="dot"></div>
2、若需创建在微盟微商城与线下都可用的卡券,请确保微盟侧【设置-订单设置-售后流程设置】中的“售后退券设置”为“支付前整单取消,退优惠券”,而不是其他设置,否则会导致微盟订单自动取消!
</div>
</span>
</el-alert>
<el-form-item label="微盟券号">
<el-form-item label="微盟卡券">
<div class="mb10" v-for="(saveItem, idx) in weimobDemoCodeList" :key="idx">
<el-select class="w200" :disabled="saveItem.save || isEdit || isInfo" v-model="saveItem.pid" filterable placeholder="请选择店铺" clearable @change="handleShopChange($event, idx)">
<el-option :disabled="wmShopIds.includes(item.wmPid)" v-for="item in weimobShopList" :key="item.wmPid" :label="item.wmPidName" :value="item.wmPid"></el-option>
</el-select>
<el-select :disabled="!saveItem.pid || saveItem.save || isEdit || isInfo" :loading="saveItem.loading" class="w200" v-model="saveItem.card" filterable placeholder="请选择微盟券号" clearable>
<el-select :disabled="!saveItem.pid || saveItem.save || isEdit || isInfo" :loading="saveItem.loading" class="w200" v-model="saveItem.card" filterable placeholder="请选择微盟卡券" clearable>
<el-option v-for="item in saveItem.cardList" :key="item.cardTemplateId" :label="item.name" :value="item.cardTemplateId"></el-option>
</el-select>
<template v-if="isAdd || isCopy">
......@@ -113,8 +119,10 @@
</div>
<el-alert type="warning" show-icon :closable="false" class="f-alert">
<span slot="title">
微盟适用商品数据来源于微盟侧商品及商品参数,请确保填写正确。
<b v-if="latestReptileTime">最近同步时间 {{ latestReptileTime }}</b>
<div class="info-line">
微盟适用商品数据来源于微盟侧商品及商品参数,请确保填写正确。
<b v-if="latestReptileTime">最近同步时间 {{ latestReptileTime }}</b>
</div>
</span>
</el-alert>
</div>
......@@ -229,12 +237,12 @@
<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="cardCodePrefixFlag && form.useCustomCode === 0">
<el-form-item prop="cardCodePrefix" label="code号段" v-if="cardCodePrefixFlag && form.useCustomCode === 0">
<span class="fz13 gray">卡券code格式:随机编码</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" placeholder="限制3位以内字母/数字" @focus="form.cardCodePrefixCheck = 1" v-model="form.cardCodePrefix" :maxlength="3" @blur="checkInputString(form.cardCodePrefix, 'cardCodePrefix')"></el-input>
<span class="fz13 gray">请确保ERP支持添加前缀后的code</span>
<el-checkbox v-model="form.useCardCodePrefix" :true-label="1" :false-label="0" :disabled="isEdit || isInfo">前缀</el-checkbox>
<el-input class="w140" :disabled="isEdit || isInfo" placeholder="3位以内字母/数字" @focus="form.useCardCodePrefix = 1" v-model="form.cardCodePrefix" :maxlength="3" @blur="checkInputString(form.cardCodePrefix, 'cardCodePrefix')"></el-input>
<span class="fz13 gray">请确保ERP支持添加前缀后的code</span>
</div>
</el-form-item>
<el-form-item prop="customCodeBegin" label="code号段" v-show="form.useCustomCode === 1">
......@@ -424,6 +432,19 @@ export default cardForm;
/deep/ .el-alert__content {
line-height: 18px;
}
.info-line {
align-items: center;
display: flex;
color: #303133;
}
.dot {
width: 5px;
height: 5px;
background: #faad14;
border-radius: 2.5px;
display: inline-block;
margin-right: 8px;
}
}
.complex-and {
color: #535353;
......
......@@ -31,8 +31,8 @@
</div>
<div class="card-d">
<p class="card-d-title ellipsis">
<span :style="`background:${data.cardColor}`">{{ data.cardType | dct }}</span
>{{ data.cardName }}
<!-- <span :style="`background:${data.cardColor}`">{{ data.cardType | dct }}</span> -->
{{ data.cardName }}
</p>
<p class="card-d-time" v-if="data.cardEffectiveMode == 0">{{ time }}</p>
<p class="card-d-time ellipsis" v-if="data.cardEffectiveMode == 1">领取后{{ (data.startDay === 0 ? '当' : '第' + data.startDay) + '天,有效天数' + data.limitDay }}</p>
......@@ -352,7 +352,7 @@ export default {
margin-bottom: 11px;
position: relative;
margin-top: 2px;
padding-left: 48px;
// padding-left: 48px;
span {
position: absolute;
left: -20px;
......
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