| | |
| | | <template> |
| | | <TableLayout :permissions="['business:coupon:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" > |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请输入优惠券名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:coupon:create', 'business:coupon:delete']"> |
| | | <li><el-button type="primary" icon="el-icon-plus" @click="$refs.operaCouponWindow.open('新建', null, 1)" v-permissions="['business:coupon:create']">新建</el-button></li> |
| | | <li><el-button type="primary" icon="el-icon-plus" @click="$refs.operaCouponWindow.open('新建优惠券', null, 1)" v-permissions="['business:coupon:create']">新建</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:coupon:delete']">删除</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | <span v-if="row.couponType ===1"> 折扣券</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="优惠规则" align="center" min-width="150px" show-overflow-tooltip> |
| | | <el-table-column label="优惠规则" align="center" min-width="200px" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.couponType ===0"> {{ `订单满${row.limitPrice||0}元,减${row.price||0}` }}元</span> |
| | | <span v-if="row.couponType ===1"> {{ `订单满${row.limitPrice||0}元,享${row.price||0}折` }}</span> |
| | | <span v-if="row.couponType ===1"> {{ `订单满${row.limitPrice||0}元,享${row.price||0}折,`}}</span><br> |
| | | <span v-if="row.couponType ===1"> {{ `优惠金额上限${row.maxPrice||0}元 `}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="发放总量" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column label="已发送数量" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="showCouponUse(row.id)">{{ row.received||0 }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="发放总量" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.num "> {{ row.num}}</span> |
| | | <span v-if="!row.num ||row.num<=0 ">不限</span><br> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="剩余数量" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ (row.num||0) - (row.received||0) }} |
| | | <span v-if="row.num "> {{ (row.num||0) - (row.received||0) }}</span> |
| | | <span v-if="!row.num ||row.num<=0 ">不限</span><br> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- |
| | |
| | | this.$refs.operaCouponDetail.open('优惠券详情', row) |
| | | }, |
| | | showCouponUse(id) { |
| | | |
| | | this.$refs.operaCouponUsedDetail.open('优惠券领取详情', id) |
| | | }, |
| | | statusChange(row) { |