Compare commits

..

11 Commits

Author SHA1 Message Date
dragon
6067064351 修复全平台消耗详情弹窗异常问题 2025-02-11 14:48:02 +08:00
dragon
51912a1e24 完成每日金币统计 2025-02-10 15:16:45 +08:00
dragon
e10f249e4e 每日金币暂存 2025-02-08 14:54:06 +08:00
dragon
99d2c67087 修复赠送按钮失效问题 2025-02-08 14:53:14 +08:00
dragon
e31f755216 完成周奖励后台 2025-02-07 18:19:12 +08:00
dragon
a73f806d92 周奖励后台暂存 2025-02-07 18:19:12 +08:00
khalil
fa1138dc03 ip限制-增加原因 2025-02-06 16:40:48 +08:00
dragon
6191f1a3f5 新增分区 2025-02-06 15:53:35 +08:00
dragon
50919fd508 修改雷蛇充值字段 2025-01-22 15:48:47 +08:00
dragon
8dc17b87ad 新增雷蛇充值 2025-01-13 15:27:54 +08:00
dragon
d420979350 修复开屏设置层级问题 2025-01-08 11:24:17 +08:00
16 changed files with 1225 additions and 355 deletions

View File

@@ -0,0 +1,13 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// ==================================每日数据====================================
// 列表
export const diamondStatList = query => {
return request({
url: '/admin/diamondStat/list',
method: 'get',
params: query
});
};

View File

