From 04a716f0e0cbce9dcacc2a8524cc4bf44158a918 Mon Sep 17 00:00:00 2001 From: uiuJun <> Date: Mon, 6 Oct 2025 17:28:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyModal.tsx | 2 +- src/pages/archive/components/SummaryInfo.tsx | 93 ++++++++++--------- src/pages/archive/show/$id.tsx | 15 ++- src/pages/asset/activities/index.tsx | 47 +++++++++- src/pages/asset/grids/modals/GridMannger.tsx | 6 +- src/pages/asset/grids/modals/GridShow.tsx | 79 ++++------------ src/pages/bills/summary/show/$id.tsx | 8 +- src/pages/charge/tasks/index.tsx | 6 +- src/pages/charge/tasks/modals/TaskShow.tsx | 1 + .../customer/components/CustomerHouse.tsx | 65 +++++++------ src/pages/customer/show/$id.tsx | 9 +- 11 files changed, 177 insertions(+), 154 deletions(-) diff --git a/src/components/MyModal.tsx b/src/components/MyModal.tsx index f13b3f7..c43bccb 100644 --- a/src/components/MyModal.tsx +++ b/src/components/MyModal.tsx @@ -10,7 +10,7 @@ export function MyModal(props?: any) { useEffect(() => { if (open) { - props?.onOpen(true); + props?.onOpen?.(true); } }, [open]); diff --git a/src/pages/archive/components/SummaryInfo.tsx b/src/pages/archive/components/SummaryInfo.tsx index f801d88..e7b1dd4 100644 --- a/src/pages/archive/components/SummaryInfo.tsx +++ b/src/pages/archive/components/SummaryInfo.tsx @@ -1,49 +1,56 @@ -import { MyBetaModalFormProps, MyProTableProps } from '@/common'; +import { MyBetaModalFormProps, MyButtons } from '@/common'; import { Apis } from '@/gen/Apis'; -import { ProCard, ProTable } from '@ant-design/pro-components'; +import { ProCard, ProDescriptions } from '@ant-design/pro-components'; +import { useNavigate } from '@umijs/max'; +import { Space } from 'antd'; +import { useEffect, useState } from 'react'; + +export default function Info(props: MyBetaModalFormProps) { + const [getShow, setDataShow] = useState({}); + const navigate = useNavigate(); + + useEffect(() => { + Apis.Bill.HouseBills.SummaryShow({ + asset_houses_id: props?.item?.id, + }) + .then((res) => { + console.log(res); + setDataShow(JSON.parse(JSON.stringify(res?.data))); + return false; + }) + .catch(() => false); + }, [props?.item?.id]); -export default function info(props: MyBetaModalFormProps) { - const { item } = props; return ( - - - MyProTableProps.request( - { - ...params, - asset_houses_id: item?.asset_houses_id, - }, - sort, - Apis.Bill.HouseBills.SummaryBillList, - ) - } - search={false} - options={false} - pagination={false} - columns={[ - { - title: '账单金额合计', - dataIndex: 'payable_amount_sum', - search: false, - }, - { - title: '滞纳金合计', - dataIndex: 'late_fee_sum', - search: false, - }, - { - title: '优惠金额合计', - dataIndex: 'discount_amount_sum', - search: false, - }, - { - title: '应付合计', - dataIndex: 'total_payable_sum', - search: false, - }, - ]} - /> + + + + {getShow?.payable_amount_sum || '-'} + + + {getShow?.late_fee_sum || '-'} + + + {getShow?.discount_amount_sum || '-'} + + + + {getShow?.total_payable_sum || ''} + {getShow?.payable_amount_sum ? ( + { + navigate(`/bills/summary/show/${props?.item?.id || 0}`); + }} + /> + ) : ( + '无账单' + )} + + + ); } diff --git a/src/pages/archive/show/$id.tsx b/src/pages/archive/show/$id.tsx index eb9bdcb..6e22862 100644 --- a/src/pages/archive/show/$id.tsx +++ b/src/pages/archive/show/$id.tsx @@ -9,7 +9,6 @@ import SummaryInfo from '../components/SummaryInfo'; import OccupantsHistory from '../table/OccupantsHistory'; import OccupantsNow from '../table/OccupantsNow'; import RegistersList from '../table/RegistersList'; -import UnpaidBill from '../table/UnpaidBill'; export default function Show({ title = '房屋档案' }) { const { id } = useParams<{ id: string }>(); @@ -90,18 +89,18 @@ export default function Show({ title = '房屋档案' }) { /> ), }, - { - label: '欠费账单', - key: '4', - closable: false, - children: , - }, + // { + // label: '欠费账单', + // key: '4', + // closable: false, + // children: , + // }, ]; return ( - + {id && } diff --git a/src/pages/asset/activities/index.tsx b/src/pages/asset/activities/index.tsx index 880d7c9..43ac5cf 100644 --- a/src/pages/asset/activities/index.tsx +++ b/src/pages/asset/activities/index.tsx @@ -107,7 +107,7 @@ export default function Index({ title = '项目活动' }) { // title={title} /> )} - {(!item.end_time || new Date(item.end_time) > new Date()) && ( + {/* {(!item.end_time || new Date(item.end_time) > new Date()) && ( action?.reload()); }} /> - )} - + )} */} + { + let newStatus; + if ( + item.publish_status === + ActivitiesPublishStatusEnum.Unpublished.value + ) { + newStatus = ActivitiesPublishStatusEnum.Published.value; + } else if ( + item.publish_status === + ActivitiesPublishStatusEnum.Published.value + ) { + newStatus = ActivitiesPublishStatusEnum.Unlisted.value; + } else { + newStatus = ActivitiesPublishStatusEnum.Published.value; + } + Apis.Activity.Activities.ChangePublishStatus({ + id: item.id, + publish_status: newStatus, + }).then(() => action?.reload()); + }} + /> {item.is_enroll === 1 && ( {...MyModalFormProps.props} - title={`设置管理员`} + title={`设置楼栋管家`} wrapperCol={{ span: 24 }} width="500px" form={form} key={new Date().getTime()} - trigger={} + trigger={} request={() => Promise.resolve(props.item)} onOpenChange={(open: any) => { if (open && props.item) { @@ -49,7 +49,7 @@ export default function Create( } columns={[ Selects?.Employees({ - title: '设置网格员', + title: '设置楼栋管家', dataIndex: 'company_employees_id', colProps: { span: 24 }, formItemProps: { ...rulesHelper.text }, diff --git a/src/pages/asset/grids/modals/GridShow.tsx b/src/pages/asset/grids/modals/GridShow.tsx index e772375..6912151 100644 --- a/src/pages/asset/grids/modals/GridShow.tsx +++ b/src/pages/asset/grids/modals/GridShow.tsx @@ -1,12 +1,6 @@ -import { MyBetaModalFormProps, renderTextHelper } from '@/common'; +import { MyBetaModalFormProps } from '@/common'; import { MyModal } from '@/components/MyModal'; import { Apis } from '@/gen/Apis'; -import { - AssetHousesOrientationEnum, - AssetHousesOwnershipTypeEnum, - AssetHousesStatusEnum, - AssetHousesUsageEnum, -} from '@/gen/Enums'; import { ProCard, ProDescriptions } from '@ant-design/pro-components'; import { Space } from 'antd'; import { useState } from 'react'; @@ -14,12 +8,10 @@ import { useState } from 'react'; export default function Info(props: MyBetaModalFormProps) { const [getShow, setDataShow] = useState({}); - // 只在弹窗打开时获取数据 - return ( { if (e) { return Apis.Grid.Grids.Show({ @@ -37,60 +29,25 @@ export default function Info(props: MyBetaModalFormProps) { node={ <> - - - - 【{getShow?.id}】 - {getShow?.name} - + + + {getShow?.name} - - {getShow?.name} + + + {getShow?.grid_ranges + ?.map( + (item: any) => + item?.asset_building?.name + item?.asset_unit?.name, + ) + .join(';')} - - {getShow?.floor} + + + {getShow?.created_at} - - - - - - - - {getShow?.built_area}m² - - - {getShow?.inside_area}m² - - - {getShow?.chargeable_area}m² - - - - - - {getShow?.room || ''}房{getShow?.hall || ''}厅 - {getShow?.bathroom || ''}卫{getShow?.kitchen || ''}厨 - {getShow?.balcony || ''}阳台 - - - + + {getShow?.updated_at} diff --git a/src/pages/bills/summary/show/$id.tsx b/src/pages/bills/summary/show/$id.tsx index 634dbcd..daedc6a 100644 --- a/src/pages/bills/summary/show/$id.tsx +++ b/src/pages/bills/summary/show/$id.tsx @@ -44,7 +44,9 @@ export default function Show({ title = '账单详情' }) { key: '1', closable: false, children: ( - + ), }, { @@ -52,7 +54,7 @@ export default function Show({ title = '账单详情' }) { key: '2', closable: false, children: ( - + ), }, { @@ -61,7 +63,7 @@ export default function Show({ title = '账单详情' }) { closable: false, children: ( ), }, diff --git a/src/pages/charge/tasks/index.tsx b/src/pages/charge/tasks/index.tsx index 9ffcc4d..9343f8c 100644 --- a/src/pages/charge/tasks/index.tsx +++ b/src/pages/charge/tasks/index.tsx @@ -118,7 +118,11 @@ export default function Index({ title = '账单任务' }) { (value ? '已生成' : '未生成'), + title: '退房日期', + dataIndex: 'move_out_date', + render(_, record) { + return `${record?.move_out_date || '-'}`; + }, search: false, }, + // MyColumns.Option({ // render: (_, item: any, index, action) => ( // diff --git a/src/pages/customer/show/$id.tsx b/src/pages/customer/show/$id.tsx index 86c1fdc..094f3a9 100644 --- a/src/pages/customer/show/$id.tsx +++ b/src/pages/customer/show/$id.tsx @@ -14,7 +14,7 @@ export default function Show({ title = '客户档案' }) { // 注册标签页 const { addTab } = usePageTabs({ tabKey: `customer-detail-${id}`, - tabLabel: `${data?.name}档案` || title, + tabLabel: `客户:${data?.name}` || title, }); const loadShow = () => { @@ -56,7 +56,12 @@ export default function Show({ title = '客户档案' }) { - + );