Merge pull request 'fix:更新打开范围' (#11) from develop into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m3s

Reviewed-on: #11
This commit is contained in:
zsq 2026-04-16 10:04:36 +08:00
commit 5c0278e04e
13 changed files with 1052 additions and 406 deletions

View File

@ -17,8 +17,8 @@ export default defineConfig({
},
proxy: {
'/api/': {
// target: 'http://10.39.13.78:8002/',
target: 'http://test-company.linyikj.com.cn/',
target: 'http://10.39.13.78:8002/',
// target: 'http://test-company.linyikj.com.cn/',
// target: 'https://company.linyikj.com.cn/',
changeOrigin: true,
pathRewrite: { '^': '' },

View File

@ -997,4 +997,38 @@ export const Selects = {
},
};
},
//获取装修巡检规则
RenovationInspectionRules(props?: PropsType): ReturnType {
const {
title = '选择巡检规则',
key = 'renovation_inspection_rules_id',
required = false,
hideInTable = true,
...rest
} = props ?? {};
return {
title: title,
key: key,
valueType: 'select',
hideInTable: hideInTable,
formItemProps: { ...(required ? rulesHelper.number : {}) },
request: async (params) => {
let res = await Apis.Renovation.RenovationInspectionRules.Select({
...params,
name: params?.keyWords || undefined,
});
return res?.data;
},
...rest,
fieldProps: {
showSearch: true,
fieldNames: {
label: 'name',
value: 'id',
},
...rest?.fieldProps,
},
};
},
};

375
src/gen/ApiTypes.d.ts vendored
View File

@ -2253,6 +2253,199 @@ declare namespace ApiTypes {
};
}
}
namespace Emergency {
namespace EmergencyEventBills {
type List = {
"emergency_events_id"?: number; // -
"cost_type"?: string; // -
"fee_type"?: string; // -
"fee_name"?: string; // -
"payment_status"?: string; // -
"payment_method"?: string; // -
};
type Store = {
"emergency_events_id": number; // -
"cost_type": string; // -
"fee_type": string; // -
"fee_name": string; // -
"amount": number; // -
"payee": string; // -
"payee_bank": string; // -
"payee_account": string; // -
"payer": string; // -
"payer_bank": string; // -
"payer_account": string; // -
};
type Update = {
"id": number; // -
"cost_type": string; // -
"fee_type": string; // -
"fee_name": string; // -
"amount": number; // -
"payee": string; // -
"payee_bank": string; // -
"payee_account": string; // -
"payer": string; // -
"payer_bank": string; // -
"payer_account": string; // -
};
}
namespace EmergencyEventCategories {
type List = {
"name"?: string; // -
"parent_id"?: number; // -
};
type TreeList = {
"name"?: string; // -
"parent_id"?: number; // -
};
type Store = {
"name": string; // -
"description"?: string; // -
"is_enabled"?: number; // -
"_lft"?: number; // -
"_rgt"?: number; // -
"parent_id"?: number; // -
};
type Update = {
"id": number; // -
"name": string; // -
"description"?: string; // -
"is_enabled"?: number; // -
"_lft"?: number; // -
"_rgt"?: number; // -
"parent_id"?: number; // -
};
type Move = {
"id": number; // -
"type": string; // -
};
type SelectTree = {
"keywords"?: string; // -
"type"?: string; // -
"parent_id"?: number; // -
};
}
namespace EmergencyEventFollows {
type List = {
"emergency_events_id": number; // -
"content"?: string; // -
};
type Store = {
"emergency_events_id": number; // -
"content": string; // -
"attachments"?: string[]; // -
};
}
namespace EmergencyEventLevels {
type Store = {
"name": string; // -
"is_enabled"?: number; // -
};
type Update = {
"id": number; // -
"name": string; // -
"is_enabled"?: number; // -
};
}
namespace EmergencyEventTeams {
type List = {
"name"?: string; // -
"leader_name"?: string; // -
};
type Store = {
"name": string; // -
"asset_projects_id": number; // -
"company_employees_id": number; // -
"is_enabled"?: number; // -
"members"?: string[]; // -
};
type Update = {
"id": number; // -
"name": string; // -
"asset_projects_id": number; // -
"company_employees_id": number; // -
"is_enabled"?: number; // -
"members"?: string[]; // -
};
type Select = {
"name"?: string; // -
"leader_name"?: string; // -
};
}
namespace EmergencyEvents {
type List = {
"name"?: string; // -
"asset_projects_id"?: number; // -
"asset_projects_name"?: string; // -
"emergency_event_employees_id"?: number; // -
"reporter_name"?: string; // -
"emergency_time"?: string[]; // -
"status"?: string; // -
"audit_status"?: string; // -
};
type Store = {
"name": string; // -
"two_emergency_categories_id": number; // -
"emergency_event_levels_id": number; // -
"asset_projects_id": number; // -
"emergency_time": Date; // -
"emergency_location": string; // -
"emergency_description": string; // -
"emergency_cause": string; // -
"cause_result": string; // -
"emergency_images"?: string[]; // -
"emergency_events_id"?: number; // -
"related_person"?: string; // -
"supplement"?: string; // -
"compensation_type"?: string; // -
"compensation_rate"?: number; // -
"compensation_amount"?: number; // -
"compensation_paid_amount"?: number; // -
"emergency_event_organizations_id": number; // -
};
type Update = {
"id": number; // -
"name": string; // -
"two_emergency_categories_id": number; // -
"emergency_event_levels_id": number; // -
"emergency_event_levels_name"?: string; // -
"asset_projects_id": number; // -
"emergency_time": Date; // -
"emergency_location": string; // -
"emergency_description": string; // -
"emergency_cause": string; // -
"cause_result": string; // -
"emergency_images"?: string[]; // -
"emergency_events_id"?: number; // -
"related_person"?: string; // -
"supplement"?: string; // -
"compensation_type"?: string; // -
"compensation_rate"?: number; // -
"compensation_amount"?: number; // -
"compensation_paid_amount"?: number; // -
};
type Assign = {
"id": number; // -
"two_emergency_categories_id": number; // -
"emergency_event_teams_id"?: number; // -
};
type ApplyClose = {
"id": number; // -
"handled_result"?: string; // -
"introspection"?: string; // -
};
type Audit = {
"id": number; // -
"audit_status": string; // -
"audit_remark"?: string; // -
};
type Select = {
"keywords"?: string; // -
"asset_projects_id"?: number; // -
};
}
}
namespace GoodsReleases {
namespace GoodsReleases {
type List = {
@ -3045,6 +3238,7 @@ declare namespace ApiTypes {
"process_type": string; // 办理类型,[enum:RenovationAppliesProcessTypeEnum]
"is_deposit"?: number; // 是否有保证金
"deposit_amount"?: number; // 保证金金额
"status"?: string; // 状态,[enum:RenovationAppliesStatusEnum]
"owner_name": string; // 业主名称
"owner_phone": string; // 业主手机
"card_type": string; // 证件类型,[enum:HouseOccupantsCardTypeEnum]
@ -3087,6 +3281,7 @@ declare namespace ApiTypes {
"process_type": string; // 办理类型,[enum:RenovationAppliesProcessTypeEnum]
"is_deposit"?: number; // 是否有保证金
"deposit_amount"?: number; // 保证金金额
"status"?: string; // 状态,[enum:RenovationAppliesStatusEnum]
"owner_name": string; // 业主名称
"owner_phone": string; // 业主手机
"card_type": string; // 证件类型,[enum:HouseOccupantsCardTypeEnum]
@ -3371,6 +3566,186 @@ declare namespace ApiTypes {
namespace IndexCount {
}
}
namespace Survey {
namespace QuestionCategories {
type List = {
"name"?: string; // -
"is_enabled"?: boolean; // -
};
type Store = {
"name": string; // -
"description"?: string; // -
"is_enabled"?: boolean; // -
};
type Update = {
"id": number; // -
"name"?: string; // -
"description"?: string; // -
"is_enabled"?: boolean; // -
};
type SoftDelete = {
"id": number; // 题目分类ID
};
type Restore = {
"id": number; // 题目分类ID
};
type Delete = {
"id": number; // 题目分类ID
};
type Select = {
"name"?: string; // -
"is_enabled"?: boolean; // -
};
}
namespace Questions {
type List = {
"title"?: string; // -
"category_id"?: number; // -
"type"?: string; // -
"is_enabled"?: boolean; // -
};
type Store = {
"category_id"?: number; // -
"title": string; // -
"type": string; // -
"content"?: string[]; // -
"min_score"?: number; // -
"max_score"?: number; // -
"placeholder"?: string; // -
"max_length"?: number; // -
"required"?: boolean; // -
"sort"?: number; // -
"is_enabled"?: boolean; // -
};
type Update = {
"id": number; // -
"category_id"?: number; // -
"title"?: string; // -
"type"?: string; // -
"content"?: string[]; // -
"min_score"?: number; // -
"max_score"?: number; // -
"placeholder"?: string; // -
"max_length"?: number; // -
"required"?: boolean; // -
"sort"?: number; // -
"is_enabled"?: boolean; // -
};
type Show = {
"id": number; // 题目ID
};
type SoftDelete = {
"id": number; // 题目ID
};
type Restore = {
"id": number; // 题目ID
};
type Delete = {
"id": number; // 题目ID
};
type Select = {
"title"?: string; // 标题
"is_enabled"?: boolean; // 是否启用
};
}
namespace SurveyReleases {
type List = {
"surveys_id"?: number; // -
"release_type"?: string; // -
"status"?: boolean; // -
};
type Store = {
"surveys_id": number; // -
"release_type": string; // -
"release_scope"?: string[]; // -
"start_date"?: Date; // -
"end_date"?: Date; // -
"cover_image"?: string[]; // -
};
type Update = {
"id": number; // -
"surveys_id"?: number; // -
"release_type"?: string; // -
"release_scope"?: string[]; // -
"start_date"?: Date; // -
"end_date"?: Date; // -
"cover_image"?: string[]; // -
};
type Show = {
"id": number; // 问卷发布ID
};
type SoftDelete = {
"id": number; // 问卷发布ID
};
type Restore = {
"id": number; // 问卷发布ID
};
type Delete = {
"id": number; // 问卷发布ID
};
type Publish = {
"id": number; // 问卷发布ID
};
type Schedule = {
"id": number; // 问卷发布ID
};
type Cancel = {
"id": number; // 问卷发布ID
};
}
namespace SurveyResponses {
type List = {
"survey_id"?: number; // -
"release_id"?: number; // -
"customers_id"?: number; // -
"customer_phone"?: string; // -
"status"?: boolean; // -
};
type Show = {
"id": number; // 问卷回答ID
};
}
namespace Surveys {
type List = {
"name"?: string; // -
"is_enabled"?: boolean; // -
};
type Store = {
"name": string; // -
"description"?: string; // -
"questions": string[]; // -
"cover_image"?: string[]; // -
"is_enabled"?: boolean; // -
};
type Update = {
"id": number; // -
"name"?: string; // -
"description"?: string; // -
"questions"?: string[]; // -
"cover_image"?: string[]; // -
"is_enabled"?: boolean; // -
};
type BatchStatus = {
"ids": string[]; // 问卷ID列表
"is_enabled": boolean; // -
};
type Show = {
"id": number; // 问卷ID
};
type SoftDelete = {
"id": number; // 问卷ID
};
type Restore = {
"id": number; // 问卷ID
};
type Delete = {
"id": number; // 问卷ID
};
type Select = {
"name"?: string; // -
};
}
}
namespace Visitor {
namespace VisitorApplies {
type List = {

View File

@ -1200,6 +1200,164 @@ export const Apis = {
},
},
},
Emergency: {
EmergencyEventBills: {
List(data?: ApiTypes.Emergency.EmergencyEventBills.List): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/list', { data });
},
Store(data: ApiTypes.Emergency.EmergencyEventBills.Store): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/store', { data });
},
Update(data: ApiTypes.Emergency.EmergencyEventBills.Update): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/update', { data });
},
Show(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/show', {});
},
SoftDelete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/soft_delete', {});
},
Restore(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/restore', {});
},
Delete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_bills/delete', {});
},
},
EmergencyEventCategories: {
List(data?: ApiTypes.Emergency.EmergencyEventCategories.List): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/list', { data });
},
TreeList(data?: ApiTypes.Emergency.EmergencyEventCategories.TreeList): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/tree_list', { data });
},
Store(data: ApiTypes.Emergency.EmergencyEventCategories.Store): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/store', { data });
},
Update(data: ApiTypes.Emergency.EmergencyEventCategories.Update): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/update', { data });
},
Move(data: ApiTypes.Emergency.EmergencyEventCategories.Move): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/move', { data });
},
Show(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/show', {});
},
SoftDelete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/soft_delete', {});
},
Restore(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/restore', {});
},
Delete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/delete', {});
},
Select(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/select', {});
},
SelectTree(data?: ApiTypes.Emergency.EmergencyEventCategories.SelectTree): Promise<MyResponseType> {
return request('company/emergency/emergency_event_categories/select_tree', { data });
},
},
EmergencyEventFollows: {
List(data: ApiTypes.Emergency.EmergencyEventFollows.List): Promise<MyResponseType> {
return request('company/emergency/emergency_event_follows/list', { data });
},
Store(data: ApiTypes.Emergency.EmergencyEventFollows.Store): Promise<MyResponseType> {
return request('company/emergency/emergency_event_follows/store', { data });
},
Show(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_follows/show', {});
},
},
EmergencyEventLevels: {
List(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/list', {});
},
Store(data: ApiTypes.Emergency.EmergencyEventLevels.Store): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/store', { data });
},
Update(data: ApiTypes.Emergency.EmergencyEventLevels.Update): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/update', { data });
},
Show(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/show', {});
},
SoftDelete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/soft_delete', {});
},
Restore(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/restore', {});
},
Delete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/delete', {});
},
Select(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_levels/select', {});
},
},
EmergencyEventTeams: {
List(data?: ApiTypes.Emergency.EmergencyEventTeams.List): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/list', { data });
},
Store(data: ApiTypes.Emergency.EmergencyEventTeams.Store): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/store', { data });
},
Update(data: ApiTypes.Emergency.EmergencyEventTeams.Update): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/update', { data });
},
Show(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/show', {});
},
SoftDelete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/soft_delete', {});
},
Restore(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/restore', {});
},
Delete(): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/delete', {});
},
Select(data?: ApiTypes.Emergency.EmergencyEventTeams.Select): Promise<MyResponseType> {
return request('company/emergency/emergency_event_teams/select', { data });
},
},
EmergencyEvents: {
List(data?: ApiTypes.Emergency.EmergencyEvents.List): Promise<MyResponseType> {
return request('company/emergency/emergency_events/list', { data });
},
Store(data: ApiTypes.Emergency.EmergencyEvents.Store): Promise<MyResponseType> {
return request('company/emergency/emergency_events/store', { data });
},
Update(data: ApiTypes.Emergency.EmergencyEvents.Update): Promise<MyResponseType> {
return request('company/emergency/emergency_events/update', { data });
},
Show(): Promise<MyResponseType> {
return request('company/emergency/emergency_events/show', {});
},
Assign(data: ApiTypes.Emergency.EmergencyEvents.Assign): Promise<MyResponseType> {
return request('company/emergency/emergency_events/assign', { data });
},
ApplyClose(data: ApiTypes.Emergency.EmergencyEvents.ApplyClose): Promise<MyResponseType> {
return request('company/emergency/emergency_events/apply_close', { data });
},
Audit(data: ApiTypes.Emergency.EmergencyEvents.Audit): Promise<MyResponseType> {
return request('company/emergency/emergency_events/audit', { data });
},
SoftDelete(): Promise<MyResponseType> {
return request('company/emergency/emergency_events/soft_delete', {});
},
Restore(): Promise<MyResponseType> {
return request('company/emergency/emergency_events/restore', {});
},
Delete(): Promise<MyResponseType> {
return request('company/emergency/emergency_events/delete', {});
},
Select(data?: ApiTypes.Emergency.EmergencyEvents.Select): Promise<MyResponseType> {
return request('company/emergency/emergency_events/select', { data });
},
},
},
GoodsReleases: {
GoodsReleases: {
List(data?: ApiTypes.GoodsReleases.GoodsReleases.List): Promise<MyResponseType> {
@ -1833,6 +1991,132 @@ export const Apis = {
},
},
},
Survey: {
QuestionCategories: {
List(data?: ApiTypes.Survey.QuestionCategories.List): Promise<MyResponseType> {
return request('company/survey/question_categories/list', { data });
},
Store(data: ApiTypes.Survey.QuestionCategories.Store): Promise<MyResponseType> {
return request('company/survey/question_categories/store', { data });
},
Update(data: ApiTypes.Survey.QuestionCategories.Update): Promise<MyResponseType> {
return request('company/survey/question_categories/update', { data });
},
Show(): Promise<MyResponseType> {
return request('company/survey/question_categories/show', {});
},
SoftDelete(data: ApiTypes.Survey.QuestionCategories.SoftDelete): Promise<MyResponseType> {
return request('company/survey/question_categories/soft_delete', { data });
},
Restore(data: ApiTypes.Survey.QuestionCategories.Restore): Promise<MyResponseType> {
return request('company/survey/question_categories/restore', { data });
},
Delete(data: ApiTypes.Survey.QuestionCategories.Delete): Promise<MyResponseType> {
return request('company/survey/question_categories/delete', { data });
},
Select(data?: ApiTypes.Survey.QuestionCategories.Select): Promise<MyResponseType> {
return request('company/survey/question_categories/select', { data });
},
},
Questions: {
List(data?: ApiTypes.Survey.Questions.List): Promise<MyResponseType> {
return request('company/survey/questions/list', { data });
},
Store(data: ApiTypes.Survey.Questions.Store): Promise<MyResponseType> {
return request('company/survey/questions/store', { data });
},
Update(data: ApiTypes.Survey.Questions.Update): Promise<MyResponseType> {
return request('company/survey/questions/update', { data });
},
Show(data: ApiTypes.Survey.Questions.Show): Promise<MyResponseType> {
return request('company/survey/questions/show', { data });
},
SoftDelete(data: ApiTypes.Survey.Questions.SoftDelete): Promise<MyResponseType> {
return request('company/survey/questions/soft_delete', { data });
},
Restore(data: ApiTypes.Survey.Questions.Restore): Promise<MyResponseType> {
return request('company/survey/questions/restore', { data });
},
Delete(data: ApiTypes.Survey.Questions.Delete): Promise<MyResponseType> {
return request('company/survey/questions/delete', { data });
},
Select(data?: ApiTypes.Survey.Questions.Select): Promise<MyResponseType> {
return request('company/survey/questions/select', { data });
},
},
SurveyReleases: {
List(data?: ApiTypes.Survey.SurveyReleases.List): Promise<MyResponseType> {
return request('company/survey/survey_releases/list', { data });
},
Store(data: ApiTypes.Survey.SurveyReleases.Store): Promise<MyResponseType> {
return request('company/survey/survey_releases/store', { data });
},
Update(data: ApiTypes.Survey.SurveyReleases.Update): Promise<MyResponseType> {
return request('company/survey/survey_releases/update', { data });
},
Show(data: ApiTypes.Survey.SurveyReleases.Show): Promise<MyResponseType> {
return request('company/survey/survey_releases/show', { data });
},
SoftDelete(data: ApiTypes.Survey.SurveyReleases.SoftDelete): Promise<MyResponseType> {
return request('company/survey/survey_releases/soft_delete', { data });
},
Restore(data: ApiTypes.Survey.SurveyReleases.Restore): Promise<MyResponseType> {
return request('company/survey/survey_releases/restore', { data });
},
Delete(data: ApiTypes.Survey.SurveyReleases.Delete): Promise<MyResponseType> {
return request('company/survey/survey_releases/delete', { data });
},
Publish(data: ApiTypes.Survey.SurveyReleases.Publish): Promise<MyResponseType> {
return request('company/survey/survey_releases/publish', { data });
},
Schedule(data: ApiTypes.Survey.SurveyReleases.Schedule): Promise<MyResponseType> {
return request('company/survey/survey_releases/schedule', { data });
},
Cancel(data: ApiTypes.Survey.SurveyReleases.Cancel): Promise<MyResponseType> {
return request('company/survey/survey_releases/cancel', { data });
},
},
SurveyResponses: {
List(data?: ApiTypes.Survey.SurveyResponses.List): Promise<MyResponseType> {
return request('company/survey/survey_responses/list', { data });
},
Show(data: ApiTypes.Survey.SurveyResponses.Show): Promise<MyResponseType> {
return request('company/survey/survey_responses/show', { data });
},
},
Surveys: {
List(data?: ApiTypes.Survey.Surveys.List): Promise<MyResponseType> {
return request('company/survey/surveys/list', { data });
},
Store(data: ApiTypes.Survey.Surveys.Store): Promise<MyResponseType> {
return request('company/survey/surveys/store', { data });
},
Update(data: ApiTypes.Survey.Surveys.Update): Promise<MyResponseType> {
return request('company/survey/surveys/update', { data });
},
BatchStatus(data: ApiTypes.Survey.Surveys.BatchStatus): Promise<MyResponseType> {
return request('company/survey/surveys/batch_status', { data });
},
Statistics(): Promise<MyResponseType> {
return request('company/survey/surveys/statistics', {});
},
Show(data: ApiTypes.Survey.Surveys.Show): Promise<MyResponseType> {
return request('company/survey/surveys/show', { data });
},
SoftDelete(data: ApiTypes.Survey.Surveys.SoftDelete): Promise<MyResponseType> {
return request('company/survey/surveys/soft_delete', { data });
},
Restore(data: ApiTypes.Survey.Surveys.Restore): Promise<MyResponseType> {
return request('company/survey/surveys/restore', { data });
},
Delete(data: ApiTypes.Survey.Surveys.Delete): Promise<MyResponseType> {
return request('company/survey/surveys/delete', { data });
},
Select(data?: ApiTypes.Survey.Surveys.Select): Promise<MyResponseType> {
return request('company/survey/surveys/select', { data });
},
},
},
Visitor: {
VisitorApplies: {
List(data?: ApiTypes.Visitor.VisitorApplies.List): Promise<MyResponseType> {

View File

@ -403,11 +403,58 @@ export const BannersTypeEnum = {
Text: { text: '文本', color: '#0000ff', value: 'Text' },
};
//
export const BillPaymentsStatusEnum = {
Pending: { text: '待审', color: '#faad14', value: 'Pending' },
Approved: { text: '已审', color: '#52c41a', value: 'Approved' },
Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' },
};
//
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',
},
};
//
export const BillsFlowTypeEnum = {
Income: { text: '收入', color: '#10b981', value: 'Income' },
Expense: { text: '支出', color: '#ef4444', value: 'Expense' },
};
//
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' },
};
//
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 CacheTypeEnum = {
MobilePhoneVerificationCode: {
text: '手机验证码',
color: '#6b3979',
color: '#306cc3',
value: 'MobilePhoneVerificationCode',
},
};
@ -478,6 +525,20 @@ export const CompanyReceiptAccountsPayChannelEnum = {
TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' },
};
// 公司印章类型枚举
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' },
@ -829,6 +890,73 @@ export const CustomerOpinionsTypeEnum = {
},
};
// 突发事件账单收支类型
export const EmergencyEventBillsCostTypeEnum = {
Income: { text: '收入', color: '#4caf50', value: 'Income' },
Expense: { text: '支出', color: '#f44336', value: 'Expense' },
};
// 突发事件账单费用类型
export const EmergencyEventBillsFeeTypeEnum = {
Compensation: { text: '赔偿', color: '#f44336', value: 'Compensation' },
Penalty: { text: '罚款', color: '#ff9800', value: 'Penalty' },
};
// 突发事件账单支付方式
export const EmergencyEventBillsPaymentMethodEnum = {
WeChat: { text: '微信支付', color: '#07c160', value: 'WeChat' },
Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' },
BankTransfer: { text: '银行转账', color: '#2196f3', value: 'BankTransfer' },
TongLian: { text: '通联支付', color: '#ff9800', value: 'TongLian' },
Prepayment: { text: '预付款', color: '#9c27b0', value: 'Prepayment' },
POS: { text: 'POS机', color: '#607d8b', value: 'POS' },
Cash: { text: '现金', color: '#4caf50', value: 'Cash' },
};
// 突发事件账单支付状态
export const EmergencyEventBillsPaymentStatusEnum = {
Pending: { text: '待支付', color: '#ff9800', value: 'Pending' },
ToBeConfirmed: { text: '待确认', color: '#2196f3', value: 'ToBeConfirmed' },
Paid: { text: '已支付', color: '#4caf50', value: 'Paid' },
Refunded: { text: '已退款', color: '#9c27b0', value: 'Refunded' },
Cancelled: { text: '已取消', color: '#9e9e9e', value: 'Cancelled' },
Failed: { text: '支付失败', color: '#f44336', value: 'Failed' },
};
// 突发事件审核状态
export const EmergencyEventsAuditStatusEnum = {
Pending: { text: '待审', color: '#ff9800', value: 'Pending' },
Approved: { text: '通过', color: '#4caf50', value: 'Approved' },
Rejected: { text: '驳回', color: '#f44336', value: 'Rejected' },
};
// 突发事件赔偿类型
export const EmergencyEventsCompensationTypeEnum = {
Ours: { text: '我方', color: '#2196f3', value: 'Ours' },
Others: { text: '他方', color: '#9c27b0', value: 'Others' },
};
// 突发事件状态
export const EmergencyEventsStatusEnum = {
PendingFollowUp: {
text: '待跟进',
color: '#ff9800',
value: 'PendingFollowUp',
},
InProgress: { text: '跟进中', color: '#2196f3', value: 'InProgress' },
PendingReview: { text: '待审核', color: '#9c27b0', value: 'PendingReview' },
Closed: { text: '已关闭', color: '#9e9e9e', value: 'Closed' },
};
// 突发事件行动组成员职位
export const EmergencyTeamMembersPositionEnum = {
Leader: { text: '应急组长', color: '#f44336', value: 'Leader' },
Member: { text: '现场处置员', color: '#2196f3', value: 'Member' },
Liaison: { text: '信息联络员', color: '#ffeb3b', value: 'Liaison' },
Support: { text: '后勤保障员', color: '#4caf50', value: 'Support' },
Reserve: { text: '机动预备员', color: '#9c27b0', value: 'Reserve' },
};
// 物品放行审核状态
export const GoodsReleasesAuditStatusEnum = {
Pending: { text: '待审核', color: '#faad14', value: 'Pending' },
@ -1285,6 +1413,17 @@ export const HouseWorkOrdersTypeEnum = {
Repair: { text: '报修', color: '#ff0000', value: 'Repair' },
Incident: { text: '报事', color: '#00aaff', value: 'Incident' },
Complaint: { text: '投诉', color: '#aa00ff', value: 'Complaint' },
QualityCheck: { text: '品质检查', color: '#16a085', value: 'QualityCheck' },
RenovationInspection: {
text: '装修巡检',
color: '#8e44ad',
value: 'RenovationInspection',
},
RenovationAcceptance: {
text: '装修验收',
color: '#2980b9',
value: 'RenovationAcceptance',
},
};
//
@ -1341,6 +1480,12 @@ export const QualificationEvaluationEnum = {
NonCompliant: { text: '不合规', color: '#dc3545', value: 'NonCompliant' },
};
// 题目类型枚举
export const QuestionsTypeEnum = {
Score: { text: '评分题', color: '#4caf50', value: 'Score' },
Fill: { text: '填空题', color: '#2196f3', value: 'Fill' },
};
//
export const RatingOutlookEnum = {
Stable: { text: '稳定', color: '#28a745', value: 'Stable' },
@ -1381,6 +1526,86 @@ export const RefundsTypeEnum = {
Other: { text: '其他退款', color: '#607d8b', value: 'Other' },
};
// 装修验收状态
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' },
};
// 装修施工状态
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',
},
};
// 装修办理类型
export const RenovationAppliesProcessTypeEnum = {
OwnerProcess: { text: '业主办理', color: '#3498db', value: 'OwnerProcess' },
AgentProcess: { text: '代理人办理', color: '#9b59b6', value: 'AgentProcess' },
};
// 装修内容
export const RenovationAppliesRenovationContentEnum = {
PartialRenovation: {
text: '局部装修',
color: '#f39c12',
value: 'PartialRenovation',
},
FullHouseRenovation: {
text: '全屋装修',
color: '#2ecc71',
value: 'FullHouseRenovation',
},
PartialRefurbishment: {
text: '部分翻新',
color: '#3498db',
value: 'PartialRefurbishment',
},
};
// 装修申请状态
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' },
};
// 装修类型
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' },
@ -1448,6 +1673,12 @@ export const SexEnum = {
FeMale: { text: '女', color: '#ff0000', value: 'FeMale' },
};
// 问卷发布方式枚举
export const SurveyReleasesTypeEnum = {
Manual: { text: '手动发布', color: '#4caf50', value: 'Manual' },
Timing: { text: '定时发布', color: '#2196f3', value: 'Timing' },
};
// SysModuleEnum
export const SysModuleEnum = {
Admin: { text: '管理员', color: '#cf1322', value: 'Admin' },
@ -1637,67 +1868,6 @@ export const AssetItemsStatusEnum = {
Lost: { text: '丢失', color: '#607d8b', value: 'Lost' },
};
// 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' },
};
// 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' },
};
// 下载记录状态
export const DownloadRecordsStatusEnum = {
Pending: { text: '待处理', color: '#909399', value: 'Pending' },
@ -1706,73 +1876,6 @@ export const DownloadRecordsStatusEnum = {
Failed: { text: '失败', color: '#F56C6C', value: 'Failed' },
};
// 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' },
};
// HouseDoorCardLogsTypeEnum
export const HouseDoorCardLogsTypeEnum = {
View: { text: '查看', color: '#2196f3', value: 'View' },
@ -1810,98 +1913,6 @@ export const PatrolTasksStatusEnum = {
Overdue: { text: '已超期', color: '#e91e63', value: 'Overdue' },
};
// QuestionsTypeEnum
export const QuestionsTypeEnum = {
Score: { text: '评分题', color: '#4caf50', value: 'Score' },
Fill: { text: '填空题', color: '#2196f3', value: 'Fill' },
};
// 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',
},
};
// SurveyReleasesTypeEnum
export const SurveyReleasesTypeEnum = {
Manual: { text: '手动发布', color: '#4caf50', value: 'Manual' },
Timing: { text: '定时发布', color: '#2196f3', value: 'Timing' },
};
// 通联交易类型
export const TongLianPayTypeEnum = {
W06: { text: '微信小程序', color: '#07c160', value: 'W06' },

View File

@ -4,6 +4,7 @@ import {
MyModalFormProps,
rulesHelper,
} from '@/common';
import { SelectContract } from '@/components/SelectContract';
import { Apis } from '@/gen/Apis';
import { BetaSchemaForm } from '@ant-design/pro-components';
import { Form, message } from 'antd';
@ -25,7 +26,10 @@ export default function Create(props: MyBetaModalFormProps) {
}}
trigger={<MyButtons.Create title={`配置`} />}
onFinish={async (values) =>
Apis.Attendance.AttendanceConfigs.Store(values)
Apis.Attendance.AttendanceConfigs.Store({
...values,
require_photo: values?.require_photo ? true : false,
})
.then(() => {
props.reload?.();
message.success(props.title + '成功');
@ -34,6 +38,16 @@ export default function Create(props: MyBetaModalFormProps) {
.catch(() => false)
}
columns={[
SelectContract.AssetProjects({
key: 'asset_projects_id',
title: '关联项目',
colProps: { span: 24 },
required: true,
fieldProps: {
showSearch: true,
// mode: 'multiple',
},
}),
{
key: 'check_in_range',
title: '可打卡范围',

View File

@ -248,10 +248,10 @@ export default function Index({ title = '批量排班' }) {
],
}).then((res) => {
setStartDate(
JSON.parse(JSON.stringify(res?.data)),
JSON.parse(JSON.stringify(res?.data || [])),
);
setDataSource(
JSON.parse(JSON.stringify(res?.data)),
JSON.parse(JSON.stringify(res?.data || [])),
);
console.log(res);
});

View File

@ -3,7 +3,6 @@ import {
MyColumns,
MyPageContainer,
MyProTableProps,
useCurrentPermissions,
} from '@/common';
import { Selects } from '@/components/Select';
import { Apis } from '@/gen/Apis';
@ -19,24 +18,6 @@ import Show from './modals/Show';
import Update from './modals/Update';
export default function Index({ title = '品质核查' }) {
const getCurrentPermissions = useCurrentPermissions();
let tableRender = (item: any, action: any) => {
return getCurrentPermissions({
show: <Show item={item} />,
update: <Update item={item} reload={action?.reload} title={title} />,
delete: (
<MyButtons.Delete
onConfirm={() =>
Apis.QualityCheck.QualityChecks.Delete({
id: item.id,
}).then(() => action?.reload())
}
/>
),
});
};
return (
<MyPageContainer
title={title}
@ -55,7 +36,7 @@ export default function Index({ title = '品质核查' }) {
)
}
toolBarRender={(action) => [
<Create key="Create" reload={() => action?.reload()} title={title} />,
<Create key="Create" reload={action?.reload} title={title} />,
]}
columns={[
MyColumns.ID({ search: false }),
@ -138,7 +119,15 @@ export default function Index({ title = '品质核查' }) {
MyColumns.Option({
render: (_, item: any, index, action) => (
<Space key={index}>
<>{tableRender(item, action)}</>
<Show item={item} />
<Update item={item} reload={action?.reload} title={title} />
<MyButtons.Delete
onConfirm={() =>
Apis.QualityCheck.QualityChecks.Delete({
id: item.id,
}).then(() => action?.reload())
}
/>
</Space>
),
}),

View File

@ -12,32 +12,37 @@ import { Form, message } from 'antd';
export default function Create(props: MyBetaModalFormProps) {
const [form] = Form.useForm();
return (
<BetaSchemaForm<ApiTypes.QualityCheck.QualityChecks.Store>
{...MyModalFormProps.props}
title={`添加核查记录`}
trigger={<MyButtons.Create title="核查记录" />}
layout="horizontal"
labelCol={{ span: 4 }}
wrapperCol={{ span: 20 }}
labelAlign="left"
width="600px"
trigger={<MyButtons.Create title={`核查记录`} />}
key={new Date().getTime()}
width="680px"
form={form}
key={new Date().getTime()}
onOpenChange={(open: any) => {
console.log(open, 'open');
if (open) {
// form.resetFields(); // 清空表单数据
form.resetFields(); // 清空表单数据
form.setFieldsValue({
check_date: new Date(),
});
}
}}
onFinish={async (values) =>
Apis.QualityCheck.QualityChecks.Store(values)
onFinish={async (values) => {
return Apis.QualityCheck.QualityChecks.Store(values)
.then(() => {
props.reload?.();
message.success('添加核查记录成功');
return true;
})
.catch(() => false)
}
.catch(() => false);
}}
columns={[
Selects?.AssetProjects({
title: '选择项目',

View File

@ -1,9 +1,4 @@
import {
MyButtons,
MyColumns,
MyProTableProps,
useCurrentPermissions,
} from '@/common';
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
import { Selects } from '@/components/Select';
import { Apis } from '@/gen/Apis';
import {
@ -17,78 +12,7 @@ import { Space } from 'antd';
import MyWorkerCreate from '../modals/WorkerCreate';
export default function Index() {
const getCurrentPermissions = useCurrentPermissions();
const navigate = useNavigate();
let toolBarRender = () => {
return getCurrentPermissions(
{
add: (
<MyButtons.Default
key="Create"
size="middle"
type="primary"
icon={<PlusOutlined />}
onClick={() => {
navigate('/renovation/application/pages/create');
}}
title="装修申请"
/>
),
},
'MyRenovationApplies',
);
};
let tableRender = (item: any, action: any) => {
return getCurrentPermissions(
{
show: (
<MyButtons.Default
key="Show"
size="small"
type="primary"
onClick={() => {
navigate(`/renovation/application/pages/show?id=${item.id}`);
}}
title="查看"
/>
),
worker_add: (
<MyWorkerCreate
item={{
...item,
size: 'small',
}}
title="装修工人"
key="WorkerCreate"
/>
),
update: (
<MyButtons.Default
key="Update"
size="small"
type="primary"
disabled={item.status !== 'Draft'}
onClick={() => {
navigate(`/renovation/application/pages/update?id=${item.id}`);
}}
title="编辑"
/>
),
delete: (
<MyButtons.Delete
disabled={item.status !== 'Draft'}
onConfirm={() =>
Apis.Renovation.RenovationApplies.Delete({
id: item.id,
}).then(() => action?.reload())
}
/>
),
},
'MyRenovationApplies',
);
};
return (
<ProTable
@ -101,7 +25,18 @@ export default function Index() {
)
}
headerTitle="装修申请列表"
toolBarRender={() => [toolBarRender()]}
toolBarRender={() => [
<MyButtons.Default
key="Create"
size="middle"
type="primary"
icon={<PlusOutlined />}
onClick={() => {
navigate('/quality/renovation/application/pages/create');
}}
title="装修申请"
/>,
]}
columns={[
MyColumns.ID({ search: false }),
Selects?.AssetProjects({
@ -210,7 +145,47 @@ export default function Index() {
MyColumns.CreatedAt(),
MyColumns.Option({
render: (_, item: any, index, action) => (
<Space key={index}>{tableRender(item, action)}</Space>
<Space key={index}>
<MyButtons.Default
key="Show"
size="small"
type="primary"
onClick={() => {
navigate(
`/quality/renovation/application/pages/show?id=${item.id}`,
);
}}
title="查看"
/>
<MyWorkerCreate
item={{
...item,
size: 'small',
}}
title="装修工人"
key="WorkerCreate"
/>
<MyButtons.Default
key="Update"
size="small"
type="primary"
disabled={item.status !== 'Draft'}
onClick={() => {
navigate(
`/quality/renovation/application/pages/update?id=${item.id}`,
);
}}
title="编辑"
/>
<MyButtons.Delete
disabled={item.status !== 'Draft'}
onConfirm={() =>
Apis.Renovation.RenovationApplies.Delete({
id: item.id,
}).then(() => action?.reload())
}
/>
</Space>
),
}),
]}

View File

@ -1,9 +1,4 @@
import {
MyButtons,
MyColumns,
MyProTableProps,
useCurrentPermissions,
} from '@/common';
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
import { Apis } from '@/gen/Apis';
import { RenovationAppliesStatusEnum } from '@/gen/Enums';
import { ProTable } from '@ant-design/pro-components';
@ -11,26 +6,8 @@ import { useNavigate } from '@umijs/max';
import { Space } from 'antd';
export default function Index() {
const getCurrentPermissions = useCurrentPermissions();
const navigate = useNavigate();
let tableRender = (item: any) => {
return getCurrentPermissions(
{
audit: (
<MyButtons.Default
key="Update"
size="small"
type="primary"
onClick={() => {
navigate(`/renovation/audit/pages/review?id=${item.id}`);
}}
title="查看并审核"
/>
),
},
'MyRenovationAppliesAudit',
);
};
return (
<ProTable<Record<any, any>>
{...MyProTableProps.props}
@ -98,7 +75,19 @@ export default function Index() {
MyColumns.CreatedAt(),
MyColumns.Option({
render: (_, item: any, index) => (
<Space key={index}>{tableRender(item)}</Space>
<Space key={index}>
<MyButtons.Default
key="Update"
size="small"
type="primary"
onClick={() => {
navigate(
`/quality/renovation/audit/pages/review?id=${item.id}`,
);
}}
title="查看并审核"
/>
</Space>
),
}),
]}

View File

@ -1,4 +1,4 @@
import { MyColumns, MyProTableProps, useCurrentPermissions } from '@/common';
import { MyColumns, MyProTableProps } from '@/common';
import { Selects } from '@/components/Select';
import { Apis } from '@/gen/Apis';
import { BillPaymentsTypeEnum, BillsStatusEnum } from '@/gen/Enums';
@ -7,15 +7,6 @@ import { Space } from 'antd';
import PayCreate from './modals/PayCreate';
export default function Index() {
const getCurrentPermissions = useCurrentPermissions();
let tableRender = (item: any, action: any) => {
return getCurrentPermissions(
{
pay: <PayCreate item={item} reload={action?.reload} title="收款" />,
},
'MyRenovationApply',
);
};
return (
<ProTable
{...MyProTableProps.props}
@ -101,7 +92,9 @@ export default function Index() {
MyColumns.UpdatedAt(),
MyColumns.Option({
render: (_, item: any, index, action) => (
<Space key={`item_${index}`}>{tableRender(item, action)}</Space>
<Space key={`item_${index}`}>
<PayCreate item={item} reload={action?.reload} title="收款" />
</Space>
),
}),
]}

View File

@ -1,9 +1,4 @@
import {
MyButtons,
MyColumns,
MyProTableProps,
useCurrentPermissions,
} from '@/common';
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
import { Apis } from '@/gen/Apis';
import { ProTable } from '@ant-design/pro-components';
import { Space } from 'antd';
@ -11,33 +6,6 @@ import Create from './modals/Create';
import Update from './modals/Update';
export default function Index({ title = '巡检规则' }) {
const getCurrentPermissions = useCurrentPermissions();
let toolBarRender = (action: any) => {
return getCurrentPermissions(
{
add: <Create key="Create" reload={action?.reload} title={title} />,
},
'MyRenovationInspectionRules',
);
};
let tableRender = (item: any, action: any) => {
return getCurrentPermissions(
{
update: <Update item={item} reload={action?.reload} title={title} />,
delete: (
<MyButtons.Delete
onConfirm={() =>
Apis.Renovation.RenovationInspectionRules.Delete({
id: item.id,
}).then(() => action?.reload())
}
/>
),
},
'MyRenovationInspectionRules',
);
};
return (
<ProTable
{...MyProTableProps.props}
@ -48,7 +16,9 @@ export default function Index({ title = '巡检规则' }) {
Apis.Renovation.RenovationInspectionRules.List,
)
}
toolBarRender={(action) => [toolBarRender(action)]}
toolBarRender={(action) => [
<Create key="Create" reload={action?.reload} title={title} />,
]}
columns={[
MyColumns.ID({
search: false,
@ -84,7 +54,14 @@ export default function Index({ title = '巡检规则' }) {
MyColumns.Option({
render: (_, item: any, index, action) => (
<Space key={index}>
<>{tableRender(item, action)}</>
<Update item={item} reload={action?.reload} title={title} />
<MyButtons.Delete
onConfirm={() =>
Apis.Renovation.RenovationInspectionRules.Delete({
id: item.id,
}).then(() => action?.reload())
}
/>
</Space>
),
}),