Compare commits

..

3 Commits

Author SHA1 Message Date
1468891bf5 fix(api): 为默认请求客户端设置无超时限制
Some checks failed
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
避免因网络延迟导致请求意外中断,将默认请求客户端的超时时间设置为0
2026-02-03 10:09:36 +08:00
5c2c5b92dd feat(报表): 扩展天医币报表收入项显示点数和金额
修改收入项数据结构,支持同时显示金额和点数
调整前端布局和显示格式,当点数与金额不同时显示点数信息
2026-01-27 14:34:35 +08:00
4b9f79192f fix(财务): 修复天易币订单查询表单和接口参数问题
为手机号字段添加默认空值,避免未填写时传undefined
在查询接口中添加source和type参数的默认空值处理
2026-01-27 14:34:22 +08:00
3 changed files with 25 additions and 8 deletions

View File

@@ -105,6 +105,7 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
export const defaultRequestClient = createRequestClient(apiURL, {
responseReturn: 'data',
timeout: 0,
});
export const baseRequestClient = new RequestClient({ baseURL: apiURL });

View File

@@ -55,6 +55,7 @@ const formOptions: VbenFormProps = {
},
fieldName: 'tel',
label: '手机号',
defaultValue: '',
},
{
component: 'Select',
@@ -159,6 +160,8 @@ const gridOptions: VxeTableGridOptions<RowType> = {
return await tianyibiApi.getPointOrdersList({
page: page.currentPage,
limit: page.pageSize,
source: params.source || '',
type: params.type || '',
...params,
});
},

View File

@@ -6,8 +6,13 @@ import MonthReportView from '#/views/statistics/common/MonthReportView.vue';
import { useMonthReport } from '../common/useMonthReport';
interface IncomeItem {
fee: number;
point: number;
}
interface Report {
incomes: Record<string, number>;
incomes: Record<string, IncomeItem>;
consumes: Record<string, number>;
surplus: number;
}
@@ -15,6 +20,7 @@ interface Report {
interface ReportItem {
type: string;
fee: number;
point: number;
}
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`,
normalize: (data) => ({
incomes: {
微信: 0,
支付宝: 0,
银行: 0,
...Object.fromEntries(data.map.incomes.map((item: ReportItem) => [item.type, item.fee])),
微信: { fee: 0, point: 0 },
支付宝: { fee: 0, point: 0 },
银行: { fee: 0, point: 0 },
...Object.fromEntries(
data.map.incomes.map((item: ReportItem) => [
item.type,
{ fee: item.fee, point: item.point },
]),
),
},
consumes: {
实物: 0,
@@ -63,11 +74,13 @@ onMounted(() => {
<template #default="{ item }">
<div class="-m-2 text-[16px]">
<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 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-black">{{ fee }}</span>
<span class="text-black">{{
`${value.fee}${!value.point || value.fee === value.point ? '' : `(天医币${value.point}`}`
}}</span>
</div>
</div>
<div class="flex-1 bg-[#FFFBF0] px-2 pb-1">