Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-04-29 18:05:11 +08:00
5 changed files with 64 additions and 14 deletions

View File

@@ -15,8 +15,8 @@ export function adminEnter(id) {
return http.post('/device/admin/enter/' + id)
}
export function adminOut(id) {
return http.post('/device/admin/out/' + id)
export function adminOut(id, pwd) {
return http.post('/device/admin/out/' + id, { 'password': pwd })
}
export function uploadLog(id) {
return http.post('/device/upload/log/' + id)

View File

@@ -10,8 +10,15 @@ export function find(id) {
/**
* 结算订单
*/
export function orderAccount(params) {
return http.post('/member/enter/veneu/account', params)
export function orderAccount(enterId, payMoney) {
return http.post('/member/enter/veneu/account', { 'EnterId': enterId, 'payMoney': payMoney })
}
/**
* 汇总收益
*/
export function orderPageSum(params) {
return http.get('/member/enter/sum/money', params)
}
/**

View File

@@ -48,12 +48,20 @@
<template scope="scope">
<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="handleOut(scope.row.id)">管理员出场</el-button>-->
<el-button size="small" class="danger" type="text" @click="handleOutPassword(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>-->
</template>
</el-table-column>
</Pagination>
<el-dialog title="管理员开门" :visible.sync="dialogFormByDay">
<span>请输入开门密码</span>
<el-input v-model="form.password" placeholder="请输入密码"></el-input>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleOut">开门</el-button>
<el-button @click="dialogFormByDay = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@@ -71,9 +79,14 @@ export default {
},
data() {
return {
dialogFormByDay: false,
deviceId: undefined,
params: {
search_eq_d$venueId: undefined
},
form: {
password: ''
},
venues: [],
intervalid1: undefined
}
@@ -105,14 +118,19 @@ export default {
})
},
handleEnter(id) {
adminEnter(id).then(response => {
handleOutPassword(id) {
this.deviceId = id
this.dialogFormByDay = true
},
handleEnter() {
adminEnter(this.deviceId).then(response => {
this.handleSearch()
})
},
handleOut(id) {
adminOut(id).then(response => {
adminOut(this.deviceId, this.form.password).then(response => {
this.handleSearch()
})
},

View File

@@ -78,10 +78,10 @@ export default {
return {
activeName: '1',
form: {
id: undefined
id: 0
},
params: {
id: undefined
id: 0
}
}
},

View File

@@ -18,11 +18,13 @@
:value="item.value">
</el-option>
</el-select>
<el-input @keyup.enter.native="handleSearch" style="width: 138px;" class="filter-item" clearable placeholder="场馆名称" v-model="params.venueName"></el-input>
<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: 200px;" class="filter-item" clearable placeholder="订单号" v-model="params.orderSn"></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 class="filter-item" style="float: right; margin-top: 20px;"><span>统计收益:{{orderSumMoney}}</span></div>
</div>
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部" name="1">
@@ -129,7 +131,7 @@
</template>
<script>
import { remove, orderAccount } from '@/api//member/enter/veneu/log'
import { remove, orderAccount, orderPageSum } from '@/api//member/enter/veneu/log'
import waves from '@/directive/waves.js'// 水波纹指令
import Pagination from '@/components/Pagination'
import moment from 'moment'
@@ -145,15 +147,20 @@ export default {
activeName: '1',
dialogFormByDay: false,
orderId: undefined,
// 订单金额
orderPrice: undefined,
// 订单已退款金额
orderPayMoney: undefined,
// 汇总金额
orderSumMoney: 0,
params: {
search_eq_mobile: '',
orderSn: '',
starTime: '',
endTime: '',
search_like_nickname: '',
state: undefined
state: undefined,
venueName: ''
},
form: {
miniMoney: undefined
@@ -177,6 +184,12 @@ export default {
}
},
created() {
orderPageSum(this.params).then(result => {
this.orderSumMoney = result.orderSumMoney
}).catch(err => {
console.log(err)
this.orderSumMoney = 0
})
},
methods: {
/**
@@ -184,13 +197,23 @@ export default {
*/
handleSearch() {
if (this.params.date != null) {
this.params.endTime = moment(this.params.date[1]).format('YYYY-M-D HH:mm:ss')
this.params.endTime = moment(this.params.date[1]).format('YYYY-M-D') + ' 23:59:59'
this.params.starTime = moment(this.params.date[0]).format('YYYY-M-D HH:mm:ss')
} else {
this.params.starTime = ''
this.params.endTime = ''
}
this.refresh()
},
refresh() {
this.$refs.pagination.handleSearch()
orderPageSum(this.params).then(result => {
this.orderSumMoney = result.orderSumMoney
}).catch(err => {
console.log(err)
this.orderSumMoney = 0
})
},
/**
@@ -231,7 +254,9 @@ export default {
return
}
this.dialogFormByDay = false
orderAccount()
orderAccount(this.orderId, this.form.miniMoney).then(result => {
this.refresh()
})
},
getType(type) {