diff --git a/src/api/crm/project/inspection/data/index.ts b/src/api/crm/project/inspection/data/index.ts new file mode 100644 index 000000000..170c1dccf --- /dev/null +++ b/src/api/crm/project/inspection/data/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +// 项目巡检内容 VO +export interface ProjectInspectionDataVO { + id: number // 主键ID + configType: number // 巡检配置类型 + name: string // 名称 + isRequired: boolean // 是否必填:0-否,1-是 + type: number // 类型,1-文本,2-数字,3-单选,4-多选,5-日期,6-图片,7-文件 + options: string // 选项内容 + sortOrder: number // 排序序号 + status: boolean // 状态:0-停用,1-启用 + remark: string // 备注 +} + + + // 查询项目巡检内容分页 + export const getProjectInspectionDataPage = async (params: any) => { + return await request.get({ url: `/crm/project-inspection-data/page`, params }) + } + + // 查询项目巡检内容详情 + export const getProjectInspectionData = async (id: number) => { + return await request.get({ url: `/crm/project-inspection-data/get?id=` + id }) + } + + // 新增项目巡检内容 + export const createProjectInspectionData = async (data: ProjectInspectionDataVO) => { + return await request.post({ url: `/crm/project-inspection-data/create`, data }) + } + + // 修改项目巡检内容 + export const updateProjectInspectionData = async (data: ProjectInspectionDataVO) => { + return await request.put({ url: `/crm/project-inspection-data/update`, data }) + } + + // 删除项目巡检内容 + export const deleteProjectInspectionData = async (id: number) => { + return await request.delete({ url: `/crm/project-inspection-data/delete?id=` + id }) + } + + // 导出项目巡检内容 Excel + export const exportProjectInspectionData = async (params) => { + return await request.download({ url: `/crm/project-inspection-data/export-excel`, params }) + } + // 获取项目巡检内容列表 + export const getProjectInspectionDataList = async (type: number) => { + return await request.get({ url: `/crm/project-inspection-data/list?configType=` + type }) + } + diff --git a/src/api/crm/project/inspection/index.ts b/src/api/crm/project/inspection/index.ts new file mode 100644 index 000000000..f24c2182a --- /dev/null +++ b/src/api/crm/project/inspection/index.ts @@ -0,0 +1,45 @@ +import request from '@/config/axios' + +// 项目巡检配置 VO +export interface ProjectInspectionConfigVO { + projectId: number // 项目ID + configId: number // 配置ID + configName: string // 配置名称 + frequency: string // 巡检频率 + managementParty: string // 管理方 + contactPerson: string // 联系人 + contactPhone: string // 联系电话 + responsiblePersonId: string // 负责人 + status: boolean // 状态:0-停用,1-启用 + remark: string // 备注 +} + +// 查询项目巡检配置分页 +export const getProjectInspectionConfigPage = async (params: any) => { + return await request.get({ url: `/crm/project-inspection-config/page`, params }) +} + +// 查询项目巡检配置详情 +export const getProjectInspectionConfig = async (id: number) => { + return await request.get({ url: `/crm/project-inspection-config/get?id=` + id }) +} + +// 新增项目巡检配置 +export const createProjectInspectionConfig = async (data: ProjectInspectionConfigVO) => { + return await request.post({ url: `/crm/project-inspection-config/create`, data }) +} + +// 修改项目巡检配置 +export const updateProjectInspectionConfig = async (data: ProjectInspectionConfigVO) => { + return await request.put({ url: `/crm/project-inspection-config/update`, data }) +} + +// 删除项目巡检配置 +export const deleteProjectInspectionConfig = async (id: number) => { + return await request.delete({ url: `/crm/project-inspection-config/delete?id=` + id }) +} + +// 导出项目巡检配置 Excel +export const exportProjectInspectionConfig = async (params: any) => { + return await request.download({ url: `/crm/project-inspection-config/export-excel`, params }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 37570fcf3..1d899e42e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -229,6 +229,8 @@ export enum DICT_TYPE { CRM_FINANCE_INVOICE_AUXILIARY_TYPE = 'crm_finance_invoice_auxiliary_type', // CRM 票据辅助类型 CRM_FINANCE_INVOICE_WRITE_OFF_STATUS = 'crm_finance_invoice_write_off_status', // CRM 票据核销状态 CRM_PROJECT_SETTLEMENT_STATUS = 'crm_project_settlement_status', // CRM 项目结算状态 + CRM_PROJECT_INSPECTION_CHECKPOINT = 'crm_project_inspection_checkpoint', // CRM 项目巡检配置 + CRM_PROJECT_INSPECTION_DATA_TYPE = 'crm_project_inspection_data_type', // CRM 项目巡检内容类型 // ========== ERP - 企业资源计划模块 ========== diff --git a/src/views/crm/project/component/ProjectInspectConfigForm.vue b/src/views/crm/project/component/ProjectInspectConfigForm.vue new file mode 100644 index 000000000..97bb0976b --- /dev/null +++ b/src/views/crm/project/component/ProjectInspectConfigForm.vue @@ -0,0 +1,333 @@ + + + + + + diff --git a/src/views/crm/project/index.vue b/src/views/crm/project/index.vue index b6b7b5786..b58ae297d 100644 --- a/src/views/crm/project/index.vue +++ b/src/views/crm/project/index.vue @@ -100,8 +100,16 @@ - +