diff --git a/src/gen/ApiTypes.d.ts b/src/gen/ApiTypes.d.ts index d3f6b71..be6afa2 100644 --- a/src/gen/ApiTypes.d.ts +++ b/src/gen/ApiTypes.d.ts @@ -682,6 +682,13 @@ declare namespace ApiTypes { "new_password": string; // 新密码 "re_new_password": string; // 重复新密码 }; + type PreUpload = { + "filename": string; // 文件名称 + "alc": string; // 访问限制 public-read, private + }; + type TemporaryUrl = { + "filename": string; // 文件名称 + }; } namespace ConvenienceServices { type List = { @@ -739,6 +746,10 @@ declare namespace ApiTypes { "remark"?: string; // 备注 "roles_id"?: string[]; // 角色ID数组 }; + type ResetPassword = { + "id": number; // id + "password": string; // 密码[hidden] + }; type Show = { "id": number; // id }; @@ -1616,6 +1627,9 @@ declare namespace ApiTypes { "visited_remark"?: string; // 访问说明 "visited_attachment"?: string[]; // 访问附件 }; + type Closed = { + "id": number; // id + }; type Delete = { "id": number; // id }; diff --git a/src/gen/Apis.ts b/src/gen/Apis.ts index 69ad63b..8f5c1bc 100644 --- a/src/gen/Apis.ts +++ b/src/gen/Apis.ts @@ -318,6 +318,12 @@ export const Apis = { ChangePassword(data: ApiTypes.Common.Auth.ChangePassword): Promise { return request('company/common/auth/change_password', { data }); }, + PreUpload(data: ApiTypes.Common.Auth.PreUpload): Promise { + return request('company/common/auth/pre_upload', { data }); + }, + TemporaryUrl(data: ApiTypes.Common.Auth.TemporaryUrl): Promise { + return request('company/common/auth/temporary_url', { data }); + }, }, ConvenienceServices: { List(data?: ApiTypes.Common.ConvenienceServices.List): Promise { @@ -348,6 +354,9 @@ export const Apis = { Update(data: ApiTypes.Company.CompanyEmployees.Update): Promise { return request('company/company/company_employees/update', { data }); }, + ResetPassword(data: ApiTypes.Company.CompanyEmployees.ResetPassword): Promise { + return request('company/company/company_employees/reset_password', { data }); + }, Show(data: ApiTypes.Company.CompanyEmployees.Show): Promise { return request('company/company/company_employees/show', { data }); }, @@ -900,6 +909,9 @@ export const Apis = { Visited(data: ApiTypes.WorkOrder.HouseWorkOrders.Visited): Promise { return request('company/work_order/house_work_orders/visited', { data }); }, + Closed(data: ApiTypes.WorkOrder.HouseWorkOrders.Closed): Promise { + return request('company/work_order/house_work_orders/closed', { data }); + }, Delete(data: ApiTypes.WorkOrder.HouseWorkOrders.Delete): Promise { return request('company/work_order/house_work_orders/delete', { data }); }, diff --git a/src/gen/Enums.ts b/src/gen/Enums.ts index 6c240c6..844c78c 100644 --- a/src/gen/Enums.ts +++ b/src/gen/Enums.ts @@ -1,1728 +1,762 @@ // ActivitiesPublishStatusEnum -export const ActivitiesPublishStatusEnum = { - Unpublished: { text: '未发布', color: '#9e9e9e', value: 'Unpublished' }, - Published: { text: '已发布', color: '#00c853', value: 'Published' }, - Unlisted: { text: '已下架', color: '#d32f2f', value: 'Unlisted' }, +export const ActivitiesPublishStatusEnum= { + 'Unpublished': {"text":"未发布","color":"#9e9e9e","value":"Unpublished"}, + 'Published': {"text":"已发布","color":"#00c853","value":"Published"}, + 'Unlisted': {"text":"已下架","color":"#d32f2f","value":"Unlisted"}, }; // ActivitiesPublishTypeEnum -export const ActivitiesPublishTypeEnum = { - Manual: { text: '手动', color: '#4caf50', value: 'Manual' }, - Schedule: { text: '定时', color: '#2196f3', value: 'Schedule' }, +export const ActivitiesPublishTypeEnum= { + 'Manual': {"text":"手动","color":"#4caf50","value":"Manual"}, + 'Schedule': {"text":"定时","color":"#2196f3","value":"Schedule"}, }; // ActivitiesStatusEnum -export const ActivitiesStatusEnum = { - NotStarted: { text: '未开始', color: '#9e9e9e', value: 'NotStarted' }, - InProgress: { text: '进行中', color: '#00c853', value: 'InProgress' }, - Finished: { text: '已结束', color: '#d32f2f', value: 'Finished' }, +export const ActivitiesStatusEnum= { + 'NotStarted': {"text":"未开始","color":"#9e9e9e","value":"NotStarted"}, + 'InProgress': {"text":"进行中","color":"#00c853","value":"InProgress"}, + 'Finished': {"text":"已结束","color":"#d32f2f","value":"Finished"}, }; // ActivityEnrollsStatusEnum -export const ActivityEnrollsStatusEnum = { - PendingReview: { text: '待审核', color: '#2196f3', value: 'PendingReview' }, - Success: { text: '成功', color: '#00c853', value: 'Success' }, - Failed: { text: '失败', color: '#d32f2f', value: 'Failed' }, - Cancelled: { text: '取消', color: '#ff9800', value: 'Cancelled' }, +export const ActivityEnrollsStatusEnum= { + 'PendingReview': {"text":"待审核","color":"#2196f3","value":"PendingReview"}, + 'Success': {"text":"成功","color":"#00c853","value":"Success"}, + 'Failed': {"text":"失败","color":"#d32f2f","value":"Failed"}, + 'Cancelled': {"text":"取消","color":"#ff9800","value":"Cancelled"}, }; -// ApprovalInstancesStatusEnum -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 AssetCarPortsPropertyTypeEnum= { + 'Ownership': {"text":"产权车位","color":"#1e90ff","value":"Ownership"}, + 'CivilDefense': {"text":"人防车位","color":"#32cd32","value":"CivilDefense"}, + 'Public': {"text":"公共车位","color":"#ff8c00","value":"Public"}, + 'Temporary': {"text":"临时车位","color":"#ba55d3","value":"Temporary"}, + 'Other': {"text":"其他","color":"#a9a9a9","value":"Other"}, }; -// ApprovalRecordsStatusEnum -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 AssetCarPortsStatusEnum= { + 'Unsold': {"text":"未售","color":"#6b7280","value":"Unsold"}, + 'Sold': {"text":"已售","color":"#10b981","value":"Sold"}, + 'Rented': {"text":"已租","color":"#3b82f6","value":"Rented"}, + 'Unrented': {"text":"未租","color":"#f59e0b","value":"Unrented"}, + 'Other': {"text":"其他","color":"#9ca3af","value":"Other"}, }; -// ApprovalTemplateNodesApproveTypeEnum -export const ApprovalTemplateNodesApproveTypeEnum = { - And: { text: '会签', color: '#4caf50', value: 'And' }, - Or: { text: '或签', color: '#ff9800', value: 'Or' }, -}; - -// ApprovalTemplateNodesNodeTypeEnum -export const ApprovalTemplateNodesNodeTypeEnum = { - Approver: { text: '审批人', color: '#2196f3', value: 'Approver' }, - CC: { text: '抄送人', color: '#9e9e9e', value: 'CC' }, -}; - -// ApprovalTemplatesTypeEnum -export const ApprovalTemplatesTypeEnum = { - Contract: { text: '合同', color: '#2196f3', value: 'Contract' }, - Finance: { text: '财务', color: '#4caf50', value: 'Finance' }, - Refund: { text: '退款', color: '#f44336', value: 'Refund' }, -}; - -// AssetCarPortsPropertyTypeEnum -export const AssetCarPortsPropertyTypeEnum = { - Ownership: { text: '产权车位', color: '#1e90ff', value: 'Ownership' }, - CivilDefense: { text: '人防车位', color: '#32cd32', value: 'CivilDefense' }, - Public: { text: '公共车位', color: '#ff8c00', value: 'Public' }, - Temporary: { text: '临时车位', color: '#ba55d3', value: 'Temporary' }, - Other: { text: '其他', color: '#a9a9a9', value: 'Other' }, -}; - -// AssetCarPortsStatusEnum -export const AssetCarPortsStatusEnum = { - Unsold: { text: '未售', color: '#6b7280', value: 'Unsold' }, - Sold: { text: '已售', color: '#10b981', value: 'Sold' }, - Rented: { text: '已租', color: '#3b82f6', value: 'Rented' }, - Unrented: { text: '未租', color: '#f59e0b', value: 'Unrented' }, - Other: { text: '其他', color: '#9ca3af', value: 'Other' }, -}; - -// AssetCarPortsTypeEnum -export const AssetCarPortsTypeEnum = { - Standard: { text: '标准车位', color: '#1e90ff', value: 'Standard' }, - Mini: { text: '微型车位', color: '#32cd32', value: 'Mini' }, - Accessible: { text: '无障碍车位', color: '#ff8c00', value: 'Accessible' }, - Tandem: { text: '子母车位', color: '#ba55d3', value: 'Tandem' }, - Mechanical: { text: '机械车位', color: '#20b2aa', value: 'Mechanical' }, - Other: { text: '其他', color: '#a9a9a9', value: 'Other' }, +// 车位类型 +export const AssetCarPortsTypeEnum= { + 'Standard': {"text":"标准车位","color":"#1e90ff","value":"Standard"}, + 'Mini': {"text":"微型车位","color":"#32cd32","value":"Mini"}, + 'Accessible': {"text":"无障碍车位","color":"#ff8c00","value":"Accessible"}, + 'Tandem': {"text":"子母车位","color":"#ba55d3","value":"Tandem"}, + 'Mechanical': {"text":"机械车位","color":"#20b2aa","value":"Mechanical"}, + 'Other': {"text":"其他","color":"#a9a9a9","value":"Other"}, }; // AssetHousesOrientationEnum -export const AssetHousesOrientationEnum = { - East: { text: '东', color: '#007bff', value: 'East' }, - South: { text: '南', color: '#28a745', value: 'South' }, - West: { text: '西', color: '#ffc107', value: 'West' }, - North: { text: '北', color: '#dc3545', value: 'North' }, - Southeast: { text: '东南', color: '#20c997', value: 'Southeast' }, - Northeast: { text: '东北', color: '#6f42c1', value: 'Northeast' }, - Southwest: { text: '西南', color: '#fd7e14', value: 'Southwest' }, - Northwest: { text: '西北', color: '#17a2b8', value: 'Northwest' }, - EastWest: { text: '东西', color: '#6610f2', value: 'EastWest' }, - SouthNorth: { text: '南北', color: '#e83e8c', value: 'SouthNorth' }, +export const AssetHousesOrientationEnum= { + 'East': {"text":"东","color":"#007bff","value":"East"}, + 'South': {"text":"南","color":"#28a745","value":"South"}, + 'West': {"text":"西","color":"#ffc107","value":"West"}, + 'North': {"text":"北","color":"#dc3545","value":"North"}, + 'Southeast': {"text":"东南","color":"#20c997","value":"Southeast"}, + 'Northeast': {"text":"东北","color":"#6f42c1","value":"Northeast"}, + 'Southwest': {"text":"西南","color":"#fd7e14","value":"Southwest"}, + 'Northwest': {"text":"西北","color":"#17a2b8","value":"Northwest"}, + 'EastWest': {"text":"东西","color":"#6610f2","value":"EastWest"}, + 'SouthNorth': {"text":"南北","color":"#e83e8c","value":"SouthNorth"}, }; // AssetHousesOwnershipTypeEnum -export const AssetHousesOwnershipTypeEnum = { - CommodityHousing: { - text: '商品房', - color: '#007bff', - value: 'CommodityHousing', - }, - FundedHousing: { text: '集资房', color: '#28a745', value: 'FundedHousing' }, - MilitaryHousing: { - text: '军产房', - color: '#17a2b8', - value: 'MilitaryHousing', - }, - AffordableHousing: { - text: '保障房', - color: '#ffc107', - value: 'AffordableHousing', - }, - RuralHousing: { text: '农民房', color: '#6f42c1', value: 'RuralHousing' }, - CommercialOffice: { - text: '商业写字楼', - color: '#fd7e14', - value: 'CommercialOffice', - }, - CommercialComplex: { - text: '商业综合体', - color: '#dc3545', - value: 'CommercialComplex', - }, - ResettlementHousing: { - text: '回迁房', - color: '#20c997', - value: 'ResettlementHousing', - }, +export const AssetHousesOwnershipTypeEnum= { + 'CommodityHousing': {"text":"商品房","color":"#007bff","value":"CommodityHousing"}, + 'FundedHousing': {"text":"集资房","color":"#28a745","value":"FundedHousing"}, + 'MilitaryHousing': {"text":"军产房","color":"#17a2b8","value":"MilitaryHousing"}, + 'AffordableHousing': {"text":"保障房","color":"#ffc107","value":"AffordableHousing"}, + 'RuralHousing': {"text":"农民房","color":"#6f42c1","value":"RuralHousing"}, + 'CommercialOffice': {"text":"商业写字楼","color":"#fd7e14","value":"CommercialOffice"}, + 'CommercialComplex': {"text":"商业综合体","color":"#dc3545","value":"CommercialComplex"}, + 'ResettlementHousing': {"text":"回迁房","color":"#20c997","value":"ResettlementHousing"}, }; // AssetHousesPropertyOwnershipEnum -export const AssetHousesPropertyOwnershipEnum = { - Individual: { text: '个人', color: '#2db7f5', value: 'Individual' }, - Enterprise: { text: '企业', color: '#87d068', value: 'Enterprise' }, - Developer: { text: '开发商', color: '#fa8c16', value: 'Developer' }, - Government: { text: '政府', color: '#f5222d', value: 'Government' }, +export const AssetHousesPropertyOwnershipEnum= { + 'Individual': {"text":"个人","color":"#2db7f5","value":"Individual"}, + 'Enterprise': {"text":"企业","color":"#87d068","value":"Enterprise"}, + 'Developer': {"text":"开发商","color":"#fa8c16","value":"Developer"}, + 'Government': {"text":"政府","color":"#f5222d","value":"Government"}, }; // AssetHousesStatusEnum -export const AssetHousesStatusEnum = { - Unsold: { text: '未售', color: '#6c757d', value: 'Unsold' }, - SoldNotDelivered: { - text: '已售未交房', - color: '#ffc107', - value: 'SoldNotDelivered', - }, - SelfOccupied: { text: '自住', color: '#28a745', value: 'SelfOccupied' }, - Rented: { text: '出租', color: '#007bff', value: 'Rented' }, - Vacant: { text: '空置', color: '#dc3545', value: 'Vacant' }, +export const AssetHousesStatusEnum= { + 'Unsold': {"text":"未售","color":"#6c757d","value":"Unsold"}, + 'SoldNotDelivered': {"text":"已售未交房","color":"#ffc107","value":"SoldNotDelivered"}, + 'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"}, + 'Rented': {"text":"出租","color":"#007bff","value":"Rented"}, + 'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"}, }; // AssetHousesUsageEnum -export const AssetHousesUsageEnum = { - Residence: { text: '住宅', color: '#007bff', value: 'Residence' }, - Apartment: { text: '公寓', color: '#28a745', value: 'Apartment' }, - Villa: { text: '别墅', color: '#17a2b8', value: 'Villa' }, - Shop: { text: '商铺', color: '#ffc107', value: 'Shop' }, - ParkingSpace: { text: '车位', color: '#6c757d', value: 'ParkingSpace' }, - Office: { text: '写字楼', color: '#6610f2', value: 'Office' }, - Clubhouse: { text: '会所', color: '#fd7e14', value: 'Clubhouse' }, - PropertyRoom: { text: '物业用房', color: '#dc3545', value: 'PropertyRoom' }, - CommercialProperty: { - text: '商业用房', - color: '#20c997', - value: 'CommercialProperty', - }, +export const AssetHousesUsageEnum= { + 'Residence': {"text":"住宅","color":"#007bff","value":"Residence"}, + 'Apartment': {"text":"公寓","color":"#28a745","value":"Apartment"}, + 'Villa': {"text":"别墅","color":"#17a2b8","value":"Villa"}, + 'Shop': {"text":"商铺","color":"#ffc107","value":"Shop"}, + 'ParkingSpace': {"text":"车位","color":"#6c757d","value":"ParkingSpace"}, + 'Office': {"text":"写字楼","color":"#6610f2","value":"Office"}, + 'Clubhouse': {"text":"会所","color":"#fd7e14","value":"Clubhouse"}, + 'PropertyRoom': {"text":"物业用房","color":"#dc3545","value":"PropertyRoom"}, }; -// AssetItemDisposalConfirmStatusEnum -export const AssetItemDisposalConfirmStatusEnum = { - Pending: { text: '待审批', color: '#ff9800', value: 'Pending' }, - Approved: { text: '已通过', color: '#4caf50', value: 'Approved' }, - Rejected: { text: '已驳回', color: '#f44336', value: 'Rejected' }, +// 车场收费类型 +export const AssetParkingPlacesChargeTypeEnum= { + 'Free': {"text":"免费","color":"#32cd32","value":"Free"}, + 'TemporaryCharge': {"text":"临停收费","color":"#1e90ff","value":"TemporaryCharge"}, + 'MonthlyCharge': {"text":"月卡收费","color":"#ff8c00","value":"MonthlyCharge"}, + 'MixedCharge': {"text":"混合收费","color":"#ba55d3","value":"MixedCharge"}, }; -// AssetItemDisposalResultEnum -export const AssetItemDisposalResultEnum = { - Disposing: { text: '处置中', color: '#ff9800', value: 'Disposing' }, - Disposed: { text: '已处置', color: '#4caf50', value: 'Disposed' }, +// 车场位置类型 +export const AssetParkingPlacesLocationTypeEnum= { + 'GroundParking': {"text":"地面车场","color":"#ffa500","value":"GroundParking"}, + 'UndergroundParking': {"text":"地下车场","color":"#4682b4","value":"UndergroundParking"}, }; -// AssetItemInventoryDetailResultEnum -export const AssetItemInventoryDetailResultEnum = { - Normal: { text: '正常', color: '#4caf50', value: 'Normal' }, - Loss: { text: '盘亏', color: '#f44336', value: 'Loss' }, +// 车场产权类型 +export const AssetParkingPlacesPropertyTypeEnum= { + 'DispersedOwnership': {"text":"分散产权","color":"#ff7f50","value":"DispersedOwnership"}, + 'SingleOwnership': {"text":"单一产权","color":"#1e90ff","value":"SingleOwnership"}, + 'SharedOwnership': {"text":"共有产权","color":"#32cd32","value":"SharedOwnership"}, }; -// AssetItemInventoryResultEnum -export const AssetItemInventoryResultEnum = { - Normal: { text: '正常', color: '#4caf50', value: 'Normal' }, - Loss: { text: '盘亏', color: '#f44336', value: 'Loss' }, - Surplus: { text: '盘盈', color: '#2196f3', value: 'Surplus' }, -}; - -// AssetItemInventoryStatusEnum -export const AssetItemInventoryStatusEnum = { - Pending: { text: '待处理', color: '#ff9800', value: 'Pending' }, - Processing: { text: '处理中', color: '#2196f3', value: 'Processing' }, - Completed: { text: '已完成', color: '#4caf50', value: 'Completed' }, - Closed: { text: '已关闭', color: '#607d8b', value: 'Closed' }, -}; - -// AssetItemMaintenanceRuleStatusEnum -export const AssetItemMaintenanceRuleStatusEnum = { - Enabled: { text: '启用', color: '#4caf50', value: 'Enabled' }, - Disabled: { text: '禁用', color: '#f44336', value: 'Disabled' }, -}; - -// AssetItemMaintenanceSourceEnum -export const AssetItemMaintenanceSourceEnum = { - Auto: { text: '自动生成', color: '#2196f3', value: 'Auto' }, - Manual: { text: '手动创建', color: '#ff9800', value: 'Manual' }, -}; - -// AssetItemMaintenanceStatusEnum -export const AssetItemMaintenanceStatusEnum = { - Pending: { text: '待处理', color: '#ff9800', value: 'Pending' }, - Assigned: { text: '待开始', color: '#2196f3', value: 'Assigned' }, - Processing: { text: '处理中', color: '#9c27b0', value: 'Processing' }, - Completed: { text: '已完成', color: '#4caf50', value: 'Completed' }, - Closed: { text: '已关闭', color: '#607d8b', value: 'Closed' }, -}; - -// AssetItemMaintenanceTypeEnum -export const AssetItemMaintenanceTypeEnum = { - Maintenance: { text: '维保', color: '#4caf50', value: 'Maintenance' }, - Repair: { text: '维修', color: '#f44336', value: 'Repair' }, -}; - -// AssetItemMarkingConfirmStatusEnum -export const AssetItemMarkingConfirmStatusEnum = { - Pending: { text: '待审批', color: '#ff9800', value: 'Pending' }, - Approved: { text: '已通过', color: '#4caf50', value: 'Approved' }, - Rejected: { text: '已驳回', color: '#f44336', value: 'Rejected' }, -}; - -// AssetItemMarkingTypeEnum -export const AssetItemMarkingTypeEnum = { - Damaged: { text: '损毁', color: '#f44336', value: 'Damaged' }, - Lost: { text: '丢失', color: '#9c27b0', value: 'Lost' }, -}; - -// AssetItemReceiveConfirmStatusEnum -export const AssetItemReceiveConfirmStatusEnum = { - Pending: { text: '待确认', color: '#ff9800', value: 'Pending' }, - Approved: { text: '已确认', color: '#4caf50', value: 'Approved' }, - Rejected: { text: '已拒绝', color: '#f44336', value: 'Rejected' }, -}; - -// AssetItemReturnConfirmStatusEnum -export const AssetItemReturnConfirmStatusEnum = { - Pending: { text: '待确认', color: '#ff9800', value: 'Pending' }, - Approved: { text: '已确认', color: '#4caf50', value: 'Approved' }, - Rejected: { text: '已拒绝', color: '#f44336', value: 'Rejected' }, -}; - -// AssetItemTransferConfirmStatusEnum -export const AssetItemTransferConfirmStatusEnum = { - Pending: { text: '待审批', color: '#ff9800', value: 'Pending' }, - Approved: { text: '已通过', color: '#4caf50', value: 'Approved' }, - Rejected: { text: '已驳回', color: '#f44336', value: 'Rejected' }, -}; - -// AssetItemsEntryTypeEnum -export const AssetItemsEntryTypeEnum = { - Purchase: { text: '采购入库', color: '#2196f3', value: 'Purchase' }, - Inventory: { text: '盘盈入库', color: '#4caf50', value: 'Inventory' }, - Donation: { text: '捐赠入库', color: '#9c27b0', value: 'Donation' }, - Transfer: { text: '调拨入库', color: '#ff9800', value: 'Transfer' }, -}; - -// AssetItemsManageStatusEnum -export const AssetItemsManageStatusEnum = { - Idle: { text: '闲置', color: '#9e9e9e', value: 'Idle' }, - Storing: { text: '入库中', color: '#2196f3', value: 'Storing' }, - Transferring: { text: '调拨中', color: '#ff9800', value: 'Transferring' }, - StockLoss: { text: '盘亏', color: '#f44336', value: 'StockLoss' }, - Disposing: { text: '处置中', color: '#9c27b0', value: 'Disposing' }, - Disposed: { text: '已处置', color: '#607d8b', value: 'Disposed' }, - Checking: { text: '盘点中', color: '#00bcd4', value: 'Checking' }, - Maintaining: { text: '维护中', color: '#673ab7', value: 'Maintaining' }, - Receiving: { text: '领用中', color: '#4caf50', value: 'Receiving' }, - Received: { text: '已领用', color: '#8bc34a', value: 'Received' }, -}; - -// AssetItemsStatusEnum -export const AssetItemsStatusEnum = { - Good: { text: '良好', color: '#4caf50', value: 'Good' }, - WaitRepair: { text: '待维修', color: '#ff9800', value: 'WaitRepair' }, - Repairing: { text: '维修中', color: '#2196f3', value: 'Repairing' }, - WaitMaintain: { text: '待保养', color: '#9c27b0', value: 'WaitMaintain' }, - Maintaining: { text: '保养中', color: '#673ab7', value: 'Maintaining' }, - Damaged: { text: '损毁', color: '#f44336', value: 'Damaged' }, - Lost: { text: '丢失', color: '#607d8b', value: 'Lost' }, -}; - -// AssetParkingPlacesChargeTypeEnum -export const AssetParkingPlacesChargeTypeEnum = { - Free: { text: '免费', color: '#32cd32', value: 'Free' }, - TemporaryCharge: { - text: '临停收费', - color: '#1e90ff', - value: 'TemporaryCharge', - }, - MonthlyCharge: { text: '月卡收费', color: '#ff8c00', value: 'MonthlyCharge' }, - MixedCharge: { text: '混合收费', color: '#ba55d3', value: 'MixedCharge' }, -}; - -// AssetParkingPlacesLocationTypeEnum -export const AssetParkingPlacesLocationTypeEnum = { - GroundParking: { text: '地面车场', color: '#ffa500', value: 'GroundParking' }, - UndergroundParking: { - text: '地下车场', - color: '#4682b4', - value: 'UndergroundParking', - }, -}; - -// AssetParkingPlacesPropertyTypeEnum -export const AssetParkingPlacesPropertyTypeEnum = { - DispersedOwnership: { - text: '分散产权', - color: '#ff7f50', - value: 'DispersedOwnership', - }, - SingleOwnership: { - text: '单一产权', - color: '#1e90ff', - value: 'SingleOwnership', - }, - SharedOwnership: { - text: '共有产权', - color: '#32cd32', - value: 'SharedOwnership', - }, -}; - -// AssetParkingPlacesTypeEnum -export const AssetParkingPlacesTypeEnum = { - ResidentialSupporting: { - text: '住宅配套车场', - color: '#ff8c00', - value: 'ResidentialSupporting', - }, - Commercial: { text: '商业车场', color: '#1e90ff', value: 'Commercial' }, - Mixed: { text: '混合车场', color: '#32cd32', value: 'Mixed' }, +// 车场类型 +export const AssetParkingPlacesTypeEnum= { + 'ResidentialSupporting': {"text":"住宅配套车场","color":"#ff8c00","value":"ResidentialSupporting"}, + 'Commercial': {"text":"商业车场","color":"#1e90ff","value":"Commercial"}, + 'Mixed': {"text":"混合车场","color":"#32cd32","value":"Mixed"}, }; // AssetProjectsChargeEnum -export const AssetProjectsChargeEnum = { - Contract: { text: '包干制', color: '#007bff', value: 'Contract' }, - Commission: { text: '酬金制', color: '#28a745', value: 'Commission' }, +export const AssetProjectsChargeEnum= { + 'Contract': {"text":"包干制","color":"#007bff","value":"Contract"}, + 'Commission': {"text":"酬金制","color":"#28a745","value":"Commission"}, }; // AssetProjectsEntrustTypeEnum -export const AssetProjectsEntrustTypeEnum = { - DeveloperJointEntrust: { - text: '开发商全委', - color: '#007bff', - value: 'DeveloperJointEntrust', - }, - OwnersFullEntrust: { - text: '业委会全委', - color: '#28a745', - value: 'OwnersFullEntrust', - }, - GovernmentFullEntrust: { - text: '政府类全委', - color: '#ffc107', - value: 'GovernmentFullEntrust', - }, +export const AssetProjectsEntrustTypeEnum= { + 'DeveloperJointEntrust': {"text":"开发商全委","color":"#007bff","value":"DeveloperJointEntrust"}, + 'OwnersFullEntrust': {"text":"业委会全委","color":"#28a745","value":"OwnersFullEntrust"}, + 'GovernmentFullEntrust': {"text":"政府类全委","color":"#ffc107","value":"GovernmentFullEntrust"}, }; // 业权类型 -export const AssetProjectsOwnershipTypeEnum = { - SingleOwnership: { - text: '单业权', - color: '#00cc66', - value: 'SingleOwnership', - }, - MultipleOwnership: { - text: '多业权', - color: '#0099ff', - value: 'MultipleOwnership', - }, +export const AssetProjectsOwnershipTypeEnum= { + 'SingleOwnership': {"text":"单业权","color":"#00cc66","value":"SingleOwnership"}, + 'MultipleOwnership': {"text":"多业权","color":"#0099ff","value":"MultipleOwnership"}, }; // AssetProjectsPropertyTypeEnum -export const AssetProjectsPropertyTypeEnum = { - Residence: { text: '住宅', color: '#ff0000', value: 'Residence' }, - Commercial: { text: '商业', color: '#ff6600', value: 'Commercial' }, - Office: { text: '写字楼', color: '#ffcc00', value: 'Office' }, - IndustrialPark: { text: '产业园', color: '#00cc66', value: 'IndustrialPark' }, - Complex: { text: '综合体', color: '#0099ff', value: 'Complex' }, - Municipal: { text: '市政设施', color: '#6633cc', value: 'Municipal' }, - Venue: { text: '场馆', color: '#9966ff', value: 'Venue' }, - Education: { text: '教育', color: '#339999', value: 'Education' }, - Medical: { text: '医疗', color: '#cc3366', value: 'Medical' }, +export const AssetProjectsPropertyTypeEnum= { + 'Residence': {"text":"住宅","color":"#ff0000","value":"Residence"}, + 'Commercial': {"text":"商业","color":"#ff6600","value":"Commercial"}, + 'Office': {"text":"办公","color":"#ffcc00","value":"Office"}, + 'IndustrialPark': {"text":"产业园","color":"#00cc66","value":"IndustrialPark"}, + 'Complex': {"text":"综合体","color":"#0099ff","value":"Complex"}, + 'Municipal': {"text":"市政设施","color":"#6633cc","value":"Municipal"}, + 'Venue': {"text":"场馆","color":"#9966ff","value":"Venue"}, + 'Education': {"text":"教育","color":"#339999","value":"Education"}, + 'Medical': {"text":"医疗","color":"#cc3366","value":"Medical"}, }; // AssetProjectsStatusEnum -export const AssetProjectsStatusEnum = { - SignedNotDelivered: { - text: '签约未交付', - color: '#6c757d', - value: 'SignedNotDelivered', - }, - RollingDevelopment: { - text: '滚动开发', - color: '#007bff', - value: 'RollingDevelopment', - }, - ManagedAndClosed: { - text: '在管封园', - color: '#ffc107', - value: 'ManagedAndClosed', - }, - Exited: { text: '退出', color: '#dc3545', value: 'Exited' }, +export const AssetProjectsStatusEnum= { + 'SignedNotDelivered': {"text":"签约未交付","color":"#6c757d","value":"SignedNotDelivered"}, + 'RollingDevelopment': {"text":"滚动开发","color":"#007bff","value":"RollingDevelopment"}, + 'ManagedAndClosed': {"text":"在管封园","color":"#ffc107","value":"ManagedAndClosed"}, + 'Exited': {"text":"退出","color":"#dc3545","value":"Exited"}, }; // AssetUnitsBuildingStructureEnum -export const AssetUnitsBuildingStructureEnum = { - SteelConcrete: { text: '钢混', color: '#007bff', value: 'SteelConcrete' }, - SteelStructure: { text: '钢结构', color: '#28a745', value: 'SteelStructure' }, - BrickConcrete: { text: '砖混', color: '#ffc107', value: 'BrickConcrete' }, - BrickWood: { text: '砖木', color: '#dc3545', value: 'BrickWood' }, +export const AssetUnitsBuildingStructureEnum= { + 'SteelConcrete': {"text":"钢混","color":"#007bff","value":"SteelConcrete"}, + 'SteelStructure': {"text":"钢结构","color":"#28a745","value":"SteelStructure"}, + 'BrickConcrete': {"text":"砖混","color":"#ffc107","value":"BrickConcrete"}, + 'BrickWood': {"text":"砖木","color":"#dc3545","value":"BrickWood"}, }; // AssetUnitsBuildingTypeEnum -export const AssetUnitsBuildingTypeEnum = { - SlabAndTower: { text: '板塔结合', color: '#007bff', value: 'SlabAndTower' }, - Slab: { text: '板楼', color: '#28a745', value: 'Slab' }, - Tower: { text: '塔楼', color: '#ffc107', value: 'Tower' }, -}; - -// AttendanceRecordsCheckinTypeEnum -export const AttendanceRecordsCheckinTypeEnum = { - CheckIn: { text: '上班', color: '#1890ff', value: 'CheckIn' }, - CheckOut: { text: '下班', color: '#52c41a', value: 'CheckOut' }, -}; - -// AttendanceRecordsStatusEnum -export const AttendanceRecordsStatusEnum = { - Normal: { text: '正常', color: '#52c41a', value: 'Normal' }, - Late: { text: '迟到', color: '#faad14', value: 'Late' }, - EarlyLeave: { text: '早退', color: '#fa8c16', value: 'EarlyLeave' }, - OutOfRange: { text: '范围外', color: '#ff4d4f', value: 'OutOfRange' }, - Reissue: { text: '补卡', color: '#1890ff', value: 'Reissue' }, -}; - -// AttendanceSchedulesStatusEnum -export const AttendanceSchedulesStatusEnum = { - Pending: { text: '待生效', color: '#faad14', value: 'Pending' }, - Active: { text: '生效中', color: '#52c41a', value: 'Active' }, - Cancelled: { text: '已取消', color: '#ff4d4f', value: 'Cancelled' }, -}; - -// 打卡状态枚举 -export const AttendanceStatusEnum = { - Normal: { text: '正常', color: '#52c41a', value: 'Normal' }, - Late: { text: '迟到', color: '#faad14', value: 'Late' }, - Early: { text: '早退', color: '#faad14', value: 'Early' }, - OutOfRange: { text: '范围外', color: '#ff4d4f', value: 'OutOfRange' }, - MakeUp: { text: '补卡', color: '#722ed1', value: 'MakeUp' }, +export const AssetUnitsBuildingTypeEnum= { + 'SlabAndTower': {"text":"板塔结合","color":"#007bff","value":"SlabAndTower"}, + 'Slab': {"text":"板楼","color":"#28a745","value":"Slab"}, + 'Tower': {"text":"塔楼","color":"#ffc107","value":"Tower"}, }; // BannerSpacesTypeEnum -export const BannerSpacesTypeEnum = { - Popup: { text: '弹窗', color: '#ff0000', value: 'Popup' }, - Banner: { text: '横幅广告', color: '#00ff00', value: 'Banner' }, - FloatingButton: { - text: '悬浮按钮', - color: '#0000ff', - value: 'FloatingButton', - }, +export const BannerSpacesTypeEnum= { + 'Popup': {"text":"弹窗","color":"#ff0000","value":"Popup"}, + 'Banner': {"text":"横幅广告","color":"#00ff00","value":"Banner"}, + 'FloatingButton': {"text":"悬浮按钮","color":"#0000ff","value":"FloatingButton"}, }; // BannersRedirectTypeEnum -export const BannersRedirectTypeEnum = { - InnerPage: { text: '跳内页', color: '#ff0000', value: 'InnerPage' }, - H5: { text: '跳H5', color: '#00ff00', value: 'H5' }, - MiniProgramHome: { - text: '跳小程序首屏', - color: '#0000ff', - value: 'MiniProgramHome', - }, - AnotherMiniProgram: { - text: '跳另一个小程序', - color: '#ffa500', - value: 'AnotherMiniProgram', - }, +export const BannersRedirectTypeEnum= { + 'InnerPage': {"text":"跳内页","color":"#ff0000","value":"InnerPage"}, + 'H5': {"text":"跳H5","color":"#00ff00","value":"H5"}, + 'MiniProgramHome': {"text":"跳小程序首屏","color":"#0000ff","value":"MiniProgramHome"}, + 'AnotherMiniProgram': {"text":"跳另一个小程序","color":"#ffa500","value":"AnotherMiniProgram"}, }; // BannersTypeEnum -export const BannersTypeEnum = { - Image: { text: '图片', color: '#ff0000', value: 'Image' }, - Video: { text: '视频', color: '#00ff00', value: 'Video' }, - Text: { text: '文本', color: '#0000ff', value: 'Text' }, -}; - -// BillPaymentsStatusEnum -export const BillPaymentsStatusEnum = { - Pending: { text: '待审', color: '#faad14', value: 'Pending' }, - Approved: { text: '已审', color: '#52c41a', value: 'Approved' }, - Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' }, -}; - -// BillPaymentsTypeEnum -export const BillPaymentsTypeEnum = { - DoorCard: { text: '门卡', color: '#2196f3', value: 'DoorCard' }, - ResourceOrder: { text: '资源订单', color: '#4caf50', value: 'ResourceOrder' }, - EmergencyEvent: { - text: '突发事件', - color: '#ef4444', - value: 'EmergencyEvent', - }, - RenovationDeposit: { - text: '装修押金', - color: '#f59e0b', - value: 'RenovationDeposit', - }, -}; - -// BillsFlowTypeEnum -export const BillsFlowTypeEnum = { - Income: { text: '收入', color: '#10b981', value: 'Income' }, - Expense: { text: '支出', color: '#ef4444', value: 'Expense' }, -}; - -// BillsRefundStatusEnum -export const BillsRefundStatusEnum = { - Requested: { text: '已申请', color: '#2196f3', value: 'Requested' }, - Reviewing: { text: '审核中', color: '#ff9800', value: 'Reviewing' }, - Rejected: { text: '已拒绝', color: '#f44336', value: 'Rejected' }, - Processing: { text: '退款中', color: '#9c27b0', value: 'Processing' }, - Refunded: { text: '已退款', color: '#4caf50', value: 'Refunded' }, - Failed: { text: '退款失败', color: '#e91e63', value: 'Failed' }, -}; - -// BillsStatusEnum -export const BillsStatusEnum = { - PendingPayment: { text: '待支付', color: '#facc15', value: 'PendingPayment' }, - Paid: { text: '已支付', color: '#10b981', value: 'Paid' }, - Overdue: { text: '已逾期', color: '#ef4444', value: 'Overdue' }, - Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' }, +export const BannersTypeEnum= { + 'Image': {"text":"图片","color":"#ff0000","value":"Image"}, + 'Video': {"text":"视频","color":"#00ff00","value":"Video"}, + 'Text': {"text":"文本","color":"#0000ff","value":"Text"}, }; // 缓存类型 -export const CacheTypeEnum = { - MobilePhoneVerificationCode: { - text: '手机验证码', - color: '#4ef9dd', - value: 'MobilePhoneVerificationCode', - }, +export const CacheTypeEnum= { + 'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#6f374e","value":"MobilePhoneVerificationCode"}, }; // CompaniesMerchantTypeEnum -export const CompaniesMerchantTypeEnum = { - PropertyManagement: { - text: '物业公司', - color: '#007bff', - value: 'PropertyManagement', - }, - ServiceProvider: { - text: '服务商', - color: '#28a745', - value: 'ServiceProvider', - }, +export const CompaniesMerchantTypeEnum= { + 'PropertyManagement': {"text":"物业公司","color":"#007bff","value":"PropertyManagement"}, + 'ServiceProvider': {"text":"服务商","color":"#28a745","value":"ServiceProvider"}, }; // CompanyAppsAppTypeEnum -export const CompanyAppsAppTypeEnum = { - MiniProgram: { text: '微信小程序', color: '#3b82f6', value: 'MiniProgram' }, - MpOfficial: { text: '微信公众号', color: '#22c55e', value: 'MpOfficial' }, - WorkWechat: { text: '企业微信', color: '#6366f1', value: 'WorkWechat' }, +export const CompanyAppsAppTypeEnum= { + 'MiniProgram': {"text":"微信小程序","color":"#3b82f6","value":"MiniProgram"}, + 'MpOfficial': {"text":"微信公众号","color":"#22c55e","value":"MpOfficial"}, + 'WorkWechat': {"text":"企业微信","color":"#6366f1","value":"WorkWechat"}, }; // CompanyAppsModuleEnum -export const CompanyAppsModuleEnum = { - Employee: { text: '员工端', color: '#3b82f6', value: 'Employee' }, - Customer: { text: '客户端', color: '#10b981', value: 'Customer' }, +export const CompanyAppsModuleEnum= { + 'Employee': {"text":"员工端","color":"#3b82f6","value":"Employee"}, + 'Customer': {"text":"客户端","color":"#10b981","value":"Customer"}, }; // CompanyAppsWorkTypeEnum -export const CompanyAppsWorkTypeEnum = { - WorkWechatApp: { text: '企微应用', color: '#00c853', value: 'WorkWechatApp' }, - WorkWechat: { text: '企微', color: '#0091ea', value: 'WorkWechat' }, +export const CompanyAppsWorkTypeEnum= { + 'WorkWechatApp': {"text":"企微应用","color":"#00c853","value":"WorkWechatApp"}, + 'WorkWechat': {"text":"企微","color":"#0091ea","value":"WorkWechat"}, +}; + +// CompanyConfigsConfigKeyEnum +export const CompanyConfigsConfigKeyEnum= { + 'Theme': {"text":"主题色","color":"#3b82f6","value":"Theme"}, }; // CompanyEmployeeBacklogsStatusEnum -export const CompanyEmployeeBacklogsStatusEnum = { - Pending: { text: '待办', color: '#FF6600', value: 'Pending' }, - Completed: { text: '已办', color: '#2A82E4', value: 'Completed' }, +export const CompanyEmployeeBacklogsStatusEnum= { + 'Pending': {"text":"待办","color":"#FF6600","value":"Pending"}, + 'Completed': {"text":"已办","color":"#2A82E4","value":"Completed"}, }; // CompanyEmployeeBacklogsTypeEnum -export const CompanyEmployeeBacklogsTypeEnum = { - WorkOrder: { text: '工单', color: '#FF6600', value: 'WorkOrder' }, - Contract: { text: '合同', color: '#2A82E4', value: 'Contract' }, - MomentTask: { text: '朋友圈任务', color: '#FF6600', value: 'MomentTask' }, -}; - -// CompanyEmployeesTypeEnum -export const CompanyEmployeesTypeEnum = { - WeCom: { text: '企微', color: '#2196f3', value: 'WeCom' }, - External: { text: '外部', color: '#4caf50', value: 'External' }, +export const CompanyEmployeeBacklogsTypeEnum= { + 'WorkOrder': {"text":"工单","color":"#FF6600","value":"WorkOrder"}, + 'Contract': {"text":"合同","color":"#2A82E4","value":"Contract"}, + 'MomentTask': {"text":"朋友圈任务","color":"#FF6600","value":"MomentTask"}, }; // CompanyReceiptAccountsPayChannelEnum -export const CompanyReceiptAccountsPayChannelEnum = { - WeChat: { text: '微信', color: '#07c160', value: 'WeChat' }, - Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' }, - BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' }, - TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' }, -}; - -// CompanySealsTypeEnum -export const CompanySealsTypeEnum = { - OfficialSeal: { text: '公章', color: '#007bff', value: 'OfficialSeal' }, - FinanceSeal: { text: '财务专用章', color: '#28a745', value: 'FinanceSeal' }, - ContractSeal: { text: '合同专用章', color: '#17a2b8', value: 'ContractSeal' }, - LegalRepresentativeSeal: { - text: '法定代表人章', - color: '#ffc107', - value: 'LegalRepresentativeSeal', - }, - InvoiceSeal: { text: '发票专用章', color: '#dc3545', value: 'InvoiceSeal' }, - HRSeal: { text: '人事专用章', color: '#6f42c1', value: 'HRSeal' }, -}; - -// CompanySuppliersCertificateTypeEnum -export const CompanySuppliersCertificateTypeEnum = { - IdCard: { text: '身份证', color: '#1e90ff', value: 'IdCard' }, - BusinessLicense: { - text: '营业执照', - color: '#32cd32', - value: 'BusinessLicense', - }, -}; - -// CompanySuppliersCounterpartyEnum -export const CompanySuppliersCounterpartyEnum = { - Supplier: { text: '供应商', color: '#1e90ff', value: 'Supplier' }, - InternalCompany: { - text: '内部企业', - color: '#32cd32', - value: 'InternalCompany', - }, -}; - -// CompanySuppliersGradeEnum -export const CompanySuppliersGradeEnum = { - Excellent: { text: '优秀', color: '#10b981', value: 'Excellent' }, - Qualified: { text: '合格', color: '#3b82f6', value: 'Qualified' }, - ToImprove: { text: '待整改', color: '#f59e0b', value: 'ToImprove' }, - Eliminated: { text: '淘汰', color: '#ef4444', value: 'Eliminated' }, -}; - -// CompanySuppliersSupplierTypeEnum -export const CompanySuppliersSupplierTypeEnum = { - Individual: { text: '个人', color: '#1e90ff', value: 'Individual' }, - Enterprise: { text: '企业', color: '#32cd32', value: 'Enterprise' }, -}; - -// ContractArchivesConfidentialityLevelEnum -export const ContractArchivesConfidentialityLevelEnum = { - TopSecret: { text: '绝密', color: '#dc3545', value: 'TopSecret' }, - Confidential: { text: '机密', color: '#fd7e14', value: 'Confidential' }, - Secret: { text: '保密', color: '#ffc107', value: 'Secret' }, - Internal: { text: '内部公开', color: '#17a2b8', value: 'Internal' }, - Public: { text: '公开', color: '#28a745', value: 'Public' }, -}; - -// ContractArchivesFileStatusEnum -export const ContractArchivesFileStatusEnum = { - Intact: { text: '完好', color: '#28a745', value: 'Intact' }, - SlightDamage: { text: '轻度损伤', color: '#ffc107', value: 'SlightDamage' }, - ModerateDamage: { - text: '中度损伤', - color: '#fd7e14', - value: 'ModerateDamage', - }, - SevereDamage: { text: '重度损伤', color: '#dc3545', value: 'SevereDamage' }, -}; - -// ContractArchivesFileTypeEnum -export const ContractArchivesFileTypeEnum = { - PaperOriginal: { text: '纸质原件', color: '#007bff', value: 'PaperOriginal' }, - ElectronicOriginal: { - text: '电子原件', - color: '#28a745', - value: 'ElectronicOriginal', - }, - Copy: { text: '复印件', color: '#ffc107', value: 'Copy' }, -}; - -// ContractArchivesPeriodTypeEnum -export const ContractArchivesPeriodTypeEnum = { - FixedTerm: { text: '定期', color: '#007bff', value: 'FixedTerm' }, - Permanent: { text: '永久', color: '#28a745', value: 'Permanent' }, -}; - -// ContractBillPaymentsStatusEnum -export const ContractBillPaymentsStatusEnum = { - Pending: { text: '待审', color: '#faad14', value: 'Pending' }, - Approved: { text: '已审', color: '#52c41a', value: 'Approved' }, - Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' }, -}; - -// ContractBillsCostTypeEnum -export const ContractBillsCostTypeEnum = { - Income: { text: '收入', color: '#52c41a', value: 'Income' }, - Expense: { text: '支出', color: '#f5222d', value: 'Expense' }, -}; - -// ContractPeoplesSignPartyEnum -export const ContractPeoplesSignPartyEnum = { - PartyA: { text: '甲方', color: '#007bff', value: 'PartyA' }, - PartyB: { text: '乙方', color: '#28a745', value: 'PartyB' }, - PartyC: { text: '丙方', color: '#ffc107', value: 'PartyC' }, - PartyD: { text: '丁方', color: '#dc3545', value: 'PartyD' }, -}; - -// ContractTemplatesIncomeExpenseTypeEnum -export const ContractTemplatesIncomeExpenseTypeEnum = { - Income: { text: '收入类', color: '#32cd32', value: 'Income' }, - Expense: { text: '支出类', color: '#ff4500', value: 'Expense' }, - None: { text: '无收无支', color: '#808080', value: 'None' }, -}; - -// ContractTemplatesSourceEnum -export const ContractTemplatesSourceEnum = { - Internal: { text: '内部', color: '#1e90ff', value: 'Internal' }, - External: { text: '外部', color: '#32cd32', value: 'External' }, -}; - -// ContractsContractNatureEnum -export const ContractsContractNatureEnum = { - RegularContract: { - text: '常规合同', - color: '#007bff', - value: 'RegularContract', - }, - FrameworkAgreement: { - text: '框架协议', - color: '#28a745', - value: 'FrameworkAgreement', - }, -}; - -// ContractsSettlementModeEnum -export const ContractsSettlementModeEnum = { - LumpSumContract: { - text: '总价合同', - color: '#007bff', - value: 'LumpSumContract', - }, - OpenContract: { text: '开口合同', color: '#28a745', value: 'OpenContract' }, -}; - -// ContractsStatusEnum -export const ContractsStatusEnum = { - TemporaryStorage: { - text: '暂存', - color: '#6c757d', - value: 'TemporaryStorage', - }, - UnderApproval: { text: '审核中', color: '#007bff', value: 'UnderApproval' }, - Approved: { text: '已通过', color: '#28a745', value: 'Approved' }, - Rejected: { text: '已退回', color: '#dc3545', value: 'Rejected' }, - Signed: { text: '已签约', color: '#17a2b8', value: 'Signed' }, - Archived: { text: '已归档', color: '#20c997', value: 'Archived' }, - Terminating: { text: '终止中', color: '#ffc107', value: 'Terminating' }, - Terminated: { text: '已终止', color: '#fd7e14', value: 'Terminated' }, - Closed: { text: '已关闭', color: '#343a40', value: 'Closed' }, - Voided: { text: '已作废', color: '#6610f2', value: 'Voided' }, +export const CompanyReceiptAccountsPayChannelEnum= { + 'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"}, + 'Alipay': {"text":"支付宝","color":"#1677ff","value":"Alipay"}, + 'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"}, + 'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"}, }; // ConvenienceServicesTypeEnum -export const ConvenienceServicesTypeEnum = { - PropertyExclusive: { - text: '物业专属', - color: '#8b5cf6', - value: 'PropertyExclusive', - }, - EmergencyRepair: { - text: '紧急抢修', - color: '#ef4444', - value: 'EmergencyRepair', - }, - LifeService: { text: '生活服务', color: '#3b82f6', value: 'LifeService' }, - GovernmentConsulting: { - text: '政务咨询', - color: '#10b981', - value: 'GovernmentConsulting', - }, +export const ConvenienceServicesTypeEnum= { + 'PropertyExclusive': {"text":"物业专属","color":"#8b5cf6","value":"PropertyExclusive"}, + 'EmergencyRepair': {"text":"紧急抢修","color":"#ef4444","value":"EmergencyRepair"}, + 'LifeService': {"text":"生活服务","color":"#3b82f6","value":"LifeService"}, + 'GovernmentConsulting': {"text":"政务咨询","color":"#10b981","value":"GovernmentConsulting"}, }; // CustomerBacklogsStatusEnum -export const CustomerBacklogsStatusEnum = { - Pending: { text: '待办', color: '#faad14', value: 'Pending' }, - Completed: { text: '已办', color: '#2A82E4', value: 'Completed' }, +export const CustomerBacklogsStatusEnum= { + 'Pending': {"text":"待办","color":"#faad14","value":"Pending"}, + 'Completed': {"text":"已办","color":"#2A82E4","value":"Completed"}, }; // CustomerBacklogsTypeEnum -export const CustomerBacklogsTypeEnum = { - RegisterApply: { text: '登记申请', color: '#2db7f5', value: 'RegisterApply' }, - PaymentPending: { - text: '费用待缴', - color: '#faad14', - value: 'PaymentPending', - }, - ContractTodo: { text: '合同待办', color: '#722ed1', value: 'ContractTodo' }, +export const CustomerBacklogsTypeEnum= { + 'RegisterApply': {"text":"登记申请","color":"#2db7f5","value":"RegisterApply"}, + 'PaymentPending': {"text":"费用待缴","color":"#faad14","value":"PaymentPending"}, + 'ContractTodo': {"text":"合同待办","color":"#722ed1","value":"ContractTodo"}, }; // CustomerMomentTasksStatusEnum -export const CustomerMomentTasksStatusEnum = { - NotSent: { text: '未发', color: '#FF4500', value: 'NotSent' }, - Sent: { text: '已发', color: '#32CD32', value: 'Sent' }, +export const CustomerMomentTasksStatusEnum= { + 'NotSent': {"text":"未发","color":"#FF4500","value":"NotSent"}, + 'Sent': {"text":"已发","color":"#32CD32","value":"Sent"}, }; // CustomerMomentsChannelEnum -export const CustomerMomentsChannelEnum = { - MomentCorp: { text: '朋友圈(企业)', color: '#1E90FF', value: 'MomentCorp' }, - CustomerDirectCorp: { - text: '客户1对1消息群发(企业)', - color: '#FFA500', - value: 'CustomerDirectCorp', - }, - CustomerGroupCorp: { - text: '客户群群发(企业)', - color: '#FF69B4', - value: 'CustomerGroupCorp', - }, +export const CustomerMomentsChannelEnum= { + 'MomentCorp': {"text":"朋友圈(企业)","color":"#1E90FF","value":"MomentCorp"}, + 'CustomerDirectCorp': {"text":"客户1对1消息群发(企业)","color":"#FFA500","value":"CustomerDirectCorp"}, + 'CustomerGroupCorp': {"text":"客户群群发(企业)","color":"#FF69B4","value":"CustomerGroupCorp"}, }; // CustomerMomentsContentTypeEnum -export const CustomerMomentsContentTypeEnum = { - Image: { text: '图片消息', color: '#1E90FF', value: 'Image' }, - Link: { text: '转载链接消息', color: '#32CD32', value: 'Link' }, - MiniProgram: { text: '跳小程序', color: '#FFA500', value: 'MiniProgram' }, - Video: { text: '视频消息', color: '#FF69B4', value: 'Video' }, +export const CustomerMomentsContentTypeEnum= { + 'Image': {"text":"图片消息","color":"#1E90FF","value":"Image"}, + 'Link': {"text":"转载链接消息","color":"#32CD32","value":"Link"}, + 'MiniProgram': {"text":"跳小程序","color":"#FFA500","value":"MiniProgram"}, + 'Video': {"text":"视频消息","color":"#FF69B4","value":"Video"}, }; // CustomerMomentsPushStatusEnum -export const CustomerMomentsPushStatusEnum = { - NotPushed: { text: '未推送', color: '#FF4500', value: 'NotPushed' }, - Pushed: { text: '已推送', color: '#32CD32', value: 'Pushed' }, +export const CustomerMomentsPushStatusEnum= { + 'NotPushed': {"text":"未推送","color":"#FF4500","value":"NotPushed"}, + 'Pushed': {"text":"已推送","color":"#32CD32","value":"Pushed"}, }; // CustomerMomentsPushTypeEnum -export const CustomerMomentsPushTypeEnum = { - ManualPush: { text: '手动推送', color: '#1E90FF', value: 'ManualPush' }, - ScheduledPush: { text: '定时推送', color: '#32CD32', value: 'ScheduledPush' }, +export const CustomerMomentsPushTypeEnum= { + 'ManualPush': {"text":"手动推送","color":"#1E90FF","value":"ManualPush"}, + 'ScheduledPush': {"text":"定时推送","color":"#32CD32","value":"ScheduledPush"}, }; // CustomerMomentsRangeTypeEnum -export const CustomerMomentsRangeTypeEnum = { - Project: { text: '按项目推送', color: '#1E90FF', value: 'Project' }, +export const CustomerMomentsRangeTypeEnum= { + 'Project': {"text":"按项目推送","color":"#1E90FF","value":"Project"}, }; // CustomerMomentsSkipTypeEnum -export const CustomerMomentsSkipTypeEnum = { - H5: { text: 'H5', color: '#1E90FF', value: 'H5' }, +export const CustomerMomentsSkipTypeEnum= { + 'H5': {"text":"H5","color":"#1E90FF","value":"H5"}, }; // CustomerMomentsTaskEndTypeEnum -export const CustomerMomentsTaskEndTypeEnum = { - AfterNDays: { text: '发送后N天', color: '#1E90FF', value: 'AfterNDays' }, - ScheduledEnd: { text: '定时结束', color: '#32CD32', value: 'ScheduledEnd' }, +export const CustomerMomentsTaskEndTypeEnum= { + 'AfterNDays': {"text":"发送后N天","color":"#1E90FF","value":"AfterNDays"}, + 'ScheduledEnd': {"text":"定时结束","color":"#32CD32","value":"ScheduledEnd"}, }; // CustomerOpinionsTypeEnum -export const CustomerOpinionsTypeEnum = { - FeatureException: { - text: '功能异常', - color: '#ff0000', - value: 'FeatureException', - }, - FeatureSuggestion: { - text: '新功能建议', - color: '#00bfff', - value: 'FeatureSuggestion', - }, -}; - -// EmergencyEventBillsCostTypeEnum -export const EmergencyEventBillsCostTypeEnum = { - Income: { text: '收入', color: '#52c41a', value: 'Income' }, - Expense: { text: '支出', color: '#f5222d', value: 'Expense' }, -}; - -// EmergencyEventBillsFeeTypeEnum -export const EmergencyEventBillsFeeTypeEnum = { - Compensation: { text: '赔偿', color: '#ef4444', value: 'Compensation' }, - Penalty: { text: '罚款', color: '#f59e0b', value: 'Penalty' }, -}; - -// EmergencyEventBillsPaymentMethodEnum -export const EmergencyEventBillsPaymentMethodEnum = { - WeChat: { text: '微信', color: '#07c160', value: 'WeChat' }, - Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' }, - BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' }, - TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' }, - Prepayment: { text: '预缴支付', color: '#f59e0b', value: 'Prepayment' }, - POS: { text: 'POS机', color: '#8b5cf6', value: 'POS' }, - Cash: { text: '现金', color: '#dc2626', value: 'Cash' }, -}; - -// EmergencyEventBillsPaymentStatusEnum -export const EmergencyEventBillsPaymentStatusEnum = { - Pending: { text: '待支付', color: '#facc15', value: 'Pending' }, - ToBeConfirmed: { text: '待确认', color: '#fb923c', value: 'ToBeConfirmed' }, - Paid: { text: '已支付', color: '#10b981', value: 'Paid' }, - Refunded: { text: '已退款', color: '#60a5fa', value: 'Refunded' }, - Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' }, - Failed: { text: '支付失败', color: '#ef4444', value: 'Failed' }, -}; - -// EmergencyEventsAuditStatusEnum -export const EmergencyEventsAuditStatusEnum = { - Pending: { text: '待审', color: '#ff9800', value: 'Pending' }, - Approved: { text: '通过', color: '#4caf50', value: 'Approved' }, - Rejected: { text: '驳回', color: '#f44336', value: 'Rejected' }, -}; - -// EmergencyEventsCompensationTypeEnum -export const EmergencyEventsCompensationTypeEnum = { - Ours: { text: '我方', color: '#2196f3', value: 'Ours' }, - Others: { text: '他方', color: '#9c27b0', value: 'Others' }, -}; - -// EmergencyEventsStatusEnum -export const EmergencyEventsStatusEnum = { - PendingFollowUp: { - text: '待跟进', - color: '#f59e0b', - value: 'PendingFollowUp', - }, - InProgress: { text: '跟进中', color: '#3b82f6', value: 'InProgress' }, - PendingReview: { text: '待审核', color: '#a855f7', value: 'PendingReview' }, - Closed: { text: '已关闭', color: '#6b7280', value: 'Closed' }, -}; - -// EmergencyTeamMembersPositionEnum -export const EmergencyTeamMembersPositionEnum = { - Leader: { text: '应急组长', color: '#e74c3c', value: 'Leader' }, - Member: { text: '现场处置员', color: '#3498db', value: 'Member' }, - Liaison: { text: '信息联络员', color: '#f1c40f', value: 'Liaison' }, - Support: { text: '后勤保障员', color: '#2ecc71', value: 'Support' }, - Reserve: { text: '机动预备员', color: '#9b59b6', value: 'Reserve' }, -}; - -// GoodsReleasesAuditStatusEnum -export const GoodsReleasesAuditStatusEnum = { - Pending: { text: '待审核', color: '#faad14', value: 'Pending' }, - Approved: { text: '已通过', color: '#52c41a', value: 'Approved' }, - Rejected: { text: '已退回', color: '#ff4d4f', value: 'Rejected' }, -}; - -// GoodsReleasesPassedTypeEnum -export const GoodsReleasesPassedTypeEnum = { - Moving: { text: '搬家', color: '#1890ff', value: 'Moving' }, - Delivery: { text: '出货', color: '#52c41a', value: 'Delivery' }, - Other: { text: '其他', color: '#faad14', value: 'Other' }, -}; - -// GoodsReleasesStatusEnum -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 CustomerOpinionsTypeEnum= { + 'FeatureException': {"text":"功能异常","color":"#ff0000","value":"FeatureException"}, + 'FeatureSuggestion': {"text":"新功能建议","color":"#00bfff","value":"FeatureSuggestion"}, }; // 账单状态枚举 -export const HouseBillsBillStatusEnum = { - PendingPayment: { text: '待收款', color: '#facc15', value: 'PendingPayment' }, - ToBeConfirmed: { text: '待确认', color: '#fb923c', value: 'ToBeConfirmed' }, - PartiallyPaid: { text: '部分收款', color: '#60a5fa', value: 'PartiallyPaid' }, - Paid: { text: '已收款', color: '#10b981', value: 'Paid' }, - Overdue: { text: '已逾期', color: '#ef4444', value: 'Overdue' }, - Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' }, +export const HouseBillsBillStatusEnum= { + 'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"}, + 'PartiallyPaid': {"text":"部分支付","color":"#60a5fa","value":"PartiallyPaid"}, + 'Paid': {"text":"已支付","color":"#10b981","value":"Paid"}, + 'Overdue': {"text":"已逾期","color":"#ef4444","value":"Overdue"}, + 'Cancelled': {"text":"已取消","color":"#9ca3af","value":"Cancelled"}, }; // 房屋账单类型枚举 -export const HouseBillsTypeEnum = { - PropertyFee: { text: '物业费', color: '#3b82f6', value: 'PropertyFee' }, - MaintenanceFund: { - text: '维修基金', - color: '#10b981', - value: 'MaintenanceFund', - }, - WaterFee: { text: '水费', color: '#06b6d4', value: 'WaterFee' }, - ElectricityFee: { text: '电费', color: '#f59e0b', value: 'ElectricityFee' }, - SharedWaterFee: { - text: '公摊水费', - color: '#8b5cf6', - value: 'SharedWaterFee', - }, - SharedElectricityFee: { - text: '公摊电费', - color: '#ec4899', - value: 'SharedElectricityFee', - }, - CarPortFee: { text: '车位费', color: '#f59e0b', value: 'CarPortFee' }, +export const HouseBillsTypeEnum= { + 'PropertyFee': {"text":"物业费","color":"#3b82f6","value":"PropertyFee"}, + 'MaintenanceFund': {"text":"维修基金","color":"#10b981","value":"MaintenanceFund"}, + 'WaterFee': {"text":"水费","color":"#06b6d4","value":"WaterFee"}, + 'ElectricityFee': {"text":"电费","color":"#f59e0b","value":"ElectricityFee"}, + 'SharedWaterFee': {"text":"公摊水费","color":"#8b5cf6","value":"SharedWaterFee"}, + 'SharedElectricityFee': {"text":"公摊电费","color":"#ec4899","value":"SharedElectricityFee"}, + 'CarPortFee': {"text":"车位费","color":"#f59e0b","value":"CarPortFee"}, }; // HouseChargeStandardsApportionmentMethodEnum -export const HouseChargeStandardsApportionmentMethodEnum = { - HouseCount: { text: '按房屋数分摊', color: '#3b82f6', value: 'HouseCount' }, - AreaProportion: { - text: '按建筑面积分摊', - color: '#10b981', - value: 'AreaProportion', - }, - FixedRatio: { text: '按固定比例分摊', color: '#f59e0b', value: 'FixedRatio' }, +export const HouseChargeStandardsApportionmentMethodEnum= { + 'HouseCount': {"text":"房屋数分摊","color":"#3b82f6","value":"HouseCount"}, + 'AreaProportion': {"text":"房屋计费面积分摊","color":"#10b981","value":"AreaProportion"}, + 'FixedRatio': {"text":"按固定比例分摊","color":"#f59e0b","value":"FixedRatio"}, }; // HouseChargeStandardsCalculationMethodEnum -export const HouseChargeStandardsCalculationMethodEnum = { - ChargeableArea: { - text: '计费面积', - color: '#3b82f6', - value: 'ChargeableArea', - }, - BuiltArea: { text: '建筑面积', color: '#10b981', value: 'BuiltArea' }, - InsideArea: { text: '套内面积', color: '#f59e0b', value: 'InsideArea' }, - PerUnit: { text: '按套', color: '#06b6d4', value: 'PerUnit' }, - ElectricityUsage: { - text: '用电量', - color: '#8b5cf6', - value: 'ElectricityUsage', - }, - WaterUsage: { text: '用水量', color: '#ec4899', value: 'WaterUsage' }, +export const HouseChargeStandardsCalculationMethodEnum= { + 'ChargeableArea': {"text":"计费面积","color":"#3b82f6","value":"ChargeableArea"}, + 'BuiltArea': {"text":"建筑面积","color":"#10b981","value":"BuiltArea"}, + 'InsideArea': {"text":"套内面积","color":"#f59e0b","value":"InsideArea"}, + 'PerUnit': {"text":"按套","color":"#06b6d4","value":"PerUnit"}, + 'ElectricityUsage': {"text":"用电量","color":"#8b5cf6","value":"ElectricityUsage"}, + 'WaterUsage': {"text":"用水量","color":"#ec4899","value":"WaterUsage"}, }; // HouseChargeStandardsCalculationModeEnum -export const HouseChargeStandardsCalculationModeEnum = { - FixedAmount: { text: '固定金额', color: '#3b82f6', value: 'FixedAmount' }, - QuantityPrice: { - text: '数量*单价', - color: '#10b981', - value: 'QuantityPrice', - }, +export const HouseChargeStandardsCalculationModeEnum= { + 'FixedAmount': {"text":"固定金额","color":"#3b82f6","value":"FixedAmount"}, + 'QuantityPrice': {"text":"数量*单价","color":"#10b981","value":"QuantityPrice"}, }; // HouseChargeStandardsCalculationPeriodEnum -export const HouseChargeStandardsCalculationPeriodEnum = { - PerTime: { text: '按次', color: '#3b82f6', value: 'PerTime' }, - PerDay: { text: '按日', color: '#10b981', value: 'PerDay' }, - PerMonth: { text: '按月', color: '#f59e0b', value: 'PerMonth' }, - PerYear: { text: '按年', color: '#8b5cf6', value: 'PerYear' }, +export const HouseChargeStandardsCalculationPeriodEnum= { + 'PerTime': {"text":"按次","color":"#3b82f6","value":"PerTime"}, + 'PerDay': {"text":"按日","color":"#10b981","value":"PerDay"}, + 'PerMonth': {"text":"按月","color":"#f59e0b","value":"PerMonth"}, + 'PerYear': {"text":"按年","color":"#8b5cf6","value":"PerYear"}, }; // HouseChargeStandardsPriceAlgorithmEnum -export const HouseChargeStandardsPriceAlgorithmEnum = { - Fixed: { text: '固定', color: '#4caf50', value: 'Fixed' }, - Tiered: { text: '分级价阶梯', color: '#2196f3', value: 'Tiered' }, - Peak: { text: '最高价阶梯', color: '#ff9800', value: 'Peak' }, +export const HouseChargeStandardsPriceAlgorithmEnum= { + 'Fixed': {"text":"固定","color":"#4caf50","value":"Fixed"}, + 'Tiered': {"text":"分级价阶梯","color":"#2196f3","value":"Tiered"}, + 'Peak': {"text":"最高价阶梯","color":"#ff9800","value":"Peak"}, }; // HouseChargeStandardsStatusEnum -export const HouseChargeStandardsStatusEnum = { - Active: { text: '启用', color: '#3b82f6', value: 'Active' }, - Inactive: { text: '禁用', color: '#ef4444', value: 'Inactive' }, +export const HouseChargeStandardsStatusEnum= { + 'Active': {"text":"启用","color":"#3b82f6","value":"Active"}, + 'Inactive': {"text":"禁用","color":"#ef4444","value":"Inactive"}, }; // HouseChargeStandardsTypeEnum -export const HouseChargeStandardsTypeEnum = { - House: { text: '房屋', color: '#3b82f6', value: 'House' }, - Meter: { text: '仪表', color: '#10b981', value: 'Meter' }, - CarPort: { text: '车位', color: '#f59e0b', value: 'CarPort' }, +export const HouseChargeStandardsTypeEnum= { + 'House': {"text":"房屋","color":"#3b82f6","value":"House"}, + 'Meter': {"text":"仪表","color":"#10b981","value":"Meter"}, + 'CarPort': {"text":"车位","color":"#f59e0b","value":"CarPort"}, }; // HouseChargeTaskDetailsStatusEnum -export const HouseChargeTaskDetailsStatusEnum = { - Pending: { text: '待处理', color: '#f59e0b', value: 'Pending' }, - Success: { text: '成功', color: '#22c55e', value: 'Success' }, - Failed: { text: '失败', color: '#ef4444', value: 'Failed' }, +export const HouseChargeTaskDetailsStatusEnum= { + 'Pending': {"text":"待处理","color":"#f59e0b","value":"Pending"}, + 'Success': {"text":"成功","color":"#22c55e","value":"Success"}, + 'Failed': {"text":"失败","color":"#ef4444","value":"Failed"}, }; // HouseChargeTaskDetailsTargetTypeEnum -export const HouseChargeTaskDetailsTargetTypeEnum = { - House: { text: '房屋', color: '#3b82f6', value: 'House' }, - CarPort: { text: '车位', color: '#f59e0b', value: 'CarPort' }, +export const HouseChargeTaskDetailsTargetTypeEnum= { + 'House': {"text":"房屋","color":"#3b82f6","value":"House"}, + 'CarPort': {"text":"车位","color":"#f59e0b","value":"CarPort"}, }; // HouseChargeTasksStatusEnum -export const HouseChargeTasksStatusEnum = { - Pending: { text: '待执行', color: '#f59e0b', value: 'Pending' }, - InProgress: { text: '执行中', color: '#3b82f6', value: 'InProgress' }, - Completed: { text: '已完成', color: '#10b981', value: 'Completed' }, - Failed: { text: '失败', color: '#ef4444', value: 'Failed' }, +export const HouseChargeTasksStatusEnum= { + 'Pending': {"text":"待执行","color":"#f59e0b","value":"Pending"}, + 'InProgress': {"text":"执行中","color":"#3b82f6","value":"InProgress"}, + 'Completed': {"text":"已完成","color":"#10b981","value":"Completed"}, + 'Failed': {"text":"失败","color":"#ef4444","value":"Failed"}, }; // HouseChargeTasksTypeEnum -export const HouseChargeTasksTypeEnum = { - Scheduled: { text: '定时创建', color: '#3b82f6', value: 'Scheduled' }, - Manual: { text: '手动创建', color: '#10b981', value: 'Manual' }, +export const HouseChargeTasksTypeEnum= { + 'Scheduled': {"text":"定时创建","color":"#3b82f6","value":"Scheduled"}, + 'Manual': {"text":"手动创建","color":"#10b981","value":"Manual"}, }; // HouseCollectionRecordsCollectionResultEnum -export const HouseCollectionRecordsCollectionResultEnum = { - PromiseToPay: { text: '承诺缴费', color: '#4caf50', value: 'PromiseToPay' }, - RefuseToPay: { text: '拒绝缴费', color: '#f44336', value: 'RefuseToPay' }, - NotReached: { text: '未联系到', color: '#9e9e9e', value: 'NotReached' }, - NeedFollowUp: { text: '需要跟进', color: '#ff9800', value: 'NeedFollowUp' }, +export const HouseCollectionRecordsCollectionResultEnum= { + 'PromiseToPay': {"text":"承诺缴费","color":"#4caf50","value":"PromiseToPay"}, + 'RefuseToPay': {"text":"拒绝缴费","color":"#f44336","value":"RefuseToPay"}, + 'NotReached': {"text":"未联系到","color":"#9e9e9e","value":"NotReached"}, + 'NeedFollowUp': {"text":"需要跟进","color":"#ff9800","value":"NeedFollowUp"}, }; // HouseCollectionRecordsSmsStatusEnum -export const HouseCollectionRecordsStatusEnum = { - NotNotified: { text: '未通知', color: '#808080', value: 'NotNotified' }, - Notified: { text: '已通知', color: '#00cc00', value: 'Notified' }, - Failed: { text: '失败', color: '#ff0000', value: 'Failed' }, +export const HouseCollectionRecordsStatusEnum= { + 'NotNotified': {"text":"未通知","color":"#808080","value":"NotNotified"}, + 'Notified': {"text":"已通知","color":"#00cc00","value":"Notified"}, + 'Failed': {"text":"失败","color":"#ff0000","value":"Failed"}, }; // HouseCollectionTasksChannelEnum -export const HouseCollectionTasksChannelEnum = { - SMS: { text: '短信', color: '#1E90FF', value: 'SMS' }, - MiniProgram: { text: '小程序', color: '#00BFFF', value: 'MiniProgram' }, - OfficialAccount: { - text: '公众号', - color: '#32CD32', - value: 'OfficialAccount', - }, - PhoneCall: { text: '电话催缴', color: '#FF8C00', value: 'PhoneCall' }, - Visit: { text: '上门催缴', color: '#8B4513', value: 'Visit' }, - WeChat: { text: '微信联系', color: '#20B2AA', value: 'WeChat' }, - WrittenNotice: { text: '书面通知', color: '#708090', value: 'WrittenNotice' }, +export const HouseCollectionTasksChannelEnum= { + 'SMS': {"text":"短信","color":"#1E90FF","value":"SMS"}, + 'MiniProgram': {"text":"小程序","color":"#00BFFF","value":"MiniProgram"}, + 'OfficialAccount': {"text":"公众号","color":"#32CD32","value":"OfficialAccount"}, + 'PhoneCall': {"text":"电话催缴","color":"#FF8C00","value":"PhoneCall"}, + 'Visit': {"text":"上门催缴","color":"#8B4513","value":"Visit"}, + 'WeChat': {"text":"微信联系","color":"#20B2AA","value":"WeChat"}, + 'WrittenNotice': {"text":"书面通知","color":"#708090","value":"WrittenNotice"}, }; // HouseCollectionTasksStatusEnum -export const HouseCollectionTasksStatusEnum = { - Processing: { text: '进行中', color: '#ffcc00', value: 'Processing' }, - Completed: { text: '已完成', color: '#00cc00', value: 'Completed' }, - Failed: { text: '失败', color: '#ff0000', value: 'Failed' }, -}; - -// HouseDoorCardLogsTypeEnum -export const HouseDoorCardLogsTypeEnum = { - View: { text: '查看', color: '#2196f3', value: 'View' }, - Update: { text: '修改', color: '#4caf50', value: 'Update' }, - ReportLoss: { text: '挂失', color: '#ff9800', value: 'ReportLoss' }, - Invalidate: { text: '作废', color: '#f44336', value: 'Invalidate' }, +export const HouseCollectionTasksStatusEnum= { + 'Processing': {"text":"进行中","color":"#ffcc00","value":"Processing"}, + 'Completed': {"text":"已完成","color":"#00cc00","value":"Completed"}, + 'Failed': {"text":"失败","color":"#ff0000","value":"Failed"}, }; // HouseMeterReadingsOperationTypeEnum -export const HouseMeterReadingsOperationTypeEnum = { - NormalReading: { text: '正常抄表', color: '#4caf50', value: 'NormalReading' }, - ResetReading: { text: '重置读数', color: '#f44336', value: 'ResetReading' }, - CorrectReading: { - text: '修正读数', - color: '#ff9800', - value: 'CorrectReading', - }, +export const HouseMeterReadingsOperationTypeEnum= { + 'NormalReading': {"text":"正常抄表","color":"#4caf50","value":"NormalReading"}, + 'ResetReading': {"text":"重置读数","color":"#f44336","value":"ResetReading"}, + 'CorrectReading': {"text":"修正读数","color":"#ff9800","value":"CorrectReading"}, }; // HouseMeterTasksGenerationMethodEnum -export const HouseMeterTasksGenerationMethodEnum = { - Building: { text: '按楼栋', color: '#4caf50', value: 'Building' }, - Unit: { text: '按单元', color: '#2196f3', value: 'Unit' }, - Meter: { text: '按仪表', color: '#ff9800', value: 'Meter' }, +export const HouseMeterTasksGenerationMethodEnum= { + 'Building': {"text":"按楼栋","color":"#4caf50","value":"Building"}, + 'Unit': {"text":"按单元","color":"#2196f3","value":"Unit"}, + 'Meter': {"text":"按仪表","color":"#ff9800","value":"Meter"}, }; // HouseMetersMeterTypeEnum -export const HouseMetersMeterTypeEnum = { - HouseMeter: { text: '房屋表', color: '#4caf50', value: 'HouseMeter' }, - CommonMeter: { text: '公摊表', color: '#2196f3', value: 'CommonMeter' }, +export const HouseMetersMeterTypeEnum= { + 'HouseMeter': {"text":"房屋表","color":"#4caf50","value":"HouseMeter"}, + 'CommonMeter': {"text":"公摊表","color":"#2196f3","value":"CommonMeter"}, }; // HouseMetersUsageTypeEnum -export const HouseMetersUsageTypeEnum = { - WaterMeter: { text: '水表', color: '#2196f3', value: 'WaterMeter' }, - ElectricMeter: { text: '电表', color: '#ff9800', value: 'ElectricMeter' }, - GasMeter: { text: '燃气表', color: '#f44336', value: 'GasMeter' }, - HeatingMeter: { text: '暖气表', color: '#9c27b0', value: 'HeatingMeter' }, +export const HouseMetersUsageTypeEnum= { + 'WaterMeter': {"text":"水表","color":"#2196f3","value":"WaterMeter"}, + 'ElectricMeter': {"text":"电表","color":"#ff9800","value":"ElectricMeter"}, + 'GasMeter': {"text":"燃气表","color":"#f44336","value":"GasMeter"}, + 'HeatingMeter': {"text":"暖气表","color":"#9c27b0","value":"HeatingMeter"}, }; // HouseOccupantsCardTypeEnum -export const HouseOccupantsCardTypeEnum = { - MainlandID: { - text: '中国大陆居民身份证', - color: '#2db7f5', - value: 'MainlandID', - }, - HKPermit: { - text: '香港来往大陆通行证(回乡证)', - color: '#fa8c16', - value: 'HKPermit', - }, - MOPermit: { - text: '澳门来往大陆通行证(回乡证)', - color: '#faad14', - value: 'MOPermit', - }, - TWPermit: { - text: '台湾来往大陆通行证(台胞证)', - color: '#87d068', - value: 'TWPermit', - }, - Passport: { text: '护照', color: '#108ee9', value: 'Passport' }, - BusinessLicense: { - text: '营业执照', - color: '#f5222d', - value: 'BusinessLicense', - }, +export const HouseOccupantsCardTypeEnum= { + 'MainlandID': {"text":"中国大陆居民身份证","color":"#2db7f5","value":"MainlandID"}, + 'HKPermit': {"text":"香港来往大陆通行证(回乡证)","color":"#fa8c16","value":"HKPermit"}, + 'MOPermit': {"text":"澳门来往大陆通行证(回乡证)","color":"#faad14","value":"MOPermit"}, + 'TWPermit': {"text":"台湾来往大陆通行证(台胞证)","color":"#87d068","value":"TWPermit"}, + 'Passport': {"text":"护照","color":"#108ee9","value":"Passport"}, + 'BusinessLicense': {"text":"营业执照","color":"#f5222d","value":"BusinessLicense"}, }; // HouseOccupantsHouseRelationEnum -export const HouseOccupantsHouseRelationEnum = { - Owner: { text: '产权人', color: '#2db7f5', value: 'Owner' }, - NonOwner: { text: '非产权人', color: '#fa8c16', value: 'NonOwner' }, +export const HouseOccupantsHouseRelationEnum= { + 'Owner': {"text":"产权人","color":"#2db7f5","value":"Owner"}, + 'NonOwner': {"text":"非产权人","color":"#fa8c16","value":"NonOwner"}, }; // HouseOccupantsRelationWithOwnerEnum -export const HouseOccupantsRelationWithOwnerEnum = { - Self: { text: '本人', color: '#52c41a', value: 'Self' }, - Spouse: { text: '配偶', color: '#2db7f5', value: 'Spouse' }, - Children: { text: '子女', color: '#87d068', value: 'Children' }, - Parents: { text: '父母', color: '#faad14', value: 'Parents' }, - Siblings: { text: '兄弟姐妹', color: '#fa8c16', value: 'Siblings' }, - OtherRelatives: { text: '其他', color: '#f5222d', value: 'OtherRelatives' }, - PrimaryTenant: { text: '主租客', color: '#722ed1', value: 'PrimaryTenant' }, - Tenant: { text: '租客', color: '#1890ff', value: 'Tenant' }, +export const HouseOccupantsRelationWithOwnerEnum= { + 'Self': {"text":"本人","color":"#52c41a","value":"Self"}, + 'Spouse': {"text":"配偶","color":"#2db7f5","value":"Spouse"}, + 'Children': {"text":"子女","color":"#87d068","value":"Children"}, + 'Parents': {"text":"父母","color":"#faad14","value":"Parents"}, + 'Siblings': {"text":"兄弟姐妹","color":"#fa8c16","value":"Siblings"}, + 'OtherRelatives': {"text":"其他","color":"#f5222d","value":"OtherRelatives"}, + 'PrimaryTenant': {"text":"主租客","color":"#722ed1","value":"PrimaryTenant"}, + 'Tenant': {"text":"租客","color":"#1890ff","value":"Tenant"}, }; // HouseOccupantsResidentialRelationEnum -export const HouseOccupantsResidentialRelationEnum = { - PropertyOwner: { text: '产权人', color: '#eb2f96', value: 'PropertyOwner' }, - Resident: { text: '住户', color: '#2db7f5', value: 'Resident' }, - PrimaryTenant: { text: '主租人', color: '#87d068', value: 'PrimaryTenant' }, - Tenant: { text: '租客', color: '#fa8c16', value: 'Tenant' }, +export const HouseOccupantsResidentialRelationEnum= { + 'Resident': {"text":"住户","color":"#2db7f5","value":"Resident"}, + 'PrimaryTenant': {"text":"主租人","color":"#87d068","value":"PrimaryTenant"}, + 'Tenant': {"text":"租客","color":"#fa8c16","value":"Tenant"}, }; // HouseOccupantsStatusEnum -export const HouseOccupantsStatusEnum = { - Normal: { text: '绑定', color: '#52c41a', value: 'Normal' }, - Unbound: { text: '解绑', color: '#f5222d', value: 'Unbound' }, +export const HouseOccupantsStatusEnum= { + 'Normal': {"text":"绑定","color":"#52c41a","value":"Normal"}, + 'Unbound': {"text":"解绑","color":"#f5222d","value":"Unbound"}, }; -// HouseOrdersAuditStatusEnum -export const HouseOrdersAuditStatusEnum = { - Pending: { text: '待审', color: '#f59e0b', value: 'Pending' }, - Approved: { text: '通过', color: '#10b981', value: 'Approved' }, - Rejected: { text: '驳回', color: '#ef4444', value: 'Rejected' }, +// HouseOrderRefundsRefundStatusEnum +export const HouseOrderRefundsRefundStatusEnum= { + 'Requested': {"text":"已申请","color":"#2196f3","value":"Requested"}, + 'Reviewing': {"text":"审核中","color":"#ff9800","value":"Reviewing"}, + 'Rejected': {"text":"已拒绝","color":"#f44336","value":"Rejected"}, + 'Processing': {"text":"退款中","color":"#9c27b0","value":"Processing"}, + 'Refunded': {"text":"已退款","color":"#4caf50","value":"Refunded"}, + 'Failed': {"text":"退款失败","color":"#e91e63","value":"Failed"}, +}; + +// 订单审核状态枚举 +export const HouseOrdersAuditStatusEnum= { + 'Pending': {"text":"待审核","color":"#f59e0b","value":"Pending"}, + 'Approved': {"text":"已通过","color":"#10b981","value":"Approved"}, + 'Rejected': {"text":"已驳回","color":"#ef4444","value":"Rejected"}, }; // 订单状态枚举 -export const HouseOrdersOrderStatusEnum = { - Pending: { text: '待支付', color: '#facc15', value: 'Pending' }, - ToBeConfirmed: { text: '待确认', color: '#fb923c', value: 'ToBeConfirmed' }, - Paid: { text: '已支付', color: '#10b981', value: 'Paid' }, - Refunded: { text: '已退款', color: '#60a5fa', value: 'Refunded' }, - Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' }, - Failed: { text: '支付失败', color: '#ef4444', value: 'Failed' }, +export const HouseOrdersOrderStatusEnum= { + 'Pending': {"text":"待支付","color":"#facc15","value":"Pending"}, + 'Paid': {"text":"已支付","color":"#10b981","value":"Paid"}, + 'Refunded': {"text":"已退款","color":"#60a5fa","value":"Refunded"}, + 'Cancelled': {"text":"已取消","color":"#9ca3af","value":"Cancelled"}, + 'Failed': {"text":"支付失败","color":"#ef4444","value":"Failed"}, }; // HouseOrdersPaymentMethodEnum -export const HouseOrdersPaymentMethodEnum = { - WeChat: { text: '微信', color: '#07c160', value: 'WeChat' }, - Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' }, - BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' }, - TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' }, - Prepayment: { text: '预缴支付', color: '#f59e0b', value: 'Prepayment' }, - POS: { text: 'POS机', color: '#8b5cf6', value: 'POS' }, - Cash: { text: '现金', color: '#dc2626', value: 'Cash' }, +export const HouseOrdersPaymentMethodEnum= { + 'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"}, + 'Alipay': {"text":"支付宝","color":"#1677ff","value":"Alipay"}, + 'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"}, + 'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"}, + 'Prepayment': {"text":"预缴支付","color":"#f59e0b","value":"Prepayment"}, + 'POS': {"text":"POS机","color":"#8b5cf6","value":"POS"}, + 'Cash': {"text":"现金","color":"#dc2626","value":"Cash"}, }; // HousePrepaymentLogsTypeEnum -export const HousePrepaymentLogsTypeEnum = { - Add: { text: '加', color: '#52c41a', value: 'Add' }, - Subtract: { text: '减', color: '#f5222d', value: 'Subtract' }, +export const HousePrepaymentLogsTypeEnum= { + 'Add': {"text":"加","color":"#52c41a","value":"Add"}, + 'Subtract': {"text":"减","color":"#f5222d","value":"Subtract"}, }; // HouseRegistersCustomerTypeEnum -export const HouseRegistersCustomerTypeEnum = { - Individual: { text: '个人客户', color: '#2db7f5', value: 'Individual' }, - Enterprise: { text: '普通企业', color: '#87d068', value: 'Enterprise' }, - Developer: { text: '开发企业', color: '#fa8c16', value: 'Developer' }, - Government: { text: '政府组织', color: '#f5222d', value: 'Government' }, +export const HouseRegistersCustomerTypeEnum= { + 'Individual': {"text":"个人客户","color":"#2db7f5","value":"Individual"}, + 'Enterprise': {"text":"普通企业","color":"#87d068","value":"Enterprise"}, + 'Developer': {"text":"开发企业","color":"#fa8c16","value":"Developer"}, + 'Government': {"text":"政府组织","color":"#f5222d","value":"Government"}, }; // HouseRegistersHouseStatusEnum -export const HouseRegistersHouseStatusEnum = { - SelfOccupied: { text: '自住', color: '#28a745', value: 'SelfOccupied' }, - Rented: { text: '出租', color: '#007bff', value: 'Rented' }, - Vacant: { text: '空置', color: '#dc3545', value: 'Vacant' }, +export const HouseRegistersHouseStatusEnum= { + 'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"}, + 'Rented': {"text":"出租","color":"#007bff","value":"Rented"}, + 'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"}, }; // 房屋登记身份类型 -export const HouseRegistersIdentityTypeEnum = { - Owner: { text: '产权人', color: '#2db7f5', value: 'Owner' }, - Tenant: { text: '租客', color: '#87d068', value: 'Tenant' }, - CoResident: { text: '同住人(亲属)', color: '#108ee9', value: 'CoResident' }, +export const HouseRegistersIdentityTypeEnum= { + 'Owner': {"text":"产权人","color":"#2db7f5","value":"Owner"}, + 'Tenant': {"text":"租客","color":"#87d068","value":"Tenant"}, + 'CoResident': {"text":"同住人(亲属)","color":"#108ee9","value":"CoResident"}, }; // HouseRegistersStatusEnum -export const HouseRegistersStatusEnum = { - Pending: { text: '待审', color: '#faad14', value: 'Pending' }, - Approved: { text: '通过', color: '#52c41a', value: 'Approved' }, - Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' }, +export const HouseRegistersStatusEnum= { + 'Pending': {"text":"待审","color":"#faad14","value":"Pending"}, + 'Approved': {"text":"通过","color":"#52c41a","value":"Approved"}, + 'Rejected': {"text":"驳回","color":"#f5222d","value":"Rejected"}, }; // HouseRegistersTypeEnum -export const HouseRegistersTypeEnum = { - AddOwner: { text: '添加产权人', color: '#52c41a', value: 'AddOwner' }, - RemoveOwner: { text: '减少产权人', color: '#d9363e', value: 'RemoveOwner' }, - AddOccupant: { text: '添加住户', color: '#108ee9', value: 'AddOccupant' }, - RemoveOccupant: { - text: '移除住户', - color: '#fa8c16', - value: 'RemoveOccupant', - }, - MoveOut: { text: '搬离登记', color: '#f50', value: 'MoveOut' }, - MoveIn: { text: '搬入登记', color: '#ffc53d', value: 'MoveIn' }, - UpdateInfo: { text: '修改信息', color: '#722ed1', value: 'UpdateInfo' }, - UpdatePhone: { text: '修改电话', color: '#13c2c2', value: 'UpdatePhone' }, - GoodsRelease: { text: '物品放行', color: '#a0d911', value: 'GoodsRelease' }, +export const HouseRegistersTypeEnum= { + 'AddOwner': {"text":"添加产权人","color":"#52c41a","value":"AddOwner"}, + 'RemoveOwner': {"text":"减少产权人","color":"#d9363e","value":"RemoveOwner"}, + 'AddOccupant': {"text":"添加住户","color":"#108ee9","value":"AddOccupant"}, + 'RemoveOccupant': {"text":"移除住户","color":"#fa8c16","value":"RemoveOccupant"}, + 'MoveOut': {"text":"搬离登记","color":"#f50","value":"MoveOut"}, + 'MoveIn': {"text":"搬入登记","color":"#ffc53d","value":"MoveIn"}, + 'UpdateInfo': {"text":"修改信息","color":"#722ed1","value":"UpdateInfo"}, + 'UpdatePhone': {"text":"修改电话","color":"#13c2c2","value":"UpdatePhone"}, + 'GoodsRelease': {"text":"物品放行","color":"#a0d911","value":"GoodsRelease"}, }; // HouseRegistersUsagePlanEnum -export const HouseRegistersUsagePlanEnum = { - Permanent: { text: '常住', color: '#52c41a', value: 'Permanent' }, - Vacation: { text: '度假', color: '#faad14', value: 'Vacation' }, - Rental: { text: '出租', color: '#2db7f5', value: 'Rental' }, - Commercial: { text: '商用', color: '#f5222d', value: 'Commercial' }, +export const HouseRegistersUsagePlanEnum= { + 'Permanent': {"text":"常住","color":"#52c41a","value":"Permanent"}, + 'Vacation': {"text":"度假","color":"#faad14","value":"Vacation"}, + 'Rental': {"text":"出租","color":"#2db7f5","value":"Rental"}, + 'Commercial': {"text":"商用","color":"#f5222d","value":"Commercial"}, }; // HouseWorkOrdersAcceptResultEnum -export const HouseWorkOrdersAcceptResultEnum = { - Satisfied: { text: '满意', color: '#28A745', value: 'Satisfied' }, - Unsatisfied: { text: '不满意', color: '#DC3545', value: 'Unsatisfied' }, +export const HouseWorkOrdersAcceptResultEnum= { + 'Satisfied': {"text":"满意","color":"#28A745","value":"Satisfied"}, + 'Unsatisfied': {"text":"不满意","color":"#DC3545","value":"Unsatisfied"}, }; // HouseWorkOrdersAssignStatusEnum -export const HouseWorkOrdersAssignStatusEnum = { - Unassigned: { text: '未指派', color: '#ff0000', value: 'Unassigned' }, - Assigned: { text: '已指派', color: '#00ff00', value: 'Assigned' }, +export const HouseWorkOrdersAssignStatusEnum= { + 'Unassigned': {"text":"未指派","color":"#ff0000","value":"Unassigned"}, + 'Assigned': {"text":"已指派","color":"#00ff00","value":"Assigned"}, }; // HouseWorkOrdersComplaintTypeEnum -export const HouseWorkOrdersComplaintTypeEnum = { - Hygiene: { text: '卫生环境', color: '#ff0000', value: 'Hygiene' }, - Greening: { text: '绿植绿化', color: '#00aaff', value: 'Greening' }, - Safety: { text: '安全问题', color: '#ffaa00', value: 'Safety' }, - Maintenance: { text: '维修问题', color: '#aa00ff', value: 'Maintenance' }, - PropertyService: { - text: '物业服务', - color: '#00aa55', - value: 'PropertyService', - }, - Staff: { text: '工作人员', color: '#ff00aa', value: 'Staff' }, - Other: { text: '其他', color: '#aaaaaa', value: 'Other' }, +export const HouseWorkOrdersComplaintTypeEnum= { + 'Hygiene': {"text":"卫生环境","color":"#ff0000","value":"Hygiene"}, + 'Greening': {"text":"绿植绿化","color":"#00aaff","value":"Greening"}, + 'Safety': {"text":"安全问题","color":"#ffaa00","value":"Safety"}, + 'Maintenance': {"text":"维修问题","color":"#aa00ff","value":"Maintenance"}, + 'PropertyService': {"text":"物业服务","color":"#00aa55","value":"PropertyService"}, + 'Staff': {"text":"工作人员","color":"#ff00aa","value":"Staff"}, + 'Other': {"text":"其他","color":"#aaaaaa","value":"Other"}, }; // HouseWorkOrdersLevelEnum -export const HouseWorkOrdersLevelEnum = { - Urgent: { text: '紧急', color: '#ff0000', value: 'Urgent' }, - High: { text: '高', color: '#ff7f00', value: 'High' }, - Medium: { text: '中', color: '#00cc00', value: 'Medium' }, - Low: { text: '低', color: '#999999', value: 'Low' }, +export const HouseWorkOrdersLevelEnum= { + 'Urgent': {"text":"紧急","color":"#ff0000","value":"Urgent"}, + 'High': {"text":"高","color":"#ff7f00","value":"High"}, + 'Medium': {"text":"中","color":"#00cc00","value":"Medium"}, + 'Low': {"text":"低","color":"#999999","value":"Low"}, }; // HouseWorkOrdersLocationEnum -export const HouseWorkOrdersLocationEnum = { - CommonArea: { text: '公共区域', color: '#ff0000', value: 'CommonArea' }, - MyHome: { text: '房屋', color: '#00ff00', value: 'MyHome' }, - Office: { text: '办公室', color: '#0000ff', value: 'Office' }, +export const HouseWorkOrdersLocationEnum= { + 'CommonArea': {"text":"公共区域","color":"#ff0000","value":"CommonArea"}, + 'MyHome': {"text":"房屋","color":"#00ff00","value":"MyHome"}, }; // HouseWorkOrdersRefundStatusEnum -export const HouseWorkOrdersRefundStatusEnum = { - Refunding: { text: '退款中', color: '#FFA500', value: 'Refunding' }, - Refunded: { text: '已退款', color: '#28A745', value: 'Refunded' }, - PartialRefund: { text: '部分退款', color: '#17A2B8', value: 'PartialRefund' }, +export const HouseWorkOrdersRefundStatusEnum= { + 'Refunding': {"text":"退款中","color":"#FFA500","value":"Refunding"}, + 'Refunded': {"text":"已退款","color":"#28A745","value":"Refunded"}, + 'PartialRefund': {"text":"部分退款","color":"#17A2B8","value":"PartialRefund"}, }; // HouseWorkOrdersStatusEnum -export const HouseWorkOrdersStatusEnum = { - Pending: { text: '待处理', color: '#FFA500', value: 'Pending' }, - Processing: { text: '处理中', color: '#1E90FF', value: 'Processing' }, - PendingPayment: { text: '待支付', color: '#FF8C00', value: 'PendingPayment' }, - PendingAcceptance: { - text: '待验收', - color: '#17A2B8', - value: 'PendingAcceptance', - }, - Completed: { text: '已完成', color: '#28A745', value: 'Completed' }, - Closed: { text: '已关闭', color: '#6C757D', value: 'Closed' }, +export const HouseWorkOrdersStatusEnum= { + 'Pending': {"text":"待处理","color":"#FFA500","value":"Pending"}, + 'Processing': {"text":"处理中","color":"#1E90FF","value":"Processing"}, + 'PendingPayment': {"text":"待支付","color":"#FF8C00","value":"PendingPayment"}, + 'PendingAcceptance': {"text":"待验收","color":"#17A2B8","value":"PendingAcceptance"}, + 'Completed': {"text":"已完成","color":"#28A745","value":"Completed"}, + 'Closed': {"text":"已关闭","color":"#6C757D","value":"Closed"}, }; // HouseWorkOrdersTypeEnum -export const HouseWorkOrdersTypeEnum = { - Repair: { text: '报修', color: '#ff0000', value: 'Repair' }, - Incident: { text: '报事', color: '#00aaff', value: 'Incident' }, - Complaint: { text: '投诉', color: '#aa00ff', value: 'Complaint' }, - RenovationInspection: { - text: '装修巡检', - color: '#27ae60', - value: 'RenovationInspection', - }, - RenovationAcceptance: { - text: '装修验收', - color: '#f39c12', - value: 'RenovationAcceptance', - }, - SecurityInspection: { - text: '安防巡检', - color: '#3498db', - value: 'SecurityInspection', - }, - Emergency: { text: '突发事件', color: '#e74c3c', value: 'Emergency' }, - EquipmentMaintenance: { - text: '设备维保', - color: '#9b59b6', - value: 'EquipmentMaintenance', - }, - QualityCheck: { text: '品质检查', color: '#16a085', value: 'QualityCheck' }, +export const HouseWorkOrdersTypeEnum= { + 'Repair': {"text":"报修","color":"#ff0000","value":"Repair"}, + 'Incident': {"text":"报事","color":"#00aaff","value":"Incident"}, + 'Complaint': {"text":"投诉","color":"#aa00ff","value":"Complaint"}, }; -// MsgPropertyAnnouncementsObjectEnum -export const MsgPropertyAnnouncementsObjectEnum = { - Customer: { text: '客户', color: '#3b82f6', value: 'Customer' }, - Employee: { text: '员工', color: '#10b981', value: 'Employee' }, +// 公告接收对象 +export const MsgPropertyAnnouncementsObjectEnum= { + 'Customer': {"text":"客户","color":"#3b82f6","value":"Customer"}, + 'Employee': {"text":"员工","color":"#10b981","value":"Employee"}, }; // MsgPropertyAnnouncementsPublishTypeEnum -export const MsgPropertyAnnouncementsPublishTypeEnum = { - Manual: { text: '手动', color: '#4caf50', value: 'Manual' }, - Schedule: { text: '定时', color: '#2196f3', value: 'Schedule' }, +export const MsgPropertyAnnouncementsPublishTypeEnum= { + 'Manual': {"text":"手动","color":"#4caf50","value":"Manual"}, + 'Schedule': {"text":"定时","color":"#2196f3","value":"Schedule"}, }; // OrganizationsTypeEnum -export const OrganizationsTypeEnum = { - Group: { text: '集团', color: '#007bff', value: 'Group' }, - Company: { text: '公司', color: '#28a745', value: 'Company' }, - ManagementOffice: { - text: '管理处', - color: '#ffc107', - value: 'ManagementOffice', - }, - Department: { text: '部门', color: '#dc3545', value: 'Department' }, +export const OrganizationsTypeEnum= { + 'Group': {"text":"集团","color":"#007bff","value":"Group"}, + 'Company': {"text":"公司","color":"#28a745","value":"Company"}, + 'ManagementOffice': {"text":"管理处","color":"#ffc107","value":"ManagementOffice"}, + 'Department': {"text":"部门","color":"#dc3545","value":"Department"}, }; -// PatrolRoutesGenerationMethodEnum -export const PatrolRoutesGenerationMethodEnum = { - Daily: { text: '按天', color: '#007bff', value: 'Daily' }, - Weekly: { text: '按周', color: '#28a745', value: 'Weekly' }, - Monthly: { text: '按月', color: '#ffc107', value: 'Monthly' }, -}; - -// PatrolTaskLocationsStatusEnum -export const PatrolTaskLocationsStatusEnum = { - Incomplete: { text: '未完成', color: '#ff9800', value: 'Incomplete' }, - Completed: { text: '已完成', color: '#4caf50', value: 'Completed' }, -}; - -// PatrolTasksCreateTypeEnum -export const PatrolTasksCreateTypeEnum = { - Auto: { text: '定时生成', color: '#2196f3', value: 'Auto' }, - Manual: { text: '手动创建', color: '#4caf50', value: 'Manual' }, -}; - -// PatrolTasksStatusEnum -export const PatrolTasksStatusEnum = { - Unassigned: { text: '未分配', color: '#9e9e9e', value: 'Unassigned' }, - Pending: { text: '待执行', color: '#ff9800', value: 'Pending' }, - InProgress: { text: '进行中', color: '#2196f3', value: 'InProgress' }, - Completed: { text: '已完成', color: '#4caf50', value: 'Completed' }, - Canceled: { text: '已取消', color: '#f44336', value: 'Canceled' }, - Overdue: { text: '已超期', color: '#e91e63', value: 'Overdue' }, -}; - -// QuestionsTypeEnum -export const QuestionsTypeEnum = { - Score: { text: '评分题', color: '#4caf50', value: 'Score' }, - Fill: { text: '填空题', color: '#2196f3', value: 'Fill' }, -}; - -// RefundsStatusEnum -export const RefundsStatusEnum = { - Pending: { text: '待审批', color: '#ff9800', value: 'Pending' }, - Reviewing: { text: '审核中', color: '#2196f3', value: 'Reviewing' }, - Approved: { text: '已审批', color: '#9c27b0', value: 'Approved' }, - Processing: { text: '退款中', color: '#00bcd4', value: 'Processing' }, - Completed: { text: '已退款', color: '#4caf50', value: 'Completed' }, - PartialRefund: { text: '部分退款', color: '#8bc34a', value: 'PartialRefund' }, - Rejected: { text: '已拒绝', color: '#f44336', value: 'Rejected' }, - Failed: { text: '退款失败', color: '#e91e63', value: 'Failed' }, - Cancelled: { text: '已取消', color: '#9e9e9e', value: 'Cancelled' }, -}; - -// RefundsTypeEnum -export const RefundsTypeEnum = { - HouseOrder: { text: '物业账单', color: '#2196f3', value: 'HouseOrder' }, - 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' }, -}; - -// RenovationAppliesAcceptanceStatusEnum -export const RenovationAppliesAcceptanceStatusEnum = { - PendingAcceptance: { - text: '待验收', - color: '#f1c40f', - value: 'PendingAcceptance', - }, - Accepted: { text: '验收合格', color: '#2ecc71', value: 'Accepted' }, - Rejected: { text: '验收不合格', color: '#e74c3c', value: 'Rejected' }, - Cancelled: { text: '已取消', color: '#95a5a6', value: 'Cancelled' }, -}; - -// RenovationAppliesConstructionStatusEnum -export const RenovationAppliesConstructionStatusEnum = { - PendingConstruction: { - text: '待施工', - color: '#f1c40f', - value: 'PendingConstruction', - }, - NormalConstruction: { - text: '正常施工', - color: '#2ecc71', - value: 'NormalConstruction', - }, - StoppedConstruction: { - text: '已停工', - color: '#e74c3c', - value: 'StoppedConstruction', - }, - CompletedConstruction: { - text: '已竣工', - color: '#3498db', - value: 'CompletedConstruction', - }, -}; - -// RenovationAppliesProcessTypeEnum -export const RenovationAppliesProcessTypeEnum = { - OwnerProcess: { text: '业主办理', color: '#3498db', value: 'OwnerProcess' }, - AgentProcess: { text: '代理人办理', color: '#9b59b6', value: 'AgentProcess' }, -}; - -// RenovationAppliesRenovationContentEnum -export const RenovationAppliesRenovationContentEnum = { - PartialRenovation: { - text: '局部装修', - color: '#f39c12', - value: 'PartialRenovation', - }, - FullHouseRenovation: { - text: '全屋装修', - color: '#2ecc71', - value: 'FullHouseRenovation', - }, - PartialRefurbishment: { - text: '部分翻新', - color: '#3498db', - value: 'PartialRefurbishment', - }, -}; - -// RenovationAppliesStatusEnum -export const RenovationAppliesStatusEnum = { - Draft: { text: '暂存', color: '#f39c12', value: 'Draft' }, - Pending: { text: '审核中', color: '#faad14', value: 'Pending' }, - Approved: { text: '已完成', color: '#52c41a', value: 'Approved' }, - Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' }, - Cancelled: { text: '作废', color: '#9b59b6', value: 'Cancelled' }, -}; - -// RenovationAppliesTypeEnum -export const RenovationAppliesTypeEnum = { - SelfRenovation: { text: '自装', color: '#1abc9c', value: 'SelfRenovation' }, - RenovationCompany: { - text: '装修公司', - color: '#e67e22', - value: 'RenovationCompany', - }, -}; - -// ResourceOrdersPaymentStatusEnum -export const ResourceOrdersPaymentStatusEnum = { - Unpaid: { text: '未支付', color: '#f59e0b', value: 'Unpaid' }, - Paid: { text: '已支付', color: '#10b981', value: 'Paid' }, - Refunded: { text: '已退款', color: '#3b82f6', value: 'Refunded' }, -}; - -// ResourceOrdersStatusEnum -export const ResourceOrdersStatusEnum = { - Locked: { text: '已锁定', color: '#8b5cf6', value: 'Locked' }, - Reserved: { text: '已预约', color: '#3b82f6', value: 'Reserved' }, - Used: { text: '已使用', color: '#10b981', value: 'Used' }, - Overed: { text: '已结束', color: '#fca5a5', value: 'Overed' }, - Refunding: { text: '退订中', color: '#f59e0b', value: 'Refunding' }, - Refunded: { text: '已退订', color: '#ef4444', value: 'Refunded' }, - Closed: { text: '已关闭', color: '#6b7280', value: 'Closed' }, -}; - -// ResourceTypesTypeEnum -export const ResourceTypesCategoryEnum = { - Advertising: { text: '广告', color: '#ff9800', value: 'Advertising' }, - Venue: { text: '场地', color: '#4caf50', value: 'Venue' }, -}; - -// ResourcesChannelEnum -export const ResourcesChannelEnum = { - Consumer: { text: 'ToC', color: '#3b82f6', value: 'Consumer' }, - Business: { text: 'ToB', color: '#10b981', value: 'Business' }, -}; - -// ResourcesOpenDaysEnum -export const ResourcesOpenDaysEnum = { - Monday: { text: '星期一', color: '#3b82f6', value: 'Monday' }, - Tuesday: { text: '星期二', color: '#3b82f6', value: 'Tuesday' }, - Wednesday: { text: '星期三', color: '#3b82f6', value: 'Wednesday' }, - Thursday: { text: '星期四', color: '#3b82f6', value: 'Thursday' }, - Friday: { text: '星期五', color: '#3b82f6', value: 'Friday' }, - Saturday: { text: '星期六', color: '#10b981', value: 'Saturday' }, - Sunday: { text: '星期日', color: '#ef4444', value: 'Sunday' }, -}; - -// ResourcesReservationRuleEnum -export const ResourcesReservationRuleEnum = { - ByDay: { text: '按天', color: '#3b82f6', value: 'ByDay' }, - BySession: { text: '按场次', color: '#10b981', value: 'BySession' }, -}; - -// ResourcesReservationStatusEnum -export const ResourcesReservationStatusEnum = { - Fully: { text: '全部预约', color: '#4caf50', value: 'Fully' }, - Partially: { text: '部分预约', color: '#ff9800', value: 'Partially' }, - Not: { text: '无预约', color: '#f44336', value: 'Not' }, +// 退款状态枚举 +export const RefundsStatusEnum= { + 'Pending': {"text":"待审批","color":"#ff9800","value":"Pending"}, + 'Reviewing': {"text":"审核中","color":"#2196f3","value":"Reviewing"}, + 'Approved': {"text":"已审批","color":"#9c27b0","value":"Approved"}, + 'Processing': {"text":"退款中","color":"#00bcd4","value":"Processing"}, + 'Completed': {"text":"已退款","color":"#4caf50","value":"Completed"}, + 'PartialRefund': {"text":"部分退款","color":"#8bc34a","value":"PartialRefund"}, + 'Rejected': {"text":"已拒绝","color":"#f44336","value":"Rejected"}, + 'Failed': {"text":"退款失败","color":"#e91e63","value":"Failed"}, + 'Cancelled': {"text":"已取消","color":"#9e9e9e","value":"Cancelled"}, }; // 性别 -export const SexEnum = { - Male: { text: '男', color: '#0000ff', value: 'Male' }, - FeMale: { text: '女', color: '#ff0000', value: 'FeMale' }, -}; - -// SurveyReleasesTypeEnum -export const SurveyReleasesTypeEnum = { - Manual: { text: '手动发布', color: '#4caf50', value: 'Manual' }, - Timing: { text: '定时发布', color: '#2196f3', value: 'Timing' }, +export const SexEnum= { + 'Male': {"text":"男","color":"#0000ff","value":"Male"}, + 'FeMale': {"text":"女","color":"#ff0000","value":"FeMale"}, }; // SysModuleEnum -export const SysModuleEnum = { - Admin: { text: '管理员', color: '#cf1322', value: 'Admin' }, - Customer: { text: '客户', color: '#d4b106', value: 'Customer' }, +export const SysModuleEnum= { + 'Admin': {"text":"管理员","color":"#cf1322","value":"Admin"}, + 'Customer': {"text":"客户","color":"#d4b106","value":"Customer"}, + 'Company': {"text":"机构","color":"#1890ff","value":"Company"}, }; // SysPermissionsTypeEnum -export const SysPermissionsTypeEnum = { - Directory: { text: '目录', color: '#6d7e14', value: 'Directory' }, - Page: { text: '页面', color: '#4d9a13', value: 'Page' }, - Tab: { text: '页签', color: '#1d6fb8', value: 'Tab' }, - 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' }, +export const SysPermissionsTypeEnum= { + 'Directory': {"text":"目录","color":"#6d7e14","value":"Directory"}, + 'Page': {"text":"页面","color":"#4d9a13","value":"Page"}, + 'Button': {"text":"按钮","color":"#97224f","value":"Button"}, }; // WechatAuthsPlatformEnum -export const WechatAuthsPlatformEnum = { - MiniProgram: { text: '微信小程序', color: '#3b82f6', value: 'MiniProgram' }, - MpOfficial: { text: '微信公众号', color: '#22c55e', value: 'MpOfficial' }, - WorkWechat: { text: '企业微信', color: '#6366f1', value: 'WorkWechat' }, +export const WechatAuthsPlatformEnum= { + 'MiniProgram': {"text":"微信小程序","color":"#3b82f6","value":"MiniProgram"}, + 'MpOfficial': {"text":"微信公众号","color":"#22c55e","value":"MpOfficial"}, + 'WorkWechat': {"text":"企业微信","color":"#6366f1","value":"WorkWechat"}, }; + diff --git a/src/pages/approval/all/index.tsx b/src/pages/approval/all/index.tsx deleted file mode 100644 index b41698a..0000000 --- a/src/pages/approval/all/index.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { MyColumns, MyPageContainer, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Show from './modals/Show'; - -export default function Index({ title = '审批列表' }) { - return ( - - - MyProTableProps.request( - params, - sort, - Apis.Approval.ApprovalInstances.List, - ) - } - headerTitle={title} - columns={[ - MyColumns.ID({ search: false }), - MyColumns.EnumTag({ - title: '状态', - dataIndex: 'status', - // valueEnum: ApprovalInstancesStatusEnum, - }), - MyColumns.EnumTag({ - dataIndex: 'type', - title: '类型', - // valueEnum: ApprovalTemplatesTypeEnum, - search: false, - }), - { - title: '申请事项', - dataIndex: 'title', - search: false, - }, - { - title: '关联项目', - dataIndex: ['asset_project', 'name'], - search: false, - }, - { - title: '申请人', - dataIndex: ['applicant', 'name'], - search: false, - }, - { - title: '当前审批人', - dataIndex: ['approval_records', 'approver_name'], - search: false, - render: (_, item: any) => - `${item?.approval_records?.[0]?.company_employee?.name || ''}-${ - item?.approval_records?.[0]?.company_employee?.phone || '' - }`, - }, - - { - title: '项目ID', - dataIndex: 'asset_projects_id', - hidden: true, - }, - { - title: '申请人', - dataIndex: 'applicant_name', - hidden: true, - }, - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/all/modals/Show.tsx b/src/pages/approval/all/modals/Show.tsx deleted file mode 100644 index 71509a9..0000000 --- a/src/pages/approval/all/modals/Show.tsx +++ /dev/null @@ -1,254 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyModalFormProps, - renderTextHelper, -} from '@/common'; - -import { Apis } from '@/gen/Apis'; -import { - ContractsSettlementModeEnum, - ContractTemplatesIncomeExpenseTypeEnum, - RefundsTypeEnum, -} from '@/gen/Enums'; -import BIllInfo from '@/pages/bills/house_bills/modals/BIllInfo'; -import { - BetaSchemaForm, - ProCard, - ProDescriptions, -} from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Form, Space, Steps } from 'antd'; - -export default function Update(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - const navigate = useNavigate(); - - return ( - - {...MyModalFormProps.props} - title={props.title} - trigger={} - wrapperCol={{ span: 24 }} - width="600px" - key={new Date().getTime()} - form={form} - onOpenChange={() => { - if (props?.item?.id) { - Apis.Approval.ApprovalInstances.Show({ - id: props.item?.model_id, - }).then((res) => { - form.setFieldsValue({ - info_display: res?.data, - }); - }); - } - }} - columns={[ - { - // title: '登记信息', - dataIndex: 'info_display', - valueType: 'text', - renderFormItem: (_, config) => ( - -
- {/* 退款详情 */} - {config?.value?.type === 'Refund' && ( - - - - {config?.value?.title || '-'} - - - - - - - {config?.value?.model?.refund_amount || '-'} - 元 - - - - - {config?.value?.model?.payer_name || '-'}| - {config?.value?.model?.payer_bank || '-'}| - {config?.value?.model?.payer_account || '-'} - - - {config?.value?.model?.payee_name || '-'} - {config?.value?.model?.payee_bank || '-'} - {config?.value?.model?.payee_account || '-'} - - - {props?.item?.applicant?.name || '-'}: - {props?.item?.applicant?.phone || '-'} - - - {props?.item?.created_at || '-'} - - - - )} - {/* 合同详情 */} - {config?.value?.type === 'Contract' && ( - - - - {config?.value?.model?.name || '-'} - - - - - {config?.value?.model?.code || '-'} - - { - navigate( - `/contract/contracts/show/${config?.value?.model?.id}`, - ); - }} - /> - - - - - - - - - - {config?.value?.model?.contract_type_name || '-'} - - - - - - {config?.value?.model?.total_amount || '-'} - - - {config?.value?.model?.deposit_amount || '无'} - - - {config?.value?.model?.sign_subject || '-'} - - - {config?.value?.model?.sign_department || '-'} - - - {config?.value?.model?.project_name || '-'} - - - {config?.value?.model?.contract_liaison || '-'} - - - {config?.value?.model?.start_time?.substring(0, 10)}至 - {config?.value?.model?.end_time?.substring(0, 10)} - - - {props?.item?.applicant?.name || '-'}: - {props?.item?.applicant?.phone || '-'} - - - {props?.item?.created_at || '-'} - - - {config?.value?.model?.attachments.map((item: any) => { - const handleDownload = async ( - e: React.MouseEvent, - ) => { - e.preventDefault(); - try { - const response = await fetch(item.url); - const blob = await response.blob(); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = item.name; - document.body.appendChild(a); - a.click(); - window.URL.revokeObjectURL(url); - document.body.removeChild(a); - } catch (error) { - console.error('下载失败:', error); - // 如果下载失败,则在新窗口打开 - window.open(item.url, '_blank'); - } - }; - - return ( - - ); - })} - - - - )} - - - - - - item?.node_type === 'Approver' - ? { - title: `${ - item.company_employee?.name || '-' - }-${item?.company_employee?.phone}`, - description: `${ - item.status === 'Approved' - ? `通过 - ${item.opinion || '-'} - ${ - item.created_at || '-' - }` - : '待审核' - }`, - } - : '', - )} - /> - - - - -
-
- ), - colProps: { span: 24 }, - }, - ]} - /> - ); -} diff --git a/src/pages/approval/approval/index.tsx b/src/pages/approval/approval/index.tsx deleted file mode 100644 index 0778764..0000000 --- a/src/pages/approval/approval/index.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { MyColumns, MyPageContainer, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Space } from 'antd'; -import Audit from '../pending/modals/Audit'; - -export default function Index({ title = '待我审批' }) { - const navigate = useNavigate(); - return ( - - - MyProTableProps.request( - { - status: 'Pending', - ...params, - }, - sort, - Apis.Approval.ApprovalInstances.PendingList, - ) - } - headerTitle="待我审批" - columns={[ - MyColumns.ID({ search: false }), - MyColumns.EnumTag({ - title: '状态', - dataIndex: 'status', - // valueEnum: ApprovalInstancesStatusEnum, - }), - MyColumns.EnumTag({ - dataIndex: ['approval_instance', 'type'], - title: '类型', - // valueEnum: ApprovalTemplatesTypeEnum, - search: false, - }), - { - title: '申请事项', - dataIndex: ['approval_instance', 'title'], - search: false, - }, - { - title: '关联项目', - dataIndex: ['approval_instance', 'asset_project', 'name'], - search: false, - }, - - { - title: '申请人', - dataIndex: 'approver_name', - }, - - // { - // title: '有效期', - // search: false, - // render: (_, item: any) => { - // return `${dayjs( - // item?.approval_instance?.model?.start_time, - // ).format('YYYY-MM-DD')}至${dayjs( - // item?.approval_instance?.model?.end_time, - // ).format('YYYY-MM-DD')}`; - // }, - // }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/cc_me/index.tsx b/src/pages/approval/cc_me/index.tsx deleted file mode 100644 index 4abacce..0000000 --- a/src/pages/approval/cc_me/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { MyColumns, MyPageContainer, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Show from './modals/Show'; -export default function Index({ title = '抄送我的' }) { - return ( - - - MyProTableProps.request( - params, - sort, - Apis.Approval.ApprovalInstances.CcList, - ) - } - headerTitle={title} - columns={[ - MyColumns.ID({ search: false }), - { - title: '申请事项', - dataIndex: 'title', - search: false, - }, - { - title: '关联项目', - dataIndex: ['asset_project', 'name'], - search: false, - }, - MyColumns.EnumTag({ - title: '状态', - dataIndex: 'status', - // valueEnum: ApprovalInstancesStatusEnum, - }), - MyColumns.EnumTag({ - dataIndex: 'type', - title: '业务类型', - // valueEnum: ApprovalTemplatesTypeEnum, - search: false, - }), - - // { - // title: '项目ID', - // dataIndex: 'asset_projects_id', - // hidden: true, - // }, - // { - // title: '申请人', - // dataIndex: 'applicant_name', - // search: false, - // }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/cc_me/modals/Show.tsx b/src/pages/approval/cc_me/modals/Show.tsx deleted file mode 100644 index 7be7c65..0000000 --- a/src/pages/approval/cc_me/modals/Show.tsx +++ /dev/null @@ -1,255 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyModalFormProps, - renderTextHelper, -} from '@/common'; - -import { Apis } from '@/gen/Apis'; -import { - ContractsContractNatureEnum, - ContractsSettlementModeEnum, - ContractTemplatesIncomeExpenseTypeEnum, - RefundsTypeEnum, -} from '@/gen/Enums'; -import BIllInfo from '@/pages/bills/house_bills/modals/BIllInfo'; -import { - BetaSchemaForm, - ProCard, - ProDescriptions, -} from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Form, Space, Steps } from 'antd'; - -export default function Update(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - const navigate = useNavigate(); - - return ( - - {...MyModalFormProps.props} - title={props.title} - trigger={} - wrapperCol={{ span: 24 }} - width="600px" - key={new Date().getTime()} - form={form} - onOpenChange={() => { - if (props?.item?.id) { - Apis.Approval.ApprovalInstances.Show({ - id: props.item?.model_id, - }).then((res) => { - form.setFieldsValue({ - info_display: res?.data, - }); - }); - } - }} - columns={[ - { - // title: '登记信息', - dataIndex: 'info_display', - valueType: 'text', - renderFormItem: (_, config) => ( - -
- {/* 退款详情 */} - {config?.value?.type === 'Refund' && ( - - - - {config?.value?.title || '-'} - - - - - - - {config?.value?.model?.refund_amount || '-'} - 元 - - - - - {config?.value?.model?.payer_name || '-'}| - {config?.value?.model?.payer_bank || '-'}| - {config?.value?.model?.payer_account || '-'} - - - {config?.value?.model?.payee_name || '-'} - {config?.value?.model?.payee_bank || '-'} - {config?.value?.model?.payee_account || '-'} - - - {props?.item?.applicant?.name || '-'}: - {props?.item?.applicant?.phone || '-'} - - - {props?.item?.created_at || '-'} - - - - )} - {/* 合同详情 */} - {config?.value?.type === 'Contract' && ( - - - - {config?.value?.model?.name || '-'} - - - - - {config?.value?.model?.code || '-'} - - { - navigate( - `/contract/contracts/show/${config?.value?.model?.id}`, - ); - }} - /> - - - - - - - - - - {config?.value?.model?.contract_type_name || '-'} - - - - - - {config?.value?.model?.total_amount || '-'} - - - {config?.value?.model?.deposit_amount || '无'} - - - {config?.value?.model?.sign_subject || '-'} - - - {config?.value?.model?.sign_department || '-'} - - - {config?.value?.model?.project_name || '-'} - - - {config?.value?.model?.contract_liaison || '-'} - - - {config?.value?.model?.start_time?.substring(0, 10)}至 - {config?.value?.model?.end_time?.substring(0, 10)} - - - {props?.item?.applicant?.name || '-'}: - {props?.item?.applicant?.phone || '-'} - - - {props?.item?.created_at || '-'} - - - {config?.value?.model?.attachments.map((item: any) => { - const handleDownload = async ( - e: React.MouseEvent, - ) => { - e.preventDefault(); - try { - const response = await fetch(item.url); - const blob = await response.blob(); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = item.name; - document.body.appendChild(a); - a.click(); - window.URL.revokeObjectURL(url); - document.body.removeChild(a); - } catch (error) { - console.error('下载失败:', error); - // 如果下载失败,则在新窗口打开 - window.open(item.url, '_blank'); - } - }; - - return ( - - ); - })} - - - - )} - - - - - - item?.node_type === 'Approver' - ? { - title: `${ - item.company_employee?.name || '-' - }-${item?.company_employee?.phone}`, - description: `${ - item.status === 'Approved' - ? `通过 - ${item.opinion || '-'} - ${ - item.created_at || '-' - }` - : '待审核' - }`, - } - : '', - )} - /> - - - - -
-
- ), - colProps: { span: 24 }, - }, - ]} - /> - ); -} diff --git a/src/pages/approval/my_apply/index.tsx b/src/pages/approval/my_apply/index.tsx deleted file mode 100644 index 66b4ba7..0000000 --- a/src/pages/approval/my_apply/index.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { - MyButtons, - MyColumns, - MyPageContainer, - MyProTableProps, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -export default function Index({ title = '我的发起' }) { - return ( - - - MyProTableProps.request( - params, - sort, - Apis.Approval.ApprovalInstances.MyApplyList, - ) - } - headerTitle={title} - columns={[ - MyColumns.ID({ search: false }), - { - title: '申请事项', - dataIndex: 'title', - search: false, - }, - { - title: '关联项目', - dataIndex: ['asset_project', 'name'], - search: false, - }, - MyColumns.EnumTag({ - title: '状态', - dataIndex: 'status', - // valueEnum: ApprovalInstancesStatusEnum, - }), - MyColumns.EnumTag({ - dataIndex: 'type', - title: '业务类型', - // valueEnum: ApprovalTemplatesTypeEnum, - search: false, - }), - { - title: '当前审批人', - dataIndex: ['approval_records', 'approver_name'], - search: false, - render: (_, item: any) => - `${item?.approval_records?.[0]?.company_employee?.name || ''}-${ - item?.approval_records?.[0]?.company_employee?.phone || '' - }`, - }, - // { - // title: '项目ID', - // dataIndex: 'asset_projects_id', - // hidden: true, - // }, - // { - // title: '申请人', - // dataIndex: 'applicant_name', - // search: false, - // }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - {/* */} - - Apis.Approval.ApprovalInstances.Cancel({ - id: item.id, - }).then(() => action?.reload()) - } - /> - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/my_processed/index.tsx b/src/pages/approval/my_processed/index.tsx deleted file mode 100644 index 9f33b99..0000000 --- a/src/pages/approval/my_processed/index.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { MyColumns, MyPageContainer, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Show from './modals/Show'; -export default function Index({ title = '我的发起' }) { - return ( - - - MyProTableProps.request( - params, - sort, - Apis.Approval.ApprovalInstances.ProcessedList, - ) - } - headerTitle={title} - columns={[ - MyColumns.ID({ search: false }), - { - title: '申请事项', - dataIndex: 'title', - search: false, - }, - { - title: '关联项目', - dataIndex: ['asset_project', 'name'], - search: false, - }, - MyColumns.EnumTag({ - title: '状态', - dataIndex: 'status', - // valueEnum: ApprovalInstancesStatusEnum, - }), - MyColumns.EnumTag({ - dataIndex: 'type', - title: '业务类型', - // valueEnum: ApprovalTemplatesTypeEnum, - search: false, - }), - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/my_processed/modals/Show.tsx b/src/pages/approval/my_processed/modals/Show.tsx deleted file mode 100644 index 6df6c25..0000000 --- a/src/pages/approval/my_processed/modals/Show.tsx +++ /dev/null @@ -1,255 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyModalFormProps, - renderTextHelper, -} from '@/common'; - -import { Apis } from '@/gen/Apis'; -import { - ContractsContractNatureEnum, - ContractsSettlementModeEnum, - ContractTemplatesIncomeExpenseTypeEnum, - RefundsTypeEnum, -} from '@/gen/Enums'; -import BIllInfo from '@/pages/bills/house_bills/modals/BIllInfo'; -import { - BetaSchemaForm, - ProCard, - ProDescriptions, -} from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Form, Space, Steps } from 'antd'; - -export default function Update(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - const navigate = useNavigate(); - - return ( - - {...MyModalFormProps.props} - title={props.title} - trigger={} - wrapperCol={{ span: 24 }} - width="600px" - key={new Date().getTime()} - form={form} - onOpenChange={() => { - if (props?.item?.id) { - Apis.Approval.ApprovalInstances.Show({ - id: props.item?.model_id, - }).then((res) => { - form.setFieldsValue({ - info_display: res?.data, - }); - }); - } - }} - columns={[ - { - // title: '登记信息', - dataIndex: 'info_display', - valueType: 'text', - renderFormItem: (_, config) => ( - -
- {/* 退款详情 */} - {config?.value?.type === 'Refund' && ( - - - - {config?.value?.title || '-'} - - - - - - - {config?.value?.model?.refund_amount || '-'} - 元 - - - - - {config?.value?.model?.payer_name || '-'}| - {config?.value?.model?.payer_bank || '-'}| - {config?.value?.model?.payer_account || '-'} - - - {config?.value?.model?.payee_name || '-'} - {config?.value?.model?.payee_bank || '-'} - {config?.value?.model?.payee_account || '-'} - - - {props?.item?.applicant?.name || '-'}: - {props?.item?.applicant?.phone || '-'} - - - {props?.item?.created_at || '-'} - - - - )} - {/* 合同详情 */} - {config?.value?.type === 'Contract' && ( - - - - {config?.value?.model?.name || '-'} - - - - - {config?.value?.model?.code || '-'} - - { - navigate( - `/contract/contracts/show/${config?.value?.model?.id}`, - ); - }} - /> - - - - - - - - - - {config?.value?.model?.contract_type_name || '-'} - - - - - - {config?.value?.model?.total_amount || '-'} - - - {config?.value?.model?.deposit_amount || '无'} - - - {config?.value?.model?.sign_subject || '-'} - - - {config?.value?.model?.sign_department || '-'} - - - {config?.value?.model?.project_name || '-'} - - - {config?.value?.model?.contract_liaison || '-'} - - - {config?.value?.model?.start_time?.substring(0, 10)}至 - {config?.value?.model?.end_time?.substring(0, 10)} - - - {props?.item?.applicant?.name || '-'}: - {props?.item?.applicant?.phone || '-'} - - - {props?.item?.created_at || '-'} - - - {config?.value?.model?.attachments.map((item: any) => { - const handleDownload = async ( - e: React.MouseEvent, - ) => { - e.preventDefault(); - try { - const response = await fetch(item.url); - const blob = await response.blob(); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = item.name; - document.body.appendChild(a); - a.click(); - window.URL.revokeObjectURL(url); - document.body.removeChild(a); - } catch (error) { - console.error('下载失败:', error); - // 如果下载失败,则在新窗口打开 - window.open(item.url, '_blank'); - } - }; - - return ( - - ); - })} - - - - )} - - - - - - item?.node_type === 'Approver' - ? { - title: `${ - item.company_employee?.name || '-' - }-${item?.company_employee?.phone}`, - description: `${ - item.status === 'Approved' - ? `通过 - ${item.opinion || '-'} - ${ - item.created_at || '-' - }` - : '待审核' - }`, - } - : '', - )} - /> - - - - -
-
- ), - colProps: { span: 24 }, - }, - ]} - /> - ); -} diff --git a/src/pages/approval/pending/index.tsx b/src/pages/approval/pending/index.tsx deleted file mode 100644 index 8b94e03..0000000 --- a/src/pages/approval/pending/index.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { - MyButtons, - MyColumns, - MyPageContainer, - MyProTableProps, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ApprovalInstancesStatusEnum } from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Audit from './modals/Audit'; -export default function Index({ title = '我的待办' }) { - return ( - - - MyProTableProps.request( - { - ...params, - status: ApprovalInstancesStatusEnum.Pending.value, - }, - sort, - Apis.Approval.ApprovalInstances.PendingList, - ) - } - headerTitle={title} - columns={[ - MyColumns.ID({ search: false }), - { - title: '申请事项', - dataIndex: ['approval_instance', 'title'], - search: false, - }, - { - title: '关联项目', - dataIndex: ['approval_instance', 'asset_project', 'name'], - search: false, - }, - MyColumns.EnumTag({ - title: '状态', - dataIndex: ['approval_instance', 'status'], - // valueEnum: ApprovalInstancesStatusEnum, - }), - MyColumns.EnumTag({ - dataIndex: ['approval_instance', 'type'], - title: '业务类型', - // valueEnum: ApprovalTemplatesTypeEnum, - search: false, - }), - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - - Apis.Approval.ApprovalInstances.Cancel({ - id: item.id, - }).then(() => action?.reload()) - } - /> - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/pending/modals/Audit.tsx b/src/pages/approval/pending/modals/Audit.tsx deleted file mode 100644 index f0c4183..0000000 --- a/src/pages/approval/pending/modals/Audit.tsx +++ /dev/null @@ -1,326 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - renderTextHelper, - rulesHelper, -} from '@/common'; - -import { Apis } from '@/gen/Apis'; -import { - ContractsContractNatureEnum, - ContractsSettlementModeEnum, - ContractTemplatesIncomeExpenseTypeEnum, - HouseRegistersStatusEnum, - RefundsTypeEnum, -} from '@/gen/Enums'; -import BIllInfo from '@/pages/bills/house_bills/modals/BIllInfo'; -import { - BetaSchemaForm, - ProCard, - ProDescriptions, -} from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Form, message, Space, Steps } from 'antd'; - -export default function Update(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - const navigate = useNavigate(); - - // 监听status字段变化,动态设置默认审批意见 - const handleStatusChange = (changedValues: any) => { - if (changedValues.status) { - if (changedValues.status === HouseRegistersStatusEnum.Approved.value) { - form.setFieldsValue({ opinion: '同意' }); - } else if ( - changedValues.status === HouseRegistersStatusEnum.Rejected.value - ) { - form.setFieldsValue({ opinion: '不同意' }); - } - } - }; - - return ( - - {...MyModalFormProps.props} - title={props.title} - trigger={} - wrapperCol={{ span: 24 }} - width="600px" - key={new Date().getTime()} - form={form} - onOpenChange={() => { - if (props?.item?.id) { - Apis.Approval.ApprovalInstances.Show({ - id: props.item?.approval_instances_id, - }).then((res) => { - form.setFieldsValue({ - info_display: res?.data, - }); - }); - } - }} - initialValues={{ - // 默认选择通过,审批意见为同意 - status: HouseRegistersStatusEnum.Approved.value, - opinion: '同意', - }} - onValuesChange={handleStatusChange} - onFinish={async (values: any) => - Apis.Approval.ApprovalInstances.Approve({ - record_id: props.item?.id ?? 0, - ...values, - }) - .then(() => { - props.reload?.(); - message.success(props.title + '成功'); - return true; - }) - .catch(() => false) - } - columns={[ - { - // title: '登记信息', - dataIndex: 'info_display', - valueType: 'text', - renderFormItem: (_, config) => ( - -
- {/* 退款详情 */} - {config?.value?.type === 'Refund' && ( - - - - {config?.value?.title || '-'} - - - - - - - {config?.value?.model?.refund_amount || '-'} - 元 - - - - - {config?.value?.model?.payer_name || '-'}| - {config?.value?.model?.payer_bank || '-'}| - {config?.value?.model?.payer_account || '-'} - - - {config?.value?.model?.payee_name || '-'} - {config?.value?.model?.payee_bank || '-'} - {config?.value?.model?.payee_account || '-'} - - - - {props?.item?.created_at || '-'} - - - - )} - {/* 合同详情 */} - {config?.value?.type === 'Contract' && ( - - - - {config?.value?.model?.name || '-'} - - - - - {config?.value?.model?.code || '-'} - - { - navigate( - `/contract/contracts/show/${config?.value?.model?.id}`, - ); - }} - /> - - - - - - - - - - {config?.value?.model?.contract_type_name || '-'} - - - - - - {config?.value?.model?.total_amount || '-'} - - - {config?.value?.model?.deposit_amount || '无'} - - - {config?.value?.model?.sign_subject || '-'} - - - {config?.value?.model?.sign_department || '-'} - - - {config?.value?.model?.project_name || '-'} - - - {config?.value?.model?.contract_liaison || '-'} - - - {config?.value?.model?.start_time?.substring(0, 10)}至 - {config?.value?.model?.end_time?.substring(0, 10)} - - - {props?.item?.created_at || '-'} - - - {config?.value?.model?.attachments.map((item: any) => { - const handleDownload = async ( - e: React.MouseEvent, - ) => { - e.preventDefault(); - try { - const response = await fetch(item.url); - const blob = await response.blob(); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = item.name; - document.body.appendChild(a); - a.click(); - window.URL.revokeObjectURL(url); - document.body.removeChild(a); - } catch (error) { - console.error('下载失败:', error); - // 如果下载失败,则在新窗口打开 - window.open(item.url, '_blank'); - } - }; - - return ( - - ); - })} - - - - )} - - - - - - item?.node_type === 'Approver' - ? { - title: `${ - item.company_employee?.name || '-' - }-${item?.company_employee?.phone}`, - description: `${ - item.status === 'Approved' - ? `通过 - ${item.opinion || '-'} - ${ - item.created_at || '-' - }` - : '待审核' - }`, - } - : '', - )} - /> - - - - -
-
- ), - colProps: { span: 24 }, - }, - { - valueType: 'group', - // title: '审核操作', - columns: [ - MyFormItems.EnumRadio({ - key: 'status', - title: '审核操作', - colProps: { span: 24 }, - valueEnum: () => { - let obj: any = JSON.parse( - JSON.stringify(HouseRegistersStatusEnum), - ); - delete obj.Pending; - return obj; - }, - required: true, - }), - { - valueType: 'dependency', - name: ['status'], - columns: ({ status }) => { - return status === 'Rejected' - ? [ - { - title: '审批意见', - dataIndex: 'opinion', - valueType: 'textarea', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 24 }, - }, - ] - : [ - { - title: '审批意见', - dataIndex: 'opinion', - valueType: 'textarea', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 24 }, - }, - ]; - }, - }, - ], - }, - ]} - /> - ); -} diff --git a/src/pages/approval/templates/index.tsx b/src/pages/approval/templates/index.tsx deleted file mode 100644 index b4e8fed..0000000 --- a/src/pages/approval/templates/index.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { - MyButtons, - MyColumns, - MyPageContainer, - MyProTableProps, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Create from './modals/Create'; -import Update from './modals/Update'; - -export default function Index({ title = '审批模板' }) { - return ( - - - MyProTableProps.request( - params, - sort, - Apis.Approval.ApprovalTemplates.List, - ) - } - headerTitle={title} - toolBarRender={(action) => [ - , - ]} - columns={[ - MyColumns.ID({ - search: false, - }), - MyColumns.EnumTag({ - title: '业务类型', - dataIndex: 'type', - // valueEnum: ApprovalTemplatesTypeEnum, - }), - { - title: '模版名称', - dataIndex: 'name', - }, - { - title: '模版编码', - dataIndex: 'code', - search: false, - }, - - MyColumns.ToggleEnabled({ - onToggleEnabled: Apis.Approval.ApprovalTemplates.ToggleEnabled, - search: false, - }), - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - - Apis.Approval.ApprovalTemplates.SoftDelete({ - id: item.id, - }).then(() => action?.reload()) - } - /> - - ), - }), - ]} - /> - - ); -} diff --git a/src/pages/approval/templates/modals/Create.tsx b/src/pages/approval/templates/modals/Create.tsx deleted file mode 100644 index 408f373..0000000 --- a/src/pages/approval/templates/modals/Create.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { ApprovalTemplateNodesNodeTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function Create(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - return ( - - {...MyModalFormProps.props} - title={`添加${props.title}`} - wrapperCol={{ span: 24 }} - width="700px" - key={new Date().getTime()} - form={form} - onOpenChange={(open: any) => { - if (open) { - form.resetFields(); // 清空表单数据 - } - }} - trigger={} - onFinish={async (values) => - Apis.Approval.ApprovalTemplates.Store({ - ...values, - is_enabled: true, - }) - .then(() => { - props.reload?.(); - message.success(props.title + '成功'); - return true; - }) - .catch(() => false) - } - columns={[ - MyFormItems.EnumRadio({ - key: 'type', - title: '业务类型', - // valueEnum: ApprovalTemplatesTypeEnum, - required: true, - colProps: { span: 24 }, - }), - { - key: 'name', - title: '模板名称', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 12 }, - }, - { - key: 'code', - title: '模板编码', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 12 }, - }, - { - valueType: 'formList', - dataIndex: 'nodes', - title: '设置审批节点', - fieldProps: { - copyIconProps: false, - // deleteIconProps: false, - }, - formItemProps: { - ...rulesHelper.array, - wrapperCol: { span: 24 }, - }, - columns: [ - { - valueType: 'group', - colProps: { span: 24 }, - columns: [ - MyFormItems.EnumSelect({ - key: 'node_type', - title: `类型`, - valueEnum: ApprovalTemplateNodesNodeTypeEnum, - colProps: { span: 5 }, - formItemProps: { - ...rulesHelper.text, - }, - }), - { - title: '节点名称', - key: 'name', - colProps: { span: 6 }, - formItemProps: { - ...rulesHelper.text, - }, - }, - - // MyFormItems.EnumSelect({ - // key: 'approve_type', - // title: `审批方式`, - // valueEnum: ApprovalTemplateNodesApproveTypeEnum, - // colProps: { span: 5 }, - // }), - - { - valueType: 'dependency', - name: ['node_type'], - columns: ({ node_type }) => { - return [ - Selects.Employees({ - key: 'members', - title: `审批人员`, - colProps: { span: 13 }, - fieldProps: { - mode: 'multiple', - maxCount: - node_type === - ApprovalTemplateNodesNodeTypeEnum.Approver.value - ? 1 - : 9, - }, - }), - ]; - }, - }, - ], - }, - ], - }, - { - title: '备注', - key: 'description', - colProps: { span: 24 }, - valueType: 'textarea', - }, - ]} - /> - ); -} diff --git a/src/pages/approval/templates/modals/Update.tsx b/src/pages/approval/templates/modals/Update.tsx deleted file mode 100644 index ef65277..0000000 --- a/src/pages/approval/templates/modals/Update.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { ApprovalTemplateNodesNodeTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function Update(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - return ( - - {...MyModalFormProps.props} - title={`编辑${props.title}`} - trigger={} - key={new Date().getTime()} - wrapperCol={{ span: 24 }} - width="700px" - form={form} - onOpenChange={(open: any) => { - if (open && props.item) { - Apis.Approval.ApprovalTemplates.Show({ - id: props.item?.id ?? 0, - }).then((res: any) => { - form.setFieldsValue({ - ...res?.data, - nodes: res?.data?.approval_template_nodes?.map((item: any) => ({ - ...item, - members: item?.approval_template_node_members?.map( - (member: any) => member?.company_employees_id, - ), - })), - }); - }); - } - }} - onFinish={async (values) => - Apis.Approval.ApprovalTemplates.Update({ - ...values, - id: props.item?.id ?? 0, - }) - .then(() => { - props.reload?.(); - message.success(props.title + '编辑成功'); - return true; - }) - .catch(() => false) - } - columns={[ - MyFormItems.EnumRadio({ - key: 'type', - title: '业务类型', - // valueEnum: ApprovalTemplatesTypeEnum, - required: true, - colProps: { span: 24 }, - }), - { - key: 'name', - title: '名称', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 12 }, - }, - { - key: 'code', - title: '模板编码', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 12 }, - }, - - { - valueType: 'formList', - dataIndex: 'nodes', - title: '审批节点', - fieldProps: { - copyIconProps: false, - // deleteIconProps: false, - }, - formItemProps: { - ...rulesHelper.array, - wrapperCol: { span: 24 }, - }, - columns: [ - { - valueType: 'group', - colProps: { span: 24 }, - columns: [ - MyFormItems.EnumSelect({ - key: 'node_type', - title: `类型`, - valueEnum: ApprovalTemplateNodesNodeTypeEnum, - colProps: { span: 5 }, - formItemProps: { - ...rulesHelper.text, - }, - }), - { - title: '节点名称', - key: 'name', - colProps: { span: 6 }, - formItemProps: { - ...rulesHelper.text, - }, - }, - { - valueType: 'dependency', - name: ['node_type'], - columns: ({ node_type }) => { - return [ - Selects.Employees({ - key: 'members', - title: `审批人员`, - colProps: { span: 13 }, - fieldProps: { - mode: 'multiple', - maxCount: - node_type === - ApprovalTemplateNodesNodeTypeEnum.Approver.value - ? 1 - : 9, - maxTagTextLength: 3, - }, - }), - ]; - }, - }, - ], - }, - ], - }, - { - title: '备注', - key: 'description', - colProps: { span: 24 }, - valueType: 'textarea', - }, - ]} - /> - ); -} diff --git a/src/pages/asset/announcement/index.tsx b/src/pages/asset/announcement/index.tsx index 6969fa9..5b7648b 100644 --- a/src/pages/asset/announcement/index.tsx +++ b/src/pages/asset/announcement/index.tsx @@ -96,11 +96,12 @@ export default function Index({ title = '项目公告' }) { { title: '关联项目', dataIndex: ['asset_project', 'name'], - search: { - transform: (value) => { - return { project_name: value }; - }, - }, + // search: { + // transform: (value) => { + // return { project_name: value }; + // }, + // }, + search: false, }, { title: '公告标题', diff --git a/src/pages/asset/asset_list/table/ConvenienceServices.tsx b/src/pages/asset/asset_list/table/ConvenienceServices.tsx index 39222ef..dc16337 100644 --- a/src/pages/asset/asset_list/table/ConvenienceServices.tsx +++ b/src/pages/asset/asset_list/table/ConvenienceServices.tsx @@ -40,11 +40,12 @@ export default function Index({ ...rest }) { { title: '关联项目', dataIndex: ['asset_project', 'name'], - search: { - transform: (value) => { - return { project_name: value }; - }, - }, + // search: { + // transform: (value) => { + // return { project_name: value }; + // }, + // }, + search: false, }, MyColumns.EnumTag({ title: '类型', diff --git a/src/pages/asset/project_configuration/table/ConvenienceServices.tsx b/src/pages/asset/project_configuration/table/ConvenienceServices.tsx index 50706ed..3a95656 100644 --- a/src/pages/asset/project_configuration/table/ConvenienceServices.tsx +++ b/src/pages/asset/project_configuration/table/ConvenienceServices.tsx @@ -35,11 +35,12 @@ export default function Index({ ...rest }) { { title: '关联项目', dataIndex: ['asset_project', 'name'], - search: { - transform: (value) => { - return { project_name: value }; - }, - }, + // search: { + // transform: (value) => { + // return { project_name: value }; + // }, + // }, + search: false, }, MyColumns.EnumTag({ title: '类型', diff --git a/src/pages/asset/services/index.tsx b/src/pages/asset/services/index.tsx index 73022e3..3c65950 100644 --- a/src/pages/asset/services/index.tsx +++ b/src/pages/asset/services/index.tsx @@ -66,11 +66,12 @@ export default function Index({ title = '便民服务' }) { { title: '关联项目', dataIndex: ['asset_project', 'name'], - search: { - transform: (value) => { - return { project_name: value }; - }, - }, + // search: { + // transform: (value) => { + // return { project_name: value }; + // }, + // }, + search: false, }, MyColumns.EnumTag({ title: '类型', diff --git a/src/pages/bills/all_bills/audit/index.tsx b/src/pages/bills/all_bills/audit/index.tsx index b7c06ed..bf22dec 100644 --- a/src/pages/bills/all_bills/audit/index.tsx +++ b/src/pages/bills/all_bills/audit/index.tsx @@ -1,9 +1,6 @@ import { MyColumns, MyProTableProps, useCurrentPermissions } from '@/common'; import { Apis } from '@/gen/Apis'; -import { - BillPaymentsStatusEnum, - HouseOrdersPaymentMethodEnum, -} from '@/gen/Enums'; +import { HouseOrdersPaymentMethodEnum } from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import Review from './modals/Review'; @@ -40,7 +37,7 @@ export default function Index() { title: '状态', dataIndex: 'status', search: false, - valueEnum: BillPaymentsStatusEnum, + // valueEnum: BillPaymentsStatusEnum, }), MyColumns.EnumTag({ title: '支付方式', diff --git a/src/pages/bills/all_bills/list/index.tsx b/src/pages/bills/all_bills/list/index.tsx index 7f1c8b7..3bc7117 100644 --- a/src/pages/bills/all_bills/list/index.tsx +++ b/src/pages/bills/all_bills/list/index.tsx @@ -1,11 +1,5 @@ import { MyColumns, MyProTableProps, useCurrentPermissions } from '@/common'; import { Apis } from '@/gen/Apis'; -import { - BillPaymentsTypeEnum, - BillsStatusEnum, - ContractBillsCostTypeEnum, - HouseOrdersPaymentMethodEnum, -} from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import PayCreate from './modals/PayCreate'; @@ -44,24 +38,24 @@ export default function Index() { MyColumns.EnumTag({ title: '状态', dataIndex: 'status', - valueEnum: BillsStatusEnum, + // valueEnum: BillsStatusEnum, }), MyColumns.EnumTag({ title: '支付方式', dataIndex: 'payment_method', - valueEnum: HouseOrdersPaymentMethodEnum, + // valueEnum: HouseOrdersPaymentMethodEnum, search: false, }), MyColumns.EnumTag({ title: '费用项目', dataIndex: 'type', - valueEnum: BillPaymentsTypeEnum, + // valueEnum: BillPaymentsTypeEnum, search: false, }), MyColumns.EnumTag({ title: '费用类型', dataIndex: 'flow_type', - valueEnum: ContractBillsCostTypeEnum, + // valueEnum: ContractBillsCostTypeEnum, search: false, }), { diff --git a/src/pages/bills/house_bills/index.tsx b/src/pages/bills/house_bills/index.tsx index d917da2..0ceb238 100644 --- a/src/pages/bills/house_bills/index.tsx +++ b/src/pages/bills/house_bills/index.tsx @@ -5,12 +5,7 @@ import { MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { - ApprovalTemplatesTypeEnum, - HouseBillsBillStatusEnum, - HouseBillsTypeEnum, - RefundsTypeEnum, -} from '@/gen/Enums'; +import { HouseBillsBillStatusEnum, HouseBillsTypeEnum } from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; import { useNavigate } from '@umijs/max'; import { Space } from 'antd'; @@ -58,14 +53,20 @@ export default function Index({ title = '账单明细' }) { }, }, render: (_, record) => { - return ( + return record.asset_houses_id ? ( { - navigate(`/bills/summary/show/${record?.asset_houses_id}`); + record.asset_houses_id + ? navigate( + `/bills/summary/show/${record.asset_houses_id}`, + ) + : ''; }} /> + ) : ( + '车位| ' + record.asset_car_port.full_name ); }, }, @@ -145,9 +146,9 @@ export default function Index({ title = '账单明细' }) { item={{ ...item, // 跟据发起的页面传递的type来判断退款类型 - type: RefundsTypeEnum.HouseOrder.value, + // type: RefundsTypeEnum.HouseOrder.value, // 审批模板的类型 - approval_type: ApprovalTemplatesTypeEnum.Refund.value, + // approval_type: ApprovalTemplatesTypeEnum.Refund.value, total_paid_amount: item.total_paid_amount, }} reload={action?.reload} diff --git a/src/pages/bills/house_bills/modals/BillRefund.tsx b/src/pages/bills/house_bills/modals/BillRefund.tsx index afcbf7a..97cccd5 100644 --- a/src/pages/bills/house_bills/modals/BillRefund.tsx +++ b/src/pages/bills/house_bills/modals/BillRefund.tsx @@ -7,7 +7,6 @@ import { } from '@/common'; import { Selects } from '@/components/Select'; import { Apis } from '@/gen/Apis'; -import { ApprovalTemplateNodesNodeTypeEnum } from '@/gen/Enums'; import { BetaSchemaForm } from '@ant-design/pro-components'; import { Form, message } from 'antd'; import { useRef, useState } from 'react'; @@ -159,7 +158,7 @@ export default function Update(props: MyBetaModalFormProps) { MyFormItems.EnumSelect({ key: 'node_type', // title: `类型`, - valueEnum: ApprovalTemplateNodesNodeTypeEnum, + // valueEnum: ApprovalTemplateNodesNodeTypeEnum, colProps: { span: 5 }, formItemProps: { ...rulesHelper.text, @@ -194,12 +193,12 @@ export default function Update(props: MyBetaModalFormProps) { fieldProps: { mode: 'multiple', showSearch: true, - maxCount: - node_type === - ApprovalTemplateNodesNodeTypeEnum.Approver - .value - ? 1 - : 9, + // maxCount: + // node_type === + // ApprovalTemplateNodesNodeTypeEnum.Approver + // .value + // ? 1 + // : 9, maxTagTextLength: 3, labelRender: (res: any) => { console.log(res, '222'); diff --git a/src/pages/bills/order_online/index.tsx b/src/pages/bills/order_online/index.tsx new file mode 100644 index 0000000..c73acbd --- /dev/null +++ b/src/pages/bills/order_online/index.tsx @@ -0,0 +1,209 @@ +import { + MyColumns, + MyImportModal, + MyPageContainer, + MyProTableProps, + useCurrentPermissions, +} from '@/common'; +import { MyExport } from '@/components/MyExport'; +import { Selects } from '@/components/Select'; +import { Apis } from '@/gen/Apis'; +import { + HouseBillsBillStatusEnum, + HouseOrdersPaymentMethodEnum, +} from '@/gen/Enums'; +import { ProTable } from '@ant-design/pro-components'; +import { Space } from 'antd'; +import { useState } from 'react'; +import SerialNumber from './modals/SerialNumber'; +import SerialNumbers from './modals/SerialNumbers'; +import Show from './modals/Show'; + +export default function Index({ title = '线上收款单' }) { + const [getParams, setParams] = useState({}); + const [selectedRows, setSelectedRows] = useState([]); + const getCurrentPermissions = useCurrentPermissions(); + + let toolBarRender = (action: any) => { + return getCurrentPermissions({ + import: ( + + ), + export: ( + + ), + serialNumbers: ( + + ), + }); + }; + let tableRender = (item: any, action: any) => { + return getCurrentPermissions({ + show: , + serialNumber: ( + + ), + }); + }; + return ( + + { + setSelectedRows(selectedRows); + }, + }} + request={async (params, sort) => { + setParams(params); + return MyProTableProps.request( + { + ...params, + // payment_methods: [ + // HouseOrdersPaymentMethodEnum.TongLian.value, + // HouseOrdersPaymentMethodEnum.WeChat.value, + // HouseOrdersPaymentMethodEnum.Alipay.value, + // ], + }, + sort, + Apis.HouseOrder.HouseOrders.List, + ); + }} + toolBarRender={(action: any) => [toolBarRender(action)]} + columns={[ + // MyColumns.ID({ search: false }), + Selects?.AssetProjects({ + title: '选择项目', + key: 'asset_projects_id', + hidden: true, + }), + { + title: '收款单ID', + dataIndex: 'id', + search: false, + }, + MyColumns.Boolean({ + dataIndex: 'is_serial_number', + title: '关联流水', + hidden: true, + }), + + { + title: '项目名称', + dataIndex: ['asset_project', 'name'], + search: false, + }, + { + title: '房屋', + dataIndex: ['asset_house', 'full_name'], + render: (_, record) => + record.house_order_items?.[0]?.asset_house?.full_name || '-', + search: { + transform: (value) => { + return { full_name: value }; + }, + }, + }, + MyColumns.EnumTag({ + title: '收款方式', + dataIndex: 'payment_method', + valueEnum: HouseOrdersPaymentMethodEnum, + }), + MyColumns.EnumTag({ + title: '支付状态', + dataIndex: 'order_status', + valueEnum: HouseBillsBillStatusEnum, + search: false, + }), + + { + title: '收款金额', + dataIndex: 'actual_paid_amount', + search: false, + }, + { + title: '收款手续费', + dataIndex: 'fee', + search: false, + }, + + { + title: '收款日期', + dataIndex: 'paid_time', + valueType: 'dateRange', + hidden: true, + }, + { + title: '收款日期', + dataIndex: 'paid_time', + valueType: 'date', + // render: (_, record) => { + // return record?.paid_time?.substring(0, 10); + // }, + search: false, + }, + { + title: '收款账户', + dataIndex: ['receipt_account', 'company_name'], + // search: false, + }, + { + title: '收款银行', + dataIndex: ['receipt_account', 'company_bank'], + // search: false, + }, + { + title: '收款账号', + dataIndex: ['receipt_account', 'company_account'], + // search: false, + }, + { + title: '银行流水', + dataIndex: 'accept_serial_number', + // search: false, + }, + { + title: '关联编号', + dataIndex: 'payment_no', + search: false, + }, + // { + // title: '录入人', + // dataIndex: 'creator', + // search: false, + // }, + MyColumns.CreatedAt(), + MyColumns.Option({ + render: (_, item: any, index, action) => ( + + <>{tableRender(item, action)} + + ), + }), + ]} + /> + + ); +} diff --git a/src/pages/bills/order_online/modals/Audit.tsx b/src/pages/bills/order_online/modals/Audit.tsx new file mode 100644 index 0000000..c947d60 --- /dev/null +++ b/src/pages/bills/order_online/modals/Audit.tsx @@ -0,0 +1,244 @@ +import { + MyBetaModalFormProps, + MyButtons, + MyColumns, + MyFormItems, + MyModalFormProps, + MyProTableProps, + renderTextHelper, + rulesHelper, +} from '@/common'; + +import { Apis } from '@/gen/Apis'; +import { + HouseBillsTypeEnum, + HouseOrdersAuditStatusEnum, + HouseOrdersPaymentMethodEnum, + HouseRegistersStatusEnum, +} from '@/gen/Enums'; +import { + BetaSchemaForm, + ProCard, + ProDescriptions, + ProTable, +} from '@ant-design/pro-components'; +import { Form, message, Space } from 'antd'; +export default function Audit(props: MyBetaModalFormProps) { + const [form] = Form.useForm(); + + return ( + + {...MyModalFormProps.props} + title={props.title} + trigger={} + // wrapperCol={{ span: 24 }} + layout="horizontal" + labelCol={{ span: 0 }} + wrapperCol={{ span: 24 }} + labelAlign="left" + width="800px" + key={new Date().getTime()} + form={form} + onFinish={async (values: any) => + Apis.HouseOrder.HouseOrders.Audit({ + id: props.item?.id ?? 0, + accept_name: props.item?.receipt_account?.company_name || '', + accept_bank: props.item?.receipt_account?.company_bank || '', + accept_account: props.item?.receipt_account?.company_account || '', + ...values, + }) + .then(() => { + props.reload?.(); + message.success(props.title + '成功'); + return true; + }) + .catch(() => false) + } + columns={[ + { + // title: '登记信息', + dataIndex: 'info_display', + valueType: 'text', + renderFormItem: () => ( + + + + + + {props?.item?.house_order_items?.[0].asset_house + ?.full_name || '-'} + + + + + {props?.item?.receipt_account?.company_name} ; + {props?.item?.receipt_account?.company_bank} ; + {props?.item?.receipt_account?.company_account} + + {/* + {props?.item?.accept_serial_number || '未提供'} + */} + + {props?.item?.actual_paid_amount || '-'} + + + {props?.item?.creator || '-'}- + {props?.item?.creator_phone || '-'} + + + {props?.item?.created_at || '-'} + + + + + 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, + }, + ]} + /> + + + ), + colProps: { span: 24 }, + }, + + { + valueType: 'group', + title: '', + columns: [ + MyFormItems.EnumRadio({ + key: 'payment_method', + title: '收款方式', + colProps: { span: 24 }, + valueEnum: () => { + const obj: Record = JSON.parse( + JSON.stringify(HouseOrdersPaymentMethodEnum), + ); + delete obj.WeChat; + delete obj.Alipay; + delete obj.TongLian; + delete obj.Prepayment; + return obj; + }, + formItemProps: { + ...rulesHelper.text, + labelCol: { span: 4 }, + wrapperCol: { span: 20 }, + }, + initialValue: props?.item?.payment_method, + }), + { + key: 'paid_time', + title: '收款日期', + valueType: 'date', + colProps: { span: 24 }, + formItemProps: { + ...rulesHelper.text, + labelCol: { span: 4 }, + wrapperCol: { span: 20 }, + }, + initialValue: props?.item?.paid_time + ? new Date(props?.item?.paid_time) + : undefined, + }, + ], + }, + + { + valueType: 'group', + // title: '审核操作', + columns: [ + MyFormItems.EnumRadio({ + key: 'audit_status', + title: '审核操作', + colProps: { span: 24 }, + valueEnum: () => { + let obj: any = JSON.parse( + JSON.stringify(HouseRegistersStatusEnum), + ); + delete obj.Pending; + return obj; + }, + formItemProps: { + ...rulesHelper.text, + labelCol: { span: 4 }, + wrapperCol: { span: 20 }, + }, + }), + + { + valueType: 'dependency', + name: ['audit_status'], + columns: ({ audit_status }) => { + return audit_status === + HouseOrdersAuditStatusEnum.Rejected.value + ? [ + { + title: '驳回原因', + dataIndex: 'reason', + valueType: 'textarea', + formItemProps: { + ...rulesHelper.text, + labelCol: { span: 4 }, + wrapperCol: { span: 20 }, + }, + colProps: { span: 24 }, + }, + ] + : [ + { + key: 'accept_serial_number', + title: '关联流水', + valueType: 'text', + colProps: { span: 24 }, + initialValue: props?.item?.accept_serial_number, + formItemProps: { + ...rulesHelper.text, + labelCol: { span: 4 }, + wrapperCol: { span: 20 }, + }, + fieldProps: { + placeholder: '请输入银行流水', + }, + }, + ]; + }, + }, + ], + }, + ]} + /> + ); +} diff --git a/src/pages/bills/order_online/modals/PayUpdate.tsx b/src/pages/bills/order_online/modals/PayUpdate.tsx new file mode 100644 index 0000000..a3267ff --- /dev/null +++ b/src/pages/bills/order_online/modals/PayUpdate.tsx @@ -0,0 +1,77 @@ +import { + MyBetaModalFormProps, + MyButtons, + MyFormItems, + MyModalFormProps, + rulesHelper, +} from '@/common'; +import { Apis } from '@/gen/Apis'; +import { HouseOrdersPaymentMethodEnum } from '@/gen/Enums'; +import { BetaSchemaForm } from '@ant-design/pro-components'; +import { Form, message } from 'antd'; + +export default function Update(props: MyBetaModalFormProps) { + const [form] = Form.useForm(); + return ( + + {...MyModalFormProps.props} + title={`${props.title}更新`} + trigger={} + wrapperCol={{ span: 24 }} + width="800px" + key={new Date().getTime()} + form={form} + onOpenChange={(open: any) => { + if (open && props.item) { + form.setFieldsValue({ + ...props.item, + }); + } + }} + onFinish={async (values) => + Apis.Bill.HouseBills.Update({ ...values, id: props.item?.id ?? 0 }) + .then(() => { + props.reload?.(); + message.success(props.title + '成功'); + return true; + }) + .catch(() => false) + } + columns={[ + MyFormItems.EnumRadio({ + key: 'payment_method', + title: '收款方式', + colProps: { span: 10 }, + valueEnum: () => { + const obj: Record = JSON.parse( + JSON.stringify(HouseOrdersPaymentMethodEnum), + ); + delete obj.WeChat; + delete obj.Alipay; + delete obj.TongLian; + delete obj.Prepayment; + return obj; + }, + required: true, + }), + + { + key: 'paid_time', + title: '收款日期', + valueType: 'date', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 6 }, + }, + + { + colProps: { span: 24 }, + renderFormItem: () => ( + + 提示:确认后,需财务审核。 + + ), + }, + ]} + /> + ); +} diff --git a/src/pages/marketing/survey/modals/QuestionCategoriesUpdate.tsx b/src/pages/bills/order_online/modals/SerialNumber.tsx similarity index 50% rename from src/pages/marketing/survey/modals/QuestionCategoriesUpdate.tsx rename to src/pages/bills/order_online/modals/SerialNumber.tsx index 0d1c7dc..c8e92fc 100644 --- a/src/pages/marketing/survey/modals/QuestionCategoriesUpdate.tsx +++ b/src/pages/bills/order_online/modals/SerialNumber.tsx @@ -8,28 +8,30 @@ import { Apis } from '@/gen/Apis'; import { BetaSchemaForm } from '@ant-design/pro-components'; import { Form, message } from 'antd'; -export default function QuestionCategoriesUpdate(props: MyBetaModalFormProps) { +export default function OrganizationHasProjects(props: MyBetaModalFormProps) { const [form] = Form.useForm(); return ( - + {...MyModalFormProps.props} - form={form} - title={`编辑${props.title}`} + title={`关联银行流水`} wrapperCol={{ span: 24 }} - key={new Date().getTime()} width="500px" - trigger={} + trigger={} + key={new Date().getTime()} + form={form} onOpenChange={(open: any) => { if (open && props.item) { - form.setFieldsValue(props.item); + form.setFieldsValue({ + ...props.item, + serial_number: props?.item?.accept_serial_number || '', + }); } }} - onFinish={async (values) => - Apis.Survey.QuestionCategories.Update({ + onFinish={async (values: any) => + Apis.HouseOrder.HouseOrders.UpdateSerialNumber({ ...values, - is_enabled: values?.is_enabled ? true : false, - id: props.item?.id ?? 0, + id: props?.item?.id, }) .then(() => { props.reload?.(); @@ -39,18 +41,12 @@ export default function QuestionCategoriesUpdate(props: MyBetaModalFormProps) { .catch(() => false) } columns={[ - { key: 'name', title: '名称', formItemProps: { ...rulesHelper.text } }, { - key: 'description', - title: '描述', - valueType: 'textarea', + key: 'serial_number', + title: '银行流水号', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 24 }, }, - { - key: 'is_enabled', - title: '是否启用', - valueType: 'switch', - }, - // MyFormItems.ColorPicker(), ]} /> ); diff --git a/src/pages/bills/order_online/modals/SerialNumbers.tsx b/src/pages/bills/order_online/modals/SerialNumbers.tsx new file mode 100644 index 0000000..ccbe0e0 --- /dev/null +++ b/src/pages/bills/order_online/modals/SerialNumbers.tsx @@ -0,0 +1,157 @@ +import { + MyBetaModalFormProps, + MyButtons, + MyModalFormProps, + rulesHelper, +} from '@/common'; +import { Apis } from '@/gen/Apis'; +import { BetaSchemaForm } from '@ant-design/pro-components'; +import { Form, message } from 'antd'; + +interface BatchSerialNumbersProps extends MyBetaModalFormProps { + items?: any[]; +} + +export default function BatchSerialNumbers(props: BatchSerialNumbersProps) { + const [form] = Form.useForm(); + const { items = [] } = props; + // 计算总收款金额 + const totalAmount = items.reduce((sum, item) => { + return sum + Number(item.actual_paid_amount || 0); + }, 0); + // 计算总收款手续费 + const totalFee = items.reduce((sum, item) => { + return sum + Number(item.fee || 0); + }, 0); + // 计算到账金额(总收款金额 - 总手续费) + const actualReceivedAmount = totalAmount - totalFee; + // 获取收款账号信息(所有项目都相同) + const receiptAccount = items[0]?.receipt_account || {}; + // 验证是否所有项目都有相同的收款账号 + const validateSameAccount = () => { + if (items.length === 0) return true; + + const firstAccount = items[0].receipt_account?.company_account; + return items.every( + (item) => item.receipt_account?.company_account === firstAccount, + ); + }; + + return ( + + {...MyModalFormProps.props} + title={`关联银行流水`} + layout="horizontal" + labelCol={{ span: 6 }} + wrapperCol={{ span: 18 }} + labelAlign="left" + width="500px" + trigger={ + + } + key={new Date().getTime()} + form={form} + onOpenChange={(open: any) => { + if (open && items.length > 0) { + form.resetFields(); // 清空表单数据 + // 验证收款账号是否相同 + if (!validateSameAccount()) { + message.error('请选择相同收款账号的收款单'); + return false; + } + } + }} + onFinish={async (values: any) => { + // 再次验证收款账号是否相同 + if (!validateSameAccount()) { + message.error('请选择相同收款账号的收款单'); + return false; + } + + return Apis.HouseOrder.HouseOrders.BatchUpdateSerialNumber({ + ...values, + ids: items.map((item) => item.id), + }) + .then(() => { + props.reload?.(); + message.success(props.title + '成功'); + return true; + }) + .catch(() => false); + }} + columns={[ + { + key: 'company_name', + title: '收款账户', + valueType: 'text', + initialValue: receiptAccount.company_name || '-', + fieldProps: { + disabled: true, + }, + colProps: { span: 24 }, + }, + { + key: 'company_bank', + title: '收款银行', + valueType: 'text', + initialValue: receiptAccount.company_bank || '-', + fieldProps: { + disabled: true, + }, + colProps: { span: 24 }, + }, + { + key: 'company_account', + title: '收款账号', + valueType: 'text', + initialValue: receiptAccount.company_account || '-', + fieldProps: { + disabled: true, + }, + colProps: { span: 24 }, + }, + { + key: 'total_amount', + title: '收款单汇总', + valueType: 'number', + initialValue: totalAmount, + fieldProps: { + disabled: true, + }, + colProps: { span: 24 }, + }, + { + key: 'totalFee', + title: '手续费汇总', + valueType: 'number', + initialValue: totalFee, + fieldProps: { + disabled: true, + }, + colProps: { span: 24 }, + }, + { + key: 'actual_received_amount', + title: '应到账金额', + valueType: 'number', + initialValue: actualReceivedAmount, + fieldProps: { + disabled: true, + }, + colProps: { span: 24 }, + }, + + { + key: 'serial_number', + title: '银行流水号', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 24 }, + }, + ]} + /> + ); +} diff --git a/src/pages/bills/order_online/modals/Show.tsx b/src/pages/bills/order_online/modals/Show.tsx new file mode 100644 index 0000000..8d23001 --- /dev/null +++ b/src/pages/bills/order_online/modals/Show.tsx @@ -0,0 +1,115 @@ +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 ( + getShow()} + node={ + + + + + + {props?.item?.house_order_items?.[0].asset_house?.full_name || + '-'} + + + + + {props?.item?.receipt_account?.company_name} ; + {props?.item?.receipt_account?.company_bank} ; + {props?.item?.receipt_account?.company_account} + + + {props?.item?.accept_serial_number || '-'} + + + {Object.values(HouseOrdersPaymentMethodEnum).find( + (item) => item.value === props?.item?.payment_method, + )?.text || '-'} + + + {props?.item?.paid_time || '-'} + + + + {props?.item?.actual_paid_amount || '-'} + + + {props?.item?.creator || '-'}- + {props?.item?.creator_phone || '-'} + + + {props?.item?.created_at || '-'} + + + + + + {props?.item?.reason || '-'} + + + + + 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, + }, + ]} + /> + + + } + /> + ); +} diff --git a/src/pages/charge/standard/pages/CreateCarPortFee.tsx b/src/pages/charge/standard/pages/CreateCarPortFee.tsx index d65bf92..a39e9a9 100644 --- a/src/pages/charge/standard/pages/CreateCarPortFee.tsx +++ b/src/pages/charge/standard/pages/CreateCarPortFee.tsx @@ -45,7 +45,7 @@ export default function CreatePropertyFee(props: MyBetaModalFormProps) { Apis.HouseCharge.HouseChargeStandards.Store({ ...values, charge_type: HouseBillsTypeEnum.CarPortFee.value, - type: 'House', + type: 'CarPort', is_apportionment: values.charge_type === HouseBillsTypeEnum.SharedWaterFee.value || values.charge_type === HouseBillsTypeEnum.SharedElectricityFee.value diff --git a/src/pages/charge/tasks/modals/TaskShow.tsx b/src/pages/charge/tasks/modals/TaskShow.tsx index 7a5e1d1..4dc87c5 100644 --- a/src/pages/charge/tasks/modals/TaskShow.tsx +++ b/src/pages/charge/tasks/modals/TaskShow.tsx @@ -39,15 +39,15 @@ export default function TaskShow(props: MyBetaModalFormProps) { { title: '关联房屋', dataIndex: 'full_name', - render: (_, record) => ( - { - navigate(`/bills/summary/show/${record.asset_houses_id}`); - }} - /> - ), + // render: (_, record) => ( + // { + // navigate(`/bills/summary/show/${record.asset_houses_id}`); + // }} + // /> + // ), search: { transform: (value) => ({ full_name: value }) }, }, { diff --git a/src/pages/company/employees/index.tsx b/src/pages/company/employees/index.tsx index 49f24f5..f5842c3 100644 --- a/src/pages/company/employees/index.tsx +++ b/src/pages/company/employees/index.tsx @@ -7,11 +7,10 @@ import { useCurrentPermissions, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { CompanyEmployeesTypeEnum } from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; import { Dropdown, Space } from 'antd'; import Change from './modals/Change'; -import CompletePhone from './modals/CompletePhone'; + import EmployeeCreate from './modals/EmployeeCreate'; import EmployeeUpdate from './modals/EmployeeUpdate'; import Role from './modals/Role'; @@ -41,14 +40,14 @@ export default function Index({ title = '员工管理' }) { key: '2', label: ( Apis.Company.CompanyEmployees.ResetPassword({ id: item.id, - password: 'Gc#123', + password: '12345678', }).then(() => action?.reload()) } /> @@ -92,14 +91,7 @@ export default function Index({ title = '员工管理' }) { Apis.Company.CompanyEmployees.List, ) } - toolBarRender={(action) => [ - , - toolBarRender(action), - ]} + toolBarRender={(action) => [toolBarRender(action)]} columns={[ MyColumns.ID({ search: false, @@ -121,32 +113,33 @@ export default function Index({ title = '员工管理' }) { title: '手机号', dataIndex: 'phone', }, - { - title: '角色', - dataIndex: 'roles', - renderText: renderTextHelper.TagList, - hideInSearch: true, - }, { title: '岗位', dataIndex: ['position', 'name'], search: false, }, - MyColumns.EnumTag({ - title: '来源', - dataIndex: 'type', - valueEnum: CompanyEmployeesTypeEnum, - }), - MyColumns.SoftDelete({ - title: '启/禁用', - onRestore: Apis.Company.CompanyEmployees.Restore, - onSoftDelete: Apis.Company.CompanyEmployees.SoftDelete, - search: false, - setPermissions: getCurrentPermissions({ - enableDisable: true, - }), - }), - MyColumns.UpdatedAt(), + { + title: '系统角色', + dataIndex: 'roles', + renderText: renderTextHelper.TagList, + hideInSearch: true, + }, + + // MyColumns.EnumTag({ + // title: '来源', + // dataIndex: 'type', + // // valueEnum: CompanyEmployeesTypeEnum, + // }), + // MyColumns.SoftDelete({ + // title: '启/禁用', + // onRestore: Apis.Company.CompanyEmployees.Restore, + // onSoftDelete: Apis.Company.CompanyEmployees.SoftDelete, + // search: false, + // setPermissions: getCurrentPermissions({ + // enableDisable: true, + // }), + // }), + // MyColumns.UpdatedAt(), // MyColumns.CreatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( diff --git a/src/pages/company/employees/modals/CompletePhone.tsx b/src/pages/company/employees/modals/CompletePhone.tsx deleted file mode 100644 index c811904..0000000 --- a/src/pages/company/employees/modals/CompletePhone.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { MyBetaModalFormProps, MyButtons, MyModalFormProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function CompletePhone(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - - // 验证多行手机号 - const validatePhones = (_: any, value?: string) => { - if (!value || !value.trim()) { - return Promise.reject('请输入手机号'); - } - - const phones = value.trim().split(/\r?\n/).filter(Boolean); - if (phones.length === 0) { - return Promise.reject('请输入至少一个手机号'); - } - - if (phones.length > 20000) { - return Promise.reject('最多支持20000条数据'); - } - - const phoneRegex = /^1[3-9]\d{9}$/; - const invalidPhones = phones.filter((phone) => !phoneRegex.test(phone)); - - if (invalidPhones.length > 0) { - return Promise.reject( - `手机号格式不正确:${invalidPhones.slice(0, 3).join(', ')}${ - invalidPhones.length > 3 ? '...等' : '' - }`, - ); - } - - return Promise.resolve(); - }; - - return ( - - } - wrapperCol={{ span: 24 }} - width={600} - key={new Date().getTime()} - form={form} - onOpenChange={(open: boolean) => { - if (open) { - form.resetFields(); - } - }} - onFinish={async (values: any) => { - try { - // 按换行分割手机号并过滤空值 - const phoneArray = values.phoneInput - .trim() - .split(/\r?\n/) - .filter(Boolean); - - // 提交多行手机号 - await Apis.Company.CompanyEmployees.CompletePhone({ - phone: phoneArray, - }); - - props.reload?.(); - message.success('手机号补全成功'); - return true; - } catch (error) { - console.error('补全手机号失败:', error); - message.error('补全手机号失败,请重试'); - return false; - } - }} - columns={[ - { - key: 'phoneInput', - title: - '请在输入框里粘贴手机号。每行一个值,不超过2000条(excel中的数据,可直接复制/粘贴)', - valueType: 'textarea', - fieldProps: { - placeholder: '请输入手机号,多个【按回车键】换行隔开', - autoSize: { minRows: 8, maxRows: 12 }, - style: { resize: 'vertical' }, - }, - colProps: { span: 24 }, - formItemProps: { - rules: [{ validator: validatePhones }], - }, - }, - ]} - /> - ); -} diff --git a/src/pages/company/employees/modals/EmployeeCreate.tsx b/src/pages/company/employees/modals/EmployeeCreate.tsx index dd6dac4..a5b6728 100644 --- a/src/pages/company/employees/modals/EmployeeCreate.tsx +++ b/src/pages/company/employees/modals/EmployeeCreate.tsx @@ -8,7 +8,7 @@ import { import { Selects } from '@/components/Select'; import { SysSelects } from '@/components/SysSelects'; import { Apis } from '@/gen/Apis'; -import { CompanyEmployeesTypeEnum, SexEnum } from '@/gen/Enums'; +import { SexEnum } from '@/gen/Enums'; import { BetaSchemaForm } from '@ant-design/pro-components'; import { Form, message } from 'antd'; @@ -35,8 +35,8 @@ export default function Create(props: MyBetaModalFormProps) { Apis.Company.CompanyEmployees.Store({ ...values, companies_id: values?.companies_id || props?.item?.id, - type: CompanyEmployeesTypeEnum.External.value, - password: 'Gc#123', + // type: CompanyEmployeesTypeEnum.External.value, + password: '12345678', organizations_id: values?.organizations_id?.[values.organizations_id.length - 1], }) diff --git a/src/pages/company/employees/modals/Role.tsx b/src/pages/company/employees/modals/Role.tsx index ddde765..088e3ef 100644 --- a/src/pages/company/employees/modals/Role.tsx +++ b/src/pages/company/employees/modals/Role.tsx @@ -15,7 +15,7 @@ export default function Update(props: MyBetaModalFormProps) { {...MyModalFormProps.props} title={`角色调整`} - trigger={} + trigger={} wrapperCol={{ span: 24 }} width="500px" key={new Date().getTime()} diff --git a/src/pages/goods_releases/list/index.tsx b/src/pages/goods_releases/list/index.tsx index f5aad95..8ec7314 100644 --- a/src/pages/goods_releases/list/index.tsx +++ b/src/pages/goods_releases/list/index.tsx @@ -5,10 +5,6 @@ import { MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { - GoodsReleasesAuditStatusEnum, - GoodsReleasesPassedTypeEnum, -} from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; import { useNavigate } from '@umijs/max'; import { Space, Tooltip } from 'antd'; @@ -51,7 +47,7 @@ export default function Index({ title = '物品放行' }) { MyColumns.EnumTag({ title: '申请状态', dataIndex: 'status', - valueEnum: GoodsReleasesAuditStatusEnum, + // valueEnum: GoodsReleasesAuditStatusEnum, }), { title: '房屋', @@ -71,7 +67,7 @@ export default function Index({ title = '物品放行' }) { MyColumns.EnumTag({ title: '通行类型', dataIndex: 'passed_type', - valueEnum: GoodsReleasesPassedTypeEnum, + // valueEnum: GoodsReleasesPassedTypeEnum, }), { @@ -163,10 +159,11 @@ export default function Index({ title = '物品放行' }) { MyColumns.Option({ render: (_, item: any, index, action) => ( - {item?.status === + {/* {item?.status === GoodsReleasesAuditStatusEnum.Pending.value && ( - )} + )} */} + {props?.item?.created_at || '-'} - + {/* - + */} @@ -114,19 +111,19 @@ export default function Update(props: MyBetaModalFormProps) { { valueType: 'group', columns: [ - MyFormItems.EnumRadio({ - key: 'status', - title: '审核操作', - colProps: { span: 24 }, - valueEnum: () => { - let obj: any = JSON.parse( - JSON.stringify(GoodsReleasesPassedTypeEnum), - ); - delete obj.Pending; - return obj; - }, - required: true, - }), + // MyFormItems.EnumRadio({ + // key: 'status', + // title: '审核操作', + // colProps: { span: 24 }, + // valueEnum: () => { + // let obj: any = JSON.parse( + // JSON.stringify(GoodsReleasesPassedTypeEnum), + // ); + // delete obj.Pending; + // return obj; + // }, + // required: true, + // }), { valueType: 'dependency', name: ['status'], diff --git a/src/pages/goods_releases/list/pages/create.tsx b/src/pages/goods_releases/list/pages/create.tsx index e639830..77da937 100644 --- a/src/pages/goods_releases/list/pages/create.tsx +++ b/src/pages/goods_releases/list/pages/create.tsx @@ -6,7 +6,6 @@ import { } from '@/common'; import MyModalsHouseSelectList from '@/components/ModalsHouseSelectList'; import { Apis } from '@/gen/Apis'; -import { GoodsReleasesPassedTypeEnum } from '@/gen/Enums'; import { BetaSchemaForm, ProCard } from '@ant-design/pro-components'; import { useNavigate } from '@umijs/max'; import { Form, message, Space } from 'antd'; @@ -99,8 +98,8 @@ export default function Index({ title = '物品放行申请' }) { }, MyFormItems.EnumRadio({ key: 'passed_type', - title: '装修类型', - valueEnum: GoodsReleasesPassedTypeEnum, + title: '通行类型', + // valueEnum: GoodsReleasesPassedTypeEnum, colProps: { span: 6 }, formItemProps: { ...rulesHelper.text }, }), diff --git a/src/pages/goods_releases/list/pages/review.tsx b/src/pages/goods_releases/list/pages/review.tsx index b59bddb..093339c 100644 --- a/src/pages/goods_releases/list/pages/review.tsx +++ b/src/pages/goods_releases/list/pages/review.tsx @@ -5,7 +5,6 @@ import { rulesHelper, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { GoodsReleasesPassedTypeEnum } from '@/gen/Enums'; import { BetaSchemaForm, ProCard } from '@ant-design/pro-components'; import { useNavigate, useSearchParams } from '@umijs/max'; import { Form, Space } from 'antd'; @@ -96,7 +95,7 @@ export default function Index({ title = '物品放行审核' }) { MyFormItems.EnumRadio({ key: 'passed_type', title: '装修类型', - valueEnum: GoodsReleasesPassedTypeEnum, + // valueEnum: GoodsReleasesPassedTypeEnum, colProps: { span: 8 }, formItemProps: { ...rulesHelper.text }, }), diff --git a/src/pages/marketing/survey/components/QuestionCategoriesList.tsx b/src/pages/marketing/survey/components/QuestionCategoriesList.tsx deleted file mode 100644 index 3c0b56b..0000000 --- a/src/pages/marketing/survey/components/QuestionCategoriesList.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { - MyButtons, - MyColumns, - MyProTableProps, - useCurrentPermissions, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Create from '../modals/QuestionCategoriesCreate'; -import Update from '../modals/QuestionCategoriesUpdate'; - -export default function QuestionCategoriesList({ title = '题目分类' }) { - const getCurrentPermissions = useCurrentPermissions(); - let toolBarRender = (action: any) => { - return getCurrentPermissions( - { - add: , - }, - 'MyQuestionCategoriesList', - ); - }; - - let tableRender = (item: any, action: any) => { - return getCurrentPermissions( - { - update: , - delete: ( - - Apis.Survey.QuestionCategories.Delete({ id: item.id }).then(() => - action?.reload(), - ) - } - /> - ), - }, - 'MyQuestionCategoriesList', - ); - }; - return ( - - MyProTableProps.request( - params, - sort, - Apis.Survey.QuestionCategories.List, - ) - } - toolBarRender={(action) => [toolBarRender(action)]} - columns={[ - MyColumns.ID({ - search: false, - }), - { dataIndex: 'name', title: '名称' }, - { dataIndex: 'description', title: '描述' }, - MyColumns.Boolean({ dataIndex: 'is_enabled', title: '是否启用' }), - MyColumns.Option({ - width: 120, - - render: (_, item: any, index, action) => ( - - <>{tableRender(item, action)} - - ), - }), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/components/QuestionsList.tsx b/src/pages/marketing/survey/components/QuestionsList.tsx deleted file mode 100644 index 9672415..0000000 --- a/src/pages/marketing/survey/components/QuestionsList.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { - MyButtons, - MyColumns, - MyProTableProps, - useCurrentPermissions, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { QuestionsTypeEnum } from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Create from '../modals/QuestionsCreate'; -import Update from '../modals/QuestionsUpdate'; - -export default function QuestionsList({ title = '题目' }) { - const getCurrentPermissions = useCurrentPermissions(); - let toolBarRender = (action: any) => { - return getCurrentPermissions( - { - add: , - }, - 'MyQuestionsList', - ); - }; - - let tableRender = (item: any, action: any) => { - return ( - getCurrentPermissions({ - update: , - delete: ( - - Apis.Survey.Questions.Delete({ id: item.id }).then(() => - action?.reload(), - ) - } - /> - ), - }), - 'MyQuestionsList' - ); - }; - return ( - - MyProTableProps.request(params, sort, Apis.Survey.Questions.List) - } - toolBarRender={(action) => [toolBarRender(action)]} - columns={[ - MyColumns.ID({ - search: false, - }), - { dataIndex: 'title', title: '题目' }, - MyColumns.EnumTag({ - title: '类型', - dataIndex: 'type', - valueEnum: QuestionsTypeEnum, - }), - { dataIndex: 'placeholder', title: '提示', search: false }, - MyColumns.Boolean({ - dataIndex: 'required', - title: '是否必答', - search: false, - }), - MyColumns.Boolean({ - dataIndex: 'is_enabled', - title: '是否启用', - search: false, - }), - MyColumns.Option({ - width: 120, - render: (_, item: any, index, action) => ( - {tableRender(item, action)} - ), - }), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/components/SurveyReleasesList.tsx b/src/pages/marketing/survey/components/SurveyReleasesList.tsx deleted file mode 100644 index 97b5aae..0000000 --- a/src/pages/marketing/survey/components/SurveyReleasesList.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { - MyButtons, - MyColumns, - MyProTableProps, - useCurrentPermissions, -} from '@/common'; -import { isInTimeRange } from '@/common/utils/day'; -import { Apis } from '@/gen/Apis'; -import { SurveyReleasesTypeEnum } from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import Create from '../modals/SurveyReleasesCreate'; -import Update from '../modals/SurveyReleasesUpdate'; - -export default function SurveyReleasesList({ title = '问卷发布列表' }) { - const getCurrentPermissions = useCurrentPermissions(); - let toolBarRender = (action: any) => { - return getCurrentPermissions( - { - add: , - }, - 'MySurveyReleasesList', - ); - }; - let tableRender = (item: any, action: any) => { - return getCurrentPermissions( - { - publish: ( - - Apis.Survey.SurveyReleases.Publish({ id: item.id }).then(() => - action?.reload(), - ) - } - /> - ), - cancel: ( - - Apis.Survey.SurveyReleases.Cancel({ id: item.id }).then(() => - action?.reload(), - ) - } - /> - ), - update: , - delete: ( - - Apis.Survey.SurveyReleases.Delete({ id: item.id }).then(() => - action?.reload(), - ) - } - /> - ), - }, - 'MySurveyReleasesList', - ); - }; - return ( - - MyProTableProps.request(params, sort, Apis.Survey.SurveyReleases.List) - } - toolBarRender={(action) => [toolBarRender(action)]} - columns={[ - MyColumns.ID({ - search: false, - }), - { - title: '问卷ID', - hidden: true, - dataIndex: 'surveys_id', - // search: { - // transform: (value) => { - // return { surveys_id: value }; - // }, - // }, - }, - MyColumns.EnumTag({ - title: '方式', - dataIndex: 'release_type', - valueEnum: SurveyReleasesTypeEnum, - }), - MyColumns.Boolean({ - title: '是否发布', - dataIndex: 'status', - }), - { dataIndex: ['survey', 'name'], title: '发布的问卷', search: false }, - { dataIndex: 'start_date', title: '开始时间', search: false }, - { dataIndex: 'end_date', title: '结束时间', search: false }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - {tableRender(item, action)} - ), - }), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/components/SurveyResponsesList.tsx b/src/pages/marketing/survey/components/SurveyResponsesList.tsx deleted file mode 100644 index d4538ab..0000000 --- a/src/pages/marketing/survey/components/SurveyResponsesList.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { MyColumns, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import MyShow from '../modals/SurveyResponsesShow'; -export default function SurveyResponsesList({ title = '问卷回收' }) { - return ( - - MyProTableProps.request(params, sort, Apis.Survey.SurveyResponses.List) - } - columns={[ - MyColumns.ID({ - search: false, - }), - { dataIndex: ['survey', 'name'], title: '问卷', search: false }, - { dataIndex: 'survey_id', title: '问卷ID', hidden: true }, - { dataIndex: 'release_id', title: '发布ID', hidden: true }, - { dataIndex: 'customers_id', title: '客户ID', hidden: true }, - { dataIndex: 'customer_phone', title: '客户手机号', hidden: true }, - { - dataIndex: 'customer', - title: '回答客户', - search: false, - render: (_, item: any) => { - return `${item?.customer?.phone}_${item?.customer?.name}`; - }, - }, - { dataIndex: 'total_score', title: '总得分', search: false }, - MyColumns.CreatedAt(), - MyColumns.Option({ - width: 120, - render: (_, item: any) => , - }), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/components/SurveysList.tsx b/src/pages/marketing/survey/components/SurveysList.tsx deleted file mode 100644 index ec936e7..0000000 --- a/src/pages/marketing/survey/components/SurveysList.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { - MyButtons, - MyColumns, - MyProTableProps, - useCurrentPermissions, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { PlusOutlined } from '@ant-design/icons'; -import { ProTable } from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Space } from 'antd'; - -export default function SurveysList({ title = '问卷设置' }) { - const navigate = useNavigate(); - const getCurrentPermissions = useCurrentPermissions(); - let toolBarRender = () => { - return getCurrentPermissions( - { - add: ( - } - onClick={() => { - navigate('/marketing/survey/pages/create_surveys'); - }} - title="新增问卷" - /> - ), - }, - 'MySurveysList', - ); - }; - - let tableRender = (item: any, action: any) => { - return ( - getCurrentPermissions({ - update: ( - { - navigate(`/marketing/survey/pages/update_surveys?id=${item.id}`); - }} - title="编辑" - /> - ), - delete: ( - - Apis.Survey.Surveys.Delete({ id: item.id }).then(() => - action?.reload(), - ) - } - /> - ), - }), - 'MySurveysList' - ); - }; - - return ( - - MyProTableProps.request(params, sort, Apis.Survey.Surveys.List) - } - toolBarRender={() => [toolBarRender()]} - columns={[ - MyColumns.ID({ - search: false, - }), - { dataIndex: 'name', title: '问卷' }, - MyColumns.Boolean({ - dataIndex: 'is_enabled', - title: '是否启用', - search: false, - }), - MyColumns.CreatedAt(), - MyColumns.Option({ - width: 120, - render: (_, item: any, index, action) => ( - {tableRender(item, action)} - ), - }), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/index.tsx b/src/pages/marketing/survey/index.tsx deleted file mode 100644 index 4f343c2..0000000 --- a/src/pages/marketing/survey/index.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { MyPageContainer, useCurrentPermissions } from '@/common'; -import type { TabsProps } from 'antd'; -import { Tabs } from 'antd'; -import MyQuestionCategoriesList from './components/QuestionCategoriesList'; -import MyQuestionsList from './components/QuestionsList'; -import MySurveyReleasesList from './components/SurveyReleasesList'; -import MySurveyResponsesList from './components/SurveyResponsesList'; -import MySurveysList from './components/SurveysList'; -export default function Index({ title = '问卷调查' }) { - const getCurrentPermissions = useCurrentPermissions(); - const items: TabsProps['items'] = getCurrentPermissions({ - MySurveyReleasesList: { - key: 'MySurveyReleasesList', - label: '问卷发布', - children: , - }, - MySurveysList: { - key: 'MySurveysList', - label: '问卷设置', - children: , - }, - MySurveyResponsesList: { - key: 'MySurveyResponsesList', - label: '问卷回收', - children: , - }, - MyQuestionsList: { - key: 'MyQuestionsList', - label: '问卷题库', - children: , - }, - MyQuestionCategoriesList: { - key: 'MyQuestionCategoriesList', - label: '题目分类', - children: , - }, - }); - return ( - - - - ); -} diff --git a/src/pages/marketing/survey/modals/QuestionCategoriesCreate.tsx b/src/pages/marketing/survey/modals/QuestionCategoriesCreate.tsx deleted file mode 100644 index 04b5d89..0000000 --- a/src/pages/marketing/survey/modals/QuestionCategoriesCreate.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function QuestionCategoriesCreate(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - - return ( - - {...MyModalFormProps.props} - form={form} - title={`添加${props.title}`} - wrapperCol={{ span: 24 }} - key={new Date().getTime()} - width="500px" - trigger={} - onOpenChange={(open: any) => { - if (open) { - form.resetFields(); // 清空表单数据 - } - }} - onFinish={async (values) => - Apis.Survey.QuestionCategories.Store({ - ...values, - is_enabled: values?.is_enabled ? true : false, - }) - .then(() => { - props.reload?.(); - message.success(`添加${props.title}成功`); - return true; - }) - .catch(() => false) - } - columns={[ - { key: 'name', title: '名称', formItemProps: { ...rulesHelper.text } }, - { - key: 'description', - title: '描述', - valueType: 'textarea', - }, - { - key: 'is_enabled', - title: '是否启用', - valueType: 'switch', - }, - // MyFormItems.ColorPicker(), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/modals/QuestionsCreate.tsx b/src/pages/marketing/survey/modals/QuestionsCreate.tsx deleted file mode 100644 index fab3fcd..0000000 --- a/src/pages/marketing/survey/modals/QuestionsCreate.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { QuestionsTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function QuestionsCreate(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - - return ( - - {...MyModalFormProps.props} - form={form} - title={`添加${props.title}`} - wrapperCol={{ span: 24 }} - key={new Date().getTime()} - width="600px" - trigger={} - onOpenChange={(open: any) => { - if (open) { - form.resetFields(); // 清空表单数据 - } - }} - onFinish={async (values) => { - console.log(values); - return Apis.Survey.Questions.Store({ - ...values, - is_enabled: values?.is_enabled ? true : false, - }) - .then(() => { - props.reload?.(); - message.success(props.title + '成功'); - return true; - }) - .catch(() => false); - }} - columns={[ - MyFormItems.EnumRadio({ - key: 'type', - title: '类型', - valueEnum: QuestionsTypeEnum, - colProps: { span: 12 }, - formItemProps: { ...rulesHelper.text }, - }), - Selects?.QuestionCategories({ - colProps: { span: 12 }, - required: true, - }), - { - key: 'title', - title: '题目', - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'placeholder', - title: '提示', - colProps: { span: 12 }, - }, - { - key: 'max_length', - title: '回答最大字数', - valueType: 'digit', - fieldProps: { - style: { width: '100%' }, - }, - colProps: { span: 12, suffix: '个字' }, - }, - { - key: 'required', - title: '是否必答', - valueType: 'switch', - colProps: { span: 12 }, - }, - { - key: 'is_enabled', - title: '是否启用', - valueType: 'switch', - colProps: { span: 12 }, - }, - // MyFormItems.ColorPicker(), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/modals/QuestionsUpdate.tsx b/src/pages/marketing/survey/modals/QuestionsUpdate.tsx deleted file mode 100644 index 4b810d0..0000000 --- a/src/pages/marketing/survey/modals/QuestionsUpdate.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { QuestionsTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function QuestionsUpdate(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - - return ( - - {...MyModalFormProps.props} - form={form} - title={`编辑${props.title}`} - wrapperCol={{ span: 24 }} - key={new Date().getTime()} - width="500px" - trigger={} - onOpenChange={(open: any) => { - if (open && props.item) { - form.setFieldsValue(props.item); - } - }} - onFinish={async (values) => - Apis.Survey.Questions.Update({ - ...values, - is_enabled: values?.is_enabled ? true : false, - id: props.item?.id ?? 0, - }) - .then(() => { - props.reload?.(); - message.success(props.title + '成功'); - return true; - }) - .catch(() => false) - } - columns={[ - MyFormItems.EnumRadio({ - key: 'type', - title: '类型', - valueEnum: QuestionsTypeEnum, - colProps: { span: 12 }, - formItemProps: { ...rulesHelper.text }, - }), - Selects?.QuestionCategories({ - colProps: { span: 12 }, - required: true, - }), - { - key: 'title', - title: '题目', - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'placeholder', - title: '提示', - colProps: { span: 12 }, - }, - { - key: 'max_length', - title: '回答最大字数', - valueType: 'digit', - fieldProps: { - style: { width: '100%' }, - }, - colProps: { span: 12, suffix: '个字' }, - }, - { - key: 'required', - title: '是否必答', - valueType: 'switch', - colProps: { span: 12 }, - }, - { - key: 'is_enabled', - title: '是否启用', - valueType: 'switch', - colProps: { span: 12 }, - }, - // MyFormItems.ColorPicker(), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/modals/SurveyReleasesCreate.tsx b/src/pages/marketing/survey/modals/SurveyReleasesCreate.tsx deleted file mode 100644 index d916285..0000000 --- a/src/pages/marketing/survey/modals/SurveyReleasesCreate.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { SurveyReleasesTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; -export default function SurveyReleasesCreate(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - - return ( - - {...MyModalFormProps.props} - form={form} - title={`添加${props.title}`} - wrapperCol={{ span: 24 }} - key={new Date().getTime()} - width="600px" - trigger={} - onOpenChange={(open: any) => { - if (open) { - form.resetFields(); // 清空表单数据 - } - }} - onFinish={async (values) => { - console.log(values); - return Apis.Survey.SurveyReleases.Store({ - ...values, - }) - .then(() => { - props.reload?.(); - message.success(props.title + '成功'); - return true; - }) - .catch(() => false); - }} - columns={[ - Selects?.Surveys({ - colProps: { span: 24 }, - required: true, - }), - MyFormItems.EnumRadio({ - key: 'release_type', - title: '发布方式', - valueEnum: SurveyReleasesTypeEnum, - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }), - { - key: 'start_date', - title: '有效日期开始', - valueType: 'dateTime', - colProps: { span: 12 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'end_date', - title: '有效日期结束', - colProps: { span: 12 }, - valueType: 'dateTime', - formItemProps: { ...rulesHelper.text }, - }, - MyFormItems.UploadImages({ - key: 'cover_image', - title: '封面图', - colProps: { span: 24 }, - max: 1, - }), - // MyFormItems.ColorPicker(), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/modals/SurveyReleasesUpdate.tsx b/src/pages/marketing/survey/modals/SurveyReleasesUpdate.tsx deleted file mode 100644 index 2c7eb04..0000000 --- a/src/pages/marketing/survey/modals/SurveyReleasesUpdate.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { SurveyReleasesTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; -export default function SurveyReleasesCreate(props: MyBetaModalFormProps) { - const [form] = Form.useForm(); - - return ( - - {...MyModalFormProps.props} - form={form} - title={`添加${props.title}`} - wrapperCol={{ span: 24 }} - key={new Date().getTime()} - width="600px" - trigger={} - onOpenChange={(open: any) => { - if (open && props.item) { - form.setFieldsValue(props.item); - } - }} - onFinish={async (values) => { - console.log(values); - return Apis.Survey.SurveyReleases.Update({ - ...values, - id: props.item?.id ?? 0, - }) - .then(() => { - props.reload?.(); - message.success('编辑成功'); - return true; - }) - .catch(() => false); - }} - columns={[ - Selects?.Surveys({ - colProps: { span: 24 }, - required: true, - }), - MyFormItems.EnumRadio({ - key: 'release_type', - title: '发布方式', - valueEnum: SurveyReleasesTypeEnum, - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }), - { - key: 'start_date', - title: '有效日期开始', - valueType: 'dateTime', - colProps: { span: 12 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'end_date', - title: '有效日期结束', - colProps: { span: 12 }, - valueType: 'dateTime', - formItemProps: { ...rulesHelper.text }, - }, - MyFormItems.UploadImages({ - key: 'cover_image', - title: '封面图', - colProps: { span: 24 }, - max: 1, - }), - // MyFormItems.ColorPicker(), - ]} - /> - ); -} diff --git a/src/pages/marketing/survey/modals/SurveyResponsesShow.tsx b/src/pages/marketing/survey/modals/SurveyResponsesShow.tsx deleted file mode 100644 index 0b55c13..0000000 --- a/src/pages/marketing/survey/modals/SurveyResponsesShow.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { MyBetaModalFormProps } from '@/common'; -import { MyModal } from '@/components/MyModal'; -import { Apis } from '@/gen/Apis'; -import { List } from 'antd'; -import { useRef, useState } from 'react'; -interface DataType { - key: React.Key; - id: React.Key; - is_enabled: boolean; -} -const scoreInfo = { - '1': '非常不满意', - '2': '比较不满意', - '3': '满意', - '4': '比较满意', - '5': '非常满意', -}; - -export default function SurveyResponsesShow( - props: MyBetaModalFormProps & { - onChange?: (selectedRows: DataType[]) => void; - }, -) { - const modalRef = useRef(); - const [data, setShow] = useState({}); - const loadShow = () => { - Apis.Survey.SurveyResponses.Show({ id: props?.item?.id }).then((res) => { - setShow(res?.data); - }); - }; - - return ( - { - loadShow(); - console.log(props?.item?.list); - }} - node={ - <> - ( - - - - )} - /> - - } - > - ); -} diff --git a/src/pages/marketing/survey/modals/SurveysSelectList.tsx b/src/pages/marketing/survey/modals/SurveysSelectList.tsx deleted file mode 100644 index 356ec8a..0000000 --- a/src/pages/marketing/survey/modals/SurveysSelectList.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyColumns, - MyProTableProps, -} from '@/common'; -import { MyModal } from '@/components/MyModal'; -import { Apis } from '@/gen/Apis'; -import { QuestionsTypeEnum } from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { type TableProps } from 'antd'; -import { useRef, useState } from 'react'; -interface DataType { - key: React.Key; - id: React.Key; - is_enabled: boolean; -} -export default function SurveysSelectList( - props: MyBetaModalFormProps & { - onChange?: (selectedRows: DataType[]) => void; - }, -) { - const modalRef = useRef(); - const [getSelectedRow, setSelectedRow] = useState([]); - const rowSelection: TableProps['rowSelection'] = { - onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => { - setSelectedRow(selectedRows); - }, - getCheckboxProps: (record: DataType) => ({ - disabled: !record.is_enabled, // Column configuration not to be checked - checked: props?.item?.list?.some((item: any) => { - console.log(item, record); - return item?.id === record?.id; - }), - }), - defaultSelectedRowKeys: - props?.item?.list?.map((item: any) => item?.id) || [], - }; - return ( - { - setSelectedRow(props?.item?.list); - console.log(props?.item?.list); - }} - node={ - - MyProTableProps.request(params, sort, Apis.Survey.Questions.List) - } - rowSelection={{ type: 'checkbox', ...rowSelection }} - options={false} - tableAlertOptionRender={() => { - return ( - { - getSelectedRow?.forEach((item: any) => { - item.question_id = item?.id; - }); - props?.onChange?.(getSelectedRow); - modalRef.current?.close(); - }} - title="确定选项" - /> - ); - }} - columns={[ - MyColumns.ID({ - search: false, - }), - { dataIndex: 'title', title: '题目' }, - MyColumns.EnumTag({ - title: '类型', - dataIndex: 'type', - valueEnum: QuestionsTypeEnum, - }), - { dataIndex: 'placeholder', title: '提示', search: false }, - MyColumns.Boolean({ - dataIndex: 'required', - title: '是否必答', - search: false, - }), - MyColumns.Boolean({ - dataIndex: 'is_enabled', - title: '是否启用', - }), - ]} - /> - } - > - ); -} diff --git a/src/pages/marketing/survey/pages/create_surveys.tsx b/src/pages/marketing/survey/pages/create_surveys.tsx deleted file mode 100644 index 1bc7ab2..0000000 --- a/src/pages/marketing/survey/pages/create_surveys.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import { - MyButtons, - MyColumns, - MyModalFormProps, - MyPageContainer, - rulesHelper, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { QuestionsTypeEnum } from '@/gen/Enums'; -import type { ProColumns } from '@ant-design/pro-components'; -import { - BetaSchemaForm, - DragSortTable, - ProCard, -} from '@ant-design/pro-components'; -import { useNavigate } from '@umijs/max'; -import { Form, message, Space } from 'antd'; -import { useState } from 'react'; -import MySurveysSelectList from '../modals/SurveysSelectList'; -export default function Index({ title = '新增问卷' }) { - const [dataSource, setDataSource] = useState( - [], - ); - const [form] = Form.useForm(); - const navigate = useNavigate(); - - const columns: ProColumns[] = [ - { - title: '排序', - dataIndex: 'sort', - width: 60, - className: 'drag-visible', - }, - { - title: '题目', - dataIndex: 'title', - }, - MyColumns.EnumTag({ - title: '类型', - dataIndex: 'type', - valueEnum: QuestionsTypeEnum, - }), - MyColumns.Boolean({ - dataIndex: 'required', - title: '是否必答', - search: false, - }), - MyColumns.Option({ - render: (_, item: any, index) => ( - - { - setDataSource( - dataSource.filter((res: any) => res?.id !== item?.id), - ); - }} - /> - - ), - }), - ]; - - const handleDragSortEnd = ( - beforeIndex: number, - afterIndex: number, - newDataSource: any, - ) => { - console.log(newDataSource, 'newDataSource'); - setDataSource(newDataSource); - }; - - return ( - { - navigate(-1); - }} - > - {/* */} - {title} - - } - enableTabs={false} - tabKey="charge-standards-create" - tabLabel={title} - > - -
- - {...MyModalFormProps.props} - title={title} - // 基础表单 - layoutType="Form" - labelCol={{ span: 4 }} - wrapperCol={{ span: 24 }} - labelAlign="left" - width="900px" - form={form} - onFinish={async (values: any) => - Apis.Survey.Surveys.Store({ - ...values, - questions: dataSource, - }) - .then(() => { - navigate(-1); - message.success('新增成功'); - return true; - }) - .catch(() => false) - } - columns={[ - { - key: 'name', - title: '问卷名称', - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'is_enabled', - title: '是否启用', - valueType: 'switch', - colProps: { span: 24 }, - }, - { - key: 'description', - title: '问卷描述', - valueType: 'textarea', - colProps: { span: 24 }, - }, - - { - colProps: { span: 24 }, - renderFormItem: () => { - return ( - - [ - { - setDataSource(e); - }} - />, - ]} - bordered - options={false} - columns={columns} - rowKey="id" - search={false} - pagination={false} - dataSource={dataSource || []} - dragSortKey="sort" - onDragSortEnd={handleDragSortEnd} - /> - - ); - }, - }, - ]} - /> -
-
- - ); -} diff --git a/src/pages/marketing/survey/pages/update_surveys.tsx b/src/pages/marketing/survey/pages/update_surveys.tsx deleted file mode 100644 index 772b685..0000000 --- a/src/pages/marketing/survey/pages/update_surveys.tsx +++ /dev/null @@ -1,188 +0,0 @@ -import { - MyButtons, - MyColumns, - MyModalFormProps, - MyPageContainer, - rulesHelper, -} from '@/common'; -import { Apis } from '@/gen/Apis'; -import { QuestionsTypeEnum } from '@/gen/Enums'; -import type { ProColumns } from '@ant-design/pro-components'; -import { - BetaSchemaForm, - DragSortTable, - ProCard, -} from '@ant-design/pro-components'; -import { useNavigate, useSearchParams } from '@umijs/max'; -import { Form, message, Space } from 'antd'; -import { useEffect, useState } from 'react'; -import MySurveysSelectList from '../modals/SurveysSelectList'; -export default function Index({ title = '新增问卷' }) { - const [data, setShow] = useState({}); - const [dataSource, setDataSource] = useState( - [], - ); - const [form] = Form.useForm(); - const navigate = useNavigate(); - - const columns: ProColumns[] = [ - { - title: '排序', - dataIndex: 'sort', - width: 60, - className: 'drag-visible', - }, - { - title: '题目', - dataIndex: 'title', - }, - MyColumns.EnumTag({ - title: '类型', - dataIndex: 'type', - valueEnum: QuestionsTypeEnum, - }), - MyColumns.Boolean({ - dataIndex: 'required', - title: '是否必答', - search: false, - }), - MyColumns.Option({ - render: (_, item: any, index) => ( - - { - setDataSource( - dataSource.filter((res: any) => res?.id !== item?.id), - ); - }} - /> - - ), - }), - ]; - - const handleDragSortEnd = ( - beforeIndex: number, - afterIndex: number, - newDataSource: any, - ) => { - console.log(newDataSource, 'newDataSource'); - setDataSource(newDataSource); - }; - - const [searchParams] = useSearchParams(); - - const loadShow = () => { - let paramsId: any = { id: searchParams.get('id') ?? 0 }; - Apis.Survey.Surveys.Show(paramsId).then((res) => { - res?.data?.questions_with_order?.forEach((k: any) => { - k.question_id = k?.id; - }); - setDataSource(res?.data?.questions_with_order || []); - setShow(res?.data); - form.setFieldsValue(res?.data); // 编辑赋值 - }); - }; - - useEffect(() => { - loadShow(); - }, [searchParams.get('id')]); - - return ( - { - navigate(-1); - }} - > - {/* */} - {title} - - } - enableTabs={false} - tabKey="charge-standards-create" - tabLabel={title} - > - -
- - {...MyModalFormProps.props} - title={title} - // 基础表单 - layoutType="Form" - labelCol={{ span: 4 }} - wrapperCol={{ span: 24 }} - labelAlign="left" - width="900px" - form={form} - onFinish={async (values: any) => - Apis.Survey.Surveys.Update({ - ...values, - questions: dataSource, - id: data?.id, - }) - .then(() => { - navigate(-1); - message.success('编辑成功'); - return true; - }) - .catch(() => false) - } - columns={[ - { - key: 'name', - title: '问卷名称', - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'is_enabled', - title: '是否启用', - valueType: 'switch', - colProps: { span: 24 }, - }, - { - key: 'description', - title: '问卷描述', - valueType: 'textarea', - colProps: { span: 24 }, - }, - { - colProps: { span: 24 }, - renderFormItem: () => { - return ( - - [ - { - setDataSource(e); - }} - />, - ]} - bordered - options={false} - columns={columns} - rowKey="id" - search={false} - pagination={false} - dataSource={dataSource || []} - dragSortKey="sort" - onDragSortEnd={handleDragSortEnd} - /> - - ); - }, - }, - ]} - /> -
-
-
- ); -} diff --git a/src/pages/meter/index.tsx b/src/pages/meter/index.tsx index b745318..dd5b8f4 100644 --- a/src/pages/meter/index.tsx +++ b/src/pages/meter/index.tsx @@ -1,28 +1,26 @@ -import { MyPageContainer, useCurrentPermissions } from '@/common'; +import { MyPageContainer } from '@/common'; import { useSearchParams } from '@umijs/max'; -import type { TabsProps } from 'antd'; import { Tabs } from 'antd'; import { useEffect, useState } from 'react'; import CommonMeter from './common_meter'; import HouseMeter from './house_meter'; -export default function Index({ title = '资源管理' }) { +export default function Index({ title = '仪表管理' }) { const [searchParams] = useSearchParams(); - const getCurrentPermissions = useCurrentPermissions(); - const [activeKey, setActiveKey] = useState('MyResources'); - const items: TabsProps['items'] = getCurrentPermissions({ - HouseMeter: { + + const items = [ + { key: 'HouseMeter', label: '房屋表', children: , }, - CommonMeter: { + { key: 'CommonMeter', label: '公摊表', children: , }, - }); + ]; useEffect(() => { if (searchParams?.get('key')) { setActiveKey(searchParams?.get('key') || '1'); diff --git a/src/pages/visitor_applies/index.tsx b/src/pages/visitor_applies/index.tsx index 6365f5e..b9a5935 100644 --- a/src/pages/visitor_applies/index.tsx +++ b/src/pages/visitor_applies/index.tsx @@ -5,7 +5,6 @@ import { MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { VisitorAppliesStatusEnum } from '@/gen/Enums'; import { ProTable } from '@ant-design/pro-components'; import { message, Space } from 'antd'; import Review from './modals/Review'; @@ -35,7 +34,7 @@ export default function Index({ title = '访客预约' }) { MyColumns.EnumTag({ title: '申请状态', dataIndex: 'status', - valueEnum: VisitorAppliesStatusEnum, + // valueEnum: VisitorAppliesStatusEnum, }), { title: '房屋', diff --git a/src/pages/work_order/list/components/Complaint.tsx b/src/pages/work_order/list/components/Complaint.tsx index f194a5b..d60a4b5 100644 --- a/src/pages/work_order/list/components/Complaint.tsx +++ b/src/pages/work_order/list/components/Complaint.tsx @@ -170,7 +170,7 @@ export default function Index({ title = '客户投诉' }) { - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ + Apis.WorkOrder.HouseWorkOrders.Delete({ id: item.id, }).then(() => action?.reload()) } diff --git a/src/pages/work_order/list/components/EquipmentMaintenance.tsx b/src/pages/work_order/list/components/EquipmentMaintenance.tsx deleted file mode 100644 index c9c994a..0000000 --- a/src/pages/work_order/list/components/EquipmentMaintenance.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import { MyButtons, MyColumns, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { - HouseWorkOrdersAssignStatusEnum, - HouseWorkOrdersLevelEnum, - HouseWorkOrdersLocationEnum, - HouseWorkOrdersStatusEnum, - HouseWorkOrdersTypeEnum, -} from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Image, Space } from 'antd'; -import WorkOrderAssign from '../modals/WorkOrderAssign'; -import WorkOrderShow from '../modals/WorkOrderShow'; -import WorkOrderUpdate from '../modals/WorkOrderUpdate'; - -export default function Index({ title = '设备维保' }) { - return ( - - MyProTableProps.request( - { - ...params, - type: [HouseWorkOrdersTypeEnum.EquipmentMaintenance.value], - }, - sort, - Apis.WorkOrder.HouseWorkOrders.List, - ) - } - // toolBarRender={(action) => [ - // , - // ]} - columns={[ - MyColumns.ID({ - search: false, - }), - MyColumns.EnumTag({ - title: '工单状态', - dataIndex: 'status', - valueEnum: HouseWorkOrdersStatusEnum, - }), - MyColumns.EnumTag({ - title: '工单类型', - dataIndex: 'type', - valueEnum: HouseWorkOrdersTypeEnum, - }), - MyColumns.EnumTag({ - title: '报修位置', - dataIndex: 'location', - valueEnum: HouseWorkOrdersLocationEnum, - }), - { - title: '房屋信息', - dataIndex: ['asset_house', 'full_name'], - search: false, - ellipsis: true, - }, - { - title: '工单描述', - dataIndex: 'content', - search: false, - width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽) - render: (text) => ( -
- {text} -
- ), - }, - { - title: '附件', - dataIndex: 'attachments', - search: false, - render: (_, record) => { - if ( - !Array.isArray(record.attachments) || - record.attachments.length === 0 - ) { - return '无附件'; - } - return ( -
- {record.attachments.map((item: any, index: number) => { - if (item.type && item.type.includes('image')) { - return ( - - ); - } else if (item.type && item.type.includes('video')) { - return ( -
- ); - }, - }, - MyColumns.EnumTag({ - title: '分配状态', - dataIndex: 'assign_status', - valueEnum: HouseWorkOrdersAssignStatusEnum, - }), - MyColumns.EnumTag({ - title: '优先级', - dataIndex: 'level', - valueEnum: HouseWorkOrdersLevelEnum, - }), - { - title: '处理人', - dataIndex: ['assign_employee', 'name'], - search: false, - render: (_, record) => { - return `${record?.assign_employee?.name || ''}-${ - record?.assign_employee?.phone || '' - }`; - }, - }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - {item.status !== 'Completed' && ( - - )} - {item.assign_status === 'Unassigned' && ( - - )} - - - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ - id: item.id, - }).then(() => action?.reload()) - } - /> - - ), - }), - ]} - /> - ); -} diff --git a/src/pages/work_order/list/components/Incident.tsx b/src/pages/work_order/list/components/Incident.tsx index 9b1000b..babbd68 100644 --- a/src/pages/work_order/list/components/Incident.tsx +++ b/src/pages/work_order/list/components/Incident.tsx @@ -170,7 +170,7 @@ export default function Index({ title = '报事工单' }) { - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ + Apis.WorkOrder.HouseWorkOrders.Delete({ id: item.id, }).then(() => action?.reload()) } diff --git a/src/pages/work_order/list/components/Renovation.tsx b/src/pages/work_order/list/components/Renovation.tsx deleted file mode 100644 index f71e354..0000000 --- a/src/pages/work_order/list/components/Renovation.tsx +++ /dev/null @@ -1,186 +0,0 @@ -import { MyButtons, MyColumns, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { - HouseWorkOrdersAssignStatusEnum, - HouseWorkOrdersLevelEnum, - HouseWorkOrdersLocationEnum, - HouseWorkOrdersStatusEnum, - HouseWorkOrdersTypeEnum, -} from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Image, Space } from 'antd'; -import WorkOrderAssign from '../modals/WorkOrderAssign'; -import WorkOrderShow from '../modals/WorkOrderShow'; -import WorkOrderUpdate from '../modals/WorkOrderUpdate'; - -export default function Index({ title = '装修工单' }) { - return ( - - MyProTableProps.request( - { - ...params, - type: [ - HouseWorkOrdersTypeEnum.RenovationInspection.value, - HouseWorkOrdersTypeEnum.RenovationAcceptance.value, - ], - }, - sort, - Apis.WorkOrder.HouseWorkOrders.List, - ) - } - // toolBarRender={(action) => [ - // , - // ]} - columns={[ - MyColumns.ID({ - search: false, - }), - MyColumns.EnumTag({ - title: '工单状态', - dataIndex: 'status', - valueEnum: HouseWorkOrdersStatusEnum, - }), - MyColumns.EnumTag({ - title: '工单类型', - dataIndex: 'type', - valueEnum: HouseWorkOrdersTypeEnum, - }), - MyColumns.EnumTag({ - title: '报修位置', - dataIndex: 'location', - valueEnum: HouseWorkOrdersLocationEnum, - }), - { - title: '房屋信息', - dataIndex: ['asset_house', 'full_name'], - search: false, - ellipsis: true, - }, - { - title: '工单描述', - dataIndex: 'content', - search: false, - width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽) - render: (text) => ( -
- {text} -
- ), - }, - { - title: '附件', - dataIndex: 'attachments', - search: false, - render: (_, record) => { - if ( - !Array.isArray(record.attachments) || - record.attachments.length === 0 - ) { - return '无附件'; - } - return ( -
- {record.attachments.map((item: any, index: number) => { - if (item.type && item.type.includes('image')) { - return ( - - ); - } else if (item.type && item.type.includes('video')) { - return ( -
- ); - }, - }, - MyColumns.EnumTag({ - title: '分配状态', - dataIndex: 'assign_status', - valueEnum: HouseWorkOrdersAssignStatusEnum, - }), - MyColumns.EnumTag({ - title: '优先级', - dataIndex: 'level', - valueEnum: HouseWorkOrdersLevelEnum, - }), - { - title: '处理人', - dataIndex: ['assign_employee', 'name'], - search: false, - render: (_, record) => { - return `${record?.assign_employee?.name || ''}-${ - record?.assign_employee?.phone || '' - }`; - }, - }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - {item.status !== 'Completed' && ( - - )} - {item.assign_status === 'Unassigned' && ( - - )} - - - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ - id: item.id, - }).then(() => action?.reload()) - } - /> - - ), - }), - ]} - /> - ); -} diff --git a/src/pages/work_order/list/components/Repair.tsx b/src/pages/work_order/list/components/Repair.tsx index 92fe2e1..b7814e5 100644 --- a/src/pages/work_order/list/components/Repair.tsx +++ b/src/pages/work_order/list/components/Repair.tsx @@ -172,7 +172,7 @@ export default function Index({ title = '工单管理' }) { )} - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ + Apis.WorkOrder.HouseWorkOrders.Delete({ id: item.id, }).then(() => action?.reload()) } diff --git a/src/pages/work_order/list/components/SecurityInspection.tsx b/src/pages/work_order/list/components/SecurityInspection.tsx deleted file mode 100644 index a97c506..0000000 --- a/src/pages/work_order/list/components/SecurityInspection.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import { MyButtons, MyColumns, MyProTableProps } from '@/common'; -import { Apis } from '@/gen/Apis'; -import { - HouseWorkOrdersAssignStatusEnum, - HouseWorkOrdersLevelEnum, - HouseWorkOrdersLocationEnum, - HouseWorkOrdersStatusEnum, - HouseWorkOrdersTypeEnum, -} from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Image, Space } from 'antd'; -import WorkOrderAssign from '../modals/WorkOrderAssign'; -import WorkOrderShow from '../modals/WorkOrderShow'; -import WorkOrderUpdate from '../modals/WorkOrderUpdate'; - -export default function Index({ title = '安防巡检' }) { - return ( - - MyProTableProps.request( - { - ...params, - type: [HouseWorkOrdersTypeEnum.SecurityInspection.value], - }, - sort, - Apis.WorkOrder.HouseWorkOrders.List, - ) - } - // toolBarRender={(action) => [ - // , - // ]} - columns={[ - MyColumns.ID({ - search: false, - }), - MyColumns.EnumTag({ - title: '工单状态', - dataIndex: 'status', - valueEnum: HouseWorkOrdersStatusEnum, - }), - MyColumns.EnumTag({ - title: '工单类型', - dataIndex: 'type', - valueEnum: HouseWorkOrdersTypeEnum, - }), - MyColumns.EnumTag({ - title: '报修位置', - dataIndex: 'location', - valueEnum: HouseWorkOrdersLocationEnum, - }), - { - title: '房屋信息', - dataIndex: ['asset_house', 'full_name'], - search: false, - ellipsis: true, - }, - { - title: '工单描述', - dataIndex: 'content', - search: false, - width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽) - render: (text) => ( -
- {text} -
- ), - }, - { - title: '附件', - dataIndex: 'attachments', - search: false, - render: (_, record) => { - if ( - !Array.isArray(record.attachments) || - record.attachments.length === 0 - ) { - return '无附件'; - } - return ( -
- {record.attachments.map((item: any, index: number) => { - if (item.type && item.type.includes('image')) { - return ( - - ); - } else if (item.type && item.type.includes('video')) { - return ( -
- ); - }, - }, - MyColumns.EnumTag({ - title: '分配状态', - dataIndex: 'assign_status', - valueEnum: HouseWorkOrdersAssignStatusEnum, - }), - MyColumns.EnumTag({ - title: '优先级', - dataIndex: 'level', - valueEnum: HouseWorkOrdersLevelEnum, - }), - { - title: '处理人', - dataIndex: ['assign_employee', 'name'], - search: false, - render: (_, record) => { - return `${record?.assign_employee?.name || ''}-${ - record?.assign_employee?.phone || '' - }`; - }, - }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - - {item.status !== 'Completed' && ( - - )} - {item.assign_status === 'Unassigned' && ( - - )} - - - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ - id: item.id, - }).then(() => action?.reload()) - } - /> - - ), - }), - ]} - /> - ); -} diff --git a/src/pages/work_order/list/components/WorkList.tsx b/src/pages/work_order/list/components/WorkList.tsx index 8c28352..806b5fa 100644 --- a/src/pages/work_order/list/components/WorkList.tsx +++ b/src/pages/work_order/list/components/WorkList.tsx @@ -201,8 +201,6 @@ export default function Index({ title = '工单管理' }) { )} {item.assign_status === 'Unassigned' && (item.type === 'Complaint' || - item.type === 'RenovationInspection' || - item.type === 'RenovationAcceptance' || item.type === 'SecurityInspection') && ( - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ + Apis.WorkOrder.HouseWorkOrders.Delete({ id: item.id, }).then(() => action?.reload()) } diff --git a/src/pages/work_order/list/index.tsx b/src/pages/work_order/list/index.tsx index 67fd40c..d2bb001 100644 --- a/src/pages/work_order/list/index.tsx +++ b/src/pages/work_order/list/index.tsx @@ -37,9 +37,8 @@ export default function Index({ title = '报修报事' }) { let obj: any = JSON.parse( JSON.stringify(HouseWorkOrdersTypeEnum), ); - delete obj.RenovationAcceptance; + delete obj.EquipmentMaintenance; - delete obj.RenovationInspection; delete obj.Emergency; delete obj.EmergEquipmentMaintenancency; delete obj.SecurityInspection; @@ -59,23 +58,7 @@ export default function Index({ title = '报修报事' }) { <> {item.status === 'Pending' && ( { - let obj: any = JSON.parse( - JSON.stringify(HouseWorkOrdersTypeEnum), - ); - delete obj.RenovationAcceptance; - delete obj.EquipmentMaintenance; - delete obj.RenovationInspection; - delete obj.Emergency; - delete obj.EmergEquipmentMaintenancency; - delete obj.SecurityInspection; - delete obj.Complaint; - delete obj.QualityCheck; - return obj; - }, - }} + item={item} reload={action?.reload} title={title} /> @@ -105,7 +88,7 @@ export default function Index({ title = '报修报事' }) { delete: ( - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ + Apis.WorkOrder.HouseWorkOrders.Delete({ id: item.id, }).then(() => action?.reload()) } diff --git a/src/pages/work_order/patrol_work/index.tsx b/src/pages/work_order/patrol_work/index.tsx deleted file mode 100644 index 31b2051..0000000 --- a/src/pages/work_order/patrol_work/index.tsx +++ /dev/null @@ -1,221 +0,0 @@ -import { - MyButtons, - MyColumns, - MyProTableProps, - useCurrentPermissions, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { - HouseWorkOrdersAssignStatusEnum, - HouseWorkOrdersLevelEnum, - HouseWorkOrdersLocationEnum, - HouseWorkOrdersTypeEnum, -} from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import WorkOrderAssign from '../list/modals/WorkOrderAssign'; -import WorkOrderCreate from '../list/modals/WorkOrderCreate'; -import WorkOrderShow from '../list/modals/WorkOrderShow'; -import WorkOrderUpdate from '../list/modals/WorkOrderUpdate'; - -export const RenovationWorkOrdersStatusEnum = { - Pending: { text: '待处理', color: '#FFA500', value: 'Pending' }, - Processing: { text: '处理中', color: '#1E90FF', value: 'Processing' }, - Completed: { text: '已完成', color: '#28A745', value: 'Completed' }, - Closed: { text: '已关闭', color: '#6C757D', value: 'Closed' }, -}; - -export default function Index({ title = '装修工单' }) { - const getCurrentPermissions = useCurrentPermissions(); - let toolBarRender = (action: any) => { - return getCurrentPermissions({ - add: ( - - ), - }); - }; - - let tableRender = (item: any, action: any) => { - return getCurrentPermissions( - { - show: ( - - ), - assign: ( - <> - {item.assign_status === 'Unassigned' && - item.type !== 'SecurityInspection' && ( - - )} - - ), - update: ( - <> - {item.status === 'Pending' && ( - - )} - - ), - delete: ( - - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ - id: item.id, - }).then(() => action?.reload()) - } - /> - ), - }, - 'MyDecorationWorkorder', - ); - }; - - const WorkTypeEnum: any = () => { - let obj: any = JSON.parse(JSON.stringify(HouseWorkOrdersTypeEnum)); - delete obj.Repair; - delete obj.Incident; - delete obj.Complaint; - delete obj.RenovationInspection; - delete obj.RenovationAcceptance; - delete obj.Emergency; - delete obj.EquipmentMaintenance; - delete obj.QualityCheck; - return obj; - }; - - return ( - > - {...MyProTableProps.props} - headerTitle={title} - request={async (params, sort) => { - return MyProTableProps.request( - { - ...params, - type: [HouseWorkOrdersTypeEnum.SecurityInspection.value], - }, - sort, - Apis.WorkOrder.HouseWorkOrders.List, - ); - }} - toolBarRender={(action) => [toolBarRender(action)]} - columns={[ - MyColumns.ID({ search: false }), - Selects?.AssetProjects({ - title: '选择项目', - key: 'asset_projects_id', - hidden: true, - }), - MyColumns.EnumTag({ - title: '处理状态', - dataIndex: 'status', - valueEnum: RenovationWorkOrdersStatusEnum, - }), - { - title: '项目名称', - dataIndex: 'project_name', - hidden: true, - }, - MyColumns.EnumTag({ - title: '分配状态', - dataIndex: 'assign_status', - valueEnum: HouseWorkOrdersAssignStatusEnum, - }), - MyColumns.EnumTag({ - title: '工单类型', - dataIndex: 'type', - valueEnum: HouseWorkOrdersTypeEnum, - search: false, - }), - MyColumns.EnumTag({ - title: '报修位置', - dataIndex: 'location', - valueEnum: HouseWorkOrdersLocationEnum, - search: false, - }), - { - title: '位置信息', - dataIndex: ['asset_house', 'full_name'], - render: (_, record) => { - return ( - - {record?.asset_house?.full_name - ? record?.asset_house?.full_name - : record?.asset_project?.name} - - ); - }, - search: { - transform: (value) => { - return { house_name: value }; - }, - }, - }, - { - title: '工单描述', - dataIndex: 'content', - search: false, - width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽) - render: (text) => ( -
- {text} -
- ), - }, - MyColumns.EnumTag({ - title: '优先级', - dataIndex: 'level', - valueEnum: HouseWorkOrdersLevelEnum, - search: false, - }), - - { - title: '处理人', - dataIndex: ['assign_employee', 'name'], - search: false, - render: (_, record) => { - return `${record?.assign_employee?.name || ''}-${ - record?.assign_employee?.phone || '' - }`; - }, - }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - <>{tableRender(item, action)} - - ), - }), - ]} - /> - ); -} diff --git a/src/pages/work_order/renovation/index.tsx b/src/pages/work_order/renovation/index.tsx deleted file mode 100644 index 7243538..0000000 --- a/src/pages/work_order/renovation/index.tsx +++ /dev/null @@ -1,223 +0,0 @@ -import { - MyButtons, - MyColumns, - MyProTableProps, - useCurrentPermissions, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { - HouseWorkOrdersAssignStatusEnum, - HouseWorkOrdersLevelEnum, - HouseWorkOrdersTypeEnum, -} from '@/gen/Enums'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; -import WorkOrderCreate from '../list/modals/WorkOrderCreate'; -import WorkOrderShow from '../list/modals/WorkOrderShow'; -import WorkOrderUpdate from '../list/modals/WorkOrderUpdate'; -import RenovationAssign from './modals/RenovationAssign'; - -export const RenovationWorkOrdersStatusEnum = { - Pending: { text: '待处理', color: '#FFA500', value: 'Pending' }, - Processing: { text: '处理中', color: '#1E90FF', value: 'Processing' }, - Completed: { text: '已完成', color: '#28A745', value: 'Completed' }, - Closed: { text: '已关闭', color: '#6C757D', value: 'Closed' }, -}; - -export default function Index({ title = '装修工单' }) { - const getCurrentPermissions = useCurrentPermissions(); - let toolBarRender = (action: any) => { - return getCurrentPermissions({ - add: ( - - ), - }); - }; - - let tableRender = (item: any, action: any) => { - return getCurrentPermissions( - { - show: ( - - ), - - update: ( - <> - {item.status === 'Pending' && ( - - )} - - ), - assign: ( - <> - {item.assign_status === 'Unassigned' && - item.type !== 'SecurityInspection' && ( - - )} - - ), - delete: ( - - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ - id: item.id, - }).then(() => action?.reload()) - } - /> - ), - }, - 'MyDecorationWorkorder', - ); - }; - - const WorkTypeEnum = () => { - let obj: any = JSON.parse(JSON.stringify(HouseWorkOrdersTypeEnum)); - delete obj.Repair; - delete obj.Incident; - delete obj.Complaint; - delete obj.SecurityInspection; - delete obj.Emergency; - delete obj.EquipmentMaintenance; - delete obj.QualityCheck; - return obj; - }; - - return ( - > - {...MyProTableProps.props} - headerTitle={title} - request={async (params, sort) => { - return MyProTableProps.request( - { - ...params, - type: [ - HouseWorkOrdersTypeEnum.RenovationInspection.value, - HouseWorkOrdersTypeEnum.RenovationAcceptance.value, - ], - }, - sort, - Apis.WorkOrder.HouseWorkOrders.List, - ); - }} - toolBarRender={(action) => [toolBarRender(action)]} - columns={[ - MyColumns.ID({ search: false }), - Selects?.AssetProjects({ - title: '选择项目', - key: 'asset_projects_id', - hidden: true, - }), - MyColumns.EnumTag({ - title: '处理状态', - dataIndex: 'status', - valueEnum: RenovationWorkOrdersStatusEnum, - }), - { - title: '项目名称', - dataIndex: 'project_name', - hidden: true, - }, - MyColumns.EnumTag({ - title: '分配状态', - dataIndex: 'assign_status', - valueEnum: HouseWorkOrdersAssignStatusEnum, - }), - // MyColumns.EnumTag({ - // title: '工单类型', - // dataIndex: 'type', - // valueEnum: HouseWorkOrdersTypeEnum, - // search: false, - // }), - // MyColumns.EnumTag({ - // title: '报修位置', - // dataIndex: 'location', - // valueEnum: HouseWorkOrdersLocationEnum, - // search: false, - // }), - { - title: '位置信息', - dataIndex: ['asset_house', 'full_name'], - render: (_, record) => { - return ( - - {record?.asset_house?.full_name - ? record?.asset_house?.full_name - : record?.asset_project?.name} - - ); - }, - search: { - transform: (value) => { - return { house_name: value }; - }, - }, - }, - // { - // title: '工单描述', - // dataIndex: 'content', - // search: false, - // width: 200, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽) - // render: (text) => ( - //
- // {text} - //
- // ), - // }, - MyColumns.EnumTag({ - title: '优先级', - dataIndex: 'level', - valueEnum: HouseWorkOrdersLevelEnum, - search: false, - }), - - { - title: '处理人', - dataIndex: ['assign_employee', 'name'], - search: false, - render: (_, record) => { - return `${record?.assign_employee?.name || ''}-${ - record?.assign_employee?.phone || '' - }`; - }, - }, - MyColumns.CreatedAt(), - MyColumns.Option({ - render: (_, item: any, index, action) => ( - - <>{tableRender(item, action)} - - ), - }), - ]} - /> - ); -} diff --git a/src/pages/work_order/renovation/modals/RenovationAssign.tsx b/src/pages/work_order/renovation/modals/RenovationAssign.tsx deleted file mode 100644 index 89a4e63..0000000 --- a/src/pages/work_order/renovation/modals/RenovationAssign.tsx +++ /dev/null @@ -1,129 +0,0 @@ -import { - MyBetaModalFormProps, - MyButtons, - MyFormItems, - MyModalFormProps, - rulesHelper, -} from '@/common'; -import { Selects } from '@/components/Select'; -import { Apis } from '@/gen/Apis'; -import { HouseWorkOrdersTypeEnum } from '@/gen/Enums'; -import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; - -export default function WorkOrderAssign( - props: MyBetaModalFormProps & { item: any }, -) { - const [form] = Form.useForm(); - return ( - - {...MyModalFormProps.props} - title={`指派工单`} - wrapperCol={{ span: 19 }} - width="600px" - layout="horizontal" - labelCol={{ span: 5 }} - labelAlign="left" - trigger={ - - } - key={new Date().getTime()} - form={form} - request={async () => { - const res = await Apis.WorkOrder.HouseWorkOrders.Show({ - id: props.item.id, - }); - return { - title: res.data.title, - assign_employee_id: res.data.assign_employee_id, - content: res.data.content, - attachments: res.data.attachments, - complaint_type: res.data.complaint_type, - locationInfo: res.data.asset_house.full_name, - }; - }} - onFinish={async (values: any) => { - Apis.WorkOrder.HouseWorkOrders.Assign({ - ...values, - id: props.item.id, - predict_complete_at: values.predict_complete_at, - }) - .then(() => { - props.reload?.(); - message.success('指派工单成功'); - return true; - }) - .catch(() => false); - }} - columns={[ - MyFormItems.EnumRadio({ - key: 'type', - title: '工单类型', - colProps: { span: 24 }, - valueEnum: HouseWorkOrdersTypeEnum, - readonly: true, - }), - { - key: 'locationInfo', - title: '房屋信息', - colProps: { span: 24 }, - readonly: true, - }, - { - key: 'content', - title: '工单描述', - colProps: { span: 24 }, - readonly: true, - fieldProps: { - disabled: true, - }, - }, - { valueType: 'divider' }, - - // MyFormItems.EnumRadio({ - // key: 'level', - // title: '优先级', - // colProps: { span: 24 }, - // valueEnum: HouseWorkOrdersLevelEnum, - // required: true, - // }), - // { - // key: 'predict_complete_at', - // title: '完成时间要求', - // valueType: 'date', - // colProps: { span: 24 }, - // formItemProps: { ...rulesHelper.text }, - // fieldProps: { - // disabledDate: (current: any) => { - // // 只能选今天及以后的日期 - // const today = new Date(); - // today.setHours(0, 0, 0, 0); // 设置为今天的00:00:00 - // return current && current < today; - // }, - // addonAfter: '前', - // }, - // }, - Selects?.Employees({ - title: '选择处理人', - key: 'assign_employees_id', - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - params: { - companies_id: props.item.companies_id, - }, - required: true, - }), - { - key: 'assign_remark', - title: '备注', - valueType: 'textarea', - colProps: { span: 24 }, - fieldProps: { - rows: 3, - // placeholder: '请输入指派备注(可选)', - }, - }, - ]} - /> - ); -}