develop #1

Merged
zsq merged 17 commits from develop into main 2026-01-25 11:14:49 +08:00
4 changed files with 27 additions and 23 deletions
Showing only changes of commit 176bdc01f5 - Show all commits

View File

@ -95,8 +95,8 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
<div style={{ width: 181 }}>
<img
src={
snap.session?.company_configs?.config_value?.logo
? snap.session?.company_configs?.config_value?.logo[0]?.url
snap.session?.company_configs?.config_value?.admin_logo
? snap.session?.company_configs?.config_value?.admin_logo[0]?.url
: ''
}
style={{ height: '42px' }}

View File

@ -40,6 +40,9 @@ type SessionType = {
logo?: {
url?: string;
}[];
admin_logo?: {
url?: string;
}[];
};
};
permissions?: any;

View File

@ -1,7 +1,6 @@
import {
MyButtons,
MyColumns,
MyImportModal,
MyPageContainer,
MyProTableProps,
} from '@/common';
@ -32,17 +31,17 @@ export default function Index({ title = '房屋档案' }) {
request={async (params, sort) =>
MyProTableProps.request(params, sort, Apis.Asset.AssetHouses.List)
}
toolBarRender={(action) => [
<MyImportModal
key="ImportHouse"
title="批量导入"
type="default"
size="middle"
templateApi={Apis.Archive.HouseOccupants.DownloadTemplate}
importApi={Apis.Archive.HouseOccupants.Import}
reload={action?.reload}
/>,
]}
// toolBarRender={(action) => [
// <MyImportModal
// key="ImportHouse"
// title="批量导入"
// type="default"
// size="middle"
// templateApi={Apis.Archive.HouseOccupants.DownloadTemplate}
// importApi={Apis.Archive.HouseOccupants.Import}
// reload={action?.reload}
// />,
// ]}
columns={[
MyColumns.ID({ search: false }),
Selects?.AssetProjects({
@ -142,7 +141,12 @@ export default function Index({ title = '房屋档案' }) {
navigate(`/customer/archive/show/${item.id}`);
}}
/>
{!item?.house_occupants?.length ? (
<Delivery
item={item}
reload={action?.reload}
title="添加业主"
/>
{/* {!item?.house_occupants?.length ? (
<Delivery
item={item}
reload={action?.reload}
@ -150,7 +154,7 @@ export default function Index({ title = '房屋档案' }) {
/>
) : (
''
)}
)} */}
</Space>
),
}),

View File

@ -9,8 +9,6 @@ import { Apis } from '@/gen/Apis';
import {
HouseOccupantsCardTypeEnum,
HouseOccupantsHouseRelationEnum,
HouseOccupantsRelationWithOwnerEnum,
HouseOccupantsResidentialRelationEnum,
HouseRegistersTypeEnum,
} from '@/gen/Enums';
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
@ -28,6 +26,7 @@ export default function Delivery(props: MyBetaModalFormProps) {
<MyButtons.View
title={props.title}
size={props.item?.size || 'small'}
disabled={props.item?.house_occupants?.length}
type="primary"
/>
}
@ -46,11 +45,9 @@ export default function Delivery(props: MyBetaModalFormProps) {
customer_info: values.customer_info?.map((res: any) => {
return {
...res,
house_relation: HouseOccupantsHouseRelationEnum.Owner.value,
relation_with_owner:
HouseOccupantsRelationWithOwnerEnum.Self.value,
residential_relation:
HouseOccupantsResidentialRelationEnum.PropertyOwner.value,
house_relation: 'Owner',
relation_with_owner: 'Self',
residential_relation: 'PropertyOwner',
};
}),
})