Commit 17833860 by damodmg

优惠券使用新卡券门店组件

parent 0289e2e2
......@@ -2,4 +2,4 @@
gio('init','8be12240a3749eab', {});
//custom page code begin here
//custom page code end here
gio('send');</script><link href=./static/css/app.97ba787cc0dec5f582da122e7bc41c7b.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.41.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.9072594f61a88f768c70.js></script><script type=text/javascript src=./static/js/app.9578ae38b9471fcf9ed7.js></script></body></html>
\ No newline at end of file
gio('send');</script><link href=./static/css/app.55a6de0c91d04949096fd6bbfbdb6abe.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.41.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.9072594f61a88f768c70.js></script><script type=text/javascript src=./static/js/app.f9e7e9d0969bb39dc1e3.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.
......@@ -135,10 +135,13 @@
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span>
</el-form-item> -->
<span style="display:none">{{ refash }}</span>
<el-form-item label="展现门店" required style="position:relative">
<el-form-item label="展现门店" required style="position:relative" v-if="useNewStoreWidget === 0">
<vue-gic-store-linkage v-if="(mallProId && creatorId) || mallProId == -1" :creatorId="creatorId" :disabled="isInfo" @getDisGroupList="getDisGroupList" :msg="sendChildData" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
<el-form-item label="展现门店" v-if="useNewStoreWidget === 1">
<vue-gic-store-card class="pt10" ref="storeCard" :uuid.sync="uuid" scenes="" />
</el-form-item>
<el-form-item label="限兑">
<el-checkbox v-model="couponForm.limitTimesStatus" @change="refashData()">每个会员限制兑换</el-checkbox>
<span v-if="couponForm.limitTimesStatus"><el-input-number controls-position="right" v-model="couponForm.limitTimes" :precision="0" :min="0" @change="limitTimeChange"></el-input-number></span>
......@@ -326,7 +329,11 @@ export default {
canEdit: true,
groupIdDisableList: [],
proNameLen: 0,
creatorId: ''
creatorId: '',
useNewStoreWidget: 1, //1新的卡券门店组件 ,0老的门店组件
// 新版门店卡券选择器
isInfo: true,
uuid: ''
// 人群筛选器
// // 可传参数
// // projectName: 'integral-mall', // 当前项目名
......@@ -470,29 +477,39 @@ export default {
}
this.creatorId = res.data.result.creatorId;
this.refash = !this.refash;
this.sendChildData.storeType = Number(res.data.result.showStore);
if (this.sendChildData.storeType === 1) {
let arr = res.data.result.storeGroupIds.split(',');
for (let i = 0; i < arr.length; i++) {
if (this.groupIdDisableList.indexOf(arr[i]) !== -1) {
//存在
// console.log('不可删除的');
arr.splice(i, 1);
i--;
this.useNewStoreWidget = res.data.result.useNewStoreWidget;
if (this.useNewStoreWidget === 0) {
this.sendChildData.storeType = Number(res.data.result.showStore);
if (this.sendChildData.storeType === 1) {
let arr = res.data.result.storeGroupIds.split(',');
for (let i = 0; i < arr.length; i++) {
if (this.groupIdDisableList.indexOf(arr[i]) !== -1) {
//存在
// console.log('不可删除的');
arr.splice(i, 1);
i--;
}
}
this.sendChildData.storeGroupIds = arr.join(',');
// this.sendChildData.storeGroupIds = res.data.result.storeGroupIds || '';
} else if (this.sendChildData.storeType === 2) {
let list = [];
if (res.data.result.storeInfo) {
res.data.result.storeInfo.map(v => {
list.push(v);
});
}
this.sendChildData.storeIds = list;
}
this.sendChildData.storeGroupIds = arr.join(',');
// this.sendChildData.storeGroupIds = res.data.result.storeGroupIds || '';
} else if (this.sendChildData.storeType === 2) {
let list = [];
if (res.data.result.storeInfo) {
res.data.result.storeInfo.map(v => {
list.push(v);
});
}
this.sendChildData.storeIds = list;
this.getSelectGroupData(this.sendChildData);
} else if (this.useNewStoreWidget === 1) {
this.uuid = res.data.result.storeWidgetId;
this.$nextTick(_ => {
// console.log(this.$refs.storeCard);
this.$refs.storeCard.init();
});
}
this.getSelectGroupData(this.sendChildData);
//限兑
if (res.data.result.limitTimes === -1) {
this.couponForm.limitTimesStatus = false;
......@@ -887,6 +904,8 @@ export default {
memberGrade: this.couponForm.memberGrade.join(','), //适用会员
showStore: this.sendChildData.storeType, // 显示门店 0所有 1部分分类 2部分门店
storeIds: '', //展现门店id
storeWidgetId: '',
useNewStoreWidget: this.useNewStoreWidget,
limitTimes: this.couponForm.limitTimesStatus ? this.couponForm.limitTimes : '-1', //限兑
exchangeDateType: this.couponForm.exchangeDateType, //兑换日期
exchangeFixDateBegin: this.couponForm.exchangeDateType === 2 ? this.getTime(this.couponForm.exchangeFixDate[0]) : '', //固定日期
......@@ -899,21 +918,25 @@ export default {
limitTimeBegin: this.couponForm.releaseType === 2 ? this.getTimeAll(this.couponForm.limitTimeBegin) : '' //定时上架时间
};
// 门店分类
if (this.sendChildData.storeType === 1) {
if (this.sendChildData.storeGroupIds) {
params.storeGroupIds = this.sendChildData.storeGroupIds || '';
} else {
this.$message.error('门店分类不能为空');
return;
}
} else if (this.sendChildData.storeType === 2) {
if (this.sendChildData.storeIds.length) {
params.storeIds = this.sendChildData.storeIds.map(v => v.storeId).join(',');
} else {
params.storeIds = '';
this.$message.error('部分门店不能为空');
return;
if (this.useNewStoreWidget === 0) {
if (this.sendChildData.storeType === 1) {
if (this.sendChildData.storeGroupIds) {
params.storeGroupIds = this.sendChildData.storeGroupIds || '';
} else {
this.$message.error('门店分类不能为空');
return;
}
} else if (this.sendChildData.storeType === 2) {
if (this.sendChildData.storeIds.length) {
params.storeIds = this.sendChildData.storeIds.map(v => v.storeId).join(',');
} else {
params.storeIds = '';
this.$message.error('部分门店不能为空');
return;
}
}
} else if (this.useNewStoreWidget === 1) {
params.storeWidgetId = this.uuid;
}
// 部分时段时间转换
......
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