Commit 68957af5 by chenxin

fix:ewash 增加投放 复制

parent 518a6200
......@@ -52,6 +52,33 @@ export default {
meta: {
path: '/ewash/list'
}
},
{
path: 'addgroupsend/:id',
name: 'e袋洗投放',
component: () => import(/* webpackChunkName: "card" */ '../../views/ewash/group-send.vue'),
meta: {
type: 'send',
path: '/ewash/list'
}
},
{
path: 'info/:id',
name: 'e袋洗详情',
component: () => import(/* webpackChunkName: "card" */ '../../views/ewash/form.vue'),
meta: {
type: 'info',
path: '/card/record/get'
}
},
{
path: 'copy/:id',
name: 'e袋洗复制',
component: () => import(/* webpackChunkName: "card" */ '../../views/ewash/form.vue'),
meta: {
type: 'copy',
path: '/card/record/get'
}
}
]
};
......@@ -93,6 +93,14 @@ export default {
*/
handler(val) {
switch (val) {
case 1:
this.$router.push({
path: '/ewash/addgroupsend/' + this.item.coupCardId,
query: {
name: this.item.cardName
}
});
break;
case 2:
this.$router.push('/ewash/analysis/' + this.item.coupCardId);
break;
......@@ -102,6 +110,12 @@ export default {
case 4:
this.$emit('delete-card', this.item.coupCardId);
break;
case 5:
this.$router.push('/ewash/info/' + this.item.coupCardId);
break;
case 6:
this.$router.push('/ewash/copy/' + this.item.coupCardId);
break;
}
},
//编辑库存 前置
......
<template>
<div class="dm-card__item__wrap">
<div class="dm-card__item" :style="{ background: item.cardColor }">
<img class="dm-card__item__avatar" :src="item.brandLogo || loadErrorImg" alt="" />
<div class="inline-block">
<p class="dm-card__item__title">{{ item.cardName }}</p>
<p class="dm-card__item__desc" v-if="item.cardEffectiveMode !== 0">领取后第{{ item.startDay + 1 }}-{{ item.limitDay + item.startDay }}</p>
<p class="dm-card__item__desc" v-if="item.cardEffectiveMode === 0">{{ formatDateTimeByType(item.beginDate, 'yyyy-MM-dd') }}{{ formatDateTimeByType(item.endDate, 'yyyy-MM-dd') }}</p>
</div>
</div>
<p class="dm-card__item--bottom">
<span>适用{{ item.storeMode === 0 ? '所有门店' : item.storeMode === 1 ? '部分分组' : '部分门店' }}</span>
</p>
</div>
</template>
<script>
import { formatDateTimeByType } from '@/utils';
export default {
name: 'item-card',
data() {
return {
formatDateTimeByType,
// eslint-disable-next-line
loadErrorImg: require('../../../assets/img/loaderror.png')
};
},
props: {
item: {
type: Object,
default() {
return {};
}
}
}
};
</script>
<style lang="scss" scoped>
/* card */
.dm-card__item__wrap {
display: inline-block;
position: relative;
width: 298px;
height: 142px;
margin: 0 10px;
vertical-align: middle;
border: 1px solid rgba(228, 231, 237, 1);
border-radius: 4px;
}
.dm-card__item {
padding: 0 15px;
background: rgba(72, 170, 3, 0.85);
height: 106px;
line-height: 106px;
}
.dm-card__item__avatar {
width: 60px;
height: 60px;
border-radius: 50%;
vertical-align: middle;
}
.dm-card__item__title {
vertical-align: middle;
margin-left: 8px;
max-width: 180px;
font-size: 16px;
font-weight: 500;
line-height: 30px;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
}
.dm-card__item__desc {
vertical-align: middle;
margin-left: 8px;
max-width: 200px;
font-size: 12px;
line-height: 20px;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
}
.dm-card__item--bottom {
vertical-align: middle;
line-height: 106px;
color: #909399;
font-size: 12px;
line-height: 36px;
padding-left: 15px;
}
</style>
<template>
<el-dialog title="提示" :visible.sync="show" width="30%" :before-close="close">
<el-select v-model="value" placeholder="请选择">
<el-option v-for="item in options" :key="item.label" :label="item.label" :value="item.label"> </el-option>
</el-select>
<span slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
options: Array,
show: {
type: Boolean,
default: false
}
},
data() {
return {
value: ''
};
},
methods: {
close() {
this.$emit('update:show', false);
},
submit() {
if (this.value) {
this.$emit('get-data', this.value);
this.close();
} else {
this.$tips({ type: 'warning', message: '未选择变量' });
}
}
}
};
</script>
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