From 3e9a7dfd0f77de341832f26e54f86d21daf35cac Mon Sep 17 00:00:00 2001 From: zsqtony <450952271@qq.com> Date: Tue, 1 Jul 2025 16:22:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9B=B4=E6=96=B0api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gen/ApiTypes.d.ts | 53 +++++++++++++++ src/gen/Apis.ts | 36 ++++++++++ src/gen/Enums.ts | 65 +++++++++++++++++++ .../companies/components/Employees.tsx | 1 + 4 files changed, 155 insertions(+) diff --git a/src/gen/ApiTypes.d.ts b/src/gen/ApiTypes.d.ts index bba826a..6f5cdbf 100644 --- a/src/gen/ApiTypes.d.ts +++ b/src/gen/ApiTypes.d.ts @@ -1,4 +1,57 @@ declare namespace ApiTypes { + namespace Archive { + namespace HouseOccupants { + type List = { + "asset_houses_id": number; // 资产房屋ID + "status"?: number; // 状态,[enum:HouseOccupantsStatusEnum] + }; + type Show = { + "id": number; // id + }; + } + namespace HouseRegisters { + type List = { + "house_name"?: string; // 模糊搜索:房屋名称 + "type"?: string; // 类型,[enum:HouseRegistersTypeEnum] + "status"?: string; // 状态,[enum:HouseRegistersStatusEnum] + }; + type Store = { + "asset_houses_id": number; // 房屋ID + "type": string; // 类型,[enum:HouseRegistersTypeEnum] + "status"?: string; // 状态,[enum:HouseRegistersStatusEnum] + "house_status"?: string; // 房屋状态,[enum:HouseRegistersHouseStatusEnum] + "usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum] + "customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum] + "customer_info"?: string[]; // 客户信息 + }; + type Update = { + "id": number; // id + "type": string; // 类型,[enum:HouseRegistersTypeEnum] + "status"?: string; // 状态,[enum:HouseRegistersStatusEnum] + "house_status"?: string; // 房屋状态,[enum:HouseRegistersHouseStatusEnum] + "usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum] + "customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum] + "customer_info"?: string[]; // 客户信息 + }; + type Show = { + "id": number; // id + }; + type Audit = { + "id": number; // id + "status": string; // 状态:Approved 通过、Rejected 拒绝 + "reason"?: string; // 拒绝原因 + }; + type SoftDelete = { + "id": number; // id + }; + type Restore = { + "id": number; // id + }; + type Delete = { + "id": number; // id + }; + } + } namespace Asset { namespace AssetBuildings { type List = { diff --git a/src/gen/Apis.ts b/src/gen/Apis.ts index 033c9aa..84d4269 100644 --- a/src/gen/Apis.ts +++ b/src/gen/Apis.ts @@ -2,6 +2,42 @@ import { MyResponseType } from '@/common'; import { request } from '@umijs/max'; export const Apis = { + Archive: { + HouseOccupants: { + List(data: ApiTypes.Archive.HouseOccupants.List): Promise { + return request('admin/archive/house_occupants/list', { data }); + }, + Show(data: ApiTypes.Archive.HouseOccupants.Show): Promise { + return request('admin/archive/house_occupants/show', { data }); + }, + }, + HouseRegisters: { + List(data?: ApiTypes.Archive.HouseRegisters.List): Promise { + return request('admin/archive/house_registers/list', { data }); + }, + Store(data: ApiTypes.Archive.HouseRegisters.Store): Promise { + return request('admin/archive/house_registers/store', { data }); + }, + Update(data: ApiTypes.Archive.HouseRegisters.Update): Promise { + return request('admin/archive/house_registers/update', { data }); + }, + Show(data: ApiTypes.Archive.HouseRegisters.Show): Promise { + return request('admin/archive/house_registers/show', { data }); + }, + Audit(data: ApiTypes.Archive.HouseRegisters.Audit): Promise { + return request('admin/archive/house_registers/audit', { data }); + }, + SoftDelete(data: ApiTypes.Archive.HouseRegisters.SoftDelete): Promise { + return request('admin/archive/house_registers/soft_delete', { data }); + }, + Restore(data: ApiTypes.Archive.HouseRegisters.Restore): Promise { + return request('admin/archive/house_registers/restore', { data }); + }, + Delete(data: ApiTypes.Archive.HouseRegisters.Delete): Promise { + return request('admin/archive/house_registers/delete', { data }); + }, + }, + }, Asset: { AssetBuildings: { List(data?: ApiTypes.Asset.AssetBuildings.List): Promise { diff --git a/src/gen/Enums.ts b/src/gen/Enums.ts index 797dd51..fbbf1ce 100644 --- a/src/gen/Enums.ts +++ b/src/gen/Enums.ts @@ -108,6 +108,71 @@ export const CompanyReceiptAccountsPayChannelEnum= { 'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"}, }; +// HouseOccupantsCardTypeEnum +export const HouseOccupantsCardTypeEnum= { + 'MainlandID': {"text":"中国大陆居民身份证","color":"#2db7f5","value":"MainlandID"}, + '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 +export const HouseOccupantsHouseRelationEnum= { + 'Owner': {"text":"产权人","color":"#2db7f5","value":"Owner"}, + 'Resident': {"text":"住户","color":"#87d068","value":"Resident"}, + 'Tenant': {"text":"租户","color":"#fa8c16","value":"Tenant"}, +}; + +// HouseOccupantsRelationWithOwnerEnum +export const HouseOccupantsRelationWithOwnerEnum= { + 'Value': {"text":"Label","color":"#ff0000","value":"Value"}, +}; + +// HouseOccupantsStatusEnum +export const HouseOccupantsStatusEnum= { + 'Normal': {"text":"正常","color":"#52c41a","value":"Normal"}, + 'Unbound': {"text":"已解除","color":"#f5222d","value":"Unbound"}, +}; + +// HouseRegistersCustomerTypeEnum +export const HouseRegistersCustomerTypeEnum= { + 'Individual': {"text":"个人客户","color":"#2db7f5","value":"Individual"}, + 'Enterprise': {"text":"普通企业","color":"#87d068","value":"Enterprise"}, + 'Developer': {"text":"开发企业","color":"#fa8c16","value":"Developer"}, + 'Government': {"text":"政府组织","color":"#f5222d","value":"Government"}, +}; + +// HouseRegistersHouseStatusEnum +export const HouseRegistersHouseStatusEnum= { + 'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"}, + 'Rented': {"text":"出租","color":"#007bff","value":"Rented"}, + 'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"}, +}; + +// HouseRegistersStatusEnum +export const HouseRegistersStatusEnum= { + 'Pending': {"text":"待审","color":"#faad14","value":"Pending"}, + 'Approved': {"text":"已审","color":"#52c41a","value":"Approved"}, + 'Rejected': {"text":"驳回","color":"#f5222d","value":"Rejected"}, +}; + +// HouseRegistersTypeEnum +export const HouseRegistersTypeEnum= { + 'Delivery': {"text":"交付登记","color":"#2db7f5","value":"Delivery"}, + 'Transfer': {"text":"过户登记","color":"#87d068","value":"Transfer"}, + 'AddOccupant': {"text":"添加住户","color":"#108ee9","value":"AddOccupant"}, +}; + +// HouseRegistersUsagePlanEnum +export const HouseRegistersUsagePlanEnum= { + 'Permanent': {"text":"常住","color":"#52c41a","value":"Permanent"}, + 'Vacation': {"text":"度假","color":"#faad14","value":"Vacation"}, + 'Rental': {"text":"出租","color":"#2db7f5","value":"Rental"}, + 'Commercial': {"text":"商用","color":"#f5222d","value":"Commercial"}, +}; + // OrganizationsTypeEnum export const OrganizationsTypeEnum= { 'Group': {"text":"集团","color":"#007bff","value":"Group"}, diff --git a/src/pages/company/companies/components/Employees.tsx b/src/pages/company/companies/components/Employees.tsx index 122291b..37ca36c 100644 --- a/src/pages/company/companies/components/Employees.tsx +++ b/src/pages/company/companies/components/Employees.tsx @@ -30,6 +30,7 @@ export default function Index(props: MyBetaModalFormProps) { title="员工" />, ]} + options={false} columns={[ MyColumns.ID(), {