Commit dbb7bf5c by zhangmeng

add:卡券新增卡券渠道

parent bd2565e7
......@@ -85,7 +85,7 @@ module.exports = {
*/
// 禁止函数的循环复杂度超过 20,【https://en.wikipedia.org/wiki/Cyclomatic_complexity】
complexity: [
2,
0,
{
max: 20
}
......
No preview for this file type
<!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/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.b3e4c384ee7c531df40fb031e314a948.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/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.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.00.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.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.02.js></script><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.b95f77e8a57f632ca3ef.js></script><script type=text/javascript src=/marketing/static/js/app.77495d658f6e9ad46386.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="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.3e7db0d1b82d9acb327462fa1c0e8975.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/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.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.00.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.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.01.js></script><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.b95f77e8a57f632ca3ef.js></script><script type=text/javascript src=/marketing/static/js/app.60f6d44f433da89cf9ed.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.
......@@ -27,6 +27,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/member-group.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.01.js"></script>
</body>
</html>
......@@ -82,6 +82,12 @@ a:hover {
.pl20{
padding-left: 20px!important;
}
.pl25{
padding-left: 25px!important;
}
.pl30 {
padding-left: 30px!important;
}
.pr4{
padding-right: 4px!important;
}
......
......@@ -14,7 +14,7 @@
{{ tag.label }}
</el-tag>
</el-popover>
<el-select ref="select" v-model="currentValue" :reserve-keyword="reserveKeyword" :multiple="multiple" :disabled="disabled" :value-key="valueKey" :size="size" :clearable="clearable" :multiple-limit="multipleLimit" :name="name" :placeholder="placeholder" :filterable="filterable" :allow-create="allowCreate" :filter-method="filterMethod" :remote="remote" :remote-method="remoteMethod" :loading="loading" :loading-text="loadingText" :no-match-text="noMatchText" :no-data-text="noDataText" :popper-class="popperClass" :default-first-option="defaultFirstOption" @change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" :class="{ single: single }">
<el-select ref="select" v-model="currentValue" :reserve-keyword="reserveKeyword" :multiple="multiple" :disabled="disabled" :value-key="valueKey" :size="medium" :clearable="clearable" :multiple-limit="multipleLimit" :name="name" :placeholder="placeholder" :filterable="filterable" :allow-create="allowCreate" :filter-method="filterMethod" :remote="remote" :remote-method="remoteMethod" :loading="loading" :loading-text="loadingText" :no-match-text="noMatchText" :no-data-text="noDataText" :popper-class="popperClass" :default-first-option="defaultFirstOption" @change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" :class="{ single: single }">
<slot></slot>
</el-select>
<div v-if="!!icon" class="bd-select__icon__wrap" @click="iconClick">
......
<template>
<div class="stock-input">
<bd-select ref="bd-select" v-model="selectConf.value" :disabled="disabled" multiple :loading="selectConf.loading" filterable remote :remote-method="remoteMethod" :placeholder="placeholder" @change="selectChange">
<bd-select ref="bd-select" v-model="selectConf.value" :disabled="disabled" size="small" multiple :loading="selectConf.loading" filterable remote :remote-method="remoteMethod" :placeholder="placeholder" @change="selectChange">
<el-option v-for="option in selectConf.options" :key="option.value" :value="option.value" :label="option.label">
<div class="suggest-item">
<!-- <span class="suggest-item__rt">{{option.value}}</span> -->
......
......@@ -33,7 +33,8 @@ export default {
default() {
return {
memberId: '',
coupCardId: ''
coupCardId: '',
orderNumber: ''
};
}
},
......@@ -54,7 +55,8 @@ export default {
},
total: 0,
tableList: [],
selectedId: ''
selectedId: '',
selectedObj: {}
};
},
watch: {
......@@ -94,6 +96,7 @@ export default {
},
chooseCard(row) {
this.selectedId = row.orderId;
this.selectedObj = row;
},
submit() {
if (this.selectedId) {
......@@ -104,8 +107,9 @@ export default {
},
// 核销订单
async writeOffCard() {
console.log(this.obj);
try {
let res = await writeOffCard({ coupLogId: this.obj.coupLogId, orderId: this.selectedId, memberId: this.obj.memberId });
let res = await writeOffCard({ coupLogId: this.obj.coupLogId, orderId: this.selectedId, memberId: this.obj.memberId, oorderNumber: this.selectedObj.orderNumber });
if (res.errorCode === 0) {
this.$tips({ type: 'success', message: '核销成功' });
this.close();
......
......@@ -10,7 +10,7 @@ const initForm = {
auditingStatus: '',
cardType: 0, // 1.卡券类型: 抵金券: 0; 折扣券: 1; 兑换券: 2
cardName: '', // 2.卡券名称
// cardApplyChannel:[], // 卡券适用渠道
cardApplyChannel: [], // 卡券适用渠道
subName: '', // 3.备注名
subTitle: '', // 4.卡券副标题
erpDemoCode: '', // demo券号
......@@ -40,7 +40,10 @@ const initForm = {
shelfIds: [],
verificationType: 0,
cardDenomination: 0,
proNoList: []
proNoList: [],
discount_amount_upper_limit: 0,
goods_discounts_number_upper_limit: 0,
products_exchange_number: 0
};
const sale_limit = { fee: 0, goods: '', flag: false, type: 0 }; //最低消费
const goods = { ok: '', no: '', flag: false };
......@@ -51,14 +54,13 @@ export default {
loading: false,
submitLoading: false,
cardShelfsLoading: false, //卡券展架loading
testList: [],
form: JSON.parse(JSON.stringify(initForm)),
sale_limit: JSON.parse(JSON.stringify(sale_limit)),
goods: JSON.parse(JSON.stringify(goods)),
only: false,
cardLimitRadio: 1,
rules: {
// cardApplyChannel:{required: true, type:'array', message: '请选择卡券渠道', trigger: 'change'},
cardApplyChannel: { required: true, type: 'array', message: '请选择卡券渠道', trigger: 'change' },
cardName: { required: true, message: '请输入卡券名称', trigger: 'blur' },
subName: { required: true, message: '请输入备注名称', trigger: 'blur' },
subTitle: { required: true, message: '请输入卡券副标题', trigger: 'blur' },
......@@ -68,7 +70,7 @@ export default {
useDescript: { required: true, message: '使用说明不能为空', trigger: 'blur' }
},
startDayOptions: [],
cardApplyChannelOptions: [{ label: '线下门店', value: 'offlineStore' }, { label: '微商城', value: 'GICmicroMall-GIC' }, { label: '微盟微商城', value: 'WMmicroMall' }],
cardApplyChannelOptions: [],
imgTextList: [],
cardShelfsList: [],
sendChildData: {
......@@ -85,7 +87,9 @@ export default {
isInfo: this.$route.meta.type === 'info',
isCopy: this.$route.meta.type === 'copy',
isAdd: this.$route.meta.type === 'add',
storeMode: 0
storeMode: 0,
// 兑换商品货号是否展示
products_exchange_number_show: false
};
},
watch: {
......@@ -95,6 +99,10 @@ export default {
this.sale_limit.goods = null;
this.sale_limit.fee = null;
}
},
'form.proNoList'(val) {
this.products_exchange_number_show = !!val.length;
this.form.products_exchange_number = val.length ? 1 : 0;
}
},
components: {
......@@ -124,7 +132,6 @@ export default {
this.sale_limit = JSON.parse(JSON.stringify(sale_limit));
this.goods = JSON.parse(JSON.stringify(goods));
this.form.cardType = e;
console.log(e);
this.$nextTick(_ => {
this.$refs.storeCard.initLeftList();
});
......@@ -156,12 +163,15 @@ export default {
res = await getCardDetail({ coupCardId: this.$route.params.id });
}
if (res.errorCode === 0) {
// 拉取卡券适用渠道的列表
this.cardApplyChannelOptions = res.result.systemCoupChannelList;
//处理有效期下拉选项
const dicMap = res.result.dicMap;
this.startDayOptions = Object.keys(dicMap).map(key => ({ label: dicMap[key].dictName == '0' ? '当天' : '第' + dicMap[key].dictName + '天', value: parseInt(dicMap[key].dictName) }));
if (res.result.card) {
const card = res.result.card;
this.storeMode = card.storeMode === 0 ? 0 : 1;
this.form.cardApplyChannel = card.cardApplyChannel.split(',') || [];
this.form.auditingStatus = card.auditingStatus || '';
this.form.coupCardId = this.isCopy ? '' : card.coupCardId;
this.form.cardType = card.cardType;
......@@ -186,6 +196,9 @@ export default {
}
this.goods.ok = useCondition.goods ? useCondition.goods.ok || '' : '';
this.goods.no = useCondition.goods ? useCondition.goods.no || '' : '';
this.form.goods_discounts_number_upper_limit = useCondition.goods_discounts_number_upper_limit || 0;
this.form.discount_amount_upper_limit = useCondition.discount_amount_upper_limit || 0;
this.form.products_exchange_number = useCondition.products_exchange_number || 0;
if (this.goods.ok || this.goods.no) {
this.goods.flag = true;
}
......@@ -320,9 +333,8 @@ export default {
//卡券营销--卡券库--保存卡券
async saveUpdateCard() {
let card = {};
let params = {};
// card.cardApplyChannel = this.form.cardApplyChannel.join(',');
card.cardApplyChannel = this.form.cardApplyChannel.join(',');
card.coupCardId = this.form.coupCardId;
card.cardType = this.form.cardType;
card.cardName = this.form.cardName;
......@@ -356,7 +368,9 @@ export default {
ok: this.goods.ok,
no: this.goods.no
},
only: Number(this.only)
only: Number(this.only),
discount_amount_upper_limit: this.form.discount_amount_upper_limit,
goods_discounts_number_upper_limit: this.form.goods_discounts_number_upper_limit
};
if (this.only) {
card.useCondition.only = Number(this.only);
......@@ -373,7 +387,8 @@ export default {
no: this.goods.no
},
only: Number(this.only),
proNo: this.form.proNoList.length ? this.form.proNoList[0].id : ''
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.only) {
card.useCondition.only = Number(this.only);
......
......@@ -7,11 +7,11 @@
<el-radio :label="2">兑换券</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="卡券适用渠道" prop="cardApplyChannel">
<el-form-item label="卡券适用渠道" prop="cardApplyChannel">
<el-select v-model="form.cardApplyChannel" multiple class="w400" placeholder="请选择" :disabled="isEdit || isInfo">
<el-option v-for="item in cardApplyChannelOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item> -->
<el-option v-for="item in cardApplyChannelOptions" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="cardName" label="卡券名称">
<dm-input v-model="form.cardName" class="w400" placeholder="请输入卡券名称" :disabled="isEdit || isInfo" :byteType="1" :maxlength="9"></dm-input>
</el-form-item>
......@@ -34,8 +34,14 @@
<!-- 抵金券 -->
<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 === 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>
<el-form-item prop="cardDenomination" label="优惠金额封顶" v-if="form.cardType === 1"> <el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="form.discount_amount_upper_limit" class="200" :precision="2" :step="1" :min="0"></el-input-number></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.goods_discounts_number_upper_limit" class="200" :precision="0" :step="1" :min="0"></el-input-number></el-form-item>
<!-- 兑换券无 -->
<el-form-item prop="" label="使用条件">
<div v-show="form.cardType === 0" class="mb10">
......@@ -78,14 +84,14 @@
v-model="sale_limit.goods"
></el-input>
可使用
<div class="inline-block pl10">指定商品货号 <dm-goods-input :disabled="isEdit || isInfo" class="w300 inline-block" v-model="form.proNoList" :multiple="false"></dm-goods-input></div>
<div class="pl25 pt10">指定商品货号 <dm-goods-input :disabled="isEdit || isInfo" class="w300 inline-block" v-model="form.proNoList" :multiple="false"></dm-goods-input></div>
<div class="pl25 pt10" v-show="products_exchange_number_show">兑换商品件数 <el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="form.products_exchange_number" class="200" :precision="0" :step="1" :min="0"></el-input-number></div>
</el-radio>
</div>
<div>
<el-checkbox v-model="only" :disabled="isEdit || isInfo">不与其他优惠共享</el-checkbox>
</div>
</el-form-item>
<el-form-item prop="cardLimit" label="领券限制">
<el-radio-group v-model="cardLimitRadio" :disabled="isEdit || isInfo">
<el-radio :label="1">1张/人</el-radio>
......
......@@ -53,6 +53,7 @@
<el-table-column :min-width="150" align="left" label="奖品" prop="prizeName"></el-table-column>
</el-table>
<el-pagination v-show="recordList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<vue-gic-export-excel :dataArr="tableData" :dialogVisible.sync="dialogVisible" :type="1" :excelUrl="excelUrl" :params="params" :projectName="projectName"></vue-gic-export-excel>
</div>
</template>
<script>
......@@ -80,7 +81,13 @@ export default {
total: 0,
recordList: [],
recordHeader: [],
dateTime: ['', '']
dateTime: ['', ''],
projectName: '', // 当前项目名
dialogVisible: false,
excelUrl: '', // 下载数据的地址
params: {}, // 传递的参数
tableData: [] // 是否有导出数据
};
},
created() {
......
......@@ -81,7 +81,7 @@
{{ form.tipFontColor }}
</el-form-item>
<el-form-item label="口令提示链接" prop="tipUrl" class="width50">
<el-input type="text" class="w400" v-model="form.tipUrl"></el-input>
<dm-input type="text" class="w400" v-model="form.tipUrl" :maxlength="500"></dm-input>
</el-form-item>
</section>
<section class="dm-form__wrap">
......
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