You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.1 KiB
Vue

<template>
<div class="container">
<!-- <vab-query-form>
<vab-query-form-right-panel :span="24">
<el-form :inline="true" class="docTime" :model="queryForm" @submit.native.prevent>
<el-form-item>
<el-select v-model.trim="queryForm.status" placeholder="状态" clearable>
<el-option label="已领取" value="1"></el-option>
<el-option label="已核销" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model.trim="queryForm.name" placeholder="优惠券名称" clearable>
<el-option label="优惠券一" value="1"></el-option>
<el-option label="优惠券二" value="2"></el-option>
<el-option label="优惠券三" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" type="primary" @click="queryData"></el-button>
</el-form-item>
</el-form>
</vab-query-form-right-panel>
</vab-query-form> -->
<el-table class="custom-table" highlight-current-row border v-loading="listLoading" :data="list" max-height="508px" :element-loading-text="elementLoadingText" @row-dblclick="handleGot">
<template slot="empty"></template>
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="share" label="分享人"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="got" label="领取人"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="status" label="状态">
<template #default="{ row, $index }">
<el-tag type="primary" v-if="row.status == 1">未核销</el-tag>
<el-tag type="danger" v-if="row.status == 2">已核销</el-tag>
</template>
</el-table-column>
</el-table>
<el-pagination background :current-page="queryForm.pageNum" :page-size="queryForm.pageSize" :layout="layout" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange"></el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
list: [
{ share: '张三', got: '李四', status: '1' },
{ share: '王五', got: '赵六', status: '2' },
],
listLoading: false,
elementLoadingText: '正在加载...',
queryForm: {
pageNu: 1,
pageSize: 10,
},
total: 2,
layout: 'total, sizes, prev, pager, next, jumper',
}
},
methods: {
// 分页-一页多少条
handleSizeChange(val) {
this.queryForm.pageSize = val
// this.fetchData()
},
// 分页-第几页
handleCurrentChange(val) {
this.queryForm.pageNum = val
// this.fetchData()
},
// 查询
queryData() {
this.queryForm.pageNum = 1
this.fetchData()
},
// 查询领取消费记录
fetchData() { },
// 分享人下的领取人
handleGot() {
console.log(123)
this.$router.push('/active/got')
},
},
}
</script>
<style></style>