篮球入场后台支持查看

This commit is contained in:
2024-01-16 00:29:24 +08:00
parent dc00ac0ed4
commit 97193d4c31
5 changed files with 193 additions and 258 deletions

View File

@@ -7,6 +7,13 @@ export function find(id) {
return http.get('/member/enter/veneu/log/' + id) return http.get('/member/enter/veneu/log/' + id)
} }
/**
* 结算订单
*/
export function orderAccount(params) {
return http.post('/member/enter/veneu/account', params)
}
/** /**
* 删除篮球进场订单 * 删除篮球进场订单
*/ */

View File

@@ -49,7 +49,7 @@
<el-button size="small" type="text" @click="uploadLog(scope.row.id)">上传日志(bug)</el-button> <el-button size="small" type="text" @click="uploadLog(scope.row.id)">上传日志(bug)</el-button>
<!-- <el-button size="small" type="text" @click="handleEnter(scope.row.id)">管理员进场</el-button>--> <!-- <el-button size="small" type="text" @click="handleEnter(scope.row.id)">管理员进场</el-button>-->
<!-- <el-button size="small" type="text" @click="handleOut(scope.row.id)">管理员出场</el-button>--> <!-- <el-button size="small" type="text" @click="handleOut(scope.row.id)">管理员出场</el-button>-->
<el-button size="small" type="text" @click="printCard(scope.row.id)">打印临时卡凭证</el-button> <!-- <el-button size="small" type="text" @click="printCard(scope.row.id)">打印临时卡凭证</el-button>-->
<!-- <el-button size="small" v-if="scope.row.status == 0" type="text" @click="handleReconnect(scope.row.id)">重新连接</el-button>--> <!-- <el-button size="small" v-if="scope.row.status == 0" type="text" @click="handleReconnect(scope.row.id)">重新连接</el-button>-->
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -3,86 +3,7 @@
<!-- 筛选条件 --> <!-- 筛选条件 -->
<div class="filter-container"> <div class="filter-container">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="进场记录" name="1"> <el-tab-pane label="金额记录" name="1">
<!-- 筛选条件 -->
<div class="filter-container" v-show="false">
<el-input @keyup.enter.native="handleSearch" class="filter-item" placeholder="" v-model="params.memberId"></el-input>
<el-input @keyup.enter.native="handleSearch" class="filter-item" placeholder="" v-model="params.search_eq_memberId"></el-input>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleSearch">搜索</el-button>
<el-button class="filter-item pull-right" type="success" icon="edit" @click="handleCreate">添加</el-button>
</div>
<!-- 列表数据 -->
<Pagination uri="/member/enter/veneu/logs" :request-params="params" ref="pagination">
<!-- 用户ID -->
<el-table-column align="center" label="用户昵称">
<template scope="scope">
<span>{{scope.row.nickname}}</span>
</template>
</el-table-column>
<!-- 场馆ID -->
<el-table-column align="center" label="场馆">
<template scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<!-- 支付状态 -->
<!-- <el-table-column align="center" label="支付状态">-->
<!-- <template scope="scope">-->
<!-- <span v-if="scope.row.payStatus === -1">已取消</span>-->
<!-- <span v-if="scope.row.payStatus === 0">未支付</span>-->
<!-- <span v-if="scope.row.payStatus === 1">已支付</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- 入场支付订单 -->
<el-table-column align="center" label="订单">
<template scope="scope">
<span>{{scope.row.orderSn}}</span>
</template>
</el-table-column>
<!-- 入场支付方式 -->
<el-table-column align="center" label="支付方式">
<template scope="scope">
<span v-if="scope.row.payType === 1">N/A</span>
<span v-if="scope.row.payType === 2">余额</span>
<span v-if="scope.row.payType === 3">会员卡</span>
</template>
</el-table-column>
<el-table-column align="center" label="类型">
<template scope="scope">
<span v-if="scope.row.type === 1">出场</span>
<span v-if="scope.row.type === 0">入场</span>
</template>
</el-table-column>
<!-- 价格 -->
<!-- <el-table-column align="center" label="价格">-->
<!-- <template scope="scope">-->
<!-- <span>{{scope.row.price}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- 进场时间 -->
<el-table-column align="center" label="扫码时间">
<template scope="scope">
<span>{{scope.row.createdTime | parseTime('{y}-{m}-{d} {h}:{i}')}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150">
<template scope="scope">
<el-button size="small" type="text" @click="handleEdit(scope.row.id)">查看</el-button>
</template>
</el-table-column>
</Pagination>
</el-tab-pane>
<el-tab-pane label="金额记录" name="2">
<!-- 列表数据 --> <!-- 列表数据 -->
<Pagination uri="/member/money/logs" :request-params="params" ref="pagination"> <Pagination uri="/member/money/logs" :request-params="params" ref="pagination">
@@ -124,7 +45,7 @@
</el-table-column> </el-table-column>
</Pagination> </Pagination>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="用户会员卡" name="3"> <el-tab-pane label="用户会员卡" name="2">
<!-- 列表数据 --> <!-- 列表数据 -->
<Pagination uri="/member/cards" :request-params="params" ref="pagination"> <Pagination uri="/member/cards" :request-params="params" ref="pagination">
@@ -180,7 +101,7 @@
</el-table-column> </el-table-column>
</Pagination> </Pagination>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="用户信息" name="4"> <el-tab-pane label="用户信息" name="3">
<div class="app-container app-edit"> <div class="app-container app-edit">
<el-form class="small-space" :model="form" :rules="rules" ref="form" label-position="right"> <el-form class="small-space" :model="form" :rules="rules" ref="form" label-position="right">
@@ -343,8 +264,13 @@ export default {
}, },
handleClick(tab, event) { handleClick(tab, event) {
// if (tab.index === '0') {
// this.params.payStatus = undefined
// this.$refs.pagination.pageRequest()
// }
if (tab.index === '0') { if (tab.index === '0') {
this.params.payStatus = undefined this.params.payStatus = undefined
this.params.search_eq_memberId = this.$route.query.id
this.$refs.pagination.pageRequest() this.$refs.pagination.pageRequest()
} }
if (tab.index === '1') { if (tab.index === '1') {
@@ -353,11 +279,6 @@ export default {
this.$refs.pagination.pageRequest() this.$refs.pagination.pageRequest()
} }
if (tab.index === '2') { if (tab.index === '2') {
this.params.payStatus = undefined
this.params.search_eq_memberId = this.$route.query.id
this.$refs.pagination.pageRequest()
}
if (tab.index === '3') {
this.form.id = this.$route.query.id this.form.id = this.$route.query.id
this.findByIds(this.form.id) this.findByIds(this.form.id)
} }

View File

@@ -1,67 +1,60 @@
<template> <template>
<div class="app-container app-edit"> <div class="filter-container">
<el-form class="small-space" :model="form" :rules="rules" ref="form" label-position="right"> <Pagination uri="/member/find/order/enter/log" :request-params="params" ref="pagination">
<el-form-item> <!-- 入场支付订单 -->
<el-button style="float: right;margin-top: -25px;" @click="handleCancel">返回</el-button> <el-table-column align="center" label="序列号">
</el-form-item> <template scope="scope">
<span>{{scope.row.orderSn}}</span>
</template>
</el-table-column>
<!-- 用户ID -->
<el-table-column align="center" label="用户昵称">
<template scope="scope">
<span>{{scope.row.nickname}}</span>
</template>
</el-table-column>
<el-card class="box-card"> <!-- 场馆ID -->
<el-row> <el-table-column align="center" label="场馆">
<el-col :span="8"> <template scope="scope">
<el-col :span="8" class="span-fost">用户昵称:</el-col> <span>{{scope.row.name}}</span>
<span v-text="form.nickname" @click="handleEdit(form.memberId)" style="cursor:pointer;color: blue;"></span> </template>
</el-col> </el-table-column>
</el-row>
<el-row> <!-- 支付状态 -->
<el-col :span="8"> <!-- <el-table-column align="center" label="支付状态">-->
<el-col :span="8" class="span-fost">场馆类型: </el-col> <!-- <template scope="scope">-->
<span v-if="form.veneuType === 1">篮球馆</span> <!-- <span v-if="scope.row.payStatus === -1">已取消</span>-->
<span v-if="form.veneuType === 2">健身馆</span> <!-- <span v-if="scope.row.payStatus === 0">未支付</span>-->
<span v-if="form.veneuType === 2">足球场</span> <!-- <span v-if="scope.row.payStatus === 1">已支付</span>-->
</el-col> <!-- </template>-->
</el-row> <!-- </el-table-column>-->
<!-- <el-col :span="8">-->
<!-- <el-col :span="8" class="span-fost">支付状态: </el-col>--> <el-table-column align="center" label="类型">
<!-- <span v-if="form.payStatus === -1">已取消</span>--> <template scope="scope">
<!-- <span v-if="form.payStatus === 0">未支付</span>--> <span v-if="scope.row.type === 1">出场</span>
<!-- <span v-if="form.payStatus === 1">已支付</span>--> <span v-if="scope.row.type === 0">入场</span>
<!-- </el-col>--> </template>
<el-row> </el-table-column>
<el-col :span="8">
<el-col :span="8" class="span-fost">订单号码: </el-col> <!-- 价格 -->
<el-col :span="8" v-text="form.orderSn"></el-col> <!-- <el-table-column align="center" label="价格">-->
</el-col> <!-- <template scope="scope">-->
</el-row> <!-- <span>{{scope.row.price}}</span>-->
<el-row> <!-- </template>-->
<el-col :span="8"> <!-- </el-table-column>-->
<el-col :span="8" class="span-fost">场馆名称: </el-col>
<span v-text="form.name"></span> <!-- 进场时间 -->
</el-col> <el-table-column align="center" label="扫码时间">
<!-- <el-col :span="8">--> <template scope="scope">
<!-- <el-col :span="8" class="span-fost">进场价格: </el-col>--> <span>{{scope.row.createdTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
<!-- <span v-text="form.price"></span>--> </template>
<!-- </el-col>--> </el-table-column>
</el-row> </Pagination>
<!-- <el-row>--> <!-- 筛选条件 -->
<!-- <el-col :span="8">--> <div class="filter-container">
<!-- <el-col :span="8" class="span-fost">下单时间: </el-col>--> <el-button style="float: right;margin-top: 5px;margin-right: 10px;" @click="handleCancel">返回</el-button>
<!-- <span>{{form.createdTime | parseTime('{y}-{m}-{d} {h}:{i}')}}</span>--> </div>
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-col :span="8" class="span-fost">外部订单号: </el-col>-->
<!-- <span v-text="form.tradeSn"></span>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="8">
<el-col :span="8" class="span-fost">支付方式: </el-col>
<span v-if="form.payType === 1">N/A</span>
<span v-if="form.payType === 2">余额</span>
<span v-if="form.payType === 3">会员卡</span>
</el-col>
</el-row>
</el-card>
</el-form>
</div> </div>
</template> </template>
@@ -76,98 +69,30 @@
</style> </style>
<script> <script>
import { find, save } from '@/api//member/enter/veneu/log' import Pagination from '@/components/Pagination'
export default { export default {
name: 'memberEnterLog_list',
components: { Pagination },
data() { data() {
return { return {
activeName: '1',
form: { form: {
id: undefined, id: undefined
veneuType: '',
orderSn: '',
nickname: '',
payStatus: '',
name: '',
price: '',
createdTime: '',
tradeSn: '',
payType: ''
}, },
params: {
onSubmit: false, id: undefined
// 表单验证规则
rules: {
// mobile: [
// { required: true, message: '请输入手机号码', trigger: 'blur' }
// ],
// username: [
// { required: true, message: '请输入姓名', trigger: 'blur' },
// { max: 15, message: '姓名长度不能超过15个字符', trigger: 'blur' }
// ],
// email: [
// { required: true, message: '请输入邮箱', trigger: 'blur' },
// { type: 'email', message: '您输入的邮箱格式不正确', trigger: 'blur' }
// ],
// password: [
// { required: true, message: '请输入密码', trigger: 'blur' },
// { min: 6, message: '密码长度不能少于6个字符', trigger: 'blur' }
// ]
} }
} }
}, },
created() { created() {
if (this.$route.query.id) { if (this.$route.query.id) {
this.form.id = this.$route.query.id this.form.id = this.$route.query.id
this.findById(this.form.id) this.params.id = this.$route.query.id
this.$refs.pagination.handleSearch()
} }
}, },
methods: { methods: {
/**
* 查询篮球进场订单
*/
findById(id) {
find(id).then(response => {
this.form.memberId = response.memberEnterVeneuLog.memberId
this.form.veneuType = response.memberEnterVeneuLog.veneuType
this.form.venueId = response.memberEnterVeneuLog.venueId
this.form.orderSn = response.memberEnterVeneuLog.orderSn
this.form.orderSn = response.memberEnterVeneuLog.orderSn
this.form.payType = response.memberEnterVeneuLog.payType
this.form.nickname = response.memberEnterVeneuLog.nickname
this.form.payStatus = response.memberEnterVeneuLog.payStatus
this.form.name = response.memberEnterVeneuLog.name
this.form.price = response.memberEnterVeneuLog.price
this.form.createdTime = response.memberEnterVeneuLog.createdTime
this.form.tradeSn = response.memberEnterVeneuLog.tradeSn
})
},
/**
* 保存篮球进场订单
*/
handleSave() {
this.$refs.form.validate(valid => {
if (!valid) {
return false
}
this.onSubmit = true
save(this.form).then(response => {
this.$router.go(-1)
}).finally(() => {
this.onSubmit = false
})
})
},
/**
* 跳到用户详情
*/
handleEdit(id) {
this.$router.push({ path: '/member/edit', query: { id: id }})
},
/** /**
* 取消 * 取消
*/ */

View File

@@ -5,23 +5,22 @@
<!-- 筛选条件 --> <!-- 筛选条件 -->
<div class="filter-container"> <div class="filter-container">
<el-date-picker class="filter-item" <el-date-picker class="filter-item"
v-model="params.date" style="display: inline-flex;width:230px" v-model="params.date" style="display: inline-flex;width:230px"
type="daterange" type="daterange"
placeholder="请选择订单日期范围" placeholder="请选择订单日期范围"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
<el-select v-model="params.payType" style="width: 120px" class="filter-item" clearable placeholder="支付类型"> <el-select v-model="params.state" style="width: 120px" class="filter-item" clearable placeholder="订单状态">
<el-option v-for="item in options.statu" <el-option v-for="item in options.statu"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-input @keyup.enter.native="handleSearch" style="width: 138px;" class="filter-item" clearable placeholder="订单号" v-model="params.orderSn"></el-input>
<el-input @keyup.enter.native="handleSearch" style="width: 138px;" class="filter-item" clearable placeholder="用户手机号" v-model="params.search_eq_mobile"></el-input> <el-input @keyup.enter.native="handleSearch" style="width: 138px;" class="filter-item" clearable placeholder="用户手机号" v-model="params.search_eq_mobile"></el-input>
<!-- <el-input @keyup.enter.native="handleSearch" style="width: 200px;" class="filter-item" clearable placeholder="订单号" v-model="params.orderSn"></el-input> --> <!-- <el-input @keyup.enter.native="handleSearch" style="width: 200px;" class="filter-item" clearable placeholder="订单号" v-model="params.orderSn"></el-input> -->
<el-input @keyup.enter.native="handleSearch" style="width: 170px;" class="filter-item" placeholder="昵称" v-model="params.search_like_nickname"></el-input>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleSearch">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleSearch">搜索</el-button>
<!-- <el-button class="filter-item pull-right" type="success" icon="edit" @click="handleCreate">添加</el-button> --> <!-- <el-button class="filter-item pull-right" type="success" icon="edit" @click="handleCreate">添加</el-button> -->
</div> </div>
@@ -36,19 +35,19 @@
<!-- 列表数据 --> <!-- 列表数据 -->
<Pagination uri="/member/enter/veneu/logs" :request-params="params" ref="pagination"> <Pagination uri="/member/enter/veneu/logs" :request-params="params" ref="pagination">
<el-table-column align="center" label="用户人脸"> <!-- <el-table-column align="center" label="用户人脸">-->
<!-- <template scope="scope">-->
<!-- <img :src="scope.row.faceUrl" style="width:100px;height:auto">-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- 用户ID -->
<el-table-column align="center" label="场馆名">
<template scope="scope"> <template scope="scope">
<img :src="scope.row.faceUrl" style="width:100px;height:auto"> <span>{{scope.row.lessonName}}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 用户ID -->
<el-table-column align="center" label="用户昵称">
<template scope="scope">
<span>{{scope.row.nickname}}</span>
</template>
</el-table-column>
<!-- 手机号 --> <!-- 手机号 -->
<el-table-column align="center" label="手机号"> <el-table-column align="center" label="手机号">
<template scope="scope"> <template scope="scope">
@@ -56,19 +55,25 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 场馆ID --> <el-table-column align="center" label="用户昵称">
<el-table-column align="center" label="类型">
<template scope="scope"> <template scope="scope">
<span v-text="getType(scope.row.type)"></span> <span>{{scope.row.nickname}}</span>
</template>
</el-table-column>
<!-- 场馆ID -->
<el-table-column align="center" label="订单状态">
<template scope="scope">
<span v-text="getType(scope.row.status)"></span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 入场支付订单 --> <!-- 入场支付订单 -->
<!-- <el-table-column align="center" label="订单"> <el-table-column align="center" label="订单">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.orderSn}}</span> <span>{{scope.row.orderSn}}</span>
</template> </template>
</el-table-column> --> </el-table-column>
<!-- 入场支付方式 --> <!-- 入场支付方式 -->
<!-- <el-table-column align="center" label="支付方式"> <!-- <el-table-column align="center" label="支付方式">
@@ -79,30 +84,52 @@
</el-table-column> --> </el-table-column> -->
<!-- 价格 --> <!-- 价格 -->
<!-- <el-table-column align="center" label="价格"> <el-table-column align="center" label="账单金额">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.price}}</span> <span>{{scope.row.price}}</span>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column align="center" label="退款金额">
<template scope="scope">
<span>{{scope.row.payMoney}}</span>
</template>
</el-table-column>
<!-- 进场时间 --> <!-- 进场时间 -->
<el-table-column align="center" label="进场时间"> <el-table-column align="center" label="开始时间">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.createdTime | parseTime('{y}-{m}-{d} {h}:{i}')}}</span> <span>{{scope.row.startTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
</template>
</el-table-column>
<!-- 进场时间 -->
<el-table-column align="center" label="出场时间">
<template scope="scope">
<span>{{scope.row.endTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="150"> <el-table-column label="操作" align="center" width="150">
<template scope="scope"> <template scope="scope">
<el-button size="small" type="text" @click="handleEdit(scope.row.id)">查看</el-button> <el-button size="small" type="text" @click="handleEdit(scope.row.id)">查看入场记录</el-button>
<el-button size="small" type="text" class="danger" @click="handleAccount(scope.row)">结算订单</el-button>
</template> </template>
</el-table-column> </el-table-column>
</Pagination> </Pagination>
<el-dialog title="结算订单" :visible.sync="dialogFormByDay">
<span>请输入退款金额</span>
<el-input-number :min="0" v-model="form.miniMoney" placeholder="请输入金额"></el-input-number>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="accountSend">保存</el-button>
<el-button @click="dialogFormByDay = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { remove } from '@/api//member/enter/veneu/log' import { remove , orderAccount } from '@/api//member/enter/veneu/log'
import waves from '@/directive/waves.js'// 水波纹指令 import waves from '@/directive/waves.js'// 水波纹指令
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import moment from 'moment' import moment from 'moment'
@@ -116,23 +143,34 @@ export default {
data() { data() {
return { return {
activeName: '1', activeName: '1',
dialogFormByDay: false,
orderId: undefined,
orderPrice: undefined,
orderPayMoney: undefined,
params: { params: {
search_eq_mobile: '', search_eq_mobile: '',
orderSn: '', orderSn: '',
starTime: '', starTime: '',
endTime: '', endTime: '',
search_like_nickname: '', search_like_nickname: '',
payType: undefined state: undefined
},
form: {
miniMoney : undefined
}, },
options: { options: {
statu: [ statu: [
{
value: 0,
label: '进行中'
},
{ {
value: 1, value: 1,
label: '余额支付' label: '待结算'
}, },
{ {
value: 2, value: 2,
label: '会员卡' label: '已结算'
} }
] ]
} }
@@ -154,11 +192,55 @@ export default {
} }
this.$refs.pagination.handleSearch() this.$refs.pagination.handleSearch()
}, },
/**
* 结算篮球订单
*/
handleAccount(row) {
this.orderId = row.id
this.orderPrice = row.price
this.orderPayMoney = row.payMoney
if (row.status == 1) {
// 待结算账单无法结算
this.$message({
message: '待结算订单无法进行结算',
type: 'warning'
})
return
}
this.dialogFormByDay = true
},
accountSend() {
if (this.form.miniMoney <= 0) {
this.$message({
message: '非法扣款金额',
type: 'warning'
})
return
}
let payingMoney = 0;
if (this.orderPayMoney != null && this.orderPayMoney != undefined && this.orderPayMoney > 0) {
payingMoney = this.orderPayMoney;
}
if (this.form.miniMoney + payingMoney > this.orderPrice) {
this.$message({
message: '结算退款金额不允许超过订单原始金额!!!',
type: 'warning'
})
return
}
this.dialogFormByDay = false
orderAccount();
},
getType(type) { getType(type) {
if (type === 0) { if (type === 0) {
return '入场' return '使用中'
} else if (type === 1) { } else if (type === 1) {
return '出场' return '结算中'
} else if (type === 2) {
return '已结算'
} }
}, },