更新
This commit is contained in:
@@ -73,6 +73,7 @@ export function useData() {
|
|||||||
prize_amount: parseFloat(ele.prize_amount)
|
prize_amount: parseFloat(ele.prize_amount)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
pagination.value.total = data.count
|
||||||
pagination.value.currentPage = parseFloat(data.page);
|
pagination.value.currentPage = parseFloat(data.page);
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -57,7 +57,11 @@ export function useData() {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "总值",
|
label: "幸运值流水",
|
||||||
|
prop: "lucky_coin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "房间流水",
|
||||||
prop: "total_price"
|
prop: "total_price"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -80,7 +84,7 @@ export function useData() {
|
|||||||
...ele
|
...ele
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
total_price.value = data.total.total_price
|
total_price.value = data.total
|
||||||
pagination.value.total = data.count;
|
pagination.value.total = data.count;
|
||||||
pagination.value.currentPage = data.page;
|
pagination.value.currentPage = data.page;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,10 @@ defineOptions({
|
|||||||
<PureTableBar title="房间流水统计" :class="[isShow && !deviceDetection() ? '!w-[60vw]' : 'w-full']"
|
<PureTableBar title="房间流水统计" :class="[isShow && !deviceDetection() ? '!w-[60vw]' : 'w-full']"
|
||||||
:columns="tableLabel" @refresh="onSearch">
|
:columns="tableLabel" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<div style="display: inline-flex;align-items: center;" class="mr-10">总计:{{ total_price }}</div>
|
<div style="display: inline-flex;align-items: center;" class="mr-10">
|
||||||
|
幸运值流水总计:<span style="color: red;">{{ total_price.total_lucky_coin }}</span>;
|
||||||
|
房间流水总计:<span style="color: red;">{{ total_price.total_price }}</span>
|
||||||
|
</div>
|
||||||
<el-button type="primary" @click="exportExcel">
|
<el-button type="primary" @click="exportExcel">
|
||||||
导出
|
导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ const getFlowData = async (index) => {
|
|||||||
room_id: dataBytable.value.room_id,
|
room_id: dataBytable.value.room_id,
|
||||||
page: pagination.value.currentPage,
|
page: pagination.value.currentPage,
|
||||||
page_limit: pagination.value.pageSize,
|
page_limit: pagination.value.pageSize,
|
||||||
type: tagValue.value
|
type: 1,
|
||||||
|
stime: dateSearchValue.value ? dateSearchValue.value.length ? dateSearchValue.value[0] : '' : '',
|
||||||
|
etime: dateSearchValue.value ? dateSearchValue.value.length ? dateSearchValue.value[1] : '' : '',
|
||||||
})
|
})
|
||||||
if (code) {
|
if (code) {
|
||||||
PriceTotal.value = data.total.total_price
|
PriceTotal.value = data.total.total_price
|
||||||
@@ -142,11 +144,12 @@ const dynamicUserColumns = ref([
|
|||||||
])
|
])
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
const tagValue = ref(1)
|
const tagValue = ref(1)
|
||||||
|
const dateSearchValue = ref([])
|
||||||
const tagList = ref([
|
const tagList = ref([
|
||||||
{ value: 1, label: '全部流水' },
|
{ value: 1, label: '全部流水' },
|
||||||
{ value: 2, label: '日流水' },
|
// { value: 2, label: '日流水' },
|
||||||
{ value: 3, label: '周流水' },
|
// { value: 3, label: '周流水' },
|
||||||
{ value: 4, label: '月流水' }
|
// { value: 4, label: '月流水' }
|
||||||
])
|
])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getAllData()
|
getAllData()
|
||||||
@@ -173,6 +176,10 @@ const handleCurrentChange = (val: number) => {
|
|||||||
pagination.value.currentPage = val;
|
pagination.value.currentPage = val;
|
||||||
getFlowData(activeIndex.value == '1' ? 1 : 2)
|
getFlowData(activeIndex.value == '1' ? 1 : 2)
|
||||||
};
|
};
|
||||||
|
const changeTime = (val) => {
|
||||||
|
// console.log(val)
|
||||||
|
getFlowData(activeIndex.value == '1' ? 1 : 2)
|
||||||
|
}
|
||||||
const changeType = (val) => {
|
const changeType = (val) => {
|
||||||
tagValue.value = val
|
tagValue.value = val
|
||||||
pagination.value.pageSize = 10
|
pagination.value.pageSize = 10
|
||||||
@@ -200,7 +207,6 @@ const exportExcal = async () => {
|
|||||||
const workSheet = utils.aoa_to_sheet(res);
|
const workSheet = utils.aoa_to_sheet(res);
|
||||||
const workBook = utils.book_new();
|
const workBook = utils.book_new();
|
||||||
utils.book_append_sheet(workBook, workSheet, "数据报表");
|
utils.book_append_sheet(workBook, workSheet, "数据报表");
|
||||||
// const TagName = tagList.value.filter(ele => { return ele.value == tagValue.value })
|
|
||||||
writeFile(workBook, `房间流水信息.xlsx`);
|
writeFile(workBook, `房间流水信息.xlsx`);
|
||||||
message("导出成功", {
|
message("导出成功", {
|
||||||
type: "success"
|
type: "success"
|
||||||
@@ -242,14 +248,21 @@ const exportExcal = async () => {
|
|||||||
<el-tab-pane label="流水信息" name="1">
|
<el-tab-pane label="流水信息" name="1">
|
||||||
<div class="flex align-middle justify-between">
|
<div class="flex align-middle justify-between">
|
||||||
<div>
|
<div>
|
||||||
|
<el-date-picker size="small" @change="changeTime" v-model="dateSearchValue" type="datetimerange"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" range-separator="至"
|
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<!-- <div>
|
||||||
<el-tag class="mr-2" style="cursor: pointer;" @click="changeType(item.value)"
|
<el-tag class="mr-2" style="cursor: pointer;" @click="changeType(item.value)"
|
||||||
:type="tagValue === item.value ? '' : 'info'" v-for="item in tagList" :key="item.value">{{
|
:type="tagValue === item.value ? '' : 'info'" v-for="item in tagList" :key="item.value">{{
|
||||||
item.label }}</el-tag>
|
item.label }}</el-tag>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div style="display: inline-flex;align-items: center;">
|
<div style="display: inline-flex;align-items: center;">
|
||||||
<div class="mr-5"><el-button size="small" type="primary" @click="exportExcal">导出当前数据</el-button></div>
|
<div class="mr-5"><el-button size="small" type="primary" @click="exportExcal">导出当前数据</el-button></div>
|
||||||
总计:{{ PriceTotal }}金币
|
幸运值流水总计:<span style="color: red;">{{ PriceTotal }}</span> ;流水总计:<span style="color: red;">{{ PriceTotal
|
||||||
|
}}</span> 金币
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<pure-table class="mt-5" ref="tableRef" align-whole="center" showOverflowTooltip table-layout="auto"
|
<pure-table class="mt-5" ref="tableRef" align-whole="center" showOverflowTooltip table-layout="auto"
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export function useData() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "幸运币流水",
|
label: "幸运币流水",
|
||||||
prop: ""
|
prop: "lucky_coin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "公会状态",
|
label: "公会状态",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const searchForm = ref({
|
|||||||
search_stime: "",
|
search_stime: "",
|
||||||
search_etime: ""
|
search_etime: ""
|
||||||
});
|
});
|
||||||
|
const totalLuckyCoin = ref(0)
|
||||||
const searchLabel = ref([
|
const searchLabel = ref([
|
||||||
{ label: "房间ID/房间昵称", prop: "room_id", type: "input" },
|
{ label: "房间ID/房间昵称", prop: "room_id", type: "input" },
|
||||||
{ label: "添加时间", prop: "search_stime", type: "date" },
|
{ label: "添加时间", prop: "search_stime", type: "date" },
|
||||||
@@ -37,6 +38,10 @@ const dynamicColumns = ref([
|
|||||||
label: "房间昵称",
|
label: "房间昵称",
|
||||||
prop: "room_name"
|
prop: "room_name"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "幸运值流水总值",
|
||||||
|
prop: "lucky_coin"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "总流水值",
|
label: "总流水值",
|
||||||
prop: "consumption"
|
prop: "consumption"
|
||||||
@@ -66,6 +71,7 @@ const onSearch = async (formData) => {
|
|||||||
if (code) {
|
if (code) {
|
||||||
tableList.value = data.lists;
|
tableList.value = data.lists;
|
||||||
totalConsumption.value = data.total_consumption;
|
totalConsumption.value = data.total_consumption;
|
||||||
|
totalLuckyCoin.value = data.total_lucky_coin;
|
||||||
pagination.value.total = data.count;
|
pagination.value.total = data.count;
|
||||||
pagination.value.currentPage = data.page;
|
pagination.value.currentPage = data.page;
|
||||||
}
|
}
|
||||||
@@ -113,7 +119,10 @@ onMounted(() => {
|
|||||||
<div>
|
<div>
|
||||||
<SearchForm class="pb-2" :LabelList="searchLabel" :formData="searchForm" @handleSearch="onSearch" />
|
<SearchForm class="pb-2" :LabelList="searchLabel" :formData="searchForm" @handleSearch="onSearch" />
|
||||||
<div class="mb-5" style="display: inline-flex; justify-content: flex-end;width: 100%;">
|
<div class="mb-5" style="display: inline-flex; justify-content: flex-end;width: 100%;">
|
||||||
<div style="display: inline-flex;align-items: center;margin-right: 20px;">总流水:{{ totalConsumption }}</div>
|
<div style="display: inline-flex;align-items: center;margin-right: 20px;">幸运值流水总计:<span style="color: red;">{{
|
||||||
|
totalLuckyCoin
|
||||||
|
}}</span>;总流水:<span style="color: red;">{{ totalConsumption }}</span>
|
||||||
|
</div>
|
||||||
<el-button type="primary" @click="exportExcel">
|
<el-button type="primary" @click="exportExcel">
|
||||||
导出表格
|
导出表格
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user