Compare commits

..

3 Commits

Author SHA1 Message Date
Your Name
b66917f999 fix:更新账单
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
2026-01-18 19:15:34 +08:00
Your Name
2f9dd387ff Merge branch 'develop' of ssh://code.linyikj.com.cn:2222/pay/pay-company into develop
* 'develop' of ssh://code.linyikj.com.cn:2222/pay/pay-company:
  fix1:1

# Conflicts:
#	src/gen/ApiTypes.d.ts
#	src/gen/Enums.ts
2026-01-18 18:46:26 +08:00
Your Name
4c249b98bd fix:更新 2026-01-18 18:45:09 +08:00
4 changed files with 46 additions and 32 deletions

View File

@ -18,8 +18,8 @@ export default defineConfig({
proxy: {
'/api/': {
target: 'http://10.39.13.78:8001/',
// target: 'https://gcadmin-test.linyikj.com.cn',
// target: 'http://guocaiservice.com',
// target: 'https://test-admin.linyikj.com.cn/',
// target: 'https://admin.linyikj.com.cn/',
changeOrigin: true,
pathRewrite: { '^': '' },
},

View File

@ -578,7 +578,6 @@ declare namespace ApiTypes {
"year"?: number; // 账单年份
"month"?: number; // 账单月份
"type"?: string; // 账单类型,[enum:HouseBillsTypeEnum]
"has_refunding"?: boolean; // 是否有退款中:false-无,true-有
};
type SummaryBillList = {
"project_name"?: string; // 模糊搜索:项目名称
@ -1070,7 +1069,7 @@ declare namespace ApiTypes {
type Select = {
"name"?: string; // 模糊搜索:名称
"project_name"?: string; // 模糊搜索:项目名称
"charge_type"?: string; // 收费类型,[enum:HouseBillsTypeEnum]
"charge_type"?: string[]; // 收费类型,[enum:HouseBillsTypeEnum]
"asset_projects_id"?: number; // 项目id,[ref:asset_projects]
};
}

View File

@ -560,7 +560,7 @@ export const BillsStatusEnum = {
export const CacheTypeEnum = {
MobilePhoneVerificationCode: {
text: '手机验证码',
color: '#d518aa',
color: '#4ef9dd',
value: 'MobilePhoneVerificationCode',
},
};

View File

@ -4,7 +4,7 @@ import { Apis } from '@/gen/Apis';
import { HomeFilled } from '@ant-design/icons';
import { ProCard } from '@ant-design/pro-components';
import { useNavigate } from '@umijs/max';
import { Empty, Space, Tag } from 'antd';
import { Empty, Space, Tabs, Tag } from 'antd';
import { useEffect, useState } from 'react';
import SearchInfo from './components/SearchInfo';
@ -12,42 +12,46 @@ export default function Index({ title = '房屋账单' }) {
const navigate = useNavigate();
// const [selectedBuilding, setSelectedBuilding] =
// useState<SelectedBuilding | null>(null);
const [items, setItems] = useState<any>([
{
key: '1',
label: '全部房屋',
},
]);
const [params, setParams] = useState<any>({ page: 1 });
const [getSummaryBillListData, setGetSummaryBillListData] = useState<any>({});
const setPageStatistics = (res: any) => {
setItems([
{
key: '1',
label: '全部房屋',
},
{
key: '2',
label: `清欠房屋数(${res?.['清欠房屋数']})`,
},
{
key: '3',
label: `欠费房屋数(${res?.['欠费房屋数']})`,
},
]);
};
const getSummaryBillList = (data: any) => {
Apis.Bill.HouseBills.SummaryBillList({ ...params, ...data }).then((res) => {
Apis.Bill.HouseBills.SummaryBillList({ ...params, ...data }).then(
(res: any) => {
setParams({ ...params, ...data });
setPageStatistics(res?.statistics || {});
setGetSummaryBillListData(res);
});
},
);
};
useEffect(() => {
getSummaryBillList({ page: 1 });
}, []);
// 选择楼栋的回调函数
// const handleBuildingSelect = useCallback((building: SelectedBuilding) => {
// setSelectedBuilding(building);
// // 保存到本地缓存
// localStorage.setItem('selectedBuilding', JSON.stringify(building));
// }, []);
// 从本地缓存恢复选中的楼栋信息
// useEffect(() => {
// const cachedBuilding = localStorage.getItem('selectedBuilding');
// if (cachedBuilding) {
// try {
// const building = JSON.parse(cachedBuilding) as SelectedBuilding;
// setSelectedBuilding(building);
// // 恢复后重新获取账单列表
// getSummaryBillList(building);
// } catch (error) {
// console.error('Failed to parse cached building:', error);
// }
// }
// }, []);
return (
<MyPageContainer
title={title}
@ -77,6 +81,17 @@ export default function Index({ title = '房屋账单' }) {
}}
/>
<ProCard>
<Tabs
defaultActiveKey="1"
items={items}
onChange={(e) => {
console.log(e);
getSummaryBillList({
page: 1,
has_overdue: e === '3' ? true : e === '2' ? false : undefined,
});
}}
/>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 15 }}>
{getSummaryBillListData?.data?.length ? null : (
<div