Commit f16c2f52 by zhangmeng

找bug

parent eb3e7114
x<template>
<template>
<div class="stock-input">
<bd-select
ref="bd-select"
......@@ -28,10 +28,8 @@ x<template>
<script>
import emitter from 'element-ui/lib/mixins/emitter';
import dmSelect from '@/components/dm-select';
import {loadGoodsData} from '@/service/api/cardApi.js'
// import InduPicker from '@components/Customer/common/com_induPicker';
import dmSelect from '../dm-select';
import {loadGoodsData} from '../../service/api/cardApi.js'
export default {
props: {
value: Array,
......
......@@ -11,7 +11,7 @@
</el-breadcrumb>
<h3>
<span>{{contentTitle}}</span>
<div v-html="layoutTips"></div>
<div v-html="layoutTips" class="layout--tips--wrap"></div>
</h3>
</div>
<div class="layout-content__wrap">
......@@ -48,7 +48,6 @@
},
computed: {
asideShow() {
console.log(this.$store.state)
return this.$store.state.marketing.asideShow;
},
contentTitle() {
......@@ -161,7 +160,9 @@
// }
}
}
&--tips--wrap {
margin-right: 24px;
}
&--tips {
margin-top: 25px;
width: 100%;
......
<template>
<section class="sms-lib">
<div :class="pbSize">
<span class="pr10">选择卡券(共{{total}}条)</span>
<el-input v-model="listParams.searchParam" class="w200" clearable placeholder="请输入卡券名称" @change="getCardList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray pl20">{{limitTips}} </span>
<div class="clearfix" :class="pbSize">
<div class="fl">
<el-input v-model="listParams.searchParam" class="w200" clearable placeholder="请输入卡券名/备注名" @change="getCardList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray">{{limitTips}}{{total}}张。 </span>
</div>
<div class="fr">
<el-button type="primary" @click="add">新建卡券</el-button>
<el-button @click="refresh">刷新列表</el-button>
</div>
</div>
<el-table tooltipEffect="light" :data="tableList" :height="tableHeight" style="width: 100%" v-loading="loading" @row-click="chooseCard">
<el-table-column :show-overflow-tooltip="false" width="60" align="center" prop="coupCardId">
......@@ -14,15 +19,25 @@
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="200" align="left" prop="cardName" label="卡券名称"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="100" align="left" prop="cardLimit" label="领取限制"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="120" align="left" prop="storeMode" label="适用门店">
<el-table-column :show-overflow-tooltip="false" :min-width="100" align="left" prop="cardName" label="卡券名称"></el-table-column>
<el-table-column :show-overflow-tooltip="true" :min-width="100" align="left" prop="subName" label="备注名"></el-table-column>
<el-table-column prop="" label="有效期" :min-width="100" :show-overflow-tooltip="false">
<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 +'-'+ scope.row.limitDay}}天后,可以使用</div>
</template>
</el-table-column>
<el-table-column prop="cardLimit" :show-overflow-tooltip="false" label="领取限制" width="90">
<template slot-scope="scope">
{{scope.row.cardLimit}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="90" align="left" prop="storeMode" label="适用门店">
<template slot-scope="scope">
{{scope.row.storeMode === 0?'所有门店':(scope.row.storeMode === 1?'部分分组':'部分门店')}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="120" align="left" prop="couponStock" label="库存"></el-table-column>
<el-table-column :show-overflow-tooltip="true" :min-width="200" align="left" prop="subName" label="描述"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="100" align="left" prop="couponStock" label="库存"></el-table-column>
</el-table>
<el-pagination v-show="tableList.length && showPagination" 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, prev, pager, next" :total="total"></el-pagination>
</section>
......@@ -55,16 +70,20 @@ export default {
cardLimitType:{
type:Number,
default:1
},
pageSize:{
type:Number,
default:20
}
},
computed:{
limitTips() {
if (this.cardLimitType === 2) {
return '领取限制领取 1~100的卡券,系统已过滤';
return '领取限制领取 1~100的卡券,系统已过滤,符合条件共';
} else if (this.cardLimitType === 3) {
return '领取限制领取>=100 的卡券,系统已过滤';
return '领取限制领取>=100 的卡券,系统已过滤,符合条件共';
} else {
return '领取限制>1的卡券不支持选择,系统已过滤';
return '领取限制>1的卡券不支持选择,系统已过滤,符合条件共';
}
}
},
......@@ -73,7 +92,7 @@ export default {
listParams:{
searchParam:'',
currentPage:1,
pageSize:10,
pageSize:this.pageSize,
requestProject:'gic-web',
cardLimitType:this.cardLimitType,
cardType:''
......@@ -136,6 +155,13 @@ export default {
chooseCard(row) {
this.selectedId = row.coupCardId;
$bus.$emit('card-temp-choose',row);
},
add() {
window.open('/marketing/#/card/add');
},
refresh() {
this.listParams.currentPage = 1;
this.getCardList();
}
}
}
......
......@@ -136,11 +136,9 @@ export default {
this.moveDialogShow = true;
},
moveFinish(val){
console.log(this.moveImgVal)
if (this.moveImgVal) {
this.changeGroupService(val,this.moveImgVal);
} else {
console.log(this.checkedList.join(','))
this.changeGroupService(val,this.checkedList.join(','));
}
},
......
......@@ -9,32 +9,32 @@
</div>
<el-radio-group class="dm-imgtext-list" v-model="selectedData" v-loading="loading" :style="scrollStyle">
<el-table tooltipEffect="light" :data="textImgList" style="width: 100%" @row-click="rowClick">
<el-table-column label="" align="center" width="55px" v-if="radioShow">
<el-table-column label="" align="center" v-if="radioShow">
<template slot-scope="scope" >
<div class="label-hidden"><el-radio :label="scope.row"></el-radio></div>
</template>
</el-table-column>
<el-table-column label="图片" align="left" width="120px">
<el-table-column label="图片" align="left">
<template slot-scope="scope" >
<img width="100" height="100" :src="scope.row.itemList.length?(scope.row.itemList[0].qcloudImageUrl || ''):''" alt="">
</template>
</el-table-column>
<el-table-column label="图文标题" align="left" min-width="100px">
<el-table-column label="图文标题" align="left">
<template slot-scope="scope" >
<a class="blue" :href="scope.row.itemList.length?(scope.row.itemList[0].mediaUrl || ''):''" target="_blank">{{scope.row.itemList.length?(scope.row.itemList[0].titleName || ''):''}}</a>
</template>
</el-table-column>
<el-table-column label="作者" prop="updateTimeStr" align="left" width="120px">
<el-table-column label="作者" prop="updateTimeStr" align="left" >
<template slot-scope="scope" >
<p>{{scope.row.itemList.length?(scope.row.itemList[0].authorName || '--'):''}}</p>
</template>
</el-table-column>
<el-table-column label="修改时间" prop="updateTimeStr" align="left" width="160px">
<el-table-column label="修改时间" prop="updateTimeStr" align="left">
<template slot-scope="scope" >
{{scope.row.updateTimeStr}}
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="200px" v-if="auto">
<el-table-column label="操作" align="left" v-if="auto">
<template slot-scope="scope" >
<el-button type="text" @click="editData(scope.row)">编辑</el-button>
<dm-delete @confirm="delData(scope.row)" tips="确认删除该图文?">
......@@ -96,7 +96,6 @@ export default {
watch:{
activeId(val) {
this.textImgList.map(v => {
console.log('111'+val)
if (this.activeId === v.imageTextWechatId) {
this.selectedData = v;
}
......@@ -114,14 +113,12 @@ export default {
this.textImgList.map(v => {
v.createTimeStr = formateDateTimeByType(v.createTime,'yyyy-MM-dd-HH-mm')
v.updateTimeStr = formateDateTimeByType(v.updateTime,'yyyy-MM-dd-HH-mm')
console.log(this.activeId)
if (this.activeId === v.imageTextWechatId) {
this.selectedData = v;
}
})
}
} catch(err) {
console.log(err)
this.$tips({type:'warning',message:'列表请求出错,请稍后再试'});
}
this.loading = false
......@@ -134,7 +131,6 @@ export default {
this.syncImgTextShow = true;
},
rowClick(row) {
console.log(row)
this.selectedData = row;
this.$emit('get-data',{imageTextId:row.imageTextId,imageTextWechatId:row.imageTextWechatId})
},
......
......@@ -52,7 +52,6 @@ export default {
watch:{
activeId(val) {
this.activeSmsId = val;
console.log(val)
}
},
created(){
......
......@@ -80,7 +80,6 @@ export default {
'content-type':'application/json;charset=utf-8'
}
}).then(res => {
console.log(res)
if (res.data.errorCode === 0) {
this.singleInfo = res.data.result.memberSingle || {};
}
......
......@@ -75,4 +75,6 @@ export const loadGoodsData = (params) => requests(PREFIX + 'load-goods-data', pa
// 卡券营销--复制卡券
export const copyCardDetailService = (params) => requests(PREFIX + 'copy-card-detail', params);
// 卡券营销--复制卡券
export const copyCardDetailService1 = (params) => requests(PREFIX + 'template-receive-card-page', params);
......@@ -3,11 +3,11 @@
<el-select v-model="storeType" placeholder="请选择" class="w200 inline-block mr5">
<el-option v-for="(v,i) in leftList" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
<option-type v-if="storeType === 1" :uuid="newUuid"></option-type>
<option-tags v-if="storeType === 2" :uuid="newUuid"></option-tags>
<option-area v-if="storeType === 3" :uuid="newUuid"></option-area>
<option-group v-if="storeType === 4" :uuid="newUuid"></option-group>
<option-part v-if="storeType === 5" :uuid="newUuid"></option-part>
<option-type v-if="storeType === 1" :uuid="uuid" :newUuid="newUuid"></option-type>
<option-tags v-if="storeType === 2" :uuid="uuid" :newUuid="newUuid"></option-tags>
<option-area v-if="storeType === 3" :uuid="uuid" :newUuid="newUuid"></option-area>
<option-group v-if="storeType === 4" :uuid="uuid" :newUuid="newUuid"></option-group>
<option-part v-if="storeType === 5" :uuid="uuid" :newUuid="newUuid"></option-part>
</section>
</template>
......@@ -91,11 +91,26 @@ export default {
// 获取配置项
init() {
this.storeType = 0;
this.newUuid = this.uuid || this.newUuid;
// this.newUuid = this.uuid || this.newUuid;
// if (!this.isAdd) {
// // this.newUuid = this.uuid || this.newUuid;
// }
if (!this.uuid) {
//这是新增
this.$emit('update:uuid',this.newUuid);
this.saveInit();
} else {
// 这是编辑
// 保存一下新的uuid
//
this.saveInit();
this.getStoreConfig();
}
},
......@@ -103,7 +118,7 @@ export default {
getStoreConfig() {
return new Promise((resolve,reject) => {
let params = {
key:this.newUuid,
key:this.uuid,
currentPage:1,
pageSize:20
}
......
......@@ -56,7 +56,6 @@ export default {
handler(val) {
// 全选计算省数量
this.totalProvince = this.areaList.filter(v => (!v.indeterminate && v.isCheck)).length;
console.log(this.totalProvince)
this.totalCity = 0;
this.areaList.map(v => {
// 半勾选计算市数量
......
......@@ -26,10 +26,16 @@ export default {
uuid:{
type:String,
default:''
},
newUuid:{
type:String,
default:''
}
},
created() {
this.getRightList();
console.log(this.uuid,this,newUuid);
},
data() {
return {
......
......@@ -5,6 +5,12 @@
<el-button @click="isSaveFun" type="primary">检查是否保存</el-button> {{isSave}}
<el-button @click="getStoreConfig" type="primary">获取保存的数据</el-button> {{storeConfig}}
</div>
<el-switch v-model="editFlag"></el-switch>新增的
<div style="margin:40px;" v-if="editFlag">
<vue-gic-store-new class="inline-block" ref="storeNew" :options="options"></vue-gic-store-new>
<el-button @click="isSaveFun" type="primary">检查是否保存</el-button> {{isSave}}
<el-button @click="getStoreConfig" type="primary">获取保存的数据</el-button> {{storeConfig}}
</div>
<div style="margin:40px;">
<vue-gic-store-card ref="storeCard" :uuid.sync="uuid"></vue-gic-store-card>
<el-button style="margin:10px;" @click="isStoreEmpty" type="primary">检查是否为空</el-button> {{isEmpty}}
......@@ -23,14 +29,15 @@ import gicStoreCard from '../component/dmStore/store-card.vue'
data() {
return {
// 参数
uuid:'8f02ccc0e35911e8aaf8672621cbd00c', // 新增传空,编辑必传,
uuid:'1112ccc0e35911e8aaf8672621cbd111', // 新增传空,编辑必传,
// 需要的下拉 默认为全部[0,1,2,3,4,5]
// 0 全部 1 门店类型 2门店标签 3 门店区域 4 门店分组 5 部分门店
options:[0,1,2,3,4,5],
isAdd:false,
isSave:false,
isEmpty:0,
storeConfig:{}
storeConfig:{},
editFlag:false
}
},
mounted() {
......
......@@ -2,7 +2,7 @@
<el-form class="dm-wrap" :model="form" ref="form" :rules="rules" label-width="120px">
<el-form-item label="卡券类型">
<el-radio-group v-model="form.cardType" :disabled="isEdit || isInfo" @change="reset(form.cardType)">
<el-radio-group v-model="form.cardType" :disabled="isEdit || isInfo" @change="reset">
<el-radio :label="0">抵金券</el-radio>
<el-radio :label="1">折扣券</el-radio>
<el-radio :label="2">兑换券</el-radio>
......@@ -77,7 +77,7 @@
<el-radio :label="1">1张/人</el-radio>
<el-radio :label="100">100张/人</el-radio>
<el-radio :label="0">
<el-input-number controls-position="right" min="0" class="w150" v-model="form.cardLimit" :disabled="isEdit || isInfo"></el-input-number> 张/人 <span class="fz13 gray">每个用户领券上限,默认为1</span>
<el-input-number controls-position="right" :min="0" class="w150" v-model="form.cardLimit" :disabled="isEdit || isInfo"></el-input-number> 张/人 <span class="fz13 gray">每个用户领券上限,默认为1</span>
</el-radio>
</el-radio-group>
</el-form-item>
......@@ -132,7 +132,7 @@
<dm-input class="w400" v-model="form.cardExplain" :disabled="isInfo" :maxlength="50"></dm-input>
</el-form-item>
<el-form-item prop="storeMode" label="适用门店">
<el-form-item label="适用门店">
<el-radio v-model="form.storeMode" :label="0">所有门店</el-radio>
<el-radio v-model="form.storeMode" :label="1">部分门店</el-radio>
<vue-gic-store-card class="pt10" v-show="form.storeMode" ref="storeCard" :uuid.sync="uuid"></vue-gic-store-card>
......
......@@ -2,11 +2,11 @@
* 逻辑太多
*/
import dmUploadImg from '@/components/upload/img'
import dmUploadImg from '../../components/upload/img'
import imgTextDrag from './partials/imgtext-drag'
import {formateDateTimeByType,resetParams} from '@/utils/index.js'
import {cardGetShelfs,getCardDetail,saveUpdateCard,copyCardDetailService} from '@/service/api/cardApi.js'
import dmGoodsInput from '@/components/goods-input/index.vue'
import {formateDateTimeByType} from '../../utils/index.js'
import {cardGetShelfs,getCardDetail,saveUpdateCard,copyCardDetailService} from '../../service/api/cardApi.js'
import dmGoodsInput from '../../components/goods-input/index.vue'
const initForm = {
cardType:0, // 1.卡券类型: 抵金券: 0; 折扣券: 1; 兑换券: 2
cardName:'', // 2.卡券名称
......@@ -40,10 +40,10 @@ const initForm = {
verificationType:0,
cardDenomination:0,
proNoList:[],
storeMode:0
storeMode:1
}
const sale_limit = { fee:0,goods:'',flag:false,type:0 } //最低消费
const goods = {ok:'',no:'',flag:false}
const sale_limit = { fee:0,goods:'',flag:false,type:0}; //最低消费
const goods = {ok:'',no:'',flag:false};
export default {
data() {
return {
......@@ -101,6 +101,9 @@ export default {
created() {
this.cardGetShelfs()
this.getCardDetail()
console.log('4'+this.form)
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券库',path:'/card/list'},{name:'卡券详情',path:''}])
},
mounted () {
......@@ -115,12 +118,23 @@ export default {
},
methods:{
//切换卡券类型 表单置为默认值
reset(val) {
this.$refs.form.resetFields()
this.form = JSON.parse(JSON.stringify(initForm))
this.sale_limit = JSON.parse(JSON.stringify(sale_limit))
this.goods = JSON.parse(JSON.stringify(goods))
this.form.cardType = val
reset(e) {
// debugger
console.log('5'+e)
// try {
// this.$refs.form.resetFields();
// } catch (e) {
// console.log(e)
// }
this.form = JSON.parse(JSON.stringify(initForm));
this.sale_limit = JSON.parse(JSON.stringify(sale_limit));
this.goods = JSON.parse(JSON.stringify(goods));
this.$nextTick(_ => {
this.form.cardType = e;
})
// console.log(this.form.storeMode,val);
},
//卡券营销--卡券库--新建/修改卡券--放入卡券展架--所有展架集合
cardGetShelfs() {
......@@ -229,21 +243,6 @@ export default {
this.$refs.storeCard.init();
})
// this.sendChildData = {
// storeType:card.storeMode || 0,
// storeGroupIds:card.groupIds?(card.groupIds.length?card.groupIds.join(','):''):'',
// };
// let list = [];
// if (card.storeIds && card.storeIds.length) {
// card.storeIds.map(v => {
// list.push(JSON.parse(v));
// })
// }
// this.sendChildData.storeIds = list;
this.form.image = {
imgUrl:card.qcloudImageUrl || '',
code:card.imageFieldCode || ''
......@@ -473,7 +472,7 @@ export default {
// 这里判断部分门店是否为空
if (card.storeMode) {
let data = await this.$refs.storeCard.getRightList();
console.log(data.length)
console.log('1'+data.length)
if (!data.length) {
this.$tips({type:'warning',message:'部分门店不能为空'});
return;
......@@ -484,7 +483,7 @@ export default {
params.card = JSON.stringify(card);
saveUpdateCard(params).then(res => {
console.log(res)
console.log('2'+res)
if (res.errorCode === 0) {
if (this.isEdit) {
this.$confirm('保存成功, 是否返回列表?', '提示', {
......@@ -504,7 +503,7 @@ export default {
this.$tips({type:'error',message:res.message || '保存卡券失败'});
}
}).catch(err => {
console.log(err)
console.log('3'+err)
this.$tips({type:'error',message:'保存卡券失败'});
})
},
......
......@@ -49,7 +49,7 @@
<script>
import draggable from 'vuedraggable'
import elUploadWrap from '@/components/upload/el-upload-wrap'
import elUploadWrap from '../../../components/upload/el-upload-wrap'
export default {
props:{
list:Array
......@@ -118,7 +118,6 @@ export default {
},
getSortData(val) {
this.$nextTick(_ => {
console.log(this.list.map(v => v.text))
this.$emit('update:list',this.copylist)
})
this.drag = false
......
<template>
<el-dialog title="添加卡券" :visible.sync="show" width="80%" :before-close="close">
<div class="pb10">
<span class="pr10">卡券共{{total}}</span>
<el-input v-model="listParams.searchParams" class="w250" placeholder="输入门店信息/订单流水号" clearable @change="cardPageList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray pl20">*领取限制>1的卡券不支持选择,系统已自动过滤。</span>
<div class="pb10 clearfix">
<div class="fl">
<el-input v-model="listParams.searchParams" class="w250" placeholder="请输入卡券名/备注名" clearable @change="cardPageList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray">领取限制>1的卡券不支持选择,系统已过滤,符合条件共{{total}}张。</span>
</div>
<div class="fr">
<el-button type="primary" @click="add">新建卡券</el-button>
<el-button @click="refresh">刷新列表</el-button>
</div>
</div>
<el-table tooltipEffect="light" ref="multipleTable" :data="tableList" style="width: 100%;cursor:pointer;" height="400" @row-click="rowClick" v-loading="loading" @selection-change="handleSelectionChange">
<el-table tooltipEffect="light" ref="multipleTable" :data="tableList" style="width: 100%;cursor:pointer;" @row-click="rowClick" v-loading="loading" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" label="选择"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" prop="storeCode" label="卡券名">
<el-table-column :show-overflow-tooltip="false" :min-width="100" align="left" prop="cardName" label="卡券名称">
<template slot-scope="scope">
<p>{{scope.row.cardName}}</p>
<p class="gray fz12">{{scope.row.subName}}</p>
<el-popover v-if="scope.row.cardName && scope.row.cardName.length > 10" placement="top-start" width="200" trigger="hover" :content="scope.row.cardName">
<div class="ellipsis" slot="reference">{{scope.row.cardName}}</div>
</el-popover>
<span v-else>{{scope.row.cardName}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="left" prop="couponStock" label="卡券数量"></el-table-column>
<el-table-column width="100" align="left" prop="getedQuantity" label="领取数量"></el-table-column>
<el-table-column width="100" align="left" prop="usageQuantity" label="使用数量"></el-table-column>
<el-table-column width="90" align="left" prop="col4" label="核销率">
<el-table-column :show-overflow-tooltip="true" :min-width="100" align="left" prop="subName" label="备注名">
<template slot-scope="scope">
{{(scope.row.usageQuantity * 100 / (scope.row.getedQuantity === 0 ? 1 : scope.row.getedQuantity)).toFixed(2)}}%
<el-popover v-if="scope.row.subName && scope.row.subName.length > 10" placement="top-start" width="200" trigger="hover" :content="scope.row.subName">
<div class="ellipsis" slot="reference">{{scope.row.subName}}</div>
</el-popover>
<span v-else>{{scope.row.subName}}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" width="80px" align="left" prop="storeCode" label="适用门店">
<el-table-column prop="" label="有效期" :min-width="100" :show-overflow-tooltip="false">
<template slot-scope="scope">
{{scope.row.storeMode === 0 ? "所有门店" : (scope.row.storeMode === 1 ? "部分分组" : "部分门店")}}
<div v-if="scope.row.cardEffectiveMode == 0">{{scope.row.beginDate+'-'+ scope.row.endDate}}</div>
<div v-if="scope.row.cardEffectiveMode == 1">领取{{scope.row.startDay +'-'+ scope.row.limitDay}}天后,可以使用</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="storeCode" label="有效期">
</el-table-column>
<el-table-column prop="cardLimit" :show-overflow-tooltip="false" label="领取限制" :min-width="90">
<template slot-scope="scope">
<span v-if="scope.row.cardEffectiveMode !== 0">领取后第{{scope.row.startDay+1}}-{{scope.row.limitDay+scope.row.startDay}}</span>
<span v-if="scope.row.cardEffectiveMode === 0">{{formateDateTimeByType(scope.row.beginDate,'yyyy-MM-dd')}}{{formateDateTimeByType(scope.row.endDate,'yyyy-MM-dd')}}</span>
{{scope.row.cardLimit}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="storeCode" label="适用条件">
<el-table-column :show-overflow-tooltip="false" :min-width="90" align="left" prop="storeMode" label="适用门店">
<template slot-scope="scope">
{{scope.row.useCondition | filterUseCondition}}
</template>
{{scope.row.storeMode === 0?'所有门店':(scope.row.storeMode === 1?'部分分组':'部分门店')}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :min-width="100" align="left" prop="couponStock" label="库存"></el-table-column>
</el-table>
<el-pagination v-show="tableList.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>
<span slot="footer" class="dialog-footer">
......@@ -75,7 +83,7 @@ export default {
loading:false,
listParams:{
currentPage:1,
pageSize:20,
pageSize:5,
searchParam:'',
sortBy:'',
limitOne:1,
......@@ -137,6 +145,13 @@ export default {
this.$tips({type:'error',message:'添加卡券失败'})
})
}
},
add() {
window.open('/marketing/#/card/add');
},
refresh() {
this.listParams.currentPage = 1;
this.getCardList();
}
},
filters:{
......
......@@ -517,7 +517,7 @@ export default {
})
this.template.templateKeyDataList = this.template.templateKeyDataList.map(v => ({
keyName:v.keyName,
keywords:v.keyName,
keywords:v.keywords,
datas:v.type + v.color,
orders:v.orders
}));
......
......@@ -83,7 +83,7 @@
</el-dialog>
<!-- 卡券弹窗 -->
<el-dialog title="选择卡券" :visible.sync="cardShow" width="80%" :before-close="close">
<cardTemp tableHeight="400" :activeId.sync="mediaId"></cardTemp>
<cardTemp :activeId.sync="mediaId" :pageSize="5"></cardTemp>
<span slot="footer" class="dialog-footer"><el-button @click="close">取 消</el-button></span>
</el-dialog>
<preview :show.sync="previewShow" :imgTextList="imgTextList" :firstImgText="firstImgText"></preview>
......
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