Commit 26f333ac by damodmg

添加微信兑换券

parent fcb450ff
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>微商城</title><link href=./static/css/app.a901a4335d77383815a4dd3b36ad2a52.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.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.e759de81c29654e18f39.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=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>微商城</title><link href=./static/css/app.3989cb46107a23638dfa12f769744d67.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.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.f2a0eb46e60be63e3ed2.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.
......@@ -175,12 +175,40 @@
<el-date-picker v-model="giftForm.limitTimeBegin" type="datetime" placeholder="选择日期时间"> </el-date-picker>
</el-form-item>
<el-form-item label="配送方式" required>
<el-radio-group v-model="giftForm.changeType" @change="changeDeliver">
<el-radio-group v-model="giftForm.changeType" @change="changeDeliver" :disabled="editChangeTypeStatus">
<el-radio :label="2" v-if="giftType === 1">快递发货</el-radio>
<el-radio :label="3" v-if="giftType === 0">在线发货</el-radio>
<el-radio :label="1">微信兑换券</el-radio>
</el-radio-group>
</el-form-item>
<div class="section-content" v-show="giftForm.changeType === 1">
<h3>选择卡券</h3>
<el-form-item label="选择卡券" required v-show="cardList.length === 0">
<el-button plain @click="showCard">添加卡券</el-button>
</el-form-item>
<el-form-item label="选择卡券" required v-show="cardList.length > 0">
<el-table :data="cardList" style="width: 900px">
<el-table-column label="卡券名称" prop="cardName"> </el-table-column>
<el-table-column label="有效期" prop="limitDay">
<template slot-scope="scope">
<div v-if="scope.row.cardEffectiveMode == 0">固定日期:{{ scope.row.beginDate + '至' + scope.row.endDate }}</div>
<div v-if="scope.row.cardEffectiveMode == 1">领取后{{ (scope.row.startDay === 0 ? '当' : scope.row.startDay) + '天,有效天数' + scope.row.limitDay }}</div>
</template>
</el-table-column>
<el-table-column label="领取限制">
<template slot-scope="scope">
{{ scope.row.cardLimit }}张/人
</template>
</el-table-column>
<el-table-column label="适用门店">
<template slot-scope="scope">
{{ scope.row.storeMode === 0 ? '所有门店' : scope.row.storeMode === 1 ? '部分分组' : '部分门店' }}
</template>
</el-table-column>
<el-table-column label="库存" prop="couponStock"> </el-table-column>
</el-table>
</el-form-item>
</div>
</div>
<div class="section-content">
......@@ -210,6 +238,8 @@
</div>
<!-- 新建分类弹框 -->
<addCate :addCateModal="addCateModal" @getCategoryOptions="getCategoryOptions"></addCate>
<!-- 卡券选择弹框 -->
<vue-gic-card :disabledList="disabledList" :projectName="projectName" :showCardDialog="showCardDialog" :cardLimit="cardLimit" :cardType="cardType" @selectCard="selectCard" ref="dmcard"></vue-gic-card>
</div>
</template>
......@@ -304,17 +334,34 @@ export default {
skuList: [], //sku列表
submitSkuJson: [],
skuHeaderList: [],
IsAgreeUploadStatus: false //是否允许上传
IsAgreeUploadStatus: false, //是否允许上传
// 卡券数据
// 可传参数
// projectName: 'intergral-mall', //当前项目名
showCardDialog: false,
cardLimit: 3, //卡券限制类型 1-限制领取1张的卡券 2- 限制领取 1~100的卡券 3-限制领取&=100 的卡券
cardType: null, //卡券类型集合(0:抵金券,1:折扣券,2:兑换券)null-为全部类型 逗号分隔
disabledList: [],
selectedData: {},
cardList: [],
editChangeTypeStatus: false
// proReferId: ''
};
},
created() {
this.giftType = Number(this.$route.query.type); //列表上实物是1虚拟是2
this.mallProId = this.$route.query.giftId;
this.proReferId = this.$route.query.proReferId;
this.giftForm.proReferId = this.$route.query.proReferId;
this.getCategoryOptions(); //分类数据
this.getMemberGradeList(); //会员等级列表
if (this.mallProId !== '-1') {
this.getInfo();
this.editChangeTypeStatus = true;
}
if (this.giftForm.proReferId !== '-1' && this.giftForm.changeType === 1) {
//微信兑换券
this.getCardInfo();
}
},
mounted: function() {
......@@ -323,6 +370,20 @@ export default {
});
},
methods: {
// 获取卡券详情
getCardInfo() {
let params = {
coupCardId: this.giftForm.proReferId
};
request.post('/api-integral-mall/get-card', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.cardList.push(res.data.result);
// this.limitStock = Number(res.data.result.couponStock);
} else {
this.$message.error(res.data.message);
}
});
},
refashData() {
this.refash = !this.refash;
},
......@@ -458,6 +519,7 @@ export default {
}
//配送方式
this.giftForm.changeType = res.data.result.changeType;
this.giftForm.refundType = res.data.result.refundType;
// 规格列表
if (res.data.result.giftProStandardJson) {
this.giftProStandardJson = JSON.parse(res.data.result.giftProStandardJson);
......@@ -638,6 +700,7 @@ export default {
request.post('/api-integral-mall/del-gift-category', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.$message.success('删除分类成功');
this.getCategoryOptions();
} else {
this.$message.error(res.data.message);
}
......@@ -763,10 +826,12 @@ export default {
},
changeDeliver() {
if (this.giftForm.changeType === 1) {
//微信兑换券
this.refundTypeStatus = true;
this.giftForm.refundType = 0;
} else {
this.refundTypeStatus = false;
this.cardList = [];
}
},
// 获取规格列表
......@@ -841,6 +906,20 @@ export default {
});
}
},
// 显示卡券弹窗
showCard() {
this.showCardDialog = true;
},
// 子组件触发方法
selectCard(val) {
this.showCardDialog = false;
this.cardList = [];
if (val) {
this.cardList.push(val);
// this.limitStock = val.couponStock;
this.giftForm.proReferId = val.coupCardId;
}
},
// 保存
submitGoodsForm(form) {
let giftImageUrls = [];
......@@ -901,12 +980,12 @@ export default {
if (valid) {
let params = {
integralMallProId: this.mallProId === '-1' ? '' : this.mallProId, //礼品id
proType: this.giftType === 1 ? 3 : 2, //商品类别 1优惠券 2虚拟 3实物礼品
proType: this.giftForm.changeType === 1 ? 2 : 3, //发货方式是微信兑换券传2其他传3
giftType: this.giftType === 0 ? 0 : 1, //0、虚拟 1、实物
proName: this.giftForm.proName, //礼品名称
giftImageUrls: giftImageUrls.join(','), //礼品主图
giftImageFiledCodes: giftImageFiledCodes.join(','),
proReferId: this.giftForm.proReferId === '-1' ? '' : this.giftForm.proReferId, //关联id
proReferId: this.giftForm.changeType === 1 ? this.giftForm.proReferId : '', //关联id
proCategoryId: this.giftForm.proCategoryId, //礼品分类
detailDescription: this.$refs.tinymceWrap.tinymceHtml, //图文详情
memberGrade: this.giftForm.memberGrade.join(','), //适用会员
......@@ -930,6 +1009,7 @@ export default {
releaseType: this.giftForm.releaseType, //上架状态
limitTimeBegin: this.giftForm.releaseType === 2 ? this.getTimeAll(this.giftForm.limitTimeBegin) : '', //定时上架时间
changeType: this.giftForm.changeType, //配送方式
// proReferId: this.giftForm.changeType === 1 ? this.proReferId : '', //微信兑换券
refundType: this.giftForm.refundType, //售后
giftProStandardJson: JSON.stringify(this.giftProStandardJson), //规格列表
skuJson: JSON.stringify(this.submitSkuJson) //sku数据
......
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