Merge branch 'develop' of ssh://code.linyikj.com.cn:2222/pay/pay-company into develop
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m31s
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m31s
* 'develop' of ssh://code.linyikj.com.cn:2222/pay/pay-company: fix: 调账功能新增; 限定antd版本 fix: 优化交互
This commit is contained in:
commit
26b8f2fc93
@ -14,7 +14,7 @@
|
|||||||
"@ant-design/charts": "^2.6.6",
|
"@ant-design/charts": "^2.6.6",
|
||||||
"@ant-design/icons": "^5.0.1",
|
"@ant-design/icons": "^5.0.1",
|
||||||
"@ant-design/plots": "^2.6.6",
|
"@ant-design/plots": "^2.6.6",
|
||||||
"@ant-design/pro-components": "^2.8.10",
|
"@ant-design/pro-components": "2.8.10",
|
||||||
"@antv/l7": "^2.23.0",
|
"@antv/l7": "^2.23.0",
|
||||||
"@antv/l7-leaflet": "^1.0.2",
|
"@antv/l7-leaflet": "^1.0.2",
|
||||||
"@antv/l7-maps": "^2.23.0",
|
"@antv/l7-maps": "^2.23.0",
|
||||||
@ -22,7 +22,7 @@
|
|||||||
"@umijs/max": "^4.3.10",
|
"@umijs/max": "^4.3.10",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-react": "^1.0.6",
|
"@wangeditor/editor-for-react": "^1.0.6",
|
||||||
"antd": "^5.4.0",
|
"antd": "5.27.6",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
"dayjs": "^1.11.12",
|
"dayjs": "^1.11.12",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
|
|||||||
497
src/gen/ApiTypes.d.ts
vendored
497
src/gen/ApiTypes.d.ts
vendored
@ -451,6 +451,449 @@ declare namespace ApiTypes {
|
|||||||
"download_type": string; // 下载类型:page 当前页(含查询条件),query 所有页(含查询条件),all所有记录
|
"download_type": string; // 下载类型:page 当前页(含查询条件),query 所有页(含查询条件),all所有记录
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
namespace AssetItemCategories {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
};
|
||||||
|
type Tree = {
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"parent_id"?: number; // 上级分类ID
|
||||||
|
"name": string; // 分类名称
|
||||||
|
"code": string; // 分类标识
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"sort"?: number; // 排序
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"parent_id"?: number; // 上级分类ID
|
||||||
|
"name": string; // 分类名称
|
||||||
|
"code": string; // 分类标识
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"sort"?: number; // 排序
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type ToggleEnabled = {
|
||||||
|
"id": number; // id
|
||||||
|
"is_enabled": boolean; // 是否启用
|
||||||
|
};
|
||||||
|
type Select = {
|
||||||
|
"keywords"?: string; // 关键词
|
||||||
|
};
|
||||||
|
type SelectTree = {
|
||||||
|
"keywords"?: string; // 关键词
|
||||||
|
"parent_id"?: number; // 父级ID
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemDisposals {
|
||||||
|
type List = {
|
||||||
|
"confirm_status"?: string; // 审核状态,[enum:AssetItemDisposalConfirmStatusEnum]
|
||||||
|
"disposal_result"?: string; // 处置结果,[enum:AssetItemDisposalResultEnum]
|
||||||
|
"applicant_id"?: number; // 申请人ID
|
||||||
|
"disposal_employee_id"?: number; // 处置人ID
|
||||||
|
"name"?: string; // 资产名称(明细中搜索)
|
||||||
|
"code"?: string; // 资产编码(明细中搜索)
|
||||||
|
"created_at"?: string[]; // 创建时间范围
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"reason"?: string; // 处置原因
|
||||||
|
"attachments"?: string[]; // 附件
|
||||||
|
"items": string[]; // 资产明细
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Audit = {
|
||||||
|
"id": number; // id
|
||||||
|
"confirm_status": string; // 确认状态,[enum:AssetItemDisposalConfirmStatusEnum]
|
||||||
|
"reject_reason"?: string; // 驳回原因(驳回时填写)
|
||||||
|
};
|
||||||
|
type Complete = {
|
||||||
|
"id": number; // id
|
||||||
|
"disposal_date"?: Date; // 处置日期
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemInventories {
|
||||||
|
type List = {
|
||||||
|
"asset_item_warehouses_id"?: number; // 盘点仓库
|
||||||
|
"asset_projects_id"?: number; // 关联项目
|
||||||
|
"assigned_employee_id"?: number; // 盘点人
|
||||||
|
"status"?: string; // 状态
|
||||||
|
"inside_result"?: string; // 库内结果
|
||||||
|
"outside_result"?: string; // 库外结果
|
||||||
|
"name"?: string; // 盘点名称
|
||||||
|
"created_at"?: string[]; // 创建时间
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"asset_item_warehouses_id"?: number; // 盘点仓库
|
||||||
|
"asset_projects_id"?: number; // 关联项目
|
||||||
|
"name": string; // 盘点名称
|
||||||
|
"assigned_employee_id"?: number; // 盘点人
|
||||||
|
"category_ids": string[]; // 资产分类ID数组
|
||||||
|
"required_start_date"?: Date; // 要求开始日期
|
||||||
|
"required_end_date"?: Date; // 要求完成日期
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Details = {
|
||||||
|
"id": number; // 盘点任务ID
|
||||||
|
"result"?: string; // 盘点结果筛选
|
||||||
|
"name"?: string; // 资产名称
|
||||||
|
"code"?: string; // 资产编号
|
||||||
|
};
|
||||||
|
type Assign = {
|
||||||
|
"id": number; // id
|
||||||
|
"assigned_employee_id": number; // 盘点人ID
|
||||||
|
};
|
||||||
|
type Close = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Export = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemInventorySurplus {
|
||||||
|
type List = {
|
||||||
|
"asset_item_inventories_id"?: number; // 模糊搜索:盘点任务id
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Delete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemMaintenanceRules {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"status"?: string; // 状态
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"name": string; // 规则名称
|
||||||
|
"description"?: string; // 规则说明
|
||||||
|
"cycle_days": number; // 维保时间间隔(天)
|
||||||
|
"advance_days": number; // 提前生成天数
|
||||||
|
"deadline_days": number; // 完成期限天数
|
||||||
|
"asset_projects_id": number; // 项目ID
|
||||||
|
"asset_item_ids": string[]; // 关联资产ID列表
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"name": string; // 规则名称
|
||||||
|
"description"?: string; // 规则说明
|
||||||
|
"cycle_days": number; // 维保时间间隔(天)
|
||||||
|
"advance_days": number; // 提前生成天数
|
||||||
|
"deadline_days": number; // 完成期限天数
|
||||||
|
"asset_projects_id": number; // 项目ID
|
||||||
|
"asset_item_ids": string[]; // 关联资产ID列表
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Toggle = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemMaintenances {
|
||||||
|
type List = {
|
||||||
|
"type"?: string; // 工单类型
|
||||||
|
"status"?: string; // 工单状态
|
||||||
|
"source"?: string; // 来源
|
||||||
|
"code"?: string; // 资产编码
|
||||||
|
"name"?: string; // 资产名称
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"type": string; // 工单类型,[enum:AssetItemMaintenanceTypeEnum]
|
||||||
|
"asset_items_id": number; // 资产ID
|
||||||
|
"asset_projects_id": number; // 项目ID
|
||||||
|
"description"?: string; // 工单说明
|
||||||
|
"deadline"?: Date; // 要求完成日期
|
||||||
|
"attachments"?: string[]; // 附件
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"description"?: string; // 工单说明
|
||||||
|
"deadline"?: Date; // 要求完成日期
|
||||||
|
"attachments"?: string[]; // 附件
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Assign = {
|
||||||
|
"id": number; // id
|
||||||
|
"assigned_employee_id": number; // 指派员工ID
|
||||||
|
};
|
||||||
|
type Close = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemMarkings {
|
||||||
|
type List = {
|
||||||
|
"marking_type"?: string; // 标记类型,[enum:AssetItemMarkingTypeEnum]
|
||||||
|
"confirm_status"?: string; // 审核状态,[enum:AssetItemMarkingConfirmStatusEnum]
|
||||||
|
"applicant_id"?: number; // 申请人ID
|
||||||
|
"responsible_id"?: number; // 关联负责人ID
|
||||||
|
"name"?: string; // 资产名称(明细中搜索)
|
||||||
|
"code"?: string; // 资产编码(明细中搜索)
|
||||||
|
"created_at"?: string[]; // 创建时间范围
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"marking_type": string; // 标记类型,[enum:AssetItemMarkingTypeEnum]
|
||||||
|
"responsible_id"?: number; // 关联负责人ID
|
||||||
|
"description"?: string; // 上报说明
|
||||||
|
"attachments"?: string[]; // 附件
|
||||||
|
"items": string[]; // 资产明细
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Audit = {
|
||||||
|
"id": number; // id
|
||||||
|
"confirm_status": string; // 确认状态,[enum:AssetItemMarkingConfirmStatusEnum]
|
||||||
|
"reject_reason"?: string; // 驳回原因(驳回时填写)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemReceives {
|
||||||
|
type List = {
|
||||||
|
"organizations_id"?: number; // 领用部门
|
||||||
|
"asset_projects_id"?: number; // 关联项目
|
||||||
|
"applicant_id"?: number; // 领用人
|
||||||
|
"confirm_status"?: string; // 确认状态
|
||||||
|
"code"?: string; // 资产编号(明细中搜索)
|
||||||
|
"name"?: string; // 资产名称(明细中搜索)
|
||||||
|
"receive_date"?: string[]; // 领用日期
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"organizations_id": number; // 领用部门
|
||||||
|
"asset_projects_id"?: number; // 关联项目
|
||||||
|
"applicant_id": number; // 领用人
|
||||||
|
"receive_date": Date; // 领用日期
|
||||||
|
"reason": string; // 领用原因
|
||||||
|
"items": string[]; // 资产明细
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Audit = {
|
||||||
|
"id": number; // id
|
||||||
|
"confirm_status": string; // 确认状态,[enum:AssetItemReceiveConfirmStatusEnum]
|
||||||
|
"reject_reason"?: string; // 拒绝原因(拒绝时填写)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemReturns {
|
||||||
|
type List = {
|
||||||
|
"organizations_id"?: number; // 归还部门
|
||||||
|
"asset_projects_id"?: number; // 关联项目
|
||||||
|
"applicant_id"?: number; // 归还人
|
||||||
|
"confirm_status"?: string; // 确认状态
|
||||||
|
"code"?: string; // 资产编号(明细中搜索)
|
||||||
|
"name"?: string; // 资产名称(明细中搜索)
|
||||||
|
"return_date"?: string[]; // 归还日期
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"organizations_id": number; // 归还部门
|
||||||
|
"asset_projects_id"?: number; // 关联项目
|
||||||
|
"applicant_id": number; // 归还人
|
||||||
|
"return_date": Date; // 归还日期
|
||||||
|
"reason"?: string; // 归还说明
|
||||||
|
"confirm_employee_id": number; // 确认人
|
||||||
|
"items": string[]; // 资产明细
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Audit = {
|
||||||
|
"id": number; // id
|
||||||
|
"confirm_status": string; // 确认状态,[enum:AssetItemReturnConfirmStatusEnum]
|
||||||
|
"reject_reason"?: string; // 拒绝原因(拒绝时填写)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemTransfers {
|
||||||
|
type List = {
|
||||||
|
"to_warehouse_id"?: number; // 调入仓库ID
|
||||||
|
"batch_no"?: string; // 调拨批次号(模糊搜索)
|
||||||
|
"confirm_status"?: string; // 审核状态,[enum:AssetItemTransferConfirmStatusEnum]
|
||||||
|
"from_warehouse_id"?: number; // 调出仓库ID
|
||||||
|
"applicant_id"?: number; // 申请人ID
|
||||||
|
"transfer_date"?: string[]; // 调拨日期范围
|
||||||
|
"name"?: string; // 资产名称(明细中搜索)
|
||||||
|
"code"?: string; // 资产编码(明细中搜索)
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"from_warehouse_id": number; // 调出仓库ID
|
||||||
|
"to_warehouse_id": number; // 调入仓库ID
|
||||||
|
"receiver_id"?: number; // 接收人ID
|
||||||
|
"transfer_date": Date; // 调拨日期
|
||||||
|
"reason": string; // 调拨原因
|
||||||
|
"items": string[]; // 资产明细
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Audit = {
|
||||||
|
"id": number; // id
|
||||||
|
"confirm_status": string; // 确认状态,[enum:AssetItemTransferConfirmStatusEnum]
|
||||||
|
"reject_reason"?: string; // 驳回原因(驳回时填写)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemWarehouseManagers {
|
||||||
|
type List = {
|
||||||
|
"asset_item_warehouses_id"?: number; // 仓库ID
|
||||||
|
"company_employees_id"?: number; // 员工ID
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"asset_item_warehouses_id": number; // 仓库ID
|
||||||
|
"company_employees_id": number; // 员工ID
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Select = {
|
||||||
|
"asset_item_warehouses_id": number; // 仓库ID
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItemWarehouses {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"name": string; // 仓库名称
|
||||||
|
"province"?: string; // 省
|
||||||
|
"city"?: string; // 市
|
||||||
|
"district"?: string; // 区
|
||||||
|
"street"?: string; // 街道
|
||||||
|
"address"?: string; // 详细地址
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"manager_ids"?: string[]; // 管理员ID列表
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"name": string; // 仓库名称
|
||||||
|
"province"?: string; // 省
|
||||||
|
"city"?: string; // 市
|
||||||
|
"district"?: string; // 区
|
||||||
|
"street"?: string; // 街道
|
||||||
|
"address"?: string; // 详细地址
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"manager_ids"?: string[]; // 管理员ID列表
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type ToggleEnabled = {
|
||||||
|
"id": number; // id
|
||||||
|
"is_enabled": boolean; // 是否启用
|
||||||
|
};
|
||||||
|
type Select = {
|
||||||
|
"keywords"?: string; // 关键词
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace AssetItems {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"code"?: string; // 模糊搜索:资产编码
|
||||||
|
"asset_item_category_level1_id"?: number; // 一级分类id
|
||||||
|
"asset_item_category_level2_id"?: number; // 二级分类id
|
||||||
|
"asset_item_category_level3_id"?: number; // 三级分类id
|
||||||
|
"asset_item_warehouses_id"?: number; // 仓库id
|
||||||
|
"entry_type"?: string; // 入库方式
|
||||||
|
"status"?: string; // 资产状态
|
||||||
|
"manage_status"?: string; // 管理状态
|
||||||
|
"company_employees_id"?: number; // 责任管理人id
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"entry_date"?: string[]; // 入库日期
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"name": string; // 资产名称
|
||||||
|
"asset_item_category_level1_id": number; // 一级分类id
|
||||||
|
"asset_item_category_level2_id"?: number; // 二级分类id
|
||||||
|
"asset_item_category_level3_id"?: number; // 三级分类id
|
||||||
|
"asset_item_warehouses_id": number; // 存放仓库id
|
||||||
|
"entry_type": string; // 入库方式,[enum:AssetItemsEntryTypeEnum]
|
||||||
|
"entry_date"?: Date; // 入库日期
|
||||||
|
"purchase_date"?: Date; // 采购日期
|
||||||
|
"unit_price"?: number; // 单价
|
||||||
|
"specification"?: string; // 规格型号
|
||||||
|
"brand"?: string; // 品牌
|
||||||
|
"warranty_period"?: number; // 保修期限(天)
|
||||||
|
"warranty_end_date"?: Date; // 保修结束日期
|
||||||
|
"ownership"?: string; // 资产归属
|
||||||
|
"company_employees_id"?: number; // 责任管理人id
|
||||||
|
"attachments"?: string[]; // 附件
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
type BatchStore = {
|
||||||
|
"entry_type": string; // 入库方式,[enum:AssetItemsEntryTypeEnum]
|
||||||
|
"asset_item_warehouses_id": number; // 存放仓库id
|
||||||
|
"company_employees_id"?: number; // 责任管理人id
|
||||||
|
"entry_date"?: Date; // 入库日期
|
||||||
|
"purchase_date"?: Date; // 采购日期
|
||||||
|
"ownership"?: string; // 资产归属
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"items": string[]; // 入库商品清单
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"name": string; // 资产名称
|
||||||
|
"asset_item_category_level1_id": number; // 一级分类id
|
||||||
|
"asset_item_category_level2_id"?: number; // 二级分类id
|
||||||
|
"asset_item_category_level3_id"?: number; // 三级分类id
|
||||||
|
"asset_item_warehouses_id": number; // 存放仓库id
|
||||||
|
"entry_date"?: Date; // 入库日期
|
||||||
|
"purchase_date"?: Date; // 采购日期
|
||||||
|
"unit_price"?: number; // 单价
|
||||||
|
"specification"?: string; // 规格型号
|
||||||
|
"brand"?: string; // 品牌
|
||||||
|
"warranty_period"?: number; // 保修期限(天)
|
||||||
|
"warranty_end_date"?: Date; // 保修结束日期
|
||||||
|
"ownership"?: string; // 资产归属
|
||||||
|
"company_employees_id"?: number; // 责任管理人id
|
||||||
|
"attachments"?: string[]; // 附件
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Logs = {
|
||||||
|
"id": number; // 资产id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type UpdateStatus = {
|
||||||
|
"id": number; // id
|
||||||
|
"status": string; // 资产状态,[enum:AssetItemsStatusEnum]
|
||||||
|
};
|
||||||
|
type UpdateManageStatus = {
|
||||||
|
"id": number; // id
|
||||||
|
"manage_status": string; // 管理状态,[enum:AssetItemsManageStatusEnum]
|
||||||
|
};
|
||||||
|
}
|
||||||
namespace AssetParkingPlaces {
|
namespace AssetParkingPlaces {
|
||||||
type List = {
|
type List = {
|
||||||
"id"?: number; // 车场id
|
"id"?: number; // 车场id
|
||||||
@ -878,16 +1321,22 @@ declare namespace ApiTypes {
|
|||||||
type Store = {
|
type Store = {
|
||||||
"bill_id": number; // 账单id
|
"bill_id": number; // 账单id
|
||||||
"refund_amount"?: number; // 退款金额(单位分)
|
"refund_amount"?: number; // 退款金额(单位分)
|
||||||
"refund_reason"?: string; // 退款原因
|
"company_receipt_accounts_id": number; // 出款账户id
|
||||||
"refund_notes"?: string; // 退款备注
|
"payee_name"?: string; // 收款人姓名
|
||||||
|
"payee_bank"?: string; // 收款银行
|
||||||
|
"payee_account"?: string; // 收款账号
|
||||||
|
"reason"?: string; // 退款原因
|
||||||
|
"approval_templates_id"?: number; // 审批模板ID
|
||||||
|
"node_approvers"?: string[]; // 各节点审批人员列表
|
||||||
};
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
"id": number; // 退款记录id
|
"id": number; // 退款记录id
|
||||||
};
|
};
|
||||||
type Audit = {
|
type Complete = {
|
||||||
"id": number; // 退款记录id
|
"id": number; // 退款记录id
|
||||||
"approved": boolean; // 是否通过
|
"serial_number"?: string; // 退款流水号
|
||||||
"notes"?: string; // 审核备注
|
"refund_time"?: Date; // 退款时间
|
||||||
|
"voucher"?: string[]; // 退款凭证
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
namespace Bills {
|
namespace Bills {
|
||||||
@ -976,10 +1425,14 @@ declare namespace ApiTypes {
|
|||||||
"id": number; // 账单ID
|
"id": number; // 账单ID
|
||||||
};
|
};
|
||||||
type AuditPayment = {
|
type AuditPayment = {
|
||||||
"id": number; // 支付记录ID(bill_payments.id)
|
"id": number; // 账单ID(bills.id)
|
||||||
"status": string; // 审核状态,[enum:BillPaymentsStatusEnum]
|
"status": string; // 审核状态,[enum:BillPaymentsStatusEnum]
|
||||||
"rejected_reason"?: string; // 驳回原因
|
"rejected_reason"?: string; // 驳回原因
|
||||||
};
|
};
|
||||||
|
type UpdateSerialNumber = {
|
||||||
|
"id": number; // 账单ID
|
||||||
|
"serial_number": string; // 流水号
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace HouseBills {
|
namespace HouseBills {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1429,6 +1882,7 @@ declare namespace ApiTypes {
|
|||||||
type List = {
|
type List = {
|
||||||
"company_supplier_name"?: string; // 企业名称
|
"company_supplier_name"?: string; // 企业名称
|
||||||
"type"?: string; // 印章类型,[enum:CompanySealsTypeEnum]
|
"type"?: string; // 印章类型,[enum:CompanySealsTypeEnum]
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"company_suppliers_id": number; // 企业名称
|
"company_suppliers_id": number; // 企业名称
|
||||||
@ -1436,7 +1890,7 @@ declare namespace ApiTypes {
|
|||||||
"use_date"?: Date; // 启用日期
|
"use_date"?: Date; // 启用日期
|
||||||
"company_employees_id": number; // 保管人id,[ref:company_employees]
|
"company_employees_id": number; // 保管人id,[ref:company_employees]
|
||||||
"seal_image"?: string[]; // 印章图片
|
"seal_image"?: string[]; // 印章图片
|
||||||
"is_enabled"?: number; // 是否启用
|
"is_enabled"?: boolean; // 是否启用
|
||||||
"remarks"?: string; // 备注
|
"remarks"?: string; // 备注
|
||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
@ -1445,7 +1899,7 @@ declare namespace ApiTypes {
|
|||||||
"type": string; // 印章类型,[enum:CompanySealsTypeEnum]
|
"type": string; // 印章类型,[enum:CompanySealsTypeEnum]
|
||||||
"use_date"?: Date; // 启用日期
|
"use_date"?: Date; // 启用日期
|
||||||
"seal_image"?: string[]; // 印章图片
|
"seal_image"?: string[]; // 印章图片
|
||||||
"is_enabled"?: number; // 是否启用
|
"is_enabled"?: boolean; // 是否启用
|
||||||
"remarks"?: string; // 备注
|
"remarks"?: string; // 备注
|
||||||
};
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
@ -1472,6 +1926,7 @@ declare namespace ApiTypes {
|
|||||||
type Select = {
|
type Select = {
|
||||||
"company_supplier_name"?: string; // 企业名称
|
"company_supplier_name"?: string; // 企业名称
|
||||||
"type"?: string; // 印章类型,[enum:CompanySealsTypeEnum]
|
"type"?: string; // 印章类型,[enum:CompanySealsTypeEnum]
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2237,7 +2692,7 @@ declare namespace ApiTypes {
|
|||||||
"status"?: string; // 状态,[enum:ContractsStatusEnum]
|
"status"?: string; // 状态,[enum:ContractsStatusEnum]
|
||||||
"status_array"?: string[]; // 状态,[enum:ContractsStatusEnum]
|
"status_array"?: string[]; // 状态,[enum:ContractsStatusEnum]
|
||||||
"counterparty"?: string; // 交易方名称
|
"counterparty"?: string; // 交易方名称
|
||||||
"is_seal"?: boolean; // 是否用印: 0否,1是
|
"is_use_seal"?: boolean; // 是否用印: 0否,1是
|
||||||
"end_time"?: Date; // 到期时间
|
"end_time"?: Date; // 到期时间
|
||||||
"contract_types_id"?: number; // 合同类型id,[ref:contract_types]
|
"contract_types_id"?: number; // 合同类型id,[ref:contract_types]
|
||||||
"contract_type_name"?: string; // 合同类型名称
|
"contract_type_name"?: string; // 合同类型名称
|
||||||
@ -2413,6 +2868,7 @@ declare namespace ApiTypes {
|
|||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
"parent_id"?: number; // 父级ID
|
"parent_id"?: number; // 父级ID
|
||||||
|
"is_enabled"?: boolean; // 是否启用:0-否,1-是
|
||||||
};
|
};
|
||||||
type TreeList = {
|
type TreeList = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
@ -2421,14 +2877,14 @@ declare namespace ApiTypes {
|
|||||||
type Store = {
|
type Store = {
|
||||||
"name": string; // 分类名称
|
"name": string; // 分类名称
|
||||||
"description"?: string; // 分类描述
|
"description"?: string; // 分类描述
|
||||||
"is_enabled"?: number; // 是否启用:0-否,1-是
|
"is_enabled"?: boolean; // 是否启用:0-否,1-是
|
||||||
"parent_id"?: number; // 父级分类ID
|
"parent_id"?: number; // 父级分类ID
|
||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
"name": string; // 分类名称
|
"name": string; // 分类名称
|
||||||
"description"?: string; // 分类描述
|
"description"?: string; // 分类描述
|
||||||
"is_enabled"?: number; // 是否启用:0-否,1-是
|
"is_enabled"?: boolean; // 是否启用:0-否,1-是
|
||||||
"parent_id"?: number; // 父级分类ID
|
"parent_id"?: number; // 父级分类ID
|
||||||
};
|
};
|
||||||
type Move = {
|
type Move = {
|
||||||
@ -2479,12 +2935,12 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"name": string; // 名称
|
"name": string; // 名称
|
||||||
"is_enabled"?: number; // 是否启用:0-否,1-是
|
"is_enabled"?: boolean; // 是否启用:0-否,1-是
|
||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
"name": string; // 名称
|
"name": string; // 名称
|
||||||
"is_enabled"?: number; // 是否启用:0-否,1-是
|
"is_enabled"?: boolean; // 是否启用:0-否,1-是
|
||||||
};
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
@ -2674,6 +3130,7 @@ declare namespace ApiTypes {
|
|||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
"asset_projects_id"?: number; // 所属项目id,[ref:asset_projects]
|
"asset_projects_id"?: number; // 所属项目id,[ref:asset_projects]
|
||||||
|
"employee_name"?: string; // 网格员名称
|
||||||
"project_name"?: string; // 项目名称
|
"project_name"?: string; // 项目名称
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
@ -2692,9 +3149,9 @@ declare namespace ApiTypes {
|
|||||||
type Delete = {
|
type Delete = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
type AddManager = {
|
type SetMembers = {
|
||||||
"id": number; // id
|
"id": number; // 网格ID
|
||||||
"company_employees_id": number; // 公司员工id
|
"company_employees_ids": string[]; // 员工列表
|
||||||
};
|
};
|
||||||
type GetGridMark = {
|
type GetGridMark = {
|
||||||
"asset_projects_id": number; // -
|
"asset_projects_id": number; // -
|
||||||
@ -3070,6 +3527,13 @@ declare namespace ApiTypes {
|
|||||||
type ImportOfflinePayment = {
|
type ImportOfflinePayment = {
|
||||||
"upload_file": mimes:xlsx,xls; // 上传文件
|
"upload_file": mimes:xlsx,xls; // 上传文件
|
||||||
};
|
};
|
||||||
|
type TransferBills = {
|
||||||
|
"id": number; // 收款订单ID
|
||||||
|
"new_bills": string[]; // 目标账单清单
|
||||||
|
"approval_templates_id": number; // 审批模板ID
|
||||||
|
"approval_remark"?: string; // 审批备注
|
||||||
|
"node_approvers"?: string[]; // 各节点审批人员列表
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace HousePrepaymentLogs {
|
namespace HousePrepaymentLogs {
|
||||||
type List = {
|
type List = {
|
||||||
@ -3588,6 +4052,7 @@ declare namespace ApiTypes {
|
|||||||
namespace Renovation {
|
namespace Renovation {
|
||||||
namespace RenovationApplies {
|
namespace RenovationApplies {
|
||||||
type List = {
|
type List = {
|
||||||
|
"asset_projects_id"?: number; // 所属项目id,[ref:asset_projects]
|
||||||
"full_name"?: string; // 模糊搜索:房屋名称
|
"full_name"?: string; // 模糊搜索:房屋名称
|
||||||
"status"?: string; // 状态,[enum:RenovationAppliesStatusEnum]
|
"status"?: string; // 状态,[enum:RenovationAppliesStatusEnum]
|
||||||
"construction_status"?: string; // 施工状态,[enum:RenovationAppliesConstructionStatusEnum]
|
"construction_status"?: string; // 施工状态,[enum:RenovationAppliesConstructionStatusEnum]
|
||||||
|
|||||||
285
src/gen/Apis.ts
285
src/gen/Apis.ts
@ -128,7 +128,7 @@ export const Apis = {
|
|||||||
return request('company/archive/house_occupants/import', { data });
|
return request('company/archive/house_occupants/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/archive/house_occupants/download_template', {responseType: 'blob',});
|
return request('company/archive/house_occupants/download_template', {});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HouseRegisters: {
|
HouseRegisters: {
|
||||||
@ -208,10 +208,10 @@ export const Apis = {
|
|||||||
return request('company/asset/asset_car_ports/import', { data });
|
return request('company/asset/asset_car_ports/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/asset/asset_car_ports/download_template', {responseType: 'blob',});
|
return request('company/asset/asset_car_ports/download_template', {});
|
||||||
},
|
},
|
||||||
Export(data: ApiTypes.Asset.AssetCarPorts.Export): Promise<MyResponseType> {
|
Export(data: ApiTypes.Asset.AssetCarPorts.Export): Promise<MyResponseType> {
|
||||||
return request('company/asset/asset_car_ports/export', { responseType: 'blob',data });
|
return request('company/asset/asset_car_ports/export', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
AssetHouses: {
|
AssetHouses: {
|
||||||
@ -243,6 +243,251 @@ export const Apis = {
|
|||||||
return request('company/asset/asset_houses/export', { data });
|
return request('company/asset/asset_houses/export', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
AssetItemCategories: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemCategories.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/list', { data });
|
||||||
|
},
|
||||||
|
Tree(data?: ApiTypes.Asset.AssetItemCategories.Tree): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/tree', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemCategories.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Asset.AssetItemCategories.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemCategories.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/show', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Asset.AssetItemCategories.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/soft_delete', { data });
|
||||||
|
},
|
||||||
|
ToggleEnabled(data: ApiTypes.Asset.AssetItemCategories.ToggleEnabled): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/toggle_enabled', { data });
|
||||||
|
},
|
||||||
|
Select(data?: ApiTypes.Asset.AssetItemCategories.Select): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/select', { data });
|
||||||
|
},
|
||||||
|
SelectTree(data?: ApiTypes.Asset.AssetItemCategories.SelectTree): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_categories/select_tree', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemDisposals: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemDisposals.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_disposals/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemDisposals.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_disposals/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemDisposals.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_disposals/show', { data });
|
||||||
|
},
|
||||||
|
Audit(data: ApiTypes.Asset.AssetItemDisposals.Audit): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_disposals/audit', { data });
|
||||||
|
},
|
||||||
|
Complete(data: ApiTypes.Asset.AssetItemDisposals.Complete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_disposals/complete', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemInventories: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemInventories.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemInventories.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemInventories.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/show', { data });
|
||||||
|
},
|
||||||
|
Details(data: ApiTypes.Asset.AssetItemInventories.Details): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/details', { data });
|
||||||
|
},
|
||||||
|
Assign(data: ApiTypes.Asset.AssetItemInventories.Assign): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/assign', { data });
|
||||||
|
},
|
||||||
|
Close(data: ApiTypes.Asset.AssetItemInventories.Close): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/close', { data });
|
||||||
|
},
|
||||||
|
Export(data: ApiTypes.Asset.AssetItemInventories.Export): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventories/export', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemInventorySurplus: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemInventorySurplus.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventory_surplus/list', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemInventorySurplus.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventory_surplus/show', { data });
|
||||||
|
},
|
||||||
|
Delete(data: ApiTypes.Asset.AssetItemInventorySurplus.Delete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_inventory_surplus/delete', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemMaintenanceRules: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemMaintenanceRules.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenance_rules/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemMaintenanceRules.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenance_rules/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Asset.AssetItemMaintenanceRules.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenance_rules/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemMaintenanceRules.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenance_rules/show', { data });
|
||||||
|
},
|
||||||
|
Toggle(data: ApiTypes.Asset.AssetItemMaintenanceRules.Toggle): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenance_rules/toggle', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Asset.AssetItemMaintenanceRules.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenance_rules/soft_delete', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemMaintenances: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemMaintenances.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenances/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemMaintenances.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenances/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Asset.AssetItemMaintenances.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenances/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemMaintenances.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenances/show', { data });
|
||||||
|
},
|
||||||
|
Assign(data: ApiTypes.Asset.AssetItemMaintenances.Assign): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenances/assign', { data });
|
||||||
|
},
|
||||||
|
Close(data: ApiTypes.Asset.AssetItemMaintenances.Close): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_maintenances/close', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemMarkings: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemMarkings.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_markings/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemMarkings.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_markings/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemMarkings.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_markings/show', { data });
|
||||||
|
},
|
||||||
|
Audit(data: ApiTypes.Asset.AssetItemMarkings.Audit): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_markings/audit', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemReceives: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemReceives.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_receives/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemReceives.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_receives/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemReceives.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_receives/show', { data });
|
||||||
|
},
|
||||||
|
Audit(data: ApiTypes.Asset.AssetItemReceives.Audit): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_receives/audit', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemReturns: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemReturns.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_returns/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemReturns.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_returns/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemReturns.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_returns/show', { data });
|
||||||
|
},
|
||||||
|
Audit(data: ApiTypes.Asset.AssetItemReturns.Audit): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_returns/audit', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemTransfers: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemTransfers.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_transfers/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemTransfers.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_transfers/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemTransfers.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_transfers/show', { data });
|
||||||
|
},
|
||||||
|
Audit(data: ApiTypes.Asset.AssetItemTransfers.Audit): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_transfers/audit', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemWarehouseManagers: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemWarehouseManagers.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouse_managers/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemWarehouseManagers.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouse_managers/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemWarehouseManagers.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouse_managers/show', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Asset.AssetItemWarehouseManagers.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouse_managers/soft_delete', { data });
|
||||||
|
},
|
||||||
|
Select(data: ApiTypes.Asset.AssetItemWarehouseManagers.Select): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouse_managers/select', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItemWarehouses: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItemWarehouses.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItemWarehouses.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Asset.AssetItemWarehouses.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItemWarehouses.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/show', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Asset.AssetItemWarehouses.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/soft_delete', { data });
|
||||||
|
},
|
||||||
|
ToggleEnabled(data: ApiTypes.Asset.AssetItemWarehouses.ToggleEnabled): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/toggle_enabled', { data });
|
||||||
|
},
|
||||||
|
Select(data?: ApiTypes.Asset.AssetItemWarehouses.Select): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_item_warehouses/select', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AssetItems: {
|
||||||
|
List(data?: ApiTypes.Asset.AssetItems.List): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Asset.AssetItems.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/store', { data });
|
||||||
|
},
|
||||||
|
BatchStore(data: ApiTypes.Asset.AssetItems.BatchStore): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/batch_store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Asset.AssetItems.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Asset.AssetItems.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/show', { data });
|
||||||
|
},
|
||||||
|
Logs(data: ApiTypes.Asset.AssetItems.Logs): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/logs', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Asset.AssetItems.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/soft_delete', { data });
|
||||||
|
},
|
||||||
|
UpdateStatus(data: ApiTypes.Asset.AssetItems.UpdateStatus): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/update_status', { data });
|
||||||
|
},
|
||||||
|
UpdateManageStatus(data: ApiTypes.Asset.AssetItems.UpdateManageStatus): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_items/update_manage_status', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
AssetParkingPlaces: {
|
AssetParkingPlaces: {
|
||||||
List(data?: ApiTypes.Asset.AssetParkingPlaces.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Asset.AssetParkingPlaces.List): Promise<MyResponseType> {
|
||||||
return request('company/asset/asset_parking_places/list', { data });
|
return request('company/asset/asset_parking_places/list', { data });
|
||||||
@ -367,7 +612,7 @@ export const Apis = {
|
|||||||
return request('company/attendance/attendance_records/show', { data });
|
return request('company/attendance/attendance_records/show', { data });
|
||||||
},
|
},
|
||||||
Export(data?: ApiTypes.Attendance.AttendanceRecords.Export): Promise<MyResponseType> {
|
Export(data?: ApiTypes.Attendance.AttendanceRecords.Export): Promise<MyResponseType> {
|
||||||
return request('company/attendance/attendance_records/export', { responseType: 'blob',data });
|
return request('company/attendance/attendance_records/export', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
AttendanceSchedules: {
|
AttendanceSchedules: {
|
||||||
@ -457,8 +702,8 @@ export const Apis = {
|
|||||||
Show(data: ApiTypes.Bill.BillRefunds.Show): Promise<MyResponseType> {
|
Show(data: ApiTypes.Bill.BillRefunds.Show): Promise<MyResponseType> {
|
||||||
return request('company/bill/bill_refunds/show', { data });
|
return request('company/bill/bill_refunds/show', { data });
|
||||||
},
|
},
|
||||||
Audit(data: ApiTypes.Bill.BillRefunds.Audit): Promise<MyResponseType> {
|
Complete(data: ApiTypes.Bill.BillRefunds.Complete): Promise<MyResponseType> {
|
||||||
return request('company/bill/bill_refunds/audit', { data });
|
return request('company/bill/bill_refunds/complete', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Bills: {
|
Bills: {
|
||||||
@ -498,6 +743,9 @@ export const Apis = {
|
|||||||
AuditPayment(data: ApiTypes.Bill.Bills.AuditPayment): Promise<MyResponseType> {
|
AuditPayment(data: ApiTypes.Bill.Bills.AuditPayment): Promise<MyResponseType> {
|
||||||
return request('company/bill/bills/audit_payment', { data });
|
return request('company/bill/bills/audit_payment', { data });
|
||||||
},
|
},
|
||||||
|
UpdateSerialNumber(data: ApiTypes.Bill.Bills.UpdateSerialNumber): Promise<MyResponseType> {
|
||||||
|
return request('company/bill/bills/update_serial_number', { data });
|
||||||
|
},
|
||||||
},
|
},
|
||||||
HouseBills: {
|
HouseBills: {
|
||||||
List(data?: ApiTypes.Bill.HouseBills.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Bill.HouseBills.List): Promise<MyResponseType> {
|
||||||
@ -528,10 +776,10 @@ export const Apis = {
|
|||||||
return request('company/bill/house_bills/import', { data });
|
return request('company/bill/house_bills/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/bill/house_bills/download_template', {responseType: 'blob',});
|
return request('company/bill/house_bills/download_template', {});
|
||||||
},
|
},
|
||||||
Export(data: ApiTypes.Bill.HouseBills.Export): Promise<MyResponseType> {
|
Export(data: ApiTypes.Bill.HouseBills.Export): Promise<MyResponseType> {
|
||||||
return request('company/bill/house_bills/export', { responseType: 'blob',data });
|
return request('company/bill/house_bills/export', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -640,10 +888,10 @@ export const Apis = {
|
|||||||
return request('company/company/company_employees/import', { data });
|
return request('company/company/company_employees/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/company/company_employees/download_template', {responseType: 'blob',});
|
return request('company/company/company_employees/download_template', {});
|
||||||
},
|
},
|
||||||
Export(data?: ApiTypes.Company.CompanyEmployees.Export): Promise<MyResponseType> {
|
Export(data?: ApiTypes.Company.CompanyEmployees.Export): Promise<MyResponseType> {
|
||||||
return request('company/company/company_employees/export', { responseType: 'blob',data });
|
return request('company/company/company_employees/export', { data });
|
||||||
},
|
},
|
||||||
SyncWechatEmployees(): Promise<MyResponseType> {
|
SyncWechatEmployees(): Promise<MyResponseType> {
|
||||||
return request('company/company/company_employees/sync_wechat_employees', {});
|
return request('company/company/company_employees/sync_wechat_employees', {});
|
||||||
@ -1241,7 +1489,7 @@ export const Apis = {
|
|||||||
return request('company/contract/contracts/submit_approval', { data });
|
return request('company/contract/contracts/submit_approval', { data });
|
||||||
},
|
},
|
||||||
Export(data: ApiTypes.Contract.Contracts.Export): Promise<MyResponseType> {
|
Export(data: ApiTypes.Contract.Contracts.Export): Promise<MyResponseType> {
|
||||||
return request('company/contract/contracts/export', { responseType: 'blob',data });
|
return request('company/contract/contracts/export', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -1448,8 +1696,8 @@ export const Apis = {
|
|||||||
Delete(data: ApiTypes.Grid.Grids.Delete): Promise<MyResponseType> {
|
Delete(data: ApiTypes.Grid.Grids.Delete): Promise<MyResponseType> {
|
||||||
return request('company/grid/grids/delete', { data });
|
return request('company/grid/grids/delete', { data });
|
||||||
},
|
},
|
||||||
AddManager(data: ApiTypes.Grid.Grids.AddManager): Promise<MyResponseType> {
|
SetMembers(data: ApiTypes.Grid.Grids.SetMembers): Promise<MyResponseType> {
|
||||||
return request('company/grid/grids/add_manager', { data });
|
return request('company/grid/grids/set_members', { data });
|
||||||
},
|
},
|
||||||
GetGridMark(data: ApiTypes.Grid.Grids.GetGridMark): Promise<MyResponseType> {
|
GetGridMark(data: ApiTypes.Grid.Grids.GetGridMark): Promise<MyResponseType> {
|
||||||
return request('company/grid/grids/get_grid_mark', { data });
|
return request('company/grid/grids/get_grid_mark', { data });
|
||||||
@ -1653,6 +1901,9 @@ export const Apis = {
|
|||||||
ImportOfflinePayment(data: ApiTypes.HouseOrder.HouseOrders.ImportOfflinePayment): Promise<MyResponseType> {
|
ImportOfflinePayment(data: ApiTypes.HouseOrder.HouseOrders.ImportOfflinePayment): Promise<MyResponseType> {
|
||||||
return request('company/house_order/house_orders/import_offline_payment', { data });
|
return request('company/house_order/house_orders/import_offline_payment', { data });
|
||||||
},
|
},
|
||||||
|
TransferBills(data: ApiTypes.HouseOrder.HouseOrders.TransferBills): Promise<MyResponseType> {
|
||||||
|
return request('company/house_order/house_orders/transfer_bills', { data });
|
||||||
|
},
|
||||||
},
|
},
|
||||||
HousePrepaymentLogs: {
|
HousePrepaymentLogs: {
|
||||||
List(data?: ApiTypes.HouseOrder.HousePrepaymentLogs.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.HouseOrder.HousePrepaymentLogs.List): Promise<MyResponseType> {
|
||||||
@ -1729,7 +1980,7 @@ export const Apis = {
|
|||||||
return request('company/meter/house_meter_has_houses/import', { data });
|
return request('company/meter/house_meter_has_houses/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/meter/house_meter_has_houses/download_template', {responseType: 'blob',});
|
return request('company/meter/house_meter_has_houses/download_template', {});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HouseMeterReadings: {
|
HouseMeterReadings: {
|
||||||
@ -1752,7 +2003,7 @@ export const Apis = {
|
|||||||
return request('company/meter/house_meter_readings/import', { data });
|
return request('company/meter/house_meter_readings/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/meter/house_meter_readings/download_template', {responseType: 'blob',});
|
return request('company/meter/house_meter_readings/download_template', {});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HouseMeterTaskDetails: {
|
HouseMeterTaskDetails: {
|
||||||
@ -1806,10 +2057,10 @@ export const Apis = {
|
|||||||
return request('company/meter/house_meters/import', { data });
|
return request('company/meter/house_meters/import', { data });
|
||||||
},
|
},
|
||||||
DownloadTemplate(): Promise<MyResponseType> {
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
return request('company/meter/house_meters/download_template', {responseType: 'blob',});
|
return request('company/meter/house_meters/download_template', {});
|
||||||
},
|
},
|
||||||
Export(data?: ApiTypes.Meter.HouseMeters.Export): Promise<MyResponseType> {
|
Export(data?: ApiTypes.Meter.HouseMeters.Export): Promise<MyResponseType> {
|
||||||
return request('company/meter/house_meters/export', { responseType: 'blob',data });
|
return request('company/meter/house_meters/export', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
2268
src/gen/Enums.ts
2268
src/gen/Enums.ts
File diff suppressed because it is too large
Load Diff
@ -12,10 +12,8 @@ import ContractPaymentInfo from './ContractPaymentInfo';
|
|||||||
import ContractTerminationInfo from './ContractTerminationInfo';
|
import ContractTerminationInfo from './ContractTerminationInfo';
|
||||||
import RefundInfo from './RefundInfo';
|
import RefundInfo from './RefundInfo';
|
||||||
import SealInfo from './SealInfo';
|
import SealInfo from './SealInfo';
|
||||||
import {
|
import TemporaryBillUpdateInfo from './TemporaryBillUpdateInfo';
|
||||||
default as BillUpdateInfo,
|
import TransferBillsInfo from './TransferBillsInfo';
|
||||||
default as TemporaryBillUpdateInfo,
|
|
||||||
} from './TemporaryBillUpdateInfo';
|
|
||||||
|
|
||||||
export default function AuditShow(props: MyBetaModalFormProps) {
|
export default function AuditShow(props: MyBetaModalFormProps) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
@ -72,6 +70,9 @@ export default function AuditShow(props: MyBetaModalFormProps) {
|
|||||||
{config?.value?.type === 'ChargeStandardModification' && (
|
{config?.value?.type === 'ChargeStandardModification' && (
|
||||||
<ChargeStandardInfo item={config?.value} />
|
<ChargeStandardInfo item={config?.value} />
|
||||||
)}
|
)}
|
||||||
|
{config?.value?.type === 'HouseBillTransfer' && (
|
||||||
|
<TransferBillsInfo item={config?.value} />
|
||||||
|
)}
|
||||||
{config?.value?.type === 'BillUpdate' && (
|
{config?.value?.type === 'BillUpdate' && (
|
||||||
<TemporaryBillUpdateInfo item={config?.value} />
|
<TemporaryBillUpdateInfo item={config?.value} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -36,9 +36,6 @@ export default function BillUpdateInfo(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="计费周期">
|
<ProDescriptions.Item label="计费周期">
|
||||||
{data?.start_date} 至 {data?.end_date}
|
{data?.start_date} 至 {data?.end_date}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="备注">
|
|
||||||
{data?.remark || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -65,6 +62,9 @@ export default function BillUpdateInfo(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="申请时间">
|
<ProDescriptions.Item label="申请时间">
|
||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请说明">
|
||||||
|
{props?.item?.remark || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ export default function ChargeStandardInfo(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="申请时间">
|
<ProDescriptions.Item label="申请时间">
|
||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="备注" span={2}>
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
{model?.remark || '-'}
|
{model?.remark || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
|
|||||||
@ -84,7 +84,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="申请说明" span={2}>
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
{props?.item?.model?.remark || '-'}
|
{props?.item?.remark || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
|
|||||||
@ -52,10 +52,15 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{props?.item?.model?.payee_bank || '-'}
|
{props?.item?.model?.payee_bank || '-'}
|
||||||
{props?.item?.model?.payee_account || '-'}
|
{props?.item?.model?.payee_account || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请人">
|
||||||
|
{props?.item?.applicant_name || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="申请时间">
|
<ProDescriptions.Item label="申请时间">
|
||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
|
{props?.item?.remark || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="申请时间">
|
<ProDescriptions.Item label="申请时间">
|
||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="简要说明" span={2}>
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
{props?.item?.model?.reason || '-'}
|
{props?.item?.model?.reason || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
{/* 印章信息 */}
|
{/* 印章信息 */}
|
||||||
|
|||||||
147
src/pages/approval/common_info/TransferBillsInfo.tsx
Normal file
147
src/pages/approval/common_info/TransferBillsInfo.tsx
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
||||||
|
import { HouseBillsTypeEnum } from '@/gen/Enums';
|
||||||
|
import BIllInfo from '@/pages/bills/house_bills/modals/BIllInfo';
|
||||||
|
import OrderShow from '@/pages/bills/order_online/modals/OrderShow';
|
||||||
|
|
||||||
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Space, Table } from 'antd';
|
||||||
|
|
||||||
|
export default function TransferBillsInfo(props: MyBetaModalFormProps) {
|
||||||
|
const model = props?.item?.model;
|
||||||
|
const newData = model?.new_data;
|
||||||
|
const originalData = model?.original_data;
|
||||||
|
|
||||||
|
const orderData = originalData || newData || {};
|
||||||
|
const newBills = newData?.new_bills || [];
|
||||||
|
|
||||||
|
const formatAmount = (amount: any) => {
|
||||||
|
if (amount === undefined || amount === null || amount === '-') return '-';
|
||||||
|
return `${parseFloat(amount).toFixed(2)} 元`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderBillInfo = (bill: any) => {
|
||||||
|
const snapshot = bill?.snapshot || bill;
|
||||||
|
const houseName = snapshot?.asset_house?.full_name;
|
||||||
|
const carPortName = snapshot?.asset_car_port?.full_name;
|
||||||
|
const assetName = houseName || carPortName;
|
||||||
|
const period =
|
||||||
|
snapshot?.year && snapshot?.month
|
||||||
|
? `【${snapshot.year}-${String(snapshot.month).padStart(2, '0')}】`
|
||||||
|
: '';
|
||||||
|
if (assetName) {
|
||||||
|
return `${period}${assetName}`;
|
||||||
|
}
|
||||||
|
return snapshot?.bill_info || `账单 #${bill?.id || '-'}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const totalTransfer =
|
||||||
|
Math.round(
|
||||||
|
newBills.reduce(
|
||||||
|
(acc: number, item: any) => acc + (Number(item?.amount) || 0),
|
||||||
|
0,
|
||||||
|
) * 100,
|
||||||
|
) / 100;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<ProCard title="基本信息" size="small">
|
||||||
|
<ProDescriptions size="small" column={2}>
|
||||||
|
<ProDescriptions.Item label="申请事项">
|
||||||
|
{props?.item?.title || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="关联项目">
|
||||||
|
{props?.item?.asset_project?.name ||
|
||||||
|
orderData?.asset_project?.name ||
|
||||||
|
'-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="原收款单">
|
||||||
|
<Space>
|
||||||
|
{orderData?.order_id}
|
||||||
|
<OrderShow
|
||||||
|
item={orderData?.order_id || orderData?.id}
|
||||||
|
title="查看"
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="原收款单金额">
|
||||||
|
{formatAmount(orderData?.order_actual_paid_amount)}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请人">
|
||||||
|
{props?.item?.applicant_name || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请时间">
|
||||||
|
{props?.item?.created_at || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
|
{props?.item?.remark || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
|
||||||
|
<ProCard title="入账明细" size="small">
|
||||||
|
<Table
|
||||||
|
size="small"
|
||||||
|
bordered
|
||||||
|
pagination={false}
|
||||||
|
dataSource={newBills}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: '账单信息',
|
||||||
|
dataIndex: ['snapshot', 'bill_info'],
|
||||||
|
render: (_, record: any) => (
|
||||||
|
<BIllInfo
|
||||||
|
item={{ id: record?.id, type: 'link' }}
|
||||||
|
title={renderBillInfo(record)}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '账单类型',
|
||||||
|
dataIndex: ['snapshot', 'type'],
|
||||||
|
render: (value) => (
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={HouseBillsTypeEnum}
|
||||||
|
value={value}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '账单状态',
|
||||||
|
// dataIndex: ['snapshot', 'bill_status'],
|
||||||
|
// render: (value) => (
|
||||||
|
// <renderTextHelper.Tag
|
||||||
|
// Enums={HouseBillsBillStatusEnum}
|
||||||
|
// value={value}
|
||||||
|
// />
|
||||||
|
// ),
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '未收金额',
|
||||||
|
// dataIndex: ['snapshot', 'total_payable_amount'],
|
||||||
|
// align: 'right',
|
||||||
|
// render: (value) => formatAmount(value),
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '转入金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
align: 'right',
|
||||||
|
render: (value) => formatAmount(value),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
summary={() =>
|
||||||
|
newBills.length > 0 ? (
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={0} colSpan={2}>
|
||||||
|
<strong>转入金额合计</strong>
|
||||||
|
</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={1} align="right">
|
||||||
|
<strong>{formatAmount(totalTransfer)}</strong>
|
||||||
|
</Table.Summary.Cell>
|
||||||
|
</Table.Summary.Row>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</ProCard>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -21,6 +21,7 @@ import ContractTerminationInfo from '../../common_info/ContractTerminationInfo';
|
|||||||
import RefundInfo from '../../common_info/RefundInfo';
|
import RefundInfo from '../../common_info/RefundInfo';
|
||||||
import SealInfo from '../../common_info/SealInfo';
|
import SealInfo from '../../common_info/SealInfo';
|
||||||
import TemporaryBillUpdateInfo from '../../common_info/TemporaryBillUpdateInfo';
|
import TemporaryBillUpdateInfo from '../../common_info/TemporaryBillUpdateInfo';
|
||||||
|
import TransferBillsInfo from '../../common_info/TransferBillsInfo';
|
||||||
|
|
||||||
export default function Update(props: MyBetaModalFormProps) {
|
export default function Update(props: MyBetaModalFormProps) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
@ -108,6 +109,9 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{config?.value?.type === 'ChargeStandardModification' && (
|
{config?.value?.type === 'ChargeStandardModification' && (
|
||||||
<ChargeStandardInfo item={config?.value} />
|
<ChargeStandardInfo item={config?.value} />
|
||||||
)}
|
)}
|
||||||
|
{config?.value?.type === 'HouseBillTransfer' && (
|
||||||
|
<TransferBillsInfo item={config?.value} />
|
||||||
|
)}
|
||||||
{config?.value?.type === 'BillUpdate' && (
|
{config?.value?.type === 'BillUpdate' && (
|
||||||
<TemporaryBillUpdateInfo item={config?.value} />
|
<TemporaryBillUpdateInfo item={config?.value} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
import { MyBetaModalFormProps, MyButtons, renderTextHelper } from '@/common';
|
||||||
import { MyModal } from '@/components/MyModal';
|
import { MyModal } from '@/components/MyModal';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import {
|
||||||
@ -8,12 +8,14 @@ import {
|
|||||||
AssetHousesUsageEnum,
|
AssetHousesUsageEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
export default function info(props: MyBetaModalFormProps) {
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
const [show, setShow] = useState<any>({});
|
const [show, setShow] = useState<any>({});
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const getShow = useCallback(() => {
|
const getShow = useCallback(() => {
|
||||||
if (loading || !props?.item?.id) return;
|
if (loading || !props?.item?.id) return;
|
||||||
@ -50,8 +52,18 @@ export default function info(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions bordered>
|
<ProDescriptions bordered>
|
||||||
<ProDescriptions.Item label="房屋全名" span={2}>
|
<ProDescriptions.Item label="房屋全名" span={2}>
|
||||||
<Space>
|
<Space>
|
||||||
<span>【{show?.id}】</span>
|
{/* <span>【{show?.id}】</span> */}
|
||||||
{show?.full_name}
|
{show?.full_name}
|
||||||
|
{show?.id ? (
|
||||||
|
<MyButtons.View
|
||||||
|
title="查看"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/customer/archive/show/${show?.id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
'无'
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="房号">
|
<ProDescriptions.Item label="房号">
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import { ProTable } from '@ant-design/pro-components';
|
|||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
import HousesShow from '../houses/modals/HousesShow';
|
||||||
import AreaUpdate from './modals/AreaUpdate';
|
import AreaUpdate from './modals/AreaUpdate';
|
||||||
import SpaceShow from './modals/SpaceShow';
|
import SpaceShow from './modals/SpaceShow';
|
||||||
import SpaceUpdate from './modals/SpaceUpdate';
|
import SpaceUpdate from './modals/SpaceUpdate';
|
||||||
@ -119,7 +120,20 @@ export default function Index({ title = '车位列表' }) {
|
|||||||
dataIndex: 'built_area',
|
dataIndex: 'built_area',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '关联房屋',
|
||||||
|
dataIndex: 'asset_houses_id',
|
||||||
|
search: false,
|
||||||
|
render: (_, item: any) =>
|
||||||
|
item?.asset_houses_id ? (
|
||||||
|
<HousesShow
|
||||||
|
item={{ id: item?.asset_houses_id, type: 'link' }}
|
||||||
|
title="查看"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
),
|
||||||
|
},
|
||||||
// MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
|
|||||||
@ -61,12 +61,7 @@ export default function SpaceShow(props: MyBetaModalFormProps) {
|
|||||||
value={data?.status}
|
value={data?.status}
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="业主姓名">
|
|
||||||
{data?.owner_name || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="业主手机号">
|
|
||||||
{data?.owner_phone || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="关联房屋">
|
<ProDescriptions.Item label="关联房屋">
|
||||||
{data?.asset_houses_id ? (
|
{data?.asset_houses_id ? (
|
||||||
<MyButtons.View
|
<MyButtons.View
|
||||||
@ -81,7 +76,9 @@ export default function SpaceShow(props: MyBetaModalFormProps) {
|
|||||||
'无'
|
'无'
|
||||||
)}
|
)}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="车牌号">
|
||||||
|
{data?.car_number || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="备注" span={2}>
|
<ProDescriptions.Item label="备注" span={2}>
|
||||||
{data?.remark || '-'}
|
{data?.remark || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
|||||||
@ -99,7 +99,45 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
params: {
|
params: {
|
||||||
asset_projects_id: props?.item?.asset_projects_id,
|
asset_projects_id: props?.item?.asset_projects_id,
|
||||||
},
|
},
|
||||||
|
title: '关联房屋',
|
||||||
|
request: async (params) => {
|
||||||
|
const res = await Apis.Asset.AssetHouses.SelectFullName({
|
||||||
|
keywords: params?.keyWords,
|
||||||
|
asset_projects_id: props?.item?.asset_projects_id,
|
||||||
|
...params,
|
||||||
|
});
|
||||||
|
let list = res?.data || [];
|
||||||
|
// 编辑模式下,确保当前选中的房屋在列表中,以正确显示 label
|
||||||
|
const currentHouseId = props.item?.asset_houses_id;
|
||||||
|
if (
|
||||||
|
currentHouseId &&
|
||||||
|
!list.some((item: any) => item.value === currentHouseId)
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
const showRes = await Apis.Asset.AssetHouses.Show({
|
||||||
|
id: currentHouseId,
|
||||||
|
});
|
||||||
|
if (showRes?.data) {
|
||||||
|
list = [
|
||||||
|
{
|
||||||
|
label: showRes.data.full_name,
|
||||||
|
value: showRes.data.id,
|
||||||
|
},
|
||||||
|
...list,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
/* ignore */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
key: 'car_number',
|
||||||
|
title: '车牌号',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
|
|||||||
@ -13,6 +13,7 @@ export default function BillInfo(props: MyBetaModalFormProps) {
|
|||||||
return (
|
return (
|
||||||
<MyModal
|
<MyModal
|
||||||
title={props.title || '查看账单'}
|
title={props.title || '查看账单'}
|
||||||
|
modal={{ title: props.title || '查看账单' }}
|
||||||
type={props.item?.type || 'primary'}
|
type={props.item?.type || 'primary'}
|
||||||
width="600px"
|
width="600px"
|
||||||
onOpen={() => {
|
onOpen={() => {
|
||||||
@ -33,8 +34,15 @@ export default function BillInfo(props: MyBetaModalFormProps) {
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
<ProDescriptions column={2}>
|
<ProDescriptions column={2}>
|
||||||
{/* 项目相关信息 */}
|
{/* 项目相关信息 */}
|
||||||
<ProDescriptions.Item label="房屋名称" span={2}>
|
<ProDescriptions.Item label="账单ID" span={2}>
|
||||||
{data?.asset_house?.full_name || ''}
|
{data?.id || ''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="账单关联" span={2}>
|
||||||
|
{data?.asset_houses_id
|
||||||
|
? data?.asset_house?.full_name
|
||||||
|
: data?.asset_car_ports_id
|
||||||
|
? `车位|${data?.asset_car_port?.full_name || '-'}`
|
||||||
|
: '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
{/* 账单基本信息 */}
|
{/* 账单基本信息 */}
|
||||||
@ -75,6 +83,12 @@ export default function BillInfo(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="备注" span={3}>
|
<ProDescriptions.Item label="备注" span={3}>
|
||||||
{data?.remark || ''}
|
{data?.remark || ''}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="创建时间" span={3}>
|
||||||
|
{data?.created_at || ''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="最近修改" span={3}>
|
||||||
|
{data?.updated_at || ''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</Spin>
|
</Spin>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
|
|||||||
@ -81,10 +81,8 @@ export default function ShowQrCode(props: MyBetaModalFormProps) {
|
|||||||
>
|
>
|
||||||
<ProDescriptions.Item label="关联房屋/车位" span={2}>
|
<ProDescriptions.Item label="关联房屋/车位" span={2}>
|
||||||
{props?.item?.asset_houses_id
|
{props?.item?.asset_houses_id
|
||||||
? ` ${props?.item?.asset_house?.full_name || ''}`
|
? props?.item?.asset_house?.full_name || ''
|
||||||
: props?.item?.asset_car_port?.full_name
|
: props?.item?.asset_car_port?.full_name || ''}
|
||||||
? ` ${props?.item?.asset_car_port?.full_name}`
|
|
||||||
: ''}
|
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="费用类型">
|
<ProDescriptions.Item label="费用类型">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
@ -96,6 +94,13 @@ export default function ShowQrCode(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="应收金额">
|
<ProDescriptions.Item label="应收金额">
|
||||||
¥{props?.item?.total_payable_amount || 0}
|
¥{props?.item?.total_payable_amount || 0}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款户名" span={2}>
|
||||||
|
{props?.item?.receipt_account?.company_name || ''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款账号">
|
||||||
|
{props?.item?.receipt_account?.company_bank || ''}{' '}
|
||||||
|
{props?.item?.receipt_account?.company_account || ''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import {
|
|||||||
HouseOrdersAuditStatusEnum,
|
HouseOrdersAuditStatusEnum,
|
||||||
HouseOrdersPaymentMethodEnum,
|
HouseOrdersPaymentMethodEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
|
import { useNavigate } from '@@/exports';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import Audit from './modals/Audit';
|
import Audit from './modals/Audit';
|
||||||
@ -23,6 +24,7 @@ import Show from './modals/Show';
|
|||||||
|
|
||||||
export default function Index({ title = '线下收款单' }) {
|
export default function Index({ title = '线下收款单' }) {
|
||||||
const [getParams, setParams] = useState({});
|
const [getParams, setParams] = useState({});
|
||||||
|
const navigate = useNavigate();
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
title={title}
|
title={title}
|
||||||
@ -184,6 +186,22 @@ export default function Index({ title = '线下收款单' }) {
|
|||||||
title="关联流水"
|
title="关联流水"
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
transferBills: (
|
||||||
|
<MyButtons.Default
|
||||||
|
title="调账"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
disabled={
|
||||||
|
item.order_status !==
|
||||||
|
HouseBillsBillStatusEnum.Paid.value
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
navigate(
|
||||||
|
`/bills/order_online/pages/transfer_bills?id=${item.id}`,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
audit: (
|
audit: (
|
||||||
<>
|
<>
|
||||||
{item.audit_status ===
|
{item.audit_status ===
|
||||||
|
|||||||
114
src/pages/bills/order_online/components/BillSelectModal.tsx
Normal file
114
src/pages/bills/order_online/components/BillSelectModal.tsx
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
import { MyColumns, MyProTableProps } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseBillsBillStatusEnum, HouseBillsTypeEnum } from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Modal } from 'antd';
|
||||||
|
import { Key, useState } from 'react';
|
||||||
|
|
||||||
|
interface BillSelectModalProps {
|
||||||
|
open: boolean;
|
||||||
|
asset_projects_id?: number;
|
||||||
|
onCancel: () => void;
|
||||||
|
onOk: (rows: any[]) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function BillSelectModal(props: BillSelectModalProps) {
|
||||||
|
const { open, asset_projects_id, onCancel, onOk } = props;
|
||||||
|
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState<Key[]>([]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
title="选择账单"
|
||||||
|
open={open}
|
||||||
|
width={1000}
|
||||||
|
onCancel={() => {
|
||||||
|
setSelectedRows([]);
|
||||||
|
setSelectedRowKeys([]);
|
||||||
|
onCancel();
|
||||||
|
}}
|
||||||
|
onOk={() => {
|
||||||
|
onOk(selectedRows);
|
||||||
|
setSelectedRows([]);
|
||||||
|
setSelectedRowKeys([]);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
search={{
|
||||||
|
labelWidth: 'auto',
|
||||||
|
}}
|
||||||
|
rowSelection={{
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: (keys, rows) => {
|
||||||
|
setSelectedRowKeys(keys);
|
||||||
|
setSelectedRows(rows);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
asset_projects_id,
|
||||||
|
bill_status: [
|
||||||
|
HouseBillsBillStatusEnum.PendingPayment.value,
|
||||||
|
HouseBillsBillStatusEnum.PartiallyPaid.value,
|
||||||
|
HouseBillsBillStatusEnum.Overdue.value,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.Bill.HouseBills.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: '关联房屋',
|
||||||
|
dataIndex: ['asset_house', 'full_name'],
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return { full_name: value };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关联车位',
|
||||||
|
dataIndex: ['asset_car_port', 'full_name'],
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return { car_port_name: value };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '账单月份',
|
||||||
|
render: (_, record) => {
|
||||||
|
return `${record.year}-${String(record.month).padStart(2, '0')}`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
valueEnum: HouseBillsTypeEnum,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'bill_status',
|
||||||
|
valueEnum: HouseBillsBillStatusEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '应收金额',
|
||||||
|
dataIndex: 'total_payable_amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '已收金额',
|
||||||
|
dataIndex: 'total_paid_amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
MyButtons,
|
||||||
MyColumns,
|
MyColumns,
|
||||||
MyImportModal,
|
MyImportModal,
|
||||||
MyPageContainer,
|
MyPageContainer,
|
||||||
@ -13,14 +14,18 @@ import {
|
|||||||
HouseBillsBillStatusEnum,
|
HouseBillsBillStatusEnum,
|
||||||
HouseOrdersPaymentMethodEnum,
|
HouseOrdersPaymentMethodEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
|
import { CopyOutlined } from '@ant-design/icons';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Space, message } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import OrderShow from './modals/OrderShow';
|
||||||
import SerialNumber from './modals/SerialNumber';
|
import SerialNumber from './modals/SerialNumber';
|
||||||
import SerialNumbers from './modals/SerialNumbers';
|
import SerialNumbers from './modals/SerialNumbers';
|
||||||
import Show from './modals/Show';
|
|
||||||
|
|
||||||
export default function Index({ title = '线上收款单' }) {
|
export default function Index({ title = '线上收款单' }) {
|
||||||
const [getParams, setParams] = useState({});
|
const [getParams, setParams] = useState({});
|
||||||
|
const navigate = useNavigate();
|
||||||
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
@ -112,15 +117,68 @@ export default function Index({ title = '线上收款单' }) {
|
|||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '房屋',
|
title: '关联房屋',
|
||||||
dataIndex: ['asset_house', 'full_name'],
|
dataIndex: ['asset_house', 'full_name'],
|
||||||
render: (_, record) =>
|
|
||||||
record.house_order_items?.[0]?.asset_house?.full_name || '-',
|
|
||||||
search: {
|
search: {
|
||||||
transform: (value) => {
|
transform: (value) => {
|
||||||
return { full_name: value };
|
return { full_name: value };
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
render: (_, record) => {
|
||||||
|
const name =
|
||||||
|
record.house_order_items?.[0]?.asset_house?.full_name;
|
||||||
|
return record.house_order_items?.[0]?.asset_houses_id ? (
|
||||||
|
<Space size={4}>
|
||||||
|
<MyButtons.View
|
||||||
|
title={name || '-'}
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(
|
||||||
|
`/bills/summary/show/${record.house_order_items?.[0]?.asset_houses_id}`,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{name && (
|
||||||
|
<CopyOutlined
|
||||||
|
style={{ color: '#999' }}
|
||||||
|
onClick={() => {
|
||||||
|
navigator.clipboard.writeText(name);
|
||||||
|
message.success('已复制');
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关联车位',
|
||||||
|
dataIndex: ['asset_car_port', 'full_name'],
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return { car_port_name: value };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
render: (_, record) => {
|
||||||
|
const name =
|
||||||
|
record.house_order_items?.[0]?.asset_car_port?.full_name;
|
||||||
|
return name ? (
|
||||||
|
<Space size={4}>
|
||||||
|
<span>{name}</span>
|
||||||
|
<CopyOutlined
|
||||||
|
style={{ color: '#999' }}
|
||||||
|
onClick={() => {
|
||||||
|
navigator.clipboard.writeText(name);
|
||||||
|
message.success('已复制');
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '收款方式',
|
title: '收款方式',
|
||||||
@ -131,7 +189,7 @@ export default function Index({ title = '线上收款单' }) {
|
|||||||
title: '支付状态',
|
title: '支付状态',
|
||||||
dataIndex: 'order_status',
|
dataIndex: 'order_status',
|
||||||
valueEnum: HouseBillsBillStatusEnum,
|
valueEnum: HouseBillsBillStatusEnum,
|
||||||
search: false,
|
// search: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -162,17 +220,17 @@ export default function Index({ title = '线上收款单' }) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收款账户',
|
title: '收款账户',
|
||||||
dataIndex: 'accept_name',
|
dataIndex: ['receipt_account', 'company_name'],
|
||||||
// search: false,
|
// search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收款银行',
|
title: '收款银行',
|
||||||
dataIndex: 'accept_bank',
|
dataIndex: ['receipt_account', 'company_bank'],
|
||||||
// search: false,
|
// search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收款账号',
|
title: '收款账号',
|
||||||
dataIndex: 'accept_account',
|
dataIndex: ['receipt_account', 'company_account'],
|
||||||
// search: false,
|
// search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -197,7 +255,7 @@ export default function Index({ title = '线上收款单' }) {
|
|||||||
key={index}
|
key={index}
|
||||||
actions={{
|
actions={{
|
||||||
show: (
|
show: (
|
||||||
<Show item={item} reload={action?.reload} title="查看" />
|
<OrderShow item={item} reload={action?.reload} title="查看" />
|
||||||
),
|
),
|
||||||
serialNumber: (
|
serialNumber: (
|
||||||
<SerialNumber
|
<SerialNumber
|
||||||
@ -206,6 +264,16 @@ export default function Index({ title = '线上收款单' }) {
|
|||||||
title="关联流水"
|
title="关联流水"
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
transferBills: (
|
||||||
|
<MyButtons.Default
|
||||||
|
title="调账"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/bills/order_online/pages/transfer_bills?id=${item.id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
|||||||
142
src/pages/bills/order_online/modals/OrderShow.tsx
Normal file
142
src/pages/bills/order_online/modals/OrderShow.tsx
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyColumns,
|
||||||
|
MyProTableProps,
|
||||||
|
renderTextHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { MyModal } from '@/components/MyModal';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseBillsTypeEnum,
|
||||||
|
HouseOrdersAuditStatusEnum,
|
||||||
|
HouseOrdersPaymentMethodEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProCard, ProDescriptions, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space, Spin } from 'antd';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
export default function OrderShow(props: MyBetaModalFormProps) {
|
||||||
|
const [orderData, setOrderData] = useState<any>({});
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
|
const getOrderId = () => {
|
||||||
|
if (!props.item) return undefined;
|
||||||
|
if (typeof props.item === 'number' || typeof props.item === 'string') {
|
||||||
|
return Number(props.item);
|
||||||
|
}
|
||||||
|
return Number(props.item.id || props.item.order_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const fetchOrderData = () => {
|
||||||
|
const id = getOrderId();
|
||||||
|
if (!id) return;
|
||||||
|
setLoading(true);
|
||||||
|
Apis.HouseOrder.HouseOrders.Show({ id })
|
||||||
|
.then((res) => {
|
||||||
|
setOrderData(res?.data || {});
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyModal
|
||||||
|
title={props.title || '查看'}
|
||||||
|
modal={{ title: props.title || '查看' }}
|
||||||
|
width={800}
|
||||||
|
onOpen={() => fetchOrderData()}
|
||||||
|
node={
|
||||||
|
<Spin spinning={loading}>
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<ProCard size="small">
|
||||||
|
<ProDescriptions bordered size="small" column={2}>
|
||||||
|
<ProDescriptions.Item label="房屋名称" span={2}>
|
||||||
|
<Space>
|
||||||
|
{orderData?.house_order_items?.[0]?.asset_house
|
||||||
|
?.full_name || '-'}
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={HouseOrdersAuditStatusEnum}
|
||||||
|
value={orderData?.audit_status}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款账号" span={2}>
|
||||||
|
{orderData?.receipt_account?.company_name || '-'} ;
|
||||||
|
{orderData?.receipt_account?.company_bank || '-'} ;
|
||||||
|
{orderData?.receipt_account?.company_account || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="关联流水" span={2}>
|
||||||
|
{orderData?.accept_serial_number || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款方式">
|
||||||
|
{Object.values(HouseOrdersPaymentMethodEnum).find(
|
||||||
|
(item) => item.value === orderData?.payment_method,
|
||||||
|
)?.text || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款日期">
|
||||||
|
{orderData?.paid_time || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
|
<ProDescriptions.Item label="收款金额">
|
||||||
|
{orderData?.actual_paid_amount || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="录入人">
|
||||||
|
{orderData?.creator || '-'}-{orderData?.creator_phone || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="录入时间">
|
||||||
|
{orderData?.created_at || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="审核状态" span={2}>
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={HouseOrdersAuditStatusEnum}
|
||||||
|
value={orderData?.audit_status}
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="驳回原因" span={2}>
|
||||||
|
{orderData?.reason || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
<ProCard size="small">
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
search={false}
|
||||||
|
toolBarRender={false}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={orderData?.house_order_items}
|
||||||
|
rowKey={(record, index) => record?.id || index}
|
||||||
|
size="small"
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: '关联账单',
|
||||||
|
render: (_, record) => {
|
||||||
|
return `${record.house_bill.year}-${String(
|
||||||
|
record.house_bill.month,
|
||||||
|
).padStart(2, '0')}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '类型',
|
||||||
|
dataIndex: ['house_bill', 'type'],
|
||||||
|
valueEnum: HouseBillsTypeEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '未收金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '本次收取金额',
|
||||||
|
dataIndex: 'paid_amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</ProCard>
|
||||||
|
</Space>
|
||||||
|
</Spin>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,115 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyColumns,
|
|
||||||
MyProTableProps,
|
|
||||||
renderTextHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { MyModal } from '@/components/MyModal';
|
|
||||||
|
|
||||||
import {
|
|
||||||
HouseBillsTypeEnum,
|
|
||||||
HouseOrdersAuditStatusEnum,
|
|
||||||
HouseOrdersPaymentMethodEnum,
|
|
||||||
} from '@/gen/Enums';
|
|
||||||
import { ProCard, ProDescriptions, ProTable } from '@ant-design/pro-components';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
|
|
||||||
export default function Show(props: MyBetaModalFormProps) {
|
|
||||||
return (
|
|
||||||
<MyModal
|
|
||||||
title={props.title || '查看'}
|
|
||||||
width={800}
|
|
||||||
// onOpen={() => getShow()}
|
|
||||||
node={
|
|
||||||
<Space direction="vertical" style={{ width: '100%' }}>
|
|
||||||
<ProCard size="small">
|
|
||||||
<ProDescriptions bordered size="small" column={2}>
|
|
||||||
<ProDescriptions.Item label="房屋名称" span={2}>
|
|
||||||
<Space>
|
|
||||||
{props?.item?.house_order_items?.[0].asset_house?.full_name ||
|
|
||||||
'-'}
|
|
||||||
<renderTextHelper.Tag
|
|
||||||
Enums={HouseOrdersAuditStatusEnum}
|
|
||||||
value={props?.item?.audit_status}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="收款账号" span={2}>
|
|
||||||
{props?.item?.receipt_account?.company_name} ;
|
|
||||||
{props?.item?.receipt_account?.company_bank} ;
|
|
||||||
{props?.item?.receipt_account?.company_account}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="关联流水" span={2}>
|
|
||||||
{props?.item?.accept_serial_number || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="收款方式">
|
|
||||||
{Object.values(HouseOrdersPaymentMethodEnum).find(
|
|
||||||
(item) => item.value === props?.item?.payment_method,
|
|
||||||
)?.text || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="收款日期">
|
|
||||||
{props?.item?.paid_time || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
|
|
||||||
<ProDescriptions.Item label="收款金额">
|
|
||||||
{props?.item?.actual_paid_amount || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="录入人">
|
|
||||||
{props?.item?.creator || '-'}-
|
|
||||||
{props?.item?.creator_phone || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="录入时间">
|
|
||||||
{props?.item?.created_at || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="审核状态" span={2}>
|
|
||||||
<renderTextHelper.Tag
|
|
||||||
Enums={HouseOrdersAuditStatusEnum}
|
|
||||||
value={props?.item?.audit_status}
|
|
||||||
/>
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="驳回原因" span={2}>
|
|
||||||
{props?.item?.reason || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
</ProDescriptions>
|
|
||||||
</ProCard>
|
|
||||||
<ProCard size="small">
|
|
||||||
<ProTable
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
search={false}
|
|
||||||
toolBarRender={false}
|
|
||||||
pagination={false}
|
|
||||||
dataSource={props?.item?.house_order_items}
|
|
||||||
rowKey={(record, index) => record?.id || index}
|
|
||||||
size="small"
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: '关联账单',
|
|
||||||
render: (_, record) => {
|
|
||||||
return `${record.house_bill.year}-${String(
|
|
||||||
record.house_bill.month,
|
|
||||||
).padStart(2, '0')}`;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '类型',
|
|
||||||
dataIndex: ['house_bill', 'type'],
|
|
||||||
valueEnum: HouseBillsTypeEnum,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '未收金额',
|
|
||||||
dataIndex: 'amount',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '本次收取金额',
|
|
||||||
dataIndex: 'paid_amount',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</ProCard>
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
655
src/pages/bills/order_online/pages/transfer_bills.tsx
Normal file
655
src/pages/bills/order_online/pages/transfer_bills.tsx
Normal file
@ -0,0 +1,655 @@
|
|||||||
|
import {
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
MyPageContainer,
|
||||||
|
renderTextHelper,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
ApprovalTemplateNodesNodeTypeEnum,
|
||||||
|
ApprovalTemplatesTypeEnum,
|
||||||
|
HouseBillsTypeEnum,
|
||||||
|
HouseOrdersAuditStatusEnum,
|
||||||
|
HouseOrdersPaymentMethodEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import {
|
||||||
|
BetaSchemaForm,
|
||||||
|
ProCard,
|
||||||
|
ProDescriptions,
|
||||||
|
} from '@ant-design/pro-components';
|
||||||
|
import { useNavigate, useSearchParams } from '@umijs/max';
|
||||||
|
import { Button, Form, message, Space } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import BillSelectModal from '../components/BillSelectModal';
|
||||||
|
|
||||||
|
interface NewBillItem {
|
||||||
|
id?: number | string;
|
||||||
|
bill_info?: string;
|
||||||
|
total_payable_amount?: number;
|
||||||
|
amount?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormValues {
|
||||||
|
new_bills?: NewBillItem[];
|
||||||
|
approval_templates_id?: number;
|
||||||
|
approval_remark?: string;
|
||||||
|
node_approvers?: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function TransferBills({ title = '调账' }) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const [searchParams] = useSearchParams();
|
||||||
|
const orderId = Number(searchParams.get('id'));
|
||||||
|
|
||||||
|
const [orderData, setOrderData] = useState<any>({});
|
||||||
|
const [billSelectOpen, setBillSelectOpen] = useState(false);
|
||||||
|
const [approvalTemplates, setApprovalTemplates] = useState<any[]>([]);
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
|
const originalAmount = Number(orderData?.actual_paid_amount || 0);
|
||||||
|
const assetProjectsId =
|
||||||
|
orderData?.asset_projects_id || orderData?.asset_project?.id;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!orderId) {
|
||||||
|
message.error('缺少收款单ID');
|
||||||
|
navigate('/bills/order_online');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Apis.HouseOrder.HouseOrders.Show({ id: orderId }).then((res) => {
|
||||||
|
setOrderData(res?.data || {});
|
||||||
|
});
|
||||||
|
}, [orderId, navigate]);
|
||||||
|
|
||||||
|
const handleAddBills = (rows: any[]) => {
|
||||||
|
if (rows.length === 0) {
|
||||||
|
message.warning('请选择要添加的账单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentBills: NewBillItem[] = form.getFieldValue('new_bills') || [];
|
||||||
|
const existingIds = new Set(currentBills.map((item) => String(item.id)));
|
||||||
|
const newItems: NewBillItem[] = [];
|
||||||
|
let duplicateCount = 0;
|
||||||
|
|
||||||
|
rows.forEach((row) => {
|
||||||
|
const id = String(row.id);
|
||||||
|
if (existingIds.has(id)) {
|
||||||
|
duplicateCount++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const unpaidAmount =
|
||||||
|
Math.round((Number(row.total_payable_amount) || 0) * 100) / 100;
|
||||||
|
const typeText =
|
||||||
|
HouseBillsTypeEnum[row.type as keyof typeof HouseBillsTypeEnum]?.text ||
|
||||||
|
row.type;
|
||||||
|
const assetName =
|
||||||
|
row.asset_house?.full_name || row.asset_car_port?.full_name || '';
|
||||||
|
newItems.push({
|
||||||
|
id: row.id,
|
||||||
|
bill_info: `${row.year}-${String(row.month).padStart(
|
||||||
|
2,
|
||||||
|
'0',
|
||||||
|
)} [${typeText}] ${assetName}`,
|
||||||
|
total_payable_amount: unpaidAmount,
|
||||||
|
amount: unpaidAmount,
|
||||||
|
});
|
||||||
|
existingIds.add(id);
|
||||||
|
});
|
||||||
|
|
||||||
|
form.setFieldValue('new_bills', [...currentBills, ...newItems]);
|
||||||
|
|
||||||
|
if (newItems.length > 0) {
|
||||||
|
message.success(`已添加 ${newItems.length} 条账单`);
|
||||||
|
}
|
||||||
|
if (duplicateCount > 0) {
|
||||||
|
message.warning(`${duplicateCount} 条账单已存在,已跳过`);
|
||||||
|
}
|
||||||
|
setBillSelectOpen(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = async (values: any) => {
|
||||||
|
const newBills = values.new_bills || [];
|
||||||
|
if (newBills.length === 0) {
|
||||||
|
message.error('请至少选择一条新账单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const billIds = newBills.map((item: NewBillItem) => String(item.id));
|
||||||
|
const uniqueBillIds = new Set(billIds);
|
||||||
|
if (uniqueBillIds.size !== billIds.length) {
|
||||||
|
message.error('新账单中存在重复选择');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const totalTransfer =
|
||||||
|
Math.round(
|
||||||
|
newBills.reduce(
|
||||||
|
(acc: number, item: NewBillItem) => acc + (Number(item.amount) || 0),
|
||||||
|
0,
|
||||||
|
) * 100,
|
||||||
|
) / 100;
|
||||||
|
|
||||||
|
if (Math.abs(totalTransfer - originalAmount) > 0.01) {
|
||||||
|
message.error(
|
||||||
|
`转入金额汇总(${totalTransfer})必须等于原收款单金额(${originalAmount})`,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const bill of newBills) {
|
||||||
|
const amount = Number(bill.amount) || 0;
|
||||||
|
const payable = Number(bill.total_payable_amount) || 0;
|
||||||
|
if (amount > payable) {
|
||||||
|
message.error(
|
||||||
|
`账单"${bill.bill_info}"的转入金额不能大于应收金额(${payable})`,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (amount > originalAmount) {
|
||||||
|
message.error(
|
||||||
|
`账单"${bill.bill_info}"的转入金额不能大于原收款单金额(${originalAmount})`,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const { node_approvers } = values;
|
||||||
|
if (approvalTemplates?.length > 0 && node_approvers?.length > 0) {
|
||||||
|
for (const templateNode of approvalTemplates) {
|
||||||
|
const submittedNode = node_approvers.find(
|
||||||
|
(node: any) => node?.name === templateNode?.name,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!submittedNode) {
|
||||||
|
message.error(`节点"${templateNode?.name}"不能删除`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
templateNode?.node_type ===
|
||||||
|
ApprovalTemplateNodesNodeTypeEnum.Approver.value
|
||||||
|
) {
|
||||||
|
const originalMembers =
|
||||||
|
templateNode?.approval_template_node_members?.map(
|
||||||
|
(member: any) => member?.company_employees_id,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (originalMembers?.length > 0) {
|
||||||
|
const submittedMembers = submittedNode?.members || [];
|
||||||
|
const isMatch =
|
||||||
|
originalMembers.length === submittedMembers.length &&
|
||||||
|
originalMembers.every((memberId: number) =>
|
||||||
|
submittedMembers.includes(memberId),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!isMatch) {
|
||||||
|
message.error(
|
||||||
|
`节点"${templateNode?.name}"的审批人必须与审批模板设置保持一致`,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
await Apis.HouseOrder.HouseOrders.TransferBills({
|
||||||
|
id: orderId,
|
||||||
|
new_bills: newBills.map((item: NewBillItem) => ({
|
||||||
|
id: item.id,
|
||||||
|
amount: item.amount,
|
||||||
|
})) as any,
|
||||||
|
approval_templates_id: values.approval_templates_id,
|
||||||
|
approval_remark: values.approval_remark,
|
||||||
|
node_approvers: values.node_approvers,
|
||||||
|
} as ApiTypes.HouseOrder.HouseOrders.TransferBills);
|
||||||
|
message.success('调账提交成功');
|
||||||
|
navigate('/bills/order_online');
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyPageContainer
|
||||||
|
title={
|
||||||
|
<Space
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={() => {
|
||||||
|
navigate(-1);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
enableTabs={false}
|
||||||
|
tabKey="order-online-transfer-bills"
|
||||||
|
tabLabel={title}
|
||||||
|
>
|
||||||
|
<ProCard>
|
||||||
|
<div style={{ width: 900, minHeight: '80vh', margin: '0 auto' }}>
|
||||||
|
<BetaSchemaForm<FormValues>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
layoutType="form"
|
||||||
|
// width="900px"
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
form={form}
|
||||||
|
submitter={{
|
||||||
|
submitButtonProps: false,
|
||||||
|
resetButtonProps: false,
|
||||||
|
render: () => [
|
||||||
|
<MyButtons.Default
|
||||||
|
key="back"
|
||||||
|
size="middle"
|
||||||
|
type="default"
|
||||||
|
onClick={() => navigate(-1)}
|
||||||
|
title="返回"
|
||||||
|
/>,
|
||||||
|
<MyButtons.Default
|
||||||
|
key="submit"
|
||||||
|
size="middle"
|
||||||
|
type="primary"
|
||||||
|
loading={loading}
|
||||||
|
onClick={() => {
|
||||||
|
form.validateFields().then(handleSubmit);
|
||||||
|
}}
|
||||||
|
title="提交申请"
|
||||||
|
/>,
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
dataIndex: 'original_info',
|
||||||
|
valueType: 'text',
|
||||||
|
renderFormItem: () => (
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<ProCard size="small">
|
||||||
|
<ProDescriptions bordered size="small" column={2}>
|
||||||
|
<ProDescriptions.Item label="关联" span={2}>
|
||||||
|
<Space>
|
||||||
|
{orderData?.house_order_items?.[0]?.asset_car_port
|
||||||
|
?.full_name
|
||||||
|
? `车位:${orderData?.house_order_items?.[0]?.asset_car_port?.full_name}`
|
||||||
|
: orderData?.house_order_items?.[0]?.asset_house
|
||||||
|
?.full_name
|
||||||
|
? `房屋:${orderData?.house_order_items?.[0]?.asset_house?.full_name}`
|
||||||
|
: '-'}
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={HouseOrdersAuditStatusEnum}
|
||||||
|
value={orderData?.audit_status}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款账号" span={2}>
|
||||||
|
<span>
|
||||||
|
{orderData?.receipt_account?.company_name || '-'} |
|
||||||
|
{orderData?.receipt_account?.company_bank || '-'} |
|
||||||
|
{orderData?.receipt_account?.company_account || '-'}
|
||||||
|
</span>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款单ID">
|
||||||
|
{orderData?.id || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款方式">
|
||||||
|
{Object.values(HouseOrdersPaymentMethodEnum).find(
|
||||||
|
(item) => item.value === orderData?.payment_method,
|
||||||
|
)?.text || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="原收款单金额">
|
||||||
|
{orderData?.actual_paid_amount || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款日期">
|
||||||
|
{orderData?.paid_time || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
colProps: { span: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
valueType: 'divider',
|
||||||
|
fieldProps: {
|
||||||
|
orientation: 'left',
|
||||||
|
children: '选择新账单及转入金额',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'new_bills',
|
||||||
|
formItemProps: { ...rulesHelper.array },
|
||||||
|
fieldProps: {
|
||||||
|
copyIconProps: false,
|
||||||
|
creatorButtonProps: false,
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '账单信息',
|
||||||
|
dataIndex: 'bill_info',
|
||||||
|
valueType: 'text',
|
||||||
|
colProps: { span: 10 },
|
||||||
|
fieldProps: {
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '应收金额',
|
||||||
|
valueType: 'number',
|
||||||
|
dataIndex: 'total_payable_amount',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
addonAfter: '元',
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '转入金额',
|
||||||
|
valueType: 'digit',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
formItemProps: {
|
||||||
|
...rulesHelper.number,
|
||||||
|
validateFirst: true,
|
||||||
|
},
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
addonAfter: '元',
|
||||||
|
min: 0,
|
||||||
|
max: originalAmount,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
valueType: 'dependency',
|
||||||
|
name: ['new_bills'],
|
||||||
|
columns: ({ new_bills }) => {
|
||||||
|
const bills = new_bills || [];
|
||||||
|
const total =
|
||||||
|
Math.round(
|
||||||
|
bills.reduce(
|
||||||
|
(acc: number, item: NewBillItem) =>
|
||||||
|
acc + (Number(item?.amount) || 0),
|
||||||
|
0,
|
||||||
|
) * 100,
|
||||||
|
) / 100;
|
||||||
|
const remaining =
|
||||||
|
Math.round((originalAmount - total) * 100) / 100;
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
valueType: 'text',
|
||||||
|
renderFormItem: () => (
|
||||||
|
<Space
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
padding: '8px 0',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Space>
|
||||||
|
<span>
|
||||||
|
转入金额汇总:
|
||||||
|
<strong>{total.toFixed(2)}</strong> 元
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color:
|
||||||
|
remaining < 0
|
||||||
|
? '#ff4d4f'
|
||||||
|
: remaining === 0
|
||||||
|
? '#52c41a'
|
||||||
|
: '#666',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
剩余可转入金额:
|
||||||
|
<strong>{remaining.toFixed(2)}</strong> 元
|
||||||
|
</span>
|
||||||
|
</Space>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => setBillSelectOpen(true)}
|
||||||
|
>
|
||||||
|
+账单
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
colProps: { span: 24 },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
valueType: 'divider',
|
||||||
|
fieldProps: {
|
||||||
|
orientation: 'left',
|
||||||
|
children: '审批信息',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Selects?.ApprovalTemplates({
|
||||||
|
key: 'approval_templates_id',
|
||||||
|
title: '审批模板',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
params: {
|
||||||
|
type: ApprovalTemplatesTypeEnum.HouseBillTransfer.value,
|
||||||
|
is_enabled: '1',
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: '请选择审批模板',
|
||||||
|
onChange: (e: any) => {
|
||||||
|
if (e) {
|
||||||
|
const templateId = typeof e === 'object' ? e.value : e;
|
||||||
|
Apis.Approval.ApprovalTemplates.Show({
|
||||||
|
id: templateId,
|
||||||
|
}).then((res) => {
|
||||||
|
setApprovalTemplates(
|
||||||
|
res?.data?.approval_template_nodes,
|
||||||
|
);
|
||||||
|
form.setFieldsValue({
|
||||||
|
approval_templates_id: templateId,
|
||||||
|
node_approvers:
|
||||||
|
res?.data?.approval_template_nodes?.map(
|
||||||
|
(item: any) => ({
|
||||||
|
...item,
|
||||||
|
members:
|
||||||
|
item?.approval_template_node_members?.map(
|
||||||
|
(member: any) =>
|
||||||
|
member?.company_employees_id,
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
valueType: 'dependency',
|
||||||
|
name: ['approval_templates_id'],
|
||||||
|
colProps: { span: 24 },
|
||||||
|
columns: ({ approval_templates_id }) => {
|
||||||
|
return approval_templates_id
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'node_approvers',
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
itemContainerStyle: {
|
||||||
|
width: '100%',
|
||||||
|
overflowX: 'hidden',
|
||||||
|
},
|
||||||
|
creatorButtonProps: false,
|
||||||
|
actionRender: (field: any, action: any) => [
|
||||||
|
<Button
|
||||||
|
key="add"
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
const currentNodeType = form.getFieldValue([
|
||||||
|
'node_approvers',
|
||||||
|
field.name,
|
||||||
|
'node_type',
|
||||||
|
]);
|
||||||
|
if (
|
||||||
|
currentNodeType ===
|
||||||
|
ApprovalTemplateNodesNodeTypeEnum.CC.value
|
||||||
|
) {
|
||||||
|
message.warning('抄送节点不允许添加');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
action.add(
|
||||||
|
{
|
||||||
|
node_type:
|
||||||
|
ApprovalTemplateNodesNodeTypeEnum
|
||||||
|
.Approver.value,
|
||||||
|
},
|
||||||
|
field.name + 1,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
添加
|
||||||
|
</Button>,
|
||||||
|
<Button
|
||||||
|
key="delete"
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
danger
|
||||||
|
onClick={() => {
|
||||||
|
action.remove(field.name);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
formItemProps: {
|
||||||
|
...rulesHelper.array,
|
||||||
|
wrapperCol: { span: 24 },
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
columns: [
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'node_type',
|
||||||
|
valueEnum: ApprovalTemplateNodesNodeTypeEnum,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: {
|
||||||
|
...rulesHelper.text,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'name',
|
||||||
|
colProps: { span: 5 },
|
||||||
|
formItemProps: {
|
||||||
|
...rulesHelper.text,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
valueType: 'dependency',
|
||||||
|
name: ['node_type'],
|
||||||
|
columns: ({ node_type }) => {
|
||||||
|
return [
|
||||||
|
Selects.Employees({
|
||||||
|
key: 'members',
|
||||||
|
title: '',
|
||||||
|
colProps: { span: 11 },
|
||||||
|
formItemProps: {
|
||||||
|
...rulesHelper.array,
|
||||||
|
},
|
||||||
|
fieldProps: {
|
||||||
|
mode: 'multiple',
|
||||||
|
showSearch: true,
|
||||||
|
maxCount:
|
||||||
|
node_type ===
|
||||||
|
ApprovalTemplateNodesNodeTypeEnum
|
||||||
|
.Approver.value
|
||||||
|
? 1
|
||||||
|
: 9,
|
||||||
|
maxTagTextLength: 20,
|
||||||
|
labelRender: (res: any) => {
|
||||||
|
if (res?.label) {
|
||||||
|
return res?.label;
|
||||||
|
} else {
|
||||||
|
return approvalTemplates?.map(
|
||||||
|
(item: any) => {
|
||||||
|
if (
|
||||||
|
item?.node_type ===
|
||||||
|
node_type &&
|
||||||
|
item
|
||||||
|
?.approval_template_node_members
|
||||||
|
?.length
|
||||||
|
) {
|
||||||
|
return item?.approval_template_node_members?.map(
|
||||||
|
(i: any) => {
|
||||||
|
if (
|
||||||
|
i?.company_employees_id ===
|
||||||
|
res?.value
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
i?.company_employee
|
||||||
|
?.name || ''
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '申请说明',
|
||||||
|
valueType: 'textarea',
|
||||||
|
key: 'approval_remark',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: '请输入申请说明',
|
||||||
|
rows: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<BillSelectModal
|
||||||
|
open={billSelectOpen}
|
||||||
|
asset_projects_id={assetProjectsId}
|
||||||
|
onCancel={() => setBillSelectOpen(false)}
|
||||||
|
onOk={handleAddBills}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</ProCard>
|
||||||
|
</MyPageContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -13,7 +13,10 @@ export default function info(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions bordered>
|
<ProDescriptions bordered>
|
||||||
<ProDescriptions.Item label="房屋名称" span={2}>
|
<ProDescriptions.Item label="房屋名称" span={2}>
|
||||||
<Space>
|
<Space>
|
||||||
{item?.asset_house?.full_name || '-'}
|
<span>
|
||||||
|
【{item?.asset_houses_id || '-'}】
|
||||||
|
{item?.asset_house?.full_name || '-'}
|
||||||
|
</span>
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`/customer/archive/show/${item?.asset_houses_id}`);
|
navigate(`/customer/archive/show/${item?.asset_houses_id}`);
|
||||||
|
|||||||
@ -28,7 +28,9 @@ export default function Index({ ...rest }) {
|
|||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
{
|
{
|
||||||
...params,
|
...params,
|
||||||
asset_houses_id: rest.item?.asset_houses_id,
|
...(rest.item?.asset_car_ports_id
|
||||||
|
? { car_port_name: rest.item?.asset_car_port?.full_name || '' }
|
||||||
|
: { asset_houses_id: rest.item?.asset_houses_id }),
|
||||||
bill_status: [HouseBillsBillStatusEnum.Paid.value],
|
bill_status: [HouseBillsBillStatusEnum.Paid.value],
|
||||||
},
|
},
|
||||||
sort,
|
sort,
|
||||||
@ -88,7 +90,7 @@ export default function Index({ ...rest }) {
|
|||||||
item={{
|
item={{
|
||||||
...item,
|
...item,
|
||||||
// 跟据发起的页面传递的type来判断退款类型
|
// 跟据发起的页面传递的type来判断退款类型
|
||||||
type: RefundsTypeEnum.HouseBill.value,
|
type: RefundsTypeEnum.HouseOrder.value,
|
||||||
// 审批模板的类型
|
// 审批模板的类型
|
||||||
approval_type: ApprovalTemplatesTypeEnum.Refund.value,
|
approval_type: ApprovalTemplatesTypeEnum.Refund.value,
|
||||||
total_paid_amount: item.total_paid_amount,
|
total_paid_amount: item.total_paid_amount,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { MyColumns, MyProTableProps } from '@/common';
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { HouseBillsBillStatusEnum, HouseBillsTypeEnum } from '@/gen/Enums';
|
import { HouseBillsBillStatusEnum, HouseBillsTypeEnum } from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space, Tooltip } from 'antd';
|
||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import BillCopy from '../../house_bills/modals/BillCopy';
|
import BillCopy from '../../house_bills/modals/BillCopy';
|
||||||
import PayCreate from './modals/PayCreate';
|
import PayCreate from './modals/PayCreate';
|
||||||
@ -32,7 +32,9 @@ export default function Index({ ...rest }) {
|
|||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
{
|
{
|
||||||
...params,
|
...params,
|
||||||
asset_houses_id: rest.item?.asset_houses_id,
|
...(rest.item?.asset_car_ports_id
|
||||||
|
? { car_port_name: rest.item?.full_name || '' }
|
||||||
|
: { asset_houses_id: rest.item?.asset_houses_id }),
|
||||||
bill_status: [
|
bill_status: [
|
||||||
HouseBillsBillStatusEnum.PendingPayment.value,
|
HouseBillsBillStatusEnum.PendingPayment.value,
|
||||||
HouseBillsBillStatusEnum.PartiallyPaid.value,
|
HouseBillsBillStatusEnum.PartiallyPaid.value,
|
||||||
@ -95,6 +97,21 @@ export default function Index({ ...rest }) {
|
|||||||
valueEnum: HouseBillsTypeEnum,
|
valueEnum: HouseBillsTypeEnum,
|
||||||
search: false,
|
search: false,
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
title: '账单金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '优惠金额',
|
||||||
|
dataIndex: 'discount_amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '滞纳金',
|
||||||
|
dataIndex: 'late_fee',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '应收金额',
|
title: '应收金额',
|
||||||
dataIndex: 'total_payable_amount',
|
dataIndex: 'total_payable_amount',
|
||||||
@ -117,10 +134,14 @@ export default function Index({ ...rest }) {
|
|||||||
title: '收款账号',
|
title: '收款账号',
|
||||||
dataIndex: 'receipt_account',
|
dataIndex: 'receipt_account',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return `${record.receipt_account?.company_name}
|
const text = `${record.receipt_account.company_account}|${record.receipt_account?.company_name}|${record.receipt_account?.company_bank}`;
|
||||||
${record.receipt_account.company_account?.slice(0, 4)}
|
return (
|
||||||
****
|
<Tooltip title={text}>
|
||||||
${record.receipt_account.company_account?.slice(-4)}`;
|
<span>
|
||||||
|
{text.length > 16 ? `${text.slice(0, 16)}...` : text}
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -75,9 +75,9 @@ export default function ShowQrCode(props: MyBetaModalFormProps) {
|
|||||||
<ProDescriptions.Item label="关联房屋/车位" span={2}>
|
<ProDescriptions.Item label="关联房屋/车位" span={2}>
|
||||||
{props?.item?.asset_houses_id
|
{props?.item?.asset_houses_id
|
||||||
? props?.item?.asset_house?.full_name || ''
|
? props?.item?.asset_house?.full_name || ''
|
||||||
: props?.item?.asset_car_port?.full_name || ''}
|
: props?.item?.full_name || ''}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="应收金额">
|
<ProDescriptions.Item label="应收金额" span={2}>
|
||||||
¥
|
¥
|
||||||
{props?.item?.list
|
{props?.item?.list
|
||||||
?.reduce(
|
?.reduce(
|
||||||
@ -87,6 +87,16 @@ export default function ShowQrCode(props: MyBetaModalFormProps) {
|
|||||||
)
|
)
|
||||||
.toFixed(2) || 0}
|
.toFixed(2) || 0}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款户名" span={2}>
|
||||||
|
{props?.item?.list?.[0]?.receipt_account?.company_name ||
|
||||||
|
''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="收款账号">
|
||||||
|
{props?.item?.list?.[0]?.receipt_account?.company_bank ||
|
||||||
|
''}{' '}
|
||||||
|
{props?.item?.list?.[0]?.receipt_account?.company_account ||
|
||||||
|
''}
|
||||||
|
</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
const [data, setShow] = useState<any>({});
|
const [data, setShow] = useState<any>({});
|
||||||
const [pendingCount, setPendingCount] = useState<number>(0);
|
const [pendingCount, setPendingCount] = useState<number>(0);
|
||||||
|
const [totalPayableSum, setTotalPayableSum] = useState<number>(0);
|
||||||
|
|
||||||
const loadShow = () => {
|
const loadShow = () => {
|
||||||
let paramsId: any = { id: id ?? 0 };
|
let paramsId: any = { id: id ?? 0 };
|
||||||
@ -22,6 +23,16 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const loadTotalPayableSum = () => {
|
||||||
|
Apis.Bill.HouseBills.SummaryShow({
|
||||||
|
asset_houses_id: Number(id),
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
setTotalPayableSum(res?.data?.total_payable_sum || 0);
|
||||||
|
})
|
||||||
|
.catch(() => setTotalPayableSum(0));
|
||||||
|
};
|
||||||
|
|
||||||
const loadPendingCount = () => {
|
const loadPendingCount = () => {
|
||||||
Apis.Archive.HouseRegisters.List({
|
Apis.Archive.HouseRegisters.List({
|
||||||
asset_houses_id: Number(id),
|
asset_houses_id: Number(id),
|
||||||
@ -34,6 +45,7 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadShow();
|
loadShow();
|
||||||
loadPendingCount();
|
loadPendingCount();
|
||||||
|
loadTotalPayableSum();
|
||||||
}, [props.item?.id]);
|
}, [props.item?.id]);
|
||||||
|
|
||||||
let items = [
|
let items = [
|
||||||
@ -43,10 +55,15 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: (
|
children: (
|
||||||
<OccupantsNow
|
<OccupantsNow
|
||||||
item={{ ...data, asset_houses_id: id }}
|
item={{
|
||||||
|
...data,
|
||||||
|
asset_houses_id: id,
|
||||||
|
total_payable_sum: totalPayableSum,
|
||||||
|
}}
|
||||||
reload={() => {
|
reload={() => {
|
||||||
loadShow();
|
loadShow();
|
||||||
loadPendingCount();
|
loadPendingCount();
|
||||||
|
loadTotalPayableSum();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
@ -80,9 +97,14 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<HouseInfo item={data} reload={loadShow} />
|
<HouseInfo item={data} reload={loadShow} />
|
||||||
{id && <SummaryInfo item={{ ...data, id: id }} reload={loadShow} />}
|
{id && (
|
||||||
|
<SummaryInfo
|
||||||
|
item={{ ...data, id: id, total_payable_sum: totalPayableSum }}
|
||||||
|
reload={loadShow}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<ProCard style={{ marginTop: 16 }}>
|
<ProCard style={{ marginTop: 16 }}>
|
||||||
<Tabs type="card" items={items} defaultActiveKey="1" />
|
<Tabs type="card" items={items} defaultActiveKey="1" size="small" />
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
56
src/pages/customer/archive/components/BillInfo.tsx
Normal file
56
src/pages/customer/archive/components/BillInfo.tsx
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import { MyBetaModalFormProps } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import CancelledBill from '@/pages/bills/summary/table/CancelledBill';
|
||||||
|
import PaidBill from '@/pages/bills/summary/table/PaidBill';
|
||||||
|
|
||||||
|
import UnpaidBill from '@/pages/bills/summary/table/UnpaidBill';
|
||||||
|
import { ProCard } from '@ant-design/pro-components';
|
||||||
|
import { useParams } from '@umijs/max';
|
||||||
|
import { Tabs } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
export default function Show(props: MyBetaModalFormProps) {
|
||||||
|
const { id } = useParams<{ id: string }>();
|
||||||
|
const [data, setShow] = useState<any>({});
|
||||||
|
|
||||||
|
const loadShow = () => {
|
||||||
|
let paramsId: any = { asset_houses_id: id ?? 0 };
|
||||||
|
Apis.HouseOrder.HousePrepayments.Show(paramsId).then((res) => {
|
||||||
|
setShow(res?.data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
loadShow();
|
||||||
|
}, [id]);
|
||||||
|
|
||||||
|
let items = [
|
||||||
|
{
|
||||||
|
label: '欠费账单',
|
||||||
|
key: '1',
|
||||||
|
closable: false,
|
||||||
|
children: <UnpaidBill item={{ ...data, asset_houses_id: id }} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '已付账单',
|
||||||
|
key: '2',
|
||||||
|
closable: false,
|
||||||
|
children: <PaidBill item={{ ...data, asset_houses_id: id }} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '作废账单',
|
||||||
|
key: '3',
|
||||||
|
closable: false,
|
||||||
|
children: <CancelledBill item={{ ...data, asset_houses_id: id }} />,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{/* <SummaryInfo item={{ ...data, id: id }} reload={loadShow} /> */}
|
||||||
|
<ProCard style={{ marginTop: 16 }}>
|
||||||
|
<Tabs type="card" items={items} defaultActiveKey="1" size="small" />
|
||||||
|
</ProCard>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
86
src/pages/customer/archive/components/Parking.tsx
Normal file
86
src/pages/customer/archive/components/Parking.tsx
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
import { MyBetaModalFormProps, MyColumns, MyProTableProps } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
AssetCarPortsPropertyTypeEnum,
|
||||||
|
AssetCarPortsStatusEnum,
|
||||||
|
AssetCarPortsTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import SpaceShow from '@/pages/asset/parking_space/modals/SpaceShow';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
|
||||||
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
|
const { item } = props;
|
||||||
|
if (!item) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
headerTitle="房屋关联车位"
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
asset_houses_id: item.id,
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.Asset.AssetCarPorts.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
search={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID({
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '车场名称',
|
||||||
|
dataIndex: ['asset_parking_place', 'name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '车位号',
|
||||||
|
dataIndex: 'name',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '车位全称',
|
||||||
|
dataIndex: 'full_name',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '建筑面积',
|
||||||
|
dataIndex: 'built_area',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
valueEnum: AssetCarPortsTypeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '产权类型',
|
||||||
|
dataIndex: 'property_type',
|
||||||
|
valueEnum: AssetCarPortsPropertyTypeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: AssetCarPortsStatusEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.CreatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<SpaceShow item={item} title="车位详情" />
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,42 +1,19 @@
|
|||||||
import { MyBetaModalFormProps, MyButtons } from '@/common';
|
import { MyBetaModalFormProps, MyButtons } from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
export default function Info(props: MyBetaModalFormProps) {
|
export default function SummaryInfo(props: MyBetaModalFormProps) {
|
||||||
const [getShow, setDataShow] = useState<any>({});
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const totalPayableSum = props?.item?.total_payable_sum;
|
||||||
useEffect(() => {
|
|
||||||
Apis.Bill.HouseBills.SummaryShow({
|
|
||||||
asset_houses_id: props?.item?.id,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
setDataShow(JSON.parse(JSON.stringify(res?.data)));
|
|
||||||
return false;
|
|
||||||
})
|
|
||||||
.catch(() => false);
|
|
||||||
}, [props?.item?.id]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProCard>
|
<ProCard>
|
||||||
<ProDescriptions bordered>
|
<ProDescriptions>
|
||||||
{/* <ProDescriptions.Item label="账单金额">
|
<ProDescriptions.Item label="应收金额">
|
||||||
{getShow?.payable_amount_sum || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="滞纳金">
|
|
||||||
{getShow?.late_fee_sum || '-'}
|
|
||||||
</ProDescriptions.Item>
|
|
||||||
<ProDescriptions.Item label="优惠金额">
|
|
||||||
{getShow?.discount_amount_sum || '-'}
|
|
||||||
</ProDescriptions.Item> */}
|
|
||||||
<ProDescriptions.Item label="未缴金额">
|
|
||||||
<Space>
|
<Space>
|
||||||
{getShow?.total_payable_sum ? `¥${getShow?.total_payable_sum}` : ''}
|
{totalPayableSum ? `¥${totalPayableSum}` : ''}
|
||||||
{getShow?.total_payable_sum ? (
|
{totalPayableSum ? (
|
||||||
<MyButtons.View
|
<MyButtons.View
|
||||||
title="查看账单"
|
title="查看账单"
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
@ -16,10 +16,12 @@ import {
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Tag } from 'antd';
|
import { Tag } from 'antd';
|
||||||
|
import { useRef } from 'react';
|
||||||
import Delivery from './modals/Delivery';
|
import Delivery from './modals/Delivery';
|
||||||
|
|
||||||
export default function Index({ title = '房屋档案' }) {
|
export default function Index({ title = '房屋档案' }) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const formRef = useRef<any>();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
@ -34,6 +36,7 @@ export default function Index({ title = '房屋档案' }) {
|
|||||||
request={async (params, sort) =>
|
request={async (params, sort) =>
|
||||||
MyProTableProps.request(params, sort, Apis.Asset.AssetHouses.List)
|
MyProTableProps.request(params, sort, Apis.Asset.AssetHouses.List)
|
||||||
}
|
}
|
||||||
|
formRef={formRef}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<MyToolBarActions
|
<MyToolBarActions
|
||||||
key="toolbar"
|
key="toolbar"
|
||||||
@ -58,15 +61,58 @@ export default function Index({ title = '房屋档案' }) {
|
|||||||
title: '选择项目',
|
title: '选择项目',
|
||||||
key: 'asset_projects_id',
|
key: 'asset_projects_id',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
fieldProps: {
|
||||||
|
onChange: () => {
|
||||||
|
formRef.current?.setFieldsValue({
|
||||||
|
asset_buildings_id: undefined,
|
||||||
|
asset_units_id: undefined,
|
||||||
|
asset_houses_id: undefined,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
Selects?.AssetBuildings({
|
||||||
|
title: '选择楼栋',
|
||||||
|
key: 'asset_buildings_id',
|
||||||
|
hidden: true,
|
||||||
|
dependencies: ['asset_projects_id'],
|
||||||
|
fieldProps: {
|
||||||
|
onChange: () => {
|
||||||
|
formRef.current?.setFieldsValue({
|
||||||
|
asset_units_id: undefined,
|
||||||
|
asset_houses_id: undefined,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
Selects?.AssetUnits({
|
||||||
|
title: '选择单元',
|
||||||
|
key: 'asset_units_id',
|
||||||
|
hidden: true,
|
||||||
|
dependencies: ['asset_buildings_id'],
|
||||||
|
fieldProps: {
|
||||||
|
onChange: () => {
|
||||||
|
formRef.current?.setFieldsValue({
|
||||||
|
asset_houses_id: undefined,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
Selects?.AssetHouses({
|
||||||
|
title: '选择房屋',
|
||||||
|
key: 'asset_houses_id',
|
||||||
|
hidden: true,
|
||||||
|
dependencies: ['asset_units_id'],
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
dataIndex: ['asset_project', 'name'],
|
dataIndex: ['asset_project', 'name'],
|
||||||
search: {
|
search: false,
|
||||||
transform: (value) => {
|
// search: {
|
||||||
return { project_name: value };
|
// transform: (value) => {
|
||||||
},
|
// return { project_name: value };
|
||||||
},
|
// },
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '房屋名称',
|
title: '房屋名称',
|
||||||
@ -108,7 +154,7 @@ export default function Index({ title = '房屋档案' }) {
|
|||||||
// search: false,
|
// search: false,
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '客户信息',
|
title: '产权人',
|
||||||
render(_, record) {
|
render(_, record) {
|
||||||
const owners =
|
const owners =
|
||||||
record?.house_occupants?.filter(
|
record?.house_occupants?.filter(
|
||||||
@ -122,7 +168,7 @@ export default function Index({ title = '房屋档案' }) {
|
|||||||
<div>
|
<div>
|
||||||
{owners.length > 0 && (
|
{owners.length > 0 && (
|
||||||
<div>
|
<div>
|
||||||
<Tag color="blue">产权人</Tag>
|
{/* <Tag color="blue">产权人</Tag> */}
|
||||||
{owners.map((owner: any) => owner?.name).join('、')}
|
{owners.map((owner: any) => owner?.name).join('、')}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ export default function Delivery(props: MyBetaModalFormProps) {
|
|||||||
key: 'ownership_info',
|
key: 'ownership_info',
|
||||||
title: '产权文件',
|
title: '产权文件',
|
||||||
tooltip: '上限9张',
|
tooltip: '上限9张',
|
||||||
uploadType: 'file',
|
// uploadType: 'file',
|
||||||
max: 9,
|
max: 9,
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.array },
|
formItemProps: { ...rulesHelper.array },
|
||||||
|
|||||||
@ -5,7 +5,9 @@ import { useParams } from '@umijs/max';
|
|||||||
import { Tabs } from 'antd';
|
import { Tabs } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import BasicInfo from '../components/BasicInfo';
|
import BasicInfo from '../components/BasicInfo';
|
||||||
|
import BillInfo from '../components/BillInfo';
|
||||||
import MeterInfo from '../components/MeterInfo';
|
import MeterInfo from '../components/MeterInfo';
|
||||||
|
import Parking from '../components/Parking';
|
||||||
import WordorderInfo from '../components/WordorderInfo';
|
import WordorderInfo from '../components/WordorderInfo';
|
||||||
|
|
||||||
export default function Show({ title }: { title?: string } = {}) {
|
export default function Show({ title }: { title?: string } = {}) {
|
||||||
@ -44,6 +46,12 @@ export default function Show({ title }: { title?: string } = {}) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: <BasicInfo item={{ id }} reload={() => loadShow()} />,
|
children: <BasicInfo item={{ id }} reload={() => loadShow()} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '账单信息',
|
||||||
|
key: 'bills',
|
||||||
|
closable: false,
|
||||||
|
children: <BillInfo item={{ id }} />,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '仪表信息',
|
label: '仪表信息',
|
||||||
key: 'meters',
|
key: 'meters',
|
||||||
@ -56,6 +64,12 @@ export default function Show({ title }: { title?: string } = {}) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: <WordorderInfo item={data} />,
|
children: <WordorderInfo item={data} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '车位',
|
||||||
|
key: 'parkings',
|
||||||
|
closable: false,
|
||||||
|
children: <Parking item={data} />,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
|
|||||||
@ -52,20 +52,20 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
key: 'residential_relation',
|
key: 'residential_relation',
|
||||||
title: '关联身份',
|
title: '关联身份',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
valueEnum: HouseOccupantsResidentialRelationEnum,
|
// valueEnum: HouseOccupantsResidentialRelationEnum,
|
||||||
// valueEnum: () => {
|
valueEnum: () => {
|
||||||
// let obj: any = JSON.parse(
|
let obj: any = JSON.parse(
|
||||||
// JSON.stringify(HouseOccupantsResidentialRelationEnum),
|
JSON.stringify(HouseOccupantsResidentialRelationEnum),
|
||||||
// );
|
);
|
||||||
// delete obj.PropertyOwner;
|
delete obj.PropertyOwner;
|
||||||
// return obj;
|
return obj;
|
||||||
// },
|
},
|
||||||
required: true,
|
required: true,
|
||||||
// fieldProps: {
|
fieldProps: {
|
||||||
// disabled:
|
disabled:
|
||||||
// props?.item?.residential_relation ===
|
props?.item?.residential_relation ===
|
||||||
// HouseOccupantsResidentialRelationEnum.PropertyOwner.value,
|
HouseOccupantsResidentialRelationEnum.PropertyOwner.value,
|
||||||
// },
|
},
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
name: ['residential_relation'],
|
name: ['residential_relation'],
|
||||||
|
|||||||
@ -121,7 +121,8 @@ export default function RegistersShow(props: MyBetaModalFormProps) {
|
|||||||
/>
|
/>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
|
|
||||||
{props?.item?.type === 'Delivery' && (
|
{(props?.item?.type === 'AddOwner' ||
|
||||||
|
props?.item?.type === 'Transfer') && (
|
||||||
<ProCard title="产证信息" style={{ paddingRight: 10 }}>
|
<ProCard title="产证信息" style={{ paddingRight: 10 }}>
|
||||||
<Image.PreviewGroup>
|
<Image.PreviewGroup>
|
||||||
{props?.item?.ownership_info?.map((res: any, index: number) => {
|
{props?.item?.ownership_info?.map((res: any, index: number) => {
|
||||||
|
|||||||
@ -11,200 +11,229 @@ import {
|
|||||||
HouseOccupantsHouseRelationEnum,
|
HouseOccupantsHouseRelationEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message, Modal } from 'antd';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
export default function Transfer(props: MyBetaModalFormProps) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
return (
|
const [open, setOpen] = useState(false);
|
||||||
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Store>
|
|
||||||
{...MyModalFormProps.props}
|
const handleOpen = () => {
|
||||||
title={`${props.title}`}
|
const totalPayableSum = props?.item?.total_payable_sum;
|
||||||
wrapperCol={{ span: 24 }}
|
if (totalPayableSum && totalPayableSum > 0) {
|
||||||
width="1000px"
|
Modal.confirm({
|
||||||
trigger={
|
title: '提示',
|
||||||
<MyButtons.Default title={props.title} size="middle" type="primary" />
|
content: `该房屋存在未收取的账单,金额合计: ¥${totalPayableSum} ,是否继续操作过户 ?`,
|
||||||
}
|
okText: '继续过户',
|
||||||
key={new Date().getTime()}
|
cancelText: '取消',
|
||||||
form={form}
|
onOk: () => {
|
||||||
onOpenChange={(open: any) => {
|
form.resetFields();
|
||||||
if (open) {
|
setOpen(true);
|
||||||
form.resetFields(); // 清空表单数据
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values) =>
|
|
||||||
Apis.Archive.HouseRegisters.Store({
|
|
||||||
...values,
|
|
||||||
asset_houses_id: props?.item?.id,
|
|
||||||
type: 'Transfer',
|
|
||||||
customer_info: values.customer_info?.map((res: any) => {
|
|
||||||
return {
|
|
||||||
...res,
|
|
||||||
house_relation: 'Owner',
|
|
||||||
relation_with_owner: 'Self',
|
|
||||||
residential_relation: 'PropertyOwner',
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
props.reload?.();
|
|
||||||
message.success(props.title + '成功');
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false)
|
|
||||||
}
|
|
||||||
columns={[
|
|
||||||
// MyFormItems.EnumRadio({
|
|
||||||
// key: 'house_status',
|
|
||||||
// title: '房屋状态',
|
|
||||||
// colProps: { span: 12 },
|
|
||||||
// valueEnum: HouseRegistersHouseStatusEnum,
|
|
||||||
// formItemProps: { ...rulesHelper.text },
|
|
||||||
// }),
|
|
||||||
// MyFormItems.EnumRadio({
|
|
||||||
// key: 'house_status',
|
|
||||||
// title: '使用计划',
|
|
||||||
// colProps: { span: 8 },
|
|
||||||
// valueEnum: HouseRegistersUsagePlanEnum,
|
|
||||||
// formItemProps: { ...rulesHelper.text },
|
|
||||||
// }),
|
|
||||||
// MyFormItems.EnumSelect({
|
|
||||||
// key: 'customer_type',
|
|
||||||
// title: '产权归属',
|
|
||||||
// colProps: { span: 6 },
|
|
||||||
// valueEnum: HouseRegistersCustomerTypeEnum,
|
|
||||||
// }),
|
|
||||||
MyFormItems.UploadImages({
|
|
||||||
key: 'ownership_info',
|
|
||||||
title: '产权文件',
|
|
||||||
tooltip: '上限3张',
|
|
||||||
uploadType: 'file',
|
|
||||||
max: 3,
|
|
||||||
colProps: { span: 18 },
|
|
||||||
formItemProps: { ...rulesHelper.array },
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
valueType: 'formList',
|
|
||||||
dataIndex: 'customer_info',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
fieldProps: {
|
|
||||||
copyIconProps: false,
|
|
||||||
creatorButtonProps: {
|
|
||||||
creatorButtonText: '添加业主',
|
|
||||||
},
|
|
||||||
itemRender: (
|
|
||||||
{ listDom, action }: any,
|
|
||||||
{ index }: { index: number },
|
|
||||||
) => {
|
|
||||||
return (
|
|
||||||
<ProCard
|
|
||||||
bordered
|
|
||||||
style={{ marginBlockEnd: 0 }}
|
|
||||||
title={`产权人 ${index + 1}`}
|
|
||||||
extra={action}
|
|
||||||
bodyStyle={{ paddingBlockEnd: 0 }}
|
|
||||||
>
|
|
||||||
{listDom}
|
|
||||||
</ProCard>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
colProps: { span: 5 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '手机号',
|
|
||||||
dataIndex: 'phone',
|
|
||||||
colProps: { span: 5 },
|
|
||||||
fieldProps: {
|
|
||||||
maxLength: 11,
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.phone },
|
|
||||||
},
|
|
||||||
MyFormItems.EnumSelect({
|
|
||||||
key: 'card_type',
|
|
||||||
title: '证件类型',
|
|
||||||
colProps: { span: 6 },
|
|
||||||
valueEnum: HouseOccupantsCardTypeEnum,
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '证件号码',
|
|
||||||
dataIndex: 'id_card',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
fieldProps: {
|
|
||||||
maxLength: 18,
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'house_relation',
|
|
||||||
title: '住户类型',
|
|
||||||
colProps: { span: 6 },
|
|
||||||
valueEnum: HouseOccupantsHouseRelationEnum,
|
|
||||||
fieldProps: {
|
|
||||||
defaultValue: 'Owner',
|
|
||||||
},
|
|
||||||
hideInForm: true,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
columns: [
|
|
||||||
MyFormItems.UploadImages({
|
|
||||||
key: 'card_front_image',
|
|
||||||
title: '证件正面',
|
|
||||||
uploadType: 'file',
|
|
||||||
required: true,
|
|
||||||
max: 1,
|
|
||||||
colProps: { span: 6 },
|
|
||||||
}),
|
|
||||||
MyFormItems.UploadImages({
|
|
||||||
key: 'card_back_image',
|
|
||||||
title: '证件反面',
|
|
||||||
uploadType: 'file',
|
|
||||||
required: true,
|
|
||||||
max: 1,
|
|
||||||
colProps: { span: 6 },
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '是否入住',
|
|
||||||
dataIndex: 'is_live_in',
|
|
||||||
colProps: { span: 6 },
|
|
||||||
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: 6 },
|
|
||||||
fieldProps: {
|
|
||||||
style: { width: '100%' },
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
]
|
|
||||||
: [];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
]}
|
onCancel: () => {
|
||||||
/>
|
setOpen(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
form.resetFields();
|
||||||
|
setOpen(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<MyButtons.Default
|
||||||
|
title={props.title}
|
||||||
|
size="middle"
|
||||||
|
type="primary"
|
||||||
|
disabled={!props.item?.house_occupants?.length}
|
||||||
|
onClick={handleOpen}
|
||||||
|
/>
|
||||||
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`${props.title}`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="1000px"
|
||||||
|
open={open}
|
||||||
|
onOpenChange={setOpen}
|
||||||
|
key={new Date().getTime()}
|
||||||
|
form={form}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Store({
|
||||||
|
...values,
|
||||||
|
asset_houses_id: props?.item?.id,
|
||||||
|
type: 'Transfer',
|
||||||
|
customer_info: values.customer_info?.map((res: any) => {
|
||||||
|
return {
|
||||||
|
...res,
|
||||||
|
house_relation: 'Owner',
|
||||||
|
relation_with_owner: 'Self',
|
||||||
|
residential_relation: 'PropertyOwner',
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
// MyFormItems.EnumRadio({
|
||||||
|
// key: 'house_status',
|
||||||
|
// title: '房屋状态',
|
||||||
|
// colProps: { span: 12 },
|
||||||
|
// valueEnum: HouseRegistersHouseStatusEnum,
|
||||||
|
// formItemProps: { ...rulesHelper.text },
|
||||||
|
// }),
|
||||||
|
// MyFormItems.EnumRadio({
|
||||||
|
// key: 'house_status',
|
||||||
|
// title: '使用计划',
|
||||||
|
// colProps: { span: 8 },
|
||||||
|
// valueEnum: HouseRegistersUsagePlanEnum,
|
||||||
|
// formItemProps: { ...rulesHelper.text },
|
||||||
|
// }),
|
||||||
|
// MyFormItems.EnumSelect({
|
||||||
|
// key: 'customer_type',
|
||||||
|
// title: '产权归属',
|
||||||
|
// colProps: { span: 6 },
|
||||||
|
// valueEnum: HouseRegistersCustomerTypeEnum,
|
||||||
|
// }),
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'ownership_info',
|
||||||
|
title: '产权文件',
|
||||||
|
tooltip: '上限9张',
|
||||||
|
// uploadType: 'file',
|
||||||
|
max: 9,
|
||||||
|
colProps: { span: 18 },
|
||||||
|
formItemProps: { ...rulesHelper.array },
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'customer_info',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
initialValue: [''],
|
||||||
|
fieldProps: {
|
||||||
|
copyIconProps: false,
|
||||||
|
creatorButtonProps: {
|
||||||
|
creatorButtonText: '添加业主',
|
||||||
|
},
|
||||||
|
itemRender: (
|
||||||
|
{ listDom, action }: any,
|
||||||
|
{ index }: { index: number },
|
||||||
|
) => {
|
||||||
|
return (
|
||||||
|
<ProCard
|
||||||
|
bordered
|
||||||
|
style={{ marginBlockEnd: 0 }}
|
||||||
|
title={`产权人 ${index + 1}`}
|
||||||
|
extra={action}
|
||||||
|
bodyStyle={{ paddingBlockEnd: 0 }}
|
||||||
|
>
|
||||||
|
{listDom}
|
||||||
|
</ProCard>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
colProps: { span: 5 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
colProps: { span: 5 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.phone },
|
||||||
|
},
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'card_type',
|
||||||
|
title: '证件类型',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseOccupantsCardTypeEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '证件号码',
|
||||||
|
dataIndex: 'id_card',
|
||||||
|
colProps: { span: 8 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 18,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'house_relation',
|
||||||
|
title: '住户类型',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
valueEnum: HouseOccupantsHouseRelationEnum,
|
||||||
|
fieldProps: {
|
||||||
|
defaultValue: 'Owner',
|
||||||
|
},
|
||||||
|
hideInForm: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_front_image',
|
||||||
|
title: '证件正面',
|
||||||
|
// uploadType: 'file',
|
||||||
|
required: true,
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 6 },
|
||||||
|
}),
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_back_image',
|
||||||
|
title: '证件反面',
|
||||||
|
// uploadType: 'file',
|
||||||
|
required: true,
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 6 },
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '是否入住',
|
||||||
|
dataIndex: 'is_live_in',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
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: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
style: { width: '100%' },
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,7 +233,8 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
/>
|
/>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
)}
|
)}
|
||||||
{props?.item?.type === 'AddOwner' &&
|
{(props?.item?.type === 'AddOwner' ||
|
||||||
|
props?.item?.type === 'Transfer') &&
|
||||||
props?.item?.ownership_info &&
|
props?.item?.ownership_info &&
|
||||||
props?.item?.ownership_info?.length > 0 && (
|
props?.item?.ownership_info?.length > 0 && (
|
||||||
<ProCard title="产证信息" size="small">
|
<ProCard title="产证信息" size="small">
|
||||||
@ -243,7 +244,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
(res: any, index: number) => (
|
(res: any, index: number) => (
|
||||||
<Image
|
<Image
|
||||||
key={`${res?.name}_${index}`}
|
key={`${res?.name}_${index}`}
|
||||||
width={100}
|
width={40}
|
||||||
src={res?.url || ''}
|
src={res?.url || ''}
|
||||||
placeholder="产证资料"
|
placeholder="产证资料"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -202,7 +202,8 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
/>
|
/>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
)}
|
)}
|
||||||
{props?.item?.type === 'AddOwner' &&
|
{(props?.item?.type === 'AddOwner' ||
|
||||||
|
props?.item?.type === 'Transfer') &&
|
||||||
props?.item?.ownership_info &&
|
props?.item?.ownership_info &&
|
||||||
props?.item?.ownership_info?.length > 0 && (
|
props?.item?.ownership_info?.length > 0 && (
|
||||||
<ProCard title="产证信息" size="small">
|
<ProCard title="产证信息" size="small">
|
||||||
|
|||||||
@ -3,6 +3,8 @@ import {
|
|||||||
MyColumns,
|
MyColumns,
|
||||||
MyPageContainer,
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
|
MyTableActions,
|
||||||
|
MyToolBarActions,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
import { Selects } from '@/components/Select';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
@ -11,7 +13,7 @@ import {
|
|||||||
HouseWorkOrdersStatusEnum,
|
HouseWorkOrdersStatusEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space, Tag } from 'antd';
|
import { Tag } from 'antd';
|
||||||
import WorkOrderShow from '../../work_order/list/modals/WorkOrderShow';
|
import WorkOrderShow from '../../work_order/list/modals/WorkOrderShow';
|
||||||
import Create from './modals/Create';
|
import Create from './modals/Create';
|
||||||
import Show from './modals/Show';
|
import Show from './modals/Show';
|
||||||
@ -36,7 +38,14 @@ export default function Index({ title = '品质核查' }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<Create key="Create" reload={action?.reload} title={title} />,
|
<MyToolBarActions
|
||||||
|
key="toolbar"
|
||||||
|
actions={{
|
||||||
|
create: (
|
||||||
|
<Create key="Create" reload={action?.reload} title={title} />
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>,
|
||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID({ search: false }),
|
MyColumns.ID({ search: false }),
|
||||||
@ -88,12 +97,15 @@ export default function Index({ title = '品质核查' }) {
|
|||||||
title: '整改工单',
|
title: '整改工单',
|
||||||
dataIndex: 'house_work_orders_id',
|
dataIndex: 'house_work_orders_id',
|
||||||
search: false,
|
search: false,
|
||||||
render: (value: any) => (
|
render: (value: any, record: any) =>
|
||||||
<WorkOrderShow
|
record.is_rectification ? (
|
||||||
item={{ id: value, type: 'link' }}
|
<WorkOrderShow
|
||||||
title={value + ' 查看'}
|
item={{ id: value, type: 'link' }}
|
||||||
/>
|
title={' 查看'}
|
||||||
),
|
/>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
),
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '分配状态',
|
title: '分配状态',
|
||||||
@ -118,17 +130,24 @@ export default function Index({ title = '品质核查' }) {
|
|||||||
MyColumns.CreatedAt(),
|
MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<MyTableActions
|
||||||
<Show item={item} />
|
key={index}
|
||||||
<Update item={item} reload={action?.reload} title={title} />
|
actions={{
|
||||||
<MyButtons.Delete
|
show: <Show item={item} />,
|
||||||
onConfirm={() =>
|
update: (
|
||||||
Apis.QualityCheck.QualityChecks.Delete({
|
<Update item={item} reload={action?.reload} title={title} />
|
||||||
id: item.id,
|
),
|
||||||
}).then(() => action?.reload())
|
delete: (
|
||||||
}
|
<MyButtons.Delete
|
||||||
/>
|
onConfirm={() =>
|
||||||
</Space>
|
Apis.QualityCheck.QualityChecks.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
]}
|
]}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user