优惠券页面添加
parent
b60f4e9572
commit
a0ad39cecc
@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
领取消费
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="增加优惠券" :visible.sync="dialogFormVisible" ref="dialog" width="450px" @close="close">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
|
||||||
|
<el-form-item label="增量" prop="num">
|
||||||
|
<el-input v-model.trim="form.num" clearable autocomplete="off" onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="close">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="save">核 销</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'add',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
code: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [{ required: true, trigger: 'blur', message: '请输入优惠券编码' }],
|
||||||
|
},
|
||||||
|
dialogFormVisible: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() { },
|
||||||
|
methods: {
|
||||||
|
// 打开弹窗
|
||||||
|
open() {
|
||||||
|
this.form = Object.assign({}, {})
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
},
|
||||||
|
// 关闭弹窗
|
||||||
|
close() {
|
||||||
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = this.$options.data().form
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
// 确认核销
|
||||||
|
save() {
|
||||||
|
this.$refs['form'].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.hotelAssetId) {
|
||||||
|
const form = Object.assign({}, this.form)
|
||||||
|
form.depreciationRate = parseFloat(form.depreciationRate)
|
||||||
|
form.netSalvage = parseFloat(form.netSalvage)
|
||||||
|
doEdit(form).then((res) => this.callbackFun(res))
|
||||||
|
} else {
|
||||||
|
const form = Object.assign({}, this.form)
|
||||||
|
form.depreciationRate = parseFloat(form.depreciationRate)
|
||||||
|
form.netSalvage = parseFloat(form.netSalvage)
|
||||||
|
doAdd(form).then((res) => this.callbackFun(res))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
callbackFun(res) {
|
||||||
|
if (res.success) {
|
||||||
|
this.$baseMessage(res.msg, 'success')
|
||||||
|
this.$emit('fetch-data')
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-form {
|
||||||
|
padding: 0px 20px !important;
|
||||||
|
}
|
||||||
|
.el-form .item {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.el-form .item .el-form-item {
|
||||||
|
width: 49%;
|
||||||
|
}
|
||||||
|
.el-form .item .el-form-item:first-child {
|
||||||
|
margin-right: 1%;
|
||||||
|
}
|
||||||
|
.el-form .el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.remind {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.remind .msg {
|
||||||
|
width: 60px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<!-- <vab-query-form>
|
||||||
|
<vab-query-form-left-panel :span="10">
|
||||||
|
<el-button icon="el-icon-back" type="warning" @click="handleGoBack">返回</el-button>
|
||||||
|
</vab-query-form-left-panel>
|
||||||
|
<vab-query-form-right-panel :span="14">
|
||||||
|
<el-form :inline="true" class="docTime" :model="queryForm" @submit.native.prevent>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="优惠券编码" clearable style="width: 150px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="微信昵称" clearable style="width: 150px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="手机号码" clearable style="width: 150px"></el-input>
|
||||||
|
</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">
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="name" label="优惠券编码"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="name" label="头像"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="微信昵称"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="手机号码"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="分享人"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="deductionAmount" label="是否已核销"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="shareAmount" label="领取时间"></el-table-column>
|
||||||
|
<!-- <el-table-column show-overflow-tooltip align="center" min-width="130" prop="phone" label="手机号码"></el-table-column> -->
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="imgUrl" label="核销时间"></el-table-column>
|
||||||
|
<el-table-column align="center" min-width="80" label="操作">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-button type="warning" size="mini">核销</el-button>
|
||||||
|
</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: [
|
||||||
|
{
|
||||||
|
name: 123,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
listLoading: false,
|
||||||
|
elementLoadingText: '正在加载...',
|
||||||
|
queryForm: {
|
||||||
|
pageNu: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
layout: 'total, sizes, prev, pager, next, jumper',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log(this.$route.params)
|
||||||
|
},
|
||||||
|
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() { },
|
||||||
|
// 返回
|
||||||
|
handleGoBack() {
|
||||||
|
this.$router.push('/active/management')
|
||||||
|
this.$store.dispatch('tabsBar/delRoute', { path: '/active/allGot' })
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="核销优惠券" :visible.sync="dialogFormVisible" ref="dialog" width="450px" @close="close">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
|
||||||
|
<el-form-item label="优惠券编码" prop="code">
|
||||||
|
<el-input v-model.trim="form.code" clearable autocomplete="off" onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="close">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="save">核 销</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Verification',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
code: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [{ required: true, trigger: 'blur', message: '请输入优惠券编码' }],
|
||||||
|
},
|
||||||
|
dialogFormVisible: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() { },
|
||||||
|
methods: {
|
||||||
|
// 打开弹窗
|
||||||
|
open() {
|
||||||
|
this.form = Object.assign({}, {})
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
},
|
||||||
|
// 关闭弹窗
|
||||||
|
close() {
|
||||||
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = this.$options.data().form
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
// 确认核销
|
||||||
|
save() {
|
||||||
|
this.$refs['form'].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.hotelAssetId) {
|
||||||
|
const form = Object.assign({}, this.form)
|
||||||
|
form.depreciationRate = parseFloat(form.depreciationRate)
|
||||||
|
form.netSalvage = parseFloat(form.netSalvage)
|
||||||
|
doEdit(form).then((res) => this.callbackFun(res))
|
||||||
|
} else {
|
||||||
|
const form = Object.assign({}, this.form)
|
||||||
|
form.depreciationRate = parseFloat(form.depreciationRate)
|
||||||
|
form.netSalvage = parseFloat(form.netSalvage)
|
||||||
|
doAdd(form).then((res) => this.callbackFun(res))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
callbackFun(res) {
|
||||||
|
if (res.success) {
|
||||||
|
this.$baseMessage(res.msg, 'success')
|
||||||
|
this.$emit('fetch-data')
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
@ -1,12 +1,121 @@
|
|||||||
<template>
|
<template>
|
||||||
管理
|
<div class="container">
|
||||||
|
<!-- <vab-query-form>
|
||||||
|
<vab-query-form-left-panel :span="12">
|
||||||
|
<el-button icon="el-icon-s-promotion" type="primary" @click="handleIssue">发布</el-button>
|
||||||
|
<el-button icon="el-icon-full-screen" type="warning" @click="handleVerification">核销</el-button>
|
||||||
|
</vab-query-form-left-panel>
|
||||||
|
<vab-query-form-right-panel :span="12">
|
||||||
|
<el-form :inline="true" class="docTime" :model="queryForm" @submit.native.prevent>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="优惠券名称" clearable style="width: 150px"></el-input>
|
||||||
|
</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> -->
|
||||||
|
<div class="query-form">
|
||||||
|
<div class="query-form-left-panel">
|
||||||
|
<el-button icon="el-icon-s-promotion" type="primary" size="mini" @click="handleIssue">发布</el-button>
|
||||||
|
<el-button icon="el-icon-full-screen" type="warning" size="mini" @click="handleVerification">核销</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="query-form-right-panel">
|
||||||
|
<el-form :inline="true" class="docTime" :model="queryForm" @submit.native.prevent>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="优惠券名称" clearable size="small" style="width: 150px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="el-icon-search" type="primary" size="mini" @click="queryData">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table style="width: 100%;margin-top:5px" max-height="650" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}" ref="list" class="custom-table" highlight-current-row border v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @row-dblclick="handleGoter">
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="name" label="优惠券名称"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="name" label="优惠券类型"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="发行数量"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="deductionAmount" label="优惠"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="shareAmount" label="分润"></el-table-column>
|
||||||
|
<!-- <el-table-column show-overflow-tooltip align="center" min-width="130" prop="phone" label="手机号码"></el-table-column> -->
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="imgUrl" label="图片"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="desc1" label="已领取数量"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="desc1" label="已使用数量"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="desc1" label="使用日期" sortable></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="desc1" label="优惠券状态">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-tag type="success" v-if="row.status == 1">完美</el-tag>
|
||||||
|
<el-tag type="primary" v-if="row.status == 2">未过期</el-tag>
|
||||||
|
<el-tag type="warning" v-if="row.status == 3">已过期</el-tag>
|
||||||
|
<el-tag type="danger" v-if="row.status == 4">已作废</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" min-width="250" label="操作">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-button type="primary" size="mini" :disabled="row.status != 2">增量</el-button>
|
||||||
|
<el-button type="warning" size="mini" :disabled="row.status != 2">作废</el-button>
|
||||||
|
<el-button type="danger" size="mini" :disabled="row.status != 2">删除</el-button>
|
||||||
|
</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>
|
||||||
|
<verification ref="verification" @fetch-data="fetchData"></verification>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Verification from './components/verification'
|
||||||
export default {
|
export default {
|
||||||
|
name: 'active',
|
||||||
|
components: { Verification },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [{ status: 1 }, { status: 3 }, { status: 2 }, { status: 4 }],
|
||||||
|
listLoading: false,
|
||||||
|
elementLoadingText: '正在加载...',
|
||||||
|
queryForm: {
|
||||||
|
pageNu: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
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() { },
|
||||||
|
// 查询所有领取人
|
||||||
|
handleGoter(row) {
|
||||||
|
this.$router.push({ name: 'AllGot', params: row })
|
||||||
|
},
|
||||||
|
// 发布
|
||||||
|
handleIssue() {
|
||||||
|
this.$router.push('/active/issue')
|
||||||
|
},
|
||||||
|
// 核销
|
||||||
|
handleVerification() {
|
||||||
|
this.$refs.verification.open()
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
@import "./styles/index.css";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
.query-form{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.query-form .el-form-item{
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<!-- <vab-query-form>
|
||||||
|
<vab-query-form-left-panel :span="10">
|
||||||
|
<el-button icon="el-icon-back" type="warning" @click="handleGoBack">返回</el-button>
|
||||||
|
</vab-query-form-left-panel>
|
||||||
|
<vab-query-form-right-panel :span="14">
|
||||||
|
<el-form :inline="true" class="docTime" :model="queryForm" @submit.native.prevent>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="优惠券编码" clearable style="width: 150px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="微信昵称" clearable style="width: 150px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="手机号码" clearable style="width: 150px"></el-input>
|
||||||
|
</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">
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="name" label="优惠券编码"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="name" label="头像"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="微信昵称"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="手机号码"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="couponNum" label="分享人"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="deductionAmount" label="是否已核销"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="shareAmount" label="领取时间"></el-table-column>
|
||||||
|
<!-- <el-table-column show-overflow-tooltip align="center" min-width="130" prop="phone" label="手机号码"></el-table-column> -->
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="imgUrl" label="核销时间"></el-table-column>
|
||||||
|
<el-table-column align="center" min-width="80" label="操作">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-button type="warning" size="mini">核销</el-button>
|
||||||
|
</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: [
|
||||||
|
{
|
||||||
|
name: 123,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
listLoading: false,
|
||||||
|
elementLoadingText: '正在加载...',
|
||||||
|
queryForm: {
|
||||||
|
pageNu: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
layout: 'total, sizes, prev, pager, next, jumper',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log(this.$route.params)
|
||||||
|
},
|
||||||
|
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() { },
|
||||||
|
// 返回
|
||||||
|
handleGoBack() {
|
||||||
|
this.$router.push('/active/record')
|
||||||
|
this.$store.dispatch('tabsBar/delRoute', { path: '/active/got' })
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
<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>
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
<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-input v-model="queryForm.name" placeholder="状态" clearable style="width: 150px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="queryForm.name" placeholder="活动名称" clearable style="width: 150px"></el-input>
|
||||||
|
</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"
|
||||||
|
>
|
||||||
|
<template slot="empty"></template>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="parentLevel" label="父级"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="sublevel" label="子级"></el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip align="center" min-width="130" prop="status" label="状态"></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: [],
|
||||||
|
listLoading: false,
|
||||||
|
elementLoadingText: '正在加载...',
|
||||||
|
queryForm: {
|
||||||
|
pageNu: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
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() {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
Loading…
Reference in New Issue