Merge branch 'develop' of https://code.linyikj.com.cn/pay/pay-company into develop
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m16s

# Conflicts:
#	src/gen/Enums.ts
#	src/pages/bills/house_bills/index.tsx
This commit is contained in:
uiuJun 2026-01-18 20:06:41 +08:00
commit 87e4ed194d
6 changed files with 380 additions and 995 deletions

View File

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

View File

@ -746,6 +746,10 @@ declare namespace ApiTypes {
"remark"?: string; // 备注 "remark"?: string; // 备注
"roles_id"?: string[]; // 角色ID数组 "roles_id"?: string[]; // 角色ID数组
}; };
type ResetPassword = {
"id": number; // id
"password": string; // 密码[hidden]
};
type Show = { type Show = {
"id": number; // id "id": number; // id
}; };
@ -1623,6 +1627,9 @@ declare namespace ApiTypes {
"visited_remark"?: string; // 访问说明 "visited_remark"?: string; // 访问说明
"visited_attachment"?: string[]; // 访问附件 "visited_attachment"?: string[]; // 访问附件
}; };
type Closed = {
"id": number; // id
};
type Delete = { type Delete = {
"id": number; // id "id": number; // id
}; };

File diff suppressed because it is too large Load Diff

View File

@ -216,7 +216,7 @@ export const BannersTypeEnum= {
// 缓存类型 // 缓存类型
export const CacheTypeEnum= { export const CacheTypeEnum= {
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#a61e65","value":"MobilePhoneVerificationCode"}, 'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#6f374e","value":"MobilePhoneVerificationCode"},
}; };
// CompaniesMerchantTypeEnum // CompaniesMerchantTypeEnum

View File

@ -1,7 +1,6 @@
import { import {
MyButtons, MyButtons,
MyColumns, MyColumns,
MyImportModal,
MyPageContainer, MyPageContainer,
MyProTableProps, MyProTableProps,
} from '@/common'; } from '@/common';
@ -32,15 +31,15 @@ export default function Index({ title = '账单明细' }) {
MyProTableProps.request(params, sort, Apis.Bill.HouseBills.List) MyProTableProps.request(params, sort, Apis.Bill.HouseBills.List)
} }
toolBarRender={(action) => [ toolBarRender={(action) => [
<MyImportModal // <MyImportModal
key="ImportHouse" // key="ImportHouse"
title="账单导入" // title="账单导入"
type="default" // type="default"
size="middle" // size="middle"
templateApi={Apis.Bill.HouseBills.DownloadTemplate} // templateApi={Apis.Bill.HouseBills.DownloadTemplate}
importApi={Apis.Bill.HouseBills.Import} // importApi={Apis.Bill.HouseBills.Import}
reload={action?.reload} // reload={action?.reload}
/>, // />,
<BillCreate key="Create" reload={action?.reload} title={title} />, <BillCreate key="Create" reload={action?.reload} title={title} />,
]} ]}
columns={[ columns={[
@ -56,7 +55,7 @@ export default function Index({ title = '账单明细' }) {
render: (_, record) => { render: (_, record) => {
return record.asset_houses_id ? ( return record.asset_houses_id ? (
<MyButtons.View <MyButtons.View
title={`${record.asset_house.full_name}`} title={record?.asset_house?.full_name || '-'}
type="link" type="link"
onClick={() => { onClick={() => {
record.asset_houses_id record.asset_houses_id

View File

@ -4,7 +4,7 @@ import { Apis } from '@/gen/Apis';
import { HomeFilled } from '@ant-design/icons'; import { HomeFilled } from '@ant-design/icons';
import { ProCard } from '@ant-design/pro-components'; import { ProCard } from '@ant-design/pro-components';
import { useNavigate } from '@umijs/max'; import { useNavigate } from '@umijs/max';
import { Empty, Space, Tag } from 'antd'; import { Empty, Space, Tabs, Tag } from 'antd';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import SearchInfo from './components/SearchInfo'; import SearchInfo from './components/SearchInfo';
@ -12,42 +12,46 @@ export default function Index({ title = '房屋账单' }) {
const navigate = useNavigate(); const navigate = useNavigate();
// const [selectedBuilding, setSelectedBuilding] = // const [selectedBuilding, setSelectedBuilding] =
// useState<SelectedBuilding | null>(null); // useState<SelectedBuilding | null>(null);
const [items, setItems] = useState<any>([
{
key: '1',
label: '全部房屋',
},
]);
const [params, setParams] = useState<any>({ page: 1 }); const [params, setParams] = useState<any>({ page: 1 });
const [getSummaryBillListData, setGetSummaryBillListData] = useState<any>({}); 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) => { const getSummaryBillList = (data: any) => {
Apis.Bill.HouseBills.SummaryBillList({ ...params, ...data }).then((res) => { Apis.Bill.HouseBills.SummaryBillList({ ...params, ...data }).then(
setParams({ ...params, ...data }); (res: any) => {
setGetSummaryBillListData(res); setParams({ ...params, ...data });
}); setPageStatistics(res?.statistics || {});
setGetSummaryBillListData(res);
},
);
}; };
useEffect(() => { useEffect(() => {
getSummaryBillList({ page: 1 }); 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 ( return (
<MyPageContainer <MyPageContainer
title={title} title={title}
@ -77,6 +81,17 @@ export default function Index({ title = '房屋账单' }) {
}} }}
/> />
<ProCard> <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 }}> <div style={{ display: 'flex', flexWrap: 'wrap', gap: 15 }}>
{getSummaryBillListData?.data?.length ? null : ( {getSummaryBillListData?.data?.length ? null : (
<div <div