添加优惠券相关
This commit is contained in:
@@ -1,42 +1,43 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="$refs.addCoupon.show()">
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="$refs.addCoupon.show()">
|
||||
添加优惠券
|
||||
</el-button> -->
|
||||
<el-button type="primary" icon="el-icon-plus" @click="$router.push({name: 'add_coupon', query: {type:1}})">
|
||||
添加优惠券
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="$router.push({name: 'add_coupon', query: {type:2}})">
|
||||
添加商品券
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-table :data="tableData.data" v-loading="tableData.loading">
|
||||
<el-table-column label="优惠券名称" prop="title"></el-table-column>
|
||||
<el-table-column label="类型" prop="classType">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.classType | classTypeFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ID" prop="title"></el-table-column>
|
||||
<el-table-column label="名称" prop="title"></el-table-column>
|
||||
<el-table-column label="优惠类型" prop="type">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.type | typeFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣" prop="ratio"></el-table-column>
|
||||
<el-table-column label="面额" prop="amount"></el-table-column>
|
||||
<el-table-column label="满减限制" prop="limitAmount"></el-table-column>
|
||||
<el-table-column label="发放数量" prop="number"></el-table-column>
|
||||
<el-table-column label="限领数量" prop="limitNumber"></el-table-column>
|
||||
<el-table-column label="剩余数量" prop="leftNumber"></el-table-column>
|
||||
<el-table-column label="使用门槛" prop="ratio"></el-table-column>
|
||||
<el-table-column label="有效期" prop="effectType">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.effectType | effectTypeFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="fromTime"></el-table-column>
|
||||
<el-table-column label="到期时间" prop="toTime"></el-table-column>
|
||||
<el-table-column label="商品列表" prop="relationIds" width="200">
|
||||
<el-table-column label="用户领取方式" prop="ratio"></el-table-column>
|
||||
<el-table-column label="总发放数量" prop="ratio"></el-table-column>
|
||||
<el-table-column label="已领取" prop="ratio"></el-table-column>
|
||||
<el-table-column label="已使用" prop="ratio"></el-table-column>
|
||||
<el-table-column label="剩余" prop="ratio"></el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template v-slot="scope">
|
||||
<div style="display: flex;" v-if="scope.row.classType == 'product'">
|
||||
<el-image :src="scope.row.coverImg" style="width: 30px;height: 30px;"></el-image>
|
||||
<span style="margin-left: 10px;">{{ scope.row.name }}</span>
|
||||
</div>
|
||||
<el-button type="text" icon="el-icon-edit" @click="toPath( '/product/add_shop' ,scope.row )">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||
slot="reference">删除</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -52,7 +53,7 @@
|
||||
|
||||
<script>
|
||||
import couponEnum from './couponEnum'
|
||||
import addCoupon from './components/addCoupon.vue'
|
||||
import addCoupon from './components/coupon_details.vue'
|
||||
import { tbMerchantCouponGet } from '@/api/shop'
|
||||
export default {
|
||||
components: { addCoupon },
|
||||
@@ -68,9 +69,7 @@ export default {
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
classTypeFilter(value) {
|
||||
return couponEnum.classType.find(item => item.value == value).label
|
||||
},
|
||||
|
||||
typeFilter(value) {
|
||||
return couponEnum.type.find(item => item.value == value).label
|
||||
},
|
||||
@@ -82,6 +81,10 @@ export default {
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
// 是否允许修改商品
|
||||
toPath ( path , row) {
|
||||
this.$router.push({path: path, query: row})
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.page = 0
|
||||
|
||||
Reference in New Issue
Block a user