diff --git a/src/api/qms/aql/index.ts b/src/api/qms/aql/index.ts new file mode 100644 index 000000000..2f1cef229 --- /dev/null +++ b/src/api/qms/aql/index.ts @@ -0,0 +1,103 @@ +import request from '@/config/axios' + +export interface AqlVO { + id: number + sampleProgCode: string + inspectionQualification: string + sampleCharacterCode: string + sampleSize: number + a0010: number + r0010: number + a0015: number + r0015: number + a0025: number + r0025: number + a0040: number + r0040: number + a0065: number + r0065: number + a010: number + r010: number + a015: number + r015: number + a025: number + r025: number + a040: number + r040: number + a065: number + r065: number + a10: number + r10: number + a15: number + r15: number + a25: number + r25: number + a40: number + r40: number + a65: number + r65: number + a10: number + r10: number + a15: number + r15: number + a25: number + r25: number + a40: number + r40: number + a65: number + r65: number + a100: number + r100: number + a150: number + r150: number + a250: number + r250: number + a400: number + r400: number + a650: number + r650: number + a1000: number + r1000: number + available: string +} + +// 查询aql列表 +export const getAqlPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/qms/aql/senior', data }) + } else { + return await request.get({ url: `/qms/aql/page`, params }) + } +} + +// 查询aql详情 +export const getAql = async (id: number) => { + return await request.get({ url: `/qms/aql/get?id=` + id }) +} + +// 新增aql +export const createAql = async (data: AqlVO) => { + return await request.post({ url: `/qms/aql/create`, data }) +} + +// 修改aql +export const updateAql = async (data: AqlVO) => { + return await request.put({ url: `/qms/aql/update`, data }) +} + +// 删除aql +export const deleteAql = async (id: number) => { + return await request.delete({ url: `/qms/aql/delete?id=` + id }) +} + +// 导出aql Excel +export const exportAql = async (params) => { + return await request.download({ url: `/qms/aql/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/aql/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/inspectionMethod/index.ts b/src/api/qms/inspectionMethod/index.ts new file mode 100644 index 000000000..dec4aa7dc --- /dev/null +++ b/src/api/qms/inspectionMethod/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface InspectionMethodVO { + id: number + code: string + describe: string + version: string + status: string + operationGuidance: string + videoAddress: string + available: string +} + +// 查询检验方法列表 +export const getInspectionMethodPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/qms/inspection-method/senior', data }) + } else { + return await request.get({ url: `/qms/inspection-method/page`, params }) + } +} + +// 查询检验方法详情 +export const getInspectionMethod = async (id: number) => { + return await request.get({ url: `/qms/inspection-method/get?id=` + id }) +} + +// 新增检验方法 +export const createInspectionMethod = async (data: InspectionMethodVO) => { + return await request.post({ url: `/qms/inspection-method/create`, data }) +} + +// 修改检验方法 +export const updateInspectionMethod = async (data: InspectionMethodVO) => { + return await request.put({ url: `/qms/inspection-method/update`, data }) +} + +// 删除检验方法 +export const deleteInspectionMethod = async (id: number) => { + return await request.delete({ url: `/qms/inspection-method/delete?id=` + id }) +} + +// 导出检验方法 Excel +export const exportInspectionMethod = async (params) => { + return await request.download({ url: `/qms/inspection-method/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/inspection-method/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/sampleCode/index.ts b/src/api/qms/sampleCode/index.ts new file mode 100644 index 000000000..828f162f7 --- /dev/null +++ b/src/api/qms/sampleCode/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface SampleCodeVO { + id: number + code: string + batchLow limiting: number + batchUpperLimiting: number + s1: number + s2: number + s3: number + s4: number + g1: number + g2: number + g3: number + available: string +} + +// 查询样本字码列表 +export const getSampleCodePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/qms/sample-code/senior', data }) + } else { + return await request.get({ url: `/qms/sample-code/page`, params }) + } +} + +// 查询样本字码详情 +export const getSampleCode = async (id: number) => { + return await request.get({ url: `/qms/sample-code/get?id=` + id }) +} + +// 新增样本字码 +export const createSampleCode = async (data: SampleCodeVO) => { + return await request.post({ url: `/qms/sample-code/create`, data }) +} + +// 修改样本字码 +export const updateSampleCode = async (data: SampleCodeVO) => { + return await request.put({ url: `/qms/sample-code/update`, data }) +} + +// 删除样本字码 +export const deleteSampleCode = async (id: number) => { + return await request.delete({ url: `/qms/sample-code/delete?id=` + id }) +} + +// 导出样本字码 Excel +export const exportSampleCode = async (params) => { + return await request.download({ url: `/qms/sample-code/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/sample-code/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/samplingScheme/index.ts b/src/api/qms/samplingScheme/index.ts new file mode 100644 index 000000000..746af373f --- /dev/null +++ b/src/api/qms/samplingScheme/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface SamplingSchemeVO { + id: number + code: string + describe: string + status: string + available: string +} + +// 查询采样方案列表 +export const getSamplingSchemePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/qms/sampling-scheme/senior', data }) + } else { + return await request.get({ url: `/qms/sampling-scheme/page`, params }) + } +} + +// 查询采样方案详情 +export const getSamplingScheme = async (id: number) => { + return await request.get({ url: `/qms/sampling-scheme/get?id=` + id }) +} + +// 新增采样方案 +export const createSamplingScheme = async (data: SamplingSchemeVO) => { + return await request.post({ url: `/basic/sampling-scheme/create`, data }) +} + +// 修改采样方案 +export const updateSamplingScheme = async (data: SamplingSchemeVO) => { + return await request.put({ url: `/basic/sampling-scheme/update`, data }) +} + +// 删除采样方案 +export const deleteSamplingScheme = async (id: number) => { + return await request.delete({ url: `/basic/sampling-scheme/delete?id=` + id }) +} + +// 导出采样方案 Excel +export const exportSamplingScheme = async (params) => { + return await request.download({ url: `/basic/sampling-scheme/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/basic/sampling-scheme/get-import-template' }) +} diff --git a/src/views/qms/aql/aql.data.ts b/src/views/qms/aql/aql.data.ts new file mode 100644 index 000000000..9f72b97cf --- /dev/null +++ b/src/views/qms/aql/aql.data.ts @@ -0,0 +1,332 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const AqlRules = reactive({ + sampleProgCode: [required], + inspectionQualification: [required], + sampleCharacterCode: [required], + sampleSize: [required], + available: [required], +}) + +export const Aql = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '编码', + field: 'sampleProgCode', + sort: 'custom', + isSearch: true, + }, + { + label: '检验严格性', + field: 'inspectionQualification', + sort: 'custom', + dictType: DICT_TYPE.INSPECTION_SEVERITY, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '样本字码', + field: 'sampleCharacterCode', + sort: 'custom', + isSearch: true, + }, + { + label: '样本量', + field: 'sampleSize', + sort: 'custom', + }, + { + label: 'A0_010', + field: 'a0010', + sort: 'custom', + }, + { + label: 'R0_010', + field: 'r0010', + sort: 'custom', + }, + { + label: 'A0_015', + field: 'a0015', + sort: 'custom', + }, + { + label: 'R0_015', + field: 'r0015', + sort: 'custom', + }, + { + label: 'A0_025', + field: 'a0025', + sort: 'custom', + isSearch: true, + }, + { + label: 'R0_025', + field: 'r0025', + sort: 'custom', + }, + { + label: 'A0_040', + field: 'a0040', + sort: 'custom', + }, + { + label: 'R0_040', + field: 'r0040', + sort: 'custom', + }, + { + label: 'A0_065', + field: 'a0065', + sort: 'custom', + isSearch: true, + }, + { + label: 'R0_065', + field: 'r0065', + sort: 'custom', + }, + { + label: 'A0_10', + field: 'a010', + sort: 'custom', + }, + { + label: 'R0_10', + field: 'r010', + sort: 'custom', + }, + { + label: 'A0_15', + field: 'a015', + sort: 'custom', + }, + { + label: 'R0_15', + field: 'r015', + sort: 'custom', + }, + { + label: 'A0_25', + field: 'a025', + sort: 'custom', + }, + { + label: 'R0_25', + field: 'r025', + sort: 'custom', + }, + { + label: 'A0_40', + field: 'a040', + sort: 'custom', + }, + { + label: 'R0_40', + field: 'r040', + sort: 'custom', + }, + { + label: 'A0_65', + field: 'a065', + sort: 'custom', + }, + { + label: 'R0_65', + field: 'r065', + sort: 'custom', + }, + { + label: 'A1_0', + field: 'a10', + sort: 'custom', + }, + { + label: 'R1_0', + field: 'r10', + sort: 'custom', + }, + { + label: 'A1_5', + field: 'a15', + sort: 'custom', + }, + { + label: 'R1_5', + field: 'r15', + sort: 'custom', + }, + { + label: 'A2_5', + field: 'a25', + sort: 'custom', + }, + { + label: 'R2_5', + field: 'r25', + sort: 'custom', + }, + { + label: 'A4_0', + field: 'a40', + sort: 'custom', + }, + { + label: 'R4_0', + field: 'r40', + sort: 'custom', + }, + { + label: 'A6_5', + field: 'a65', + sort: 'custom', + }, + { + label: 'R6_5', + field: 'r65', + sort: 'custom', + }, + { + label: 'A10', + field: 'a10', + sort: 'custom', + }, + { + label: 'R10', + field: 'r10', + sort: 'custom', + }, + { + label: 'A15', + field: 'a15', + sort: 'custom', + }, + { + label: 'R15', + field: 'r15', + sort: 'custom', + }, + { + label: 'A25', + field: 'a25', + sort: 'custom', + }, + { + label: 'R25', + field: 'r25', + sort: 'custom', + }, + { + label: 'A40', + field: 'a40', + sort: 'custom', + }, + { + label: 'R40', + field: 'r40', + sort: 'custom', + }, + { + label: 'A65', + field: 'a65', + sort: 'custom', + }, + { + label: 'R65', + field: 'r65', + sort: 'custom', + }, + { + label: 'A100', + field: 'a100', + sort: 'custom', + }, + { + label: 'R100', + field: 'r100', + sort: 'custom', + }, + { + label: 'A150', + field: 'a150', + sort: 'custom', + }, + { + label: 'R150', + field: 'r150', + sort: 'custom', + }, + { + label: 'A250', + field: 'a250', + sort: 'custom', + }, + { + label: 'R250', + field: 'r250', + sort: 'custom', + }, + { + label: 'A400', + field: 'a400', + sort: 'custom', + }, + { + label: 'R400', + field: 'r400', + sort: 'custom', + }, + { + label: 'A650', + field: 'a650', + sort: 'custom', + }, + { + label: 'R650', + field: 'r650', + sort: 'custom', + }, + { + label: 'A1000', + field: 'a1000', + sort: 'custom', + }, + { + label: 'R1000', + field: 'r1000', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/qms/aql/index.vue b/src/views/qms/aql/index.vue new file mode 100644 index 000000000..aabb6a087 --- /dev/null +++ b/src/views/qms/aql/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/qms/inspectionMethod/index.vue b/src/views/qms/inspectionMethod/index.vue new file mode 100644 index 000000000..51227fc4a --- /dev/null +++ b/src/views/qms/inspectionMethod/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/qms/inspectionMethod/inspectionMethod.data.ts b/src/views/qms/inspectionMethod/inspectionMethod.data.ts new file mode 100644 index 000000000..984bb143b --- /dev/null +++ b/src/views/qms/inspectionMethod/inspectionMethod.data.ts @@ -0,0 +1,75 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const InspectionMethodRules = reactive({ + code: [required], + status: [required], + available: [required], +}) + +export const InspectionMethod = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'describe', + sort: 'custom', + }, + { + label: '版本', + field: 'version', + sort: 'custom', + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '操作指导', + field: 'operationGuidance', + sort: 'custom', + }, + { + label: '视频地址', + field: 'videoAddress', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/qms/sampleCode/index.vue b/src/views/qms/sampleCode/index.vue new file mode 100644 index 000000000..bc328bf0e --- /dev/null +++ b/src/views/qms/sampleCode/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/qms/sampleCode/sampleCode.data.ts b/src/views/qms/sampleCode/sampleCode.data.ts new file mode 100644 index 000000000..cc6e9ed6d --- /dev/null +++ b/src/views/qms/sampleCode/sampleCode.data.ts @@ -0,0 +1,101 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const SampleCodeRules = reactive({ + code: [required], + batchUpperLimiting: [required], + available: [required], +}) + +export const SampleCode = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '采样方案编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '批量下限', + field: 'batchLow limiting', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '批量上限', + field: 'batchUpperLimiting', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: 's1', + field: 's1', + sort: 'custom', + }, + { + label: 's2', + field: 's2', + sort: 'custom', + }, + { + label: 's3', + field: 's3', + sort: 'custom', + }, + { + label: 's4', + field: 's4', + sort: 'custom', + }, + { + label: 'g1', + field: 'g1', + sort: 'custom', + }, + { + label: 'g2', + field: 'g2', + sort: 'custom', + }, + { + label: 'g3', + field: 'g3', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/qms/samplingProcess/index.vue b/src/views/qms/samplingProcess/index.vue index 0ac3084b8..b5108d12f 100644 --- a/src/views/qms/samplingProcess/index.vue +++ b/src/views/qms/samplingProcess/index.vue @@ -99,7 +99,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:samplingProcess:create'}), // 新增 + // defaultButtons.defaultAddBtn({hasPermi:'wms:samplingProcess:create'}), // 新增 + defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:samplingProcess:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:samplingProcess:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/qms/samplingScheme/index.vue b/src/views/qms/samplingScheme/index.vue new file mode 100644 index 000000000..a1ea82181 --- /dev/null +++ b/src/views/qms/samplingScheme/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/qms/samplingScheme/samplingScheme.data.ts b/src/views/qms/samplingScheme/samplingScheme.data.ts new file mode 100644 index 000000000..bc9feaf8d --- /dev/null +++ b/src/views/qms/samplingScheme/samplingScheme.data.ts @@ -0,0 +1,61 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const SamplingSchemeRules = reactive({ + code: [required], + status: [required], + available: [required], +}) + +export const SamplingScheme = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'describe', + sort: 'custom', + isSearch: true, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))