diff --git a/src/api/spc/detectionTemplate/index.ts b/src/api/spc/detectionTemplate/index.ts new file mode 100644 index 0000000..b765210 --- /dev/null +++ b/src/api/spc/detectionTemplate/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface DetectionTemplateVO { + itemCode: string + name: string + desc: string + available: string + version: string + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: string + siteId: string + itemType: string +} + +// 查询检测记录信息列表 +export const getDetectionTemplatePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/spc/detection-template/senior', data }) + } else { + return await request.get({ url: `/spc/detection-template/page`, params }) + } +} + +// 查询检测记录信息详情 +export const getDetectionTemplate = async (id: number) => { + return await request.get({ url: `/spc/detection-template/get?id=` + id }) +} + +// 新增检测记录信息 +export const createDetectionTemplate = async (data: DetectionTemplateVO) => { + return await request.post({ url: `/spc/detection-template/create`, data }) +} + +// 修改检测记录信息 +export const updateDetectionTemplate = async (data: DetectionTemplateVO) => { + return await request.put({ url: `/spc/detection-template/update`, data }) +} + +// 删除检测记录信息 +export const deleteDetectionTemplate = async (id: number) => { + return await request.delete({ url: `/spc/detection-template/delete?id=` + id }) +} + +// 导出检测记录信息 Excel +export const exportDetectionTemplate = async (params) => { + return await request.download({ url: `/spc/detection-template/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/spc/detection-template/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/spc/templateItemDetails/index.ts b/src/api/spc/templateItemDetails/index.ts new file mode 100644 index 0000000..7c811af --- /dev/null +++ b/src/api/spc/templateItemDetails/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface TemplateItemDetailsVO { + templateId: number + orderNo: number + methods: string + contents: string + levels: string + upLimit: number + available: string + downLimit: number + type: string + image1: string + image2: string + image3: string + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: string + siteId: string +} + +// 查询检测记录明细列表 +export const getTemplateItemDetailsPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/spc/template-item-details/senior', data }) + } else { + return await request.get({ url: `/spc/template-item-details/page`, params }) + } +} + +// 查询检测记录明细详情 +export const getTemplateItemDetails = async (id: number) => { + return await request.get({ url: `/spc/template-item-details/get?id=` + id }) +} + +// 新增检测记录明细 +export const createTemplateItemDetails = async (data: TemplateItemDetailsVO) => { + return await request.post({ url: `/spc/template-item-details/create`, data }) +} + +// 修改检测记录明细 +export const updateTemplateItemDetails = async (data: TemplateItemDetailsVO) => { + return await request.put({ url: `/spc/template-item-details/update`, data }) +} + +// 删除检测记录明细 +export const deleteTemplateItemDetails = async (id: number) => { + return await request.delete({ url: `/spc/template-item-details/delete?id=` + id }) +} + +// 导出检测记录明细 Excel +export const exportTemplateItemDetails = async (params) => { + return await request.download({ url: `/spc/template-item-details/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/spc/template-item-details/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/detection/records/index.vue b/src/views/detection/records/index.vue index c4774d5..73f74ee 100644 --- a/src/views/detection/records/index.vue +++ b/src/views/detection/records/index.vue @@ -1,8 +1,8 @@