|
@@ -19,7 +19,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="游戏期号" prop="gameDate">
|
|
|
+<!-- <el-form-item label="游戏期号" prop="gameDate">
|
|
|
<el-input
|
|
|
v-model="queryParams.gameDate"
|
|
|
placeholder="请输入游戏期号"
|
|
@@ -72,7 +72,7 @@
|
|
|
:value="dict.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="投注时间" prop="daterange">
|
|
|
<el-date-picker
|
|
|
v-model="daterange"
|
|
@@ -90,8 +90,16 @@
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <el-row :gutter="10" class="mb8" style="padding-left: 2rem;font-size: 15px">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <div>今日余额投注: {{staticsWeb.toDayAmount}}</div>
|
|
|
+ <div>今日金币投注: {{staticsWeb.toDayCoinAmount}}</div>
|
|
|
+ <div>余额总投注: {{staticsWeb.totalAmount}}</div>
|
|
|
+ <div>金币总投注: {{staticsWeb.totalCoinAmount}}</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
+<!-- <el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -135,22 +143,57 @@
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
+ </el-row>-->
|
|
|
|
|
|
- <el-table v-loading="loading" :data="bettingList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="主键ID" align="center" prop="id" />
|
|
|
- <el-table-column label="游戏" align="center" prop="gameId">
|
|
|
+<!-- <el-table v-loading="loading" :data="bettingList" @selection-change="handleSelectionChange">-->
|
|
|
+ <el-table v-loading="loading" :data="bettingList" >
|
|
|
+<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
|
+<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
|
|
+ <el-table-column label="用户ID" align="center" prop="userId" width="100"/>
|
|
|
+ <el-table-column label="游戏" align="center" prop="gameId" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ getTypeName(scope.row.gameId) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="用户ID" align="center" prop="userId" />
|
|
|
- <el-table-column label="投注时间" align="center" prop="createTime" width="100"/>
|
|
|
+ <el-table-column label="投注详情(选项:金额)" align="center" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{getBettingInfo(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="本期总投注金额" align="center" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{getBettingAmount(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="开奖获得" align="center" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{getBettingWinAmount(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="本局盈亏" align="center" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{getBettingWinLoseAmount(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="是否开奖" align="center" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.isLottery==0?'否':'是'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="游戏期号" align="center" prop="gameDate" width="130"/>
|
|
|
- <el-table-column label="主播ID" align="center" prop="liveUserId" />
|
|
|
- <el-table-column label="直播房间号" align="center" prop="liveRoomId" />
|
|
|
- <el-table-column label="是否直播间投注 " align="center" prop="isLive">
|
|
|
+ <el-table-column label="开奖项" align="center" prop="gameLotterySucc" width="130">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{getItemName(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="投注类型" align="center" prop="bettingType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.app_game_betting_type" :value="scope.row.bettingType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="开奖时间" align="center" prop="gameRecordDate" width="130"/>
|
|
|
+ <el-table-column label="投注时间" align="center" prop="bettingDate" width="100"/>
|
|
|
+<!-- <el-table-column label="是否直播间投注 " align="center" prop="isLive">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.app_betting_is_live" :value="scope.row.isLive"/>
|
|
|
</template>
|
|
@@ -172,8 +215,8 @@
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.app_game_betting_winning" :value="scope.row.isWinning"/>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ </el-table-column>-->
|
|
|
+<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -190,7 +233,7 @@
|
|
|
v-hasPermi="['business:betting:remove']"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column>-->
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -274,9 +317,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listBetting, getBetting, delBetting, addBetting, updateBetting } from "@/api/business/betting";
|
|
|
+import { listBetting, getBetting, delBetting, addBetting, updateBetting,staticsWeb } from "@/api/business/betting";
|
|
|
import {allGameList } from "@/api/business/game_item";
|
|
|
import {allList} from "@/api/business/lottery";
|
|
|
+import {listHistoryWeb} from "../../../api/business/betting";
|
|
|
|
|
|
export default {
|
|
|
name: "Betting",
|
|
@@ -297,6 +341,7 @@ export default {
|
|
|
total: 0,
|
|
|
// 用户下注记录表格数据
|
|
|
bettingList: [],
|
|
|
+ staticsWeb:{},
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -376,6 +421,66 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ getBettingInfo(row){
|
|
|
+ let detailsCountVOList = row.detailsCountVOList;
|
|
|
+ if(!detailsCountVOList){
|
|
|
+ return "-";
|
|
|
+ }
|
|
|
+ let res = "";
|
|
|
+ let map = {};
|
|
|
+ for(var i in detailsCountVOList){
|
|
|
+ let item = detailsCountVOList[i];
|
|
|
+ let amount = map[item.bettingTtem];
|
|
|
+ if(!amount){
|
|
|
+ amount = 0;
|
|
|
+ }
|
|
|
+ amount += item.orderAmount;
|
|
|
+ map[item.bettingTtem] = amount;
|
|
|
+ }
|
|
|
+ for(var i in map){
|
|
|
+ if(res.length > 0){
|
|
|
+ res += " | "
|
|
|
+ }
|
|
|
+ res += this.gameItemMap[i+"_"+row.gameId] + ":" + map[i];
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ },
|
|
|
+ getBettingAmount(row){
|
|
|
+ let detailsCountVOList = row.detailsCountVOList;
|
|
|
+ if(!detailsCountVOList){
|
|
|
+ return "-";
|
|
|
+ }
|
|
|
+ let amount = 0;
|
|
|
+ for(var i in detailsCountVOList){
|
|
|
+ let item = detailsCountVOList[i];
|
|
|
+ amount += parseInt(item.orderAmount);
|
|
|
+ }
|
|
|
+ return amount;
|
|
|
+ },
|
|
|
+ getBettingWinAmount(row){
|
|
|
+ let detailsCountVOList = row.detailsCountVOList;
|
|
|
+ if(!detailsCountVOList){
|
|
|
+ return "-";
|
|
|
+ }
|
|
|
+ let amount = 0;
|
|
|
+ for(var i in detailsCountVOList){
|
|
|
+ let item = detailsCountVOList[i];
|
|
|
+ amount += parseInt(item.winAmount);
|
|
|
+ }
|
|
|
+ return amount;
|
|
|
+ },
|
|
|
+ getBettingWinLoseAmount(row){
|
|
|
+ let detailsCountVOList = row.detailsCountVOList;
|
|
|
+ if(!detailsCountVOList){
|
|
|
+ return "-";
|
|
|
+ }
|
|
|
+ let amount = 0;
|
|
|
+ for(var i in detailsCountVOList){
|
|
|
+ let item = detailsCountVOList[i];
|
|
|
+ amount += parseInt(item.winAmount) - parseInt(item.loseAmount);
|
|
|
+ }
|
|
|
+ return amount;
|
|
|
+ },
|
|
|
dateChage(val){
|
|
|
if(undefined != val && null != val && val.length > 1){
|
|
|
this.queryParams.beginTime = val[0];
|
|
@@ -388,19 +493,19 @@ export default {
|
|
|
getItemName(row){
|
|
|
let that = this;
|
|
|
let bettingGameType = row.bettingGameType;
|
|
|
- let bettingItem = row.bettingItem;
|
|
|
+ let bettingItem = row.gameLotterySucc;
|
|
|
let gameId = row.gameId;
|
|
|
if("0" == bettingGameType){
|
|
|
return that.gameItemMap[bettingItem+"_"+gameId];
|
|
|
}else{
|
|
|
let name = "";
|
|
|
- let arr = JSON.parse(bettingItem);
|
|
|
+ let arr = bettingItem.split(",")
|
|
|
for(var i in arr){
|
|
|
let item = arr[i];
|
|
|
if("" != name){
|
|
|
name = name + ",";
|
|
|
}
|
|
|
- name = name + that.gameItemMap[item["bettingItem"]+"_"+gameId];
|
|
|
+ name = name + that.gameItemMap[item+"_"+gameId];
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
@@ -411,11 +516,14 @@ export default {
|
|
|
/** 查询用户下注记录列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listBetting(this.queryParams).then(response => {
|
|
|
+ listHistoryWeb(this.queryParams).then(response => {
|
|
|
this.bettingList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
+ staticsWeb(this.queryParams).then(response => {
|
|
|
+ this.staticsWeb = response.data;
|
|
|
+ })
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|