Commit 7bc3dd6e by zhangmeng

Merge branch 'dd' into dev

* dd:
  迭代
  迭代
  迭代3
  bug
  找bug

# Conflicts:
#	dist/index.html
#	dist/static/js/app.17d418301a0f8d26bcdd.js
parents bed79cd6 9c06bf15
......@@ -42,7 +42,10 @@ module.exports = {
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// devtool: 'cheap-module-eval-source-map',
devtool: 'eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
......
<!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.dba9ab5aa93e4029232b9159cd5ef1fe.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.e0b7daa8af8fb2f5148e.js></script><script type=text/javascript src=/marketing/static/js/app.17d418301a0f8d26bcdd.js></script></body></html>
\ No newline at end of file
<<<<<<< HEAD
<!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.dba9ab5aa93e4029232b9159cd5ef1fe.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.e0b7daa8af8fb2f5148e.js></script><script type=text/javascript src=/marketing/static/js/app.17d418301a0f8d26bcdd.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/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.075170bb46a0892ba8d42fc1fc2c7b98.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.e0b7daa8af8fb2f5148e.js></script><script type=text/javascript src=/marketing/static/js/app.9e6b9a9d3302a889af28.js></script></body></html>
>>>>>>> dd
This source diff could not be displayed because it is too large. You can view the blob instead.
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,10 @@ export const loadGoodsData = (params) => requests(PREFIX + 'load-goods-data', pa
// 卡券营销--复制卡券
export const copyCardDetailService = (params) => requests(PREFIX + 'copy-card-detail', params);
// 分页查询临时卡券记录
export const templateReceiveCardPage = (params) => requests(PREFIX + 'template-receive-card-page', params);
// 导出临时卡券记录
export const exportTemplateReceivedExcel = config.api + PREFIX + 'export-template-receive-excel';
......@@ -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="newUuid" :cacheUuid="cacheUuid" :isAdd="isAdd" :isCache.sync="isSendCache"></option-type>
<option-tags v-if="storeType === 2" :uuid="newUuid" :cacheUuid="cacheUuid" :isAdd="isAdd" :isCache.sync="isSendCache"></option-tags>
<option-area v-if="storeType === 3" :uuid="newUuid" :cacheUuid="cacheUuid" :isAdd="isAdd" :isCache.sync="isSendCache"></option-area>
<option-group v-if="storeType === 4" :uuid="newUuid" :cacheUuid="cacheUuid" :isAdd="isAdd" :isCache.sync="isSendCache"></option-group>
<option-part v-if="storeType === 5" :uuid="newUuid" :cacheUuid="cacheUuid" :isAdd="isAdd" :isCache.sync="isSendCache"></option-part>
</section>
</template>
......@@ -32,6 +32,7 @@ const typeList = [{label:'自营',value:'0'},
{label:'代理',value:'2'},
{label:'代销',value:'3'},
{label:'托管',value:'4'}];
export default {
name:'vue-gic-store-new',
props:{
......@@ -60,21 +61,40 @@ export default {
watch:{
storeType(val) {
if (!val) {
this.saveInit();
this.$emit('update:uuid',this.cacheUuid);
this.saveInit(this.isSendCache);
}
},
uuid(val) {
// 编辑或者详情
if (val && !this.isAdd) {
if (this.isSendCache) return;
console.log('走到这了');
this.init();
}
},
isSendCache(val) {
console.log(val)
if (val) {
this.$emit('update:uuid',this.cacheUuid);
this.$nextTick(_=> {
console.log(this.uuid)
})
}
}
},
data() {
return {
storeType:0, // 一级选择值
leftList:[],
newUuid:uuidv1().replace(/-/g,'') // 生成uuid
// 创建一个新的uuid
newUuid:uuidv1().replace(/-/g,''),
// 编辑情况下的备份id
cacheUuid:uuidv1().replace(/-/g,''), // 生成uuid
// 编辑的情况下是否发送备份ID
isSendCache:false,
}
},
created() {
......@@ -91,19 +111,36 @@ export default {
// 获取配置项
init() {
this.storeType = 0;
this.newUuid = this.uuid || this.newUuid;
if (!this.uuid) {
/*如果没有uuid的情况下
1 设置一个新的uuid
2 并传给父级
3 保存
*/
if (this.isAdd) {
this.$emit('update:uuid',this.newUuid);
// 这是保存新的id
this.saveInit();
} else {
this.getStoreConfig();
}
/*如果有uuid的情况下
1 创建一个新的uuid备用 newUUid
2 保存 一下这个新的uuid
3 用父级传来的uuid获取配置项
*/
else {
this.newUuid = this.uuid;
// 这里保存备份id
this.saveInit(true);
if (this.newUuid) {
this.getStoreConfig();
}
}
},
//获取配置
getStoreConfig() {
return new Promise((resolve,reject) => {
let params = {
key:this.newUuid,
key:this.isAdd?this.newUuid:(this.isSendCache?this.cacheUuid:this.uuid),
currentPage:1,
pageSize:20
}
......@@ -138,10 +175,10 @@ export default {
})
},
// 保存
saveInit() {
saveInit(isCacheUuid = false) {
let params = {
selectType:0,
key:this.newUuid,
key:isCacheUuid?this.cacheUuid:this.newUuid,
isAll:0,
value:'',
removeItems:'',
......@@ -156,9 +193,12 @@ export default {
isStoreSave() {
return new Promise((resolve,reject) => {
let params = {
key:this.newUuid,
key:this.isAdd?this.newUuid:(this.isSendCache?this.cacheUuid:this.uuid),
selectType:this.storeType
}
if (params.selectType === 0) {
resolve(true);
}
this.axios.post(baseUrl + '/api-plug/is-empty?requestProject=gic-web',qs.stringify(params)).then(res => {
console.log(res);
if (res.data.errorCode === 0) {
......
......@@ -44,6 +44,18 @@ export default {
uuid: {
type:String,
default:''
},
cacheUuid:{
type:String,
default:''
},
isAdd:{
type:Boolean,
default:true
},
isCache:{
type:Boolean,
default:false
}
},
watch: {
......@@ -56,7 +68,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 => {
// 半勾选计算市数量
......@@ -96,6 +107,7 @@ export default {
},
created() {
this.getAreaTree();
console.log(this.uuid,this.cacheUuid);
},
methods:{
// 获取树形结构
......@@ -120,7 +132,7 @@ export default {
getCheckedData() {
return new Promise((resolve,reject) => {
let params = {
key:this.uuid,
key:this.isCache ? this.cacheUuid : this.uuid,
selectType:3,
search:'',
currentPage:1,
......@@ -185,16 +197,14 @@ export default {
console.log(item.indeterminate,item.isCheck);
},
saveArea() {
this.params.key = this.uuid;
this.params.key = this.isAdd ? this.uuid: this.cacheUuid;
let valueList = [];
this.areaList.map(v => {
// 全选 只传省ID
if(!v.indeterminate && v.isCheck) {
valueList.push(v.provinceId)
}
if(v.indeterminate && v.isCheck && v.children.length) {
// 半选 传市id
v.children.map(w => {
if (w.isCheck) {
......@@ -203,7 +213,6 @@ export default {
})
}
});
this.params.value = valueList.filter(v => v).join(',');
if (!this.params.value) {
this.$message({type:"warning",message:"门店选择不能为空"});
......@@ -211,6 +220,9 @@ export default {
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.params)).then(res => {
if (res.data.errorCode === 0) {
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.popoverShow = false;
} else {
this.$message({type:'error',message:'保存失败'});
......
......@@ -59,6 +59,18 @@ export default {
uuid:{
type:String,
default:''
},
cacheUuid:{
type:String,
default:''
},
isAdd:{
type:Boolean,
default:true
},
isCache:{
type:Boolean,
default:false
}
},
data() {
......@@ -90,7 +102,8 @@ export default {
created() {
this.getLeftList().then(_ => {
this.getRightList();
})
});
console.log(this.uuid,this.cacheUuid);
},
methods:{
// 拉取左侧数据
......@@ -109,12 +122,13 @@ export default {
// 拉取右侧数据
getRightList() {
let params = {
key:this.uuid,
key:this.isCache ? this.cacheUuid : this.uuid,
selectType:4,
search:this.rightValue,
currentPage:1,
pageSize:999
}
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(params)).then(res => {
this.rightList = (res.data.result && res.data.result.result) || [];
this.rightTotal = (res.data.result && res.data.result.totalCount) || 0;
......@@ -127,7 +141,7 @@ export default {
},
// 左侧数据移动到右侧
saveToRight() {
this.params.key = this.uuid;
this.params.key = this.isAdd ? this.uuid: this.cacheUuid;
if (this.params.isAll) {
this.params.removeItems = this.leftList.filter(v => {
return this.leftCheckList.indexOf(v.tagId) < 0;
......@@ -140,16 +154,26 @@ export default {
}
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.params)).then(res => {
this.getRightList();
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.getRightList();
})
}).catch(err => {
console.log(err)
})
},
// 删除右侧全部
deleteRightAll() {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+this.uuid).then(res => {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key=' + (this.isAdd ? this.uuid: this.cacheUuid)).then(res => {
if (res.data.errorCode === 0) {
this.getRightList();
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.getRightList();
})
} else {
this.$message({type:'error',message:'清除全部失败'});
}
......@@ -160,14 +184,20 @@ export default {
// 删除右侧单选或者多选数据
deleteRightItems(item) {
let params = {
key:this.uuid,
key:this.isAdd ? this.uuid: this.cacheUuid,
removeItems:item || this.rightCheckList.join(',')
}
this.params.value = this.leftCheckList.join(',');
// console.log(url);
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
this.getRightList();
this.rightCheckList = [];
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.getRightList();
this.rightCheckList = [];
})
}).catch(err => {
console.log(err)
})
......
......@@ -67,6 +67,18 @@ export default {
uuid:{
type:String,
default:''
},
cacheUuid:{
type:String,
default:''
},
isAdd:{
type:Boolean,
default:true
},
isCache:{
type:Boolean,
default:false
}
},
data() {
......@@ -109,6 +121,7 @@ export default {
this.initLeftList();
// 初始化右侧列表
this.initRightList();
console.log(this.uuid,this.cacheUuid);
},
computed:{
computedLeftCount() {
......@@ -175,7 +188,7 @@ export default {
getRightList() {
return new Promise((resolve,reject) => {
this.rightMoreLoading = true;
this.rightParams.key = this.uuid;
this.rightParams.key = this.isCache ? this.cacheUuid : this.uuid;
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(this.rightParams)).then(res => {
this.rightMoreLoading = false;
if (res.data.errorCode === 0) {
......@@ -223,7 +236,7 @@ export default {
},
// 左侧数据移动到右侧
saveToRight() {
this.saveParams.key = this.uuid;
this.saveParams.key = this.isAdd ? this.uuid: this.cacheUuid;
if (this.saveParams.isAll) {
this.saveParams.removeItems = this.leftList.filter(v => {
return this.leftCheckList.indexOf(v.storeId) < 0;
......@@ -237,8 +250,13 @@ export default {
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.saveParams)).then(res => {
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.getRightList().then(res => {
this.rightList = res;
})
})
}).catch(err => {
console.log(err)
......@@ -246,9 +264,14 @@ export default {
},
// 删除右侧全部
deleteRightAll() {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+this.uuid).then(res => {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key=' + (this.isAdd ? this.uuid: this.cacheUuid)).then(res => {
if (res.data.errorCode === 0) {
this.initRightList();
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.initRightList();
})
} else {
this.$message({type:'error',message:'清除全部失败'});
}
......@@ -259,14 +282,19 @@ export default {
// 删除右侧单选或者多选数据
deleteRightItems(item) {
let params = {
key:this.uuid,
key:this.isAdd ? this.uuid: this.cacheUuid,
removeItems:item || this.rightCheckList.join(',')
}
this.saveParams.value = this.leftCheckList.join(',');
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
this.rightParams.currentPage = 1;
this.initRightList();
this.rightCheckList = [];
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.initRightList();
this.rightCheckList = [];
})
}).catch(err => {
console.log(err)
})
......
......@@ -61,6 +61,18 @@ export default {
uuid:{
type:String,
default:''
},
cacheUuid:{
type:String,
default:''
},
isAdd:{
type:Boolean,
default:true
},
isCache:{
type:Boolean,
default:false
}
},
data() {
......@@ -107,6 +119,7 @@ export default {
created() {
this.getLeftList();
this.rightSearch();
console.log(this.uuid,this.cacheUuid);
},
methods:{
// 右侧搜索
......@@ -129,7 +142,8 @@ export default {
getRightList() {
return new Promise((resolve,reject) => {
this.moreLoading = true;
this.rightParams.key = this.uuid;
console.log(this.isCache)
this.rightParams.key = this.isCache ? this.cacheUuid : this.uuid;
this.rightParams.search = this.rightValue;
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(this.rightParams)).then(res => {
this.moreLoading = false;
......@@ -154,7 +168,7 @@ export default {
},
// 左侧数据移动到右侧
saveToRight() {
this.params.key = this.uuid;
this.params.key = this.isAdd ? this.uuid: this.cacheUuid;
if (this.params.isAll) {
this.params.removeItems = this.leftList.filter(v => {
return this.leftCheckList.indexOf(v.tagId) < 0;
......@@ -168,8 +182,13 @@ export default {
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.params)).then(res => {
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.$nextTick(_ => {
this.getRightList().then(res => {
this.rightList = res;
})
})
}).catch(err => {
console.log(err)
......@@ -177,11 +196,16 @@ export default {
},
// 删除右侧全部
deleteRightAll() {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+this.uuid).then(res => {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key=' + (this.isAdd ? this.uuid: this.cacheUuid)).then(res => {
if (res.data.errorCode === 0) {
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
this.$nextTick(_ => {
this.getRightList().then(res => {
this.rightList = res;
})
})
} else {
this.$message({type:'error',message:'清除全部失败'});
......@@ -194,16 +218,21 @@ export default {
// 删除右侧单选或者多选数据
deleteRightItems(item) {
let params = {
key:this.uuid,
key:this.isAdd ? this.uuid: this.cacheUuid,
removeItems:item || this.rightCheckList.join(',')
}
this.params.value = this.leftCheckList.join(',');
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
this.$nextTick(_ => {
this.getRightList().then(res => {
this.rightList = res;
})
this.rightCheckList = [];
})
this.rightCheckList = [];
}).catch(err => {
console.log(err)
})
......
......@@ -26,10 +26,23 @@ export default {
uuid:{
type:String,
default:''
},
cacheUuid:{
type:String,
default:''
},
isAdd:{
type:Boolean,
default:true
},
isCache:{
type:Boolean,
default:false
}
},
created() {
this.getRightList();
console.log(this.uuid,this.cacheUuid);
},
data() {
return {
......@@ -65,7 +78,7 @@ export default {
// 拉取右侧数据
getRightList() {
let params = {
key:this.uuid,
key:this.isCache ? this.cacheUuid : this.uuid,
selectType:1,
search:'',
currentPage:1,
......@@ -81,15 +94,17 @@ export default {
},
// 保存
saveToRight() {
this.params.key = this.uuid;
let valueList = [];
this.params.key = this.isAdd ? this.uuid: this.cacheUuid;
this.params.value = this.checkedList.join(',');
if (!this.params.value) {
this.$message({type:"warning",message:"门店选择不能为空"});
return;
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.params)).then(res => {
// this.popoverShow = false;
// 如果是编辑 并且有操作 把isCache设为true 最终保存是临时id
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
}).catch(err => {
console.log(err)
})
......@@ -97,11 +112,14 @@ export default {
// 删除右侧单选或者多选数据
delItem(v) {
let params = {
key:this.uuid,
key:this.isAdd ? this.uuid: this.cacheUuid,
removeItems:v,
value:''
}
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
if (!this.isAdd) {
this.$emit('update:isCache',true);
}
this.getRightList();
}).catch(err => {
console.log(err)
......
......@@ -87,7 +87,11 @@ export default {
uuid:{
type:String,
default:''
}
},
isAdd:{
type:Boolean,
default:true
},
},
data() {
return {
......@@ -132,11 +136,25 @@ export default {
leftTotal:0,
newUuid:uuidv1().replace(/-/g,''), // 生成uuid
dialogUuid:uuidv1().replace(/-/g,''),
cacheUuid:uuidv1().replace(/-/g,''), // 生成uuid
dialogVisible:false,
leftMoreShow:false,
leftMoreLoading:false,
rightMoreShow:false,
rightMoreLoading:false
rightMoreLoading:false,
isCache:false
}
},
watch:{
isCache(val) {
console.log(val)
if (val) {
this.$emit('update:uuid',this.cacheUuid);
}
},
uuid(val) {
console.log(val);
}
},
computed:{
......@@ -178,7 +196,9 @@ export default {
return unSelecteds.indexOf(v) < 0;
});
}
this.leftList = res;
// console.log( this.leftList )
})
} else {
this.getInitLeftList().then(res => {
......@@ -191,6 +211,7 @@ export default {
});
}
this.leftList = res;
// console.log( this.leftList )
})
}
},
......@@ -263,7 +284,7 @@ export default {
getRightList() {
return new Promise((resolve,reject) => {
this.rightMoreLoading = true;
this.rightParams.key = this.uuid;
this.rightParams.key = this.isCache ? this.cacheUuid : this.newUuid;
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(this.rightParams)).then(res => {
this.rightMoreLoading = false;
if (res.data.errorCode === 0) {
......@@ -311,6 +332,7 @@ export default {
})
}
},
// 右侧加载更多
rightLoadMore() {
this.rightParams.currentPage += 1;
......@@ -325,13 +347,13 @@ export default {
// 左侧数据移动到右侧
saveToRight() {
this.saveParams.key = this.newUuid;
this.saveParams.key = this.isAdd ? this.newUuid: this.cacheUuid;
if (this.saveParams.isAll) {
if (this.storeType !== 0) {
this.saveParams._key = this.dialogUuid;
console.log(this.saveParams.key, this.saveParams._key)
} else {
this.saveParams._key = '';
}
this.saveParams.removeItems = this.leftList.filter(v => {
return this.leftCheckList.indexOf(v.storeId) < 0;
......@@ -340,16 +362,26 @@ export default {
this.saveParams.value = this.leftCheckList.join(',');
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.saveParams)).then(res => {
this.initRightList();
if (!this.isAdd) {
this.isCache = true;
}
this.$nextTick(_ => {
this.initRightList();
})
}).catch(err => {
console.log(err)
})
},
// 删除右侧全部
deleteRightAll() {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+this.uuid).then(res => {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+ (this.isAdd ? this.newUuid: this.cacheUuid)).then(res => {
if (res.data.errorCode === 0) {
this.initRightList();
if (!this.isAdd) {
this.isCache = true
}
this.$nextTick(_ => {
this.initRightList();
})
} else {
this.$message({type:'error',message:'清除全部失败'});
}
......@@ -361,13 +393,20 @@ export default {
deleteRightItems(item) {
this.rightMoreLoading = true;
let params = {
key:this.newUuid,
key:(this.isAdd ? this.newUuid: this.cacheUuid),
removeItems:item || this.rightCheckList.join(',')
}
this.saveParams.value = this.leftCheckList.join(',');
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
this.initRightList();
this.rightCheckList = [];
if (!this.isAdd) {
this.isCache = true
}
this.$nextTick(_ => {
this.initRightList();
this.rightCheckList = [];
})
this.rightMoreLoading = false;
}).catch(err => {
this.rightMoreLoading = false;
......
......@@ -62,7 +62,6 @@ export default {
})
}
_rec(result);
console.log(result)
this.treeData = result;
},
......
......@@ -5,10 +5,17 @@
<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-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}}
</div>
</div> -->
</div>
</template>
<script>
......@@ -23,18 +30,28 @@ import gicStoreCard from '../component/dmStore/store-card.vue'
data() {
return {
// 参数
uuid:'8f02ccc0e35911e8aaf8672621cbd00c', // 新增传空,编辑必传,
// uuid:'1112ccc0e35911e8aaf8672621cbd111', // 新增传空,编辑必传,
uuid:'066c65f0f3a911e8a48f33baa34efec2', // 新增传空,编辑必传,
// 需要的下拉 默认为全部[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
}
},
watch:{
uuid(val) {
console.log('uuidchange=>'+val)
}
},
mounted() {
this.$refs.storeCard.init();
// setTimeout(_ => {
// this.uuid = '171b3f01f38d11e89acab39639a83083';
// this.$refs.storeCard.init();
// },1000)
},
methods:{
isSaveFun() {
......@@ -49,6 +66,7 @@ import gicStoreCard from '../component/dmStore/store-card.vue'
})
},
isStoreEmpty() {
console.log(this.uuid)
this.$refs.storeCard.getRightList().then(res => {
this.$tips({type:'warning',message:res.length?'有数据':'没有数据'});
console.log(res)
......
......@@ -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>
......@@ -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>
......
......@@ -40,7 +40,7 @@ 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};
......
......@@ -503,7 +503,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
}));
......
......@@ -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:{
......
......@@ -28,13 +28,13 @@ export default Vue.component('render-temp', {
}else if (this.item.auditingStatus === -1) {
return (<div class="fr"><span class="danger-color">{this.item.autingFaildMsg || '审核失败'}</span>{statusFaildhtml}</div>)
}else if (this.item.auditingStatus === -2)
return (<div class="fr"><span class="danger-color">{this.item.autingFaildMsg || '更新失败'}</span>{_html}</div>)
return (<div class="fr"><span class="danger-color">{this.item.autingFaildMsg || '更新失败'}</span>{_html}</div>)
else if (this.item.useCustomCode == 1 && this.item.customCodeSync == 1)
return (<div class="fr"><span class="danger-color">正在上传卡券Code</span></div>)
return (<div class="fr"><span class="danger-color">正在上传卡券Code</span></div>)
else if (this.item.stock === 0)
return (<div class="fr">{statusNostockhtml}</div>)
return (<div class="fr">{statusNostockhtml}</div>)
else if (this.item.cardLimit && this.item.cardLimit == 1)
return (<div class="fr">{_html}</div>)
return (<div class="fr">{_html}</div>)
else return (<div class="fr">{noputonStatushtml}</div>)
}
});
......@@ -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
}));
......
......@@ -176,9 +176,8 @@ export default {
},
watch:{
'form.gameFreeCount'(val){
if (this.form.gameLimitDay != -1 && this.form.gameFreeCount>this.form.gameLimitCount) {
if (this.form.gameLimitCount != -1 && (this.form.gameFreeCount>this.form.gameLimitCount)) {
this.$tips({type:'warning',message:'免费次数不能大于限制次数'});
this.form.gameFreeCount = this.form.gameLimitCount;
}
}
},
......@@ -270,18 +269,18 @@ export default {
},
//提交保存
saveLottery (formName) {
if (this.form.gameFreeCount>this.form.gameLimitCount) {
if (this.form.gameLimitCount != -1 && (this.form.gameFreeCount>this.form.gameLimitCount)) {
this.$tips({type:'warning',message:'免费次数不能大于限制次数'});
return;
}
let flag = false;
this.tableList.forEach((v,i) => {
if ( v.prizeType === 1 && (!v.prizeIntegral || !v.prizeCount)){
if ( v.prizeType === 1 && (!v.prizeIntegral || v.prizeCount < 0)){
this.$tips({type:'warning',message:`第${i+1}个奖品未填写`});
flag = true;
return;
}
if ( v.prizeType === 2 && (!v.prizeCardId || !v.prizeCount)){
if ( v.prizeType === 2 && (!v.prizeCardId || v.prizeCount < 0)){
this.$tips({type:'warning',message:`第${i+1}个奖品未填写`});
flag = true;
return;
......
......@@ -165,9 +165,8 @@ export default {
},
watch:{
'form.gameFreeCount'(val){
if (this.form.gameLimitDay != -1 && this.form.gameFreeCount>this.form.gameLimitCount) {
if (this.form.gameLimitCount != -1 && (this.form.gameFreeCount>this.form.gameLimitCount)) {
this.$tips({type:'warning',message:'免费次数不能大于限制次数'});
this.form.gameFreeCount = this.form.gameLimitCount;
}
}
},
......@@ -248,18 +247,18 @@ export default {
},
//提交保存
saveLottery (formName) {
if (this.form.gameFreeCount>this.form.gameLimitCount) {
if (this.form.gameLimitCount != -1 && (this.form.gameFreeCount>this.form.gameLimitCount)) {
this.$tips({type:'warning',message:'免费次数不能大于限制次数'});
return;
}
let flag = false;
this.tableList.forEach((v,i) => {
if ( v.prizeType === 1 && (!v.prizeIntegral || !v.prizeCount)){
if ( v.prizeType === 1 && (!v.prizeIntegral || v.prizeCount < 0 )){
this.$tips({type:'warning',message:`第${i+1}个奖品未填写`});
flag = true;
return;
}
if ( v.prizeType === 2 && (!v.prizeCardId || !v.prizeCount)){
if ( v.prizeType === 2 && (!v.prizeCardId || v.prizeCount < 0)){
this.$tips({type:'warning',message:`第${i+1}个奖品未填写`});
flag = true;
return;
......
......@@ -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