Commit 75dce083 by 陈羽

Merge branch 'master' of http://git.gicdev.com/marketing-web/marketing into feature/弹窗推广

parents b6799985 7a7d603b
<!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/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.611ef6dbce9d0672c7efe94156a40035.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/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.45.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.19.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.2.28.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.71.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.43.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.16.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.2.21.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/activity-select.1.0.2.1.js></script><script type=text/javascript src=/marketing/static/js/manifest.8840a4288428b22b2c78.js></script><script type=text/javascript src=/marketing/static/js/vendor.fef1c3d3b3b586faaee2.js></script><script type=text/javascript src=/marketing/static/js/main.19fe2027c79604e65f20.js></script></body></html>
<!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/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.799551577273f91360048ffa3bbb3d1c.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/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.45.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.19.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.2.28.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.71.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.43.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.16.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.2.21.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/activity-select.1.0.2.1.js></script><script type=text/javascript src=/marketing/static/js/manifest.581985d1bd4d0508813f.js></script><script type=text/javascript src=/marketing/static/js/vendor.1bebc6ed2a07e457fac4.js></script><script type=text/javascript src=/marketing/static/js/main.30912736c5d34f2fe1a4.js></script></body></html>
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.
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.
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.
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.
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.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,c,o){for(var f,i,u,d=0,s=[];d<n.length;d++)i=n[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(r&&r(n,c,o);s.length;)s.shift()();if(o)for(d=0;d<o.length;d++)u=a(a.s=o[d]);return u};var n={},t={15:0};function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,a){r=t[e]=[n,a]});r[2]=n;var c=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,a.nc&&o.setAttribute("nonce",a.nc),o.src=a.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"scan",6:"ecm",7:"evaluation",8:"activity",9:"cdKey",10:"recharge",11:"msg",12:"calllog"}[e]||e)+"."+{0:"9357837e6b2af2ac4ef4",1:"eea2e1b17aec2d5b19cf",2:"39ad05eb5da3dc4c9d1a",3:"ca796a3f2a45a99bb83c",4:"14da927c4cfa606cba4f",5:"25c6246c0480e836d9a2",6:"113d0d4b1370ebf4e264",7:"f28dbb0af585171c22eb",8:"bc6eab7430e4e0e9385f",9:"af811e90e79a76129b6d",10:"c4dfb3d423bc3d3905eb",11:"179854e3f9d6f3a2b732",12:"7131c6b2d97281c750f7"}[e]+".js";var f=setTimeout(i,12e4);function i(){o.onerror=o.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=i,c.appendChild(o),n},a.m=e,a.c=n,a.d=function(e,r,n){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,a,o){for(var f,i,u,d=0,s=[];d<n.length;d++)i=n[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(r&&r(n,a,o);s.length;)s.shift()();if(o)for(d=0;d<o.length;d++)u=c(c.s=o[d]);return u};var n={},t={15:0};function c(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,c){r=t[e]=[n,c]});r[2]=n;var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,c.nc&&o.setAttribute("nonce",c.nc),o.src=c.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"scan",6:"ecm",7:"evaluation",8:"activity",9:"cdKey",10:"recharge",11:"msg",12:"calllog"}[e]||e)+"."+{0:"db1a71be3cfd9f2c2a27",1:"4e36dc6b55e0fd2d3c84",2:"1aad863c428279c5a169",3:"83c06aa714fa01a48b43",4:"c8a5e5c668cdc258c3c4",5:"b47c86054f1d394a7cc6",6:"45bb9fe80d5596758194",7:"ecf8f42559b898ee9c01",8:"35efeb2ae926b54b4341",9:"acd1803f49e3f7121560",10:"e5cd16e4f5e1229ea313",11:"00a6edc9657c9e4c34fa",12:"f1c9fa1ccd0d36ae0602"}[e]+".js";var f=setTimeout(i,12e4);function i(){o.onerror=o.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=i,a.appendChild(o),n},c.m=e,c.c=n,c.d=function(e,r,n){c.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="/marketing/",c.oe=function(e){throw console.error(e),e}}([]);
\ 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.
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.
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.
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.
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.
......@@ -134,6 +134,7 @@ export default {
const that = this;
return {
requestProject: 'marketing',
gicCouponType: '', // gic定义的卡券类型(0:普通卡券, 1:e待洗, 2:好办卡券, 3:微盟外部券, 4:通用外部券
creatorId: '',
uuid: '',
canEdit: false,
......@@ -248,7 +249,8 @@ export default {
// 转赠页面首图
code: '015f1e5a-3b2f-42f5-b638-6a29c17e8f7e',
imgUrl: 'https://pic01-10001430.image.myqcloud.com/015f1e5a-3b2f-42f5-b638-6a29c17e8f7e'
}
},
showWeimobDemoSelector: false
};
},
watch: {
......@@ -404,6 +406,7 @@ export default {
},
// 改变用户使用有效期类型
changeCardEffectiveMode(val, cover = true) {
this.form.sendDateTime = [];
this.reCheckSendDateTime();
const { dateTime, sendDateTime } = this.form;
if (!cover && sendDateTime && sendDateTime[0]) {
......@@ -428,8 +431,8 @@ export default {
if (val == 0) {
// 想要设置为自动领取
this.$confirm(
`<div class="fz16 mb10">是否关闭用户手动领取?</div><div class="regular-font-color fz13">用户在领取卡券后需要<b class="bold">同步至ERP</b>,如果关闭用户<b class="bold">手动领取</b>,卡券在<b class="bold">批量投放</b>时会需要将卡券信息批量同步至ERP。
该过程可能需要持续一段时间(具体同步时间和同步卡券张数以及ERP性能有关,参考同步时间为1万张卡券1个小时)。
`<div class="fz16 mb10">是否关闭用户手动领取?</div><div class="regular-font-color fz13">用户在领取卡券后需要<b class="bold">同步至ERP</b>,如果关闭用户<b class="bold">手动领取</b>,卡券在<b class="bold">批量投放</b>时会需要将卡券信息批量同步至ERP。
该过程可能需要持续一段时间(具体同步时间和同步卡券张数以及ERP性能有关,参考同步时间为1万张卡券1个小时)。
当前支持不需要用户手动领取的卡券库存最大值为<b class="bold">${this.couponAutoGetStock}</b>张。</div>`,
'提示',
{
......@@ -512,7 +515,9 @@ export default {
if (res.result.card) {
const card = res.result.card;
// 3、4为外部券,不显示保存按钮
this.storeMode = card.storeMode === 0 ? 0 : 1;
this.gicCouponType = card.gicCouponType;
this.form.cardApplyChannel = card.cardApplyChannel ? card.cardApplyChannel.split(',') : [];
this.form.auditingStatus = card.auditingStatus || '';
this.form.giveFlag = card.giveFlag;
......@@ -562,7 +567,9 @@ export default {
this.only = Boolean(useCondition.only);
this.form.proNoList = useCondition.proNo ? [{ name: useCondition.proNo, id: useCondition.proNo }] : [];
}
if (card.weimobDemoCode && JSON.parse(card.weimobDemoCode).length > 0) {
this.showWeimobDemoSelector = true;
}
// 微盟券号 -- 复制不赋值
if (card.cardApplyChannel.indexOf('WMmicroMall') !== -1 && card.weimobDemoCode && (this.isAdd || this.isInfo || this.isEdit)) {
this.weimobDemoCodeList = JSON.parse(card.weimobDemoCode).map(v => {
......@@ -620,11 +627,38 @@ export default {
// 线下适用商品
if (card.goodsSearchDetail && card.goodsFilterId) {
this.xxSysp.goodsFilterId = card.goodsFilterId;
const goodsSearchDetail = JSON.parse(card.goodsSearchDetail);
const goodsSearchDetail = JSON.parse(card.goodsSearchDetail || '{}');
this.xxSysp.conditionList = this.xxSysp.conditionList_copy = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
this.xxSysp.conditionList = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
this.xxSysp.conditionList_copy = deepClone(goodsSearchDetail.conditionList); // 备份数据
this.xxSysp.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
this.xxSysp.conditionList_copy = deepClone(goodsSearchDetail.conditionList || {}); // 备份数据
if (card.gicCouponType == 3 || card.gicCouponType == 4) {
const filterAbbrInfo = (goodsSearchDetail.filterAbbrInfo || []).map(el => {
return el.map((item, index) => {
if (index == 0) {
item.optName = null;
}
// intersect 或者,union 并且,diff 剔除
switch (item.optName) {
case 'intersect':
item.optName = '或者';
break;
case 'union':
item.optName = '并且';
break;
case 'diff':
item.optName = '剔除';
break;
default:
item.optName = null;
break;
}
return item;
});
});
this.xxSysp.filterAbbrInfo = this.xxSyspLabel(filterAbbrInfo);
} else {
this.xxSysp.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
}
}
this.form.cardLimit = card.cardLimit;
......@@ -901,10 +935,7 @@ export default {
// sale_limit.fee 消费金额满,sale_limit.goods 消费指定商品; goods.ok 适用商品, goods.no 不适应商品, only: 1 不与其他优惠共享(不勾选only不传)
} else if (this.form.cardType === 2) {
card.useCondition = {
sale_limit: {
fee: this.sale_limit.fee,
goods: this.sale_limit.goods
},
sale_limit: {},
goods: {
ok: this.goods.ok,
no: this.goods.no
......@@ -913,6 +944,12 @@ export default {
proNo: this.form.proNoList.length ? this.form.proNoList[0].id : '',
products_exchange_number: this.form.proNoList.length ? this.form.products_exchange_number : 0
};
// 兑换券的使用条件参数只能传一个,不能同时传
if (this.sale_limit.type == 1) {
card.useCondition.sale_limit = { fee: this.sale_limit.fee };
} else if (this.sale_limit.type == 2) {
card.useCondition.sale_limit = { goods: this.sale_limit.goods };
}
if (this.only) {
card.useCondition.only = Number(this.only);
}
......@@ -998,7 +1035,7 @@ export default {
card.startDay = this.form.startDay || 0;
card.limitDay = this.form.limitDay || 0;
}
// 卡券模板投放期限 putEffectiveMode(0:固定日期,1:长期)
const { cardEffectiveMode, putEffectiveMode, sendDateTime } = this.form;
card.putEffectiveMode = cardEffectiveMode == 0 || (cardEffectiveMode == 1 && putEffectiveMode == 0) ? 0 : 1;
......@@ -1007,7 +1044,7 @@ export default {
card.putBeginDate = formatDateTimeByType(sendDateTime[0], 'yyyy-MM-dd');
card.putEndDate = formatDateTimeByType(sendDateTime[1], 'yyyy-MM-dd');
}
card.jumpFlag = this.form.jumpFlag;
card.jumpLink = card.jumpFlag ? this.form.jumpLink : {};
......@@ -1150,6 +1187,9 @@ export default {
if (now.expireDateType == 1) {
this.form.cardEffectiveMode = 0;
this.form.dateTime = [now.startDate, now.expireDate];
this.$nextTick(() => {
this.$refs.effectDate.$emit('change', 0, false);
})
}
if (now.expireDateType == 2) {
if (now.expDayCount > 1200) {
......
......@@ -18,7 +18,7 @@
</el-form-item>
<el-form-item prop="subName" label="备注名">
<dm-input v-model="form.subName" class="w400" placeholder="请输入备注名称" :disabled="isEdit || isInfo" :byteType="1" :maxlength="10"></dm-input>
<dm-input v-model="form.subName" class="w400" placeholder="请输入备注名称" :disabled="isEdit || isInfo" :byteType="1" :maxlength="15"></dm-input>
</el-form-item>
<el-form-item prop="subTitle" label="卡券副标题">
......@@ -30,7 +30,7 @@
</el-form-item>
<!-- 微盟微商城 微盟券号 -->
<template v-if="form.cardApplyChannel.indexOf('WMmicroMall') !== -1 && countFlag">
<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>
</el-alert>
......@@ -59,7 +59,7 @@
</el-form-item>
<!-- 抵金券 -->
<el-form-item prop="cardDenomination" label="减免金额" v-if="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 === 0"> <el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="form.cardDenomination" class="200" :precison="0" :min="0" :max="10000000"></el-input-number><span class="fz12 gray">请输入大于0的整数</span> </el-form-item>
<!-- 折扣券 -->
<el-form-item prop="cardDenomination" label="折扣额度" v-if="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>
......@@ -119,11 +119,13 @@
<span :key="idx" class="item">{{ item.text }}</span>
</template>
</div>
<template v-if="xxSysp.goodsEnable && (((isEdit || isInfo) && xxSysp.filterAbbrInfo.length) || isAdd || isCopy)">
<el-button type="primary" @click="handleXxSyspClick" class="fl mt5" size="mini">{{ isEdit || isInfo ? '查看' : '编辑' }}</el-button>
<el-button v-show="xxSysp.filterAbbrInfo.length && !isEdit && !isInfo" @click="handleXxSyspReset" class="fl mt5" size="mini">清空</el-button>
<template v-if="gicCouponType != 3 && gicCouponType != 4">
<template v-if="xxSysp.goodsEnable && (((isEdit || isInfo) && xxSysp.filterAbbrInfo.length) || isAdd || isCopy)">
<el-button type="primary" @click="handleXxSyspClick" class="fl mt5" size="mini">{{ isEdit || isInfo ? '查看' : '编辑' }}</el-button>
<el-button v-show="xxSysp.filterAbbrInfo.length && !isEdit && !isInfo" @click="handleXxSyspReset" class="fl mt5" size="mini">清空</el-button>
</template>
<p v-else class="fz14 gray">未选择</p>
</template>
<p v-else class="fz14 gray">未选择</p>
</div>
<div v-if="xxSysp.goodsEnable && (((isEdit || isInfo) && xxSysp.filterAbbrInfo.length) || isAdd || isCopy)" class="tips fz12 gray"><span class="w100 pr10 inline-block"></span>* 仅支持第三方api接口核销卡券时使用</div>
</div>
......@@ -232,7 +234,7 @@
</el-tooltip>
<div>
<el-radio @change="changeCardEffectiveMode" v-model="form.cardEffectiveMode" :disabled="isEdit || isInfo || cardValidity" :label="0">固定日期</el-radio>
<el-date-picker @change="changeCardEffectiveMode(0, false)" v-model="form.dateTime" @focus="form.cardEffectiveMode = 0" :disabled="isEdit || isInfo || cardValidity" :picker-options="pickerOptions" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker ref="effectDate" @change="changeCardEffectiveMode(0, false)" v-model="form.dateTime" @focus="form.cardEffectiveMode = 0" :disabled="isEdit || isInfo || cardValidity" :picker-options="pickerOptions" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="pt20">
<el-radio @change="changeCardEffectiveMode" v-model="form.cardEffectiveMode" :label="1" :disabled="isEdit || isInfo || cardValidity">领取后,</el-radio>
......@@ -249,13 +251,13 @@
<span class="tooltip-icon cursor">卡券模板投放期限</span>
</el-tooltip>
<div v-if="form.cardEffectiveMode == 0">
<el-date-picker v-model="form.sendDateTime" :disabled="isEdit || isInfo" :picker-options="pickerOptions2" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker v-model="form.sendDateTime" :disabled="isEdit || isInfo || form.cardApplyChannel.indexOf('WMmicroMall') !== -1" :picker-options="pickerOptions2" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<span class="gray fz13">* 卡券模板投放期限结束日期不能超过卡券使用有效期固定日期结束日期</span>
</div>
<div v-if="form.cardEffectiveMode == 1" style="height:35px;">
<el-radio @change="resetSendDateTime" v-model="form.putEffectiveMode" :disabled="isEdit || isInfo" :label="1">长期有效</el-radio>
<el-radio @change="resetSendDateTime" v-model="form.putEffectiveMode" :disabled="isEdit || isInfo" :label="0">固定日期</el-radio>
<el-date-picker v-if="form.putEffectiveMode == 0" v-model="form.sendDateTime" @focus="form.putEffectiveMode = 0" :disabled="isEdit || isInfo" :picker-options="pickerOptions" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-radio @change="resetSendDateTime" v-model="form.putEffectiveMode" :disabled="isEdit || isInfo || form.cardApplyChannel.indexOf('WMmicroMall') !== -1" :label="1">长期有效</el-radio>
<el-radio @change="resetSendDateTime" v-model="form.putEffectiveMode" :disabled="isEdit || isInfo || form.cardApplyChannel.indexOf('WMmicroMall') !== -1" :label="0">固定日期</el-radio>
<el-date-picker v-if="form.putEffectiveMode == 0" v-model="form.sendDateTime" @focus="form.putEffectiveMode = 0" :disabled="isEdit || isInfo || form.cardApplyChannel.indexOf('WMmicroMall') !== -1" :picker-options="pickerOptions" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</el-form-item>
......
<template>
<li class="card-item inline-block" :style="'border:1px solid ' + item.cardColor">
<div class="card-item_head" :style="'background:' + item.cardColor">
<!-- gic定义的卡券类型(0:普通卡券, 1:e待洗, 2:好办卡券, 3:微盟外部券, 4:通用外部券 -->
<el-tooltip placement="top" v-if="item.gicCouponType == 3 || item.gicCouponType == 4">
<div style="max-width: 300px" slot="content">{{ item.gicCouponType | getTipText }}</div>
<span class="card-item_head-tip">外部券<i class="iconfont icon-xinxixianshi card-item_head-icon"></i></span>
</el-tooltip>
<h4>{{ item.cardName }}</h4>
<p>{{ item.subName }}</p>
</div>
......@@ -57,7 +62,7 @@
</p>
</div>
<div class="card-item_foot clearfix">
<div class="fl">
<div class="fl" v-if="item.gicCouponType != 3 && item.gicCouponType != 4">
<!-- 由外部api创建 仅展示详情、删除、报表按钮 -->
<span v-if="item.auditingStatus !== -1"
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="!shelfFlag && item.useCustomCode === 0 && item.canEdit !== false && !item.isApiCreate" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
......@@ -146,6 +151,15 @@ export default {
}
},
filters: {
getTipText(type) {
let result = '--';
if (type == 3) {
result = '当前卡券由微盟侧创建,由微盟侧进行卡券控制。在GIC侧只能用于卡券直投、智能营销和扫码营销。';
} else if (type == 4) {
result = '当前卡券由外部创建,由外部进行卡券控制,无法在GIC侧进行发放。';
}
return result;
},
filterUseCondition(val) {
var _useCondition = JSON.parse(val);
return (typeof _useCondition.sale_limit === 'undefined' ? '' : (typeof _useCondition.sale_limit.fee === 'undefined' ? '' : (_useCondition.sale_limit.fee ? '最低消费满' + _useCondition.sale_limit.fee : '无最低消费要求') + ';') + (typeof _useCondition.sale_limit.goods === 'undefined' ? '' : '消费指定商品' + _useCondition.sale_limit.goods + ';')) + (typeof _useCondition['goods'] === 'undefined' ? '' : (typeof _useCondition.goods.ok === 'undefined' ? '' : '适用商品(' + (_useCondition.goods.ok || '无') + ');') + (typeof _useCondition.goods.no === 'undefined' ? '' : '不适用商品(' + (_useCondition.goods.no || '无') + ');')) + (typeof _useCondition.only === 'undefined' || _useCondition.only == 0 ? '' : '不可与其他优惠共享');
......@@ -163,11 +177,30 @@ export default {
vertical-align: middle;
min-height: 376px;
&_head {
position: relative;
width: 100%;
text-align: center;
color: #fff;
background: #63b359;
padding: 10px 0;
.card-item_head-tip {
position: absolute;
top: -1px;
left: -1px;
width: 76px;
height: 24px;
line-height: 24px;
background: #d9e9f8;
border-radius: 3px 0px 16px 0px;
font-size: 12px;
font-weight: 400;
color: #1890ff;
cursor: default;
.card-item_head-icon {
margin-left: 5px;
font-size: 12px;
}
}
h4 {
font-size: 16px;
font-weight: 500;
......
......@@ -11,11 +11,16 @@ export default Vue.component('render-temp', {
render(h) {
const canEdit = this.item.canEdit !== false; // 只有canEdit === false 才证明不能使用 没有权限仅可以详情/报表
const isApiCreate = this.item.isApiCreate || false; // 由外部api创建 仅展示详情、删除、报表按钮
const showPutonBtn = this.item.showPutonBtn || false;
// 当前卡券是否 是长期有效||在投放有效期内
// putEffectiveMode 0:固定日期,1:长期
const canGroupSend = this.item.putEffectiveMode == 1 ? true : new Date() > new Date(this.item.putBeginDate) && new Date() < new Date(this.item.putEndDate);
const isWeimo = this.item.gicCouponType == 3;
const isCommon = this.item.gicCouponType == 4;
// 微盟外部券:领取记录、投放、报表
// 通用外部券:领取记录、报表
const bind1 =
canEdit && !isApiCreate && canGroupSend ? (
canEdit && (!isApiCreate || isWeimo) && canGroupSend && !isCommon && showPutonBtn ? (
<a title="投放" onClick={this.handler.bind(null, 1)}>
<i class="iconfont icon-daohang-" />
</a>
......@@ -27,27 +32,29 @@ export default Vue.component('render-temp', {
<i class="el-icon-tickets" />
</a>
);
const bind3 = !isApiCreate ? (
<a title="编辑" onClick={this.handler.bind(null, 3)}>
<i class="el-icon-edit" />
</a>
) : (
''
);
const bind4 = canEdit ? (
<a title="删除" onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
''
);
const bind3 =
!isWeimo && !isCommon && !isApiCreate ? (
<a title="编辑" onClick={this.handler.bind(null, 3)}>
<i class="el-icon-edit" />
</a>
) : (
''
);
const bind4 =
canEdit && !isWeimo && !isCommon ? (
<a title="删除" onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
''
);
const bind5 = (
<a title="详情" onClick={this.handler.bind(null, 5)}>
<i class="el-icon-document" />
</a>
);
const bind6 =
canEdit && !isApiCreate ? (
canEdit && !isApiCreate && !isWeimo && !isCommon ? (
<a title="复制" onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
......@@ -56,7 +63,7 @@ export default Vue.component('render-temp', {
);
const bind7 =
canEdit && !isApiCreate ? (
(canEdit && !isApiCreate) || isWeimo || isCommon ? (
<a style="position:relative;top:1px" title="领取记录" onClick={this.handler.bind(null, 7)}>
<i class="iconfont icon-tubiaozhizuomoban-" />
</a>
......@@ -72,6 +79,7 @@ export default Vue.component('render-temp', {
{bind2}
{bind3}
{bind4}
{isWeimo || isCommon ? bind5 : ''}
</span>
);
const overDateHtml = (
......
......@@ -31,6 +31,10 @@
<div slot="content" style="max-width:300px">{{ scope.row.remark || '--' }}</div>
<i class="el-icon-warning" style="color:#f56c6c;cursor:pointer;margin-left:3px;"></i>
</el-tooltip>
<el-tooltip v-if="scope.row.putonStatus === 5" :open-delay="300" class="item" effect="dark">
<div slot="content" style="max-width:300px">{{ scope.row.remark || '--' }}</div>
<i class="el-icon-warning" style="color:#f56c6c;cursor:pointer;margin-left:3px;"></i>
</el-tooltip>
<div v-if="scope.row.putonStatus === 1">
<time-counts class="primary-color fz12" :defaultVal="scope.row.putonTime" :autoStart="true"></time-counts>
</div>
......@@ -40,7 +44,7 @@
<el-table-column label="操作" align="left" width="150px" fixed="right">
<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 && scope.row.canEdit !== false" @click="$router.push('/card/groupsend/' + scope.row.putonId)">编辑</el-button>
<el-button type="text" v-if="scope.row.putonStatus !== 2 && scope.row.putonStatus !== 3 && scope.row.canEdit !== false && scope.row.putonStatus !== 5 && scope.row.putonStatus !== 6" @click="$router.push('/card/groupsend/' + scope.row.putonId)">编辑</el-button>
<el-button type="text" v-if="scope.row.putonTime > nowDate" @click="$router.push('/card/record/sendInfo/' + scope.row.putonId)">记录</el-button>
<dm-delete v-if="scope.row.putonStatus !== 2 && scope.row.canEdit !== false" @confirm="delData(scope.row)" tips="是否删除该投放记录?">
<el-button type="text">删除</el-button>
......
......@@ -251,7 +251,7 @@
<section class="dm-form__wrap">
<h3 class="dm-title__label">营销事件</h3>
<!-- 只有实时才是单图文 -->
<marketing-event :readOnly="isInfo" ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1"></marketing-event>
<marketing-event :readOnly="isInfo" show-out-coupon-icon ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1"></marketing-event>
<!-- 只有非实时&&选择卡券了展示提示 -->
<div v-if="currentCard.comName && form.effectType != 0 && couponAutoGetFlag" class="fz13 regular-font-color line-height2" style="margin-left:120px;margin-top:30px;">
* 用户在领取卡券后需要<b class="bold">同步至ERP</b>,如果关闭用户<b class="bold">手动领取</b>,卡券在<b class="bold">批量投放</b>时会需要将卡券信息批量同步至ERP。 <br />
......
......@@ -22,9 +22,13 @@
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="140" align="left" prop="cardName" label="卡券名称">
<el-table-column width="140" align="left" prop="cardName" label="卡券名称">
<template slot-scope="scope">
<p style="line-height:22px;">{{ scope.row.cardName }}</p>
<el-tooltip v-if="scope.row.showTooltip" :content="scope.row.cardName" placement="top">
<span class="card-name" :style="{ 'max-width': showOutCouponIcon && (scope.row.gicCouponType == 3 || scope.row.gicCouponType == 4) ? '65px' : '115px' }">{{ scope.row.cardName }}</span>
</el-tooltip>
<span v-else class="card-name">{{ scope.row.cardName }}</span>
<i class="out-coupon-icon" v-if="showOutCouponIcon && (scope.row.gicCouponType == 3 || scope.row.gicCouponType == 4)">外部券</i>
<p style="line-height:20px;color:#909399;font-size:13px;">{{ scope.row.subName }}</p>
</template>
</el-table-column>
......@@ -48,7 +52,7 @@
{{ scope.row.storeMode === 0 ? '所有门店' : scope.row.storeMode === 1 ? '部分分组' : '部分门店' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="100" align="left" prop="couponStock" label="库存"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="100" align="left" prop="couponStock" label="库存" :formatter="(row, col, val) => (showOutCouponIcon ? '--' : val)"></el-table-column>
</el-table>
<dm-pagination v-show="tableList.length" class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="prev, pager, next" :total="total"></dm-pagination>
<span slot="footer" class="dialog-footer">
......@@ -71,6 +75,11 @@ export default {
cardLimitType: {
type: Number,
default: 1
},
// 是否展示外部券标识 true:展示 false不展示
showOutCouponIcon: {
type: Boolean,
default: false
}
},
computed: {
......@@ -113,6 +122,17 @@ export default {
this.getCardList();
},
methods: {
getTextWidth(text) {
const span = document.createElement('span');
span.innerHTML = text;
span.style.position = 'fixed';
span.style.zIndex = -1;
span.style.opacity = 0;
document.body.appendChild(span);
const width = span.offsetWidth;
document.body.removeChild(span);
return width;
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.getCardList();
......@@ -123,9 +143,14 @@ export default {
},
getCardList() {
this.loading = true;
getCardList(this.listParams).then(res => {
// useExtCard 能否使用微盟外部券: 0:否, 1:可以
getCardList(Object.assign({}, this.listParams, { useExtCard: this.showOutCouponIcon ? 1 : 0 })).then(res => {
if (res.errorCode === 0) {
this.tableList = res.result.result || [];
this.tableList = (res.result.result || []).map(el => {
// 如果是外部券,而且配置显示外部券标识,需要缩短cardName的显示长度
el.showTooltip = this.getTextWidth(el.cardName) > (this.showOutCouponIcon && (el.gicCouponType == 3 || el.gicCouponType == 4) ? 65 : 115);
return el;
});
this.total = res.result.totalCount;
}
this.loading = false;
......@@ -160,3 +185,25 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.card-name {
display: inline-block;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 22px;
}
.out-coupon-icon {
margin-left: 5px;
padding: 3px 4px;
background: #fff1f0;
border-radius: 2px;
border: 1px solid #ffa39e;
font-size: 12px;
font-weight: 400;
color: #f5222d;
font-style: normal;
}
</style>
......@@ -32,7 +32,7 @@
</transition>
</div>
<!-- 弹窗组件 -->
<component :is="dialogCom" @sendItem="saveToList" :item="currentItem" :show.sync="dialogShow" :isSupportVar="isSupportVar" :cardLimitType="cardLimitType" :integralMultiple="integralMultiple" :singleFlag="singleFlag"></component>
<component :is="dialogCom" @sendItem="saveToList" :showOutCouponIcon="showOutCouponIcon" :item="currentItem" :show.sync="dialogShow" :isSupportVar="isSupportVar" :cardLimitType="cardLimitType" :integralMultiple="integralMultiple" :singleFlag="singleFlag"></component>
</section>
</template>
......@@ -125,6 +125,11 @@ export default {
// 只读
type: Boolean,
default: false
},
// 是否展示外部券标识,仅用于卡券选择器中控制外部券标识展示 true:展示 false不展示
showOutCouponIcon: {
type: Boolean,
default: false
}
},
data() {
......
......@@ -57,7 +57,7 @@
<h3 class="title mt46">营销事件</h3>
<div>
<!-- 只有实时才是单图文 -->
<marketing-event style="margin-top:0;" :readOnly="isInfo" ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1"></marketing-event>
<marketing-event style="margin-top:0;" show-out-coupon-icon :readOnly="isInfo" ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1"></marketing-event>
<!-- 只有存在卡券的情况下出现卡券通知方式 -->
<section v-if="currentCard.comName">
<h3 class="title mt46">卡券通知方式配置</h3>
......
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