fix:活动、组织、放行
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m34s
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m34s
This commit is contained in:
parent
87e4ed194d
commit
555301527b
@ -83,7 +83,7 @@ export const SysSelects = {
|
|||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
request: async () => (await Apis.Permission.SysRoles.Select()).data,
|
request: async () => (await Apis.Permission.Roles.Select()).data,
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
191
src/gen/ApiTypes.d.ts
vendored
191
src/gen/ApiTypes.d.ts
vendored
@ -63,6 +63,88 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
namespace Approval {
|
||||||
|
namespace ApprovalInstances {
|
||||||
|
type PendingList = {
|
||||||
|
"type"?: string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"applicant_name"?: string; // 申请人姓名
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"status"?: string; // 状态,[enum:ApprovalRecordsStatusEnum]
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // 审批实例id
|
||||||
|
};
|
||||||
|
type Approve = {
|
||||||
|
"record_id": number; // 审批记录id
|
||||||
|
"status": string; // 审批结果,[enum:ApprovalRecordsStatusEnum]
|
||||||
|
"opinion"?: string; // 审批意见
|
||||||
|
};
|
||||||
|
type Cancel = {
|
||||||
|
"id": number; // 审批实例id
|
||||||
|
};
|
||||||
|
type Transfer = {
|
||||||
|
"record_id": number; // 审批记录id
|
||||||
|
"to_employee_id": number; // 接收人id,[ref:company_employees]
|
||||||
|
"opinion"?: string; // 转交理由
|
||||||
|
};
|
||||||
|
type List = {
|
||||||
|
"type"?: string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"status"?: string; // 状态,[enum:ApprovalInstancesStatusEnum]
|
||||||
|
"applicant_name"?: string; // 申请人姓名
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
type ProcessedList = {
|
||||||
|
"type"?: string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"status"?: string; // 审批结果,[enum:ApprovalRecordsStatusEnum]
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
type CcList = {
|
||||||
|
"type"?: string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace ApprovalTemplates {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"type"?: string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"name": string; // 模板名称
|
||||||
|
"code": string; // 模板编码
|
||||||
|
"type": string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"description"?: string; // 模板描述
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"nodes": string[]; // 审批节点列表
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"name": string; // 模板名称
|
||||||
|
"code": string; // 模板编码
|
||||||
|
"type": string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"description"?: string; // 模板描述
|
||||||
|
"is_enabled"?: boolean; // 是否启用
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
"nodes": string[]; // 审批节点列表
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type ToggleEnabled = {
|
||||||
|
"id": number; // id
|
||||||
|
"is_enabled": boolean; // 是否启用
|
||||||
|
};
|
||||||
|
type Select = {
|
||||||
|
"type"?: string; // 业务类型,[enum:ApprovalTemplatesTypeEnum]
|
||||||
|
"asset_projects_id"?: number; // 所属项目id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace Archive {
|
namespace Archive {
|
||||||
namespace HouseOccupants {
|
namespace HouseOccupants {
|
||||||
type List = {
|
type List = {
|
||||||
@ -946,6 +1028,51 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
namespace GoodsReleases {
|
||||||
|
namespace GoodsReleases {
|
||||||
|
type List = {
|
||||||
|
"code"?: string; // 放行码
|
||||||
|
"apply_name"?: string; // 申请人姓名
|
||||||
|
"apply_phone"?: string; // 申请人电话
|
||||||
|
"status"?: string; // 状态,[enum:GoodsReleasesStatusEnum]
|
||||||
|
"passed_type"?: string; // 通行类型,[enum:GoodsReleasesPassedTypeEnum]
|
||||||
|
"asset_projects_id"?: number; // 所属项目
|
||||||
|
"asset_houses_id"?: number; // 房屋
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"asset_houses_id": number; // 访问房屋
|
||||||
|
"apply_name": string; // 申请人姓名
|
||||||
|
"apply_phone": string; // 申请人电话
|
||||||
|
"passed_type": string; // 通行类型,[enum:GoodsReleasesPassedTypeEnum]
|
||||||
|
"goods": string[]; // 放行物品信息
|
||||||
|
"passed_time": Date; // 通行时间
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"apply_name"?: string; // 申请人姓名
|
||||||
|
"apply_phone"?: string; // 申请人电话
|
||||||
|
"passed_type"?: string; // 通行类型,[enum:GoodsReleasesPassedTypeEnum]
|
||||||
|
"goods"?: string[]; // 放行物品信息
|
||||||
|
"passed_time"?: Date; // 通行时间
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type ApproveByEmployee = {
|
||||||
|
"id": number; // id
|
||||||
|
"status": string; // 审核状态(Approved/Rejected)
|
||||||
|
"reason"?: string; // 驳回原因
|
||||||
|
};
|
||||||
|
type Release = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type ScanRelease = {
|
||||||
|
"code": string; // 放行码
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace Grid {
|
namespace Grid {
|
||||||
namespace Grids {
|
namespace Grids {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1548,6 +1675,70 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
namespace Refund {
|
||||||
|
namespace Refunds {
|
||||||
|
type List = {
|
||||||
|
"type"?: string; // 退款类型,[enum:RefundsTypeEnum]
|
||||||
|
"business_id"?: number; // 业务ID(配合type使用)
|
||||||
|
"refund_status"?: string; // 退款状态,[enum:RefundsStatusEnum]
|
||||||
|
"applicant_name"?: string; // 申请人姓名
|
||||||
|
"asset_projects_id"?: number; // 项目ID
|
||||||
|
"apply_time"?: string[]; // 申请时间范围
|
||||||
|
"asset_houses_id"?: number; // 房屋ID
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"type": string; // 退款类型,[enum:RefundsTypeEnum]
|
||||||
|
"business_id"?: number; // 业务ID(根据type对应不同表)
|
||||||
|
"refund_amount": number; // 退款金额(单位元)
|
||||||
|
"company_receipt_accounts_id": number; // 出款账户id
|
||||||
|
"payee_name"?: string; // 收款人姓名
|
||||||
|
"payee_bank"?: string; // 收款银行
|
||||||
|
"payee_account"?: string; // 收款账号
|
||||||
|
"reason"?: string; // 退款原因
|
||||||
|
"asset_projects_id"?: number; // 项目ID
|
||||||
|
"approval_templates_id"?: number; // 审批模板ID
|
||||||
|
"node_approvers"?: string[]; // 各节点审批人员列表
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Complete = {
|
||||||
|
"id": number; // id
|
||||||
|
"serial_number"?: string; // 退款流水号
|
||||||
|
"refund_time"?: Date; // 退款时间
|
||||||
|
"voucher"?: string[]; // 退款凭证
|
||||||
|
};
|
||||||
|
type Cancel = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
namespace Visitor {
|
||||||
|
namespace VisitorApplies {
|
||||||
|
type List = {
|
||||||
|
"status"?: string; // 审核状态,[enum:VisitorAppliesStatusEnum]
|
||||||
|
"visit_start_time"?: Date; // 预计到访时间
|
||||||
|
"visitor_name"?: string; // 模糊搜索:访客姓名
|
||||||
|
"visitor_phone"?: string; // 模糊搜索:访客电话
|
||||||
|
"host_phone"?: string; // 模糊搜索:被访人电话
|
||||||
|
"asset_projects_id"?: number; // 项目ID
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // 申请id
|
||||||
|
};
|
||||||
|
type Approve = {
|
||||||
|
"id": number; // 访客申请id
|
||||||
|
};
|
||||||
|
type Reject = {
|
||||||
|
"id": number; // 访客申请id
|
||||||
|
"remark": string; // 驳回原因
|
||||||
|
};
|
||||||
|
type Scan = {
|
||||||
|
"code": string; // 通行码
|
||||||
|
"scan_type": string; // 扫码类型:进入/离开,[enum:VisitorScanTypeEnum]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace WorkOrder {
|
namespace WorkOrder {
|
||||||
namespace HouseWorkLogs {
|
namespace HouseWorkLogs {
|
||||||
type List = {
|
type List = {
|
||||||
|
|||||||
120
src/gen/Apis.ts
120
src/gen/Apis.ts
@ -41,6 +41,63 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Approval: {
|
||||||
|
ApprovalInstances: {
|
||||||
|
PendingList(data?: ApiTypes.Approval.ApprovalInstances.PendingList): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/pending_list', { data });
|
||||||
|
},
|
||||||
|
PendingCount(): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/pending_count', {});
|
||||||
|
},
|
||||||
|
MyApplyList(): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/my_apply_list', {});
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Approval.ApprovalInstances.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/show', { data });
|
||||||
|
},
|
||||||
|
Approve(data: ApiTypes.Approval.ApprovalInstances.Approve): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/approve', { data });
|
||||||
|
},
|
||||||
|
Cancel(data: ApiTypes.Approval.ApprovalInstances.Cancel): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/cancel', { data });
|
||||||
|
},
|
||||||
|
Transfer(data: ApiTypes.Approval.ApprovalInstances.Transfer): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/transfer', { data });
|
||||||
|
},
|
||||||
|
List(data?: ApiTypes.Approval.ApprovalInstances.List): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/list', { data });
|
||||||
|
},
|
||||||
|
ProcessedList(data?: ApiTypes.Approval.ApprovalInstances.ProcessedList): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/processed_list', { data });
|
||||||
|
},
|
||||||
|
CcList(data?: ApiTypes.Approval.ApprovalInstances.CcList): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_instances/cc_list', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ApprovalTemplates: {
|
||||||
|
List(data?: ApiTypes.Approval.ApprovalTemplates.List): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Approval.ApprovalTemplates.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Approval.ApprovalTemplates.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Approval.ApprovalTemplates.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/show', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Approval.ApprovalTemplates.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/soft_delete', { data });
|
||||||
|
},
|
||||||
|
ToggleEnabled(data: ApiTypes.Approval.ApprovalTemplates.ToggleEnabled): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/toggle_enabled', { data });
|
||||||
|
},
|
||||||
|
Select(data?: ApiTypes.Approval.ApprovalTemplates.Select): Promise<MyResponseType> {
|
||||||
|
return request('company/approval/approval_templates/select', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
Archive: {
|
Archive: {
|
||||||
HouseOccupants: {
|
HouseOccupants: {
|
||||||
List(data?: ApiTypes.Archive.HouseOccupants.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Archive.HouseOccupants.List): Promise<MyResponseType> {
|
||||||
@ -500,6 +557,31 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
GoodsReleases: {
|
||||||
|
GoodsReleases: {
|
||||||
|
List(data?: ApiTypes.GoodsReleases.GoodsReleases.List): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.GoodsReleases.GoodsReleases.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.GoodsReleases.GoodsReleases.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.GoodsReleases.GoodsReleases.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/show', { data });
|
||||||
|
},
|
||||||
|
ApproveByEmployee(data: ApiTypes.GoodsReleases.GoodsReleases.ApproveByEmployee): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/approve_by_employee', { data });
|
||||||
|
},
|
||||||
|
Release(data: ApiTypes.GoodsReleases.GoodsReleases.Release): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/release', { data });
|
||||||
|
},
|
||||||
|
ScanRelease(data: ApiTypes.GoodsReleases.GoodsReleases.ScanRelease): Promise<MyResponseType> {
|
||||||
|
return request('company/goods_releases/goods_releases/scan_release', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
Grid: {
|
Grid: {
|
||||||
Grids: {
|
Grids: {
|
||||||
List(data?: ApiTypes.Grid.Grids.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Grid.Grids.List): Promise<MyResponseType> {
|
||||||
@ -864,6 +946,44 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Refund: {
|
||||||
|
Refunds: {
|
||||||
|
List(data?: ApiTypes.Refund.Refunds.List): Promise<MyResponseType> {
|
||||||
|
return request('company/refund/refunds/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Refund.Refunds.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/refund/refunds/store', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Refund.Refunds.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/refund/refunds/show', { data });
|
||||||
|
},
|
||||||
|
Complete(data: ApiTypes.Refund.Refunds.Complete): Promise<MyResponseType> {
|
||||||
|
return request('company/refund/refunds/complete', { data });
|
||||||
|
},
|
||||||
|
Cancel(data: ApiTypes.Refund.Refunds.Cancel): Promise<MyResponseType> {
|
||||||
|
return request('company/refund/refunds/cancel', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Visitor: {
|
||||||
|
VisitorApplies: {
|
||||||
|
List(data?: ApiTypes.Visitor.VisitorApplies.List): Promise<MyResponseType> {
|
||||||
|
return request('company/visitor/visitor_applies/list', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Visitor.VisitorApplies.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/visitor/visitor_applies/show', { data });
|
||||||
|
},
|
||||||
|
Approve(data: ApiTypes.Visitor.VisitorApplies.Approve): Promise<MyResponseType> {
|
||||||
|
return request('company/visitor/visitor_applies/approve', { data });
|
||||||
|
},
|
||||||
|
Reject(data: ApiTypes.Visitor.VisitorApplies.Reject): Promise<MyResponseType> {
|
||||||
|
return request('company/visitor/visitor_applies/reject', { data });
|
||||||
|
},
|
||||||
|
Scan(data: ApiTypes.Visitor.VisitorApplies.Scan): Promise<MyResponseType> {
|
||||||
|
return request('company/visitor/visitor_applies/scan', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
WorkOrder: {
|
WorkOrder: {
|
||||||
HouseWorkLogs: {
|
HouseWorkLogs: {
|
||||||
List(data: ApiTypes.WorkOrder.HouseWorkLogs.List): Promise<MyResponseType> {
|
List(data: ApiTypes.WorkOrder.HouseWorkLogs.List): Promise<MyResponseType> {
|
||||||
|
|||||||
109
src/gen/Enums.ts
109
src/gen/Enums.ts
@ -26,6 +26,41 @@ export const ActivityEnrollsStatusEnum= {
|
|||||||
'Cancelled': {"text":"取消","color":"#ff9800","value":"Cancelled"},
|
'Cancelled': {"text":"取消","color":"#ff9800","value":"Cancelled"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 审批实例状态枚举
|
||||||
|
export const ApprovalInstancesStatusEnum= {
|
||||||
|
'Pending': {"text":"待审批","color":"#ff9800","value":"Pending"},
|
||||||
|
'Approved': {"text":"已通过","color":"#4caf50","value":"Approved"},
|
||||||
|
'Rejected': {"text":"已拒绝","color":"#f44336","value":"Rejected"},
|
||||||
|
'Cancelled': {"text":"已取消","color":"#9e9e9e","value":"Cancelled"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 审批记录状态枚举
|
||||||
|
export const ApprovalRecordsStatusEnum= {
|
||||||
|
'Pending': {"text":"待审批","color":"#ff9800","value":"Pending"},
|
||||||
|
'Approved': {"text":"同意","color":"#4caf50","value":"Approved"},
|
||||||
|
'Rejected': {"text":"拒绝","color":"#f44336","value":"Rejected"},
|
||||||
|
'Transferred': {"text":"转交","color":"#9c27b0","value":"Transferred"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 审批方式枚举
|
||||||
|
export const ApprovalTemplateNodesApproveTypeEnum= {
|
||||||
|
'And': {"text":"会签","color":"#4caf50","value":"And"},
|
||||||
|
'Or': {"text":"或签","color":"#ff9800","value":"Or"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 审批节点类型枚举
|
||||||
|
export const ApprovalTemplateNodesNodeTypeEnum= {
|
||||||
|
'Approver': {"text":"审批人","color":"#2196f3","value":"Approver"},
|
||||||
|
'CC': {"text":"抄送人","color":"#9e9e9e","value":"CC"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 审批业务类型枚举
|
||||||
|
export const ApprovalTemplatesTypeEnum= {
|
||||||
|
'Contract': {"text":"合同","color":"#2196f3","value":"Contract"},
|
||||||
|
'Finance': {"text":"财务","color":"#4caf50","value":"Finance"},
|
||||||
|
'Refund': {"text":"退款","color":"#f44336","value":"Refund"},
|
||||||
|
};
|
||||||
|
|
||||||
// 车位产权类型
|
// 车位产权类型
|
||||||
export const AssetCarPortsPropertyTypeEnum= {
|
export const AssetCarPortsPropertyTypeEnum= {
|
||||||
'Ownership': {"text":"产权车位","color":"#1e90ff","value":"Ownership"},
|
'Ownership': {"text":"产权车位","color":"#1e90ff","value":"Ownership"},
|
||||||
@ -216,7 +251,7 @@ export const BannersTypeEnum= {
|
|||||||
|
|
||||||
// 缓存类型
|
// 缓存类型
|
||||||
export const CacheTypeEnum= {
|
export const CacheTypeEnum= {
|
||||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#6f374e","value":"MobilePhoneVerificationCode"},
|
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#2721e5","value":"MobilePhoneVerificationCode"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
@ -346,6 +381,29 @@ export const CustomerOpinionsTypeEnum= {
|
|||||||
'FeatureSuggestion': {"text":"新功能建议","color":"#00bfff","value":"FeatureSuggestion"},
|
'FeatureSuggestion': {"text":"新功能建议","color":"#00bfff","value":"FeatureSuggestion"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 物品放行审核状态
|
||||||
|
export const GoodsReleasesAuditStatusEnum= {
|
||||||
|
'Pending': {"text":"待审核","color":"#faad14","value":"Pending"},
|
||||||
|
'Approved': {"text":"已通过","color":"#52c41a","value":"Approved"},
|
||||||
|
'Rejected': {"text":"已退回","color":"#ff4d4f","value":"Rejected"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 物品放行通行类型
|
||||||
|
export const GoodsReleasesPassedTypeEnum= {
|
||||||
|
'Moving': {"text":"搬家","color":"#1890ff","value":"Moving"},
|
||||||
|
'Delivery': {"text":"出货","color":"#52c41a","value":"Delivery"},
|
||||||
|
'Other': {"text":"其他","color":"#faad14","value":"Other"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 物品放行状态
|
||||||
|
export const GoodsReleasesStatusEnum= {
|
||||||
|
'Pending': {"text":"待审核","color":"#faad14","value":"Pending"},
|
||||||
|
'OwnerApproved': {"text":"业主已审","color":"#1890ff","value":"OwnerApproved"},
|
||||||
|
'Approved': {"text":"已通过","color":"#52c41a","value":"Approved"},
|
||||||
|
'Rejected': {"text":"已退回","color":"#ff4d4f","value":"Rejected"},
|
||||||
|
'Released': {"text":"已放行","color":"#722ed1","value":"Released"},
|
||||||
|
};
|
||||||
|
|
||||||
// 账单状态枚举
|
// 账单状态枚举
|
||||||
export const HouseBillsBillStatusEnum= {
|
export const HouseBillsBillStatusEnum= {
|
||||||
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
||||||
@ -733,6 +791,17 @@ export const RefundsStatusEnum= {
|
|||||||
'Cancelled': {"text":"已取消","color":"#9e9e9e","value":"Cancelled"},
|
'Cancelled': {"text":"已取消","color":"#9e9e9e","value":"Cancelled"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 退款类型枚举
|
||||||
|
export const RefundsTypeEnum= {
|
||||||
|
'HouseBill': {"text":"物业费退款","color":"#2196f3","value":"HouseBill"},
|
||||||
|
'Bill': {"text":"账单退款","color":"#4caf50","value":"Bill"},
|
||||||
|
'ContractBill': {"text":"合同退款","color":"#ff9800","value":"ContractBill"},
|
||||||
|
'RenovationApply': {"text":"退保证金","color":"#86aac3ff","value":"RenovationApply"},
|
||||||
|
'HouseDoorCard': {"text":"门禁退款","color":"#9c27b0","value":"HouseDoorCard"},
|
||||||
|
'HouseWorkOrder': {"text":"工单退款","color":"#00bcd4","value":"HouseWorkOrder"},
|
||||||
|
'Other': {"text":"其他退款","color":"#607d8b","value":"Other"},
|
||||||
|
};
|
||||||
|
|
||||||
// 性别
|
// 性别
|
||||||
export const SexEnum= {
|
export const SexEnum= {
|
||||||
'Male': {"text":"男","color":"#0000ff","value":"Male"},
|
'Male': {"text":"男","color":"#0000ff","value":"Male"},
|
||||||
@ -753,6 +822,44 @@ export const SysPermissionsTypeEnum= {
|
|||||||
'Button': {"text":"按钮","color":"#97224f","value":"Button"},
|
'Button': {"text":"按钮","color":"#97224f","value":"Button"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 来访事由
|
||||||
|
export const VisitReasonEnum= {
|
||||||
|
'Visit': {"text":"拜访","color":"#2196f3","value":"Visit"},
|
||||||
|
'Business': {"text":"商务","color":"#3f51b5","value":"Business"},
|
||||||
|
'Interview': {"text":"面试","color":"#9c27b0","value":"Interview"},
|
||||||
|
'Private': {"text":"私人","color":"#e91e63","value":"Private"},
|
||||||
|
'Express': {"text":"快递","color":"#00bcd4","value":"Express"},
|
||||||
|
'Renovation': {"text":"装修","color":"#ff5722","value":"Renovation"},
|
||||||
|
'Other': {"text":"其他","color":"#607d8b","value":"Other"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 访客申请状态
|
||||||
|
export const VisitorAppliesStatusEnum= {
|
||||||
|
'Pending': {"text":"审核中","color":"#ff9800","value":"Pending"},
|
||||||
|
'Approved': {"text":"已通过","color":"#4caf50","value":"Approved"},
|
||||||
|
'Rejected': {"text":"已驳回","color":"#f44336","value":"Rejected"},
|
||||||
|
'Expired': {"text":"已失效","color":"#9e9e9e","value":"Expired"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 访客申请类型
|
||||||
|
export const VisitorApplyTypeEnum= {
|
||||||
|
'invite': {"text":"业主邀请","color":"#2196f3","value":"invite"},
|
||||||
|
'register': {"text":"访客登记","color":"#ff9800","value":"register"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 通行码状态
|
||||||
|
export const VisitorCodeStatusEnum= {
|
||||||
|
'unused': {"text":"未使用","color":"#2196f3","value":"unused"},
|
||||||
|
'used': {"text":"已使用","color":"#4caf50","value":"used"},
|
||||||
|
'expired': {"text":"已过期","color":"#f44336","value":"expired"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 访客扫码类型
|
||||||
|
export const VisitorScanTypeEnum= {
|
||||||
|
'enter': {"text":"进入","color":"#4caf50","value":"enter"},
|
||||||
|
'exit': {"text":"离开","color":"#f44336","value":"exit"},
|
||||||
|
};
|
||||||
|
|
||||||
// WechatAuthsPlatformEnum
|
// WechatAuthsPlatformEnum
|
||||||
export const WechatAuthsPlatformEnum= {
|
export const WechatAuthsPlatformEnum= {
|
||||||
'MiniProgram': {"text":"微信小程序","color":"#3b82f6","value":"MiniProgram"},
|
'MiniProgram': {"text":"微信小程序","color":"#3b82f6","value":"MiniProgram"},
|
||||||
|
|||||||
@ -8,7 +8,10 @@ import {
|
|||||||
import MyEditor from '@/common/components/Editor';
|
import MyEditor from '@/common/components/Editor';
|
||||||
import { Selects } from '@/components/Select';
|
import { Selects } from '@/components/Select';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
import {
|
||||||
|
MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
@ -67,6 +70,17 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
...rulesHelper.text,
|
...rulesHelper.text,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'object',
|
||||||
|
title: '发布对象',
|
||||||
|
colProps: { span: 8 },
|
||||||
|
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
formItemProps: {
|
||||||
|
labelCol: { span: 12 },
|
||||||
|
wrapperCol: { span: 12 },
|
||||||
|
...rulesHelper.text,
|
||||||
|
},
|
||||||
|
}),
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'publish_type',
|
key: 'publish_type',
|
||||||
title: '发布方式',
|
title: '发布方式',
|
||||||
|
|||||||
@ -7,7 +7,10 @@ import {
|
|||||||
} from '@/common';
|
} from '@/common';
|
||||||
import MyEditor from '@/common/components/Editor';
|
import MyEditor from '@/common/components/Editor';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { MsgPropertyAnnouncementsPublishTypeEnum } from '@/gen/Enums';
|
import {
|
||||||
|
MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
MsgPropertyAnnouncementsPublishTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
@ -55,7 +58,17 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
...rulesHelper.text,
|
...rulesHelper.text,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'object',
|
||||||
|
title: '发布对象',
|
||||||
|
colProps: { span: 8 },
|
||||||
|
valueEnum: MsgPropertyAnnouncementsObjectEnum,
|
||||||
|
formItemProps: {
|
||||||
|
labelCol: { span: 12 },
|
||||||
|
wrapperCol: { span: 12 },
|
||||||
|
...rulesHelper.text,
|
||||||
|
},
|
||||||
|
}),
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'publish_type',
|
key: 'publish_type',
|
||||||
title: '发布方式',
|
title: '发布方式',
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import Audit from './modals/Audit';
|
|||||||
import SerialNumber from './modals/SerialNumber';
|
import SerialNumber from './modals/SerialNumber';
|
||||||
import Show from './modals/Show';
|
import Show from './modals/Show';
|
||||||
|
|
||||||
export default function Index({ title = '收款单' }) {
|
export default function Index({ title = '线下收款单' }) {
|
||||||
const [getParams, setParams] = useState({});
|
const [getParams, setParams] = useState({});
|
||||||
const getCurrentPermissions = useCurrentPermissions();
|
const getCurrentPermissions = useCurrentPermissions();
|
||||||
let toolBarRender = (action: any) => {
|
let toolBarRender = (action: any) => {
|
||||||
|
|||||||
@ -1,9 +1,16 @@
|
|||||||
import { MyColumns, MyPageContainer, MyProTableProps } from '@/common';
|
import {
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
|
import NextOrganizationChange from './modals/NextOrganizationChange';
|
||||||
|
import OrganizationChange from './modals/OrganizationChange';
|
||||||
import OrganizationCreate from './modals/OrganizationCreate';
|
import OrganizationCreate from './modals/OrganizationCreate';
|
||||||
import OrganizationUpdate from './modals/OrganizationUpdate';
|
import OrganizationUpdate from './modals/OrganizationUpdate';
|
||||||
|
|
||||||
@ -60,18 +67,19 @@ export default function Index({ title = '组织管理' }) {
|
|||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<OrganizationUpdate
|
{item?.type !== OrganizationsTypeEnum.Group.value && (
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="组织"
|
|
||||||
/>
|
|
||||||
{/* {item?.type !== OrganizationsTypeEnum.Group.value && (
|
|
||||||
<OrganizationChange
|
<OrganizationChange
|
||||||
item={{ ...item, companies_id: item?.companies_id }}
|
item={{ ...item, companies_id: item?.companies_id }}
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
title="组织"
|
title="组织"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
<OrganizationUpdate
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="组织"
|
||||||
|
/>
|
||||||
|
|
||||||
<NextOrganizationChange
|
<NextOrganizationChange
|
||||||
item={{ ...item, companies_id: item?.companies_id }}
|
item={{ ...item, companies_id: item?.companies_id }}
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
@ -83,7 +91,7 @@ export default function Index({ title = '组织管理' }) {
|
|||||||
() => action?.reload(),
|
() => action?.reload(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/> */}
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title={`添加${props.title}`}
|
title={`添加${props.title}`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
trigger={<MyButtons.Create title={`添加组织`} size="small" />}
|
trigger={<MyButtons.Create title={`组织`} size="small" />}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
form={form}
|
form={form}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
@ -44,6 +44,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '组织类型',
|
title: '组织类型',
|
||||||
|
tooltip: '可根据自身情况自定义设置',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueEnum: OrganizationsTypeEnum,
|
valueEnum: OrganizationsTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@ -16,9 +16,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`${props.title}调整`}
|
title={`${props.title}调整`}
|
||||||
form={form}
|
form={form}
|
||||||
trigger={
|
trigger={<MyButtons.Default title="调整" type="primary" size="small" />}
|
||||||
<MyButtons.Default title="调整上级" type="primary" size="small" />
|
|
||||||
}
|
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
|
|||||||
@ -45,6 +45,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '组织类型',
|
title: '组织类型',
|
||||||
|
tooltip: '可根据自身情况自定义设置',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueEnum: OrganizationsTypeEnum,
|
valueEnum: OrganizationsTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
@ -63,13 +64,14 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
? [
|
? [
|
||||||
Selects?.OrganizationsTree({
|
Selects?.OrganizationsTree({
|
||||||
title: '请设置上级组织',
|
title: '请设置上级组织',
|
||||||
|
tooltip: '非必填,可按需选择',
|
||||||
key: 'parent_id',
|
key: 'parent_id',
|
||||||
params: { companies_id: props?.item?.id },
|
params: { companies_id: props?.item?.id },
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
placeholder: '可搜索或手动选择上级组织',
|
placeholder: '可搜索或手动选择上级组织',
|
||||||
},
|
},
|
||||||
formItemProps: { ...rulesHelper.text },
|
// formItemProps: { ...rulesHelper.text },
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
|
|||||||
@ -43,6 +43,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '类型',
|
title: '类型',
|
||||||
|
tooltip: '可根据自身情况自定义设置',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueEnum: OrganizationsTypeEnum,
|
valueEnum: OrganizationsTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export default function Index({ title = '岗位管理' }) {
|
|||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '岗位备注',
|
title: '岗位说明',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
search: false,
|
search: false,
|
||||||
width: 200,
|
width: 200,
|
||||||
|
|||||||
@ -1,132 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyProTableProps,
|
|
||||||
} from '@/common';
|
|
||||||
import { MyModal } from '@/components/MyModal';
|
|
||||||
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { message, Space } from 'antd';
|
|
||||||
import { useRef, useState } from 'react';
|
|
||||||
|
|
||||||
export default function PositionAdd(props: MyBetaModalFormProps) {
|
|
||||||
// 使用 useState 保存选中的岗位 ID 和行数据,确保跨页选中状态保持
|
|
||||||
const [selectedPositionsIds, setSelectedPositionsIds] = useState<number[]>(
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
|
|
||||||
// 添加 tableRef 用于操作表格
|
|
||||||
const tableRef = useRef<any>();
|
|
||||||
|
|
||||||
const onShowContactPhone = () => {
|
|
||||||
if (selectedPositionsIds.length === 0) {
|
|
||||||
message.warning('请至少选择一个岗位');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 确保 positions_ids 是字符串数组
|
|
||||||
const positionsIds = selectedPositionsIds.map((id) => String(id));
|
|
||||||
|
|
||||||
Apis.Company.CompanyPositions.BatchStore({
|
|
||||||
positions_ids: positionsIds,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
// 成功后重置选中状态
|
|
||||||
setSelectedPositionsIds([]);
|
|
||||||
props.reload?.();
|
|
||||||
message.success('添加成功!');
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error('添加失败:', error);
|
|
||||||
message.error('添加失败: ' + (error.message || '未知错误'));
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyModal
|
|
||||||
title={'岗位库'}
|
|
||||||
type="primary"
|
|
||||||
size="middle"
|
|
||||||
width="600px"
|
|
||||||
node={
|
|
||||||
<ProTable
|
|
||||||
actionRef={tableRef}
|
|
||||||
{...MyProTableProps.props}
|
|
||||||
request={async (params, sort) =>
|
|
||||||
MyProTableProps.request(
|
|
||||||
{
|
|
||||||
...params,
|
|
||||||
is_use: 1,
|
|
||||||
},
|
|
||||||
sort,
|
|
||||||
Apis.Common.Positions.List,
|
|
||||||
undefined,
|
|
||||||
(res) => {
|
|
||||||
// 确保响应数据正确处理
|
|
||||||
console.log('加载岗位数据:', res);
|
|
||||||
return res;
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
// style={{ height: '680px', overflowY: 'auto', overflowX: 'hidden' }}
|
|
||||||
pagination={{
|
|
||||||
showQuickJumper: true,
|
|
||||||
}}
|
|
||||||
rowSelection={{
|
|
||||||
type: 'checkbox',
|
|
||||||
preserveSelectedRowKeys: true, // 启用跨页选择
|
|
||||||
selectedRowKeys: selectedPositionsIds,
|
|
||||||
onChange: (selectedRowKeys) => {
|
|
||||||
// 确保 selectedRowKeys 是数字类型
|
|
||||||
const numericKeys = selectedRowKeys.map((key) =>
|
|
||||||
typeof key === 'string' ? parseInt(key, 10) : key,
|
|
||||||
) as number[];
|
|
||||||
|
|
||||||
// 更新选中状态
|
|
||||||
setSelectedPositionsIds(numericKeys);
|
|
||||||
|
|
||||||
// 合并当前页面选中的行和之前选中的行
|
|
||||||
|
|
||||||
// 设置选中行数据
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
tableAlertOptionRender={({ selectedRowKeys, onCleanSelected }) => {
|
|
||||||
return (
|
|
||||||
<Space>
|
|
||||||
<span>已选 {selectedRowKeys.length} 项</span>
|
|
||||||
<a onClick={onCleanSelected}>清空</a>
|
|
||||||
<MyButtons.Create
|
|
||||||
title="批量添加"
|
|
||||||
type="primary"
|
|
||||||
key="create2"
|
|
||||||
onClick={() => onShowContactPhone()}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
options={false}
|
|
||||||
columns={[
|
|
||||||
MyColumns.ID({
|
|
||||||
search: false,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '岗位名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
width: 300,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '是否启用',
|
|
||||||
dataIndex: 'is_use',
|
|
||||||
search: false,
|
|
||||||
render: (text) => (text ? '是' : '否'),
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -46,7 +46,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
title: '备注',
|
title: '岗位说明',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueType: 'textarea',
|
valueType: 'textarea',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -27,7 +27,6 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.CompanyPositions.Update({
|
Apis.Company.CompanyPositions.Update({
|
||||||
...values,
|
...values,
|
||||||
companies_id: props?.item?.companies_id,
|
|
||||||
id: props.item?.id ?? 0,
|
id: props.item?.id ?? 0,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -58,7 +57,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
title: '备注',
|
title: '岗位说明',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueType: 'textarea',
|
valueType: 'textarea',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,10 +5,15 @@ import {
|
|||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
GoodsReleasesAuditStatusEnum,
|
||||||
|
GoodsReleasesPassedTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space, Tooltip } from 'antd';
|
import { Space, Tooltip } from 'antd';
|
||||||
import Audit from './modals/Audit';
|
import Audit from './modals/Audit';
|
||||||
|
import Show from './modals/Show';
|
||||||
|
|
||||||
export default function Index({ title = '物品放行' }) {
|
export default function Index({ title = '物品放行' }) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@ -47,7 +52,7 @@ export default function Index({ title = '物品放行' }) {
|
|||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '申请状态',
|
title: '申请状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
// valueEnum: GoodsReleasesAuditStatusEnum,
|
valueEnum: GoodsReleasesAuditStatusEnum,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '房屋',
|
title: '房屋',
|
||||||
@ -67,7 +72,7 @@ export default function Index({ title = '物品放行' }) {
|
|||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '通行类型',
|
title: '通行类型',
|
||||||
dataIndex: 'passed_type',
|
dataIndex: 'passed_type',
|
||||||
// valueEnum: GoodsReleasesPassedTypeEnum,
|
valueEnum: GoodsReleasesPassedTypeEnum,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -155,25 +160,16 @@ export default function Index({ title = '物品放行' }) {
|
|||||||
},
|
},
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
{/* {item?.status ===
|
{item?.status ===
|
||||||
GoodsReleasesAuditStatusEnum.Pending.value && (
|
GoodsReleasesAuditStatusEnum.Pending.value && (
|
||||||
<Audit item={item} reload={action?.reload} title={title} />
|
<Audit item={item} reload={action?.reload} title={title} />
|
||||||
)} */}
|
)}
|
||||||
<Audit item={item} reload={action?.reload} title={title} />
|
<Show item={item} reload={action?.reload} title={title} />
|
||||||
<MyButtons.Default
|
|
||||||
key="Create"
|
|
||||||
size="small"
|
|
||||||
type="primary"
|
|
||||||
disabled={item.status !== 'Pending'}
|
|
||||||
onClick={() => {
|
|
||||||
navigate(`/goods_releases/list/pages/review?id=${item.id}`);
|
|
||||||
}}
|
|
||||||
title="查看并审核"
|
|
||||||
/>
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -1,11 +1,17 @@
|
|||||||
import {
|
import {
|
||||||
MyBetaModalFormProps,
|
MyBetaModalFormProps,
|
||||||
MyButtons,
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
|
renderTextHelper,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
GoodsReleasesAuditStatusEnum,
|
||||||
|
GoodsReleasesPassedTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import {
|
import {
|
||||||
BetaSchemaForm,
|
BetaSchemaForm,
|
||||||
ProCard,
|
ProCard,
|
||||||
@ -50,8 +56,8 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
renderFormItem: () => (
|
renderFormItem: () => (
|
||||||
<Space direction="vertical" style={{ width: '100%' }}>
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
<ProCard size="small">
|
<ProCard size="small">
|
||||||
<ProDescriptions bordered size="small" column={1}>
|
<ProDescriptions bordered size="small" column={2}>
|
||||||
<ProDescriptions.Item label="房屋信息">
|
<ProDescriptions.Item label="房屋信息" span={2}>
|
||||||
<a
|
<a
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate(
|
navigate(
|
||||||
@ -59,11 +65,27 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{props?.item?.house?.full_name || '-'}
|
{props?.item?.asset_house?.full_name || '-'}
|
||||||
</a>
|
</a>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="申请人">
|
<ProDescriptions.Item label="申请人">
|
||||||
{props?.item?.customer?.name || '-'}
|
{props?.item?.apply_name || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="联系电话">
|
||||||
|
{props?.item?.apply_phone || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
|
<ProDescriptions.Item label="通行类型">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={GoodsReleasesPassedTypeEnum}
|
||||||
|
value={props?.item?.passed_type}
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="通行日期">
|
||||||
|
{props?.item?.passed_time || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
|
{props?.item?.remark || '-'}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="申请时间">
|
<ProDescriptions.Item label="申请时间">
|
||||||
{props?.item?.created_at || '-'}
|
{props?.item?.created_at || '-'}
|
||||||
@ -111,19 +133,19 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
{
|
{
|
||||||
valueType: 'group',
|
valueType: 'group',
|
||||||
columns: [
|
columns: [
|
||||||
// MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
// key: 'status',
|
key: 'status',
|
||||||
// title: '审核操作',
|
title: '审核操作',
|
||||||
// colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
// valueEnum: () => {
|
valueEnum: () => {
|
||||||
// let obj: any = JSON.parse(
|
let obj: any = JSON.parse(
|
||||||
// JSON.stringify(GoodsReleasesPassedTypeEnum),
|
JSON.stringify(GoodsReleasesAuditStatusEnum),
|
||||||
// );
|
);
|
||||||
// delete obj.Pending;
|
delete obj.Pending;
|
||||||
// return obj;
|
return obj;
|
||||||
// },
|
},
|
||||||
// required: true,
|
required: true,
|
||||||
// }),
|
}),
|
||||||
{
|
{
|
||||||
valueType: 'dependency',
|
valueType: 'dependency',
|
||||||
name: ['status'],
|
name: ['status'],
|
||||||
|
|||||||
@ -1,80 +0,0 @@
|
|||||||
import {
|
|
||||||
MyBetaModalFormProps,
|
|
||||||
MyButtons,
|
|
||||||
MyFormItems,
|
|
||||||
MyModalFormProps,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate } from '@umijs/max';
|
|
||||||
import { Form, message } from 'antd';
|
|
||||||
|
|
||||||
const GoodsReleasesAuditStatusEnum = {
|
|
||||||
Approved: { text: '通过', value: 'Approved' },
|
|
||||||
Rejected: { text: '驳回', value: 'Rejected' },
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function Review(props: MyBetaModalFormProps) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
const navigate = useNavigate();
|
|
||||||
return (
|
|
||||||
<BetaSchemaForm<ApiTypes.GoodsReleases.GoodsReleases.ApproveByEmployee>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
title="审核"
|
|
||||||
trigger={<MyButtons.Default title="审核" size="middle" type="primary" />}
|
|
||||||
wrapperCol={{ span: 24 }}
|
|
||||||
key={new Date().getTime()}
|
|
||||||
width="500px"
|
|
||||||
form={form}
|
|
||||||
onOpenChange={(open: any) => {
|
|
||||||
if (open && props.item) {
|
|
||||||
form.setFieldsValue(props.item);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onFinish={async (values) =>
|
|
||||||
Apis.GoodsReleases.GoodsReleases.ApproveByEmployee({
|
|
||||||
...values,
|
|
||||||
id: props.item?.id ?? 0,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
message.success('审核成功');
|
|
||||||
navigate(-1);
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
.catch(() => false)
|
|
||||||
}
|
|
||||||
columns={[
|
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'status',
|
|
||||||
title: '审核意见',
|
|
||||||
valueEnum: GoodsReleasesAuditStatusEnum,
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
valueType: 'dependency',
|
|
||||||
name: ['status'],
|
|
||||||
columns: ({ status }) => {
|
|
||||||
return status === 'Rejected'
|
|
||||||
? [
|
|
||||||
{
|
|
||||||
title: '驳回理由',
|
|
||||||
valueType: 'textarea',
|
|
||||||
key: 'reason',
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
{
|
|
||||||
title: '审核意见',
|
|
||||||
valueType: 'textarea',
|
|
||||||
key: 'reason',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
138
src/pages/goods_releases/list/modals/Show.tsx
Normal file
138
src/pages/goods_releases/list/modals/Show.tsx
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyModalFormProps,
|
||||||
|
MyProTableProps,
|
||||||
|
renderTextHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
GoodsReleasesAuditStatusEnum,
|
||||||
|
GoodsReleasesPassedTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import {
|
||||||
|
BetaSchemaForm,
|
||||||
|
ProCard,
|
||||||
|
ProDescriptions,
|
||||||
|
ProTable,
|
||||||
|
} from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Form, message, Space } from 'antd';
|
||||||
|
|
||||||
|
export default function Update(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.GoodsReleases.GoodsReleases.ApproveByEmployee>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={props.title}
|
||||||
|
trigger={<MyButtons.Default title="查看" type="primary" />}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="800px"
|
||||||
|
modalProps={{
|
||||||
|
bodyStyle: { maxHeight: '70vh', overflowY: 'auto' },
|
||||||
|
}}
|
||||||
|
key={new Date().getTime()}
|
||||||
|
form={form}
|
||||||
|
onFinish={async (values: any) =>
|
||||||
|
Apis.GoodsReleases.GoodsReleases.ApproveByEmployee({
|
||||||
|
id: props.item?.id ?? 0,
|
||||||
|
...values,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
dataIndex: 'info_display',
|
||||||
|
valueType: 'text',
|
||||||
|
renderFormItem: () => (
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<ProCard size="small">
|
||||||
|
<ProDescriptions bordered size="small" column={2}>
|
||||||
|
<ProDescriptions.Item label="房屋信息" span={2}>
|
||||||
|
<Space>
|
||||||
|
<a
|
||||||
|
onClick={() =>
|
||||||
|
navigate(
|
||||||
|
`/customer/archive/show/${props?.item?.asset_houses_id}`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{props?.item?.asset_house?.full_name || '-'}
|
||||||
|
</a>
|
||||||
|
</Space>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请人">
|
||||||
|
{props?.item?.apply_name || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="联系电话">
|
||||||
|
{props?.item?.apply_phone || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="通行类型">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={GoodsReleasesPassedTypeEnum}
|
||||||
|
value={props?.item?.passed_type}
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="通行日期">
|
||||||
|
{props?.item?.passed_time || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请说明" span={2}>
|
||||||
|
{props?.item?.remark || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="申请时间" span={2}>
|
||||||
|
{props?.item?.created_at || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="审核时间">
|
||||||
|
{props?.item?.audit_time || '-'}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="审核结果">
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={GoodsReleasesAuditStatusEnum}
|
||||||
|
value={props?.item?.status}
|
||||||
|
/>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
|
||||||
|
{props?.item?.goods && props?.item?.goods.length > 0 && (
|
||||||
|
<ProCard size="small" title="物品清单">
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
search={false}
|
||||||
|
toolBarRender={false}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={props?.item?.goods}
|
||||||
|
rowKey={(record, index) => record?.id || index}
|
||||||
|
size="small"
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: '物品名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '数量',
|
||||||
|
dataIndex: 'number',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
dataIndex: 'remark',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</ProCard>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
colProps: { span: 24 },
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@ import {
|
|||||||
} from '@/common';
|
} from '@/common';
|
||||||
import MyModalsHouseSelectList from '@/components/ModalsHouseSelectList';
|
import MyModalsHouseSelectList from '@/components/ModalsHouseSelectList';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { GoodsReleasesPassedTypeEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Form, message, Space } from 'antd';
|
import { Form, message, Space } from 'antd';
|
||||||
@ -99,7 +100,7 @@ export default function Index({ title = '物品放行申请' }) {
|
|||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'passed_type',
|
key: 'passed_type',
|
||||||
title: '通行类型',
|
title: '通行类型',
|
||||||
// valueEnum: GoodsReleasesPassedTypeEnum,
|
valueEnum: GoodsReleasesPassedTypeEnum,
|
||||||
colProps: { span: 6 },
|
colProps: { span: 6 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
}),
|
}),
|
||||||
@ -109,8 +110,14 @@ export default function Index({ title = '物品放行申请' }) {
|
|||||||
valueType: 'date',
|
valueType: 'date',
|
||||||
colProps: { span: 6 },
|
colProps: { span: 6 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
style: { width: '100%' },
|
disabledDate: (current: any) => {
|
||||||
|
// 禁用过去的日期(只允许今天及之后的日期)
|
||||||
|
const today = new Date();
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
return current && current < today;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,164 +0,0 @@
|
|||||||
import {
|
|
||||||
MyFormItems,
|
|
||||||
MyModalFormProps,
|
|
||||||
MyPageContainer,
|
|
||||||
rulesHelper,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
|
||||||
import { useNavigate, useSearchParams } from '@umijs/max';
|
|
||||||
import { Form, Space } from 'antd';
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import Review from '../modals/Review';
|
|
||||||
|
|
||||||
export default function Index({ title = '物品放行审核' }) {
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
const navigate = useNavigate();
|
|
||||||
const [searchParams] = useSearchParams();
|
|
||||||
const id = searchParams.get('id') ?? 0;
|
|
||||||
const [data, setShow] = useState<any>({});
|
|
||||||
|
|
||||||
const loadShow = () => {
|
|
||||||
Apis.GoodsReleases.GoodsReleases.Show({ id: Number(id) }).then((res) => {
|
|
||||||
setShow(res?.data);
|
|
||||||
form.setFieldsValue(res?.data); // 编辑赋值
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
loadShow();
|
|
||||||
}, [id]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MyPageContainer
|
|
||||||
title={
|
|
||||||
<Space
|
|
||||||
style={{ cursor: 'pointer' }}
|
|
||||||
onClick={() => {
|
|
||||||
navigate(-1);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* <LeftCircleOutlined size={34} /> */}
|
|
||||||
{title}
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
enableTabs={false}
|
|
||||||
tabKey="goods_releases_review"
|
|
||||||
tabLabel={title}
|
|
||||||
>
|
|
||||||
<ProCard>
|
|
||||||
<div style={{ width: 900, minHeight: '83vh', margin: '0 auto' }}>
|
|
||||||
<BetaSchemaForm<ApiTypes.GoodsReleases.GoodsReleases.Update>
|
|
||||||
{...MyModalFormProps.props}
|
|
||||||
title={title}
|
|
||||||
// 基础表单
|
|
||||||
layoutType="Form"
|
|
||||||
labelCol={{ span: 24 }}
|
|
||||||
wrapperCol={{ span: 24 }}
|
|
||||||
labelAlign="left"
|
|
||||||
width="900px"
|
|
||||||
form={form}
|
|
||||||
submitter={{
|
|
||||||
render: () => {
|
|
||||||
return [<Review item={data} key="review" />];
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
colProps: { span: 24 },
|
|
||||||
title: '选择房屋',
|
|
||||||
key: 'asset_houses_id',
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
renderFormItem: () => {
|
|
||||||
return (
|
|
||||||
<ProCard bordered>
|
|
||||||
<div>已选择房屋:{data?.asset_house?.full_name}</div>
|
|
||||||
</ProCard>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '申请人',
|
|
||||||
key: 'apply_name',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '申请人电话',
|
|
||||||
key: 'apply_phone',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
fieldProps: {
|
|
||||||
maxLength: 11,
|
|
||||||
},
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'passed_type',
|
|
||||||
title: '装修类型',
|
|
||||||
// valueEnum: GoodsReleasesPassedTypeEnum,
|
|
||||||
colProps: { span: 8 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
valueType: 'formList',
|
|
||||||
dataIndex: 'goods',
|
|
||||||
title: '添加放行物品',
|
|
||||||
formItemProps: { ...rulesHelper.array },
|
|
||||||
fieldProps: {
|
|
||||||
copyIconProps: false,
|
|
||||||
initialValue: [
|
|
||||||
{
|
|
||||||
number: 1,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
creatorRecord: {
|
|
||||||
number: 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
valueType: 'group',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
key: 'name',
|
|
||||||
title: '物品名称',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'number',
|
|
||||||
title: '数量',
|
|
||||||
valueType: 'digit',
|
|
||||||
colProps: { span: 3 },
|
|
||||||
formItemProps: { ...rulesHelper.number },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'remark',
|
|
||||||
title: '物品备注',
|
|
||||||
colProps: { span: 13 },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '放行日期',
|
|
||||||
key: 'passed_time',
|
|
||||||
valueType: 'date',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
formItemProps: { ...rulesHelper.text },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '其他备注',
|
|
||||||
key: 'remark',
|
|
||||||
valueType: 'textarea',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</ProCard>
|
|
||||||
</MyPageContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user