feat:修改住户信息、修改住户电话、修改审核页面的展示
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m2s
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m2s
This commit is contained in:
parent
41b8859698
commit
786a48fe99
38
src/gen/ApiTypes.d.ts
vendored
38
src/gen/ApiTypes.d.ts
vendored
@ -71,6 +71,24 @@ declare namespace ApiTypes {
|
||||
type RemoveOwner = {
|
||||
"house_occupants_id": number; // 房客id
|
||||
};
|
||||
type ChangeOccupant = {
|
||||
"house_occupants_id": number; // 房客id
|
||||
"type": string; // 类型,[enum:HouseRegistersTypeEnum
|
||||
"update_info": string[]; // 要修改的信息
|
||||
"update_info.phone"?: phone|required_if:type,UpdatePhone; // 客户手机号
|
||||
"update_info.reserve_phone"?: phone; // 客户备用电话
|
||||
"update_info.card_type"?: string; // 证件类型,[enum:HouseOccupantsCardTypeEnum]
|
||||
"update_info.id_card"?: string; // 客户身份证号
|
||||
"update_info.card_front_image"?: string[]; // 身份证正面图片
|
||||
"update_info.card_back_image"?: string[]; // 身份证反面图片
|
||||
"update_info.address"?: string; // 客户地址
|
||||
"update_info.ownership_info"?: string[]; // 产权信息
|
||||
"house_relation"?: string; // 房客关系,[enum:HouseOccupantsHouseRelationEnum]
|
||||
"residential_relation"?: string; // 居住关系,[enum:HouseOccupantsResidentialRelationEnum]
|
||||
"owners_id"?: number; // 产权人id,[ref:house_occupants]
|
||||
"relation_with_owner"?: string; // 与产权人关系,[enum:HouseOccupantsRelationWithOwnerEnum]
|
||||
"status"?: string; // 状态,[enum:HouseOccupantsStatusEnum]
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
@ -224,7 +242,7 @@ declare namespace ApiTypes {
|
||||
"charge"?: string; // 收费方式,[enum:AssetProjectsChargeEnum]
|
||||
"takeover_date"?: Date; // 接管日期
|
||||
"closure_date"?: Date; // 封园日期
|
||||
"company_property_brands_id"?: string; // 物业品牌id,[ref:company_property_brands]
|
||||
"company_property_brands_id"?: number; // 物业品牌id,[ref:company_property_brands]
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
@ -249,7 +267,7 @@ declare namespace ApiTypes {
|
||||
"charge"?: string; // 收费方式,[enum:AssetProjectsChargeEnum]
|
||||
"takeover_date"?: Date; // 接管日期
|
||||
"closure_date"?: Date; // 封园日期
|
||||
"company_property_brands_id"?: string; // 物业品牌id,[ref:company_property_brands]
|
||||
"company_property_brands_id"?: number; // 物业品牌id,[ref:company_property_brands]
|
||||
};
|
||||
type BindCompany = {
|
||||
"projects_id": number; // 项目id
|
||||
@ -518,6 +536,8 @@ declare namespace ApiTypes {
|
||||
namespace ConvenienceServices {
|
||||
type List = {
|
||||
"name"?: string; // 模糊搜索:名称
|
||||
"asset_projects_id"?: number; // 项目ID
|
||||
"project_name"?: string; // 项目名称
|
||||
};
|
||||
type Store = {
|
||||
"asset_projects_id": number; // 项目ID
|
||||
@ -870,6 +890,20 @@ declare namespace ApiTypes {
|
||||
};
|
||||
}
|
||||
}
|
||||
namespace Customer {
|
||||
namespace CustomerOpinions {
|
||||
type List = {
|
||||
"type"?: string; // 类型,[enum:CustomerOpinionsTypeEnum]
|
||||
"content"?: string; // 模糊搜索:内容
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
}
|
||||
namespace Grid {
|
||||
namespace Grids {
|
||||
type List = {
|
||||
|
||||
@ -45,6 +45,9 @@ export const Apis = {
|
||||
RemoveOwner(data: ApiTypes.Archive.HouseRegisters.RemoveOwner): Promise<MyResponseType> {
|
||||
return request('admin/archive/house_registers/remove_owner', { data });
|
||||
},
|
||||
ChangeOccupant(data: ApiTypes.Archive.HouseRegisters.ChangeOccupant): Promise<MyResponseType> {
|
||||
return request('admin/archive/house_registers/change_occupant', { data });
|
||||
},
|
||||
Show(data: ApiTypes.Archive.HouseRegisters.Show): Promise<MyResponseType> {
|
||||
return request('admin/archive/house_registers/show', { data });
|
||||
},
|
||||
@ -516,6 +519,19 @@ export const Apis = {
|
||||
},
|
||||
},
|
||||
},
|
||||
Customer: {
|
||||
CustomerOpinions: {
|
||||
List(data?: ApiTypes.Customer.CustomerOpinions.List): Promise<MyResponseType> {
|
||||
return request('admin/customer/customer_opinions/list', { data });
|
||||
},
|
||||
Show(data: ApiTypes.Customer.CustomerOpinions.Show): Promise<MyResponseType> {
|
||||
return request('admin/customer/customer_opinions/show', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.Customer.CustomerOpinions.Delete): Promise<MyResponseType> {
|
||||
return request('admin/customer/customer_opinions/delete', { data });
|
||||
},
|
||||
},
|
||||
},
|
||||
Grid: {
|
||||
Grids: {
|
||||
List(data?: ApiTypes.Grid.Grids.List): Promise<MyResponseType> {
|
||||
|
||||
@ -126,7 +126,7 @@ export const BannersTypeEnum= {
|
||||
|
||||
// 缓存类型
|
||||
export const CacheTypeEnum= {
|
||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#5b3d89","value":"MobilePhoneVerificationCode"},
|
||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#81d182","value":"MobilePhoneVerificationCode"},
|
||||
};
|
||||
|
||||
// CompaniesMerchantTypeEnum
|
||||
@ -189,6 +189,12 @@ export const CustomerBacklogsTypeEnum= {
|
||||
'ContractTodo': {"text":"合同待办","color":"#722ed1","value":"ContractTodo"},
|
||||
};
|
||||
|
||||
// CustomerOpinionsTypeEnum
|
||||
export const CustomerOpinionsTypeEnum= {
|
||||
'FeatureException': {"text":"功能异常","color":"#ff0000","value":"FeatureException"},
|
||||
'FeatureSuggestion': {"text":"新功能建议","color":"#00bfff","value":"FeatureSuggestion"},
|
||||
};
|
||||
|
||||
// 账单状态枚举
|
||||
export const HouseBillsBillStatusEnum= {
|
||||
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
||||
@ -404,6 +410,8 @@ export const HouseRegistersTypeEnum= {
|
||||
'RemoveOccupant': {"text":"移除住户","color":"#fa8c16","value":"RemoveOccupant"},
|
||||
'MoveOut': {"text":"搬离登记","color":"#f50","value":"MoveOut"},
|
||||
'MoveIn': {"text":"搬入登记","color":"#ffc53d","value":"MoveIn"},
|
||||
'UpdateInfo': {"text":"修改信息","color":"#722ed1","value":"UpdateInfo"},
|
||||
'UpdatePhone': {"text":"修改电话","color":"#13c2c2","value":"UpdatePhone"},
|
||||
};
|
||||
|
||||
// HouseRegistersUsagePlanEnum
|
||||
|
||||
@ -10,10 +10,12 @@ import { Popconfirm, Space, Tag } from 'antd';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import Delivery from '../modals/Delivery';
|
||||
import AddOccupant from './modals/AddOccupant';
|
||||
import ChangePhone from './modals/ChangePhone';
|
||||
import MoveIn from './modals/MoveIn';
|
||||
import MoveOut from './modals/MoveOut';
|
||||
import OccupantShow from './modals/OccupantShow';
|
||||
import OccupantsUpdate from './modals/OccupantsUpdate';
|
||||
import OwnerUpdate from './modals/OwnerUpdate';
|
||||
import RemoveOwner from './modals/RemoveOwner';
|
||||
import Transfer from './modals/Transfer';
|
||||
|
||||
@ -152,8 +154,16 @@ export default function Index({ ...rest }) {
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<OccupantShow item={item} reload={action?.reload} />
|
||||
<OccupantsUpdate item={item} reload={action?.reload} />
|
||||
{!item?.is_live_in && (
|
||||
{item?.house_relation !==
|
||||
HouseOccupantsHouseRelationEnum.NonOwner.value && (
|
||||
<OwnerUpdate item={item} reload={action?.reload} />
|
||||
)}
|
||||
{item?.house_relation ===
|
||||
HouseOccupantsHouseRelationEnum.NonOwner.value && (
|
||||
<OccupantsUpdate item={item} reload={action?.reload} />
|
||||
)}
|
||||
<ChangePhone item={item} reload={action?.reload} />
|
||||
{!item?.move_in_date && (
|
||||
<MoveIn item={item} reload={action?.reload} title="入住" />
|
||||
)}
|
||||
{item?.move_in_date && (
|
||||
|
||||
59
src/pages/archive/components/modals/ChangePhone.tsx
Normal file
59
src/pages/archive/components/modals/ChangePhone.tsx
Normal file
@ -0,0 +1,59 @@
|
||||
import {
|
||||
MyBetaModalFormProps,
|
||||
MyButtons,
|
||||
MyModalFormProps,
|
||||
rulesHelper,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { HouseRegistersTypeEnum } from '@/gen/Enums';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Form, message } from 'antd';
|
||||
|
||||
export default function Update(props: MyBetaModalFormProps) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
return (
|
||||
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.ChangeOccupant>
|
||||
{...MyModalFormProps.props}
|
||||
title={`修改电话`}
|
||||
wrapperCol={{ span: 24 }}
|
||||
width="360px"
|
||||
trigger={<MyButtons.Default title={`改电话`} size="small" type="link" />}
|
||||
key={new Date().getTime()}
|
||||
form={form}
|
||||
onOpenChange={(open: any) => {
|
||||
if (open) {
|
||||
form.setFieldsValue(props?.item); // 编辑赋值
|
||||
}
|
||||
}}
|
||||
onFinish={async (values: any) => {
|
||||
const requestData: any = {
|
||||
house_occupants_id: props?.item?.id,
|
||||
type: HouseRegistersTypeEnum.UpdatePhone.value,
|
||||
house_relation: props?.item?.house_relation,
|
||||
update_info: {
|
||||
phone: values.phone,
|
||||
},
|
||||
};
|
||||
return Apis.Archive.HouseRegisters.ChangeOccupant(requestData)
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
message.success('电话修改成功');
|
||||
return true;
|
||||
})
|
||||
.catch(() => false);
|
||||
}}
|
||||
columns={[
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
colProps: { span: 24 },
|
||||
fieldProps: {
|
||||
maxLength: 11,
|
||||
},
|
||||
formItemProps: { ...rulesHelper.phone },
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
106
src/pages/archive/components/modals/OwnerUpdate.tsx
Normal file
106
src/pages/archive/components/modals/OwnerUpdate.tsx
Normal file
@ -0,0 +1,106 @@
|
||||
import {
|
||||
MyBetaModalFormProps,
|
||||
MyButtons,
|
||||
MyFormItems,
|
||||
MyModalFormProps,
|
||||
rulesHelper,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import {
|
||||
HouseOccupantsCardTypeEnum,
|
||||
HouseRegistersTypeEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Form, message } from 'antd';
|
||||
|
||||
export default function Update(props: MyBetaModalFormProps) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
return (
|
||||
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.ChangeOccupant>
|
||||
{...MyModalFormProps.props}
|
||||
title={`修改信息`}
|
||||
wrapperCol={{ span: 24 }}
|
||||
width="600px"
|
||||
trigger={<MyButtons.Default title={`改信息`} size="small" type="link" />}
|
||||
key={new Date().getTime()}
|
||||
form={form}
|
||||
onOpenChange={(open: any) => {
|
||||
if (open) {
|
||||
form.setFieldsValue(props?.item); // 编辑赋值
|
||||
}
|
||||
}}
|
||||
onFinish={async (values: any) => {
|
||||
const requestData: any = {
|
||||
house_occupants_id: props?.item?.id,
|
||||
type: HouseRegistersTypeEnum.UpdateInfo.value,
|
||||
house_relation: props?.item?.house_relation,
|
||||
update_info: {
|
||||
name: values.name || props?.item,
|
||||
card_type: values.card_type,
|
||||
id_card: values.id_card,
|
||||
card_front_image: values.card_front_image,
|
||||
card_back_image: values.card_back_image,
|
||||
},
|
||||
};
|
||||
return Apis.Archive.HouseRegisters.ChangeOccupant(requestData)
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
message.success('信息编辑成功');
|
||||
return true;
|
||||
})
|
||||
.catch(() => false);
|
||||
}}
|
||||
columns={[
|
||||
{
|
||||
valueType: 'group',
|
||||
columns: [
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
colProps: { span: 6 },
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
},
|
||||
MyFormItems.EnumSelect({
|
||||
key: 'card_type',
|
||||
title: '证件类型',
|
||||
colProps: { span: 10 },
|
||||
valueEnum: HouseOccupantsCardTypeEnum,
|
||||
required: true,
|
||||
}),
|
||||
{
|
||||
title: '证件号码',
|
||||
dataIndex: 'id_card',
|
||||
colProps: { span: 8 },
|
||||
fieldProps: {
|
||||
maxLength: 18,
|
||||
},
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
},
|
||||
{
|
||||
valueType: 'group',
|
||||
columns: [
|
||||
MyFormItems.UploadImages({
|
||||
key: 'card_front_image',
|
||||
title: '证件正面',
|
||||
// uploadType: 'file',
|
||||
required: true,
|
||||
max: 1,
|
||||
colProps: { span: 6 },
|
||||
}),
|
||||
MyFormItems.UploadImages({
|
||||
key: 'card_back_image',
|
||||
title: '证件反面',
|
||||
// uploadType: 'file',
|
||||
required: true,
|
||||
max: 1,
|
||||
colProps: { span: 6 },
|
||||
}),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
128
src/pages/asset_houses_bill/index.tsx
Normal file
128
src/pages/asset_houses_bill/index.tsx
Normal file
@ -0,0 +1,128 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { MyExport } from '@/components/MyExport';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { AssetHousesUsageEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import { useState } from 'react';
|
||||
import HousesShow from '../asset/components/modals/HousesShow';
|
||||
import HousesUpdate from '../asset/components/modals/HousesUpdate';
|
||||
|
||||
export default function Index({ title = '房屋列表' }) {
|
||||
const [getParams, setParams] = useState({});
|
||||
|
||||
const navigate = useNavigate();
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'asset-houses',
|
||||
tabLabel: title,
|
||||
});
|
||||
return (
|
||||
<MyPageContainer title={title}>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) => {
|
||||
setParams(params);
|
||||
return MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Asset.AssetHouses.List,
|
||||
);
|
||||
}}
|
||||
toolBarRender={() => [
|
||||
<MyExport
|
||||
key="export"
|
||||
item={getParams}
|
||||
download={Apis.Asset.AssetHouses}
|
||||
/>,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
{
|
||||
title: '项目名称',
|
||||
dataIndex: ['asset_project', 'name'],
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return { project_name: value };
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '房屋名称',
|
||||
dataIndex: 'full_name',
|
||||
},
|
||||
MyColumns.EnumTag({
|
||||
title: '用途',
|
||||
dataIndex: 'usage',
|
||||
valueEnum: AssetHousesUsageEnum,
|
||||
}),
|
||||
{
|
||||
title: '楼层',
|
||||
dataIndex: 'floor',
|
||||
render(_, record) {
|
||||
return `${record?.floor}层`;
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'built_area',
|
||||
render(_, record) {
|
||||
return `${
|
||||
record?.built_area ? record?.built_area + ' m²' : '-'
|
||||
} `;
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '套内面积',
|
||||
dataIndex: 'inside_area',
|
||||
render(_, record) {
|
||||
return `${
|
||||
record?.inside_area ? record?.inside_area + ' m²' : '-'
|
||||
} `;
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '计费面积',
|
||||
dataIndex: 'chargeable_area',
|
||||
render(_, record) {
|
||||
return `${
|
||||
record?.chargeable_area ? record?.chargeable_area + ' m²' : '-'
|
||||
} `;
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<HousesShow item={item} reload={action?.reload} />
|
||||
<HousesUpdate
|
||||
item={item}
|
||||
reload={action?.reload}
|
||||
title="编辑"
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.Asset.AssetHouses.Delete({
|
||||
id: item.id,
|
||||
}).then(() => action?.reload())
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
154
src/pages/customer_opinions/index.tsx
Normal file
154
src/pages/customer_opinions/index.tsx
Normal file
@ -0,0 +1,154 @@
|
||||
import {
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { CustomerOpinionsTypeEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Image } from 'antd';
|
||||
|
||||
export default function Index({ title = '投诉建议' }) {
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'customer_opinions',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="customer_opinions"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Customer.CustomerOpinions.List,
|
||||
)
|
||||
}
|
||||
// toolBarRender={(action) => [
|
||||
// <MyImportModal
|
||||
// key="ImportHouse"
|
||||
// title="批量导入"
|
||||
// type="danger"
|
||||
// size="middle"
|
||||
// templateApi={Apis.Bill.HouseBills.DownloadTemplate}
|
||||
// importApi={Apis.Bill.HouseBills.Import}
|
||||
// reload={action?.reload}
|
||||
// />,
|
||||
// <BillCreate key="Create" reload={action?.reload} title={title} />,
|
||||
// ]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
// MyColumns.EnumTag({
|
||||
// title: '反馈来源',
|
||||
// dataIndex: 'payment_method',
|
||||
// valueEnum: HouseOrdersPaymentMethodEnum,
|
||||
// }),
|
||||
MyColumns.EnumTag({
|
||||
title: '反馈类型',
|
||||
dataIndex: 'type',
|
||||
valueEnum: CustomerOpinionsTypeEnum,
|
||||
}),
|
||||
{
|
||||
title: '反馈内容',
|
||||
dataIndex: 'content',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '反馈内容',
|
||||
dataIndex: 'content',
|
||||
width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽)
|
||||
render: (text) => (
|
||||
<div
|
||||
style={{
|
||||
width: '100%', // 继承列宽
|
||||
// height: '60px', // 设置固定高度,约显示3行文本
|
||||
overflow: 'hidden', // 超出隐藏
|
||||
textOverflow: 'ellipsis', // 省略号
|
||||
display: '-webkit-box',
|
||||
WebkitBoxOrient: 'vertical',
|
||||
WebkitLineClamp: 1, // 显示3行
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '附件',
|
||||
dataIndex: 'images',
|
||||
search: false,
|
||||
render: (_, record) => {
|
||||
if (!Array.isArray(record.images) || record.images.length === 0) {
|
||||
return '无附件';
|
||||
}
|
||||
return (
|
||||
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
||||
{record.images.map((item: any, index: number) => {
|
||||
if (item.type && item.type.includes('image')) {
|
||||
return (
|
||||
<Image
|
||||
key={index}
|
||||
width={40}
|
||||
height={30}
|
||||
src={item.url}
|
||||
style={{
|
||||
marginRight: 8,
|
||||
marginBottom: 8,
|
||||
objectFit: 'cover',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else if (item.type && item.type.includes('video')) {
|
||||
return (
|
||||
<video
|
||||
key={index}
|
||||
width={40}
|
||||
height={30}
|
||||
controls
|
||||
style={{
|
||||
marginRight: 8,
|
||||
marginBottom: 8,
|
||||
objectFit: 'cover',
|
||||
}}
|
||||
src={item.url}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
MyColumns.CreatedAt(),
|
||||
// MyColumns.Option({
|
||||
// render: (_, item: any, index, action) => (
|
||||
// <Space key={index}>
|
||||
// <CustomerOpinionShow
|
||||
// item={item}
|
||||
// title="详情"
|
||||
// reload={action?.reload}
|
||||
// />
|
||||
// <MyButtons.Delete
|
||||
// onConfirm={() =>
|
||||
// Apis.Common.Admins.Delete({ id: item.id }).then(() =>
|
||||
// action?.reload(),
|
||||
// )
|
||||
// }
|
||||
// />
|
||||
// </Space>
|
||||
// ),
|
||||
// }),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
92
src/pages/customer_opinions/modals/CustomerOpinionShow.tsx
Normal file
92
src/pages/customer_opinions/modals/CustomerOpinionShow.tsx
Normal file
@ -0,0 +1,92 @@
|
||||
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
||||
import { MyModal } from '@/components/MyModal';
|
||||
import {
|
||||
AssetProjectsChargeEnum,
|
||||
AssetProjectsEntrustTypeEnum,
|
||||
AssetProjectsPropertyTypeEnum,
|
||||
AssetProjectsStatusEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
|
||||
export default function AssetInfo(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
<MyModal
|
||||
title={props.title || '查看'}
|
||||
type={props.item?.type || 'primary'}
|
||||
width="920px"
|
||||
node={
|
||||
<Space direction="vertical" style={{ width: '100%' }}>
|
||||
<ProCard extra={props.extra}>
|
||||
<ProDescriptions bordered>
|
||||
<ProDescriptions.Item label="项目名称" span={2}>
|
||||
<Space size="large">
|
||||
<div>
|
||||
{props?.item?.name}
|
||||
{props?.item?.alias_name
|
||||
? `(${props?.item?.alias_name})`
|
||||
: ''}
|
||||
</div>
|
||||
</Space>
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="绑定机构">
|
||||
<Space size="large">
|
||||
<div>{props?.item?.company?.name}</div>
|
||||
</Space>
|
||||
</ProDescriptions.Item>
|
||||
|
||||
<ProDescriptions.Item label="项目地址" span={2}>
|
||||
{props?.item?.province || ''}
|
||||
{props?.item?.city || ''}
|
||||
{props?.item?.district || ''}
|
||||
{props?.item?.address || ''}
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="项目类型">
|
||||
<renderTextHelper.Tag
|
||||
Enums={AssetProjectsPropertyTypeEnum}
|
||||
value={props?.item?.property_type}
|
||||
key="property_type"
|
||||
/>
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="项目状态">
|
||||
<renderTextHelper.Tag
|
||||
Enums={AssetProjectsStatusEnum}
|
||||
value={props?.item?.status}
|
||||
key="status"
|
||||
/>
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="委托类型">
|
||||
<renderTextHelper.Tag
|
||||
Enums={AssetProjectsEntrustTypeEnum}
|
||||
value={props?.item?.entrust_type}
|
||||
key="entrust_type"
|
||||
/>
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="收费方式">
|
||||
<renderTextHelper.Tag
|
||||
Enums={AssetProjectsChargeEnum}
|
||||
value={props?.item?.charge}
|
||||
key="charge"
|
||||
/>
|
||||
</ProDescriptions.Item>
|
||||
|
||||
<ProDescriptions.Item label="接管日期">
|
||||
{props?.item?.takeover_date}
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="封园日期">
|
||||
{props?.item?.closure_date}
|
||||
</ProDescriptions.Item>
|
||||
|
||||
{/* <ProDescriptions.Item label="创建日期">
|
||||
{props?.item?.created_at}
|
||||
</ProDescriptions.Item> */}
|
||||
<ProDescriptions.Item label="最近修改">
|
||||
{props?.item?.updated_at}
|
||||
</ProDescriptions.Item>
|
||||
</ProDescriptions>
|
||||
</ProCard>
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -70,18 +70,20 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
{props?.item?.asset_house?.full_name || '-'}
|
||||
</a>
|
||||
</ProDescriptions.Item>
|
||||
{/* <ProDescriptions.Item label="房屋状态">
|
||||
<renderTextHelper.Tag
|
||||
Enums={HouseRegistersHouseStatusEnum}
|
||||
value={props?.item?.house_status}
|
||||
/>
|
||||
</ProDescriptions.Item> */}
|
||||
<ProDescriptions.Item label="登记类型">
|
||||
<renderTextHelper.Tag
|
||||
Enums={HouseRegistersTypeEnum}
|
||||
value={props?.item?.type}
|
||||
/>
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="居住关系">
|
||||
<renderTextHelper.Tag
|
||||
Enums={HouseOccupantsResidentialRelationEnum}
|
||||
value={
|
||||
props?.item?.customer_info?.[0].residential_relation
|
||||
}
|
||||
/>
|
||||
</ProDescriptions.Item>
|
||||
<ProDescriptions.Item label="申请时间">
|
||||
{props?.item?.created_at || '-'}
|
||||
</ProDescriptions.Item>
|
||||
@ -100,20 +102,10 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
rowKey={(record, index) => record?.id_card || index}
|
||||
size="small"
|
||||
columns={[
|
||||
MyColumns.EnumTag({
|
||||
title: '居住关系',
|
||||
dataIndex: 'residential_relation',
|
||||
valueEnum: HouseOccupantsResidentialRelationEnum,
|
||||
}),
|
||||
// MyColumns.EnumTag({
|
||||
// title:
|
||||
// props?.item?.status === 'Rented'
|
||||
// ? '与主租人关系'
|
||||
// : '与产权人关系',
|
||||
// // title: '关系说明',
|
||||
// dataIndex: 'relation_with_owner',
|
||||
// valueEnum: HouseOccupantsRelationWithOwnerEnum,
|
||||
// search: false,
|
||||
// title: '居住关系',
|
||||
// dataIndex: 'residential_relation',
|
||||
// valueEnum: HouseOccupantsResidentialRelationEnum,
|
||||
// }),
|
||||
{
|
||||
title: '姓名',
|
||||
@ -159,7 +151,62 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
/>
|
||||
</ProCard>
|
||||
)}
|
||||
|
||||
{(props?.item?.type === 'UpdateInfo' ||
|
||||
props?.item?.type === 'UpdatePhone') && (
|
||||
<ProCard title="更新信息" size="small">
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
search={false}
|
||||
toolBarRender={false}
|
||||
pagination={false}
|
||||
dataSource={[props?.item?.update_info]}
|
||||
rowKey={(record, index) => record?.id_card || index}
|
||||
size="small"
|
||||
columns={[
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
},
|
||||
MyColumns.EnumTag({
|
||||
title: '证件类型',
|
||||
dataIndex: 'card_type',
|
||||
valueEnum: HouseOccupantsCardTypeEnum,
|
||||
}),
|
||||
{
|
||||
title: '证件号码',
|
||||
dataIndex: 'id_card',
|
||||
},
|
||||
{
|
||||
title: '证件资料',
|
||||
render: (_, item) => {
|
||||
return (
|
||||
<Space>
|
||||
{item?.card_front_image?.[0] && (
|
||||
<Image
|
||||
height={30}
|
||||
src={item?.card_front_image[0]?.url}
|
||||
placeholder="正面"
|
||||
/>
|
||||
)}
|
||||
{item?.card_back_image?.[0] && (
|
||||
<Image
|
||||
height={30}
|
||||
src={item?.card_back_image[0]?.url}
|
||||
placeholder="反面"
|
||||
/>
|
||||
)}
|
||||
</Space>
|
||||
);
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</ProCard>
|
||||
)}
|
||||
{props?.item?.type === 'AddOwner' &&
|
||||
props?.item?.ownership_info &&
|
||||
props?.item?.ownership_info?.length > 0 && (
|
||||
@ -170,7 +217,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
(res: any, index: number) => (
|
||||
<Image
|
||||
key={`${res?.name}_${index}`}
|
||||
height={60}
|
||||
height={30}
|
||||
src={res?.url || ''}
|
||||
placeholder="产证资料"
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user