Compare commits
No commits in common. "b66917f99929fcc80167f2d413d1f05c18f07813" and "50ef72bc802fd17a4a5ec7ef77f0fee4de6666bb" have entirely different histories.
b66917f999
...
50ef72bc80
@ -18,8 +18,8 @@ export default defineConfig({
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://10.39.13.78:8001/',
|
||||
// target: 'https://test-admin.linyikj.com.cn/',
|
||||
// target: 'https://admin.linyikj.com.cn/',
|
||||
// target: 'https://gcadmin-test.linyikj.com.cn',
|
||||
// target: 'http://guocaiservice.com',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
},
|
||||
|
||||
3
src/gen/ApiTypes.d.ts
vendored
3
src/gen/ApiTypes.d.ts
vendored
@ -578,6 +578,7 @@ declare namespace ApiTypes {
|
||||
"year"?: number; // 账单年份
|
||||
"month"?: number; // 账单月份
|
||||
"type"?: string; // 账单类型,[enum:HouseBillsTypeEnum]
|
||||
"has_refunding"?: boolean; // 是否有退款中:false-无,true-有
|
||||
};
|
||||
type SummaryBillList = {
|
||||
"project_name"?: string; // 模糊搜索:项目名称
|
||||
@ -1069,7 +1070,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]
|
||||
};
|
||||
}
|
||||
|
||||
@ -560,7 +560,7 @@ export const BillsStatusEnum = {
|
||||
export const CacheTypeEnum = {
|
||||
MobilePhoneVerificationCode: {
|
||||
text: '手机验证码',
|
||||
color: '#4ef9dd',
|
||||
color: '#d518aa',
|
||||
value: 'MobilePhoneVerificationCode',
|
||||
},
|
||||
};
|
||||
|
||||
@ -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, Tabs, Tag } from 'antd';
|
||||
import { Empty, Space, Tag } from 'antd';
|
||||
import { useEffect, useState } from 'react';
|
||||
import SearchInfo from './components/SearchInfo';
|
||||
|
||||
@ -12,46 +12,42 @@ 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: any) => {
|
||||
Apis.Bill.HouseBills.SummaryBillList({ ...params, ...data }).then((res) => {
|
||||
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}
|
||||
@ -81,17 +77,6 @@ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user