Compare commits
2 Commits
1cdddded82
...
84db944c19
| Author | SHA1 | Date | |
|---|---|---|---|
| 84db944c19 | |||
| 521a1f3cb4 |
@ -4,8 +4,8 @@ import { ProCard } from '@ant-design/pro-components';
|
|||||||
import { useParams } from '@umijs/max';
|
import { useParams } from '@umijs/max';
|
||||||
import { Tabs } from 'antd';
|
import { Tabs } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import ComponentsInfo from './components/ComponentsInfo';
|
||||||
import Organizations from './components/Organizations';
|
import Organizations from './components/Organizations';
|
||||||
|
|
||||||
export default function Show({ title = '机构详情' }) {
|
export default function Show({ title = '机构详情' }) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
const [data, setShow] = useState<any>({});
|
const [data, setShow] = useState<any>({});
|
||||||
@ -22,9 +22,15 @@ export default function Show({ title = '机构详情' }) {
|
|||||||
|
|
||||||
let items = [
|
let items = [
|
||||||
{
|
{
|
||||||
label: '组织',
|
label: '基本信息',
|
||||||
key: '1',
|
key: '1',
|
||||||
closable: false,
|
closable: false,
|
||||||
|
children: <ComponentsInfo item={data} reload={() => loadShow()} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '组织',
|
||||||
|
key: '2',
|
||||||
|
closable: false,
|
||||||
children: <Organizations item={data} />,
|
children: <Organizations item={data} />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
56
src/pages/company/companies/components/ComponentsInfo.tsx
Normal file
56
src/pages/company/companies/components/ComponentsInfo.tsx
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
||||||
|
import { CompaniesMerchantTypeEnum } from '@/gen/Enums';
|
||||||
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import Update from '../modals/Update';
|
||||||
|
|
||||||
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<ProCard extra={props.extra}>
|
||||||
|
<ProDescriptions bordered>
|
||||||
|
<ProDescriptions.Item label="机构名称">
|
||||||
|
<Space>
|
||||||
|
{props?.item?.name}
|
||||||
|
<Update item={props?.item} title="机构" reload={props?.reload} />
|
||||||
|
</Space>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="机构简称">
|
||||||
|
{props?.item?.short_name}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="营业执照号">
|
||||||
|
{props?.item?.business_license_number}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="商户类型">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={CompaniesMerchantTypeEnum}
|
||||||
|
value={props?.item?.merchant_type}
|
||||||
|
key="merchant_type"
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="联系人姓名">
|
||||||
|
{props?.item?.contact_name}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="联系人手机">
|
||||||
|
{props?.item?.contact_phone}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="联系人邮箱">
|
||||||
|
{props?.item?.contact_email}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="机构地址" span={3}>
|
||||||
|
{props?.item?.province || ''}
|
||||||
|
{props?.item?.city || ''}
|
||||||
|
{props?.item?.district || ''}
|
||||||
|
{props?.item?.address || ''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="创建日期" span={3}>
|
||||||
|
{props?.item?.created_at}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="最近修改" span={3}>
|
||||||
|
{props?.item?.updated_at}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -18,7 +18,14 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`编辑${props.title}`}
|
title={`编辑${props.title}`}
|
||||||
form={form}
|
form={form}
|
||||||
trigger={<MyButtons.Edit />}
|
trigger={
|
||||||
|
<MyButtons.Default
|
||||||
|
title="修改"
|
||||||
|
color="primary"
|
||||||
|
variant="filled"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="800px"
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user