新增 - 日任务奖励领取详情,房间每日钻石流水 - 新增领取金币字段
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
import request from "@/utils/request";
|
||||||
|
// 日任务奖励领取详情
|
||||||
|
export const getDailyTaskCoinRecvNums = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/dailyTask/coinRecvNums',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 日任务奖励领取详情-明细
|
||||||
|
export const getDailyTaskcoinRecvDetail = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/dailyTask/coinRecvDetail',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 日任务奖励领取详情-明细-导出
|
||||||
|
export const exportMiniGameDetail = query => {
|
||||||
|
return request({
|
||||||
|
url: `/admin/dailyTask/coinRecvDetailExport`,
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
});
|
||||||
|
}
|
280
src/views/guildOperationManagement/DailyTaskRewardCollection.vue
Normal file
280
src/views/guildOperationManagement/DailyTaskRewardCollection.vue
Normal file
@@ -0,0 +1,280 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 表格数据 -->
|
||||||
|
<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="statDate" align="center" label="日期" />
|
||||||
|
<el-table-column
|
||||||
|
prop="reachNum"
|
||||||
|
align="center"
|
||||||
|
label="公会成员达到人数"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="receiveNum"
|
||||||
|
align="center"
|
||||||
|
label="公会成员领取人数"
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button @click="detailFun(scope.row)" type="text" size="small">
|
||||||
|
{{ scope.row.receiveNum }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="guildMemberNumn"
|
||||||
|
align="center"
|
||||||
|
label="公会成员人数"
|
||||||
|
/>
|
||||||
|
</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="dailydetailDialog"
|
||||||
|
title="日任务奖励领取明细"
|
||||||
|
width="60%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>用户ID:</span>
|
||||||
|
<el-input v-model="detailData.erbanNo" placeholder="" class="input" />
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>设备:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="detailData.deviceId"
|
||||||
|
placeholder="支持模糊搜索"
|
||||||
|
class="input"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>IP:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="detailData.ip"
|
||||||
|
placeholder="支持模糊搜索"
|
||||||
|
class="input"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-button style="" type="primary" @click="detailFun()">查询</el-button>
|
||||||
|
<el-button style="" type="primary" @click="confirmExport2Excel()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="detailtableData.data"
|
||||||
|
style="width: 100%; margin-top: 30px"
|
||||||
|
ref="multipleTable"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||||
|
<el-table-column prop="uid" align="center" label="用户UID" />
|
||||||
|
<el-table-column prop="deviceId" align="center" label="领取设备" />
|
||||||
|
<el-table-column prop="ip" align="center" label="领取IP" />
|
||||||
|
<el-table-column prop="statusStr" align="center" label="主播状态" />
|
||||||
|
<el-table-column prop="receiveTime" align="center" label="领取时间" />
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
:current-page="detailData.pageNo"
|
||||||
|
:page-size="detailData.pageSize"
|
||||||
|
:page-sizes="[10, 20, 50, 100, 200]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="detailtableData.total"
|
||||||
|
@size-change="handleSizeChangeDetail"
|
||||||
|
@current-change="handleCurrentChangeDetail"
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="dailydetailDialog = false">
|
||||||
|
关闭
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "DailyTaskRewardCollection",
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted, reactive, computed } from "vue";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import { formatDate } from "@/utils/relDate";
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
import {
|
||||||
|
getDailyTaskCoinRecvNums,
|
||||||
|
getDailyTaskcoinRecvDetail,
|
||||||
|
exportMiniGameDetail,
|
||||||
|
} from "@/api/DailyTaskRewardCollection/DailyTaskRewardCollection";
|
||||||
|
const formData = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
});
|
||||||
|
const tableData = reactive({
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
});
|
||||||
|
const detailData = reactive({
|
||||||
|
partitionId: "",
|
||||||
|
statDate: "",
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deviceId: "",
|
||||||
|
ip: "",
|
||||||
|
erbanNo: "",
|
||||||
|
});
|
||||||
|
const detailtableData = reactive({
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
});
|
||||||
|
const dailydetailDialog = ref(false);
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
const getData = () => {
|
||||||
|
tableData.loading = true;
|
||||||
|
getDailyTaskCoinRecvNums(formData).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
tableData.data = res.data.rows;
|
||||||
|
tableData.loading = false;
|
||||||
|
tableData.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
tableData.loading = false;
|
||||||
|
|
||||||
|
ElMessage.error(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 明细
|
||||||
|
const detailFun = (row) => {
|
||||||
|
if (row) {
|
||||||
|
detailData.partitionId = row.partitionId;
|
||||||
|
detailData.statDate = row.statDate;
|
||||||
|
}
|
||||||
|
getDailyTaskcoinRecvDetail(detailData).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
detailtableData.data = res.data.rows;
|
||||||
|
detailtableData.loading = false;
|
||||||
|
detailtableData.total = res.data.total;
|
||||||
|
dailydetailDialog.value = true;
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
const confirmExport2Excel = async () => {
|
||||||
|
try {
|
||||||
|
const res = await exportMiniGameDetail(detailData);
|
||||||
|
if (res) {
|
||||||
|
ElMessage({
|
||||||
|
message: "导出成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
let time = formatDate(new Date());
|
||||||
|
let alink = document.createElement("a");
|
||||||
|
alink.download = `日任务奖励领取明细${time}.xls`;
|
||||||
|
alink.style.display = "none";
|
||||||
|
const blob = new Blob([res]);
|
||||||
|
alink.href = URL.createObjectURL(blob);
|
||||||
|
document.body.appendChild(alink);
|
||||||
|
alink.click();
|
||||||
|
URL.revokeObjectURL(alink.href);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage({
|
||||||
|
message: error.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
formData.pageSize = val;
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
formData.pageNo = val;
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleSizeChangeDetail = (val) => {
|
||||||
|
detailData.pageSize = val;
|
||||||
|
detailFun();
|
||||||
|
};
|
||||||
|
const handleCurrentChangeDetail = (val) => {
|
||||||
|
detailData.pageNo = val;
|
||||||
|
detailFun();
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
@@ -2,144 +2,137 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>分区</span>
|
<span>分区</span>
|
||||||
<el-select v-model="formData.partitionId"
|
<el-select
|
||||||
|
v-model="formData.partitionId"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@change="getlistByPartition()">
|
@change="getlistByPartition()"
|
||||||
<el-option v-for="item in partitionOptions"
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in partitionOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.desc"
|
:label="item.desc"
|
||||||
:value="item.id">
|
:value="item.id"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>国家</span>
|
<span>国家</span>
|
||||||
<el-select v-model="formData.regionId"
|
<el-select v-model="formData.regionId" placeholder="请选择">
|
||||||
placeholder="请选择">
|
<el-option
|
||||||
<el-option v-for="item in adminCountryArr"
|
v-for="item in adminCountryArr"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id">
|
:value="item.id"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>用户ID</span>
|
<span>用户ID</span>
|
||||||
<el-input v-model="formData.erbanNo"
|
<el-input
|
||||||
|
v-model="formData.erbanNo"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
class="input"></el-input>
|
class="input"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>公会长ID</span>
|
<span>公会长ID</span>
|
||||||
<el-input v-model="formData.ownerErbanNo"
|
<el-input
|
||||||
|
v-model="formData.ownerErbanNo"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
class="input"></el-input>
|
class="input"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>公会ID</span>
|
<span>公会ID</span>
|
||||||
<el-input v-model="formData.guildId"
|
<el-input
|
||||||
|
v-model="formData.guildId"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
class="input"></el-input>
|
class="input"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="inquire"
|
<div class="inquire" style="margin-top: 20px">
|
||||||
style="margin-top: 20px;">
|
|
||||||
<span class="demonstration">日期</span>
|
<span class="demonstration">日期</span>
|
||||||
<el-date-picker v-model="dataTime"
|
<el-date-picker
|
||||||
|
v-model="dataTime"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span class="demonstration">状态</span>
|
<span class="demonstration">状态</span>
|
||||||
<el-select v-model="formData.status"
|
<el-select v-model="formData.status" placeholder="请选择">
|
||||||
placeholder="请选择">
|
<el-option label="全部" :value="-1"></el-option>
|
||||||
<el-option label="全部"
|
<el-option label="未发放" :value="0"></el-option>
|
||||||
:value="-1"></el-option>
|
<el-option label="已经发放" :value="1"></el-option>
|
||||||
<el-option label="未发放"
|
<el-option label="当天不可操作" :value="2"></el-option>
|
||||||
:value="0"></el-option>
|
|
||||||
<el-option label="已经发放"
|
|
||||||
:value="1"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<el-button style=""
|
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||||
type="primary"
|
<el-button class="primary" type="primary" @click="resetFormData()"
|
||||||
@click="getData()">查询</el-button>
|
>重置</el-button
|
||||||
<el-button class="primary"
|
>
|
||||||
type="primary"
|
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
|
||||||
@click="resetFormData()">重置</el-button>
|
>导出</el-button
|
||||||
<el-button class="primary"
|
>
|
||||||
type="primary"
|
|
||||||
@click="confirmExport2Excel()">导出</el-button>
|
|
||||||
<!-- 表格数据 -->
|
<!-- 表格数据 -->
|
||||||
<el-table v-loading="tableData.loading"
|
<el-table
|
||||||
|
v-loading="tableData.loading"
|
||||||
:data="tableData.data"
|
:data="tableData.data"
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
border
|
border
|
||||||
style="width: 100%; margin-top: 25px">
|
style="width: 100%; margin-top: 25px"
|
||||||
<el-table-column prop="statDate"
|
>
|
||||||
|
<el-table-column prop="statDate" align="center" label="日期" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="房间ID" />
|
||||||
|
<el-table-column prop="ownerErbanNo" align="center" label="公会长ID" />
|
||||||
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||||
|
<el-table-column prop="roomName" align="center" label="房间昵称" />
|
||||||
|
<el-table-column prop="partitionIdDesc" align="center" label="分区" />
|
||||||
|
<el-table-column prop="regionName" align="center" label="国家" />
|
||||||
|
<el-table-column prop="diamondNum" align="center" label="钻石流水" />
|
||||||
|
<el-table-column prop="goldNum" align="center" label="金币流水" />
|
||||||
|
<el-table-column
|
||||||
|
prop="rewardGold"
|
||||||
align="center"
|
align="center"
|
||||||
label="日期" />
|
label="对应流水发放金币"
|
||||||
<el-table-column prop="erbanNo"
|
/>
|
||||||
align="center"
|
<el-table-column prop="receivedGold" align="center" label="已领取金币" >
|
||||||
label="房间ID" />
|
|
||||||
<el-table-column prop="ownerErbanNo"
|
|
||||||
align="center"
|
|
||||||
label="公会长ID" />
|
|
||||||
<el-table-column prop="guildId"
|
|
||||||
align="center"
|
|
||||||
label="公会ID" />
|
|
||||||
<el-table-column prop="roomName"
|
|
||||||
align="center"
|
|
||||||
label="房间昵称" />
|
|
||||||
<el-table-column prop="partitionIdDesc"
|
|
||||||
align="center"
|
|
||||||
label="分区" />
|
|
||||||
<el-table-column prop="regionName"
|
|
||||||
align="center"
|
|
||||||
label="国家" />
|
|
||||||
<el-table-column prop="diamondNum"
|
|
||||||
align="center"
|
|
||||||
label="钻石流水" />
|
|
||||||
<el-table-column prop="goldNum"
|
|
||||||
align="center"
|
|
||||||
label="金币流水" />
|
|
||||||
<el-table-column prop="rewardGold"
|
|
||||||
align="center"
|
|
||||||
label="对应流水发放金币" />
|
|
||||||
<el-table-column prop="status"
|
|
||||||
align="center"
|
|
||||||
label="状态">
|
|
||||||
<template #default="row">
|
<template #default="row">
|
||||||
<span>{{ row.row.status == 0?'未发放':'已经发放'}}</span>
|
{{ row.row.receivedGold || 0}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sendTime"
|
<el-table-column prop="receiveErbanNo" align="center" label="领取人ID" />
|
||||||
align="center"
|
<el-table-column prop="status" align="center" label="状态">
|
||||||
label="发放时间" />
|
<template #default="row">
|
||||||
<el-table-column align="center"
|
<span>{{ row.row.status == 0 ? "未发放" : row.row.status == 1?"已经发放":'当天不可操作' }}</span>
|
||||||
label="操作"
|
</template>
|
||||||
width="300">
|
</el-table-column>
|
||||||
|
<el-table-column prop="sendTime" align="center" label="发放时间" />
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button class="primary"
|
<el-button
|
||||||
|
class="primary"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="
|
@click="sendDiamond(scope.row)"
|
||||||
sendDiamond(scope.row);
|
|
||||||
"
|
|
||||||
size="default"
|
size="default"
|
||||||
v-if='scope.row.status == 0'>发放</el-button>
|
v-if="scope.row.status == 0"
|
||||||
|
>发放</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="operator"
|
<el-table-column prop="operator" align="center" label="操作人" />
|
||||||
align="center"
|
|
||||||
label="操作人" />
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination style="margin-top: 10px"
|
<el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
class="paginationClass"
|
class="paginationClass"
|
||||||
:current-page="formData.pageNo"
|
:current-page="formData.pageNo"
|
||||||
:page-size="formData.pageSize"
|
:page-size="formData.pageSize"
|
||||||
@@ -147,59 +140,65 @@
|
|||||||
layout="sizes, prev, pager, next"
|
layout="sizes, prev, pager, next"
|
||||||
:total="tableData.total"
|
:total="tableData.total"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange" />
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted, reactive } from 'vue'
|
import { ref, onMounted, reactive } from "vue";
|
||||||
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
|
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
|
||||||
import { dateFormat } from "@/utils/system-helper";
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { formatDate } from "@/utils/relDate";
|
import { formatDate } from "@/utils/relDate";
|
||||||
import {
|
import {
|
||||||
getlistByPartitionId, getroomDayDiamondList
|
getlistByPartitionId,
|
||||||
, roomDayDiamondExport, sendroomDayDiamond
|
getroomDayDiamondList,
|
||||||
|
roomDayDiamondExport,
|
||||||
|
sendroomDayDiamond,
|
||||||
} from "@/api/relAgency/relAgency.js";
|
} from "@/api/relAgency/relAgency.js";
|
||||||
export default {
|
export default {
|
||||||
name: "dailyDiamondFlow",
|
name: "dailyDiamondFlow",
|
||||||
setup() {
|
setup() {
|
||||||
const dataTime = ref('');
|
const dataTime = ref("");
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
partitionId: '',
|
partitionId: "",
|
||||||
erbanNo: '',
|
erbanNo: "",
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
startTime: '',
|
startTime: "",
|
||||||
endTime: '',
|
endTime: "",
|
||||||
status: -1,
|
status: -1,
|
||||||
regionId: '',
|
regionId: "",
|
||||||
ownerErbanNo: '',
|
ownerErbanNo: "",
|
||||||
guildId: ''
|
guildId: "",
|
||||||
})
|
});
|
||||||
const tableData = reactive({
|
const tableData = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
})
|
});
|
||||||
const adminCountryArr = ref([])
|
const adminCountryArr = ref([]);
|
||||||
const partitionOptions = ref([]);
|
const partitionOptions = ref([]);
|
||||||
const getlistByPartition = () => {
|
const getlistByPartition = () => {
|
||||||
getlistByPartitionId({ partitionId: formData.partitionId, containAll: true }).then((res) => {
|
getlistByPartitionId({
|
||||||
|
partitionId: formData.partitionId,
|
||||||
|
containAll: true,
|
||||||
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
adminCountryArr.value = res.data;
|
adminCountryArr.value = res.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
tableData.loading = true;
|
tableData.loading = true;
|
||||||
if (dataTime.value && dataTime.value.length > 0) {
|
if (dataTime.value && dataTime.value.length > 0) {
|
||||||
formData.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
formData.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||||
formData.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
formData.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||||
} else {
|
} else {
|
||||||
formData.startTime = dataTime.value
|
formData.startTime = dataTime.value;
|
||||||
formData.endTime = dataTime.value
|
formData.endTime = dataTime.value;
|
||||||
}
|
}
|
||||||
getroomDayDiamondList(formData).then(res => {
|
getroomDayDiamondList(formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
tableData.data = res.data.rows;
|
tableData.data = res.data.rows;
|
||||||
tableData.total = res.data.total;
|
tableData.total = res.data.total;
|
||||||
@@ -207,38 +206,35 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
tableData.loading = false;
|
tableData.loading = false;
|
||||||
ElMessage.error(res.message);
|
ElMessage.error(res.message);
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
const sendDiamond = (row) => {
|
const sendDiamond = (row) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
ElMessageBox.confirm('确认发放吗', "提示", {
|
ElMessageBox.confirm("确认发放吗", "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
sendroomDayDiamond({ id }).then(res => {
|
sendroomDayDiamond({ id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
ElMessage.success('发放成功');
|
ElMessage.success("发放成功");
|
||||||
getData();
|
getData();
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.message);
|
ElMessage.error(res.message);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
};
|
||||||
|
|
||||||
}
|
|
||||||
// 导出
|
// 导出
|
||||||
const confirmExport2Excel = async () => {
|
const confirmExport2Excel = async () => {
|
||||||
Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
||||||
try {
|
try {
|
||||||
const res = await roomDayDiamondExport(formData)
|
const res = await roomDayDiamondExport(formData);
|
||||||
if (res) {
|
if (res) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '导出成功',
|
message: "导出成功",
|
||||||
type: 'success',
|
type: "success",
|
||||||
});
|
});
|
||||||
let time = formatDate(new Date());
|
let time = formatDate(new Date());
|
||||||
let alink = document.createElement("a");
|
let alink = document.createElement("a");
|
||||||
@@ -250,29 +246,28 @@ export default {
|
|||||||
alink.click();
|
alink.click();
|
||||||
URL.revokeObjectURL(alink.href);
|
URL.revokeObjectURL(alink.href);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: error.message,
|
message: error.message,
|
||||||
type: 'error',
|
type: "error",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
//重置
|
//重置
|
||||||
const resetFormData = () => {
|
const resetFormData = () => {
|
||||||
Object.assign(formData, {
|
Object.assign(formData, {
|
||||||
partitionId: '',
|
partitionId: "",
|
||||||
erbanNo: '',
|
erbanNo: "",
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
startTime: '',
|
startTime: "",
|
||||||
endTime: '',
|
endTime: "",
|
||||||
status: -1,
|
status: -1,
|
||||||
regionId: ''
|
regionId: "",
|
||||||
});
|
});
|
||||||
tableData.data = [];
|
tableData.data = [];
|
||||||
tableData.total = 0;
|
tableData.total = 0;
|
||||||
dataTime.value = '';
|
dataTime.value = "";
|
||||||
};
|
};
|
||||||
const handleSizeChange = (val) => {
|
const handleSizeChange = (val) => {
|
||||||
formData.pageSize = val;
|
formData.pageSize = val;
|
||||||
@@ -283,7 +278,7 @@ export default {
|
|||||||
getData();
|
getData();
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPartitionInfoList().then(res => {
|
getPartitionInfoList().then((res) => {
|
||||||
partitionOptions.value = res.data;
|
partitionOptions.value = res.data;
|
||||||
formData.partitionId = partitionOptions.value[0].id;
|
formData.partitionId = partitionOptions.value[0].id;
|
||||||
getlistByPartition();
|
getlistByPartition();
|
||||||
@@ -301,10 +296,10 @@ export default {
|
|||||||
handleCurrentChange,
|
handleCurrentChange,
|
||||||
sendDiamond,
|
sendDiamond,
|
||||||
resetFormData,
|
resetFormData,
|
||||||
confirmExport2Excel
|
confirmExport2Excel,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.box {
|
.box {
|
||||||
|
Reference in New Issue
Block a user