新增 - 充值代理代发/售卖分析
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import request from "@/utils/request";
|
||||
// 列表
|
||||
export const getRechargeAgentStatList = query => {
|
||||
return request({
|
||||
url: '/admin/rechargeAgentStat/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
export const exportRechargeAgentStat = query => {
|
||||
return request({
|
||||
url: '/admin/rechargeAgentStat/export',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
240
src/views/system/RechargeAgentDropshipping.vue
Normal file
240
src/views/system/RechargeAgentDropshipping.vue
Normal file
@@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>分区</span>
|
||||
<partition-select v-model:partition-id="formData.partitionId" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>周期</span>
|
||||
<el-select v-model="formData.date" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in dateCycleArr"
|
||||
:key="item.timeId"
|
||||
:label="item.timeName"
|
||||
:value="item.timeId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button class="primary" type="primary" @click="resetFormData()"
|
||||
>重置查询</el-button
|
||||
>
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="周期">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.date + "~" + scope.row.endDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||
<el-table-column
|
||||
prop="rechargeUserCount"
|
||||
align="center"
|
||||
label="总代发充值代理数"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="receiveTotalGuildUsd"
|
||||
align="center"
|
||||
label="总转增薪资"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="transformTotalDiamond"
|
||||
align="center"
|
||||
label="总转出金币"
|
||||
>
|
||||
<template v-slot="scope">{{
|
||||
scope.row.transformTotalDiamond +
|
||||
"金币" +
|
||||
"(" +
|
||||
scope.row.transformTotalUsd +
|
||||
"$)"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remainUsd" align="center" label="代理盈利" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="detailPageFun(scope.row)"
|
||||
size="default"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog v-model="detailStatDialog" title="详情" width="70%" center>
|
||||
<el-table :data="detailStatTable" style="width: 100%" ref="multipleTable">
|
||||
<el-table-column prop="erbanNo" align="center" label="充值代理ID" />
|
||||
<el-table-column
|
||||
prop="receiveTotalGuildUsd"
|
||||
align="center"
|
||||
label="转增薪资"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="transformTotalDiamond"
|
||||
align="center"
|
||||
label="总转出金币"
|
||||
>
|
||||
<template v-slot="scope">{{
|
||||
scope.row.transformTotalDiamond +
|
||||
"金币" +
|
||||
"(" +
|
||||
scope.row.transformTotalUsd +
|
||||
"$)"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remainUsd" align="center" label="代理盈利" />
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="detailStatDialog = false">
|
||||
关闭
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "RechargeAgentDropshipping",
|
||||
components: { PartitionSelect },
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import PartitionSelect from "../common/partitionSelect.vue";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { familyMemberWeekLevelRewardListCycleDate } from "@/api/ResponsiblePersonManagement/ResponsiblePersonManagement.js";
|
||||
import { getRechargeAgentStatList } from "@/api/RechargeAgentDropshipping/RechargeAgentDropshipping.js";
|
||||
const formData = reactive({
|
||||
partitionId: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
date: "",
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
const dateCycleArr = ref([]);
|
||||
const detailStatDialog = ref(false);
|
||||
const detailStatTable = ref([]);
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
getRechargeAgentStatList(formData).then((res) => {
|
||||
if (res.code == 200) {
|
||||
tableData.data = res.data.records;
|
||||
tableData.loading = false;
|
||||
tableData.total = res.data.total;
|
||||
} else {
|
||||
tableData.loading = false;
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
// 详情
|
||||
const detailPageFun = (row) => {
|
||||
detailStatTable.value = JSON.parse(row.detailStat);
|
||||
detailStatDialog.value = true;
|
||||
};
|
||||
// 重置
|
||||
const resetFormData = () => {
|
||||
Object.assign(formData, {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
date: "",
|
||||
});
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.pageNo = val;
|
||||
getData();
|
||||
};
|
||||
onMounted(() => {
|
||||
familyMemberWeekLevelRewardListCycleDate().then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach((res, i) => {
|
||||
dateCycleArr.value[i] = {
|
||||
timeName: `${dateFormat(res.startDate, "yyyy-MM-dd")}~${dateFormat(
|
||||
res.endDate,
|
||||
"yyyy-MM-dd"
|
||||
)}`,
|
||||
timeId: res.dateCycle,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</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;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user