Compare commits
3 Commits
boom
...
starRating
Author | SHA1 | Date | |
---|---|---|---|
![]() |
42f556e615 | ||
![]() |
ccf95bb81a | ||
![]() |
dd1fdb23c2 |
@@ -31,4 +31,18 @@ export const refundList = query => {
|
|||||||
export const refundExport = query => {
|
export const refundExport = query => {
|
||||||
window.location.href = `/admin/chargeRecord/refundExport?${genQueryParam(query)}`;
|
window.location.href = `/admin/chargeRecord/refundExport?${genQueryParam(query)}`;
|
||||||
return;
|
return;
|
||||||
|
};
|
||||||
|
// ======================================金币钻石操作记录==================================
|
||||||
|
// 列表
|
||||||
|
export const goldcoinRecordAll = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/goldcoin/recordAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
export const recordAllExport = query => {
|
||||||
|
window.location.href = `/admin/goldcoin/recordAllExport?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
};
|
};
|
@@ -13,6 +13,12 @@ export const listPartitionInfo = query => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 充值代理列表导出
|
||||||
|
export const chargeAgentExport = query => {
|
||||||
|
window.location.href = `/anchorSalaryBill/chargeAgent/export?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
// 获取 周期列表
|
// 获取 周期列表
|
||||||
export const getDateCycleList = query => {
|
export const getDateCycleList = query => {
|
||||||
return request({
|
return request({
|
||||||
|
@@ -54,6 +54,9 @@
|
|||||||
<el-form-item label-width="40px">
|
<el-form-item label-width="40px">
|
||||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
||||||
|
<el-button type="primary" @click="chargeAgentExportFun"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -127,6 +130,7 @@ import {
|
|||||||
chargeAgentList,
|
chargeAgentList,
|
||||||
chargeAgentSum,
|
chargeAgentSum,
|
||||||
listPartitionInfo,
|
listPartitionInfo,
|
||||||
|
chargeAgentExport,
|
||||||
} from "@/api/relAgency/relAgency.js";
|
} from "@/api/relAgency/relAgency.js";
|
||||||
import TablePagination from "@/components/common/TablePagination";
|
import TablePagination from "@/components/common/TablePagination";
|
||||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||||
@@ -192,7 +196,7 @@ export default {
|
|||||||
// this.getData();
|
// this.getData();
|
||||||
listPartitionInfo().then((res) => {
|
listPartitionInfo().then((res) => {
|
||||||
this.partitionArr = res.data;
|
this.partitionArr = res.data;
|
||||||
this.searchForm.partitionId=this.partitionArr[0].id;
|
this.searchForm.partitionId = this.partitionArr[0].id;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -246,6 +250,32 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 导出
|
||||||
|
chargeAgentExportFun() {
|
||||||
|
|
||||||
|
let { pageParams, searchForm } = this;
|
||||||
|
console.log(searchForm);
|
||||||
|
searchForm.startTime = searchForm.startTime
|
||||||
|
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: null;
|
||||||
|
searchForm.endTime = searchForm.endTime
|
||||||
|
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: null;
|
||||||
|
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||||
|
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||||
|
Object.keys(searchForm).forEach((item) => {
|
||||||
|
if (
|
||||||
|
!searchForm[item] ||
|
||||||
|
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||||
|
) {
|
||||||
|
delete searchForm[item];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Object.assign(pageParams, searchForm);
|
||||||
|
console.log(pageParams);
|
||||||
|
|
||||||
|
chargeAgentExport(pageParams).then((res) => {});
|
||||||
|
},
|
||||||
// 点击搜索
|
// 点击搜索
|
||||||
handSearch() {
|
handSearch() {
|
||||||
this.$refs["searchForm"].validate((valid) => {
|
this.$refs["searchForm"].validate((valid) => {
|
||||||
@@ -270,7 +300,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handlePageChange(val) {
|
handlePageChange(val) {
|
||||||
// this.$set(this.pageParams, 'pageNo', val);
|
// this.$set(this.pageParams, 'pageNo', val);
|
||||||
this.pageParams.pageSize = val;
|
this.pageParams.pageNo = val;
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
headerCopy(column, e) {
|
headerCopy(column, e) {
|
||||||
|
@@ -1,412 +1,517 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="searchValue" class="col-sm-3 control-label">Peko ID:</label>
|
<label for="searchValue" class="col-sm-3 control-label"
|
||||||
<div class="col-sm-3"><input type="text" class="form-control" name="searchValue" id="searchValue">
|
>Peko ID:</label
|
||||||
</div>
|
>
|
||||||
<label for="searchType" class="col-sm-3 control-label">地区:</label>
|
<div class="col-sm-3">
|
||||||
<div class="col-sm-3">
|
<input
|
||||||
<select name="searchType" id="searchType" data-btn-class="btn-warning" class="form-control">
|
type="text"
|
||||||
<option value="0" selected="selected">全部</option>
|
class="form-control"
|
||||||
</select>
|
name="searchValue"
|
||||||
</div>
|
id="searchValue"
|
||||||
</div>
|
/>
|
||||||
<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-sign"></i>新增
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<label for="searchType" class="col-sm-3 control-label">地区:</label>
|
||||||
</section>
|
<div class="col-sm-3">
|
||||||
|
<select
|
||||||
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
name="searchType"
|
||||||
<div class="modal-dialog" role="document">
|
id="searchType"
|
||||||
<div class="modal-content">
|
data-btn-class="btn-warning"
|
||||||
<div class="modal-header">
|
class="form-control"
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
>
|
||||||
aria-hidden="true">×</span>
|
<option value="0" selected="selected">全部</option>
|
||||||
</button>
|
</select>
|
||||||
<h4 class="modal-title" id="modalLabel">代充信息</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<input type="hidden" name="id" id="id" />
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="erbanNo" class="col-sm-3 control-label">Peko ID:</label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input type="text" class="form-control" id="erbanNo">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">代充地区</label>
|
|
||||||
</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="save">确认</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<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-sign"></i>新增
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="modal fade" id="tipModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div
|
||||||
<div class="modal-dialog" role="document">
|
class="modal fade"
|
||||||
<div class="modal-content">
|
id="editModal"
|
||||||
<div class="modal-header">
|
tabindex="-1"
|
||||||
<h4 class="modal-title">提示信息</h4>
|
role="dialog"
|
||||||
</div>
|
aria-labelledby="modalLabel"
|
||||||
<div class="modal-body" id="tipMsg"></div>
|
>
|
||||||
</div>
|
<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">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="modalLabel">代充信息</h4>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<input type="hidden" name="id" id="id" />
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="erbanNo" class="col-sm-3 control-label"
|
||||||
|
>Peko ID:</label
|
||||||
|
>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control" id="erbanNo" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="starLevel" class="col-sm-3 control-label"
|
||||||
|
>幸运值:</label
|
||||||
|
>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<select name="starLevel" id="starLevel">
|
||||||
|
<option value="">-- 请选择 --</option>
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3">3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
<option value="5">5</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">代充地区</label>
|
||||||
|
</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="save">确认</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="modal fade"
|
||||||
|
id="tipModal"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="modalLabel"
|
||||||
|
>
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">提示信息</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="tipMsg"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from "@/utils/bootstrap-table-helper";
|
||||||
|
|
||||||
var regionArray;
|
var regionArray;
|
||||||
export default {
|
export default {
|
||||||
name: "RechargeUserView",
|
name: "RechargeUserView",
|
||||||
setup() {
|
setup() {
|
||||||
//切换只读
|
//切换只读
|
||||||
function editSeqText(obj) {
|
function editSeqText(obj) {
|
||||||
if (!regionArray) {
|
if (!regionArray) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var $input = $(obj);
|
var $input = $(obj);
|
||||||
const typeArray = $("input:checkbox[name='type']:checked").serializeArray();
|
const typeArray = $(
|
||||||
if (!typeArray) {
|
"input:checkbox[name='type']:checked"
|
||||||
return;
|
).serializeArray();
|
||||||
}
|
if (!typeArray) {
|
||||||
for (let i = 0; i < regionArray.length; i++) {
|
return;
|
||||||
var region = regionArray[i];
|
}
|
||||||
var type = region.type;
|
for (let i = 0; i < regionArray.length; i++) {
|
||||||
var isCheck = false;
|
var region = regionArray[i];
|
||||||
for (let j = 0; j < typeArray.length; j++) {
|
var type = region.type;
|
||||||
var value = typeArray[j].value;
|
var isCheck = false;
|
||||||
if (type == value) {
|
for (let j = 0; j < typeArray.length; j++) {
|
||||||
isCheck = true;
|
var value = typeArray[j].value;
|
||||||
break;
|
if (type == value) {
|
||||||
}
|
isCheck = true;
|
||||||
}
|
break;
|
||||||
var $seq = $('#seq' + type);
|
}
|
||||||
if (isCheck) {
|
|
||||||
$seq.removeAttr('readonly');
|
|
||||||
} else {
|
|
||||||
$seq.attr('readonly', 'true');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
window.editSeqText = editSeqText;
|
var $seq = $("#seq" + type);
|
||||||
return {
|
if (isCheck) {
|
||||||
editSeqText
|
$seq.removeAttr("readonly");
|
||||||
};
|
} else {
|
||||||
},
|
$seq.attr("readonly", "true");
|
||||||
created() {
|
}
|
||||||
this.$nextTick(function () {
|
}
|
||||||
this.initData();
|
}
|
||||||
|
window.editSeqText = editSeqText;
|
||||||
|
return {
|
||||||
|
editSeqText,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData() {
|
||||||
|
$(function () {
|
||||||
|
//地区
|
||||||
|
regionArray = chargeRegion();
|
||||||
|
$("#table").bootstrapTable("destroy");
|
||||||
|
$("#table").bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
field: "erbanNo",
|
||||||
|
title: "Peko ID",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{ field: "nick", title: "昵称", align: "center", width: "5%" },
|
||||||
|
{
|
||||||
|
field: "starLevel",
|
||||||
|
title: "信誉值",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "createTime",
|
||||||
|
title: "首次加入代充时间",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "type",
|
||||||
|
title: "地区",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var value = "";
|
||||||
|
if (regionArray) {
|
||||||
|
for (var i = 0, len = regionArray.length; i < len; i++) {
|
||||||
|
var region = regionArray[i];
|
||||||
|
var name = region.name;
|
||||||
|
var type = region.type;
|
||||||
|
if ((val & type) != 0) {
|
||||||
|
value += name;
|
||||||
|
if (i != len - 1) {
|
||||||
|
value += "<br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "userRegions",
|
||||||
|
title: "排序",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var value = "";
|
||||||
|
if (row.userRegions) {
|
||||||
|
for (var i = 0, len = row.userRegions.length; i < len; i++) {
|
||||||
|
var userRegion = row.userRegions[i];
|
||||||
|
var name = userRegion.name;
|
||||||
|
var seq = userRegion.seq;
|
||||||
|
value += name + ":" + seq;
|
||||||
|
if (i != len - 1) {
|
||||||
|
value += "<br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "outDiamondNum",
|
||||||
|
title: "最近30天转出金币",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "id",
|
||||||
|
title: "操作",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
valign: "middle",
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
return (
|
||||||
|
'<button class="btn btn-sm btn-default opt-edit" data-index="' +
|
||||||
|
index +
|
||||||
|
'">编辑</button>' +
|
||||||
|
'<button class="btn btn-sm btn-default opt-del" data-index="' +
|
||||||
|
index +
|
||||||
|
'">删除</button>'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 20,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [20, 50, 100],
|
||||||
|
search: false,
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams(params) {
|
||||||
|
//设置查询参数
|
||||||
|
var param = {
|
||||||
|
page: params.pageNumber,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
erbanNo: $("#searchValue").val(),
|
||||||
|
regionType: $("#searchType").val(),
|
||||||
|
starLevel: $("#starLevel").val(),
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: "#toolbar",
|
||||||
|
url: "/admin/recharge/user/page",
|
||||||
|
onLoadSuccess: function () {
|
||||||
|
//加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () {
|
||||||
|
//加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
},
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
//地区
|
|
||||||
regionArray = chargeRegion();
|
|
||||||
$('#table').bootstrapTable('destroy');
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
columns: [
|
|
||||||
{ field: 'erbanNo', title: 'Peko ID', align: 'center', width: '5%' },
|
|
||||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
|
||||||
{ field: 'createTime', title: '首次加入代充时间', align: 'center', width: '5%' },
|
|
||||||
{
|
|
||||||
field: 'type',
|
|
||||||
title: '地区',
|
|
||||||
align: 'center',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var value = '';
|
|
||||||
if (regionArray) {
|
|
||||||
for (var i = 0, len = regionArray.length; i < len; i++) {
|
|
||||||
var region = regionArray[i];
|
|
||||||
var name = region.name;
|
|
||||||
var type = region.type;
|
|
||||||
if ((val & type) != 0) {
|
|
||||||
value += name;
|
|
||||||
if (i != len - 1) {
|
|
||||||
value += '<br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'userRegions',
|
|
||||||
title: '排序',
|
|
||||||
align: 'center',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var value = '';
|
|
||||||
if (row.userRegions) {
|
|
||||||
for (var i = 0, len = row.userRegions.length; i < len; i++) {
|
|
||||||
var userRegion = row.userRegions[i];
|
|
||||||
var name = userRegion.name;
|
|
||||||
var seq = userRegion.seq;
|
|
||||||
value += name + ':' + seq;
|
|
||||||
if (i != len - 1) {
|
|
||||||
value += '<br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'outDiamondNum', title: '最近30天转出金币', align: 'center', width: '5%' },
|
|
||||||
{
|
|
||||||
field: 'id',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '5%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
return '<button class="btn btn-sm btn-default opt-edit" data-index="' + index + '">编辑</button>' + '<button class="btn btn-sm btn-default opt-del" data-index="' + index + '">删除</button>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 20,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [20, 50, 100],
|
|
||||||
search: false,
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
page: params.pageNumber,
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
erbanNo: $('#searchValue').val(),
|
|
||||||
regionType: $('#searchType').val()
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/recharge/user/page',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//地区
|
//地区
|
||||||
function chargeRegion() {
|
function chargeRegion() {
|
||||||
var array;
|
var array;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "get",
|
type: "get",
|
||||||
url: "/admin/charge/region/list",
|
url: "/admin/charge/region/list",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
if (json.success == 'true' || json.code == 200) {
|
if (json.success == "true" || json.code == 200) {
|
||||||
array = json.data;
|
array = json.data;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
var $select = $('#searchType');
|
var $select = $("#searchType");
|
||||||
for (let i = 0; i < array.length; i++) {
|
for (let i = 0; i < array.length; i++) {
|
||||||
var $option = $('<option value="' + array[i].type + '" />');
|
var $option = $('<option value="' + array[i].type + '" />');
|
||||||
$option.html(array[i].name);
|
$option.html(array[i].name);
|
||||||
$select.append($option);
|
$select.append($option);
|
||||||
}
|
}
|
||||||
return array;
|
return array;
|
||||||
}
|
|
||||||
|
|
||||||
//新增
|
|
||||||
$('#btnAdd').on('click', function () {
|
|
||||||
$("#id").val('');
|
|
||||||
$("#erbanNo").val('');
|
|
||||||
showRegion();
|
|
||||||
$("#editModal").modal('show');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 查询刷新
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
//展示地区
|
|
||||||
function showRegion() {
|
|
||||||
if (!regionArray) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var $form = $('#editModal .modal-body .form-horizontal');
|
|
||||||
for (let i = 0, len = regionArray.length; i < len; i++) {
|
|
||||||
$('#region' + i).remove();
|
|
||||||
var region = regionArray[i];
|
|
||||||
var name = region.name;
|
|
||||||
var type = region.type;
|
|
||||||
var $formGroup = $('<div/>');
|
|
||||||
$formGroup.attr('id', 'region' + i);
|
|
||||||
$formGroup.attr('class', 'form-group');
|
|
||||||
var $label = $('<label/>');
|
|
||||||
$label.attr('class', 'col-sm-3 control-label');
|
|
||||||
$label.html('<input type="checkbox" name="type" value="' + type + '" onclick=\"editSeqText(this);\"/> ' + name);
|
|
||||||
$formGroup.append($label);
|
|
||||||
var $div = $('<div/>');
|
|
||||||
$div.attr('class', 'col-sm-9');
|
|
||||||
$div.html('<input type="text" readonly class="form-control" id="seq' + type + '" value="0"/>');
|
|
||||||
$formGroup.append($div);
|
|
||||||
$form.append($formGroup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//保存
|
|
||||||
$("#save").click(function () {
|
|
||||||
const msg = '确定要保存吗?';
|
|
||||||
if (confirm(msg)) {
|
|
||||||
var id = $('#id').val();
|
|
||||||
const typeArray = $("input:checkbox[name='type']:checked").serializeArray();
|
|
||||||
if (!typeArray) {
|
|
||||||
$("#tipMsg").text("代充地区不能为空");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var userRegionArray = [];
|
|
||||||
for (let i = 0; i < regionArray.length; i++) {
|
|
||||||
var region = regionArray[i];
|
|
||||||
var name = region.name;
|
|
||||||
var seq = 0;
|
|
||||||
var isCheck = false;
|
|
||||||
for (let j = 0; j < typeArray.length; j++) {
|
|
||||||
console.log(typeArray[j]);
|
|
||||||
if (typeArray[j] && region.type == typeArray[j].value) {
|
|
||||||
seq = $('#seq' + region.type).val();
|
|
||||||
isCheck = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var userRegion = {
|
|
||||||
type: region.type,
|
|
||||||
name: region.name,
|
|
||||||
isCheck: isCheck,
|
|
||||||
seq: seq
|
|
||||||
};
|
|
||||||
userRegionArray.push(userRegion);
|
|
||||||
}
|
|
||||||
var data = {
|
|
||||||
erbanNo: $('#erbanNo').val(),
|
|
||||||
userRegions: JSON.stringify(userRegionArray)
|
|
||||||
};
|
|
||||||
if (id) {
|
|
||||||
data.id = id;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
type: "post",
|
|
||||||
url: "/admin/recharge/user/save",
|
|
||||||
data: data,
|
|
||||||
dataType: "json",
|
|
||||||
success: function (json) {
|
|
||||||
if (json.success == 'true' || json.code == 200) {
|
|
||||||
$("#tipMsg").text("保存成功");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
TableHelper.doRefresh("#table");
|
|
||||||
$("#editModal").modal('hide');
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("保存失败." + json.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
$("#editModal").modal('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//编辑
|
|
||||||
$('#table').on('click', '.opt-edit', function () {
|
|
||||||
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')];
|
|
||||||
showRegion();
|
|
||||||
var id = currentData.id;
|
|
||||||
var erbanNo = currentData.erbanNo;
|
|
||||||
var userRegions = currentData.userRegions;
|
|
||||||
$("#erbanNo").val(erbanNo);
|
|
||||||
$("#id").val(id);
|
|
||||||
if (regionArray) {
|
|
||||||
for (let i = 0; i < regionArray.length; i++) {
|
|
||||||
var region = regionArray[i];
|
|
||||||
var seq = 0;
|
|
||||||
var isCheck = false;
|
|
||||||
for (let j = 0; j < userRegions.length; j++) {
|
|
||||||
var userRegion = userRegions[j];
|
|
||||||
if (region.type == userRegion.type) {
|
|
||||||
seq = userRegion.seq;
|
|
||||||
isCheck = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isCheck) {
|
|
||||||
$('input:checkbox[value="' + region.type + '"]').prop('checked', true);
|
|
||||||
$('#seq' + region.type).removeAttr('readonly');
|
|
||||||
$('#seq' + region.type).val(seq);
|
|
||||||
} else {
|
|
||||||
$("input:checkbox[value='" + region.type + "']").prop('checked', false);
|
|
||||||
$('#seq' + region.type).attr('readonly', 'true');
|
|
||||||
$('#seq' + region.type).val(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$("#editModal").modal('show');
|
|
||||||
});
|
|
||||||
|
|
||||||
//删除
|
|
||||||
$('#table').on('click', '.opt-del', function () {
|
|
||||||
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')];
|
|
||||||
var id = currentData.id;
|
|
||||||
const msg = '确定要删除吗?';
|
|
||||||
if (confirm(msg)) {
|
|
||||||
$.ajax({
|
|
||||||
type: "get",
|
|
||||||
url: "/admin/recharge/user/del?id=" + id,
|
|
||||||
dataType: "json",
|
|
||||||
success: function (json) {
|
|
||||||
if (json.success == 'true' || json.code == 200) {
|
|
||||||
$("#tipMsg").text("删除成功");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
TableHelper.doRefresh("#table");
|
|
||||||
$("#editModal").modal('hide');
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("删除失败." + json.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
$("#editModal").modal('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
|
//新增
|
||||||
|
$("#btnAdd").on("click", function () {
|
||||||
|
$("#id").val("");
|
||||||
|
$("#erbanNo").val("");
|
||||||
|
$("#starLevel").val("");
|
||||||
|
showRegion();
|
||||||
|
$("#editModal").modal("show");
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询刷新
|
||||||
|
$("#btnSearch").on("click", function () {
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
});
|
||||||
|
|
||||||
|
//展示地区
|
||||||
|
function showRegion() {
|
||||||
|
if (!regionArray) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var $form = $("#editModal .modal-body .form-horizontal");
|
||||||
|
for (let i = 0, len = regionArray.length; i < len; i++) {
|
||||||
|
$("#region" + i).remove();
|
||||||
|
var region = regionArray[i];
|
||||||
|
var name = region.name;
|
||||||
|
var type = region.type;
|
||||||
|
var $formGroup = $("<div/>");
|
||||||
|
$formGroup.attr("id", "region" + i);
|
||||||
|
$formGroup.attr("class", "form-group");
|
||||||
|
var $label = $("<label/>");
|
||||||
|
$label.attr("class", "col-sm-3 control-label");
|
||||||
|
$label.html(
|
||||||
|
'<input type="checkbox" name="type" value="' +
|
||||||
|
type +
|
||||||
|
'" onclick="editSeqText(this);"/> ' +
|
||||||
|
name
|
||||||
|
);
|
||||||
|
$formGroup.append($label);
|
||||||
|
var $div = $("<div/>");
|
||||||
|
$div.attr("class", "col-sm-9");
|
||||||
|
$div.html(
|
||||||
|
'<input type="text" readonly class="form-control" id="seq' +
|
||||||
|
type +
|
||||||
|
'" value="0"/>'
|
||||||
|
);
|
||||||
|
$formGroup.append($div);
|
||||||
|
$form.append($formGroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
$("#save").click(function () {
|
||||||
|
const msg = "确定要保存吗?";
|
||||||
|
if (confirm(msg)) {
|
||||||
|
var id = $("#id").val();
|
||||||
|
const typeArray = $(
|
||||||
|
"input:checkbox[name='type']:checked"
|
||||||
|
).serializeArray();
|
||||||
|
if (!typeArray) {
|
||||||
|
$("#tipMsg").text("代充地区不能为空");
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var userRegionArray = [];
|
||||||
|
for (let i = 0; i < regionArray.length; i++) {
|
||||||
|
var region = regionArray[i];
|
||||||
|
var name = region.name;
|
||||||
|
var seq = 0;
|
||||||
|
var isCheck = false;
|
||||||
|
for (let j = 0; j < typeArray.length; j++) {
|
||||||
|
console.log(typeArray[j]);
|
||||||
|
if (typeArray[j] && region.type == typeArray[j].value) {
|
||||||
|
seq = $("#seq" + region.type).val();
|
||||||
|
isCheck = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var userRegion = {
|
||||||
|
type: region.type,
|
||||||
|
name: region.name,
|
||||||
|
isCheck: isCheck,
|
||||||
|
seq: seq,
|
||||||
|
};
|
||||||
|
userRegionArray.push(userRegion);
|
||||||
|
}
|
||||||
|
var data = {
|
||||||
|
erbanNo: $("#erbanNo").val(),
|
||||||
|
starLevel: $("#starLevel").val(),
|
||||||
|
userRegions: JSON.stringify(userRegionArray),
|
||||||
|
};
|
||||||
|
if (id) {
|
||||||
|
data.id = id;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/admin/recharge/user/save",
|
||||||
|
data: data,
|
||||||
|
dataType: "json",
|
||||||
|
success: function (json) {
|
||||||
|
if (json.success == "true" || json.code == 200) {
|
||||||
|
$("#tipMsg").text("保存成功");
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
$("#editModal").modal("hide");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("保存失败." + json.message);
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
$("#editModal").modal("hide");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//编辑
|
||||||
|
$("#table").on("click", ".opt-edit", function () {
|
||||||
|
const currentData =
|
||||||
|
$("#table").bootstrapTable("getData")[$(this).data("index")];
|
||||||
|
showRegion();
|
||||||
|
var id = currentData.id;
|
||||||
|
var erbanNo = currentData.erbanNo;
|
||||||
|
var starLevel = currentData.starLevel;
|
||||||
|
var userRegions = currentData.userRegions;
|
||||||
|
$("#erbanNo").val(erbanNo);
|
||||||
|
$("#starLevel").val(starLevel);
|
||||||
|
$("#id").val(id);
|
||||||
|
if (regionArray) {
|
||||||
|
for (let i = 0; i < regionArray.length; i++) {
|
||||||
|
var region = regionArray[i];
|
||||||
|
var seq = 0;
|
||||||
|
var isCheck = false;
|
||||||
|
for (let j = 0; j < userRegions.length; j++) {
|
||||||
|
var userRegion = userRegions[j];
|
||||||
|
if (region.type == userRegion.type) {
|
||||||
|
seq = userRegion.seq;
|
||||||
|
isCheck = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isCheck) {
|
||||||
|
$('input:checkbox[value="' + region.type + '"]').prop(
|
||||||
|
"checked",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$("#seq" + region.type).removeAttr("readonly");
|
||||||
|
$("#seq" + region.type).val(seq);
|
||||||
|
} else {
|
||||||
|
$("input:checkbox[value='" + region.type + "']").prop(
|
||||||
|
"checked",
|
||||||
|
false
|
||||||
|
);
|
||||||
|
$("#seq" + region.type).attr("readonly", "true");
|
||||||
|
$("#seq" + region.type).val(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#editModal").modal("show");
|
||||||
|
});
|
||||||
|
|
||||||
|
//删除
|
||||||
|
$("#table").on("click", ".opt-del", function () {
|
||||||
|
const currentData =
|
||||||
|
$("#table").bootstrapTable("getData")[$(this).data("index")];
|
||||||
|
var id = currentData.id;
|
||||||
|
const msg = "确定要删除吗?";
|
||||||
|
if (confirm(msg)) {
|
||||||
|
$.ajax({
|
||||||
|
type: "get",
|
||||||
|
url: "/admin/recharge/user/del?id=" + id,
|
||||||
|
dataType: "json",
|
||||||
|
success: function (json) {
|
||||||
|
if (json.success == "true" || json.code == 200) {
|
||||||
|
$("#tipMsg").text("删除成功");
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
$("#editModal").modal("hide");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("删除失败." + json.message);
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
$("#editModal").modal("hide");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
292
src/views/refund/goldDiamondOperationRecord.vue
Normal file
292
src/views/refund/goldDiamondOperationRecord.vue
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
<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>
|
||||||
|
<!-- 平台ID -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>平台ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.userId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 赠送类型 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">赠送类型</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.platform"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.platformArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 时间选择器 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">时间</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.partitionId = inquire.partitionArr[0].id;
|
||||||
|
inquire.userId = '';
|
||||||
|
inquire.platform = '';
|
||||||
|
inquire.time = '';
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button class="primary" type="primary" @click="exportInfoFun()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-button v-for="(value, key) in sortedMapObj" :key="key" type="text"
|
||||||
|
>{{ key }}: {{ value }},
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="createTime" align="center" label="操作时间">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{
|
||||||
|
dateFormat(
|
||||||
|
new Date(scope.row.createTime).getTime(),
|
||||||
|
"yyyy-MM-dd hh:mm:ss"
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="区域" />
|
||||||
|
<el-table-column prop="money" align="center" label="实时金币余额" />
|
||||||
|
<el-table-column prop="goldNum" align="center" label="赠送金币数量" />
|
||||||
|
<el-table-column prop="diamondNum" align="center" label="赠送钻石数量" />
|
||||||
|
<el-table-column prop="typeDesc" align="center" label="赠送类型" />
|
||||||
|
<el-table-column
|
||||||
|
prop="currencyTypeDesc"
|
||||||
|
align="center"
|
||||||
|
label="赠送分类"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="actualAmount" align="center" label="打款金额" />
|
||||||
|
<el-table-column prop="remark" align="center" label="备注" />
|
||||||
|
<el-table-column prop="operatorName" 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"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listPartitionInfo,
|
||||||
|
goldcoinRecordAll,
|
||||||
|
recordAllExport,
|
||||||
|
} from "@/api/refund/refund";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
export default {
|
||||||
|
name: "goldDiamondOperationRecord",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
delDialog: false,
|
||||||
|
delDialogData: null,
|
||||||
|
mapObj: {},
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: 0,
|
||||||
|
partitionArr: [],
|
||||||
|
userId: "",
|
||||||
|
platform: "",
|
||||||
|
platformArr: [
|
||||||
|
{ desc: "全部", id: "" },
|
||||||
|
{ desc: "官方赠送金币", id: "OFFICAL_DIAMOND" },
|
||||||
|
{ desc: "官方赠送水晶", id: "OFFICAL_RADISH" },
|
||||||
|
{ desc: "活动奖励钻石", id: "ACTIVITY_GOLD" },
|
||||||
|
{ desc: "公款充值金币", id: "COMPANY_ACCOUNT_DIAMOND" },
|
||||||
|
{ desc: "官方金币消除", id: "OFFICAL_REDUCE_DIAMONDS" },
|
||||||
|
{ desc: "官方赠送钻石", id: "OFFICAL_GOLD" },
|
||||||
|
{ desc: "用户钻石清除", id: "CLEAR_USER_GOLD" },
|
||||||
|
],
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
sortedMapObj() {
|
||||||
|
const entries = Object.entries(this.mapObj);
|
||||||
|
// 将 "总充值{USD}" 的键排到第一位
|
||||||
|
entries.sort(([keyA], [keyB]) =>
|
||||||
|
keyA === "总充值{USD}" ? -1 : keyB === "总充值{USD}" ? 1 : 0
|
||||||
|
);
|
||||||
|
return Object.fromEntries(entries);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
dateFormat,
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
}
|
||||||
|
goldcoinRecordAll({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
type: this.inquire.platform,
|
||||||
|
erbanNo: this.inquire.userId,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
beginDate: startTime,
|
||||||
|
endDate: endTime,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.mapObj = res.data.totalMap;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
jsonFun(val) {
|
||||||
|
return JSON.parse(val);
|
||||||
|
},
|
||||||
|
exportInfoFun() {
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
|
||||||
|
}
|
||||||
|
recordAllExport({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
type: this.inquire.platform,
|
||||||
|
erbanNo: this.inquire.userId,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
beginDate: startTime,
|
||||||
|
endDate: endTime,
|
||||||
|
}).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;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
</style>
|
Reference in New Issue
Block a user