Compare commits
No commits in common. "ac5c56c66b5fcf55f41f1cdb7f9ce81c83773c6b" and "6c3e5f1e16fbce8a18f4467779e7c994811dad41" have entirely different histories.
ac5c56c66b
...
6c3e5f1e16
@ -15,9 +15,8 @@ export default defineConfig({
|
|||||||
proxy: {
|
proxy: {
|
||||||
'/api/': {
|
'/api/': {
|
||||||
// target: 'http://yt:8003',
|
// target: 'http://yt:8003',
|
||||||
// target: 'http://10.39.13.80:8001',
|
target: 'http://10.39.13.80:8001',
|
||||||
// target: 'http://10.39.13.78:8001/',
|
// target: 'https://test-admin.linyikj.com.cn/',
|
||||||
target: 'https://test-admin.linyikj.com.cn/',
|
|
||||||
// target: 'http://we6f9c65.natappfree.cc',
|
// target: 'http://we6f9c65.natappfree.cc',
|
||||||
// target: 'https://loanos-test.nchl.net/',
|
// target: 'https://loanos-test.nchl.net/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"url": "http://10.39.13.78:8001/api/docs/openapi",
|
"url": "http://10.39.13.80:8001/api/docs/openapi",
|
||||||
"module": "Admin"
|
"module": "Admin"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { MyResponseType, renderTextHelper } from '@/common';
|
import { MyResponseType, renderTextHelper } from '@/common';
|
||||||
import { ProColumns } from '@ant-design/pro-components';
|
import { ProColumns } from '@ant-design/pro-components';
|
||||||
import { Image, Popconfirm, Switch, Tag } from 'antd';
|
import { Image, Popconfirm, Tag } from 'antd';
|
||||||
|
|
||||||
type ReturnType = ProColumns<Record<string, any>, 'text'>;
|
type ReturnType = ProColumns<Record<string, any>, 'text'>;
|
||||||
|
|
||||||
@ -50,21 +50,34 @@ export const MyColumns = {
|
|||||||
} & ReturnType): ReturnType {
|
} & ReturnType): ReturnType {
|
||||||
return {
|
return {
|
||||||
title: '启/禁用',
|
title: '启/禁用',
|
||||||
render: (_, item, index, action) => (
|
render: (_, item, index, action) =>
|
||||||
|
item?.deleted_at ? (
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title={item?.deleted_at ? '启用' : '禁用'}
|
title="启用"
|
||||||
description={item?.deleted_at ? '您确认启用吗?' : '您确认禁用吗?'}
|
description="您确认启用吗?"
|
||||||
onConfirm={() => {
|
onConfirm={() => {
|
||||||
if (item?.deleted_at) {
|
|
||||||
onRestore?.({ id: item.id }).then(() => action?.reload());
|
onRestore?.({ id: item.id }).then(() => action?.reload());
|
||||||
} else {
|
|
||||||
onSoftDelete?.({ id: item.id }).then(() => action?.reload());
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
okText="是"
|
okText="是"
|
||||||
cancelText="否"
|
cancelText="否"
|
||||||
>
|
>
|
||||||
<Switch checked={!item?.deleted_at} size="default" />
|
<Tag color="gray" style={{ cursor: 'pointer' }}>
|
||||||
|
已禁用
|
||||||
|
</Tag>
|
||||||
|
</Popconfirm>
|
||||||
|
) : (
|
||||||
|
<Popconfirm
|
||||||
|
title="禁用"
|
||||||
|
description="您确认禁用吗?"
|
||||||
|
onConfirm={() => {
|
||||||
|
onSoftDelete?.({ id: item.id }).then(() => action?.reload());
|
||||||
|
}}
|
||||||
|
okText="是"
|
||||||
|
cancelText="否"
|
||||||
|
>
|
||||||
|
<Tag color="green" style={{ cursor: 'pointer' }}>
|
||||||
|
已启用
|
||||||
|
</Tag>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
),
|
),
|
||||||
search: false,
|
search: false,
|
||||||
|
|||||||
@ -110,7 +110,7 @@ export const Selects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 网格单元下拉框
|
// 单元下拉框
|
||||||
GridUnits(props?: PropsType): ReturnType {
|
GridUnits(props?: PropsType): ReturnType {
|
||||||
const {
|
const {
|
||||||
title = '单元',
|
title = '单元',
|
||||||
@ -126,21 +126,18 @@ export const Selects = {
|
|||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
hideInTable: hideInTable,
|
hideInTable: hideInTable,
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
||||||
request: async (params) => {
|
request: async (params) =>
|
||||||
let res = await Apis.Asset.AssetUnits.GridSelect({
|
(
|
||||||
|
await Apis.Asset.AssetUnits.GridSelect({
|
||||||
keywords: params?.KeyWords,
|
keywords: params?.KeyWords,
|
||||||
asset_projects_id: params?.asset_projects_id,
|
asset_projects_id: params?.asset_projects_id,
|
||||||
|
asset_buildings_id: params?.asset_buildings_id,
|
||||||
...params,
|
...params,
|
||||||
});
|
})
|
||||||
res?.data?.map((l: any) => {
|
).data,
|
||||||
l.label = l.asset_building.name + l.label;
|
|
||||||
});
|
|
||||||
return res?.data;
|
|
||||||
},
|
|
||||||
...rest,
|
...rest,
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// mode: 'multiple',
|
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'label',
|
label: 'label',
|
||||||
value: 'value',
|
value: 'value',
|
||||||
@ -358,41 +355,6 @@ export const Selects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//机构收款账户
|
|
||||||
CompanyAccounts(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '收款账户',
|
|
||||||
key = 'receipt_accounts_id',
|
|
||||||
required = false,
|
|
||||||
hideInTable = true,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
request: async (params) =>
|
|
||||||
(
|
|
||||||
await Apis.Company.CompanyReceiptAccounts.Select({
|
|
||||||
keywords: params?.KeyWords,
|
|
||||||
...params,
|
|
||||||
})
|
|
||||||
).data,
|
|
||||||
...rest,
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: true,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'label',
|
|
||||||
value: 'value',
|
|
||||||
},
|
|
||||||
...rest?.fieldProps,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
//项目收款账户
|
|
||||||
ProjectAccounts(props?: PropsType): ReturnType {
|
ProjectAccounts(props?: PropsType): ReturnType {
|
||||||
const {
|
const {
|
||||||
title = '收款账户',
|
title = '收款账户',
|
||||||
|
|||||||
49
src/gen/ApiTypes.d.ts
vendored
49
src/gen/ApiTypes.d.ts
vendored
@ -71,25 +71,6 @@ declare namespace ApiTypes {
|
|||||||
type RemoveOwner = {
|
type RemoveOwner = {
|
||||||
"house_occupants_id": number; // 房客id
|
"house_occupants_id": number; // 房客id
|
||||||
};
|
};
|
||||||
type ChangeOccupant = {
|
|
||||||
"house_occupants_id": number; // 房客id
|
|
||||||
"type": string; // 类型,[enum:HouseRegistersTypeEnum
|
|
||||||
"update_info": string[]; // 要修改的信息
|
|
||||||
"update_info.name"?: string; // 客户姓名
|
|
||||||
"update_info.phone"?: string; // 客户手机号
|
|
||||||
"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 = {
|
type Show = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
@ -243,7 +224,7 @@ declare namespace ApiTypes {
|
|||||||
"charge"?: string; // 收费方式,[enum:AssetProjectsChargeEnum]
|
"charge"?: string; // 收费方式,[enum:AssetProjectsChargeEnum]
|
||||||
"takeover_date"?: Date; // 接管日期
|
"takeover_date"?: Date; // 接管日期
|
||||||
"closure_date"?: Date; // 封园日期
|
"closure_date"?: Date; // 封园日期
|
||||||
"company_property_brands_id"?: number; // 物业品牌id,[ref:company_property_brands]
|
"company_property_brands_id"?: string; // 物业品牌id,[ref:company_property_brands]
|
||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
@ -268,7 +249,7 @@ declare namespace ApiTypes {
|
|||||||
"charge"?: string; // 收费方式,[enum:AssetProjectsChargeEnum]
|
"charge"?: string; // 收费方式,[enum:AssetProjectsChargeEnum]
|
||||||
"takeover_date"?: Date; // 接管日期
|
"takeover_date"?: Date; // 接管日期
|
||||||
"closure_date"?: Date; // 封园日期
|
"closure_date"?: Date; // 封园日期
|
||||||
"company_property_brands_id"?: number; // 物业品牌id,[ref:company_property_brands]
|
"company_property_brands_id"?: string; // 物业品牌id,[ref:company_property_brands]
|
||||||
};
|
};
|
||||||
type BindCompany = {
|
type BindCompany = {
|
||||||
"projects_id": number; // 项目id
|
"projects_id": number; // 项目id
|
||||||
@ -537,8 +518,6 @@ declare namespace ApiTypes {
|
|||||||
namespace ConvenienceServices {
|
namespace ConvenienceServices {
|
||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
"asset_projects_id"?: number; // 项目ID
|
|
||||||
"project_name"?: string; // 项目名称
|
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_projects_id": number; // 项目ID
|
"asset_projects_id": number; // 项目ID
|
||||||
@ -734,8 +713,8 @@ declare namespace ApiTypes {
|
|||||||
}
|
}
|
||||||
namespace CompanyProjectReceiptAccounts {
|
namespace CompanyProjectReceiptAccounts {
|
||||||
type List = {
|
type List = {
|
||||||
"companies_id"?: number; // 所属机构id,[ref:companies]
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
"projects_id"?: number; // 所属项目id,[ref:asset_projects]
|
"projects_id": number; // 所属项目id,[ref:asset_projects]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"companies_id": number; // 所属机构id,[ref:companies]
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
@ -790,7 +769,7 @@ declare namespace ApiTypes {
|
|||||||
}
|
}
|
||||||
namespace CompanyReceiptAccounts {
|
namespace CompanyReceiptAccounts {
|
||||||
type List = {
|
type List = {
|
||||||
"company_name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
"companies_id"?: number; // 所属机构id,[ref:companies]
|
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
@ -824,10 +803,6 @@ declare namespace ApiTypes {
|
|||||||
type Delete = {
|
type Delete = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
type Select = {
|
|
||||||
"company_name"?: string; // 模糊搜索:名称
|
|
||||||
"companies_id"?: number; // 所属机构id,[ref:companies]
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
namespace Organizations {
|
namespace Organizations {
|
||||||
type List = {
|
type List = {
|
||||||
@ -895,20 +870,6 @@ 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 Grid {
|
||||||
namespace Grids {
|
namespace Grids {
|
||||||
type List = {
|
type List = {
|
||||||
|
|||||||
@ -45,9 +45,6 @@ export const Apis = {
|
|||||||
RemoveOwner(data: ApiTypes.Archive.HouseRegisters.RemoveOwner): Promise<MyResponseType> {
|
RemoveOwner(data: ApiTypes.Archive.HouseRegisters.RemoveOwner): Promise<MyResponseType> {
|
||||||
return request('admin/archive/house_registers/remove_owner', { data });
|
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> {
|
Show(data: ApiTypes.Archive.HouseRegisters.Show): Promise<MyResponseType> {
|
||||||
return request('admin/archive/house_registers/show', { data });
|
return request('admin/archive/house_registers/show', { data });
|
||||||
},
|
},
|
||||||
@ -421,7 +418,7 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
CompanyProjectReceiptAccounts: {
|
CompanyProjectReceiptAccounts: {
|
||||||
List(data?: ApiTypes.Company.CompanyProjectReceiptAccounts.List): Promise<MyResponseType> {
|
List(data: ApiTypes.Company.CompanyProjectReceiptAccounts.List): Promise<MyResponseType> {
|
||||||
return request('admin/company/company_project_receipt_accounts/list', { data });
|
return request('admin/company/company_project_receipt_accounts/list', { data });
|
||||||
},
|
},
|
||||||
Store(data: ApiTypes.Company.CompanyProjectReceiptAccounts.Store): Promise<MyResponseType> {
|
Store(data: ApiTypes.Company.CompanyProjectReceiptAccounts.Store): Promise<MyResponseType> {
|
||||||
@ -482,9 +479,6 @@ export const Apis = {
|
|||||||
Delete(data: ApiTypes.Company.CompanyReceiptAccounts.Delete): Promise<MyResponseType> {
|
Delete(data: ApiTypes.Company.CompanyReceiptAccounts.Delete): Promise<MyResponseType> {
|
||||||
return request('admin/company/company_receipt_accounts/delete', { data });
|
return request('admin/company/company_receipt_accounts/delete', { data });
|
||||||
},
|
},
|
||||||
Select(data?: ApiTypes.Company.CompanyReceiptAccounts.Select): Promise<MyResponseType> {
|
|
||||||
return request('admin/company/company_receipt_accounts/select', { data });
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Organizations: {
|
Organizations: {
|
||||||
List(data?: ApiTypes.Company.Organizations.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Company.Organizations.List): Promise<MyResponseType> {
|
||||||
@ -522,19 +516,6 @@ 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: {
|
Grid: {
|
||||||
Grids: {
|
Grids: {
|
||||||
List(data?: ApiTypes.Grid.Grids.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Grid.Grids.List): Promise<MyResponseType> {
|
||||||
|
|||||||
@ -126,7 +126,7 @@ export const BannersTypeEnum= {
|
|||||||
|
|
||||||
// 缓存类型
|
// 缓存类型
|
||||||
export const CacheTypeEnum= {
|
export const CacheTypeEnum= {
|
||||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#1f86c5","value":"MobilePhoneVerificationCode"},
|
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#5b3d89","value":"MobilePhoneVerificationCode"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
@ -189,12 +189,6 @@ export const CustomerBacklogsTypeEnum= {
|
|||||||
'ContractTodo': {"text":"合同待办","color":"#722ed1","value":"ContractTodo"},
|
'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= {
|
export const HouseBillsBillStatusEnum= {
|
||||||
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
||||||
@ -410,8 +404,6 @@ export const HouseRegistersTypeEnum= {
|
|||||||
'RemoveOccupant': {"text":"移除住户","color":"#fa8c16","value":"RemoveOccupant"},
|
'RemoveOccupant': {"text":"移除住户","color":"#fa8c16","value":"RemoveOccupant"},
|
||||||
'MoveOut': {"text":"搬离登记","color":"#f50","value":"MoveOut"},
|
'MoveOut': {"text":"搬离登记","color":"#f50","value":"MoveOut"},
|
||||||
'MoveIn': {"text":"搬入登记","color":"#ffc53d","value":"MoveIn"},
|
'MoveIn': {"text":"搬入登记","color":"#ffc53d","value":"MoveIn"},
|
||||||
'UpdateInfo': {"text":"修改信息","color":"#722ed1","value":"UpdateInfo"},
|
|
||||||
'UpdatePhone': {"text":"修改电话","color":"#13c2c2","value":"UpdatePhone"},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersUsagePlanEnum
|
// HouseRegistersUsagePlanEnum
|
||||||
|
|||||||
@ -13,12 +13,12 @@ import AnnouncementCreate from './modals/AnnouncementCreate';
|
|||||||
import AnnouncementShow from './modals/AnnouncementShow';
|
import AnnouncementShow from './modals/AnnouncementShow';
|
||||||
import AnnouncementUpdate from './modals/AnnouncementUpdate';
|
import AnnouncementUpdate from './modals/AnnouncementUpdate';
|
||||||
|
|
||||||
export default function Index({ title = '项目公告' }) {
|
export default function Index({ title = '公告管理' }) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
// 注册当前页面为标签页
|
||||||
usePageTabs({
|
usePageTabs({
|
||||||
tabKey: 'msg-property-announcements',
|
tabKey: 'Msg',
|
||||||
tabLabel: title,
|
tabLabel: title,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
title={title}
|
title={title}
|
||||||
enableTabs={true}
|
enableTabs={true}
|
||||||
tabKey="msg-property-announcements"
|
tabKey="banners"
|
||||||
tabLabel={title}
|
tabLabel={title}
|
||||||
>
|
>
|
||||||
<ProTable
|
<ProTable
|
||||||
@ -40,23 +40,16 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<AnnouncementCreate
|
<AnnouncementCreate
|
||||||
key="Select"
|
key="Create"
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
title={title}
|
title={title}
|
||||||
/>,
|
/>,
|
||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '关联项目',
|
title: '标题',
|
||||||
dataIndex: ['asset_project', 'name'],
|
|
||||||
search: false,
|
|
||||||
render: (_, record) => {
|
|
||||||
return record?.asset_project?.name;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '公告标题',
|
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽)
|
width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽)
|
||||||
render: (text) => (
|
render: (text) => (
|
||||||
@ -76,7 +69,7 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '公告内容',
|
title: '内容',
|
||||||
dataIndex: 'content',
|
dataIndex: 'content',
|
||||||
valueType: 'textarea', // 仅影响表单编辑时的输入类型,不影响表格展示
|
valueType: 'textarea', // 仅影响表单编辑时的输入类型,不影响表格展示
|
||||||
search: false,
|
search: false,
|
||||||
@ -104,10 +97,12 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '是否发布小程序',
|
title: '项目',
|
||||||
dataIndex: 'is_publish',
|
dataIndex: ['asset_project', 'name'],
|
||||||
render: (text) => (text ? '是' : '否'),
|
|
||||||
search: false,
|
search: false,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.asset_project?.name;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
MyColumns.SoftDelete({
|
MyColumns.SoftDelete({
|
||||||
title: '启/禁用',
|
title: '启/禁用',
|
||||||
@ -121,6 +116,9 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
valueType: 'date',
|
valueType: 'date',
|
||||||
search: false,
|
search: false,
|
||||||
|
// render: (_, record) => {
|
||||||
|
// return record?.created_at?.substring(0, 10);
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
@ -129,7 +127,7 @@ export default function Index({ title = '项目公告' }) {
|
|||||||
<AnnouncementUpdate
|
<AnnouncementUpdate
|
||||||
item={item}
|
item={item}
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
// title={title}
|
title={title}
|
||||||
/>
|
/>
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
85
src/pages/announcement/modals/AnnouncementCreate.tsx
Normal file
85
src/pages/announcement/modals/AnnouncementCreate.tsx
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Msg.MsgPropertyAnnouncements.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`添加公告`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="600px"
|
||||||
|
trigger={<MyButtons.Create title={`添加公告`} />}
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Msg.MsgPropertyAnnouncements.Store(values)
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('添加公告内容成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
key: 'title',
|
||||||
|
title: '公告标题',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'content',
|
||||||
|
title: '公告内容',
|
||||||
|
valueType: 'textarea',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
autoSize: { minRows: 4, maxRows: 6 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'publish_at',
|
||||||
|
title: '内容显示的发布日期',
|
||||||
|
valueType: 'date',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
Selects?.AssetProjects({
|
||||||
|
title: '请选择项目',
|
||||||
|
key: 'asset_projects_id',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'sort',
|
||||||
|
title: '排序',
|
||||||
|
valueType: 'digit',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
tooltip: '数值越大越靠前',
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: '数值越大越靠前',
|
||||||
|
min: 0,
|
||||||
|
style: { width: '100%' },
|
||||||
|
},
|
||||||
|
initialValue: 0,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
53
src/pages/announcement/modals/AnnouncementShow.tsx
Normal file
53
src/pages/announcement/modals/AnnouncementShow.tsx
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { MyBetaModalFormProps } from '@/common';
|
||||||
|
import { MyModal } from '@/components/MyModal';
|
||||||
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Typography } from 'antd';
|
||||||
|
|
||||||
|
const { Text } = Typography;
|
||||||
|
|
||||||
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<MyModal
|
||||||
|
title={props.title || '查看'}
|
||||||
|
// width="40vw"
|
||||||
|
width={600}
|
||||||
|
// style={{ maxWidth: '650px' }}
|
||||||
|
node={
|
||||||
|
<ProCard>
|
||||||
|
<ProDescriptions
|
||||||
|
// bordered
|
||||||
|
// column={{ xs: 1, sm: 2, md: 3 }}
|
||||||
|
column={1}
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<ProDescriptions.Item label="公告标题">
|
||||||
|
{props?.item?.title || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
|
<ProDescriptions.Item label="公告内容">
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
whiteSpace: 'pre-wrap',
|
||||||
|
maxHeight: '300px',
|
||||||
|
overflow: 'auto',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{props?.item?.content || '-'}
|
||||||
|
</div>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
|
<ProDescriptions.Item label="发布日期">
|
||||||
|
{props?.item?.publish_at || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label=" 关联项目">
|
||||||
|
{props?.item?.asset_project?.name || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="创建时间">
|
||||||
|
{props?.item?.created_at || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
95
src/pages/announcement/modals/AnnouncementUpdate.tsx
Normal file
95
src/pages/announcement/modals/AnnouncementUpdate.tsx
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
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.Msg.MsgPropertyAnnouncements.Update>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`编辑公告内容`}
|
||||||
|
trigger={<MyButtons.Edit />}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="600px"
|
||||||
|
key={new Date().getTime()}
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open && props.item) {
|
||||||
|
form.setFieldsValue(props.item);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Msg.MsgPropertyAnnouncements.Update({
|
||||||
|
...values,
|
||||||
|
id: props.item?.id ?? 0,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('编辑公告内容成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
key: 'title',
|
||||||
|
title: '公告标题',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'content',
|
||||||
|
title: '公告内容',
|
||||||
|
valueType: 'textarea',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
autoSize: { minRows: 4, maxRows: 6 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'publish_at',
|
||||||
|
title: '内容显示的发布日期',
|
||||||
|
valueType: 'date',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
Selects?.AssetProjects({
|
||||||
|
title: '请选择项目',
|
||||||
|
key: 'asset_projects_id',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
// {
|
||||||
|
// key: 'is_publish',
|
||||||
|
// title: '是否立刻发布',
|
||||||
|
// valueType: 'switch',
|
||||||
|
// colProps: { span: 8 },
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
key: 'sort',
|
||||||
|
title: '排序',
|
||||||
|
valueType: 'digit',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
tooltip: '数值越大越靠前',
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: '数值越大越靠前',
|
||||||
|
min: 0,
|
||||||
|
style: { width: '100%' },
|
||||||
|
},
|
||||||
|
initialValue: 0,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -10,12 +10,10 @@ import { Popconfirm, Space, Tag } from 'antd';
|
|||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import Delivery from '../modals/Delivery';
|
import Delivery from '../modals/Delivery';
|
||||||
import AddOccupant from './modals/AddOccupant';
|
import AddOccupant from './modals/AddOccupant';
|
||||||
import ChangePhone from './modals/ChangePhone';
|
|
||||||
import MoveIn from './modals/MoveIn';
|
import MoveIn from './modals/MoveIn';
|
||||||
import MoveOut from './modals/MoveOut';
|
import MoveOut from './modals/MoveOut';
|
||||||
import OccupantShow from './modals/OccupantShow';
|
import OccupantShow from './modals/OccupantShow';
|
||||||
import OccupantsUpdate from './modals/OccupantsUpdate';
|
import OccupantsUpdate from './modals/OccupantsUpdate';
|
||||||
import OwnerUpdate from './modals/OwnerUpdate';
|
|
||||||
import RemoveOwner from './modals/RemoveOwner';
|
import RemoveOwner from './modals/RemoveOwner';
|
||||||
import Transfer from './modals/Transfer';
|
import Transfer from './modals/Transfer';
|
||||||
|
|
||||||
@ -154,16 +152,8 @@ export default function Index({ ...rest }) {
|
|||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<OccupantShow item={item} reload={action?.reload} />
|
<OccupantShow item={item} reload={action?.reload} />
|
||||||
{item?.house_relation !==
|
|
||||||
HouseOccupantsHouseRelationEnum.NonOwner.value && (
|
|
||||||
<OwnerUpdate item={item} reload={action?.reload} />
|
|
||||||
)}
|
|
||||||
{item?.house_relation ===
|
|
||||||
HouseOccupantsHouseRelationEnum.NonOwner.value && (
|
|
||||||
<OccupantsUpdate item={item} reload={action?.reload} />
|
<OccupantsUpdate item={item} reload={action?.reload} />
|
||||||
)}
|
{!item?.is_live_in && (
|
||||||
<ChangePhone item={item} reload={action?.reload} />
|
|
||||||
{!item?.move_in_date && (
|
|
||||||
<MoveIn item={item} reload={action?.reload} title="入住" />
|
<MoveIn item={item} reload={action?.reload} title="入住" />
|
||||||
)}
|
)}
|
||||||
{item?.move_in_date && (
|
{item?.move_in_date && (
|
||||||
|
|||||||
@ -1,59 +0,0 @@
|
|||||||
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 },
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,106 +0,0 @@
|
|||||||
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 },
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -4,15 +4,15 @@ import { ProCard } from '@ant-design/pro-components';
|
|||||||
import { useParams } from '@umijs/max';
|
import { useParams } from '@umijs/max';
|
||||||
import { Space, Tabs } from 'antd';
|
import { Space, Tabs } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import Announcement from '../components/Announcement';
|
import Announcement from './components/Announcement';
|
||||||
import AssetAccounts from '../components/AssetAccounts';
|
import AssetAccounts from './components/AssetAccounts';
|
||||||
import MyAssetBuildings from '../components/AssetBuildings';
|
import MyAssetBuildings from './components/AssetBuildings';
|
||||||
import AssetGrid from '../components/AssetGrid';
|
import AssetGrid from './components/AssetGrid';
|
||||||
import AssetInfo from '../components/AssetInfo';
|
import AssetInfo from './components/AssetInfo';
|
||||||
import ChargeStandard from '../components/ChargeStandard';
|
import ChargeStandard from './components/ChargeStandard';
|
||||||
import ConvenienceServices from '../components/ConvenienceServices';
|
import ConvenienceServices from './components/ConvenienceServices';
|
||||||
import BindCompany from '../components/modals/BindCompany';
|
import BindCompany from './components/modals/BindCompany';
|
||||||
import AssetUpdate from '../modals/AssetUpdate';
|
import AssetUpdate from './modals/AssetUpdate';
|
||||||
|
|
||||||
export default function Show({ title }: { title?: string } = {}) {
|
export default function Show({ title }: { title?: string } = {}) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
@ -1,88 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import AccountsGet from './modals/AccountsGet';
|
|
||||||
|
|
||||||
export default function Index({ title = '项目账户' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'company-project-receipt-accounts',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="company-apps"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.Company.CompanyProjectReceiptAccounts.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<AccountsGet key="Select" reload={action?.reload} title={title} />,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
dataIndex: 'id',
|
|
||||||
// width: 360,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '收款账号名称',
|
|
||||||
dataIndex: ['receipt_account', 'company_name'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '开户行',
|
|
||||||
dataIndex: ['receipt_account', 'company_bank'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '收款账号',
|
|
||||||
dataIndex: ['receipt_account', 'company_account'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '是否默认',
|
|
||||||
// dataIndex: 'is_default',
|
|
||||||
// search: false,
|
|
||||||
// render(_, record) {
|
|
||||||
// return `${record?.is_default ? '是' : '否'} `;
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.CompanyProjectReceiptAccounts.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyModalFormProps,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
|
||||||
import { Form, message } from 'antd';
|
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<BetaSchemaForm<ApiTypes.Company.CompanyProjectReceiptAccounts.Store>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
form={form}
|
|
||||||
title={`${props.title}`}
|
|
||||||
wrapperCol={{ span: 24 }}
|
|
||||||
width="500px"
|
|
||||||
trigger={
|
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'middle'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open) {
|
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
key={new Date().getTime()}
|
|
||||||
onFinish={async (values) =>
|
|
||||||
Apis.Company.CompanyProjectReceiptAccounts.Store({
|
|
||||||
...values,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
props.reload?.();
|
|
||||||
message.success(props.title + '成功');
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false)
|
|
||||||
}
|
|
||||||
columns={[
|
|
||||||
Selects?.Companies({
|
|
||||||
key: 'companies_id',
|
|
||||||
title: '选择机构',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.number },
|
|
||||||
}),
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
key: 'projects_id',
|
|
||||||
title: '选择项目',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.number },
|
|
||||||
}),
|
|
||||||
Selects?.CompanyAccounts({
|
|
||||||
key: 'receipt_accounts_id',
|
|
||||||
title: '选择收款账户',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.number },
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -3,9 +3,9 @@ import { Apis } from '@/gen/Apis';
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import AnnouncementCreate from '../../announcement/modals/AnnouncementCreate';
|
import AnnouncementCreate from './modals/AnnouncementCreate';
|
||||||
import AnnouncementShow from '../../announcement/modals/AnnouncementShow';
|
import AnnouncementShow from './modals/AnnouncementShow';
|
||||||
import AnnouncementUpdate from '../../announcement/modals/AnnouncementUpdate';
|
import AnnouncementUpdate from './modals/AnnouncementUpdate';
|
||||||
|
|
||||||
export default function Index({ ...rest }) {
|
export default function Index({ ...rest }) {
|
||||||
const actionLooks = useRef<any>();
|
const actionLooks = useRef<any>();
|
||||||
@ -35,6 +35,7 @@ export default function Index({ ...rest }) {
|
|||||||
search={false}
|
search={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '公告标题',
|
title: '公告标题',
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
@ -7,7 +7,7 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import AccountsSelect from '../../accounts/modals/AccountsSelect';
|
import AssetAccountsSelect from './modals/AssetAccountsSelect';
|
||||||
|
|
||||||
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -27,7 +27,7 @@ export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<AccountsSelect
|
<AssetAccountsSelect
|
||||||
key="Select"
|
key="Select"
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
item={props?.item}
|
item={props?.item}
|
||||||
@ -13,12 +13,12 @@ import {
|
|||||||
import { ProCard, ProTable } from '@ant-design/pro-components';
|
import { ProCard, ProTable } from '@ant-design/pro-components';
|
||||||
import { Alert, message, Space, Typography } from 'antd';
|
import { Alert, message, Space, Typography } from 'antd';
|
||||||
import { useCallback, useRef, useState } from 'react';
|
import { useCallback, useRef, useState } from 'react';
|
||||||
import BuildingsCreate from '../../houses/modals/BuildingsCreate';
|
import BuildingsCreate from './modals/BuildingsCreate';
|
||||||
import AssetBuildingsUpdate from '../../houses/modals/BuildingsUpdate';
|
import AssetBuildingsUpdate from './modals/BuildingsUpdate';
|
||||||
import HousesCreate from '../../houses/modals/HousesCreate';
|
import HousesCreate from './modals/HousesCreate';
|
||||||
import HousesUpdate from '../../houses/modals/HousesUpdate';
|
import HousesUpdate from './modals/HousesUpdate';
|
||||||
import AssetUnitsCreate from '../../houses/modals/UnitsCreate';
|
import AssetUnitsCreate from './modals/UnitsCreate';
|
||||||
import AssetUnitsUpdate from '../../houses/modals/UnitsUpdate';
|
import AssetUnitsUpdate from './modals/UnitsUpdate';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title } = Typography;
|
||||||
|
|
||||||
@ -3,9 +3,9 @@ import { Apis } from '@/gen/Apis';
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import GridCreate from '../../grids/modals/GridCreate';
|
import GridCreate from './modals/GridCreate';
|
||||||
import GridMannger from '../../grids/modals/GridMannger';
|
import GridMannger from './modals/GridMannger';
|
||||||
import GridCreateUpdate from '../../grids/modals/GridUpdate';
|
import GridCreateUpdate from './modals/GridUpdate';
|
||||||
|
|
||||||
export default function Index({ ...rest }) {
|
export default function Index({ ...rest }) {
|
||||||
const actionLooks = useRef<any>();
|
const actionLooks = useRef<any>();
|
||||||
@ -26,12 +26,7 @@ export default function Index({ ...rest }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<GridCreate
|
<GridCreate key="Create" item={rest.item} reload={action?.reload} />,
|
||||||
key="Create"
|
|
||||||
item={rest.item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="楼栋划分"
|
|
||||||
/>,
|
|
||||||
]}
|
]}
|
||||||
search={false}
|
search={false}
|
||||||
columns={[
|
columns={[
|
||||||
@ -29,7 +29,7 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
</div>
|
</div>
|
||||||
</Space>
|
</Space>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="关联机构">
|
<ProDescriptions.Item label="绑定机构">
|
||||||
<Space size="large">
|
<Space size="large">
|
||||||
<div>{props?.item?.company?.name}</div>
|
<div>{props?.item?.company?.name}</div>
|
||||||
</Space>
|
</Space>
|
||||||
@ -4,8 +4,8 @@ import { ConvenienceServicesTypeEnum } from '@/gen/Enums';
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import ServiceCreate from '../../convenience_services/modals/ServiceCreate';
|
import ServiceCreate from './modals/ServiceCreate';
|
||||||
import ServiceUpdate from '../../convenience_services/modals/ServiceUpdate';
|
import ServiceUpdate from './modals/ServiceUpdate';
|
||||||
|
|
||||||
export default function Index({ ...rest }) {
|
export default function Index({ ...rest }) {
|
||||||
const actionLooks = useRef<any>();
|
const actionLooks = useRef<any>();
|
||||||
@ -4,7 +4,6 @@ import {
|
|||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
@ -28,7 +27,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Msg.MsgPropertyAnnouncements.Store({
|
Apis.Msg.MsgPropertyAnnouncements.Store({
|
||||||
...values,
|
...values,
|
||||||
asset_projects_id: values?.asset_projects_id || props.item?.id,
|
asset_projects_id: props.item?.id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -38,16 +37,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
key: 'asset_projects_id',
|
|
||||||
title: '关联项目',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
{
|
{
|
||||||
key: 'title',
|
key: 'title',
|
||||||
title: '公告标题',
|
title: '公告标题',
|
||||||
@ -68,7 +68,7 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
<MyButtons.Create
|
<MyButtons.Create
|
||||||
title="确定添加"
|
title="确定添加"
|
||||||
type="primary"
|
type="primary"
|
||||||
key="create"
|
key="create2"
|
||||||
onClick={() => onShowContactPhone()}
|
onClick={() => onShowContactPhone()}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -18,12 +18,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title={`${props.title}`}
|
title={`${props.title}`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
trigger={
|
trigger={<MyButtons.Create title={`${props.title}`} />}
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'middle'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open) {
|
if (open) {
|
||||||
form.resetFields(); // 清空表单数据
|
form.resetFields(); // 清空表单数据
|
||||||
154
src/pages/asset/components/modals/GridCreate.tsx
Normal file
154
src/pages/asset/components/modals/GridCreate.tsx
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
console.log(props?.item, 'item');
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Grid.Grids.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`划分范围`}
|
||||||
|
// 基本表单
|
||||||
|
width="700px"
|
||||||
|
layout="horizontal"
|
||||||
|
labelCol={{ span: 4 }}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
labelAlign="right"
|
||||||
|
trigger={<MyButtons.Create title={`划分范围`} />}
|
||||||
|
form={form}
|
||||||
|
key={new Date().getTime()}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values: any) => {
|
||||||
|
values?.grid_ranges?.forEach((res: { asset_projects_id: string }) => {
|
||||||
|
res.asset_projects_id = props?.item?.id;
|
||||||
|
});
|
||||||
|
return Apis.Grid.Grids.Store({
|
||||||
|
...values,
|
||||||
|
asset_projects_id: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('范围划分成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false);
|
||||||
|
}}
|
||||||
|
columns={[
|
||||||
|
Selects?.GetGridMark({
|
||||||
|
key: 'grid_mark',
|
||||||
|
title: '范围标识',
|
||||||
|
params: {
|
||||||
|
asset_projects_id: props?.item?.id,
|
||||||
|
},
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'grid_ranges',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
initialValue: [''],
|
||||||
|
formItemProps: { ...rulesHelper.array },
|
||||||
|
fieldProps: {
|
||||||
|
copyIconProps: false,
|
||||||
|
creatorButtonProps: {
|
||||||
|
creatorButtonText: '添加楼栋单元',
|
||||||
|
},
|
||||||
|
itemRender: (
|
||||||
|
{ listDom, action }: any,
|
||||||
|
{ index }: { index: number },
|
||||||
|
) => {
|
||||||
|
return (
|
||||||
|
<ProCard
|
||||||
|
bordered
|
||||||
|
style={{ marginBlockEnd: 5 }}
|
||||||
|
title={`选择范围${index + 1}`}
|
||||||
|
extra={action}
|
||||||
|
bodyStyle={{ paddingBlockEnd: 0 }}
|
||||||
|
>
|
||||||
|
{listDom}
|
||||||
|
</ProCard>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'dependency',
|
||||||
|
name: ['asset_buildings_id', 'asset_units_id'],
|
||||||
|
columns: ({ asset_buildings_id }) => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
Selects?.AssetBuildings({
|
||||||
|
key: 'asset_buildings_id',
|
||||||
|
title: '选择楼栋',
|
||||||
|
params: {
|
||||||
|
asset_projects_id: props?.item?.id,
|
||||||
|
},
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
onChange: (value: any) => {
|
||||||
|
// 获取当前表单的所有值
|
||||||
|
const formValues = form.getFieldsValue();
|
||||||
|
const gridRanges = formValues.grid_ranges || [];
|
||||||
|
|
||||||
|
// 清空所有行的asset_units_id,因为楼栋变化会影响所有单元选择
|
||||||
|
const updatedGridRanges = gridRanges.map(
|
||||||
|
(item: any, index: number) => {
|
||||||
|
if (item.asset_buildings_id === value) {
|
||||||
|
return { ...item, asset_units_id: undefined };
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
// 更新表单值
|
||||||
|
form.setFieldsValue({
|
||||||
|
grid_ranges: updatedGridRanges,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
...(asset_buildings_id
|
||||||
|
? [
|
||||||
|
Selects?.GridUnits({
|
||||||
|
key: 'asset_units_id',
|
||||||
|
title: '选择单元',
|
||||||
|
params: {
|
||||||
|
asset_projects_id: props?.item?.id,
|
||||||
|
asset_buildings_id: asset_buildings_id,
|
||||||
|
},
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -23,12 +23,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title={`添加${props.title}`}
|
title={`添加${props.title}`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="800px"
|
||||||
trigger={
|
trigger={<MyButtons.Create title={`${props.title}`} />}
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'mindde'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
form={form}
|
form={form}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
@ -24,7 +24,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="800px"
|
||||||
trigger={
|
trigger={
|
||||||
<MyButtons.Default title={props.title} size="small" type="link" />
|
<MyButtons.Default title={props.title} size="small" type="primary" />
|
||||||
}
|
}
|
||||||
form={form}
|
form={form}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
@ -5,7 +5,6 @@ import {
|
|||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ConvenienceServicesTypeEnum } from '@/gen/Enums';
|
import { ConvenienceServicesTypeEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
@ -38,7 +37,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
type: values.type,
|
type: values.type,
|
||||||
name: service.name,
|
name: service.name,
|
||||||
content: service.content,
|
content: service.content,
|
||||||
asset_projects_id: values.asset_projects_id || props.item?.id,
|
asset_projects_id: props.item?.id,
|
||||||
} as any);
|
} as any);
|
||||||
}
|
}
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -50,16 +49,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
key: 'asset_projects_id',
|
|
||||||
title: '关联项目',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '类型',
|
title: '类型',
|
||||||
@ -21,12 +21,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title={`添加${props.title}`}
|
title={`添加${props.title}`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="700px"
|
width="700px"
|
||||||
trigger={
|
trigger={<MyButtons.Create title={`${props.title}`} />}
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'middle'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
form={form}
|
form={form}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
@ -1,111 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ConvenienceServicesTypeEnum } from '@/gen/Enums';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import ServiceCreate from './modals/ServiceCreate';
|
|
||||||
import ServiceUpdate from './modals/ServiceUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '便民服务' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'convenience-services',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="convenience-services"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.Common.ConvenienceServices.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<ServiceCreate key="Select" reload={action?.reload} title={title} />,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID(),
|
|
||||||
{
|
|
||||||
title: '关联项目',
|
|
||||||
dataIndex: ['asset_project', 'name'],
|
|
||||||
search: {
|
|
||||||
transform: (value) => {
|
|
||||||
return { project_name: value };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '类型',
|
|
||||||
dataIndex: 'type',
|
|
||||||
valueEnum: ConvenienceServicesTypeEnum,
|
|
||||||
search: false,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '服务名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: '联系方式',
|
|
||||||
render(_, record) {
|
|
||||||
const content = record?.content || [];
|
|
||||||
|
|
||||||
// 过滤有效数据
|
|
||||||
const validItems = content.filter(
|
|
||||||
(item: any) => item?.name && item?.phone,
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{ lineHeight: '1.6' }}>
|
|
||||||
{validItems.length > 0 ? (
|
|
||||||
validItems.map((item: any, index: number) => (
|
|
||||||
// 每个客户信息单独一行
|
|
||||||
<div key={index}>
|
|
||||||
{item.name}: {item.phone}
|
|
||||||
</div>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<span>暂无客户信息</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<ServiceUpdate item={item} reload={action?.reload} />
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Common.ConvenienceServices.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import GridCreate from './modals/GridCreate';
|
|
||||||
import GridMannger from './modals/GridMannger';
|
|
||||||
import GridUpdate from './modals/GridUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '楼栋范围' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'grids',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="grids"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(params, sort, Apis.Grid.Grids.List)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<GridCreate key="Select" reload={action?.reload} title="楼栋划分" />,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: '关联项目',
|
|
||||||
dataIndex: ['asset_project', 'name'],
|
|
||||||
search: {
|
|
||||||
transform: (value) => {
|
|
||||||
return { project_name: value };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
dataIndex: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '板块名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '标识',
|
|
||||||
dataIndex: 'grid_mark',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '楼栋管家',
|
|
||||||
dataIndex: ['company_employee', 'name'],
|
|
||||||
render: (_, item: any) =>
|
|
||||||
`${item?.company_employee?.name || ''}-${
|
|
||||||
item?.company_employee?.phone || ''
|
|
||||||
}`,
|
|
||||||
},
|
|
||||||
// MyColumns.CreatedAt(),
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<GridUpdate item={item} reload={action?.reload} />
|
|
||||||
<GridMannger item={item} reload={action?.reload} />
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Grid.Grids.Delete({ id: item.id }).then(() =>
|
|
||||||
action?.reload(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,216 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyModalFormProps,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
|
||||||
import { Form, message } from 'antd';
|
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
const [transferData, setTransferData] = useState<any[]>([]);
|
|
||||||
const [targetKeys, setTargetKeys] = useState<string[]>([]);
|
|
||||||
|
|
||||||
// 获取Transfer数据源
|
|
||||||
// useEffect(() => {
|
|
||||||
// const asset_projects_id = props?.item?.id || 0;
|
|
||||||
// if (asset_projects_id) {
|
|
||||||
// Apis.Asset.AssetUnits.GridSelect({ asset_projects_id })
|
|
||||||
// .then((res) => {
|
|
||||||
// const data =
|
|
||||||
// res.data?.map((item: any) => ({
|
|
||||||
// key: item.value?.toString(),
|
|
||||||
// title: item.label,
|
|
||||||
// description: item.label,
|
|
||||||
// })) || [];
|
|
||||||
// setTransferData(data);
|
|
||||||
// })
|
|
||||||
// .catch(() => {
|
|
||||||
// setTransferData([]);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }, [props?.item?.id]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<BetaSchemaForm<ApiTypes.Grid.Grids.Store>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
title={`范围添加`}
|
|
||||||
width="700px"
|
|
||||||
layout="horizontal"
|
|
||||||
labelCol={{ span: 4 }}
|
|
||||||
wrapperCol={{ span: 24 }}
|
|
||||||
labelAlign="right"
|
|
||||||
trigger={
|
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'middle'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
form={form}
|
|
||||||
key={new Date().getTime()}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open) {
|
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
form.setFieldsValue({
|
|
||||||
asset_projects_id: props?.item?.id,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values: any) => {
|
|
||||||
(values.asset_projects_id =
|
|
||||||
values?.asset_projects_id || props?.item?.id),
|
|
||||||
values?.grid_ranges?.map((res: { asset_projects_id: string }) => {
|
|
||||||
res.asset_projects_id = props?.item?.id;
|
|
||||||
});
|
|
||||||
return Apis.Grid.Grids.Store({
|
|
||||||
...values,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
props.reload?.();
|
|
||||||
message.success('网格添加成功');
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false);
|
|
||||||
}}
|
|
||||||
columns={[
|
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
key: 'asset_projects_id',
|
|
||||||
title: '选择项目',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
|
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['asset_projects_id'],
|
|
||||||
columns: ({ asset_projects_id }) => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
columns: [
|
|
||||||
Selects?.GetGridMark({
|
|
||||||
key: 'grid_mark',
|
|
||||||
title: '范围标识',
|
|
||||||
params: {
|
|
||||||
asset_projects_id:
|
|
||||||
asset_projects_id || props?.item?.id || 0,
|
|
||||||
},
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
valueType: 'formList',
|
|
||||||
dataIndex: 'grid_ranges',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
initialValue: [''],
|
|
||||||
formItemProps: { ...rulesHelper.array },
|
|
||||||
fieldProps: {
|
|
||||||
copyIconProps: false,
|
|
||||||
creatorButtonProps: {
|
|
||||||
creatorButtonText: '添加楼栋单元',
|
|
||||||
},
|
|
||||||
itemRender: (
|
|
||||||
{ listDom, action }: any,
|
|
||||||
{ index }: { index: number },
|
|
||||||
) => {
|
|
||||||
return (
|
|
||||||
<ProCard
|
|
||||||
bordered
|
|
||||||
style={{ marginBlockEnd: 5 }}
|
|
||||||
title={`选择范围${index + 1}`}
|
|
||||||
extra={action}
|
|
||||||
bodyStyle={{ paddingBlockEnd: 0 }}
|
|
||||||
>
|
|
||||||
{listDom}
|
|
||||||
</ProCard>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['asset_buildings_id', 'asset_units_id'],
|
|
||||||
columns: ({ asset_buildings_id }) => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
columns: [
|
|
||||||
Selects?.AssetBuildings({
|
|
||||||
key: 'asset_buildings_id',
|
|
||||||
title: '选择楼栋',
|
|
||||||
params: {
|
|
||||||
asset_projects_id: props?.item?.id,
|
|
||||||
},
|
|
||||||
colProps: { span: 12 },
|
|
||||||
formItemProps: { ...rulesHelper.number },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: true,
|
|
||||||
onChange: (value: any) => {
|
|
||||||
// 获取当前表单的所有值
|
|
||||||
const formValues = form.getFieldsValue();
|
|
||||||
const gridRanges =
|
|
||||||
formValues.grid_ranges || [];
|
|
||||||
|
|
||||||
// 清空所有行的asset_units_id,因为楼栋变化会影响所有单元选择
|
|
||||||
const updatedGridRanges = gridRanges.map(
|
|
||||||
(item: any, index: number) => {
|
|
||||||
if (
|
|
||||||
item.asset_buildings_id === value
|
|
||||||
) {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
asset_units_id: undefined,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return item;
|
|
||||||
},
|
|
||||||
);
|
|
||||||
// 更新表单值
|
|
||||||
form.setFieldsValue({
|
|
||||||
grid_ranges: updatedGridRanges,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
...(asset_buildings_id
|
|
||||||
? [
|
|
||||||
Selects?.GridUnits({
|
|
||||||
key: 'asset_units_id',
|
|
||||||
title: '选择单元',
|
|
||||||
params: {
|
|
||||||
asset_projects_id: props?.item?.id,
|
|
||||||
asset_buildings_id:
|
|
||||||
asset_buildings_id,
|
|
||||||
},
|
|
||||||
colProps: { span: 12 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]
|
|
||||||
: []),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,157 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyModalFormProps,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
|
||||||
import { Form, message } from 'antd';
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
const [transferData, setTransferData] = useState<any[]>([]);
|
|
||||||
const [targetKeys, setTargetKeys] = useState<string[]>([]);
|
|
||||||
|
|
||||||
// 获取Transfer数据源
|
|
||||||
useEffect(() => {
|
|
||||||
const asset_projects_id = props?.item?.id || 0;
|
|
||||||
if (asset_projects_id) {
|
|
||||||
Apis.Asset.AssetUnits.GridSelect({ asset_projects_id })
|
|
||||||
.then((res) => {
|
|
||||||
const data =
|
|
||||||
res.data?.map((item: any) => ({
|
|
||||||
key: item.value?.toString(),
|
|
||||||
title: item.label,
|
|
||||||
description: item.label,
|
|
||||||
})) || [];
|
|
||||||
setTransferData(data);
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
setTransferData([]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, [props?.item?.id]);
|
|
||||||
|
|
||||||
console.log(props.item, 'pppp');
|
|
||||||
return (
|
|
||||||
<BetaSchemaForm<ApiTypes.Grid.Grids.Store>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
title={`范围添加`}
|
|
||||||
width="700px"
|
|
||||||
layout="horizontal"
|
|
||||||
labelCol={{ span: 4 }}
|
|
||||||
wrapperCol={{ span: 24 }}
|
|
||||||
labelAlign="right"
|
|
||||||
trigger={
|
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'middle'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
form={form}
|
|
||||||
key={new Date().getTime()}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open) {
|
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
form.setFieldsValue({
|
|
||||||
asset_projects_id: props?.item?.id,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values: any) => {
|
|
||||||
values?.grid_ranges?.map((res: { asset_projects_id: string }) => {
|
|
||||||
res.asset_projects_id = props?.item?.id;
|
|
||||||
});
|
|
||||||
return Apis.Grid.Grids.Store({
|
|
||||||
...values,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
props.reload?.();
|
|
||||||
message.success('网格添加成功');
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false);
|
|
||||||
}}
|
|
||||||
columns={[
|
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
key: 'asset_projects_id',
|
|
||||||
title: '选择项目',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
|
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['asset_projects_id'],
|
|
||||||
columns: ({ asset_projects_id }) => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
columns: [
|
|
||||||
Selects?.GetGridMark({
|
|
||||||
key: 'grid_mark',
|
|
||||||
title: '范围标识',
|
|
||||||
params: {
|
|
||||||
asset_projects_id:
|
|
||||||
asset_projects_id || props?.item?.id || 0,
|
|
||||||
},
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
Selects?.GridUnits({
|
|
||||||
key: 'grid_units_id',
|
|
||||||
title: '选择单元',
|
|
||||||
params: {
|
|
||||||
asset_projects_id:
|
|
||||||
asset_projects_id || props?.item?.id || 0,
|
|
||||||
},
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
// {
|
|
||||||
// valueType: 'formItem',
|
|
||||||
// dataIndex: 'grid_units_id',
|
|
||||||
// title: '选择单元',
|
|
||||||
// colProps: { span: 24 },
|
|
||||||
// formItemProps: { ...rulesHelper.text },
|
|
||||||
// renderFormItem: () => (
|
|
||||||
// <Transfer
|
|
||||||
// dataSource={transferData}
|
|
||||||
// targetKeys={targetKeys}
|
|
||||||
// onChange={(nextTargetKeys) => {
|
|
||||||
// setTargetKeys(nextTargetKeys as string[]);
|
|
||||||
// form.setFieldValue('grid_units_id', nextTargetKeys);
|
|
||||||
// }}
|
|
||||||
// render={(item) => item.title}
|
|
||||||
// titles={['可选单元', '已选单元']}
|
|
||||||
// showSearch
|
|
||||||
// listStyle={{
|
|
||||||
// width: 250,
|
|
||||||
// height: 300,
|
|
||||||
// }}
|
|
||||||
// operations={['选择', '移除']}
|
|
||||||
// locale={{
|
|
||||||
// itemUnit: '项',
|
|
||||||
// itemsUnit: '项',
|
|
||||||
// searchPlaceholder: '请输入搜索内容',
|
|
||||||
// notFoundContent: '列表为空',
|
|
||||||
// }}
|
|
||||||
// />
|
|
||||||
// ),
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,159 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyModalFormProps,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
|
||||||
import { Form, message, Transfer } from 'antd';
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
const [transferData, setTransferData] = useState<any[]>([]);
|
|
||||||
const [targetKeys, setTargetKeys] = useState<string[]>([]);
|
|
||||||
|
|
||||||
// 获取Transfer数据源
|
|
||||||
useEffect(() => {
|
|
||||||
const asset_projects_id = props?.item?.id || 0;
|
|
||||||
if (asset_projects_id) {
|
|
||||||
Apis.Asset.AssetUnits.GridSelect({ asset_projects_id })
|
|
||||||
.then((res) => {
|
|
||||||
const data =
|
|
||||||
res.data?.map((item: any) => ({
|
|
||||||
key: item.value?.toString(),
|
|
||||||
title: item?.asset_building?.name + item.label,
|
|
||||||
})) || [];
|
|
||||||
setTransferData(data);
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
setTransferData([]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, [props?.item?.id]);
|
|
||||||
|
|
||||||
console.log(props.item, 'pppp');
|
|
||||||
return (
|
|
||||||
<BetaSchemaForm<ApiTypes.Grid.Grids.Store>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
title={`范围添加`}
|
|
||||||
width="700px"
|
|
||||||
layout="horizontal"
|
|
||||||
labelCol={{ span: 4 }}
|
|
||||||
wrapperCol={{ span: 24 }}
|
|
||||||
labelAlign="right"
|
|
||||||
trigger={
|
|
||||||
<MyButtons.Create
|
|
||||||
title={`${props.title}`}
|
|
||||||
size={props?.item?.size || 'middle'}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
form={form}
|
|
||||||
key={new Date().getTime()}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open) {
|
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
form.setFieldsValue({
|
|
||||||
asset_projects_id: props?.item?.id,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values: any) => {
|
|
||||||
(values.asset_projects_id =
|
|
||||||
values?.asset_projects_id || props?.item?.id),
|
|
||||||
values?.grid_ranges?.map((res: { asset_projects_id: string }) => {
|
|
||||||
res.asset_projects_id = props?.item?.id;
|
|
||||||
});
|
|
||||||
return Apis.Grid.Grids.Store({
|
|
||||||
...values,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
props.reload?.();
|
|
||||||
message.success('网格添加成功');
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false);
|
|
||||||
}}
|
|
||||||
submitter={false}
|
|
||||||
footer={[<MyButtons.Default key="submit" title="添加" />]}
|
|
||||||
columns={[
|
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
key: 'asset_projects_id',
|
|
||||||
title: '选择项目',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['asset_projects_id'],
|
|
||||||
columns: ({ asset_projects_id }) => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
columns: [
|
|
||||||
Selects?.GetGridMark({
|
|
||||||
key: 'grid_mark',
|
|
||||||
title: '范围标识',
|
|
||||||
params: {
|
|
||||||
asset_projects_id:
|
|
||||||
asset_projects_id || props?.item?.id || 0,
|
|
||||||
},
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
|
|
||||||
{
|
|
||||||
valueType: 'formItem',
|
|
||||||
dataIndex: 'grid_units_id',
|
|
||||||
title: '选择单元',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
renderFormItem: () => (
|
|
||||||
<div onClick={(e) => e.stopPropagation()}>
|
|
||||||
<Transfer
|
|
||||||
dataSource={transferData}
|
|
||||||
targetKeys={targetKeys}
|
|
||||||
onChange={(nextTargetKeys) => {
|
|
||||||
setTargetKeys(nextTargetKeys as string[]);
|
|
||||||
form.setFieldValue('grid_units_id', nextTargetKeys);
|
|
||||||
}}
|
|
||||||
render={(item) => item.title}
|
|
||||||
titles={['可选单元', '已选单元']}
|
|
||||||
showSearch
|
|
||||||
listStyle={{
|
|
||||||
width: 250,
|
|
||||||
height: 300,
|
|
||||||
}}
|
|
||||||
operations={['选择', '移除']}
|
|
||||||
operationStyle={{ marginTop: 20 }}
|
|
||||||
locale={{
|
|
||||||
itemUnit: '项',
|
|
||||||
itemsUnit: '项',
|
|
||||||
searchPlaceholder: '请输入搜索内容',
|
|
||||||
notFoundContent: '列表为空',
|
|
||||||
}}
|
|
||||||
onSelectChange={(
|
|
||||||
sourceSelectedKeys,
|
|
||||||
targetSelectedKeys,
|
|
||||||
) => {
|
|
||||||
// 处理选择变化,但不触发表单提交
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,539 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import {
|
|
||||||
AssetHousesOwnershipTypeEnum,
|
|
||||||
AssetHousesUsageEnum,
|
|
||||||
} from '@/gen/Enums';
|
|
||||||
import { ProCard, ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { message, Space, Typography } from 'antd';
|
|
||||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
||||||
import BuildingsCreate from './modals/BuildingsCreate';
|
|
||||||
import AssetBuildingsUpdate from './modals/BuildingsUpdate';
|
|
||||||
import HousesCreate from './modals/HousesCreate';
|
|
||||||
import HousesUpdate from './modals/HousesUpdate';
|
|
||||||
import UnitsCreate from './modals/UnitsCreate';
|
|
||||||
import AssetUnitsUpdate from './modals/UnitsUpdate';
|
|
||||||
|
|
||||||
const { Title } = Typography;
|
|
||||||
interface SelectedAsset {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SelectedBuilding {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SelectedUnit {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Index({ title = '项目列表' }) {
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'asset-buildings',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
const actionAssetRef: any = useRef();
|
|
||||||
const actionBuildingsRef: any = useRef();
|
|
||||||
const actionUnitsRef: any = useRef();
|
|
||||||
const actionHousesRef: any = useRef();
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const [selectedAsset, setSelectedAsset] = useState<SelectedAsset | null>(
|
|
||||||
null,
|
|
||||||
);
|
|
||||||
const [selectedBuilding, setSelectedBuilding] =
|
|
||||||
useState<SelectedBuilding | null>(null);
|
|
||||||
const [selectedUnit, setSelectedUnit] = useState<SelectedUnit | null>(null);
|
|
||||||
const [loading, setLoading] = useState({
|
|
||||||
buildings: false,
|
|
||||||
units: false,
|
|
||||||
houses: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
// 选择项目的回调函数
|
|
||||||
const handleAssetSelect = useCallback(
|
|
||||||
(asset: SelectedAsset) => {
|
|
||||||
if (selectedAsset?.id === asset.id) return; // 避免重复选择
|
|
||||||
|
|
||||||
setSelectedAsset(asset);
|
|
||||||
setSelectedBuilding(null); // 重置楼栋选择
|
|
||||||
setSelectedUnit(null); // 重置单元选择
|
|
||||||
|
|
||||||
// 刷新楼栋和单元列表
|
|
||||||
actionBuildingsRef?.current?.reload();
|
|
||||||
actionUnitsRef?.current?.reload();
|
|
||||||
actionHousesRef?.current?.reload();
|
|
||||||
},
|
|
||||||
[selectedAsset?.id],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 选择楼栋的回调函数
|
|
||||||
const handleBuildingSelect = useCallback(
|
|
||||||
(building: SelectedBuilding) => {
|
|
||||||
if (selectedBuilding?.id === building.id) return; // 避免重复选择
|
|
||||||
|
|
||||||
setSelectedBuilding(building);
|
|
||||||
setSelectedUnit(null); // 重置单元选择
|
|
||||||
|
|
||||||
// 刷新单元和房屋列表
|
|
||||||
actionUnitsRef?.current?.reload();
|
|
||||||
actionHousesRef?.current?.reload();
|
|
||||||
},
|
|
||||||
[selectedBuilding?.id],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 选择单元的回调函数
|
|
||||||
const handleUnitSelect = useCallback(
|
|
||||||
(unit: SelectedUnit) => {
|
|
||||||
if (selectedUnit?.id === unit.id) return; // 避免重复选择
|
|
||||||
|
|
||||||
setSelectedUnit(unit);
|
|
||||||
// 刷新房屋列表
|
|
||||||
actionHousesRef?.current?.reload();
|
|
||||||
},
|
|
||||||
[selectedUnit?.id],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 删除操作的通用处理
|
|
||||||
const handleDelete = useCallback(
|
|
||||||
async (deleteApi: any, id: number, reloadAction: any, itemName: string) => {
|
|
||||||
try {
|
|
||||||
await deleteApi({ id });
|
|
||||||
message.success(`${itemName}删除成功`);
|
|
||||||
reloadAction();
|
|
||||||
|
|
||||||
// 如果删除的是当前选中项,清空选择
|
|
||||||
if (itemName === '项目' && selectedAsset?.id === id) {
|
|
||||||
setSelectedAsset(null);
|
|
||||||
setSelectedBuilding(null);
|
|
||||||
setSelectedUnit(null);
|
|
||||||
} else if (itemName === '楼栋' && selectedBuilding?.id === id) {
|
|
||||||
setSelectedBuilding(null);
|
|
||||||
setSelectedUnit(null);
|
|
||||||
} else if (itemName === '单元' && selectedUnit?.id === id) {
|
|
||||||
setSelectedUnit(null);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
message.error(`${itemName}删除失败`);
|
|
||||||
console.error(`删除${itemName}失败:`, error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[selectedAsset?.id, selectedBuilding?.id, selectedUnit?.id],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 通用表格配置
|
|
||||||
const getTableConfig = useMemo(
|
|
||||||
() => ({
|
|
||||||
...MyProTableProps.props,
|
|
||||||
search: false as const,
|
|
||||||
size: 'middle' as const,
|
|
||||||
options: false as const,
|
|
||||||
pagination: {
|
|
||||||
pageSize: 10,
|
|
||||||
showSizeChanger: false,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 项目表格列配置
|
|
||||||
const projectColumns = useMemo(
|
|
||||||
() => [
|
|
||||||
{
|
|
||||||
title: '项目',
|
|
||||||
dataIndex: 'name',
|
|
||||||
ellipsis: true,
|
|
||||||
search: {
|
|
||||||
transform: (value: string) => ({ name: value }),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
MyColumns.Option({
|
|
||||||
width: 120,
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index} size="small">
|
|
||||||
<MyButtons.View
|
|
||||||
title="配置"
|
|
||||||
onClick={() => {
|
|
||||||
navigate(`/asset/id/${item.id}`);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
[handleDelete],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 楼栋表格列配置
|
|
||||||
const buildingColumns = useMemo(
|
|
||||||
() => [
|
|
||||||
{
|
|
||||||
title: '楼栋',
|
|
||||||
dataIndex: 'name',
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
MyColumns.Option({
|
|
||||||
width: 120,
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index} size="small">
|
|
||||||
<AssetBuildingsUpdate item={item} reload={action?.reload} />
|
|
||||||
{/* <MyButtons.Delete
|
|
||||||
size="small"
|
|
||||||
onConfirm={() =>
|
|
||||||
handleDelete(
|
|
||||||
Apis.Asset.AssetBuildings.Delete,
|
|
||||||
item.id,
|
|
||||||
action?.reload,
|
|
||||||
'楼栋',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/> */}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
[handleDelete],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 单元表格列配置
|
|
||||||
const unitColumns = useMemo(
|
|
||||||
() => [
|
|
||||||
{
|
|
||||||
title: '单元',
|
|
||||||
dataIndex: 'name',
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
MyColumns.Option({
|
|
||||||
width: 120,
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index} size="small">
|
|
||||||
<AssetUnitsUpdate item={item} reload={action?.reload} />
|
|
||||||
{/* <MyButtons.Delete
|
|
||||||
size="small"
|
|
||||||
onConfirm={() =>
|
|
||||||
handleDelete(
|
|
||||||
Apis.Asset.AssetUnits.Delete,
|
|
||||||
item.id,
|
|
||||||
action?.reload,
|
|
||||||
'单元',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/> */}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
[handleDelete],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 房屋表格列配置
|
|
||||||
const houseColumns = useMemo(
|
|
||||||
() => [
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '用途',
|
|
||||||
dataIndex: 'usage',
|
|
||||||
valueEnum: AssetHousesUsageEnum,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '房屋名称',
|
|
||||||
dataIndex: 'full_name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '楼层',
|
|
||||||
dataIndex: 'floor',
|
|
||||||
render(_, record) {
|
|
||||||
return `${record?.floor}层`;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '房号',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '计费面积',
|
|
||||||
dataIndex: 'chargeable_area',
|
|
||||||
render(_, record) {
|
|
||||||
return `${
|
|
||||||
record?.chargeable_area ? record?.chargeable_area + ' m²' : '-'
|
|
||||||
} `;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '房屋属性',
|
|
||||||
dataIndex: 'ownership_type',
|
|
||||||
valueEnum: AssetHousesOwnershipTypeEnum,
|
|
||||||
}),
|
|
||||||
MyColumns.Option({
|
|
||||||
width: 120,
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index} size="small">
|
|
||||||
<HousesUpdate item={item} reload={action?.reload} title="编辑" />
|
|
||||||
{/* <MyButtons.Delete
|
|
||||||
size="small"
|
|
||||||
onConfirm={() =>
|
|
||||||
handleDelete(
|
|
||||||
Apis.Asset.AssetHouses.Delete,
|
|
||||||
item.id,
|
|
||||||
action?.reload,
|
|
||||||
'房屋',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/> */}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
[handleDelete],
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer title={title}>
|
|
||||||
<ProCard
|
|
||||||
// title={
|
|
||||||
// <Alert
|
|
||||||
// message="操作提示:在楼栋下添加单元,在单元下添加房屋!"
|
|
||||||
// type="info"
|
|
||||||
// showIcon
|
|
||||||
// style={{ margin: 0 }}
|
|
||||||
// />
|
|
||||||
// }
|
|
||||||
>
|
|
||||||
<Space align="start" size="large" style={{ width: '100%' }}>
|
|
||||||
<div style={{ flex: 1 }}>
|
|
||||||
<Title level={5} style={{ marginBottom: 16 }}>
|
|
||||||
<Space
|
|
||||||
style={{ display: 'flex', justifyContent: 'space-between' }}
|
|
||||||
>
|
|
||||||
项目信息
|
|
||||||
</Space>
|
|
||||||
</Title>
|
|
||||||
<ProTable
|
|
||||||
{...getTableConfig}
|
|
||||||
// search={{
|
|
||||||
// labelWidth: 'auto',
|
|
||||||
// collapsed: false,
|
|
||||||
// collapseRender: false,
|
|
||||||
// }}
|
|
||||||
actionRef={actionBuildingsRef}
|
|
||||||
rowClassName={(record: any) => {
|
|
||||||
return selectedBuilding?.id === record?.id
|
|
||||||
? 'ant-table-row-selected'
|
|
||||||
: '';
|
|
||||||
}}
|
|
||||||
onRow={(record: any) => {
|
|
||||||
return {
|
|
||||||
onClick: () => {
|
|
||||||
handleAssetSelect(record);
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
cursor: 'pointer',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
{ ...params },
|
|
||||||
sort,
|
|
||||||
Apis.Asset.AssetProjects.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
columns={projectColumns}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* 楼栋列表 */}
|
|
||||||
{selectedAsset ? (
|
|
||||||
<div style={{ flex: 1 }}>
|
|
||||||
<Title level={5} style={{ marginBottom: 16 }}>
|
|
||||||
<Space
|
|
||||||
style={{ display: 'flex', justifyContent: 'space-between' }}
|
|
||||||
>
|
|
||||||
<span>{selectedAsset?.name}</span>
|
|
||||||
<BuildingsCreate
|
|
||||||
key="BuildingsCreate"
|
|
||||||
item={{ ...selectedAsset, size: 'small' }}
|
|
||||||
reload={() => actionBuildingsRef?.current?.reload()}
|
|
||||||
title="楼栋"
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
</Title>
|
|
||||||
<ProTable
|
|
||||||
{...getTableConfig}
|
|
||||||
actionRef={actionBuildingsRef}
|
|
||||||
rowClassName={(record: any) => {
|
|
||||||
return selectedBuilding?.id === record?.id
|
|
||||||
? 'ant-table-row-selected'
|
|
||||||
: '';
|
|
||||||
}}
|
|
||||||
onRow={(record: any) => {
|
|
||||||
return {
|
|
||||||
onClick: () => {
|
|
||||||
handleBuildingSelect(record);
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
cursor: 'pointer',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
{ ...params, asset_projects_id: selectedAsset?.id },
|
|
||||||
sort,
|
|
||||||
Apis.Asset.AssetBuildings.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
columns={buildingColumns}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
// minWidth: 300,
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
color: '#999',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
请先选择项目
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{/* 单元列表 */}
|
|
||||||
{selectedBuilding ? (
|
|
||||||
<div style={{ flex: 1 }}>
|
|
||||||
<Title level={5} style={{ marginBottom: 16 }}>
|
|
||||||
<Space
|
|
||||||
style={{ display: 'flex', justifyContent: 'space-between' }}
|
|
||||||
>
|
|
||||||
<span>{selectedBuilding.name}</span>
|
|
||||||
<UnitsCreate
|
|
||||||
key="UnitsCreate"
|
|
||||||
item={{
|
|
||||||
...selectedBuilding,
|
|
||||||
asset_buildings_id: selectedBuilding?.id,
|
|
||||||
size: 'small',
|
|
||||||
}}
|
|
||||||
reload={() => actionUnitsRef?.current?.reload()}
|
|
||||||
title="单元"
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
</Title>
|
|
||||||
<ProTable
|
|
||||||
{...getTableConfig}
|
|
||||||
actionRef={actionUnitsRef}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
{
|
|
||||||
...params,
|
|
||||||
asset_projects_id: selectedAsset?.id,
|
|
||||||
asset_buildings_id: selectedBuilding?.id,
|
|
||||||
},
|
|
||||||
sort,
|
|
||||||
Apis.Asset.AssetUnits.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
rowClassName={(record: any) => {
|
|
||||||
return selectedUnit?.id === record?.id
|
|
||||||
? 'ant-table-row-selected'
|
|
||||||
: '';
|
|
||||||
}}
|
|
||||||
onRow={(record: any) => {
|
|
||||||
return {
|
|
||||||
onClick: () => {
|
|
||||||
handleUnitSelect(record);
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
cursor: 'pointer',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
columns={unitColumns}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
// minWidth: 300,
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
color: '#999',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
请先选择楼栋
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* 房屋列表 */}
|
|
||||||
{selectedUnit ? (
|
|
||||||
<div style={{ flex: 1 }}>
|
|
||||||
<Title level={5} style={{ marginBottom: 16 }}>
|
|
||||||
<Space
|
|
||||||
style={{ display: 'flex', justifyContent: 'space-between' }}
|
|
||||||
>
|
|
||||||
<span>{selectedUnit.name}</span>
|
|
||||||
<HousesCreate
|
|
||||||
key="HousesCreate"
|
|
||||||
item={{
|
|
||||||
...selectedUnit,
|
|
||||||
asset_projects_id: selectedAsset?.id,
|
|
||||||
asset_buildings_id: selectedBuilding?.id,
|
|
||||||
asset_units_id: selectedUnit?.id,
|
|
||||||
size: 'small',
|
|
||||||
}}
|
|
||||||
reload={() => actionHousesRef?.current?.reload()}
|
|
||||||
title="房屋"
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
</Title>
|
|
||||||
<ProTable
|
|
||||||
{...getTableConfig}
|
|
||||||
actionRef={actionHousesRef}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
{
|
|
||||||
...params,
|
|
||||||
asset_projects_id: selectedAsset?.id,
|
|
||||||
asset_buildings_id: selectedBuilding?.id,
|
|
||||||
asset_units_id: selectedUnit?.id,
|
|
||||||
},
|
|
||||||
sort,
|
|
||||||
Apis.Asset.AssetHouses.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
columns={houseColumns}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
// minWidth: 400,
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
color: '#999',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{selectedBuilding ? '请先选择单元' : '请先选择楼栋'}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
</ProCard>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -89,7 +89,7 @@ export default function Index({ title = '项目列表' }) {
|
|||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '关联机构',
|
title: '绑定机构',
|
||||||
dataIndex: ['company', 'name'],
|
dataIndex: ['company', 'name'],
|
||||||
search: {
|
search: {
|
||||||
transform: (value) => {
|
transform: (value) => {
|
||||||
@ -116,7 +116,7 @@ export default function Index({ title = '项目列表' }) {
|
|||||||
<MyButtons.View
|
<MyButtons.View
|
||||||
title="配置"
|
title="配置"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`/asset/list/show/${item.id}`);
|
navigate(`/asset/${item.id}`);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
@ -15,8 +15,8 @@ import { ProTable } from '@ant-design/pro-components';
|
|||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import HousesShow from '../asset/houses/modals/HousesShow';
|
import HousesShow from '../asset/components/modals/HousesShow';
|
||||||
import HousesUpdate from '../asset/houses/modals/HousesUpdate';
|
import HousesUpdate from '../asset/components/modals/HousesUpdate';
|
||||||
|
|
||||||
export default function Index({ title = '房屋列表' }) {
|
export default function Index({ title = '房屋列表' }) {
|
||||||
const [getParams, setParams] = useState({});
|
const [getParams, setParams] = useState({});
|
||||||
@ -128,7 +128,7 @@ export default function Index({ title = '房屋列表' }) {
|
|||||||
// search: false,
|
// search: false,
|
||||||
// }),
|
// }),
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '房屋属性',
|
title: '产权性质',
|
||||||
dataIndex: 'ownership_type',
|
dataIndex: 'ownership_type',
|
||||||
valueEnum: AssetHousesOwnershipTypeEnum,
|
valueEnum: AssetHousesOwnershipTypeEnum,
|
||||||
search: false,
|
search: false,
|
||||||
|
|||||||
@ -1,128 +0,0 @@
|
|||||||
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/houses/modals/HousesShow';
|
|
||||||
import HousesUpdate from '../asset/houses/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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -5,15 +5,15 @@ import { useParams } from '@umijs/max';
|
|||||||
import { Space, Tabs } from 'antd';
|
import { Space, Tabs } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import CompanyUpdate from '../modals/CompanyUpdate';
|
import Assets from './components/Assets';
|
||||||
import CompanyApps from '../table/Apps';
|
import CompanyApps from './components/CompanyApps';
|
||||||
import Assets from '../table/Assets';
|
import ComponentsInfo from './components/ComponentsInfo';
|
||||||
import Brands from '../table/Brands';
|
import Employees from './components/Employees';
|
||||||
import ComponentsInfo from '../table/ComponentsInfo';
|
import Organizations from './components/Organizations';
|
||||||
import Employees from '../table/Employees';
|
import Positions from './components/Positions';
|
||||||
import Organizations from '../table/Organizations';
|
import PropertyBrands from './components/PropertyBrands';
|
||||||
import Positions from '../table/Positions';
|
import ReceiptAccounts from './components/ReceiptAccounts';
|
||||||
import ReceiptAccounts from '../table/ReceiptAccounts';
|
import CompanyUpdate from './modals/CompanyUpdate';
|
||||||
|
|
||||||
export default function Show({ title }: { title?: string } = {}) {
|
export default function Show({ title }: { title?: string } = {}) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
@ -43,6 +43,12 @@ export default function Show({ title }: { title?: string } = {}) {
|
|||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
let items = [
|
let items = [
|
||||||
|
{
|
||||||
|
label: '0-品牌配置',
|
||||||
|
key: '0',
|
||||||
|
closable: false,
|
||||||
|
children: <PropertyBrands item={data} />,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '1-项目配置',
|
label: '1-项目配置',
|
||||||
key: '1',
|
key: '1',
|
||||||
@ -80,12 +86,6 @@ export default function Show({ title }: { title?: string } = {}) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: <CompanyApps item={data} />,
|
children: <CompanyApps item={data} />,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '7-品牌配置',
|
|
||||||
key: '7',
|
|
||||||
closable: false,
|
|
||||||
children: <Brands item={data} />,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<MyPageContainer title={title}>
|
<MyPageContainer title={title}>
|
||||||
@ -104,7 +104,7 @@ export default function Show({ title }: { title?: string } = {}) {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
* 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用、品牌;
|
* 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用;
|
||||||
</div>
|
</div>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
<ProCard>
|
<ProCard>
|
||||||
@ -1,95 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import AppCreate from './modals/AppCreate';
|
|
||||||
import AppUpdate from './modals/AppUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '应用管理' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'company-apps',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="company-apps"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(params, sort, Apis.Company.CompanyApps.List)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<AppCreate key="Create" reload={action?.reload} title={title} />,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID(),
|
|
||||||
{
|
|
||||||
title: '机构',
|
|
||||||
dataIndex: ['company', 'name'],
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '应用类型',
|
|
||||||
dataIndex: 'app_type',
|
|
||||||
valueEnum: CompanyAppsAppTypeEnum,
|
|
||||||
}),
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '模块',
|
|
||||||
dataIndex: 'module',
|
|
||||||
valueEnum: CompanyAppsModuleEnum,
|
|
||||||
search: false,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '应用ID',
|
|
||||||
dataIndex: 'app_id',
|
|
||||||
search: false,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '应用密钥',
|
|
||||||
// dataIndex: 'app_secret',
|
|
||||||
// search: false,
|
|
||||||
// ellipsis: true,
|
|
||||||
// render: (text) => '***' + String(text).slice(-4),
|
|
||||||
// },
|
|
||||||
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
// MyColumns.CreatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<AppUpdate
|
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="应用配置"
|
|
||||||
/>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.CompanyApps.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Image, Space } from 'antd';
|
|
||||||
import BrandsCreate from './modals/BrandsCreate';
|
|
||||||
import BrandUpdate from './modals/BrandUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '品牌管理' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'company-brands',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="company-brands"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.Company.CompanyPropertyBrands.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<BrandsCreate key="Create" reload={action?.reload} title={title} />,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID(),
|
|
||||||
{
|
|
||||||
title: '机构',
|
|
||||||
dataIndex: ['company', 'name'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '品牌名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'logo',
|
|
||||||
search: false,
|
|
||||||
render: (_, item) => {
|
|
||||||
return (
|
|
||||||
<Space>
|
|
||||||
{item?.logo?.[0] && (
|
|
||||||
<Image
|
|
||||||
height={30}
|
|
||||||
src={item?.logo[0]?.url}
|
|
||||||
placeholder="正面"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<BrandUpdate
|
|
||||||
item={{ ...item, companies_id: item?.id }}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="品牌"
|
|
||||||
/>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.CompanyPropertyBrands.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
AssetProjectsPropertyTypeEnum,
|
AssetProjectsPropertyTypeEnum,
|
||||||
AssetProjectsStatusEnum,
|
AssetProjectsStatusEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import AssetCreate from '@/pages/asset/list/modals/AssetCreate';
|
import AssetCreate from '@/pages/asset/modals/AssetCreate';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
@ -8,8 +8,8 @@ import { Apis } from '@/gen/Apis';
|
|||||||
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import AppCreate from '../../apps/modals/AppCreate';
|
import CompanyAppCreate from './modals/CompanyAppCreate';
|
||||||
import AppUpdate from '../../apps/modals/AppUpdate';
|
import CompanyAppUpdate from './modals/CompanyAppUpdate';
|
||||||
|
|
||||||
export default function CompanyApps(props: MyBetaModalFormProps) {
|
export default function CompanyApps(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -24,7 +24,7 @@ export default function CompanyApps(props: MyBetaModalFormProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<AppCreate
|
<CompanyAppCreate
|
||||||
key="Create"
|
key="Create"
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
item={props?.item}
|
item={props?.item}
|
||||||
@ -35,10 +35,7 @@ export default function CompanyApps(props: MyBetaModalFormProps) {
|
|||||||
// options={false}
|
// options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
{
|
|
||||||
title: '机构',
|
|
||||||
dataIndex: ['company', 'name'],
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '应用类型',
|
title: '应用类型',
|
||||||
dataIndex: 'app_type',
|
dataIndex: 'app_type',
|
||||||
@ -69,7 +66,7 @@ export default function CompanyApps(props: MyBetaModalFormProps) {
|
|||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<AppUpdate
|
<CompanyAppUpdate
|
||||||
item={item}
|
item={item}
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
title="应用配置"
|
title="应用配置"
|
||||||
@ -7,8 +7,8 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import EmployeeCreate from '../../employees/modals/EmployeeCreate';
|
import EmployeeCreate from './modals/EmployeeCreate';
|
||||||
import EmployeeUpdate from '../../employees/modals/EmployeeUpdate';
|
import EmployeeUpdate from './modals/EmployeeUpdate';
|
||||||
|
|
||||||
export default function Index(props: MyBetaModalFormProps) {
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -8,9 +8,9 @@ import { Apis } from '@/gen/Apis';
|
|||||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import OrganizationChange from '../../organizations/modals/OrganizationChange';
|
import OrganizationChange from './modals/OrganizationChange';
|
||||||
import OrganizationCreate from '../../organizations/modals/OrganizationCreate';
|
import OrganizationCreate from './modals/OrganizationCreate';
|
||||||
import OrganizationUpdate from '../../organizations/modals/OrganizationUpdate';
|
import OrganizationUpdate from './modals/OrganizationUpdate';
|
||||||
|
|
||||||
export default function Organizations(props: MyBetaModalFormProps) {
|
export default function Organizations(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -7,8 +7,8 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import PositionCreate from '../../positions/modals/PositionCreate';
|
import PositionCreate from './modals/PositionCreate';
|
||||||
import PositionUpdate from '../../positions/modals/PositionUpdate';
|
import PositionUpdate from './modals/PositionUpdate';
|
||||||
|
|
||||||
export default function Organizations(props: MyBetaModalFormProps) {
|
export default function Organizations(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -7,8 +7,8 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Image, Space } from 'antd';
|
import { Image, Space } from 'antd';
|
||||||
import BrandsCreate from '../../brand/modals/BrandsCreate';
|
import PropertyBrandsCreate from './modals/PropertyBrandsCreate';
|
||||||
import PropertyBrandUpdate from '../../brand/modals/BrandUpdate';
|
import PropertyBrandUpdate from './modals/PropertyBrandUpdate';
|
||||||
|
|
||||||
export default function PropertyBrands(props: MyBetaModalFormProps) {
|
export default function PropertyBrands(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -23,7 +23,7 @@ export default function PropertyBrands(props: MyBetaModalFormProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<BrandsCreate
|
<PropertyBrandsCreate
|
||||||
key="Create"
|
key="Create"
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
item={props?.item}
|
item={props?.item}
|
||||||
@ -7,8 +7,8 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import ReceiptAccountCreate from '../../receipt_accounts/modals/ReceiptAccountCreate';
|
import ReceiptAccountCreate from './modals/ReceiptAccountCreate';
|
||||||
import ReceiptAccountUpdate from '../../receipt_accounts/modals/ReceiptAccountUpdate';
|
import ReceiptAccountUpdate from './modals/ReceiptAccountUpdate';
|
||||||
|
|
||||||
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -5,7 +5,6 @@ import {
|
|||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
@ -30,7 +29,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.CompanyApps.Store({
|
Apis.Company.CompanyApps.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
companies_id: props?.item?.id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -40,16 +39,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.Companies({
|
|
||||||
key: 'companies_id',
|
|
||||||
title: '公司',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'app_type',
|
key: 'app_type',
|
||||||
title: '应用类型',
|
title: '应用类型',
|
||||||
@ -24,12 +24,14 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open) {
|
if (open) {
|
||||||
form.resetFields(); // 清空表单数据
|
form.resetFields(); // 清空表单数据
|
||||||
|
form.setFieldsValue({
|
||||||
|
companies_id: props?.item?.id,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onFinish={async (values: any) =>
|
onFinish={async (values: any) =>
|
||||||
Apis.Company.CompanyEmployees.Store({
|
Apis.Company.CompanyEmployees.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
|
||||||
organizations_id:
|
organizations_id:
|
||||||
values?.organizations_id?.[values.organizations_id.length - 1],
|
values?.organizations_id?.[values.organizations_id.length - 1],
|
||||||
})
|
})
|
||||||
@ -41,16 +43,12 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.Companies({
|
Selects?.Companies({
|
||||||
key: 'companies_id',
|
key: 'companies_id',
|
||||||
title: '公司',
|
title: '所属机构',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
required: true,
|
formItemProps: { ...rulesHelper.number },
|
||||||
}),
|
}),
|
||||||
]),
|
|
||||||
Selects?.OrganizationsTree({
|
Selects?.OrganizationsTree({
|
||||||
title: '选择组织',
|
title: '选择组织',
|
||||||
key: 'organizations_id',
|
key: 'organizations_id',
|
||||||
@ -21,7 +21,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
trigger={<MyButtons.Create title={`添加${props.title}`} />}
|
trigger={<MyButtons.Create title={`添加${props.title}`} />}
|
||||||
key={new Date().getTime()}
|
|
||||||
form={form}
|
form={form}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open) {
|
if (open) {
|
||||||
@ -31,7 +30,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values: any) =>
|
onFinish={async (values: any) =>
|
||||||
Apis.Company.Organizations.Store({
|
Apis.Company.Organizations.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
companies_id: props?.item?.id,
|
||||||
parent_id: values?.parent_id?.[values.parent_id.length - 1],
|
parent_id: values?.parent_id?.[values.parent_id.length - 1],
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -42,16 +41,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.Companies({
|
|
||||||
key: 'companies_id',
|
|
||||||
title: '公司',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '组织类型',
|
title: '组织类型',
|
||||||
@ -4,7 +4,6 @@ import {
|
|||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
@ -27,7 +26,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.CompanyPositions.Store({
|
Apis.Company.CompanyPositions.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
companies_id: props?.item?.id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -37,16 +36,11 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
// Selects?.Companies({
|
||||||
? []
|
// title: '机构',
|
||||||
: [
|
// key: 'companies_id',
|
||||||
Selects?.Companies({
|
// formItemProps: { ...rulesHelper.text },
|
||||||
key: 'companies_id',
|
// }),
|
||||||
title: '公司',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
title: '岗位名称',
|
title: '岗位名称',
|
||||||
@ -17,7 +17,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
title={`编辑${props.title}`}
|
title={`编辑${props.title}`}
|
||||||
trigger={<MyButtons.Edit />}
|
trigger={<MyButtons.Edit />}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="360px"
|
width="300px"
|
||||||
form={form}
|
form={form}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
@ -5,7 +5,6 @@ import {
|
|||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
@ -18,7 +17,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`添加品牌`}
|
title={`添加品牌`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="360px"
|
width="300px"
|
||||||
trigger={<MyButtons.Create title={`添加品牌`} />}
|
trigger={<MyButtons.Create title={`添加品牌`} />}
|
||||||
form={form}
|
form={form}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
@ -29,7 +28,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.CompanyPropertyBrands.Store({
|
Apis.Company.CompanyPropertyBrands.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
companies_id: props?.item?.id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -39,16 +38,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.Companies({
|
|
||||||
key: 'companies_id',
|
|
||||||
title: '公司',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
title: '品牌名称',
|
title: '品牌名称',
|
||||||
@ -5,7 +5,6 @@ import {
|
|||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums';
|
import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
@ -30,8 +29,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.CompanyReceiptAccounts.Store({
|
Apis.Company.CompanyReceiptAccounts.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
companies_id: props?.item?.id,
|
||||||
|
|
||||||
is_default: 0,
|
is_default: 0,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -42,16 +40,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
...(props?.item?.id
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
Selects?.Companies({
|
|
||||||
key: 'companies_id',
|
|
||||||
title: '公司',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
{
|
{
|
||||||
key: 'company_name',
|
key: 'company_name',
|
||||||
title: '收款账户名称',
|
title: '收款账户名称',
|
||||||
@ -9,9 +9,9 @@ import { Apis } from '@/gen/Apis';
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
|
import ComponentsInfo from './components/ComponentsInfo';
|
||||||
import CompanyCreate from './modals/CompanyCreate';
|
import CompanyCreate from './modals/CompanyCreate';
|
||||||
import CompanyUpdate from './modals/CompanyUpdate';
|
import CompanyUpdate from './modals/CompanyUpdate';
|
||||||
import ComponentsInfo from './table/ComponentsInfo';
|
|
||||||
|
|
||||||
export default function Index({ title = '机构列表' }) {
|
export default function Index({ title = '机构列表' }) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@ -77,7 +77,7 @@ export default function Index({ title = '机构列表' }) {
|
|||||||
title="配置"
|
title="配置"
|
||||||
data-tooltip-position="top"
|
data-tooltip-position="top"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`/company/list/show/${item.id}`);
|
navigate(`/company/${item.id}`);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
@ -8,11 +8,9 @@ import {
|
|||||||
import { Address } from '@/components/Address';
|
import { Address } from '@/components/Address';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { message } from 'antd';
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
const [form] = Form.useForm();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Company.Companies.Store>
|
<BetaSchemaForm<ApiTypes.Company.Companies.Store>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
@ -20,12 +18,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="600px"
|
width="600px"
|
||||||
trigger={<MyButtons.Create title={`添加机构`} />}
|
trigger={<MyButtons.Create title={`添加机构`} />}
|
||||||
form={form}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open) {
|
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.Companies.Store({
|
Apis.Company.Companies.Store({
|
||||||
...values,
|
...values,
|
||||||
@ -1,103 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import OrganizationChange from './modals/OrganizationChange';
|
|
||||||
import OrganizationCreate from './modals/OrganizationCreate';
|
|
||||||
import OrganizationUpdate from './modals/OrganizationUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '组织列表' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'company-organizations',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="company-organizations"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.Company.Organizations.TreeList,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<OrganizationCreate
|
|
||||||
key="Create"
|
|
||||||
reload={action?.reload}
|
|
||||||
title={title}
|
|
||||||
/>,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: '机构',
|
|
||||||
dataIndex: ['company', 'name'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '组织ID',
|
|
||||||
dataIndex: 'id',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '组织名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '组织类型',
|
|
||||||
dataIndex: 'type',
|
|
||||||
valueEnum: OrganizationsTypeEnum,
|
|
||||||
search: false,
|
|
||||||
}),
|
|
||||||
|
|
||||||
{
|
|
||||||
title: '上级组织',
|
|
||||||
dataIndex: ['organization_parent', 'name'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<OrganizationUpdate
|
|
||||||
item={{ ...item, companies_id: item?.id }}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="组织"
|
|
||||||
/>
|
|
||||||
<OrganizationChange
|
|
||||||
item={{ ...item, companies_id: item?.id }}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="组织"
|
|
||||||
/>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.Organizations.Delete({ id: item.id }).then(
|
|
||||||
() => action?.reload(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import PositionCreate from './modals/PositionCreate';
|
|
||||||
import PositionUpdate from './modals/PositionUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '岗位管理' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'company-positions',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="company-positions"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.Company.CompanyPositions.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<PositionCreate key="Create" reload={action?.reload} title={title} />,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID(),
|
|
||||||
{
|
|
||||||
title: '机构',
|
|
||||||
dataIndex: ['company', 'name'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '岗位名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '岗位编号',
|
|
||||||
dataIndex: 'code',
|
|
||||||
search: false,
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '岗位排序',
|
|
||||||
// dataIndex: 'sort',
|
|
||||||
// search: false,
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: '岗位备注',
|
|
||||||
dataIndex: 'remark',
|
|
||||||
search: false,
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
// MyColumns.CreatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<PositionUpdate
|
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="岗位"
|
|
||||||
/>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.CompanyPositions.Delete({ id: item.id }).then(
|
|
||||||
() => action?.reload(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import ReceiptAccountCreate from './modals/ReceiptAccountCreate';
|
|
||||||
import ReceiptAccountUpdate from './modals/ReceiptAccountUpdate';
|
|
||||||
|
|
||||||
export default function Index({ title = '账号管理' }) {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'company-receipt_accounts',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="company-receipt_accounts"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.Company.CompanyReceiptAccounts.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<ReceiptAccountCreate
|
|
||||||
key="Create"
|
|
||||||
reload={action?.reload}
|
|
||||||
title={title}
|
|
||||||
/>,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID(),
|
|
||||||
{
|
|
||||||
title: '机构',
|
|
||||||
dataIndex: ['company', 'name'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '收款账号名称',
|
|
||||||
dataIndex: 'company_name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '开户行',
|
|
||||||
dataIndex: 'company_bank',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '收款账号',
|
|
||||||
dataIndex: 'company_account',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<ReceiptAccountUpdate
|
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="收款账号"
|
|
||||||
/>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.CompanyReceiptAccounts.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,154 +0,0 @@
|
|||||||
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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
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>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -8,8 +8,8 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import EmployeeCreate from './modals/EmployeeCreate';
|
import EmployeeCreate from '../company/components/modals/EmployeeCreate';
|
||||||
import EmployeeUpdate from './modals/EmployeeUpdate';
|
import EmployeeUpdate from '../company/components/modals/EmployeeUpdate';
|
||||||
|
|
||||||
export default function Index({ title = '员工管理' }) {
|
export default function Index({ title = '员工管理' }) {
|
||||||
// 使用多标签页功能
|
// 使用多标签页功能
|
||||||
@ -70,20 +70,18 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{props?.item?.asset_house?.full_name || '-'}
|
{props?.item?.asset_house?.full_name || '-'}
|
||||||
</a>
|
</a>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
{/* <ProDescriptions.Item label="房屋状态">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={HouseRegistersHouseStatusEnum}
|
||||||
|
value={props?.item?.house_status}
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item> */}
|
||||||
<ProDescriptions.Item label="登记类型">
|
<ProDescriptions.Item label="登记类型">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
Enums={HouseRegistersTypeEnum}
|
Enums={HouseRegistersTypeEnum}
|
||||||
value={props?.item?.type}
|
value={props?.item?.type}
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="居住关系">
|
|
||||||
<renderTextHelper.Tag
|
|
||||||
Enums={HouseOccupantsResidentialRelationEnum}
|
|
||||||
value={
|
|
||||||
props?.item?.customer_info?.[0].residential_relation
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="申请时间">
|
<ProDescriptions.Item label="申请时间">
|
||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
@ -102,10 +100,20 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
rowKey={(record, index) => record?.id_card || index}
|
rowKey={(record, index) => record?.id_card || index}
|
||||||
size="small"
|
size="small"
|
||||||
columns={[
|
columns={[
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '居住关系',
|
||||||
|
dataIndex: 'residential_relation',
|
||||||
|
valueEnum: HouseOccupantsResidentialRelationEnum,
|
||||||
|
}),
|
||||||
// MyColumns.EnumTag({
|
// MyColumns.EnumTag({
|
||||||
// title: '居住关系',
|
// title:
|
||||||
// dataIndex: 'residential_relation',
|
// props?.item?.status === 'Rented'
|
||||||
// valueEnum: HouseOccupantsResidentialRelationEnum,
|
// ? '与主租人关系'
|
||||||
|
// : '与产权人关系',
|
||||||
|
// // title: '关系说明',
|
||||||
|
// dataIndex: 'relation_with_owner',
|
||||||
|
// valueEnum: HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
// search: false,
|
||||||
// }),
|
// }),
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
@ -151,62 +159,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
/>
|
/>
|
||||||
</ProCard>
|
</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?.type === 'AddOwner' &&
|
||||||
props?.item?.ownership_info &&
|
props?.item?.ownership_info &&
|
||||||
props?.item?.ownership_info?.length > 0 && (
|
props?.item?.ownership_info?.length > 0 && (
|
||||||
@ -217,7 +170,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
(res: any, index: number) => (
|
(res: any, index: number) => (
|
||||||
<Image
|
<Image
|
||||||
key={`${res?.name}_${index}`}
|
key={`${res?.name}_${index}`}
|
||||||
height={30}
|
height={60}
|
||||||
src={res?.url || ''}
|
src={res?.url || ''}
|
||||||
placeholder="产证资料"
|
placeholder="产证资料"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import ChargeStandardHasHouse from '@/pages/asset/list/components/modals/ChargeStandardHasHouse';
|
import ChargeStandardHasHouse from '@/pages/asset/components/modals/ChargeStandardHasHouse';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
|
|||||||
@ -15,8 +15,8 @@ import {
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import ChargeStandardHasHouse from '../asset/list/components/modals/ChargeStandardHasHouse';
|
import ChargeStandardHasHouse from '../asset/components/modals/ChargeStandardHasHouse';
|
||||||
import ChargeStandardUpdate from '../asset/list/components/modals/ChargeStandardUpdate';
|
import ChargeStandardUpdate from '../asset/components/modals/ChargeStandardUpdate';
|
||||||
import ChargeCreate from './modals/ChargeCreate';
|
import ChargeCreate from './modals/ChargeCreate';
|
||||||
|
|
||||||
export default function Index({ title = '收费标准' }) {
|
export default function Index({ title = '收费标准' }) {
|
||||||
|
|||||||
@ -1,115 +0,0 @@
|
|||||||
import {
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
usePageTabs,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import {
|
|
||||||
HouseChargeTasksStatusEnum,
|
|
||||||
HouseChargeTasksTypeEnum,
|
|
||||||
} from '@/gen/Enums';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import ChargeTasksCreate from './modals/ChargeTasksCreate';
|
|
||||||
|
|
||||||
export default function Index({ title = '账单任务' }) {
|
|
||||||
// 注册当前页面为标签页
|
|
||||||
usePageTabs({
|
|
||||||
tabKey: 'charge_tasks',
|
|
||||||
tabLabel: title,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={title}
|
|
||||||
enableTabs={true}
|
|
||||||
tabKey="bills"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
params,
|
|
||||||
sort,
|
|
||||||
Apis.HouseCharage.HouseChargeTasks.List,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
toolBarRender={(action) => [
|
|
||||||
<ChargeTasksCreate
|
|
||||||
key="Create"
|
|
||||||
reload={action?.reload}
|
|
||||||
title={title}
|
|
||||||
/>,
|
|
||||||
]}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID(),
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '任务状态',
|
|
||||||
dataIndex: 'status',
|
|
||||||
valueEnum: HouseChargeTasksStatusEnum,
|
|
||||||
}),
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '创建类型',
|
|
||||||
dataIndex: 'type',
|
|
||||||
valueEnum: HouseChargeTasksTypeEnum,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '收费标准名称',
|
|
||||||
dataIndex: 'charge_standard_name',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '账单月份',
|
|
||||||
render: (_, record) => {
|
|
||||||
return `${record.year}-${String(record.month).padStart(2, '0')}`;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '计费开始日期',
|
|
||||||
dataIndex: 'start_date',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '计费结束日期',
|
|
||||||
dataIndex: 'end_date',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '项目名称',
|
|
||||||
dataIndex: 'project_name',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '机构名称',
|
|
||||||
dataIndex: 'company_name',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.SoftDelete({
|
|
||||||
title: '启/禁用',
|
|
||||||
onRestore: Apis.HouseCharage.HouseChargeTasks.Restore,
|
|
||||||
onSoftDelete: Apis.HouseCharage.HouseChargeTasks.SoftDelete,
|
|
||||||
search: false,
|
|
||||||
}),
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
MyColumns.CreatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.HouseCharage.HouseChargeTasks.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,109 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyModalFormProps,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Selects } from '@/components/Select';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
|
||||||
import { Form, message } from 'antd';
|
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
return (
|
|
||||||
<BetaSchemaForm<ApiTypes.HouseCharage.HouseChargeTasks.Store>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
title={`创建${props.title}`}
|
|
||||||
width="480px"
|
|
||||||
layout="horizontal"
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
wrapperCol={{ span: 16 }}
|
|
||||||
labelAlign="left"
|
|
||||||
trigger={<MyButtons.Create title={`创建${props.title}`} />}
|
|
||||||
key={new Date().getTime()}
|
|
||||||
form={form}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open) {
|
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values) =>
|
|
||||||
Apis.HouseCharage.HouseChargeTasks.Store(values)
|
|
||||||
.then(() => {
|
|
||||||
props.reload?.();
|
|
||||||
message.success(props.title + '账单任务创建成功');
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false)
|
|
||||||
}
|
|
||||||
columns={[
|
|
||||||
Selects?.AssetProjects({
|
|
||||||
title: '选择项目',
|
|
||||||
key: 'asset_projects_id',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['asset_projects_id'],
|
|
||||||
columns: ({ asset_projects_id }) => {
|
|
||||||
return [
|
|
||||||
Selects?.ChargeStandard({
|
|
||||||
title: '选择收费标准',
|
|
||||||
key: 'house_charge_standards_id',
|
|
||||||
params: {
|
|
||||||
asset_projects_id: asset_projects_id,
|
|
||||||
},
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'month',
|
|
||||||
title: '选择生成月份',
|
|
||||||
valueType: 'date',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
fieldProps: {
|
|
||||||
picker: 'month',
|
|
||||||
format: 'YYYY-MM',
|
|
||||||
valueFormat: 'YYYY-MM',
|
|
||||||
style: {
|
|
||||||
width: '100%',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'start_date',
|
|
||||||
title: '计费开始日期',
|
|
||||||
valueType: 'date',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
fieldProps: {
|
|
||||||
style: {
|
|
||||||
width: '100%',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'end_date',
|
|
||||||
title: '计费结束日期',
|
|
||||||
valueType: 'date',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
fieldProps: {
|
|
||||||
style: {
|
|
||||||
width: '100%',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -6,14 +6,18 @@ import {
|
|||||||
usePageTabs,
|
usePageTabs,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
import {
|
||||||
|
HouseChargeTasksStatusEnum,
|
||||||
|
HouseChargeTasksTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
|
import ChargeTasksCreate from './modals/ChargeTasksCreate';
|
||||||
|
|
||||||
export default function Index({ title = '任务结果' }) {
|
export default function Index({ title = '账单任务' }) {
|
||||||
// 注册当前页面为标签页
|
// 注册当前页面为标签页
|
||||||
usePageTabs({
|
usePageTabs({
|
||||||
tabKey: 'charge_task_details',
|
tabKey: 'charge_tasks',
|
||||||
tabLabel: title,
|
tabLabel: title,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -30,28 +34,33 @@ export default function Index({ title = '任务结果' }) {
|
|||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
params,
|
params,
|
||||||
sort,
|
sort,
|
||||||
Apis.HouseCharage.HouseChargeTaskDetails.List,
|
Apis.HouseCharage.HouseChargeTasks.List,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
// <ChargeTasksCreate
|
<ChargeTasksCreate
|
||||||
// key="Create"
|
key="Create"
|
||||||
// reload={action?.reload}
|
reload={action?.reload}
|
||||||
// title={title}
|
title={title}
|
||||||
// />,
|
/>,
|
||||||
// ]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
{
|
|
||||||
title: '任务ID',
|
|
||||||
dataIndex: 'house_charge_tasks_id',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '任务状态',
|
title: '任务状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
valueEnum: HouseChargeTaskDetailsStatusEnum,
|
valueEnum: HouseChargeTasksStatusEnum,
|
||||||
}),
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '创建类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
valueEnum: HouseChargeTasksTypeEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '收费标准名称',
|
||||||
|
dataIndex: 'charge_standard_name',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '账单月份',
|
title: '账单月份',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
@ -68,6 +77,22 @@ export default function Index({ title = '任务结果' }) {
|
|||||||
dataIndex: 'end_date',
|
dataIndex: 'end_date',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
dataIndex: 'project_name',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '机构名称',
|
||||||
|
dataIndex: 'company_name',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.SoftDelete({
|
||||||
|
title: '启/禁用',
|
||||||
|
onRestore: Apis.HouseCharage.HouseChargeTasks.Restore,
|
||||||
|
onSoftDelete: Apis.HouseCharage.HouseChargeTasks.SoftDelete,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
@ -75,7 +100,7 @@ export default function Index({ title = '任务结果' }) {
|
|||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
Apis.HouseCharage.HouseChargeTaskDetails.Delete({
|
Apis.HouseCharage.HouseChargeTasks.Delete({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}).then(() => action?.reload())
|
}).then(() => action?.reload())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user