@@ -20,13 +20,35 @@ export const chargeAgentExport = query => {
};
// 获取 周期列表
export const getDateCycleList = query => {
export const getDateCycleList = query => {
return request({
url: '/anchorSalaryBill/dateCycle/list',
method: 'get',
params: query
});
};
// 获取 周奖励周期列表
export const familyMemberWeekLevelRewardListCycleDate = query => {
return request({
url: '/admin/familyMemberWeekLevelReward/listCycleDate',
method: 'get',
params: query
});
};
// 获取 周奖励查询列表
export const familyMemberWeekLevelRewardPage = query => {
return request({
url: '/admin/familyMemberWeekLevelReward/page',
method: 'get',
params: query
});
};
// 导出
export const familyMemberWeekLevelRewardExport = query => {
window.location.href = `/admin/familyMemberWeekLevelReward/export?${genQueryParam(query)}`;
return;
};
// 获取 公会钻石薪资流水统计 列表
export const getAgencyDiamondFlow = query => {

View File

@@ -51,6 +51,7 @@
{{langFormat(scope.row.lang)}}
</template>
</el-table-column>
<el-table-column prop="reason" align="center" label="原因" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button

View File

@@ -0,0 +1,300 @@
<template>
<div class="outer">
<!-- 查询 -->
<div class="inquire">
<div class="block">
<span class="demonstration">开始时间</span>
<el-date-picker
v-model="inquire.time[0]"
type="datetime"
placeholder="开始时间"
>
</el-date-picker>
</div>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">结束时间</span>
<el-date-picker
v-model="inquire.time[1]"
type="datetime"
placeholder="结束时间"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button style="" type="primary" @click="getData()">查询</el-button>
<!-- <el-button style="" type="primary" @click="exportDate()">导出</el-button> -->
</div>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="date" align="center" label="日期" />
<el-table-column align="center" label="全平台真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '全平台金币明细';
edi(scope.row, 0);
"
type="text"
size="small"
>
{{ scope.row.totalDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="阿拉伯区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '阿拉伯区金币明细';
edi(scope.row, 2);
"
type="text"
size="small"
>
{{ scope.row.arDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="英语区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '英语区金币明细';
edi(scope.row, 1);
"
type="text"
size="small"
>
{{ scope.row.enDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="华语区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '华语区金币明细';
edi(scope.row, 4);
"
type="text"
size="small"
>
{{ scope.row.zhDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="土耳其区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '土耳其区金币明细';
edi(scope.row, 8);
"
type="text"
size="small"
>
{{ scope.row.trDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column
prop="totalRemainDiamond"
align="center"
label="全平台库存"
/>
<el-table-column
prop="arRemainDiamond"
align="center"
label="阿拉伯区库存"
/>
<el-table-column prop="enRemainDiamond" align="center" label="英语区库存" />
<el-table-column prop="zhRemainDiamond" align="center" label="华语区库存" />
<el-table-column
prop="trRemainDiamond"
align="center"
label="土耳其区库存"
/>
</el-table>
<!-- 分页 -->
<!-- <el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/> -->
<!-- 详情 -->
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="30%" center>
<!-- 内表格 -->
<el-table
v-loading="loading"
:data="tableDataIn"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="domainDesc" align="center" label="类型" />
<el-table-column prop="addDiamond" align="center" label="增加" />
<el-table-column prop="subDiamond" align="center" label="消耗" />
</el-table>
<!-- 操作 -->
<template #footer>
<span class="dialog-footer">
<el-button type="primary" class="primary" @click="detailsDialog = false"
>关闭</el-button
>
</span>
</template>
</el-dialog>
</template>
<script>
import { diamondStatList } from "@/api/dailyCoinStatistics/dailyCoinStatistics";
import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
export default {
name: "dailyCoinStatistics",
data() {
return {
loading: false,
// 查询条件
inquire: {
time: [],
},
// 表格
tableData: [{ x: "x" }],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 内表格
detailsDialog: false,
detailsTitle: "金币明细",
tableDataIn: [],
};
},
created() {
// this.getData();
},
methods: {
// 查询
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = null;
let endTime = null;
if (time.length > 0) {
startTime = this.inquire.time[0]
? dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss")
: null;
endTime = this.inquire.time[1]
? dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss")
: null;
}
diamondStatList({
startDate: startTime,
endDate: endTime,
// pageNo: this.currentPage,
// pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
// this.total = res.data.total;
this.tableData = res.data;
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 详情
edi(res, type) {
var jsonArr =
type == 0
? res.totalDiamondDetail
: type == 1
? res.enDomainDetail
: type == 2
? res.arDomainDetail
: type == 4
? res.zhDomainDetail
: type == 8
? res.trDomainDetail
: `"[""]"`;
console.log(jsonArr);
this.tableDataIn = JSON.parse(jsonArr);
this.detailsDialog = true;
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.outer {
padding-top: 20px;
background: #ecf0f5;
border-top: 3px solid #d2d6de;
.demonstration {
margin-right: 20px;
}
.inquire {
display: flex;
justify-content: space-between;
white-space: nowrap;
float: left;
margin-right: 20px;
}
.search {
width: 100%;
height: 41px;
.searchLeft,
.searchRight {
width: 20%;
float: left;
span {
margin-right: 10px;
}
.input {
width: 75%;
}
}
}
.buttonBox {
margin-top: 10px;
}
.authorityBox {
.authoritySpan {
margin-right: 20px;
}
.authorityInpput {
width: 50%;
}
}
.dialogTableVisibleBut {
margin: -25px 0 20px 0px;
}
}
</style>

View File

@@ -0,0 +1,282 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<div class="block">
<span class="demonstration">分区</span>
<el-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<div class="inquire">
<span>周期</span>
<el-select v-model="inquire.gameArrVal" placeholder="请选择">
<el-option
v-for="item in inquire.gamesArr"
:key="item.gameId"
:label="item.gameName"
:value="item.gameId"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>ID</span>
<el-input
v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
</div>
<!-- 查询按钮 -->
<el-button
class="primary"
type="primary"
@click="
tableData = [];
currentPage = 1;
isFinished = false;
getData();
"
>查询</el-button
>
<el-button
class="primary"
type="primary"
@click="
this.inquire.userId = '';
this.getData();
"
>重置搜索</el-button
>
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
>导出</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
ref="multipleTable"
@selection-change="handleSelectionChange"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="cycleDate" align="center" label="周期" />
<el-table-column prop="familyId" align="center" label="公会ID" />
<el-table-column prop="familyName" align="center" label="公会昵称" />
<el-table-column prop="familyOwnerId" align="center" label="公会长ID" />
<el-table-column
prop="familyOwnerNick"
align="center"
label="公会长昵称"
/>
<el-table-column prop="erbanNo" align="center" label="主播ID" />
<el-table-column prop="nick" align="center" label="主播昵称" />
<el-table-column prop="level" align="center" label="主播等级" />
<el-table-column prop="processNum" align="center" label="钻石流水" />
<el-table-column prop="rewardNum" align="center" label="已获得金币" />
<el-table-column prop="receivedNum" align="center" label="已领取金币" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[1, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import {
familyMemberWeekLevelRewardPage,
familyMemberWeekLevelRewardExport,
familyMemberWeekLevelRewardListCycleDate,
} from "@/api/relAgency/relAgency";
import { listPartitionInfo } from "@/api/noblemanNew/noblemanNew";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage, ElTable } from "element-plus";
import { ref } from "vue";
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
export default {
name: "weeklyRewards",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
userId: "",
gamesArr: [],
gameArrVal: 1,
partitionId: 1,
partitionArr: [
{ id: 1, desc: "英语区" },
{ id: 2, desc: "阿拉伯" },
],
},
// 表格
tableData: [],
// 分页
total: 0, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
// const timestamps = this.getCurrentWeekTimestamps();
// var obj = {};
// timestamps.forEach((res, i) => {
// this.inquire.gamesArr[i] = {
// gameName: dateFormat(res, "yyyy-MM-dd"),
// gameId: dateFormat(res, "yyyy-MM-dd"),
// };
// });
// this.inquire.gameArrVal = this.inquire.gamesArr[0].gameId;
familyMemberWeekLevelRewardListCycleDate().then((res) => {
if (res.code == 200) {
res.data.forEach((res, i) => {
this.inquire.gamesArr[i] = {
gameName: `${dateFormat(res.startDate, "yyyy-MM-dd")}~${dateFormat(
res.endDate,
"yyyy-MM-dd"
)}`,
gameId: res.dateCycle,
};
});
this.inquire.gameArrVal = this.inquire.gamesArr[0].gameId;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
// listPartitionInfo().then((res) => {
// this.inquire.partitionArr = res.data;
// this.inquire.partitionId = this.inquire.partitionArr[0].id;
// this.getData();
// });
},
methods: {
// 查询接口
getData() {
this.isLoading = true;
this.loading = true;
familyMemberWeekLevelRewardPage({
cycleDate: this.inquire.gameArrVal,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
partitionId: this.inquire.partitionId,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.rows;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
this.isLoading = false;
});
},
getCurrentWeekTimestamps() {
const today = new Date();
const dayOfWeek = today.getDay(); // 0周日到6周六
// 计算到周一的天数差:周日需-6天其他天减(当前星期数 - 1)
const diffToMonday = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
const monday = new Date(today);
monday.setDate(monday.getDate() + diffToMonday);
monday.setHours(0, 0, 0, 0); // 设置为周一的0点
const weekTimestamps = [];
for (let i = 0; i < 7; i++) {
const date = new Date(monday);
date.setDate(monday.getDate() + i);
weekTimestamps.push(date.getTime());
}
return weekTimestamps; // 包含周一到周日每天0点的时间戳数组
},
// 导出
confirmExport2Excel() {
familyMemberWeekLevelRewardExport({
cycleDate: this.inquire.gameArrVal,
erbanNo: this.inquire.userId,
partitionId: this.inquire.partitionId,
}).then();
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
.pagination {
margin: 10px auto 10px;
position: relative;
left: 50%;
transform: translateX(-50%);
}
.pagination_in {
text-align: center;
}
</style>

View File

@@ -181,6 +181,7 @@ export default {
methods: {
// 查询接口
getData() {
this.butClick = false;
console.log(dateFormat(this.inquire.time, "yyyy-MM-dd"));
if (!this.inquire.time && this.inquire.userId == '') {
ElMessage({

View File

@@ -560,6 +560,7 @@ export default {
} else {
$("#tipMsg").text("生效时间不能为空");
$("#tipModal").modal("show");
$("#tipModal").css("z-index",'99999999');
return;
}
let endTime = this.resource.endTime;
@@ -568,6 +569,7 @@ export default {
} else {
$("#tipMsg").text("失效时间不能为空");
$("#tipModal").modal("show");
$("#tipModal").css("z-index",'99999999');
return;
}
let isEnabled = 0;

View File

@@ -1,369 +1,584 @@
<template>
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<div id="toolbar">
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnAdd" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
<input type="hidden" id="currentPageNum">
</div>
</div>
<!-- .content -->
<div id="table"></div>
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<div class="col-sm-12">
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
<div class="col-sm-2">
<select name="partitionId" id="partitionId" class="form-control">
<option value="4" selected>华语区</option>
</select>
</div>
</div>
</section>
<div id="toolbar">
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnAdd" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
<div class="modal fade" id="roomTabModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">编辑房间标签</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="addForm">
<input type="hidden" name="id" id="id" />
<div class="form-group">
<label for="modal_seq" class="col-sm-3 control-label">排序<font color="red">*</font>:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[custom[integer]]" name="seq" id="modal_seq"
placeholder="数字小的排前面,必填">
</div>
</div>
<div class="form-group">
<label for="modal_name" class="col-sm-3 control-label">名称<font color="red">*</font>:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="modal_name">
</div>
</div>
<div class="form-group">
<label for="ar_modal_name" class="col-sm-3 control-label">阿语名称<font color="red">*</font>:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="ar_modal_name">
</div>
</div>
<div class="form-group">
<label for="en_modal_name" class="col-sm-3 control-label">英语名称<font color="red">*</font>:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="en_modal_name">
</div>
</div>
<div class="form-group">
<label for="status" class="col-sm-3 control-label">显示状态<font color="red">*</font></label>
<div class="col-sm-9">
<select name="status" id="modal_status" class="form-control validate[required]">
<option value=""></option>
<option value="1">显示</option>
<option value="0">不显示</option>
</select>
</div>
</div>
<div class="form-group">
<label for="room_tab_show" class="col-sm-3 control-label">房间管理列表展示状态<font color="red">*</font>
</label>
<div class="col-sm-9">
<select name="room_tab_show" id="modal_room_tab_show"
class="form-control validate[required]">
<option value=""></option>
<option value="true">展示</option>
<option value="false">不展示</option>
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="add">确定</button>
</div>
</div>
<input type="hidden" id="currentPageNum" />
</div>
</div>
<!-- .content -->
<div id="table"></div>
</div>
</section>
<div
class="modal fade"
id="roomTabModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">编辑房间标签</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="addForm">
<input type="hidden" name="id" id="id" />
<div class="form-group">
<label for="modal_seq" class="col-sm-3 control-label"
>排序<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input
type="text"
class="form-control validate[custom[integer]]"
name="seq"
id="modal_seq"
placeholder="数字小的排前面,必填"
/>
</div>
</div>
<div class="form-group">
<label for="modal_name" class="col-sm-3 control-label"
>名称<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input
type="text"
class="form-control validate[required]"
name="name"
id="modal_name"
/>
</div>
</div>
<div class="form-group">
<label for="ar_modal_name" class="col-sm-3 control-label"
>阿语名称<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input
type="text"
class="form-control validate[required]"
name="name"
id="ar_modal_name"
/>
</div>
</div>
<div class="form-group">
<label for="en_modal_name" class="col-sm-3 control-label"
>英语名称<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input
type="text"
class="form-control validate[required]"
name="name"
id="en_modal_name"
/>
</div>
</div>
<div class="form-group">
<label for="tr_modal_name" class="col-sm-3 control-label"
>土耳其名称<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input
type="text"
class="form-control validate[required]"
name="name"
id="tr_modal_name"
/>
</div>
</div>
<div class="form-group">
<label for="status" class="col-sm-3 control-label"
>显示状态<font color="red">*</font></label
>
<div class="col-sm-9">
<select
name="status"
id="modal_status"
class="form-control validate[required]"
>
<option value=""></option>
<option value="1">显示</option>
<option value="0">不显示</option>
</select>
</div>
</div>
<div class="form-group">
<label for="room_tab_show" class="col-sm-3 control-label"
>房间管理列表展示状态<font color="red">*</font> </label
>
<div class="col-sm-9">
<select
name="room_tab_show"
id="modal_room_tab_show"
class="form-control validate[required]"
>
<option value=""></option>
<option value="true">展示</option>
<option value="false">不展示</option>
</select>
</div>
</div>
<div class="form-group" id="imgBox">
<label class="col-sm-3 control-label">icon</label>
<div class="col-sm-8">
<img
src=""
id="iconImgUrl"
style="width: 108px; height: 45px"
alt=""
/>
<input
type="file"
id="iconFile"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
/>
<button class="btn btn-success" type="button" id="iconBtn">
上传
</button>
<input
type="hidden"
id="iconUrl"
name="alertWinPic"
class="form-control validate[required]"
/>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
关闭
</button>
<button type="button" class="btn btn-primary" id="add">确定</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import TableHelper from "@/utils/bootstrap-table-helper";
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { buildSelectOption } from "@/utils/system-helper";
export default {
name: "RoomTabView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'seq', title: '排序', align: 'center', width: '5%' },
{field: 'name.zh', title: 'Tab名称', align: 'center', width: '10%'},
{field: 'name.ar', title: '阿语Tab名称', align: 'center', width: '10%'},
{field: 'name.en', title: '英语Tab名称', align: 'center', width: '10%'},
{
field: 'status', title: '显示状态', align: 'center', valign: 'middle', width: '5%',
formatter: function (val, row, index) {
if (val) {
return '显示';
} else {
return '不显示';
}
}
},
{
field: 'roomTabShow', title: '房间管理列表展示状态', align: 'center', valign: 'middle', width: '5%',
formatter: function (val, row, index) {
if (val) {
return '展示';
} else {
return '不展示';
}
}
},
{
field: 'id',
title: '操作',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val +
'><i class="glyphicon glyphicon-remove"></i>删除</button>';
}
}
],
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
$("#currentPageNum").val(params.pageNumber);
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
};
return param;
},
ajax: function (request) { //使用ajax请求
$.ajax({
type: "GET",
url: '/admin/roomTab/list',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
data: request.data,
success: function (res) {
console.log(res);
request.success({
"rows": res.rows.map(i=>{
let name = i.name;
if (name.startsWith('{') && name.endsWith('}')) {
i.name = JSON.parse(i.name);
} else {
i.name = {
zh: i.name,
ar: i.name,
en: i.name,
};
}
return i;
}),
"total": res.total
});
},
error: function (error) {
console.log(error);
}
})
},
toolbar: '#toolbar',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
name: "RoomTabView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initPartition();
this.initData();
});
},
methods: {
initData() {
$(function () {
$("#table").bootstrapTable("destroy");
$("#table").bootstrapTable({
columns: [
{ field: "seq", title: "排序", align: "center", width: "5%" },
{
field: "name.zh",
title: "Tab名称",
align: "center",
width: "10%",
},
{
field: "name.ar",
title: "阿语Tab名称",
align: "center",
width: "10%",
},
{
field: "name.en",
title: "英语Tab名称",
align: "center",
width: "10%",
},
{
field: "name.tr",
title: "土耳其Tab名称",
align: "center",
width: "10%",
},
{
field: "status",
title: "显示状态",
align: "center",
valign: "middle",
width: "5%",
formatter: function (val, row, index) {
if (val) {
return "显示";
} else {
return "不显示";
}
},
},
{
field: "icon",
title: "图标",
align: "center",
valign: "middle",
width: "10%",
formatter: function (val, row, index) {
if (null != val && val != "") {
return (
'<img src="' +
val +
'" alt="" style="width: 50px; height: 50px;">'
);
}
return "-";
},
},
{
field: "roomTabShow",
title: "房间管理列表展示状态",
align: "center",
valign: "middle",
width: "5%",
formatter: function (val, row, index) {
if (val) {
return "展示";
} else {
return "不展示";
}
},
},
{
field: "id",
title: "操作",
align: "center",
width: "10%",
formatter: function (val, row, index) {
return (
'<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' +
val +
">" +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' +
val +
'><i class="glyphicon glyphicon-remove"></i>删除</button>'
);
},
},
],
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) {
//设置查询参数
$("#currentPageNum").val(params.pageNumber);
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
partitionId: $("#partitionId").val(),
};
return param;
},
ajax: function (request) {
//使用ajax请求
$.ajax({
type: "GET",
url: "/admin/roomTab/list",
contentType: "application/json;charset=utf-8",
dataType: "json",
data: request.data,
success: function (res) {
console.log(res);
request.success({
rows: res.rows.map((i) => {
let name = i.name;
if (name.startsWith("{") && name.endsWith("}")) {
i.name = JSON.parse(i.name);
} else {
i.name = {
zh: i.name,
ar: i.name,
en: i.name,
};
}
return i;
}),
total: res.total,
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
//新建标签
$("#btnAdd").click(function () {
$("#id").val("");
$("#modal_name").val("");
$("#ar_modal_name").val("");
$("#en_modal_name").val("");
$("#modal_seq").val("");
$("#modal_status").val("");
$("#modal_room_tab_show").val("");
$("#modal_type").val("");
$("#modal_istop").val("");
$("#modal_description").val("");
$('#addActPic').val('');
$('#addUploadFile').val('');
$('#addImgUrl').attr('src', '');
$("#roomTabModal").modal('show');
});
$("#add").click(function () {
var id = $("#id").val();
var name = $("#modal_name").val();
// 阿语名称
var ar_name = $("#ar_modal_name").val();
// 英语名称
var en_name = $("#en_modal_name").val();
// 国际化字段
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
const nameValue = JSON.stringify(jsonName);
var seq = $("#modal_seq").val();
var status = $("#modal_status").val();
var roomTabShow = $("#modal_room_tab_show").val();
if ($("#addForm").validationEngine('validate')) {
$.ajax({
type: "post",
url: "/admin/roomTab/save",
data: {
id: id,
name: nameValue,
seq: seq,
status: status,
roomTabShow: roomTabShow,
},
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#roomTabModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#roomTabModal").modal('hide');
}
}
});
}
});
$("#table").on("click", '.opt-edit', function () {
var id = $(this).attr("data-id");
$('#addImgUrl').attr('src', '');
$('#addActPic').val('');
$('#addUploadFile').val('');
$.ajax({
type: "get",
url: "/admin/roomTab/get",
data: { id: id },
dataType: "json",
success: function (ret) {
console.log(ret);
if (ret.code == 200) {
var json = ret.data.roomTab;
$("#id").val(id);
let name = json.name;
if (name.startsWith('{') && name.endsWith('}')) {
var jsonName = JSON.parse(json.name);
$("#modal_name").val(jsonName.zh);
// 阿语名称
$("#ar_modal_name").val(jsonName.ar);
// 英语名称
$("#en_modal_name").val(jsonName.en);
} else {
$("#modal_name").val(name);
// 阿语名称
$("#ar_modal_name").val(name);
// 英语名称
$("#en_modal_name").val(name);
}
$("#modal_seq").val(json.seq);
if (json.status == 1) {
$("#modal_status").val(1);
} else {
$("#modal_status").val(0);
}
if (json.roomTabShow == 1) {
$("#modal_room_tab_show").val("true");
} else {
$("#modal_room_tab_show").val("false");
}
// 打开编辑弹窗
$("#roomTabModal").modal('show');
$("#modalLabel").text("编辑房间Tab");
} else {
$("#tipMsg").text("获取菜单信息出错");
$("#tipModal").modal('show');
}
}
});
});
$("#table").on("click", '.opt-remove', function () {
var id = $(this).attr("data-id");
if (id == 'undefined') {
$("#tipMsg").text("id参数有误");
$("#tipModal").modal('show');
return;
}
if (confirm("你确认删除吗? \r\n 删除后隐藏tab不会显示请谨慎操作")) {
$.ajax({
type: 'post',
url: "/admin/roomTab/hide",
data: { id: id },
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("删除成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("删除失败");
$("#tipModal").modal('show');
}
}
});
}
});
},
error: function (error) {
console.log(error);
},
});
}
},
},
toolbar: "#toolbar",
onLoadSuccess: function () {
//加载成功时执行
console.log("load success");
},
onLoadError: function () {
//加载失败时执行
console.log("load fail");
},
});
// 查询刷新
$("#btnSearch").on("click", function () {
TableHelper.doRefresh("#table");
});
//新建标签
$("#btnAdd").click(function () {
$("#id").val("");
$("#modal_name").val("");
$("#ar_modal_name").val("");
$("#en_modal_name").val("");
$("#tr_modal_name").val("");
$("#modal_seq").val("");
$("#modal_status").val("");
$("#modal_room_tab_show").val("");
$("#modal_type").val("");
$("#modal_istop").val("");
$("#modal_description").val("");
$("#addActPic").val("");
$("#addUploadFile").val("");
$("#addImgUrl").attr("src", "");
$("#roomTabModal").modal("show");
});
$("#add").click(function () {
var id = $("#id").val();
var name = $("#modal_name").val();
// 阿语名称
var ar_name = $("#ar_modal_name").val();
// 英语名称
var en_name = $("#en_modal_name").val();
var tr_name = $("#tr_modal_name").val();
// 国际化字段
var jsonName = { zh: name, ar: ar_name, en: en_name, tr: tr_name };
const nameValue = JSON.stringify(jsonName);
var seq = $("#modal_seq").val();
var status = $("#modal_status").val();
var roomTabShow = $("#modal_room_tab_show").val();
var icon = $("#iconImgUrl").attr("src");
if ($("#addForm").validationEngine("validate")) {
$.ajax({
type: "post",
url: "/admin/roomTab/save",
data: {
id: id,
name: nameValue,
seq: seq,
status: status,
roomTabShow: roomTabShow,
icon: icon,
},
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
$("#roomTabModal").modal("hide");
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
$("#roomTabModal").modal("hide");
}
},
});
}
});
$("#table").on("click", ".opt-edit", function () {
var id = $(this).attr("data-id");
$("#addImgUrl").attr("src", "");
$("#addActPic").val("");
$("#addUploadFile").val("");
$.ajax({
type: "get",
url: "/admin/roomTab/get",
data: { id: id },
dataType: "json",
success: function (ret) {
console.log(ret);
if (ret.code == 200) {
var json = ret.data.roomTab;
$("#id").val(id);
let name = json.name;
$('#iconImgUrl').attr('src',json.icon);
if (name.startsWith("{") && name.endsWith("}")) {
var jsonName = JSON.parse(json.name);
$("#modal_name").val(jsonName.zh);
// 阿语名称
$("#ar_modal_name").val(jsonName.ar);
// 英语名称
$("#en_modal_name").val(jsonName.en);
// 土耳其名称
$("#tr_modal_name").val(jsonName.tr);
} else {
$("#modal_name").val(name);
// 阿语名称
$("#ar_modal_name").val(name);
// 英语名称
$("#en_modal_name").val(name);
// 土耳其名称
$("#tr_modal_name").val(name);
}
$("#modal_seq").val(json.seq);
if (json.status == 1) {
$("#modal_status").val(1);
} else {
$("#modal_status").val(0);
}
if (json.roomTabShow == 1) {
$("#modal_room_tab_show").val("true");
} else {
$("#modal_room_tab_show").val("false");
}
// 打开编辑弹窗
$("#roomTabModal").modal("show");
$("#modalLabel").text("编辑房间Tab");
} else {
$("#tipMsg").text("获取菜单信息出错");
$("#tipModal").modal("show");
}
},
});
});
$("#table").on("click", ".opt-remove", function () {
var id = $(this).attr("data-id");
if (id == "undefined") {
$("#tipMsg").text("id参数有误");
$("#tipModal").modal("show");
return;
}
if (
confirm("你确认删除吗? \r\n 删除后隐藏tab不会显示请谨慎操作")
) {
$.ajax({
type: "post",
url: "/admin/roomTab/hide",
data: { id: id },
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("删除成功");
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("删除失败");
$("#tipModal").modal("show");
}
},
});
}
});
$("#iconBtn").on("click", function () {
if ($("#iconFile").val() == "") {
$("#tipMsg").text("上传图片为空");
$("#tipModal").modal("show");
return;
}
$.ajaxFileUpload({
fileElementId: "iconFile", //需要上传的文件域的ID即<input type="file">的ID。
url: "/admin/upload/img", //后台方法的路径
type: "post", //当要提交自定义参数时这个参数要设置成post
dataType: "json", //服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) {
//提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$("#iconUrl").val(json.path);
$("#iconImgUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal("show");
}
},
error: function (data, status, e) {
//提交失败自动执行的处理函数。
console.error(e);
},
});
});
function clearModal() {
$("#iconImgUrl").attr("src", "");
$("#addForm")
.find("input[type=text],input[type=hidden],input[type=file]")
.each(function () {
$(this).val("");
});
$("#type").val(1);
}
});
},
initPartition() {
getPartitionInfoList().then((res) => {
let data = res.data;
buildSelectOption(
"#partitionId",
4,
data.map((v) => {
return {
value: v.id,
text: v.desc,
};
})
);
});
},
},
};
</script>

View File

@@ -101,6 +101,7 @@ export default {
columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -96,6 +96,7 @@ export default {
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
{ field: 'razerAmount', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
{ field: 'myCardAmount', title: 'MyCard支付', align: 'center', width: '5%' },
{ field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },
@@ -163,7 +164,7 @@ export default {
columns: [
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' }
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' },
],
undefinedText: 0,

View File

@@ -101,6 +101,7 @@ export default {
columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -97,6 +97,7 @@ export default {
columns: [
{ field: 'partitionName', title: '分区', align: 'center', width: '25%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '25%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '25%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '25%' },
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '25%' },

View File

@@ -115,6 +115,7 @@ export default {
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
{ field: 'razerAmount', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
{ field: 'myCardAmount', title: 'myCard支付', align: 'center', width: '5%' },
{ field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },

View File

@@ -101,6 +101,7 @@ export default {
columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -101,6 +101,7 @@ export default {
columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值1', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -16,6 +16,14 @@
method="post"
target="_blank"
>
<div class="col-sm-12">
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
<div class="col-sm-2">
<select name="partitionId" id="partitionId" class="form-control">
<option value="4" selected>华语区</option>
</select>
</div>
</div>
<div class="col-sm-12">
<label for="erbanNo" class="col-sm-1 control-label"
>平台号:</label
@@ -240,6 +248,8 @@
<script>
import TableHelper from "@/utils/bootstrap-table-helper";
import { showLoading, hideLoading } from "@/utils/maintainer";
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { buildSelectOption } from "@/utils/system-helper";
var picker1 = $("#beginDate").datetimepicker({
format: "yyyy-mm-dd hh:ii:00",
@@ -325,6 +335,7 @@ export default {
created() {
this.$nextTick(function () {
this.initData();
this.initPartition();
});
},
methods: {
@@ -503,6 +514,7 @@ export default {
beginDate: $("#beginDate").val(),
endDate: $("#endDate").val(),
wolrdId: $("#wolrdId").val(),
partitionId: $("#partitionId").val(),
};
return param;
},
@@ -640,6 +652,21 @@ export default {
});
});
},
initPartition() {
getPartitionInfoList().then((res) => {
let data = res.data;
buildSelectOption(
"#partitionId",
4,
data.map((v) => {
return {
value: v.id,
text: v.desc,
};
})
);
});
},
},
};