Compare commits
3 Commits
5c39bd4113
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 1468891bf5 | |||
| 5c2c5b92dd | |||
| 4b9f79192f |
@@ -105,6 +105,7 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
|||||||
|
|
||||||
export const defaultRequestClient = createRequestClient(apiURL, {
|
export const defaultRequestClient = createRequestClient(apiURL, {
|
||||||
responseReturn: 'data',
|
responseReturn: 'data',
|
||||||
|
timeout: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const baseRequestClient = new RequestClient({ baseURL: apiURL });
|
export const baseRequestClient = new RequestClient({ baseURL: apiURL });
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ const formOptions: VbenFormProps = {
|
|||||||
},
|
},
|
||||||
fieldName: 'tel',
|
fieldName: 'tel',
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
|
defaultValue: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
@@ -159,6 +160,8 @@ const gridOptions: VxeTableGridOptions<RowType> = {
|
|||||||
return await tianyibiApi.getPointOrdersList({
|
return await tianyibiApi.getPointOrdersList({
|
||||||
page: page.currentPage,
|
page: page.currentPage,
|
||||||
limit: page.pageSize,
|
limit: page.pageSize,
|
||||||
|
source: params.source || '',
|
||||||
|
type: params.type || '',
|
||||||
...params,
|
...params,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,8 +6,13 @@ import MonthReportView from '#/views/statistics/common/MonthReportView.vue';
|
|||||||
|
|
||||||
import { useMonthReport } from '../common/useMonthReport';
|
import { useMonthReport } from '../common/useMonthReport';
|
||||||
|
|
||||||
|
interface IncomeItem {
|
||||||
|
fee: number;
|
||||||
|
point: number;
|
||||||
|
}
|
||||||
|
|
||||||
interface Report {
|
interface Report {
|
||||||
incomes: Record<string, number>;
|
incomes: Record<string, IncomeItem>;
|
||||||
consumes: Record<string, number>;
|
consumes: Record<string, number>;
|
||||||
surplus: number;
|
surplus: number;
|
||||||
}
|
}
|
||||||
@@ -15,6 +20,7 @@ interface Report {
|
|||||||
interface ReportItem {
|
interface ReportItem {
|
||||||
type: string;
|
type: string;
|
||||||
fee: number;
|
fee: number;
|
||||||
|
point: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { year, disabledDate, list, loading, getList, downloadReport, downloadAllReport } =
|
const { year, disabledDate, list, loading, getList, downloadReport, downloadAllReport } =
|
||||||
@@ -24,10 +30,15 @@ const { year, disabledDate, list, loading, getList, downloadReport, downloadAllR
|
|||||||
fileNameBuilder: (y, m) => `天医币报表_${y}年${m}月_文件.xlsx`,
|
fileNameBuilder: (y, m) => `天医币报表_${y}年${m}月_文件.xlsx`,
|
||||||
normalize: (data) => ({
|
normalize: (data) => ({
|
||||||
incomes: {
|
incomes: {
|
||||||
微信: 0,
|
微信: { fee: 0, point: 0 },
|
||||||
支付宝: 0,
|
支付宝: { fee: 0, point: 0 },
|
||||||
银行: 0,
|
银行: { fee: 0, point: 0 },
|
||||||
...Object.fromEntries(data.map.incomes.map((item: ReportItem) => [item.type, item.fee])),
|
...Object.fromEntries(
|
||||||
|
data.map.incomes.map((item: ReportItem) => [
|
||||||
|
item.type,
|
||||||
|
{ fee: item.fee, point: item.point },
|
||||||
|
]),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
consumes: {
|
consumes: {
|
||||||
实物: 0,
|
实物: 0,
|
||||||
@@ -63,11 +74,13 @@ onMounted(() => {
|
|||||||
<template #default="{ item }">
|
<template #default="{ item }">
|
||||||
<div class="-m-2 text-[16px]">
|
<div class="-m-2 text-[16px]">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="flex-1 bg-[#F6FFF5] px-2 pb-1">
|
<div class="min-w-[50%] bg-[#F6FFF5] px-2 pb-1">
|
||||||
<div class="p-1 text-center font-bold">进项</div>
|
<div class="p-1 text-center font-bold">进项</div>
|
||||||
<div v-for="(fee, type) in item.incomes" :key="type" class="p-1">
|
<div v-for="(value, type) in item.incomes" :key="type" class="p-1">
|
||||||
<span class="text-gray-500">{{ type }}:</span>
|
<span class="text-gray-500">{{ type }}:</span>
|
||||||
<span class="text-black">{{ fee }}</span>
|
<span class="text-black">{{
|
||||||
|
`¥${value.fee}${!value.point || value.fee === value.point ? '' : `(天医币${value.point})`}`
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 bg-[#FFFBF0] px-2 pb-1">
|
<div class="flex-1 bg-[#FFFBF0] px-2 pb-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user