|
@@ -0,0 +1,167 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <a-layout-content class="flex flex-col lg:h-full relative w-full">
|
|
|
|
|
+ <a-card :bordered="false">
|
|
|
|
|
+ <a-row>
|
|
|
|
|
+ <a-col :flex="1">
|
|
|
|
|
+ <a-form
|
|
|
|
|
+ :model="searchForm"
|
|
|
|
|
+ ref="searchFormRef"
|
|
|
|
|
+ :auto-label-width="true"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-row :gutter="10">
|
|
|
|
|
+ <a-col :sm="8" :xs="24">
|
|
|
|
|
+ <a-form-item label="游戏" field="game_id">
|
|
|
|
|
+ <a-tree-select
|
|
|
|
|
+ v-model="searchForm.game_id"
|
|
|
|
|
+ :data="allGameOptions"
|
|
|
|
|
+ placeholder="请选择游戏"
|
|
|
|
|
+ allow-clear
|
|
|
|
|
+ :field-names="{ title: 'name', key: 'id' }"
|
|
|
|
|
+ allow-search
|
|
|
|
|
+ tree-checked-strategy="child"
|
|
|
|
|
+ :tree-checkable="true"
|
|
|
|
|
+ :max-tag-count="1"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :sm="8" :xs="24">
|
|
|
|
|
+ <a-form-item label="充值渠道" field="pay_channel_id">
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model="searchForm.pay_channel_id"
|
|
|
|
|
+ :options="payChannelOptions"
|
|
|
|
|
+ allow-clear
|
|
|
|
|
+ placeholder="请选择充值渠道"
|
|
|
|
|
+ multiple
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-option
|
|
|
|
|
+ v-for="item in payChannelOptions"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ >{{ item.name }}</a-option
|
|
|
|
|
+ >
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :sm="8" :xs="24">
|
|
|
|
|
+ <a-form-item label="日期" field="pay_date">
|
|
|
|
|
+ <a-range-picker
|
|
|
|
|
+ v-model="searchForm.pay_date"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ format="YYYY-MM-DD"
|
|
|
|
|
+ allow-clear
|
|
|
|
|
+ :max-date="new Date()"
|
|
|
|
|
+ :min-date="new Date('2025-01-01')"
|
|
|
|
|
+ :allow-clear="false"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-form>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col
|
|
|
|
|
+ :xs="24"
|
|
|
|
|
+ :sm="8"
|
|
|
|
|
+ :style="{ textAlign: 'right', marginBottom: '15px' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-space direction="horizontal" :size="20">
|
|
|
|
|
+ <a-button type="primary" @click="getChannelIncome">
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <icon-search />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ {{ "搜索" }}
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button @click="resetSearch">
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <icon-refresh />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ {{ "重置" }}
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </a-space>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-divider style="margin-top: 0; margin-bottom: 15px" />
|
|
|
|
|
+ <a-table border :columns="columns" :data="data" :pagination="false" />
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+ </a-layout-content>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup>
|
|
|
|
|
+import { onMounted, ref, reactive } from "vue";
|
|
|
|
|
+import api from "../../../api/customer/reconciliation";
|
|
|
|
|
+import commonApi from "../../../api/common";
|
|
|
|
|
+import dayjs from "dayjs";
|
|
|
|
|
+
|
|
|
|
|
+// 引用定义
|
|
|
|
|
+const crudRef = ref();
|
|
|
|
|
+const editRef = ref();
|
|
|
|
|
+const viewRef = ref();
|
|
|
|
|
+const data = ref([]);
|
|
|
|
|
+const allGameOptions = ref([]);
|
|
|
|
|
+const payChannelOptions = ref([]);
|
|
|
|
|
+
|
|
|
|
|
+// 搜索表单
|
|
|
|
|
+const searchForm = ref({
|
|
|
|
|
+ game_id: "",
|
|
|
|
|
+ pay_channel_id: "",
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// SaTable 基础配置
|
|
|
|
|
+const options = reactive({
|
|
|
|
|
+ rowSelection: { showCheckedAll: false },
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// SaTable 列配置
|
|
|
|
|
+const columns = ref([]);
|
|
|
|
|
+
|
|
|
|
|
+// 页面数据初始化
|
|
|
|
|
+const initPage = async () => {
|
|
|
|
|
+ // await getGameOptions();
|
|
|
|
|
+ await getGameListTree();
|
|
|
|
|
+ await getPayChannelOptions();
|
|
|
|
|
+ // 默认充值日期最近7天
|
|
|
|
|
+ searchForm.value.pay_date = [
|
|
|
|
|
+ dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
|
|
|
|
+ dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
+ ];
|
|
|
|
|
+ await getChannelIncome();
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 获取子游戏options
|
|
|
|
|
+// const getGameOptions = async () => {
|
|
|
|
|
+// const res = await commonApi.getGameOptionsApiNoAuth();
|
|
|
|
|
+// allGameOptions.value = res.data;
|
|
|
|
|
+// };
|
|
|
|
|
+
|
|
|
|
|
+const getGameListTree = async () => {
|
|
|
|
|
+ const res = await commonApi.getGameListTreeNoAuthApi();
|
|
|
|
|
+ allGameOptions.value = res.data;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const getPayChannelOptions = async () => {
|
|
|
|
|
+ const res = await commonApi.getPayChannelOptionsApi();
|
|
|
|
|
+ payChannelOptions.value = res.data;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const getChannelIncome = async () => {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ ...searchForm.value,
|
|
|
|
|
+ };
|
|
|
|
|
+ if (params.pay_channel_id) {
|
|
|
|
|
+ params.pay_channel_id = params.pay_channel_id.join(",");
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await api.getPageList(params);
|
|
|
|
|
+ columns.value = res.data.columns;
|
|
|
|
|
+ data.value = res.data.data;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// SaTable 数据请求
|
|
|
|
|
+const refresh = async () => {
|
|
|
|
|
+ crudRef.value?.refresh();
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 页面加载完成执行
|
|
|
|
|
+onMounted(async () => {
|
|
|
|
|
+ initPage();
|
|
|
|
|
+ // refresh();
|
|
|
|
|
+});
|
|
|
|
|
+</script>
|