暂存
This commit is contained in:
111
src/api/weeklyCard/weeklyCard.js
Normal file
111
src/api/weeklyCard/weeklyCard.js
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
// 地区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 福袋列表请求
|
||||||
|
export const listLuckyBagLinearGift = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/gift/getGiftByTypes',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 福袋礼物列表请求
|
||||||
|
export const getPrizeGroupsInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/luckyBag/getGroupInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 所有礼物列表请求
|
||||||
|
export const getAll = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/gift/getAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 所有座驾列表请求
|
||||||
|
export const carAll = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/car/goods/total/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 所有头饰列表请求
|
||||||
|
export const headwearAll = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/headwear/total/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 所有铭牌列表请求
|
||||||
|
export const nameplateAll = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/nameplate/total/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 所有气泡列表请求
|
||||||
|
export const chatbubbleAll = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/chatbubble/total/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 所有资料卡列表请求
|
||||||
|
export const infocard = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/infocard/total/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 周卡TAB-列表
|
||||||
|
export const weekCardTabList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/weekCardTab/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 周卡激励统计-列表
|
||||||
|
export const weekCardRecordPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/weekCardRecord/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 周卡激励统计-详情
|
||||||
|
export const weekCardRecordGetDetailPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/weekCardRecord/getDetailPage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 周卡激励统计-导出
|
||||||
|
export const weekCardRecordExport = query => {
|
||||||
|
window.location.href = `/admin/weekCardRecord/export?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
// 周卡激励配置-列表
|
||||||
|
export const weekCardPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/weekCard/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
208
src/views/weeklyCard/weekCardGear.vue
Normal file
208
src/views/weeklyCard/weekCardGear.vue
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="appleChargeProdId"
|
||||||
|
align="center"
|
||||||
|
label="apple充值档位"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="createTime" align="center" label="创建时间" />
|
||||||
|
<el-table-column
|
||||||
|
prop="googleChargeProdId"
|
||||||
|
align="center"
|
||||||
|
label="google充值档位"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="id" align="center" label="主键" />
|
||||||
|
<el-table-column prop="seqNo" align="center" label="排序" />
|
||||||
|
<el-table-column prop="showAmount" align="center" label="展示金额" />
|
||||||
|
<el-table-column prop="tabName" align="center" label="TAB名称" />
|
||||||
|
<el-table-column prop="updateTime" align="center" label="更新时间" />
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
controlsDialog = true;
|
||||||
|
controlsObjNew = scope.row;
|
||||||
|
"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
size="default"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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
|
||||||
|
destroy-on-close
|
||||||
|
class="pub"
|
||||||
|
v-model="controlsDialog"
|
||||||
|
:title="controlsTitle"
|
||||||
|
width="32%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<!-- 地区选择 -->
|
||||||
|
<div style="margin-bottom: 25px; margin-top: 10px; width: 134%">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; margin-right: 20px"
|
||||||
|
class="col-sm-2 control-label"
|
||||||
|
>地区选择</span
|
||||||
|
>
|
||||||
|
<el-select filterable v-model="controlsObj.value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in controlsObj.options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 展示折扣金额 -->
|
||||||
|
<div style="margin-bottom: 25px; margin-top: 10px; width: 134%">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; margin-right: 20px"
|
||||||
|
class="col-sm-2 control-label"
|
||||||
|
>展示折扣金额</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="controlsObj.num"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
style="display: inline-block; width: 36%"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 弹窗按钮 -->
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="controlsDialog = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="controlsDialogOut()">
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
weekCardTabList,
|
||||||
|
listPartitionInfo,
|
||||||
|
} from "@/api/weeklyCard/weeklyCard";
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "weekCardGear",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inquire: {
|
||||||
|
giftId: "",
|
||||||
|
userId: "",
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
// 表格数据
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
// 编辑
|
||||||
|
controlsDialog: false,
|
||||||
|
controlsObjNew: false,
|
||||||
|
controlsObj: {
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
num: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.controlsObj.options = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
weekCardTabList({})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.tableData = res.data;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message || "获取数据失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error("请求出错:", error);
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "请求出错,请稍后重试",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认编辑按钮
|
||||||
|
controlsDialogOut(){
|
||||||
|
console.log(this.controlsObjNew);
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.pageSize = size;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
237
src/views/weeklyCard/weekCardSet.vue
Normal file
237
src/views/weeklyCard/weekCardSet.vue
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<!-- 地区 -->
|
||||||
|
<span class="demonstration">地区</span>
|
||||||
|
<el-select filterable v-model="inquire.value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
: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-select filterable v-model="inquire.value2" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options2"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- 新增按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="add()">新增</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="ID" />
|
||||||
|
<el-table-column prop="x" align="center" label="日期" />
|
||||||
|
<el-table-column prop="x" align="center" label="金币" />
|
||||||
|
<el-table-column prop="rewardType" align="center" label="礼物类型" />
|
||||||
|
<el-table-column prop="rewardName" align="center" label="礼物名称" />
|
||||||
|
<el-table-column prop="rewardPrice" align="center" label="礼物价值" />
|
||||||
|
<el-table-column prop="rewardNum" align="center" label="数量" />
|
||||||
|
<el-table-column prop="rewardValue" align="center" label="可用天数" />
|
||||||
|
<el-table-column prop="seqNo" align="center" label="排序" />
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="cardIcon"
|
||||||
|
label="卡片ICON"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.cardIcon"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="scope.row.cardIcon"
|
||||||
|
fit="cover"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="cardIcon"
|
||||||
|
label="奖励ICON"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.rewardIcon"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="scope.row.rewardIcon"
|
||||||
|
fit="cover"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
controlsDialog = true;
|
||||||
|
controlsObjNew = scope.row;
|
||||||
|
"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
size="default"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
controlsDialog = true;
|
||||||
|
controlsObjNew = scope.row;
|
||||||
|
"
|
||||||
|
class="danger"
|
||||||
|
type="danger"
|
||||||
|
size="default"
|
||||||
|
>下线</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPartitionInfo, weekCardPage } from "@/api/weeklyCard/weeklyCard";
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "weekCardSet",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inquire: {
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
value2: "",
|
||||||
|
options2: [
|
||||||
|
{ desc: "初级周卡", id: 1 },
|
||||||
|
{ desc: "中级周卡", id: 2 },
|
||||||
|
{ desc: "高级周卡", id: 3 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
// 表格数据
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
// 编辑
|
||||||
|
controlsDialog: false,
|
||||||
|
controlsObjNew: false,
|
||||||
|
controlsObj: {
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
num: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getData();
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.inquire.options = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
weekCardPage({
|
||||||
|
page: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
partitionId: this.inquire.value,
|
||||||
|
tabId: this.inquire.value2,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
this.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message || "获取数据失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error("请求出错:", error);
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "请求出错,请稍后重试",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.pageSize = size;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
293
src/views/weeklyCard/weekCardStatistics.vue
Normal file
293
src/views/weeklyCard/weekCardStatistics.vue
Normal file
@@ -0,0 +1,293 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<!-- 地区 -->
|
||||||
|
<span class="demonstration">地区</span>
|
||||||
|
<el-select filterable v-model="inquire.value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
: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="derive()">导出</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="dateTime" align="center" label="日期" />
|
||||||
|
<el-table-column prop="userNum1" align="center" label="初级周卡获得人数" />
|
||||||
|
<el-table-column prop="userNum2" align="center" label="中级周卡获得人数" />
|
||||||
|
<el-table-column prop="userNum3" align="center" label="高级周卡获得人数" />
|
||||||
|
<el-table-column prop="chargeAmount" align="center" label="充值金额" />
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
@click="detial(scope.row)"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
size="default"
|
||||||
|
>详情</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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
|
||||||
|
destroy-on-close
|
||||||
|
class="pub"
|
||||||
|
v-model="controlsDialog"
|
||||||
|
title="详情"
|
||||||
|
width="32%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<!-- 内表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading2"
|
||||||
|
:data="tableData2"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="erBanNo" align="center" label="用户ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
|
<el-table-column prop="tabName" align="center" label="购买档位" />
|
||||||
|
<el-table-column prop="chargeAmount" align="center" label="购买金额" />
|
||||||
|
<el-table-column prop="createTimeStr" align="center" label="购买时间" />
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
v-model:current-page="currentPage2"
|
||||||
|
v-model:page-size="pageSize2"
|
||||||
|
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange2"
|
||||||
|
@current-change="handleCurrentChange2"
|
||||||
|
/>
|
||||||
|
<!-- 弹窗按钮 -->
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="controlsDialog = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
weekCardRecordPage,
|
||||||
|
listPartitionInfo,
|
||||||
|
weekCardRecordExport,
|
||||||
|
weekCardRecordGetDetailPage,
|
||||||
|
} from "@/api/weeklyCard/weeklyCard";
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "weekCardStatistics",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inquire: {
|
||||||
|
time: "",
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
loading2: false,
|
||||||
|
// 表格数据
|
||||||
|
tableData: [],
|
||||||
|
tableData2: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
// 分页2
|
||||||
|
total2: 10, //总页数
|
||||||
|
currentPage2: 1, //页码
|
||||||
|
pageSize2: 10, //条数
|
||||||
|
// 编辑
|
||||||
|
controlsDialog: false,
|
||||||
|
controlsObjNew: false,
|
||||||
|
controlsObj: {
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
num: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.inquire.options = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (this.inquire.time && this.inquire.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");
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
weekCardRecordPage({
|
||||||
|
startTime,
|
||||||
|
endTime,
|
||||||
|
partitionId: this.inquire.value,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
page: this.currentPage,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
this.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message || "获取数据失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error("请求出错:", error);
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "请求出错,请稍后重试",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
derive() {
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (this.inquire.time && this.inquire.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");
|
||||||
|
}
|
||||||
|
weekCardRecordExport({
|
||||||
|
startTime,
|
||||||
|
endTime,
|
||||||
|
partitionId: this.inquire.value,
|
||||||
|
}).then((res) => {});
|
||||||
|
},
|
||||||
|
detial(val) {
|
||||||
|
weekCardRecordGetDetailPage({
|
||||||
|
page: this.currentPage2,
|
||||||
|
pageSize: this.pageSize2,
|
||||||
|
dateTime: val.createTimeStr,
|
||||||
|
partitionId: this.inquire.value,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.tableData2 = res.data.records;
|
||||||
|
this.total2 = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message || "获取数据失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.controlsDialog = true;
|
||||||
|
this.loading2 = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error("请求出错:", error);
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "请求出错,请稍后重试",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
this.loading2 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange2(size) {
|
||||||
|
this.pageSize2 = size;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange2(page) {
|
||||||
|
this.currentPage2 = page;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.pageSize = size;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Reference in New Issue
Block a user