feat:房屋登记
This commit is contained in:
parent
a7727d432b
commit
3d3e5c260c
@ -13,6 +13,27 @@ export const rulesHelper = {
|
|||||||
}),
|
}),
|
||||||
] as Rule[],
|
] as Rule[],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
phone: {
|
||||||
|
required: true,
|
||||||
|
rules: [
|
||||||
|
() => ({
|
||||||
|
validator(_, value) {
|
||||||
|
let phoneRegex = /^1[3-9]\d{9}$/;
|
||||||
|
if (!value) {
|
||||||
|
return Promise.reject(new Error('请输入手机号'));
|
||||||
|
}
|
||||||
|
if (value?.length !== 11) {
|
||||||
|
return Promise.reject(new Error('手机号至少11位'));
|
||||||
|
}
|
||||||
|
if (!phoneRegex.test(value)) {
|
||||||
|
return Promise.reject(new Error('请输入正确的手机号'));
|
||||||
|
}
|
||||||
|
return Promise.resolve();
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
] as Rule[],
|
||||||
|
},
|
||||||
upload(props?: { max?: number; errMsg?: string }) {
|
upload(props?: { max?: number; errMsg?: string }) {
|
||||||
return {
|
return {
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@ -250,6 +250,40 @@ export const Selects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
//岗位
|
||||||
|
Positions(props?: PropsType): ReturnType {
|
||||||
|
const {
|
||||||
|
title = '岗位',
|
||||||
|
key = 'positions_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.CompanyPositions.Select({
|
||||||
|
keywords: params?.KeyWords,
|
||||||
|
...params,
|
||||||
|
})
|
||||||
|
).data,
|
||||||
|
...rest,
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: {
|
||||||
|
label: 'label',
|
||||||
|
value: 'value',
|
||||||
|
},
|
||||||
|
...rest?.fieldProps,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
//项目
|
//项目
|
||||||
AssetProjects(props?: PropsType): ReturnType {
|
AssetProjects(props?: PropsType): ReturnType {
|
||||||
const {
|
const {
|
||||||
|
|||||||
10
src/gen/ApiTypes.d.ts
vendored
10
src/gen/ApiTypes.d.ts
vendored
@ -2,8 +2,8 @@ declare namespace ApiTypes {
|
|||||||
namespace Archive {
|
namespace Archive {
|
||||||
namespace HouseOccupants {
|
namespace HouseOccupants {
|
||||||
type List = {
|
type List = {
|
||||||
"asset_houses_id": number; // 资产房屋ID
|
"asset_houses_id"?: number; // 资产房屋ID
|
||||||
"status"?: number; // 状态,[enum:HouseOccupantsStatusEnum]
|
"status"?: string; // 状态,[enum:HouseOccupantsStatusEnum]
|
||||||
};
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
@ -23,6 +23,7 @@ declare namespace ApiTypes {
|
|||||||
"usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum]
|
"usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum]
|
||||||
"customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum]
|
"customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum]
|
||||||
"customer_info"?: string[]; // 客户信息
|
"customer_info"?: string[]; // 客户信息
|
||||||
|
"ownership_info"?: string[]; // 产权信息
|
||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
@ -32,6 +33,7 @@ declare namespace ApiTypes {
|
|||||||
"usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum]
|
"usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum]
|
||||||
"customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum]
|
"customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum]
|
||||||
"customer_info"?: string[]; // 客户信息
|
"customer_info"?: string[]; // 客户信息
|
||||||
|
"ownership_info"?: string[]; // 产权信息
|
||||||
};
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
@ -193,6 +195,10 @@ declare namespace ApiTypes {
|
|||||||
"takeover_date"?: Date; // 接管日期
|
"takeover_date"?: Date; // 接管日期
|
||||||
"closure_date"?: Date; // 封园日期
|
"closure_date"?: Date; // 封园日期
|
||||||
};
|
};
|
||||||
|
type BindCompany = {
|
||||||
|
"projects_id": number; // 项目id
|
||||||
|
"companies_id": number; // 机构id
|
||||||
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { request } from '@umijs/max';
|
|||||||
export const Apis = {
|
export const Apis = {
|
||||||
Archive: {
|
Archive: {
|
||||||
HouseOccupants: {
|
HouseOccupants: {
|
||||||
List(data: ApiTypes.Archive.HouseOccupants.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Archive.HouseOccupants.List): Promise<MyResponseType> {
|
||||||
return request('admin/archive/house_occupants/list', { data });
|
return request('admin/archive/house_occupants/list', { data });
|
||||||
},
|
},
|
||||||
Show(data: ApiTypes.Archive.HouseOccupants.Show): Promise<MyResponseType> {
|
Show(data: ApiTypes.Archive.HouseOccupants.Show): Promise<MyResponseType> {
|
||||||
@ -89,6 +89,9 @@ export const Apis = {
|
|||||||
Update(data: ApiTypes.Asset.AssetProjects.Update): Promise<MyResponseType> {
|
Update(data: ApiTypes.Asset.AssetProjects.Update): Promise<MyResponseType> {
|
||||||
return request('admin/asset/asset_projects/update', { data });
|
return request('admin/asset/asset_projects/update', { data });
|
||||||
},
|
},
|
||||||
|
BindCompany(data: ApiTypes.Asset.AssetProjects.BindCompany): Promise<MyResponseType> {
|
||||||
|
return request('admin/asset/asset_projects/bind_company', { data });
|
||||||
|
},
|
||||||
Show(data: ApiTypes.Asset.AssetProjects.Show): Promise<MyResponseType> {
|
Show(data: ApiTypes.Asset.AssetProjects.Show): Promise<MyResponseType> {
|
||||||
return request('admin/asset/asset_projects/show', { data });
|
return request('admin/asset/asset_projects/show', { data });
|
||||||
},
|
},
|
||||||
|
|||||||
381
src/gen/Enums.ts
381
src/gen/Enums.ts
@ -1,242 +1,371 @@
|
|||||||
// AssetHousesOrientationEnum
|
// AssetHousesOrientationEnum
|
||||||
export const AssetHousesOrientationEnum = {
|
export const AssetHousesOrientationEnum = {
|
||||||
'East': {"text":"东","color":"#007bff","value":"East"},
|
East: { text: '东', color: '#007bff', value: 'East' },
|
||||||
'South': {"text":"南","color":"#28a745","value":"South"},
|
South: { text: '南', color: '#28a745', value: 'South' },
|
||||||
'West': {"text":"西","color":"#ffc107","value":"West"},
|
West: { text: '西', color: '#ffc107', value: 'West' },
|
||||||
'North': {"text":"北","color":"#dc3545","value":"North"},
|
North: { text: '北', color: '#dc3545', value: 'North' },
|
||||||
'Southeast': {"text":"东南","color":"#20c997","value":"Southeast"},
|
Southeast: { text: '东南', color: '#20c997', value: 'Southeast' },
|
||||||
'Northeast': {"text":"东北","color":"#6f42c1","value":"Northeast"},
|
Northeast: { text: '东北', color: '#6f42c1', value: 'Northeast' },
|
||||||
'Southwest': {"text":"西南","color":"#fd7e14","value":"Southwest"},
|
Southwest: { text: '西南', color: '#fd7e14', value: 'Southwest' },
|
||||||
'Northwest': {"text":"西北","color":"#17a2b8","value":"Northwest"},
|
Northwest: { text: '西北', color: '#17a2b8', value: 'Northwest' },
|
||||||
'EastWest': {"text":"东西","color":"#6610f2","value":"EastWest"},
|
EastWest: { text: '东西', color: '#6610f2', value: 'EastWest' },
|
||||||
'SouthNorth': {"text":"南北","color":"#e83e8c","value":"SouthNorth"},
|
SouthNorth: { text: '南北', color: '#e83e8c', value: 'SouthNorth' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetHousesOwnershipTypeEnum
|
// AssetHousesOwnershipTypeEnum
|
||||||
export const AssetHousesOwnershipTypeEnum = {
|
export const AssetHousesOwnershipTypeEnum = {
|
||||||
'CommodityHousing': {"text":"商品房","color":"#007bff","value":"CommodityHousing"},
|
CommodityHousing: {
|
||||||
'FundedHousing': {"text":"集资房","color":"#28a745","value":"FundedHousing"},
|
text: '商品房',
|
||||||
'MilitaryHousing': {"text":"军产房","color":"#17a2b8","value":"MilitaryHousing"},
|
color: '#007bff',
|
||||||
'AffordableHousing': {"text":"保障房","color":"#ffc107","value":"AffordableHousing"},
|
value: 'CommodityHousing',
|
||||||
'RuralHousing': {"text":"农民房","color":"#6f42c1","value":"RuralHousing"},
|
},
|
||||||
'CommercialOffice': {"text":"商业写字楼","color":"#fd7e14","value":"CommercialOffice"},
|
FundedHousing: { text: '集资房', color: '#28a745', value: 'FundedHousing' },
|
||||||
'CommercialComplex': {"text":"商业综合体","color":"#dc3545","value":"CommercialComplex"},
|
MilitaryHousing: {
|
||||||
'ResettlementHousing': {"text":"回迁房","color":"#20c997","value":"ResettlementHousing"},
|
text: '军产房',
|
||||||
|
color: '#17a2b8',
|
||||||
|
value: 'MilitaryHousing',
|
||||||
|
},
|
||||||
|
AffordableHousing: {
|
||||||
|
text: '保障房',
|
||||||
|
color: '#ffc107',
|
||||||
|
value: 'AffordableHousing',
|
||||||
|
},
|
||||||
|
RuralHousing: { text: '农民房', color: '#6f42c1', value: 'RuralHousing' },
|
||||||
|
CommercialOffice: {
|
||||||
|
text: '商业写字楼',
|
||||||
|
color: '#fd7e14',
|
||||||
|
value: 'CommercialOffice',
|
||||||
|
},
|
||||||
|
CommercialComplex: {
|
||||||
|
text: '商业综合体',
|
||||||
|
color: '#dc3545',
|
||||||
|
value: 'CommercialComplex',
|
||||||
|
},
|
||||||
|
ResettlementHousing: {
|
||||||
|
text: '回迁房',
|
||||||
|
color: '#20c997',
|
||||||
|
value: 'ResettlementHousing',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetHousesStatusEnum
|
// AssetHousesStatusEnum
|
||||||
export const AssetHousesStatusEnum = {
|
export const AssetHousesStatusEnum = {
|
||||||
'Unsold': {"text":"未售","color":"#6c757d","value":"Unsold"},
|
Unsold: { text: '未售', color: '#6c757d', value: 'Unsold' },
|
||||||
'SoldNotDelivered': {"text":"已售未交房","color":"#ffc107","value":"SoldNotDelivered"},
|
SoldNotDelivered: {
|
||||||
'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"},
|
text: '已售未交房',
|
||||||
'Rented': {"text":"出租","color":"#007bff","value":"Rented"},
|
color: '#ffc107',
|
||||||
'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"},
|
value: 'SoldNotDelivered',
|
||||||
|
},
|
||||||
|
SelfOccupied: { text: '自住', color: '#28a745', value: 'SelfOccupied' },
|
||||||
|
Rented: { text: '出租', color: '#007bff', value: 'Rented' },
|
||||||
|
Vacant: { text: '空置', color: '#dc3545', value: 'Vacant' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetHousesUsageEnum
|
// AssetHousesUsageEnum
|
||||||
export const AssetHousesUsageEnum = {
|
export const AssetHousesUsageEnum = {
|
||||||
'Residence': {"text":"住宅","color":"#007bff","value":"Residence"},
|
Residence: { text: '住宅', color: '#007bff', value: 'Residence' },
|
||||||
'Apartment': {"text":"公寓","color":"#28a745","value":"Apartment"},
|
Apartment: { text: '公寓', color: '#28a745', value: 'Apartment' },
|
||||||
'Villa': {"text":"别墅","color":"#17a2b8","value":"Villa"},
|
Villa: { text: '别墅', color: '#17a2b8', value: 'Villa' },
|
||||||
'Shop': {"text":"商铺","color":"#ffc107","value":"Shop"},
|
Shop: { text: '商铺', color: '#ffc107', value: 'Shop' },
|
||||||
'ParkingSpace': {"text":"车位","color":"#6c757d","value":"ParkingSpace"},
|
ParkingSpace: { text: '车位', color: '#6c757d', value: 'ParkingSpace' },
|
||||||
'Office': {"text":"写字楼","color":"#6610f2","value":"Office"},
|
Office: { text: '写字楼', color: '#6610f2', value: 'Office' },
|
||||||
'Clubhouse': {"text":"会所","color":"#fd7e14","value":"Clubhouse"},
|
Clubhouse: { text: '会所', color: '#fd7e14', value: 'Clubhouse' },
|
||||||
'PropertyRoom': {"text":"物业用房","color":"#dc3545","value":"PropertyRoom"},
|
PropertyRoom: { text: '物业用房', color: '#dc3545', value: 'PropertyRoom' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsChargeEnum
|
// AssetProjectsChargeEnum
|
||||||
export const AssetProjectsChargeEnum = {
|
export const AssetProjectsChargeEnum = {
|
||||||
'Contract': {"text":"包干制","color":"#007bff","value":"Contract"},
|
Contract: { text: '包干制', color: '#007bff', value: 'Contract' },
|
||||||
'Commission': {"text":"酬金制","color":"#28a745","value":"Commission"},
|
Commission: { text: '酬金制', color: '#28a745', value: 'Commission' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsEntrustTypeEnum
|
// AssetProjectsEntrustTypeEnum
|
||||||
export const AssetProjectsEntrustTypeEnum = {
|
export const AssetProjectsEntrustTypeEnum = {
|
||||||
'DeveloperJointEntrust': {"text":"开发商全委","color":"#007bff","value":"DeveloperJointEntrust"},
|
DeveloperJointEntrust: {
|
||||||
'OwnersFullEntrust': {"text":"业委会全委","color":"#28a745","value":"OwnersFullEntrust"},
|
text: '开发商全委',
|
||||||
'GovernmentFullEntrust': {"text":"政府类全委","color":"#ffc107","value":"GovernmentFullEntrust"},
|
color: '#007bff',
|
||||||
|
value: 'DeveloperJointEntrust',
|
||||||
|
},
|
||||||
|
OwnersFullEntrust: {
|
||||||
|
text: '业委会全委',
|
||||||
|
color: '#28a745',
|
||||||
|
value: 'OwnersFullEntrust',
|
||||||
|
},
|
||||||
|
GovernmentFullEntrust: {
|
||||||
|
text: '政府类全委',
|
||||||
|
color: '#ffc107',
|
||||||
|
value: 'GovernmentFullEntrust',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsPropertyTypeEnum
|
// AssetProjectsPropertyTypeEnum
|
||||||
export const AssetProjectsPropertyTypeEnum = {
|
export const AssetProjectsPropertyTypeEnum = {
|
||||||
'Residence': {"text":"住宅","color":"#ff0000","value":"Residence"},
|
Residence: { text: '住宅', color: '#ff0000', value: 'Residence' },
|
||||||
'Commercial': {"text":"商业","color":"#ff6600","value":"Commercial"},
|
Commercial: { text: '商业', color: '#ff6600', value: 'Commercial' },
|
||||||
'Office': {"text":"办公","color":"#ffcc00","value":"Office"},
|
Office: { text: '办公', color: '#ffcc00', value: 'Office' },
|
||||||
'IndustrialPark': {"text":"产业园","color":"#00cc66","value":"IndustrialPark"},
|
IndustrialPark: { text: '产业园', color: '#00cc66', value: 'IndustrialPark' },
|
||||||
'Complex': {"text":"综合体","color":"#0099ff","value":"Complex"},
|
Complex: { text: '综合体', color: '#0099ff', value: 'Complex' },
|
||||||
'Municipal': {"text":"市政设施","color":"#6633cc","value":"Municipal"},
|
Municipal: { text: '市政设施', color: '#6633cc', value: 'Municipal' },
|
||||||
'Venue': {"text":"场馆","color":"#9966ff","value":"Venue"},
|
Venue: { text: '场馆', color: '#9966ff', value: 'Venue' },
|
||||||
'Education': {"text":"教育","color":"#339999","value":"Education"},
|
Education: { text: '教育', color: '#339999', value: 'Education' },
|
||||||
'Medical': {"text":"医疗","color":"#cc3366","value":"Medical"},
|
Medical: { text: '医疗', color: '#cc3366', value: 'Medical' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsStatusEnum
|
// AssetProjectsStatusEnum
|
||||||
export const AssetProjectsStatusEnum = {
|
export const AssetProjectsStatusEnum = {
|
||||||
'SignedNotDelivered': {"text":"签约未交付","color":"#6c757d","value":"SignedNotDelivered"},
|
SignedNotDelivered: {
|
||||||
'RollingDevelopment': {"text":"滚动开发","color":"#007bff","value":"RollingDevelopment"},
|
text: '签约未交付',
|
||||||
'ManagedAndClosed': {"text":"在管封园","color":"#ffc107","value":"ManagedAndClosed"},
|
color: '#6c757d',
|
||||||
'Exited': {"text":"退出","color":"#dc3545","value":"Exited"},
|
value: 'SignedNotDelivered',
|
||||||
|
},
|
||||||
|
RollingDevelopment: {
|
||||||
|
text: '滚动开发',
|
||||||
|
color: '#007bff',
|
||||||
|
value: 'RollingDevelopment',
|
||||||
|
},
|
||||||
|
ManagedAndClosed: {
|
||||||
|
text: '在管封园',
|
||||||
|
color: '#ffc107',
|
||||||
|
value: 'ManagedAndClosed',
|
||||||
|
},
|
||||||
|
Exited: { text: '退出', color: '#dc3545', value: 'Exited' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetUnitsBuildingStructureEnum
|
// AssetUnitsBuildingStructureEnum
|
||||||
export const AssetUnitsBuildingStructureEnum = {
|
export const AssetUnitsBuildingStructureEnum = {
|
||||||
'SteelConcrete': {"text":"钢混","color":"#007bff","value":"SteelConcrete"},
|
SteelConcrete: { text: '钢混', color: '#007bff', value: 'SteelConcrete' },
|
||||||
'SteelStructure': {"text":"钢结构","color":"#28a745","value":"SteelStructure"},
|
SteelStructure: { text: '钢结构', color: '#28a745', value: 'SteelStructure' },
|
||||||
'BrickConcrete': {"text":"砖混","color":"#ffc107","value":"BrickConcrete"},
|
BrickConcrete: { text: '砖混', color: '#ffc107', value: 'BrickConcrete' },
|
||||||
'BrickWood': {"text":"砖木","color":"#dc3545","value":"BrickWood"},
|
BrickWood: { text: '砖木', color: '#dc3545', value: 'BrickWood' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetUnitsBuildingTypeEnum
|
// AssetUnitsBuildingTypeEnum
|
||||||
export const AssetUnitsBuildingTypeEnum = {
|
export const AssetUnitsBuildingTypeEnum = {
|
||||||
'SlabAndTower': {"text":"板塔结合","color":"#007bff","value":"SlabAndTower"},
|
SlabAndTower: { text: '板塔结合', color: '#007bff', value: 'SlabAndTower' },
|
||||||
'Slab': {"text":"板楼","color":"#28a745","value":"Slab"},
|
Slab: { text: '板楼', color: '#28a745', value: 'Slab' },
|
||||||
'Tower': {"text":"塔楼","color":"#ffc107","value":"Tower"},
|
Tower: { text: '塔楼', color: '#ffc107', value: 'Tower' },
|
||||||
|
};
|
||||||
|
|
||||||
|
// 缓存类型
|
||||||
|
export const CacheTypeEnum = {
|
||||||
|
MobilePhoneVerificationCode: {
|
||||||
|
text: '手机验证码',
|
||||||
|
color: '#3be235',
|
||||||
|
value: 'MobilePhoneVerificationCode',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
export const CompaniesMerchantTypeEnum = {
|
export const CompaniesMerchantTypeEnum = {
|
||||||
'PropertyManagement': {"text":"物业公司","color":"#007bff","value":"PropertyManagement"},
|
PropertyManagement: {
|
||||||
'ServiceProvider': {"text":"服务商","color":"#28a745","value":"ServiceProvider"},
|
text: '物业公司',
|
||||||
|
color: '#007bff',
|
||||||
|
value: 'PropertyManagement',
|
||||||
|
},
|
||||||
|
ServiceProvider: {
|
||||||
|
text: '服务商',
|
||||||
|
color: '#28a745',
|
||||||
|
value: 'ServiceProvider',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
// CompanyAppsAppTypeEnum
|
||||||
|
export const CompanyAppsAppTypeEnum = {
|
||||||
|
MiniProgram: { text: '微信小程序', color: '#3b82f6', value: 'MiniProgram' },
|
||||||
|
MpOfficial: { text: '微信公众号', color: '#22c55e', value: 'MpOfficial' },
|
||||||
|
WorkWechat: { text: '企业微信', color: '#6366f1', value: 'WorkWechat' },
|
||||||
|
};
|
||||||
|
|
||||||
|
// CompanyAppsModuleEnum
|
||||||
|
export const CompanyAppsModuleEnum = {
|
||||||
|
Employee: { text: '员工端', color: '#3b82f6', value: 'Employee' },
|
||||||
|
Customer: { text: '客户端', color: '#10b981', value: 'Customer' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompanyReceiptAccountsPayChannelEnum
|
// CompanyReceiptAccountsPayChannelEnum
|
||||||
export const CompanyReceiptAccountsPayChannelEnum = {
|
export const CompanyReceiptAccountsPayChannelEnum = {
|
||||||
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
|
WeChat: { text: '微信', color: '#07c160', value: 'WeChat' },
|
||||||
'Alipay': {"text":"支付宝","color":"#1677ff","value":"Alipay"},
|
Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' },
|
||||||
'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"},
|
BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' },
|
||||||
'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"},
|
TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// 账单状态枚举
|
// 账单状态枚举
|
||||||
export const HouseBillsBillStatusEnum = {
|
export const HouseBillsBillStatusEnum = {
|
||||||
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
PendingPayment: { text: '待支付', color: '#facc15', value: 'PendingPayment' },
|
||||||
'PartiallyPaid': {"text":"部分支付","color":"#60a5fa","value":"PartiallyPaid"},
|
PartiallyPaid: { text: '部分支付', color: '#60a5fa', value: 'PartiallyPaid' },
|
||||||
'Paid': {"text":"已支付","color":"#10b981","value":"Paid"},
|
Paid: { text: '已支付', color: '#10b981', value: 'Paid' },
|
||||||
'Overdue': {"text":"已逾期","color":"#ef4444","value":"Overdue"},
|
Overdue: { text: '已逾期', color: '#ef4444', value: 'Overdue' },
|
||||||
'Cancelled': {"text":"已取消","color":"#9ca3af","value":"Cancelled"},
|
Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// 房屋账单类型枚举
|
// 房屋账单类型枚举
|
||||||
export const HouseBillsTypeEnum = {
|
export const HouseBillsTypeEnum = {
|
||||||
'PropertyFee': {"text":"物业费","color":"#3b82f6","value":"PropertyFee"},
|
PropertyFee: { text: '物业费', color: '#3b82f6', value: 'PropertyFee' },
|
||||||
'MaintenanceFund': {"text":"维修基金","color":"#10b981","value":"MaintenanceFund"},
|
MaintenanceFund: {
|
||||||
'WaterFee': {"text":"水费","color":"#06b6d4","value":"WaterFee"},
|
text: '维修基金',
|
||||||
'ElectricityFee': {"text":"电费","color":"#f59e0b","value":"ElectricityFee"},
|
color: '#10b981',
|
||||||
'SharedWaterFee': {"text":"公摊水费","color":"#8b5cf6","value":"SharedWaterFee"},
|
value: 'MaintenanceFund',
|
||||||
'SharedElectricityFee': {"text":"公摊电费","color":"#ec4899","value":"SharedElectricityFee"},
|
},
|
||||||
|
WaterFee: { text: '水费', color: '#06b6d4', value: 'WaterFee' },
|
||||||
|
ElectricityFee: { text: '电费', color: '#f59e0b', value: 'ElectricityFee' },
|
||||||
|
SharedWaterFee: {
|
||||||
|
text: '公摊水费',
|
||||||
|
color: '#8b5cf6',
|
||||||
|
value: 'SharedWaterFee',
|
||||||
|
},
|
||||||
|
SharedElectricityFee: {
|
||||||
|
text: '公摊电费',
|
||||||
|
color: '#ec4899',
|
||||||
|
value: 'SharedElectricityFee',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsCardTypeEnum
|
// HouseOccupantsCardTypeEnum
|
||||||
export const HouseOccupantsCardTypeEnum = {
|
export const HouseOccupantsCardTypeEnum = {
|
||||||
'MainlandID': {"text":"中国大陆居民身份证","color":"#2db7f5","value":"MainlandID"},
|
MainlandID: {
|
||||||
'HKPermit': {"text":"香港来往大陆通行证(回乡证)","color":"#fa8c16","value":"HKPermit"},
|
text: '中国大陆居民身份证',
|
||||||
'MOPermit': {"text":"澳门来往大陆通行证(回乡证)","color":"#faad14","value":"MOPermit"},
|
color: '#2db7f5',
|
||||||
'TWPermit': {"text":"台湾来往大陆通行证(台胞证)","color":"#87d068","value":"TWPermit"},
|
value: 'MainlandID',
|
||||||
'Passport': {"text":"护照","color":"#108ee9","value":"Passport"},
|
},
|
||||||
'BusinessLicense': {"text":"营业执照","color":"#f5222d","value":"BusinessLicense"},
|
HKPermit: {
|
||||||
|
text: '香港来往大陆通行证(回乡证)',
|
||||||
|
color: '#fa8c16',
|
||||||
|
value: 'HKPermit',
|
||||||
|
},
|
||||||
|
MOPermit: {
|
||||||
|
text: '澳门来往大陆通行证(回乡证)',
|
||||||
|
color: '#faad14',
|
||||||
|
value: 'MOPermit',
|
||||||
|
},
|
||||||
|
TWPermit: {
|
||||||
|
text: '台湾来往大陆通行证(台胞证)',
|
||||||
|
color: '#87d068',
|
||||||
|
value: 'TWPermit',
|
||||||
|
},
|
||||||
|
Passport: { text: '护照', color: '#108ee9', value: 'Passport' },
|
||||||
|
BusinessLicense: {
|
||||||
|
text: '营业执照',
|
||||||
|
color: '#f5222d',
|
||||||
|
value: 'BusinessLicense',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsHouseRelationEnum
|
// HouseOccupantsHouseRelationEnum
|
||||||
export const HouseOccupantsHouseRelationEnum = {
|
export const HouseOccupantsHouseRelationEnum = {
|
||||||
'Owner': {"text":"产权人","color":"#2db7f5","value":"Owner"},
|
Owner: { text: '产权人', color: '#2db7f5', value: 'Owner' },
|
||||||
'Resident': {"text":"住户","color":"#87d068","value":"Resident"},
|
Resident: { text: '住户', color: '#87d068', value: 'Resident' },
|
||||||
'Tenant': {"text":"租户","color":"#fa8c16","value":"Tenant"},
|
Tenant: { text: '租客', color: '#fa8c16', value: 'Tenant' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsRelationWithOwnerEnum
|
// HouseOccupantsRelationWithOwnerEnum
|
||||||
export const HouseOccupantsRelationWithOwnerEnum = {
|
export const HouseOccupantsRelationWithOwnerEnum = {
|
||||||
'Self': {"text":"本人","color":"#52c41a","value":"Self"},
|
Self: { text: '本人', color: '#52c41a', value: 'Self' },
|
||||||
'Spouse': {"text":"夫妻","color":"#2db7f5","value":"Spouse"},
|
Spouse: { text: '夫妻', color: '#2db7f5', value: 'Spouse' },
|
||||||
'FatherSon': {"text":"父子","color":"#faad14","value":"FatherSon"},
|
FatherSon: { text: '父子', color: '#faad14', value: 'FatherSon' },
|
||||||
'MotherSon': {"text":"母子","color":"#fa8c16","value":"MotherSon"},
|
MotherSon: { text: '母子', color: '#fa8c16', value: 'MotherSon' },
|
||||||
'Children': {"text":"子女","color":"#87d068","value":"Children"},
|
Children: { text: '子女', color: '#87d068', value: 'Children' },
|
||||||
'ContactPerson': {"text":"指定联系人","color":"#f5222d","value":"ContactPerson"},
|
ContactPerson: {
|
||||||
|
text: '指定联系人',
|
||||||
|
color: '#f5222d',
|
||||||
|
value: 'ContactPerson',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsStatusEnum
|
// HouseOccupantsStatusEnum
|
||||||
export const HouseOccupantsStatusEnum = {
|
export const HouseOccupantsStatusEnum = {
|
||||||
'Normal': {"text":"正常","color":"#52c41a","value":"Normal"},
|
Normal: { text: '正常', color: '#52c41a', value: 'Normal' },
|
||||||
'Unbound': {"text":"已解除","color":"#f5222d","value":"Unbound"},
|
Unbound: { text: '已解除', color: '#f5222d', value: 'Unbound' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// 订单状态枚举
|
// 订单状态枚举
|
||||||
export const HouseOrdersOrderStatusEnum = {
|
export const HouseOrdersOrderStatusEnum = {
|
||||||
'Pending': {"text":"待支付","color":"#facc15","value":"Pending"},
|
Pending: { text: '待支付', color: '#facc15', value: 'Pending' },
|
||||||
'Paid': {"text":"已支付","color":"#10b981","value":"Paid"},
|
Paid: { text: '已支付', color: '#10b981', value: 'Paid' },
|
||||||
'Refunded': {"text":"已退款","color":"#60a5fa","value":"Refunded"},
|
Refunded: { text: '已退款', color: '#60a5fa', value: 'Refunded' },
|
||||||
'Cancelled': {"text":"已取消","color":"#9ca3af","value":"Cancelled"},
|
Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOrdersPaymentMethodEnum
|
// HouseOrdersPaymentMethodEnum
|
||||||
export const HouseOrdersPaymentMethodEnum = {
|
export const HouseOrdersPaymentMethodEnum = {
|
||||||
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
|
WeChat: { text: '微信', color: '#07c160', value: 'WeChat' },
|
||||||
'Alipay': {"text":"支付宝","color":"#1677ff","value":"Alipay"},
|
Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' },
|
||||||
'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"},
|
BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' },
|
||||||
'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"},
|
TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersCustomerTypeEnum
|
// HouseRegistersCustomerTypeEnum
|
||||||
export const HouseRegistersCustomerTypeEnum = {
|
export const HouseRegistersCustomerTypeEnum = {
|
||||||
'Individual': {"text":"个人客户","color":"#2db7f5","value":"Individual"},
|
Individual: { text: '个人客户', color: '#2db7f5', value: 'Individual' },
|
||||||
'Enterprise': {"text":"普通企业","color":"#87d068","value":"Enterprise"},
|
Enterprise: { text: '普通企业', color: '#87d068', value: 'Enterprise' },
|
||||||
'Developer': {"text":"开发企业","color":"#fa8c16","value":"Developer"},
|
Developer: { text: '开发企业', color: '#fa8c16', value: 'Developer' },
|
||||||
'Government': {"text":"政府组织","color":"#f5222d","value":"Government"},
|
Government: { text: '政府组织', color: '#f5222d', value: 'Government' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersHouseStatusEnum
|
// HouseRegistersHouseStatusEnum
|
||||||
export const HouseRegistersHouseStatusEnum = {
|
export const HouseRegistersHouseStatusEnum = {
|
||||||
'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"},
|
SelfOccupied: { text: '自住', color: '#28a745', value: 'SelfOccupied' },
|
||||||
'Rented': {"text":"出租","color":"#007bff","value":"Rented"},
|
Rented: { text: '出租', color: '#007bff', value: 'Rented' },
|
||||||
'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"},
|
Vacant: { text: '空置', color: '#dc3545', value: 'Vacant' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersStatusEnum
|
// HouseRegistersStatusEnum
|
||||||
export const HouseRegistersStatusEnum = {
|
export const HouseRegistersStatusEnum = {
|
||||||
'Pending': {"text":"待审","color":"#faad14","value":"Pending"},
|
Pending: { text: '待审', color: '#faad14', value: 'Pending' },
|
||||||
'Approved': {"text":"已审","color":"#52c41a","value":"Approved"},
|
Approved: { text: '已审', color: '#52c41a', value: 'Approved' },
|
||||||
'Rejected': {"text":"驳回","color":"#f5222d","value":"Rejected"},
|
Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersTypeEnum
|
// HouseRegistersTypeEnum
|
||||||
export const HouseRegistersTypeEnum = {
|
export const HouseRegistersTypeEnum = {
|
||||||
'Delivery': {"text":"交付登记","color":"#2db7f5","value":"Delivery"},
|
Delivery: { text: '交付登记', color: '#2db7f5', value: 'Delivery' },
|
||||||
'Transfer': {"text":"过户登记","color":"#87d068","value":"Transfer"},
|
Transfer: { text: '过户登记', color: '#87d068', value: 'Transfer' },
|
||||||
'AddOccupant': {"text":"添加住户","color":"#108ee9","value":"AddOccupant"},
|
AddOccupant: { text: '添加住户', color: '#108ee9', value: 'AddOccupant' },
|
||||||
|
MoveOut: { text: '搬离登记', color: '#f50', value: 'MoveOut' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersUsagePlanEnum
|
// HouseRegistersUsagePlanEnum
|
||||||
export const HouseRegistersUsagePlanEnum = {
|
export const HouseRegistersUsagePlanEnum = {
|
||||||
'Permanent': {"text":"常住","color":"#52c41a","value":"Permanent"},
|
Permanent: { text: '常住', color: '#52c41a', value: 'Permanent' },
|
||||||
'Vacation': {"text":"度假","color":"#faad14","value":"Vacation"},
|
Vacation: { text: '度假', color: '#faad14', value: 'Vacation' },
|
||||||
'Rental': {"text":"出租","color":"#2db7f5","value":"Rental"},
|
Rental: { text: '出租', color: '#2db7f5', value: 'Rental' },
|
||||||
'Commercial': {"text":"商用","color":"#f5222d","value":"Commercial"},
|
Commercial: { text: '商用', color: '#f5222d', value: 'Commercial' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// OrganizationsTypeEnum
|
// OrganizationsTypeEnum
|
||||||
export const OrganizationsTypeEnum = {
|
export const OrganizationsTypeEnum = {
|
||||||
'Group': {"text":"集团","color":"#007bff","value":"Group"},
|
Group: { text: '集团', color: '#007bff', value: 'Group' },
|
||||||
'Company': {"text":"公司","color":"#28a745","value":"Company"},
|
Company: { text: '公司', color: '#28a745', value: 'Company' },
|
||||||
'ManagementOffice': {"text":"管理处","color":"#ffc107","value":"ManagementOffice"},
|
ManagementOffice: {
|
||||||
'Department': {"text":"部门","color":"#dc3545","value":"Department"},
|
text: '管理处',
|
||||||
|
color: '#ffc107',
|
||||||
|
value: 'ManagementOffice',
|
||||||
|
},
|
||||||
|
Department: { text: '部门', color: '#dc3545', value: 'Department' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// 性别
|
// 性别
|
||||||
export const SexEnum = {
|
export const SexEnum = {
|
||||||
'Male': {"text":"男","color":"#0000ff","value":"Male"},
|
Male: { text: '男', color: '#0000ff', value: 'Male' },
|
||||||
'FeMale': {"text":"女","color":"#ff0000","value":"FeMale"},
|
FeMale: { text: '女', color: '#ff0000', value: 'FeMale' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// SysModuleEnum
|
// SysModuleEnum
|
||||||
export const SysModuleEnum = {
|
export const SysModuleEnum = {
|
||||||
'Admin': {"text":"管理员","color":"#cf1322","value":"Admin"},
|
Admin: { text: '管理员', color: '#cf1322', value: 'Admin' },
|
||||||
'Customer': {"text":"客户","color":"#d4b106","value":"Customer"},
|
Customer: { text: '客户', color: '#d4b106', value: 'Customer' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// SysPermissionsTypeEnum
|
// SysPermissionsTypeEnum
|
||||||
export const SysPermissionsTypeEnum = {
|
export const SysPermissionsTypeEnum = {
|
||||||
'Directory': {"text":"目录","color":"#6d7e14","value":"Directory"},
|
Directory: { text: '目录', color: '#6d7e14', value: 'Directory' },
|
||||||
'Page': {"text":"页面","color":"#4d9a13","value":"Page"},
|
Page: { text: '页面', color: '#4d9a13', value: 'Page' },
|
||||||
'Button': {"text":"按钮","color":"#97224f","value":"Button"},
|
Button: { text: '按钮', color: '#97224f', value: 'Button' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// WechatAuthsPlatformEnum
|
||||||
|
export const WechatAuthsPlatformEnum = {
|
||||||
|
MiniProgram: { text: '微信小程序', color: '#3b82f6', value: 'MiniProgram' },
|
||||||
|
MpOfficial: { text: '微信公众号', color: '#22c55e', value: 'MpOfficial' },
|
||||||
|
WorkWechat: { text: '企业微信', color: '#6366f1', value: 'WorkWechat' },
|
||||||
|
};
|
||||||
|
|||||||
46
src/pages/archive/asset_house/$id.tsx
Normal file
46
src/pages/archive/asset_house/$id.tsx
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import { MyPageContainer } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { ProCard } from '@ant-design/pro-components';
|
||||||
|
import { useParams } from '@umijs/max';
|
||||||
|
import { Tabs } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import HouseInfo from './components/HouseInfo';
|
||||||
|
import OccupantsNow from './table/OccupantsNow';
|
||||||
|
|
||||||
|
export default function Show({ title = '房屋详情' }) {
|
||||||
|
const { id } = useParams<{ id: string }>();
|
||||||
|
const [data, setShow] = useState<any>({});
|
||||||
|
const loadShow = () => {
|
||||||
|
let paramsId: any = { id: id ?? 0 };
|
||||||
|
Apis.Asset.AssetHouses.Show(paramsId).then((res) => {
|
||||||
|
setShow(res?.data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
useEffect(() => {
|
||||||
|
loadShow();
|
||||||
|
}, [id]);
|
||||||
|
|
||||||
|
let items = [
|
||||||
|
{
|
||||||
|
label: '当前信息',
|
||||||
|
key: '1',
|
||||||
|
closable: false,
|
||||||
|
children: <OccupantsNow item={data} reload={() => loadShow()} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '历史信息',
|
||||||
|
key: '2',
|
||||||
|
closable: false,
|
||||||
|
// children: <MyAssetBuildings item={data} />,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyPageContainer title={title}>
|
||||||
|
<HouseInfo item={data} />
|
||||||
|
<ProCard>
|
||||||
|
<Tabs type="card" items={items} />
|
||||||
|
</ProCard>
|
||||||
|
</MyPageContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
71
src/pages/archive/asset_house/components/HouseInfo.tsx
Normal file
71
src/pages/archive/asset_house/components/HouseInfo.tsx
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
||||||
|
import {
|
||||||
|
AssetHousesOrientationEnum,
|
||||||
|
AssetHousesOwnershipTypeEnum,
|
||||||
|
AssetHousesStatusEnum,
|
||||||
|
AssetHousesUsageEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
|
||||||
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<ProCard>
|
||||||
|
<ProDescriptions bordered>
|
||||||
|
<ProDescriptions.Item label="房屋全名" span={2}>
|
||||||
|
{props?.item?.full_name}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="房号">
|
||||||
|
{props?.item?.name}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="楼层">
|
||||||
|
{props?.item?.floor}层
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="房屋用途">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={AssetHousesUsageEnum}
|
||||||
|
value={props?.item?.usage}
|
||||||
|
key="usage"
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="产权性质">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={AssetHousesOwnershipTypeEnum}
|
||||||
|
value={props?.item?.ownership_type}
|
||||||
|
key="ownership_type"
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="建筑面积">
|
||||||
|
{props?.item?.built_area}m²
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="套内面积">
|
||||||
|
{props?.item?.inside_area}m²
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="计费面积">
|
||||||
|
{props?.item?.chargeable_area}m²
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="房屋状态">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={AssetHousesStatusEnum}
|
||||||
|
value={props?.item?.status}
|
||||||
|
key="status"
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="户型">
|
||||||
|
{props?.item?.room || ''}房{props?.item?.hall || ''}厅
|
||||||
|
{props?.item?.bathroom || ''}卫{props?.item?.kitchen || ''}厨
|
||||||
|
{props?.item?.balcony || ''}阳台
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="朝向">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={AssetHousesOrientationEnum}
|
||||||
|
value={props?.item?.orientation}
|
||||||
|
key="orientation"
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}
|
||||||
119
src/pages/archive/asset_house/index.tsx
Normal file
119
src/pages/archive/asset_house/index.tsx
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
import {
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
AssetHousesOwnershipTypeEnum,
|
||||||
|
AssetHousesStatusEnum,
|
||||||
|
AssetHousesUsageEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import Delivery from './modals/Delivery';
|
||||||
|
|
||||||
|
export default function Index({ title = '房屋档案' }) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyPageContainer title={title}>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
// search={false}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(params, sort, Apis.Asset.AssetHouses.List)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '产权性质',
|
||||||
|
dataIndex: 'ownership_type',
|
||||||
|
valueEnum: AssetHousesOwnershipTypeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '用途',
|
||||||
|
dataIndex: 'usage',
|
||||||
|
valueEnum: AssetHousesUsageEnum,
|
||||||
|
search: false,
|
||||||
|
width: 80,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '房屋名称',
|
||||||
|
dataIndex: 'full_name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '楼层',
|
||||||
|
dataIndex: 'floor',
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.floor}层`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
width: 60,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '建筑面积',
|
||||||
|
dataIndex: 'built_area',
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.built_area} m²`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '套内面积',
|
||||||
|
dataIndex: 'inside_area',
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.inside_area} m²`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '计费面积',
|
||||||
|
dataIndex: 'chargeable_area',
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.chargeable_area} m²`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '房屋状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: AssetHousesStatusEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
{/* <HousesOccupantsShow item={item} reload={action?.reload} />
|
||||||
|
*/}
|
||||||
|
<MyButtons.View
|
||||||
|
title="详情"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/archive/asset_house/${item.id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{!item?.house_occupants?.length && (
|
||||||
|
<Delivery item={item} reload={action?.reload} title="登记" />
|
||||||
|
)}
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Asset.AssetBuildings.Delete({ id: item.id }).then(() =>
|
||||||
|
action?.reload(),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
220
src/pages/archive/asset_house/modals/AddOccupant.tsx
Normal file
220
src/pages/archive/asset_house/modals/AddOccupant.tsx
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseOccupantsCardTypeEnum,
|
||||||
|
HouseOccupantsHouseRelationEnum,
|
||||||
|
HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`${props.title}`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="900px"
|
||||||
|
form={form}
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default title={props.title} size="middle" type="primary" />
|
||||||
|
}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Store({
|
||||||
|
...values,
|
||||||
|
asset_houses_id: props?.item?.id,
|
||||||
|
type: 'AddOccupant',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'customer_info',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
copyIconProps: false,
|
||||||
|
creatorButtonProps: {
|
||||||
|
creatorButtonText: '添加住户',
|
||||||
|
style: { color: 'red' },
|
||||||
|
danger: true,
|
||||||
|
},
|
||||||
|
itemRender: (
|
||||||
|
{ listDom, action }: any,
|
||||||
|
{ index }: { index: number },
|
||||||
|
) => {
|
||||||
|
return (
|
||||||
|
<ProCard
|
||||||
|
bordered
|
||||||
|
style={{ marginBlockEnd: 8 }}
|
||||||
|
title={`住户${index + 1}`}
|
||||||
|
extra={action}
|
||||||
|
bodyStyle={{ paddingBlockEnd: 0 }}
|
||||||
|
>
|
||||||
|
{listDom}
|
||||||
|
</ProCard>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'house_relation',
|
||||||
|
title: '住户类型',
|
||||||
|
colProps: { span: 4 },
|
||||||
|
valueEnum: () => {
|
||||||
|
let obj: any = JSON.parse(
|
||||||
|
JSON.stringify(HouseOccupantsHouseRelationEnum),
|
||||||
|
);
|
||||||
|
delete obj.Owner;
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
name: ['house_relation'],
|
||||||
|
valueType: 'dependency',
|
||||||
|
columns: ({ house_relation }: any) => {
|
||||||
|
return house_relation === 'Resident'
|
||||||
|
? [
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'relation_with_owner',
|
||||||
|
title: '住户类型',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
valueEnum: () => {
|
||||||
|
let obj: any = JSON.parse(
|
||||||
|
JSON.stringify(
|
||||||
|
HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
delete obj.Self;
|
||||||
|
delete obj.ContactPerson;
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'relation_with_owner',
|
||||||
|
title: '住户类型',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
// valueEnum: HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
valueEnum: () => {
|
||||||
|
let obj: any = JSON.parse(
|
||||||
|
JSON.stringify(
|
||||||
|
HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
delete obj.ContactPerson;
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否入住',
|
||||||
|
dataIndex: 'is_live_in',
|
||||||
|
colProps: { span: 4 },
|
||||||
|
valueType: 'switch',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: ['is_live_in'],
|
||||||
|
valueType: 'dependency',
|
||||||
|
columns: ({ is_live_in }: any) => {
|
||||||
|
return is_live_in
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
title: '入住日期',
|
||||||
|
dataIndex: 'move_in_date',
|
||||||
|
valueType: 'date',
|
||||||
|
colProps: { span: 4 },
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: [,];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'card_type',
|
||||||
|
title: '证件类型',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseOccupantsCardTypeEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '证件号码',
|
||||||
|
dataIndex: 'id_card',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 18,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_front_image',
|
||||||
|
title: '证件正面',
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_back_image',
|
||||||
|
title: '证件反面',
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -8,11 +8,8 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import {
|
||||||
HouseOccupantsCardTypeEnum,
|
HouseOccupantsCardTypeEnum,
|
||||||
HouseOccupantsHouseRelationEnum,
|
|
||||||
HouseOccupantsRelationWithOwnerEnum,
|
|
||||||
HouseRegistersCustomerTypeEnum,
|
HouseRegistersCustomerTypeEnum,
|
||||||
HouseRegistersHouseStatusEnum,
|
HouseRegistersHouseStatusEnum,
|
||||||
HouseRegistersTypeEnum,
|
|
||||||
HouseRegistersUsagePlanEnum,
|
HouseRegistersUsagePlanEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
@ -39,6 +36,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
Apis.Archive.HouseRegisters.Store({
|
Apis.Archive.HouseRegisters.Store({
|
||||||
...values,
|
...values,
|
||||||
asset_houses_id: props?.item?.id,
|
asset_houses_id: props?.item?.id,
|
||||||
|
type: 'Delivery',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -49,11 +47,23 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'customer_type',
|
||||||
title: '类型',
|
title: '客户类型',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 12 },
|
||||||
valueEnum: HouseRegistersTypeEnum,
|
valueEnum: HouseRegistersCustomerTypeEnum,
|
||||||
required: true,
|
}),
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'house_status',
|
||||||
|
title: '房屋状态',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseRegistersHouseStatusEnum,
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'usage_plan',
|
||||||
|
title: '使用计划',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseRegistersUsagePlanEnum,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
valueType: 'formList',
|
valueType: 'formList',
|
||||||
@ -62,7 +72,9 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
fieldProps: {
|
fieldProps: {
|
||||||
copyIconProps: false,
|
copyIconProps: false,
|
||||||
creatorButtonProps: {
|
creatorButtonProps: {
|
||||||
creatorButtonText: '添加客户',
|
creatorButtonText: '增加产权人',
|
||||||
|
style: { color: 'red' },
|
||||||
|
danger: true,
|
||||||
},
|
},
|
||||||
itemRender: (
|
itemRender: (
|
||||||
{ listDom, action }: any,
|
{ listDom, action }: any,
|
||||||
@ -72,7 +84,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
<ProCard
|
<ProCard
|
||||||
bordered
|
bordered
|
||||||
style={{ marginBlockEnd: 8 }}
|
style={{ marginBlockEnd: 8 }}
|
||||||
title={`客户${index + 1}`}
|
title={`产权人${index + 1}`}
|
||||||
extra={action}
|
extra={action}
|
||||||
bodyStyle={{ paddingBlockEnd: 0 }}
|
bodyStyle={{ paddingBlockEnd: 0 }}
|
||||||
>
|
>
|
||||||
@ -88,126 +100,79 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 12 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手机号',
|
title: '手机号',
|
||||||
dataIndex: 'phone',
|
dataIndex: 'phone',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 6 },
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
},
|
},
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
},
|
},
|
||||||
MyFormItems.EnumSelect({
|
|
||||||
key: 'house_relation',
|
|
||||||
title: '房客关系',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
valueEnum: HouseOccupantsHouseRelationEnum,
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '客户地址',
|
title: '备用手机号',
|
||||||
dataIndex: 'address',
|
dataIndex: 'reserve_phone',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 6 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '解除时间',
|
|
||||||
dataIndex: 'unbound_time',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
valueType: 'date',
|
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
style: { width: '100%' },
|
maxLength: 11,
|
||||||
},
|
},
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
},
|
||||||
MyFormItems.EnumSelect({
|
|
||||||
key: 'relation_with_owner',
|
|
||||||
title: '与产权人关系',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
valueEnum: HouseOccupantsRelationWithOwnerEnum,
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
MyFormItems.EnumSelect({
|
MyFormItems.EnumSelect({
|
||||||
key: 'card_type',
|
key: 'card_type',
|
||||||
title: '证件类型',
|
title: '证件类型',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 12 },
|
||||||
valueEnum: HouseOccupantsCardTypeEnum,
|
valueEnum: HouseOccupantsCardTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '证件号码',
|
title: '证件号码',
|
||||||
dataIndex: 'id_card',
|
dataIndex: 'id_card',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 12 },
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
maxLength: 18,
|
maxLength: 18,
|
||||||
},
|
},
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '是否在居住中',
|
// {
|
||||||
dataIndex: 'is_live_in',
|
// title: '是否在居住中',
|
||||||
colProps: { span: 8 },
|
// dataIndex: 'is_live_in',
|
||||||
valueType: 'switch',
|
// colProps: { span: 8 },
|
||||||
},
|
// valueType: 'switch',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
valueType: 'group',
|
valueType: 'group',
|
||||||
columns: [
|
columns: [
|
||||||
MyFormItems.UploadImages({
|
MyFormItems.UploadImages({
|
||||||
key: 'card_front_image',
|
key: 'card_front_image',
|
||||||
title: '身份证正面',
|
title: '证件正面',
|
||||||
max: 1,
|
max: 1,
|
||||||
colProps: { span: 8 },
|
colProps: { span: 4 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
}),
|
}),
|
||||||
MyFormItems.UploadImages({
|
MyFormItems.UploadImages({
|
||||||
key: 'card_back_image',
|
key: 'card_back_image',
|
||||||
title: '身份证反面',
|
title: '证件反面',
|
||||||
max: 1,
|
max: 1,
|
||||||
colProps: { span: 8 },
|
colProps: { span: 4 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
MyFormItems.UploadImages({
|
MyFormItems.UploadImages({
|
||||||
key: 'ownership_info',
|
key: 'ownership_info',
|
||||||
title: '产权信息',
|
title: '产权文件',
|
||||||
max: 100,
|
max: 100,
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.array },
|
formItemProps: { ...rulesHelper.array },
|
||||||
}),
|
}),
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'customer_type',
|
|
||||||
title: '客户类型',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
valueEnum: HouseRegistersCustomerTypeEnum,
|
|
||||||
}),
|
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'usage_plan',
|
|
||||||
title: '使用计划',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
valueEnum: HouseRegistersUsagePlanEnum,
|
|
||||||
}),
|
|
||||||
// MyFormItems.EnumRadio({
|
|
||||||
// key: 'status',
|
|
||||||
// title: '状态',
|
|
||||||
// colProps: { span: 24 },
|
|
||||||
// valueEnum: HouseRegistersStatusEnum,
|
|
||||||
// }),
|
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'house_status',
|
|
||||||
title: '房屋状态',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
valueEnum: HouseRegistersHouseStatusEnum,
|
|
||||||
}),
|
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
48
src/pages/archive/asset_house/modals/MoveOut.tsx
Normal file
48
src/pages/archive/asset_house/modals/MoveOut.tsx
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import { MyBetaModalFormProps, MyButtons, MyModalFormProps } from '@/common';
|
||||||
|
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.Archive.HouseRegisters.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`添加${props.title}`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
form={form}
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default title={props.title} size="small" type="link" />
|
||||||
|
}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Store({
|
||||||
|
...values,
|
||||||
|
asset_houses_id: props?.item?.id,
|
||||||
|
type: 'MoveOut',
|
||||||
|
customer_info: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: '搬离日期',
|
||||||
|
valueType: 'date',
|
||||||
|
dataIndex: '',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
179
src/pages/archive/asset_house/modals/Transfer.tsx
Normal file
179
src/pages/archive/asset_house/modals/Transfer.tsx
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseOccupantsCardTypeEnum,
|
||||||
|
HouseRegistersCustomerTypeEnum,
|
||||||
|
HouseRegistersHouseStatusEnum,
|
||||||
|
HouseRegistersUsagePlanEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`${props.title}`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="900px"
|
||||||
|
form={form}
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default title={props.title} size="middle" type="primary" />
|
||||||
|
}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Store({
|
||||||
|
...values,
|
||||||
|
asset_houses_id: props?.item?.id,
|
||||||
|
type: 'Transfer',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'customer_type',
|
||||||
|
title: '客户类型',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
valueEnum: HouseRegistersCustomerTypeEnum,
|
||||||
|
}),
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'house_status',
|
||||||
|
title: '房屋状态',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseRegistersHouseStatusEnum,
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'usage_plan',
|
||||||
|
title: '使用计划',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseRegistersUsagePlanEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'customer_info',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
copyIconProps: false,
|
||||||
|
creatorButtonProps: {
|
||||||
|
creatorButtonText: '增加产权人',
|
||||||
|
style: { color: 'red' },
|
||||||
|
danger: true,
|
||||||
|
},
|
||||||
|
itemRender: (
|
||||||
|
{ listDom, action }: any,
|
||||||
|
{ index }: { index: number },
|
||||||
|
) => {
|
||||||
|
return (
|
||||||
|
<ProCard
|
||||||
|
bordered
|
||||||
|
style={{ marginBlockEnd: 8 }}
|
||||||
|
title={`产权人${index + 1}`}
|
||||||
|
extra={action}
|
||||||
|
bodyStyle={{ paddingBlockEnd: 0 }}
|
||||||
|
>
|
||||||
|
{listDom}
|
||||||
|
</ProCard>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备用手机号',
|
||||||
|
dataIndex: 'reserve_phone',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'card_type',
|
||||||
|
title: '证件类型',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
valueEnum: HouseOccupantsCardTypeEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '证件号码',
|
||||||
|
dataIndex: 'id_card',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 18,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
|
||||||
|
// {
|
||||||
|
// title: '是否在居住中',
|
||||||
|
// dataIndex: 'is_live_in',
|
||||||
|
// colProps: { span: 8 },
|
||||||
|
// valueType: 'switch',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_front_image',
|
||||||
|
title: '证件正面',
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_back_image',
|
||||||
|
title: '证件反面',
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'ownership_info',
|
||||||
|
title: '产权文件',
|
||||||
|
max: 100,
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.array },
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
151
src/pages/archive/asset_house/modals/Update.tsx
Normal file
151
src/pages/archive/asset_house/modals/Update.tsx
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Address } from '@/components/Address';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
AssetProjectsChargeEnum,
|
||||||
|
AssetProjectsEntrustTypeEnum,
|
||||||
|
AssetProjectsPropertyTypeEnum,
|
||||||
|
AssetProjectsStatusEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { message } from 'antd';
|
||||||
|
|
||||||
|
export default function Update(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Update>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`编辑${props.title}`}
|
||||||
|
trigger={<MyButtons.Default title="编辑" type="primary" size="small" />}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="800px"
|
||||||
|
request={() =>
|
||||||
|
Promise.resolve({
|
||||||
|
...props.item,
|
||||||
|
casacader: [
|
||||||
|
props.item?.province_id || '',
|
||||||
|
props.item?.city_id || '',
|
||||||
|
props.item?.area_id || '',
|
||||||
|
props.item?.street_id || '',
|
||||||
|
],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Update({
|
||||||
|
...values,
|
||||||
|
id: props.item?.id ?? 0,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
key: 'name',
|
||||||
|
title: '项目名称',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'alias_name',
|
||||||
|
title: '项目别名',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
},
|
||||||
|
Selects?.Companies({
|
||||||
|
key: 'companies_id',
|
||||||
|
title: '所属机构',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
}),
|
||||||
|
// {
|
||||||
|
// key: 'code',
|
||||||
|
// title: '项目编码',
|
||||||
|
// colProps: { span: 8 },
|
||||||
|
// formItemProps: { ...rulesHelper.text },
|
||||||
|
// },
|
||||||
|
Address.Cascader({
|
||||||
|
key: 'casacader',
|
||||||
|
title: '选择地址',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
keys: ['province', 'city', 'area', 'street'],
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'address',
|
||||||
|
title: '详细地址',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'longitude',
|
||||||
|
title: '经度',
|
||||||
|
colProps: { span: 3 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'latitude',
|
||||||
|
title: '纬度',
|
||||||
|
colProps: { span: 3 },
|
||||||
|
},
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'property_type',
|
||||||
|
title: '项目类型',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: AssetProjectsPropertyTypeEnum,
|
||||||
|
// required: true,
|
||||||
|
}),
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'status',
|
||||||
|
title: '项目状态',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: AssetProjectsStatusEnum,
|
||||||
|
// required: true,
|
||||||
|
}),
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'entrust_type',
|
||||||
|
title: '委托类型',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: AssetProjectsEntrustTypeEnum,
|
||||||
|
// required: true,
|
||||||
|
}),
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'charge',
|
||||||
|
title: '收费方式',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: AssetProjectsChargeEnum,
|
||||||
|
// required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'takeover_date',
|
||||||
|
title: '接管日期',
|
||||||
|
valueType: 'date',
|
||||||
|
fieldProps: {
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colProps: { span: 6 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'closure_date',
|
||||||
|
title: '封园日期',
|
||||||
|
valueType: 'date',
|
||||||
|
fieldProps: {
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colProps: { span: 6 },
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
109
src/pages/archive/asset_house/table/OccupantsNow.tsx
Normal file
109
src/pages/archive/asset_house/table/OccupantsNow.tsx
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
import { MyColumns, MyProTableProps } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseOccupantsHouseRelationEnum,
|
||||||
|
HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
HouseOccupantsStatusEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import { useEffect, useRef } from 'react';
|
||||||
|
import AddOccupant from '../modals/AddOccupant';
|
||||||
|
import MoveOut from '../modals/MoveOut';
|
||||||
|
import Transfer from '../modals/Transfer';
|
||||||
|
|
||||||
|
export default function Index({ ...rest }) {
|
||||||
|
const actionLooks = useRef<any>();
|
||||||
|
useEffect(() => {
|
||||||
|
actionLooks?.current.reloadAndRest();
|
||||||
|
}, [rest.loadmore]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ProTable<Record<any, any>>
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
actionRef={actionLooks}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
asset_houses_id: rest.item?.id,
|
||||||
|
status: 'Normal',
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.Archive.HouseOccupants.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
toolBarRender={(action) => [
|
||||||
|
<Transfer
|
||||||
|
key="Transfer"
|
||||||
|
item={rest.item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title=" 过户登记"
|
||||||
|
/>,
|
||||||
|
<AddOccupant
|
||||||
|
key="AddOccupant"
|
||||||
|
item={rest.item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="添加住户"
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
|
search={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '房客关系',
|
||||||
|
dataIndex: 'house_relation',
|
||||||
|
valueEnum: HouseOccupantsHouseRelationEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '与产权人关系',
|
||||||
|
dataIndex: 'relation_with_owner',
|
||||||
|
valueEnum: HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '电话',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '是否入住',
|
||||||
|
dataIndex: 'is_live_in',
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.is_live_in ? '是' : '-'} `;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '入住日期',
|
||||||
|
dataIndex: 'is_live_in',
|
||||||
|
render(_, record) {
|
||||||
|
return `待补充`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: HouseOccupantsStatusEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
// MyColumns.UpdatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
{/* <GridCreateUpdate item={item} reload={action?.reload} /> */}
|
||||||
|
{item?.is_live_in && (
|
||||||
|
<MoveOut item={item} reload={action?.reload} title="搬离" />
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -5,20 +5,15 @@ import {
|
|||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import { AssetHousesUsageEnum } from '@/gen/Enums';
|
||||||
AssetHousesOwnershipTypeEnum,
|
|
||||||
AssetHousesStatusEnum,
|
|
||||||
AssetHousesUsageEnum,
|
|
||||||
} from '@/gen/Enums';
|
|
||||||
import { ProCard, ProTable } from '@ant-design/pro-components';
|
import { ProCard, ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
import BuildingsCreate from '../modals/BuildingsCreate';
|
import BuildingsCreate from '../modals/BuildingsCreate';
|
||||||
import AssetBuildingsUpdate from '../modals/BuildingsUpdate';
|
import AssetBuildingsUpdate from '../modals/BuildingsUpdate';
|
||||||
import AssetHousesCreate from '../modals/HousesCreate';
|
import AssetHousesCreate from '../modals/HousesCreate';
|
||||||
import AssetHousesShow from '../modals/HousesShow';
|
import HousesShow from '../modals/HousesShow';
|
||||||
import AssetHousesUpdate from '../modals/HousesUpdate';
|
import HousesUpdate from '../modals/HousesUpdate';
|
||||||
import RegistersCreate from '../modals/RegistersCreate';
|
|
||||||
import AssetUnitsCreate from '../modals/UnitsCreate';
|
import AssetUnitsCreate from '../modals/UnitsCreate';
|
||||||
import AssetUnitsUpdate from '../modals/UnitsUpdate';
|
import AssetUnitsUpdate from '../modals/UnitsUpdate';
|
||||||
|
|
||||||
@ -91,7 +86,7 @@ export default function AssetBuildings(props: MyBetaModalFormProps) {
|
|||||||
}
|
}
|
||||||
options={false}
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
// MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '楼栋名称',
|
title: '楼栋名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -148,7 +143,7 @@ export default function AssetBuildings(props: MyBetaModalFormProps) {
|
|||||||
}}
|
}}
|
||||||
options={false}
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
// MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '单元名称',
|
title: '单元名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -192,7 +187,6 @@ export default function AssetBuildings(props: MyBetaModalFormProps) {
|
|||||||
options={false}
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
|
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '用途',
|
title: '用途',
|
||||||
dataIndex: 'usage',
|
dataIndex: 'usage',
|
||||||
@ -209,30 +203,26 @@ export default function AssetBuildings(props: MyBetaModalFormProps) {
|
|||||||
return `${record?.floor}层`;
|
return `${record?.floor}层`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
// MyColumns.EnumTag({
|
||||||
title: '产权性质',
|
// title: '产权性质',
|
||||||
dataIndex: 'ownership_type',
|
// dataIndex: 'ownership_type',
|
||||||
valueEnum: AssetHousesOwnershipTypeEnum,
|
// valueEnum: AssetHousesOwnershipTypeEnum,
|
||||||
}),
|
// }),
|
||||||
MyColumns.EnumTag({
|
// MyColumns.EnumTag({
|
||||||
title: '房屋状态',
|
// title: '房屋状态',
|
||||||
dataIndex: 'status',
|
// dataIndex: 'status',
|
||||||
valueEnum: AssetHousesStatusEnum,
|
// valueEnum: AssetHousesStatusEnum,
|
||||||
}),
|
// }),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<AssetHousesShow item={item} reload={action?.reload} />
|
<HousesShow item={item} reload={action?.reload} />
|
||||||
<AssetHousesUpdate
|
<HousesUpdate
|
||||||
item={item}
|
item={item}
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
title="编辑"
|
title="编辑"
|
||||||
/>
|
/>
|
||||||
<RegistersCreate
|
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="登记"
|
|
||||||
/>
|
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
Apis.Asset.AssetBuildings.Delete({ id: item.id }).then(
|
Apis.Asset.AssetBuildings.Delete({ id: item.id }).then(
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import {
|
|||||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import AssetUpdate from '../modals/AssetUpdate';
|
import AssetUpdate from '../modals/AssetUpdate';
|
||||||
|
import BindCompany from '../modals/BindCompany';
|
||||||
|
|
||||||
export default function info(props: MyBetaModalFormProps) {
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -16,7 +17,9 @@ export default function info(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions bordered>
|
<ProDescriptions bordered>
|
||||||
<ProDescriptions.Item label="项目名称" span={2}>
|
<ProDescriptions.Item label="项目名称" span={2}>
|
||||||
<Space>
|
<Space>
|
||||||
{props?.item?.name}
|
<div>
|
||||||
|
【{props?.item?.id}】{props?.item?.name}
|
||||||
|
</div>
|
||||||
<AssetUpdate
|
<AssetUpdate
|
||||||
item={props?.item}
|
item={props?.item}
|
||||||
title="项目"
|
title="项目"
|
||||||
@ -84,8 +87,9 @@ export default function info(props: MyBetaModalFormProps) {
|
|||||||
<Space>
|
<Space>
|
||||||
<div>
|
<div>
|
||||||
【{props?.item?.company?.id}】{props?.item?.company?.name}
|
【{props?.item?.company?.id}】{props?.item?.company?.name}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<AssetUpdate item={props?.item} title="项目" />
|
<BindCompany item={props?.item} title="项目" reload={props?.reload}/>
|
||||||
</Space>
|
</Space>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
|
|||||||
@ -22,14 +22,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
<BetaSchemaForm<ApiTypes.Asset.AssetProjects.Update>
|
<BetaSchemaForm<ApiTypes.Asset.AssetProjects.Update>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`编辑${props.title}`}
|
title={`编辑${props.title}`}
|
||||||
trigger={
|
trigger={<MyButtons.Default title="编辑" type="primary" size="small" />}
|
||||||
<MyButtons.Default
|
|
||||||
title="修改"
|
|
||||||
color="primary"
|
|
||||||
variant="filled"
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="800px"
|
||||||
request={() =>
|
request={() =>
|
||||||
|
|||||||
51
src/pages/asset/asset_projects/modals/BindCompany.tsx
Normal file
51
src/pages/asset/asset_projects/modals/BindCompany.tsx
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
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 { message } from 'antd';
|
||||||
|
|
||||||
|
export default function Update(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Asset.AssetProjects.BindCompany>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`编辑${props.title}`}
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default
|
||||||
|
title="编辑"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
request={() =>
|
||||||
|
Promise.resolve({
|
||||||
|
...props.item,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Asset.AssetProjects.BindCompany({ ...values, projects_id: props.item?.id ?? 0 })
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '关联机构修改成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
|
||||||
|
Selects?.Companies({
|
||||||
|
key: 'companies_id',
|
||||||
|
title: '所属机构',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -178,8 +178,8 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
// },
|
// },
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'orientation',
|
key: 'orientation',
|
||||||
title: '房屋状态',
|
title: '房屋朝向',
|
||||||
colProps: { span: 6 },
|
colProps: { span: 24 },
|
||||||
valueEnum: AssetHousesOrientationEnum,
|
valueEnum: AssetHousesOrientationEnum,
|
||||||
// required: true,
|
// required: true,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -18,7 +18,6 @@ import { Form, message } from 'antd';
|
|||||||
|
|
||||||
export default function Update(props: MyBetaModalFormProps) {
|
export default function Update(props: MyBetaModalFormProps) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
console.log(props?.item, 'item');
|
|
||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Asset.AssetHouses.Update>
|
<BetaSchemaForm<ApiTypes.Asset.AssetHouses.Update>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
|
|||||||
@ -9,18 +9,12 @@ export default function info(props: MyBetaModalFormProps) {
|
|||||||
<Space direction="vertical" style={{ width: '100%' }}>
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
<ProCard extra={props.extra}>
|
<ProCard extra={props.extra}>
|
||||||
<ProDescriptions bordered>
|
<ProDescriptions bordered>
|
||||||
<ProDescriptions.Item label="机构名称">
|
<ProDescriptions.Item label="机构名称" span={3}>
|
||||||
<Space>
|
<Space>
|
||||||
{props?.item?.name}
|
{props?.item?.name}
|
||||||
<Update item={props?.item} title="机构" reload={props?.reload} />
|
<Update item={props?.item} title="机构" reload={props?.reload} />
|
||||||
</Space>
|
</Space>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="机构简称">
|
|
||||||
{props?.item?.short_name}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="营业执照号">
|
|
||||||
{props?.item?.business_license_number}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="商户类型">
|
<ProDescriptions.Item label="商户类型">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
Enums={CompaniesMerchantTypeEnum}
|
Enums={CompaniesMerchantTypeEnum}
|
||||||
@ -28,6 +22,13 @@ export default function info(props: MyBetaModalFormProps) {
|
|||||||
key="merchant_type"
|
key="merchant_type"
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="机构简称">
|
||||||
|
{props?.item?.short_name}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="营业执照号">
|
||||||
|
{props?.item?.business_license_number}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
<ProDescriptions.Item label="联系人姓名">
|
<ProDescriptions.Item label="联系人姓名">
|
||||||
{props?.item?.contact_name}
|
{props?.item?.contact_name}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
|||||||
@ -33,6 +33,12 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
options={false}
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
|
//to-do 按层级选择
|
||||||
|
{
|
||||||
|
title: '组织',
|
||||||
|
dataIndex: ['organization', 'name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -42,17 +48,12 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
dataIndex: 'phone',
|
dataIndex: 'phone',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '机构',
|
title: '岗位',
|
||||||
dataIndex: ['company', 'name'],
|
dataIndex: ['position', 'name'],
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '组织',
|
|
||||||
dataIndex: ['organization', 'name'],
|
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
|
|||||||
@ -44,18 +44,18 @@ export default function Organizations(props: MyBetaModalFormProps) {
|
|||||||
dataIndex: 'code',
|
dataIndex: 'code',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: '岗位排序',
|
||||||
|
// dataIndex: 'sort',
|
||||||
|
// search: false,
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: '岗位排序',
|
title: '岗位备注',
|
||||||
dataIndex: 'sort',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '备注',
|
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
|
|||||||
@ -5,13 +5,15 @@ import {
|
|||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
import { AssetProjectsChargeEnum, AssetProjectsEntrustTypeEnum, AssetProjectsPropertyTypeEnum, AssetProjectsStatusEnum, 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 OrganizationsCreate from '../modals/OrganizationsCreate';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import OrganizationsUpdate from '../modals/OrganizationsUpdate';
|
|
||||||
|
|
||||||
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
export default function Organizations(props: MyBetaModalFormProps) {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProTable
|
<ProTable
|
||||||
@ -21,56 +23,82 @@ export default function Organizations(props: MyBetaModalFormProps) {
|
|||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
{ ...params, companies_id: props?.item?.id },
|
{ ...params, companies_id: props?.item?.id },
|
||||||
sort,
|
sort,
|
||||||
Apis.Company.Organizations.List,
|
Apis.Asset.AssetProjects.List,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
// toolBarRender={(action) => [
|
||||||
<OrganizationsCreate
|
// <OrganizationsCreate
|
||||||
key="Create"
|
// key="Create"
|
||||||
reload={action?.reload}
|
// reload={action?.reload}
|
||||||
item={props?.item}
|
// item={props?.item}
|
||||||
title="组织"
|
// title="组织"
|
||||||
/>,
|
// />,
|
||||||
]}
|
// ]}
|
||||||
options={false}
|
// options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
{
|
|
||||||
title: '上级组织',
|
|
||||||
dataIndex: ['organization_parent', 'name'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '组织',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '类型',
|
title: '项目类型',
|
||||||
dataIndex: 'type',
|
dataIndex: 'property_type',
|
||||||
valueEnum: OrganizationsTypeEnum,
|
valueEnum: AssetProjectsPropertyTypeEnum,
|
||||||
|
search: false,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '负责人',
|
title: '项目名称',
|
||||||
dataIndex: ['manager', 'name'],
|
dataIndex: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '联系电话',
|
title: '项目别名',
|
||||||
dataIndex: 'manager_phone',
|
dataIndex: 'alias_name',
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: '项目编码',
|
||||||
|
// dataIndex: 'code',
|
||||||
|
// search: false,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '地址',
|
||||||
|
render: (_, i: any) => {
|
||||||
|
return `${i?.province || ''}${i?.city || ''}${i?.district || ''}${
|
||||||
|
i?.address || ''
|
||||||
|
}`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '项目状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: AssetProjectsStatusEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '委托类型',
|
||||||
|
dataIndex: 'entrust_type',
|
||||||
|
valueEnum: AssetProjectsEntrustTypeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '收费方式',
|
||||||
|
dataIndex: 'charge',
|
||||||
|
valueEnum: AssetProjectsChargeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.SoftDelete({
|
||||||
|
title: '启/禁用',
|
||||||
|
onRestore: Apis.Asset.AssetProjects.Restore,
|
||||||
|
onSoftDelete: Apis.Asset.AssetProjects.SoftDelete,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<OrganizationsUpdate
|
<MyButtons.View
|
||||||
item={{ ...item, companies_id: props?.item?.id }}
|
title="详情"
|
||||||
reload={action?.reload}
|
onClick={() => {
|
||||||
title="组织"
|
navigate(`/asset/asset_projects/${item.id}`);
|
||||||
/>
|
}}
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Company.Organizations.Delete({ id: item.id }).then(
|
|
||||||
() => action?.reload(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
|
|||||||
@ -9,9 +9,10 @@ import { Selects } from '@/components/Select';
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { SexEnum } from '@/gen/Enums';
|
import { SexEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Company.CompanyEmployees.Store>
|
<BetaSchemaForm<ApiTypes.Company.CompanyEmployees.Store>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
@ -19,6 +20,12 @@ 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}`} />}
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.CompanyEmployees.Store(values)
|
Apis.Company.CompanyEmployees.Store(values)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -30,7 +37,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
Selects?.Organizations({
|
Selects?.Organizations({
|
||||||
title: '所属组织',
|
title: '设置所属组织',
|
||||||
params: { companies_id: props?.item?.companies_id },
|
params: { companies_id: props?.item?.companies_id },
|
||||||
key: 'organizations_id',
|
key: 'organizations_id',
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
@ -49,7 +56,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
},
|
},
|
||||||
colProps: { span: 12 },
|
colProps: { span: 12 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.phone },
|
||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'sex',
|
key: 'sex',
|
||||||
@ -58,13 +65,18 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
valueEnum: SexEnum,
|
valueEnum: SexEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
|
Selects?.Positions({
|
||||||
{
|
title: '岗位',
|
||||||
key: 'password',
|
params: { companies_id: props?.item?.companies_id },
|
||||||
title: '密码',
|
key: 'positions_id',
|
||||||
colProps: { span: 24 },
|
formItemProps: { ...rulesHelper.text },
|
||||||
valueType: 'password',
|
}),
|
||||||
},
|
// {
|
||||||
|
// key: 'password',
|
||||||
|
// title: '密码',
|
||||||
|
// colProps: { span: 24 },
|
||||||
|
// valueType: 'password',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
|
|||||||
@ -62,7 +62,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
},
|
},
|
||||||
colProps: { span: 12 },
|
colProps: { span: 12 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.phone },
|
||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'sex',
|
key: 'sex',
|
||||||
@ -71,13 +71,18 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
valueEnum: SexEnum,
|
valueEnum: SexEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
|
Selects?.Positions({
|
||||||
{
|
title: '岗位',
|
||||||
key: 'password',
|
params: { companies_id: props?.item?.companies_id },
|
||||||
title: '密码',
|
key: 'positions_id',
|
||||||
colProps: { span: 24 },
|
formItemProps: { ...rulesHelper.text },
|
||||||
valueType: 'password',
|
}),
|
||||||
},
|
// {
|
||||||
|
// key: 'password',
|
||||||
|
// title: '密码',
|
||||||
|
// colProps: { span: 24 },
|
||||||
|
// valueType: 'password',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
|
|||||||
@ -20,9 +20,8 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
form={form}
|
form={form}
|
||||||
trigger={
|
trigger={
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title="修改"
|
title="编辑"
|
||||||
color="primary"
|
type="primary"
|
||||||
variant="filled"
|
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@ -90,29 +89,29 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
title: '联系人邮箱',
|
title: '联系人邮箱',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
key: 'contact_address',
|
// key: 'contact_address',
|
||||||
title: '联系人地址',
|
// title: '联系人地址',
|
||||||
colProps: { span: 24 },
|
// colProps: { span: 16 },
|
||||||
},
|
// },
|
||||||
MyFormItems.EnumRadio({
|
// MyFormItems.EnumRadio({
|
||||||
key: 'merchant_type',
|
// key: 'merchant_type',
|
||||||
title: '商户类型',
|
// title: '商户类型',
|
||||||
colProps: { span: 24 },
|
// colProps: { span: 24 },
|
||||||
valueEnum: CompaniesMerchantTypeEnum,
|
// valueEnum: CompaniesMerchantTypeEnum,
|
||||||
required: true,
|
// required: true,
|
||||||
}),
|
// }),
|
||||||
Address.Cascader({
|
Address.Cascader({
|
||||||
key: 'casacader',
|
key: 'casacader',
|
||||||
title: '选择地址',
|
title: '选择地址',
|
||||||
colProps: { span: 24 },
|
colProps: { span:16 },
|
||||||
keys: ['province', 'city', 'area', 'street'],
|
keys: ['province', 'city', 'area', 'street'],
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
key: 'address',
|
key: 'address',
|
||||||
title: '详细地址',
|
title: '详细地址',
|
||||||
colProps: { span: 24 },
|
colProps: { span:8 },
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -31,26 +31,35 @@ export default function Index({ title = '员工管理' }) {
|
|||||||
MyColumns.Companies({
|
MyColumns.Companies({
|
||||||
title: '选择机构',
|
title: '选择机构',
|
||||||
}),
|
}),
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '手机号',
|
|
||||||
dataIndex: 'phone',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '机构',
|
title: '机构',
|
||||||
dataIndex: ['company', 'name'],
|
dataIndex: ['company', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
|
width: 220,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '组织',
|
title: '组织',
|
||||||
dataIndex: ['organization', 'name'],
|
dataIndex: ['organization', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '岗位',
|
||||||
|
dataIndex: ['position', 'name'],
|
||||||
|
width: 150,
|
||||||
},
|
},
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
@ -9,9 +9,10 @@ import { Selects } from '@/components/Select';
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { SexEnum } from '@/gen/Enums';
|
import { SexEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Company.CompanyEmployees.Store>
|
<BetaSchemaForm<ApiTypes.Company.CompanyEmployees.Store>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
@ -19,6 +20,12 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
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.CompanyEmployees.Store(values)
|
Apis.Company.CompanyEmployees.Store(values)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -60,7 +67,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
},
|
},
|
||||||
colProps: { span: 12 },
|
colProps: { span: 12 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.phone },
|
||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'sex',
|
key: 'sex',
|
||||||
@ -69,13 +76,22 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
valueEnum: SexEnum,
|
valueEnum: SexEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
{
|
{
|
||||||
key: 'password',
|
valueType: 'dependency',
|
||||||
title: '密码',
|
name: ['companies_id'],
|
||||||
colProps: { span: 24 },
|
columns: ({ companies_id }) => [
|
||||||
valueType: 'password',
|
Selects?.Positions({
|
||||||
|
title: '岗位',
|
||||||
|
params: { companies_id: companies_id },
|
||||||
|
key: 'positions_id',
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
},
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
@ -73,7 +73,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
},
|
},
|
||||||
colProps: { span: 12 },
|
colProps: { span: 12 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.phone },
|
||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'sex',
|
key: 'sex',
|
||||||
@ -82,12 +82,17 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
valueEnum: SexEnum,
|
valueEnum: SexEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
{
|
{
|
||||||
key: 'password',
|
valueType: 'dependency',
|
||||||
title: '密码',
|
name: ['companies_id'],
|
||||||
colProps: { span: 24 },
|
columns: ({ companies_id }) => [
|
||||||
valueType: 'password',
|
Selects?.Positions({
|
||||||
|
title: '岗位',
|
||||||
|
params: { companies_id: companies_id },
|
||||||
|
key: 'positions_id',
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
@ -24,51 +24,73 @@ export default function Index({ title = '账单' }) {
|
|||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
{
|
|
||||||
title: '金额',
|
|
||||||
dataIndex: 'amount',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '优惠金额',
|
|
||||||
dataIndex: 'discount_amount',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '滞纳金',
|
|
||||||
dataIndex: 'late_fee',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '类型',
|
title: '类型',
|
||||||
dataIndex: 'type',
|
dataIndex: 'type',
|
||||||
valueEnum: HouseBillsTypeEnum,
|
valueEnum: HouseBillsTypeEnum,
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
title: '房屋',
|
||||||
|
dataIndex: ['asset_house', 'full_name'],
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return { full_name: value };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '账单月份',
|
||||||
|
dataIndex: 'month',
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
search: false,
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '优惠金额',
|
||||||
|
dataIndex: 'discount_amount',
|
||||||
|
search: false,
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '滞纳金',
|
||||||
|
dataIndex: 'late_fee',
|
||||||
|
search: false,
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '计费开始日期',
|
title: '计费开始日期',
|
||||||
dataIndex: 'start_date',
|
dataIndex: 'start_date',
|
||||||
search: false,
|
search: false,
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '计费结束日期',
|
title: '计费结束日期',
|
||||||
dataIndex: 'end_date',
|
dataIndex: 'end_date',
|
||||||
search: false,
|
search: false,
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '滞纳金起算日期',
|
// title: '滞纳金起算日期',
|
||||||
dataIndex: 'late_start_date',
|
// dataIndex: 'late_start_date',
|
||||||
search: false,
|
// search: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '已收滞纳金天数',
|
// title: '已收滞纳金天数',
|
||||||
dataIndex: 'collected_late_fee_days',
|
// dataIndex: 'collected_late_fee_days',
|
||||||
search: false,
|
// search: false,
|
||||||
},
|
// // },
|
||||||
{
|
// {
|
||||||
title: '备注',
|
// title: '备注',
|
||||||
dataIndex: 'remark',
|
// dataIndex: 'remark',
|
||||||
search: false,
|
// search: false,
|
||||||
},
|
// },
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
@ -38,28 +38,72 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
Selects?.AssetProjects({
|
Selects?.AssetProjects({
|
||||||
title: '选择项目',
|
title: '选择项目',
|
||||||
key: 'asset_projects_id',
|
key: 'asset_projects_id',
|
||||||
colProps: { span: 12 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
valueType: 'dependency',
|
valueType: 'dependency',
|
||||||
name: ['asset_projects_id'],
|
name: ['asset_projects_id', 'asset_buildings_id', 'asset_units_id'],
|
||||||
columns: ({ asset_projects_id }) => [
|
columns: ({
|
||||||
|
asset_projects_id,
|
||||||
|
asset_buildings_id,
|
||||||
|
asset_units_id,
|
||||||
|
}) => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
Selects?.AssetBuildings({
|
||||||
|
key: 'asset_buildings_id',
|
||||||
|
title: '选择楼栋',
|
||||||
|
params: {
|
||||||
|
asset_projects_id: asset_projects_id,
|
||||||
|
},
|
||||||
|
colProps: { span: 8 },
|
||||||
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
onChange: () => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
asset_units_id: undefined,
|
||||||
|
asset_floors_id: undefined,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
Selects?.AssetUnits({
|
||||||
|
key: 'asset_units_id',
|
||||||
|
title: '选择单元',
|
||||||
|
params: {
|
||||||
|
asset_projects_id: asset_projects_id,
|
||||||
|
asset_buildings_id: asset_buildings_id,
|
||||||
|
},
|
||||||
|
colProps: { span: 8 },
|
||||||
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
}),
|
||||||
Selects?.AssetHouses({
|
Selects?.AssetHouses({
|
||||||
title: '选择房屋',
|
title: '选择房屋',
|
||||||
key: 'asset_houses_id',
|
key: 'asset_houses_id',
|
||||||
params: { asset_projects_id: asset_projects_id },
|
params: {
|
||||||
|
asset_projects_id: asset_projects_id,
|
||||||
|
asset_buildings_id: asset_buildings_id,
|
||||||
|
asset_units_id: asset_units_id,
|
||||||
|
},
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
colProps: { span: 12 },
|
colProps: { span: 8 },
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'amount',
|
key: 'amount',
|
||||||
title: '金额',
|
title: '账单金额',
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
|
addonAfter: '元',
|
||||||
style: {
|
style: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
@ -71,18 +115,19 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title: '优惠金额',
|
title: '优惠金额',
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
|
addonAfter: '元',
|
||||||
style: {
|
style: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
key: 'late_fee',
|
key: 'late_fee',
|
||||||
title: '滞纳金',
|
title: '滞纳金',
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
|
addonAfter: '元',
|
||||||
style: {
|
style: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
@ -91,11 +136,26 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '类型',
|
title: '收费项目',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueEnum: HouseBillsTypeEnum,
|
valueEnum: HouseBillsTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
key: 'month',
|
||||||
|
title: '账单月份',
|
||||||
|
valueType: 'date',
|
||||||
|
colProps: { span: 8 },
|
||||||
|
fieldProps: {
|
||||||
|
picker: 'month',
|
||||||
|
format: 'YYYY-MM',
|
||||||
|
valueFormat: 'YYYY-MM',
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'start_date',
|
key: 'start_date',
|
||||||
title: '计费开始日期',
|
title: '计费开始日期',
|
||||||
@ -118,7 +178,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'late_start_date',
|
key: 'late_start_date',
|
||||||
@ -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 { HouseBillsTypeEnum } from '@/gen/Enums';
|
import { HouseBillsTypeEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
@ -36,25 +35,13 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
Selects?.AssetProjects({
|
MyFormItems.EnumRadio({
|
||||||
title: '选择项目',
|
key: 'type',
|
||||||
key: 'asset_projects_id',
|
title: '类型',
|
||||||
colProps: { span: 12 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
valueEnum: HouseBillsTypeEnum,
|
||||||
|
required: true,
|
||||||
}),
|
}),
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['asset_projects_id'],
|
|
||||||
columns: ({ asset_projects_id }) => [
|
|
||||||
Selects?.AssetHouses({
|
|
||||||
title: '选择房屋',
|
|
||||||
key: 'asset_houses_id',
|
|
||||||
params: { asset_projects_id: asset_projects_id },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
colProps: { span: 12 },
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'amount',
|
key: 'amount',
|
||||||
title: '金额',
|
title: '金额',
|
||||||
@ -90,13 +77,22 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
},
|
},
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'type',
|
{
|
||||||
title: '类型',
|
key: 'month',
|
||||||
colProps: { span: 24 },
|
title: '账单月份',
|
||||||
valueEnum: HouseBillsTypeEnum,
|
valueType: 'date',
|
||||||
required: true,
|
colProps: { span: 8 },
|
||||||
}),
|
fieldProps: {
|
||||||
|
picker: 'month',
|
||||||
|
format: 'YYYY-MM',
|
||||||
|
valueFormat: 'YYYY-MM',
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'start_date',
|
key: 'start_date',
|
||||||
title: '计费开始日期',
|
title: '计费开始日期',
|
||||||
Loading…
x
Reference in New Issue
Block a user