|
@@ -3,23 +3,23 @@ import { onMounted, reactive, ref } from 'vue'
|
|
import { rechargeRecord } from '@/api'
|
|
import { rechargeRecord } from '@/api'
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
import dayjs, { Dayjs } from 'dayjs';
|
|
import dayjs, { Dayjs } from 'dayjs';
|
|
-let time = ref<[Dayjs, Dayjs]>([
|
|
|
|
- dayjs().subtract(7, 'day'),
|
|
|
|
- dayjs(),
|
|
|
|
-])
|
|
|
|
|
|
+let time = reactive({
|
|
|
|
+ arr: [
|
|
|
|
+ dayjs().subtract(7, 'day').format('YYYY-MM-DD'),
|
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
|
+ ]
|
|
|
|
+})
|
|
interface FormState {
|
|
interface FormState {
|
|
pageNum: Number
|
|
pageNum: Number
|
|
pageSize: Number
|
|
pageSize: Number
|
|
- source: Number
|
|
|
|
- minAmount?: Number
|
|
|
|
- maxAmount?: Number
|
|
|
|
|
|
+ // minAmount?: Number
|
|
|
|
+ // maxAmount?: Number
|
|
startTime?: String
|
|
startTime?: String
|
|
endTime?: String
|
|
endTime?: String
|
|
}
|
|
}
|
|
const params = reactive<FormState>({
|
|
const params = reactive<FormState>({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- source: 1,
|
|
|
|
});
|
|
});
|
|
const pagination = reactive({
|
|
const pagination = reactive({
|
|
total: 0,
|
|
total: 0,
|
|
@@ -29,7 +29,7 @@ const pagination = reactive({
|
|
const columns = reactive([
|
|
const columns = reactive([
|
|
{
|
|
{
|
|
title: '流水号',
|
|
title: '流水号',
|
|
- dataIndex: 'id',
|
|
|
|
|
|
+ dataIndex: 'rechargeSn',
|
|
align: 'center',
|
|
align: 'center',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -44,13 +44,14 @@ const columns = reactive([
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '支付方式',
|
|
title: '支付方式',
|
|
- dataIndex: 'remark',
|
|
|
|
|
|
+ dataIndex: 'paymentType',
|
|
align: 'center',
|
|
align: 'center',
|
|
}
|
|
}
|
|
])
|
|
])
|
|
const data = reactive([])
|
|
const data = reactive([])
|
|
const handleRechargeRecord = () => {
|
|
const handleRechargeRecord = () => {
|
|
-
|
|
|
|
|
|
+ params.startTime = time.arr[0]
|
|
|
|
+ params.endTime = time.arr[1]
|
|
rechargeRecord(params).then((res: any) => {
|
|
rechargeRecord(params).then((res: any) => {
|
|
console.log('res', res);
|
|
console.log('res', res);
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -62,6 +63,11 @@ const handleRechargeRecord = () => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
handleRechargeRecord()
|
|
handleRechargeRecord()
|
|
|
|
+const search = () => {
|
|
|
|
+ pagination.current = 1
|
|
|
|
+ params.pageNum = 1
|
|
|
|
+ handleRechargeRecord()
|
|
|
|
+}
|
|
const handleTableChange = (e: any) => {
|
|
const handleTableChange = (e: any) => {
|
|
pagination.current = e.current
|
|
pagination.current = e.current
|
|
pagination.pageSize = e.pageSize
|
|
pagination.pageSize = e.pageSize
|
|
@@ -69,6 +75,14 @@ const handleTableChange = (e: any) => {
|
|
params.pageSize = e.pageSize
|
|
params.pageSize = e.pageSize
|
|
handleRechargeRecord()
|
|
handleRechargeRecord()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const showPayType = (v: Number) => {
|
|
|
|
+ if (v === 1) {
|
|
|
|
+ return '支付宝'
|
|
|
|
+ } else {
|
|
|
|
+ return '微信'
|
|
|
|
+ }
|
|
|
|
+}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
|
|
})
|
|
})
|
|
@@ -77,9 +91,9 @@ onMounted(() => {
|
|
<div class="text-20px text-[#222222] font-bold mb-30px">充值记录</div>
|
|
<div class="text-20px text-[#222222] font-bold mb-30px">充值记录</div>
|
|
<a-form :model="params" name="horizontal_login" layout="inline" autocomplete="off" class="mb-20px">
|
|
<a-form :model="params" name="horizontal_login" layout="inline" autocomplete="off" class="mb-20px">
|
|
<a-form-item label="日期" name="mobile">
|
|
<a-form-item label="日期" name="mobile">
|
|
- <a-range-picker v-model:value="time" format="YYYY/MM/DD" />
|
|
|
|
|
|
+ <a-range-picker v-model:value="time.arr" valueFormat="YYYY/MM/DD" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- <a-form-item label="金额范围">
|
|
|
|
|
|
+ <!-- <a-form-item label="金额范围">
|
|
<custom-com>
|
|
<custom-com>
|
|
<div class="flex items-center h-32px border-1px bg-[#ffffff]">
|
|
<div class="flex items-center h-32px border-1px bg-[#ffffff]">
|
|
<a-input v-model:value="params.minAmount" :bordered="false" class="w-120px text-center"
|
|
<a-input v-model:value="params.minAmount" :bordered="false" class="w-120px text-center"
|
|
@@ -89,14 +103,17 @@ onMounted(() => {
|
|
placeholder="查询最大金额" />
|
|
placeholder="查询最大金额" />
|
|
</div>
|
|
</div>
|
|
</custom-com>
|
|
</custom-com>
|
|
- </a-form-item>
|
|
|
|
|
|
+ </a-form-item> -->
|
|
<a-form-item>
|
|
<a-form-item>
|
|
- <a-button class="ml-20px" type="primary" @click="handleRechargeRecord">查 询</a-button>
|
|
|
|
|
|
+ <a-button class="ml-20px" type="primary" @click="search">查 询</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-form>
|
|
</a-form>
|
|
<a-table :columns="columns" :data-source="data" :pagination="pagination" bordered :scroll="true"
|
|
<a-table :columns="columns" :data-source="data" :pagination="pagination" bordered :scroll="true"
|
|
@change="handleTableChange">
|
|
@change="handleTableChange">
|
|
<template #bodyCell="{ column, text, record }">
|
|
<template #bodyCell="{ column, text, record }">
|
|
|
|
+ <template v-if="column.dataIndex === 'paymentType'">
|
|
|
|
+ <div>{{ showPayType(record.paymentType) }}</div>
|
|
|
|
+ </template>
|
|
</template>
|
|
</template>
|
|
</a-table>
|
|
</a-table>
|
|
|
|
|