diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 1ebc30a6..2bcbbde2 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -16,7 +16,8 @@ jobs: - name: Build run: pnpm build:antd - name: cp - run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E +# run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E + run: Copy-Item -Path "./apps/web-antd/dist" -Destination "C:\devtool\nginx-1.28.0\html\property" -Recurse -Force -ErrorAction SilentlyContinue diff --git a/apps/web-antd/.env.production b/apps/web-antd/.env.production index 2b43bb72..d228ac48 100644 --- a/apps/web-antd/.env.production +++ b/apps/web-antd/.env.production @@ -1,4 +1,4 @@ -VITE_BASE=/ +VITE_BASE=/property # 是否开启压缩,可以设置为 none, brotli, gzip VITE_COMPRESS=gzip diff --git a/apps/web-antd/src/api/property/assetType/index.ts b/apps/web-antd/src/api/property/assetType/index.ts new file mode 100644 index 00000000..ec5852ba --- /dev/null +++ b/apps/web-antd/src/api/property/assetType/index.ts @@ -0,0 +1,65 @@ +import type { AssetTypeVO, AssetTypeForm, AssetTypeQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询资产类型列表 +* @param params +* @returns 资产类型列表 +*/ +export function assetTypeList(params?: AssetTypeQuery) { + return requestClient.get>('/property/assetType/list', { params }); +} + +export function assetTypeselect() { + return requestClient.get('/property/assetType/list'); +} + +/** + * 导出资产类型列表 + * @param params + * @returns 资产类型列表 + */ +export function assetTypeExport(params?: AssetTypeQuery) { + return commonExport('/property/assetType/export', params ?? {}); +} + +/** + * 查询资产类型详情 + * @param id id + * @returns 资产类型详情 + */ +export function assetTypeInfo(id: ID) { + return requestClient.get(`/property/assetType/${id}`); +} + +/** + * 新增资产类型 + * @param data + * @returns void + */ +export function assetTypeAdd(data: AssetTypeForm) { + return requestClient.postWithMsg('/property/assetType', data); +} + +/** + * 更新资产类型 + * @param data + * @returns void + */ +export function assetTypeUpdate(data: AssetTypeForm) { + return requestClient.putWithMsg('/property/assetType', data); +} + +/** + * 删除资产类型 + * @param id id + * @returns void + */ +export function assetTypeRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/assetType/${id}`); +} diff --git a/apps/web-antd/src/api/property/assetType/model.d.ts b/apps/web-antd/src/api/property/assetType/model.d.ts new file mode 100644 index 00000000..ad92eb79 --- /dev/null +++ b/apps/web-antd/src/api/property/assetType/model.d.ts @@ -0,0 +1,64 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface AssetTypeVO { + /** + * 主键 + */ + id: string | number; + + /** + * 分类名称 + */ + assetTypeName: string; + + /** + * 排序 + */ + sort: number; + + /** + * 创建时间 + */ + createTime: string; + + /** + * 创建人 + */ + createBy: string; + +} + +export interface AssetTypeForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 分类名称 + */ + assetTypeName?: string; + + /** + * 排序 + */ + sort?: number; + +} + +export interface AssetTypeQuery extends PageQuery { + /** + * 分类名称 + */ + assetTypeName?: string; + + /** + * 排序 + */ + sort?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/building/model.d.ts b/apps/web-antd/src/api/property/building/model.d.ts index ff1a7de9..2983ef7d 100644 --- a/apps/web-antd/src/api/property/building/model.d.ts +++ b/apps/web-antd/src/api/property/building/model.d.ts @@ -2,7 +2,7 @@ import type { PageQuery, BaseEntity } from '#/api/common'; export interface BuildingVO { /** - * + * */ id: string | number; @@ -135,7 +135,7 @@ export interface BuildingVO { export interface BuildingForm extends BaseEntity { /** - * + * */ id?: string | number; @@ -397,3 +397,136 @@ export interface BuildingQuery extends PageQuery { */ params?: any; } + +export interface Building extends BaseEntity { + /** + * 园区编码 + */ + communityCode?: string; + + /** + * 建筑编码 + */ + buildingCode?: string; + + /** + * 建筑名称 + */ + buildingName?: string; + + /** + * 省 + */ + province?: string; + + /** + * 市 + */ + city?: string; + + /** + * 区 + */ + district?: string; + + /** + * 地址 + */ + addr?: string; + + /** + * 经度 + */ + lon?: string; + + /** + * 维度 + */ + lat?: string; + + /** + * 产权性质(1:自持,2:承租,3:自持+承租,4:政府免费使用) + */ + cqxz?: number; + + /** + * 不动产编号 + */ + bdcbh?: string; + + /** + * 产权编号 + */ + cqbh?: string; + + /** + * 图地编号 + */ + tdbh?: string; + + /** + * 建筑面积 + */ + jzmj?: number; + + /** + * 产权面积 + */ + cqmj?: number; + + /** + * 可租面积 + */ + kzmj?: number; + + /** + * 自用面积 + */ + zymj?: number; + + /** + * 配套面积 + */ + ptmj?: number; + + /** + * 车位面积 + */ + cwmj?: number; + + /** + * 标准层高 + */ + bzcg?: number; + + /** + * 排序字段 + */ + sort?: number; + + /** + * 组织编码 + */ + orgCode?: string; + + /** + * 数据状态:1有效,0无效 + */ + dataState?: number; + + /** + * 修改时间 + */ + modifyTime?: string; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + diff --git a/apps/web-antd/src/api/property/community/model.d.ts b/apps/web-antd/src/api/property/community/model.d.ts index b820b221..1d398f70 100644 --- a/apps/web-antd/src/api/property/community/model.d.ts +++ b/apps/web-antd/src/api/property/community/model.d.ts @@ -217,3 +217,74 @@ export interface CommunityQuery extends PageQuery { */ params?: any; } +export interface Community extends BaseEntity { + /** + * 社区名称 + */ + communityName?: string; + + /** + * 社区编码 + */ + communityCode?: string; + + /** + * 社区类型 1:园区,2:小区 + */ + communityType?: number; + + /** + * 省 + */ + province?: string; + + /** + * 市 + */ + city?: string; + + /** + * 区 + */ + district?: string; + + /** + * 地址 + */ + addr?: string; + + /** + * 经度 + */ + lon?: string; + + /** + * 维度 + */ + lat?: string; + + /** + * 小图图片 + */ + img?: string; + + /** + * 组织编码 + */ + orgCode?: string; + + /** + * 数据状态:1有效,0无效 + */ + dataState?: number; + + /** + * 修改时间 + */ + modifyTime?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/productManagement/index.ts b/apps/web-antd/src/api/property/productManagement/index.ts new file mode 100644 index 00000000..0ea10c5e --- /dev/null +++ b/apps/web-antd/src/api/property/productManagement/index.ts @@ -0,0 +1,61 @@ +import type { PropertyVO, PropertyForm, PropertyQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询绿植租赁-绿植产品列表 +* @param params +* @returns 绿植租赁-绿植产品列表 +*/ +export function plantsProductList(params?: PropertyQuery) { + return requestClient.get>('/property/plantsProduct/list', { params }); +} + +/** + * 导出绿植租赁-绿植产品列表 + * @param params + * @returns 绿植租赁-绿植产品列表 + */ +export function plantsProductExport(params?: PropertyQuery) { + return commonExport('/property/plantsProduct/export', params ?? {}); +} + +/** + * 查询绿植租赁-绿植产品详情 + * @param id id + * @returns 绿植租赁-绿植产品详情 + */ +export function plantsProductInfo(id: ID) { + return requestClient.get(`/property/plantsProduct/${id}`); +} + +/** + * 新增绿植租赁-绿植产品 + * @param data + * @returns void + */ +export function plantsProductAdd(data: PropertyForm) { + return requestClient.postWithMsg('/property/plantsProduct', data); +} + +/** + * 更新绿植租赁-绿植产品 + * @param data + * @returns void + */ +export function plantsProductUpdate(data: PropertyForm) { + return requestClient.putWithMsg('/property/plantsProduct', data); +} + +/** + * 删除绿植租赁-绿植产品 + * @param id id + * @returns void + */ +export function plantsProductRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/plantsProduct/${id}`); +} diff --git a/apps/web-antd/src/api/property/productManagement/model.d.ts b/apps/web-antd/src/api/property/productManagement/model.d.ts new file mode 100644 index 00000000..684c2026 --- /dev/null +++ b/apps/web-antd/src/api/property/productManagement/model.d.ts @@ -0,0 +1,211 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface PropertyVO { + /** + * 主键 + */ + id: string | number; + + /** + * 产品编号 + */ + plantCode: string; + + /** + * 产品名称 + */ + plantName: string; + + /** + * 产品分类 + */ + plantType: number; + + /** + * 产品图片 + */ + imgPath: string; + + /** + * 规格 + */ + specification: string; + + /** + * 租金 + */ + rent: number; + + /** + * 库存数量 + */ + inventory: number; + + /** + * 状态(0下架 1上架 ) + */ + state: number; + + /** + * 备注 + */ + remark: string; + +} + +export interface PropertyForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 产品编号 + */ + plantCode?: string; + + /** + * 产品名称 + */ + plantName?: string; + + /** + * 产品分类 + */ + plantType?: number; + + /** + * 产品图片 + */ + imgPath?: string; + + /** + * 规格 + */ + specification?: string; + + /** + * 租金 + */ + rent?: number; + + /** + * 库存数量 + */ + inventory?: number; + + /** + * 状态(0下架 1上架 ) + */ + state?: number; + + /** + * 备注 + */ + remark?: string; + +} + +export interface PropertyQuery extends PageQuery { + /** + * 产品编号 + */ + plantCode?: string; + + /** + * 产品名称 + */ + plantName?: string; + + /** + * 产品分类 + */ + plantType?: number; + + /** + * 产品图片 + */ + imgPath?: string; + + /** + * 规格 + */ + specification?: string; + + /** + * 租金 + */ + rent?: number; + + /** + * 库存数量 + */ + inventory?: number; + + /** + * 状态(0下架 1上架 ) + */ + state?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + +export interface plantsProduct extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 产品编号 + */ + plantCode?: string; + + /** + * 产品名称 + */ + plantName?: string; + + /** + * 产品分类 + */ + plantType?: number; + + /** + * 产品图片 + */ + imgPath?: string; + + /** + * 规格 + */ + specification?: string; + + /** + * 租金 + */ + rent?: number; + + /** + * 库存数量 + */ + inventory?: number; + + /** + * 状态(0下架 1上架 ) + */ + state?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/rentalOrder/index.ts b/apps/web-antd/src/api/property/rentalOrder/index.ts new file mode 100644 index 00000000..61829f0b --- /dev/null +++ b/apps/web-antd/src/api/property/rentalOrder/index.ts @@ -0,0 +1,61 @@ +import type { RentalOrderVO, RentalOrderForm, RentalOrderQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询绿植租赁-订单管理列表 +* @param params +* @returns 绿植租赁-订单管理列表 +*/ +export function rentalOrderList(params?: RentalOrderQuery) { + return requestClient.get>('/property/rentalOrder/list', { params }); +} + +/** + * 导出绿植租赁-订单管理列表 + * @param params + * @returns 绿植租赁-订单管理列表 + */ +export function rentalOrderExport(params?: RentalOrderQuery) { + return commonExport('/property/rentalOrder/export', params ?? {}); +} + +/** + * 查询绿植租赁-订单管理详情 + * @param id id + * @returns 绿植租赁-订单管理详情 + */ +export function rentalOrderInfo(id: ID) { + return requestClient.get(`/property/rentalOrder/${id}`); +} + +/** + * 新增绿植租赁-订单管理 + * @param data + * @returns void + */ +export function rentalOrderAdd(data: RentalOrderForm) { + return requestClient.postWithMsg('/property/rentalOrder', data); +} + +/** + * 更新绿植租赁-订单管理 + * @param data + * @returns void + */ +export function rentalOrderUpdate(data: RentalOrderForm) { + return requestClient.putWithMsg('/property/rentalOrder', data); +} + +/** + * 删除绿植租赁-订单管理 + * @param id id + * @returns void + */ +export function rentalOrderRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/rentalOrder/${id}`); +} diff --git a/apps/web-antd/src/api/property/rentalOrder/model.d.ts b/apps/web-antd/src/api/property/rentalOrder/model.d.ts new file mode 100644 index 00000000..4a6841a1 --- /dev/null +++ b/apps/web-antd/src/api/property/rentalOrder/model.d.ts @@ -0,0 +1,249 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface RentalOrderVO { + /** + * 主键 + */ + id: string | number; + + /** + * 订单号 + */ + orderNo: string; + + /** + * 客户名称 + */ + customerName: string; + + /** + * 客户类型 + */ + customerType: number; + + /** + * 租赁周期 + */ + rentalPeriod: number; + + /** + * 租赁开始时间 + */ + startTime: string; + + /** + * 租赁结束时间 + */ + endTime: string; + + /** + * 应付总额 + */ + totalAmount: number; + + /** + * 租赁方式 + */ + rentalType: number; + + /** + * 租赁方案id + */ + planId: string | number; + + /** + * 绿植产品id + */ + productId: string | number; + + /** + * 租赁产品数量 + */ + productNum: number; + + /** + * 支付状态 + */ + paymentStatus: number; + + /** + * 是否续租 + */ + isRelet: number; + + /** + * 合同状态 + */ + contractStatus: number; + + /** + * 签署时间 + */ + signTime: string; + +} + +export interface RentalOrderForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 订单号 + */ + orderNo?: string; + + /** + * 客户名称 + */ + customerName?: string; + + /** + * 客户类型 + */ + customerType?: number; + + /** + * 租赁周期 + */ + rentalPeriod?: number; + + /** + * 租赁开始时间 + */ + startTime?: string; + + /** + * 租赁结束时间 + */ + endTime?: string; + + /** + * 应付总额 + */ + totalAmount?: number; + + /** + * 租赁方式 + */ + rentalType?: number; + + /** + * 租赁方案id + */ + planId?: string | number; + + /** + * 绿植产品id + */ + productId?: string | number; + + /** + * 租赁产品数量 + */ + productNum?: number; + + /** + * 支付状态 + */ + paymentStatus?: number; + + /** + * 是否续租 + */ + isRelet?: number; + + /** + * 合同状态 + */ + contractStatus?: number; + + /** + * 签署时间 + */ + signTime?: string; + +} + +export interface RentalOrderQuery extends PageQuery { + /** + * 订单号 + */ + orderNo?: string; + + /** + * 客户名称 + */ + customerName?: string; + + /** + * 客户类型 + */ + customerType?: number; + + /** + * 租赁周期 + */ + rentalPeriod?: number; + + /** + * 租赁开始时间 + */ + startTime?: string; + + /** + * 租赁结束时间 + */ + endTime?: string; + + /** + * 应付总额 + */ + totalAmount?: number; + + /** + * 租赁方式 + */ + rentalType?: number; + + /** + * 租赁方案id + */ + planId?: string | number; + + /** + * 绿植产品id + */ + productId?: string | number; + + /** + * 租赁产品数量 + */ + productNum?: number; + + /** + * 支付状态 + */ + paymentStatus?: number; + + /** + * 是否续租 + */ + isRelet?: number; + + /** + * 合同状态 + */ + contractStatus?: number; + + /** + * 签署时间 + */ + signTime?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/rentalPlan/index.ts b/apps/web-antd/src/api/property/rentalPlan/index.ts new file mode 100644 index 00000000..6815a9eb --- /dev/null +++ b/apps/web-antd/src/api/property/rentalPlan/index.ts @@ -0,0 +1,61 @@ +import type { RentalPlanVO, RentalPlanForm, RentalPlanQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询绿植租赁-租赁方案列表 +* @param params +* @returns 绿植租赁-租赁方案列表 +*/ +export function rentalPlanList(params?: RentalPlanQuery) { + return requestClient.get>('/property/rentalPlan/list', { params }); +} + +/** + * 导出绿植租赁-租赁方案列表 + * @param params + * @returns 绿植租赁-租赁方案列表 + */ +export function rentalPlanExport(params?: RentalPlanQuery) { + return commonExport('/property/rentalPlan/export', params ?? {}); +} + +/** + * 查询绿植租赁-租赁方案详情 + * @param id id + * @returns 绿植租赁-租赁方案详情 + */ +export function rentalPlanInfo(id: ID) { + return requestClient.get(`/property/rentalPlan/${id}`); +} + +/** + * 新增绿植租赁-租赁方案 + * @param data + * @returns void + */ +export function rentalPlanAdd(data: RentalPlanForm) { + return requestClient.postWithMsg('/property/rentalPlan', data); +} + +/** + * 更新绿植租赁-租赁方案 + * @param data + * @returns void + */ +export function rentalPlanUpdate(data: RentalPlanForm) { + return requestClient.putWithMsg('/property/rentalPlan', data); +} + +/** + * 删除绿植租赁-租赁方案 + * @param id id + * @returns void + */ +export function rentalPlanRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/rentalPlan/${id}`); +} diff --git a/apps/web-antd/src/api/property/rentalPlan/model.d.ts b/apps/web-antd/src/api/property/rentalPlan/model.d.ts new file mode 100644 index 00000000..207ff539 --- /dev/null +++ b/apps/web-antd/src/api/property/rentalPlan/model.d.ts @@ -0,0 +1,114 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface RentalPlanVO { + /** + * 主键 + */ + id: string | number; + + /** + * 方案名称 + */ + planName: string; + + /** + * 租赁周期 + */ + rentalPeriod: number; + + /** + * 适用场景 + */ + scene: string; + + /** + * 价格 + */ + price: number; + + /** + * 状态 + */ + state: number; + + /** + * 备注 + */ + remarks: string; + +} + +export interface RentalPlanForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 方案名称 + */ + planName?: string; + + /** + * 租赁周期 + */ + rentalPeriod?: number; + + /** + * 适用场景 + */ + scene?: string; + + /** + * 价格 + */ + price?: number; + + /** + * 状态 + */ + state?: number; + + /** + * 备注 + */ + remarks?: string; + +} + +export interface RentalPlanQuery extends PageQuery { + /** + * 方案名称 + */ + planName?: string; + + /** + * 租赁周期 + */ + rentalPeriod?: number; + + /** + * 适用场景 + */ + scene?: string; + + /** + * 价格 + */ + price?: number; + + /** + * 状态 + */ + state?: number; + + /** + * 备注 + */ + remarks?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/room/index.ts b/apps/web-antd/src/api/property/room/index.ts new file mode 100644 index 00000000..da07ffee --- /dev/null +++ b/apps/web-antd/src/api/property/room/index.ts @@ -0,0 +1,61 @@ +import type { RoomVO, RoomForm, RoomQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询房间信息列表 +* @param params +* @returns 房间信息列表 +*/ +export function roomList(params?: RoomQuery) { + return requestClient.get>('/property/room/list', { params }); +} + +/** + * 导出房间信息列表 + * @param params + * @returns 房间信息列表 + */ +export function roomExport(params?: RoomQuery) { + return commonExport('/property/room/export', params ?? {}); +} + +/** + * 查询房间信息详情 + * @param id id + * @returns 房间信息详情 + */ +export function roomInfo(id: ID) { + return requestClient.get(`/property/room/${id}`); +} + +/** + * 新增房间信息 + * @param data + * @returns void + */ +export function roomAdd(data: RoomForm) { + return requestClient.postWithMsg('/property/room', data); +} + +/** + * 更新房间信息 + * @param data + * @returns void + */ +export function roomUpdate(data: RoomForm) { + return requestClient.putWithMsg('/property/room', data); +} + +/** + * 删除房间信息 + * @param id id + * @returns void + */ +export function roomRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/room/${id}`); +} diff --git a/apps/web-antd/src/api/property/room/model.d.ts b/apps/web-antd/src/api/property/room/model.d.ts new file mode 100644 index 00000000..207b4a49 --- /dev/null +++ b/apps/web-antd/src/api/property/room/model.d.ts @@ -0,0 +1,159 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface RoomVO { + /** + * 主键 + */ + id: string | number; + + /** + * 所属楼层ID + */ + floorCode: string; + + /** + * 房间编码 + */ + roomCode: string; + + /** + * 房间号(如101,202) + */ + roomNumber: string; + + /** + * 房间类型('住宅','商铺','办公室','设备间','公共区域') + */ + roomType: number; + + /** + * 面积(平方米) + */ + area: number; + + /** + * 户型(如2室1厅1卫) + */ + layout: string; + + /** + * 朝向('东','南','西','北','东南','东北','西南','西北') + */ + orientation: number; + + /** + * 是否可售 + */ + isForSale: number; + + /** + * 状态('空置','已售','已租','自用') + */ + status: number; + +} + +export interface RoomForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 所属楼层ID + */ + floorCode?: string; + + /** + * 房间编码 + */ + roomCode?: string; + + /** + * 房间号(如101,202) + */ + roomNumber?: string; + + /** + * 房间类型('住宅','商铺','办公室','设备间','公共区域') + */ + roomType?: number; + + /** + * 面积(平方米) + */ + area?: number; + + /** + * 户型(如2室1厅1卫) + */ + layout?: string; + + /** + * 朝向('东','南','西','北','东南','东北','西南','西北') + */ + orientation?: number; + + /** + * 是否可售 + */ + isForSale?: number; + + /** + * 状态('空置','已售','已租','自用') + */ + status?: number; + +} + +export interface RoomQuery extends PageQuery { + /** + * 所属楼层ID + */ + floorCode?: string; + + /** + * 房间编码 + */ + roomCode?: string; + + /** + * 房间号(如101,202) + */ + roomNumber?: string; + + /** + * 房间类型('住宅','商铺','办公室','设备间','公共区域') + */ + roomType?: number; + + /** + * 面积(平方米) + */ + area?: number; + + /** + * 户型(如2室1厅1卫) + */ + layout?: string; + + /** + * 朝向('东','南','西','北','东南','东北','西南','西北') + */ + orientation?: number; + + /** + * 是否可售 + */ + isForSale?: number; + + /** + * 状态('空置','已售','已租','自用') + */ + status?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/unit/index.ts b/apps/web-antd/src/api/property/unit/index.ts new file mode 100644 index 00000000..8563db68 --- /dev/null +++ b/apps/web-antd/src/api/property/unit/index.ts @@ -0,0 +1,61 @@ +import type { UnitVO, UnitForm, UnitQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询单元列表 +* @param params +* @returns 单元列表 +*/ +export function unitList(params?: UnitQuery) { + return requestClient.get>('/property/unit/list', { params }); +} + +/** + * 导出单元列表 + * @param params + * @returns 单元列表 + */ +export function unitExport(params?: UnitQuery) { + return commonExport('/property/unit/export', params ?? {}); +} + +/** + * 查询单元详情 + * @param id id + * @returns 单元详情 + */ +export function unitInfo(id: ID) { + return requestClient.get(`/property/unit/${id}`); +} + +/** + * 新增单元 + * @param data + * @returns void + */ +export function unitAdd(data: UnitForm) { + return requestClient.postWithMsg('/property/unit', data); +} + +/** + * 更新单元 + * @param data + * @returns void + */ +export function unitUpdate(data: UnitForm) { + return requestClient.putWithMsg('/property/unit', data); +} + +/** + * 删除单元 + * @param id id + * @returns void + */ +export function unitRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/unit/${id}`); +} diff --git a/apps/web-antd/src/api/property/unit/model.d.ts b/apps/web-antd/src/api/property/unit/model.d.ts new file mode 100644 index 00000000..22c21c69 --- /dev/null +++ b/apps/web-antd/src/api/property/unit/model.d.ts @@ -0,0 +1,114 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface UnitVO { + /** + * 主键id + */ + id: string | number; + + /** + * 建筑名称 + */ + buildingCode: string; + + /** + * 单元编码 + */ + unitCode: string; + + /** + * 单元名称 + */ + unitName: string; + + /** + * 单元层数 + */ + floorCount: number; + + /** + * 单元户数 + */ + householdCount: number; + + /** + * 楼梯数量 + */ + stairCount: number; + +} + +export interface UnitForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 建筑名称 + */ + buildingCode?: string; + + /** + * 单元编码 + */ + unitCode?: string; + + /** + * 单元名称 + */ + unitName?: string; + + /** + * 单元层数 + */ + floorCount?: number; + + /** + * 单元户数 + */ + householdCount?: number; + + /** + * 楼梯数量 + */ + stairCount?: number; + +} + +export interface UnitQuery extends PageQuery { + /** + * 建筑名称 + */ + buildingCode?: string; + + /** + * 单元编码 + */ + unitCode?: string; + + /** + * 单元名称 + */ + unitName?: string; + + /** + * 单元层数 + */ + floorCount?: number; + + /** + * 单元户数 + */ + householdCount?: number; + + /** + * 楼梯数量 + */ + stairCount?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/assetManage/application/data.ts b/apps/web-antd/src/views/property/assetManage/application/data.ts index 8b14dd49..aad2f7e8 100644 --- a/apps/web-antd/src/views/property/assetManage/application/data.ts +++ b/apps/web-antd/src/views/property/assetManage/application/data.ts @@ -1,5 +1,8 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; +import { renderDict } from "#/utils/render"; +import { DictEnum } from '@vben/constants'; + export const querySchema: FormSchemaGetter = () => [ @@ -59,12 +62,12 @@ export const columns: VxeGridProps['columns'] = [ field: 'id', }, { - title: '资产id', - field: 'assetId', + title: '资产', + field: 'assetName', }, { - title: '领用人id', - field: 'userId', + title: '领用人', + field: 'userName', }, { title: '数量', @@ -73,10 +76,15 @@ export const columns: VxeGridProps['columns'] = [ { title: '状态', field: 'state', + slots: { + default: ({ row }) => { + return renderDict(row.state, DictEnum.WY_ZCSHZT); + }, + }, }, { - title: '审批人id', - field: 'acceptanceUserId', + title: '审批人', + field: 'acceptanceUserName', }, { title: '审批时间', diff --git a/apps/web-antd/src/views/property/assetManage/asset/asset-modal.vue b/apps/web-antd/src/views/property/assetManage/asset/asset-modal.vue index ca80d29f..c3c13dea 100644 --- a/apps/web-antd/src/views/property/assetManage/asset/asset-modal.vue +++ b/apps/web-antd/src/views/property/assetManage/asset/asset-modal.vue @@ -10,7 +10,8 @@ import { assetAdd, assetInfo, assetUpdate } from '#/api/property/assetManage/ass import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { modalSchema } from './data'; -import { assetTypeselect } from "#/api/property/assetManage/assetType"; +import { packageSelectList } from "#/api/system/tenant-package"; +import { assetTypeselect } from "#/api/property/assetType"; import { depotList } from "#/api/property/assetManage/depot"; import { suppliersList } from "#/api/property/assetManage/suppliers"; diff --git a/apps/web-antd/src/views/property/assetManage/asset/data.ts b/apps/web-antd/src/views/property/assetManage/asset/data.ts index 8251773c..2b381f74 100644 --- a/apps/web-antd/src/views/property/assetManage/asset/data.ts +++ b/apps/web-antd/src/views/property/assetManage/asset/data.ts @@ -1,8 +1,9 @@ import type {FormSchemaGetter} from '#/adapter/form'; import type {VxeGridProps} from '#/adapter/vxe-table'; import {getDictOptions} from "#/utils/dict"; -import {assetTypeList} from "#/api/property/assetManage/assetType"; -import type {AssetTypeVO} from "#/api/property/assetManage/assetType/model"; +import { renderDict } from "#/utils/render"; +import { DictEnum } from '@vben/constants'; + export const querySchema: FormSchemaGetter = () => [ @@ -15,13 +16,6 @@ export const querySchema: FormSchemaGetter = () => [ component: 'Select', fieldName: 'model', label: '资产类型', - componentProps: { - showSearch:true, - placeholder:'根据类型名称搜索...', - onSearch:handleSearch, - onChange:handleChange, - options:typeData - }, }, { component: 'Select', @@ -34,6 +28,8 @@ export const querySchema: FormSchemaGetter = () => [ ]; +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ {type: 'checkbox', width: 60}, { @@ -51,7 +47,7 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '资产类型', - field: 'model', + field: 'modelName', }, { title: '规格', @@ -70,16 +66,16 @@ export const columns: VxeGridProps['columns'] = [ field: 'unit', }, { - title: '仓库id', - field: 'depotId', + title: '仓库', + field: 'depotName', }, { title: '描述信息', field: 'msg', }, { - title: '供应商id', - field: 'suppliersId', + title: '供应商', + field: 'suppliersName', }, { title: '入库时间', @@ -88,6 +84,11 @@ export const columns: VxeGridProps['columns'] = [ { title: '固定资产', field: 'type', + slots: { + default: ({ row }) => { + return renderDict(row.type, DictEnum.WY_SF); + }, + }, }, { title: '创建时间', @@ -120,7 +121,7 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '类型', fieldName: 'model', - component: 'Textarea', + component: 'Select', }, { label: '规格', @@ -143,9 +144,9 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Input', }, { - label: '仓库id', + label: '仓库', fieldName: 'depotId', - component: 'Input', + component: 'Select', }, { label: '描述信息', @@ -155,7 +156,7 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '供应商id', fieldName: 'suppliersId', - component: 'Input', + component: 'Select', }, { label: '入库时间', @@ -171,34 +172,8 @@ export const modalSchema: FormSchemaGetter = () => [ label: '固定资产类型', fieldName: 'type', component: 'Select', - componentProps: {}, + componentProps: { + options: getDictOptions('wy_sf'), + }, }, ]; -let typeData:AssetTypeVO[]=[] -const handleSearch = (val: string) => { - queryAssetsType(val, (d: any[]) => (typeData = d)); -}; -const handleChange = (val: string) => { - queryAssetsType(val, (d: any[]) => (typeData = d)); -}; - - - -function queryAssetsType(value: string, callback: any) { - let queryParam={ - pageNum:100, - pageSize:1, - assetTypeName:value - } - assetTypeList(queryParam).then(res=>{ - const data: any[] = []; - res.rows.forEach((r: any) => { - data.push({ - value: r.assetTypeName, - label: r.id, - }); - }); - callback(data); - }) -} - diff --git a/apps/web-antd/src/views/property/assetManage/asset/index.vue b/apps/web-antd/src/views/property/assetManage/asset/index.vue index 54433dcf..8c559e90 100644 --- a/apps/web-antd/src/views/property/assetManage/asset/index.vue +++ b/apps/web-antd/src/views/property/assetManage/asset/index.vue @@ -110,7 +110,6 @@ function handleDownloadExcel() {