diff --git a/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts b/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts new file mode 100644 index 000000000..ad565f913 --- /dev/null +++ b/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +export interface InspectionRecordDetailVO { + number: string + applicationDate: localdate + applicationTime: Date + requestStartTime: Date + requestEndTime: Date + finishTime: Date + supplierCode: string + materialCode: string + batch: string + requestInspectionNum: number + referenceOrderCode: string + referenceOrderRow: number + referenceCertificateCode: string + referenceCertificateRow: number + inspectionSchemeCode: string + inspectionStageCode: string + applicationPackageCode: string + inspectionLevel: string + aqlValue: number + available: string +} + +// 查询检验申请列表 +export const getInspectionRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/inspection/inspection-recordord-detail/senior', data }) + } else { + return await request.get({ url: `/inspection/inspectirecordrecord-detail/page`, params }) + } +} + +// 查询检验申请详情 +export const getInspectionRecordDetail = async (id: number) => { + return await request.get({ url: `/inspection/insperecordon-record-detail/get?id=` + id }) +} + +// 新增检验申请 +export const createInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { + return await request.post({ url: `/inspection/inrecordction-record-detail/create`, data }) +} + +// 修改检验申请 +export const updateInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { + return await request.put({ url: `/inspectionrecordspection-record-detail/update`, data }) +} + +// 删除检验申请 +export const deleteInspectionRecordDetail = async (id: number) => { + return await request.delete({ url: `/inspectrecord/inspection-record-detail/delete?id=` + id }) +} + +// 导出检验申请 Excel +export const exportInspectionRecordDetail = async (params) => { + return await request.download({ url: `/insprecordion/inspection-record-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/irecordection/inspection-record-detail/get-import-template' }) +} diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts new file mode 100644 index 000000000..225443425 --- /dev/null +++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +export interface InspectionRecordMainVO { + number: string + applicationDate: localdate + applicationTime: Date + requestStartTime: Date + requestEndTime: Date + finishTime: Date + supplierCode: string + materialCode: string + batch: string + requestInspectionNum: number + referenceOrderCode: string + referenceOrderRow: number + referenceCertificateCode: string + referenceCertificateRow: number + inspectionSchemeCode: string + inspectionStageCode: string + applicationPackageCode: string + inspectionLevel: string + aqlValue: number + available: string +} + +// 查询检验申请列表 +export const getInspectionRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/inspection/inspection-record-main/senior', data }) + } else { + return await request.get({ url: `/inspection/inspection-record-main/page`, params }) + } +} + +// 查询检验申请详情 +export const getInspectionRecordMain = async (id: number) => { + return await request.get({ url: `/inspection/inspection-record-main/get?id=` + id }) +} + +// 新增检验申请 +export const createInspectionRecordMain = async (data: InspectionRecordMainVO) => { + return await request.post({ url: `/inspection/inspection-record-main/create`, data }) +} + +// 修改检验申请 +export const updateInspectionRecordMain = async (data: InspectionRecordMainVO) => { + return await request.put({ url: `/inspection/inspection-record-main/update`, data }) +} + +// 删除检验申请 +export const deleteInspectionRecordMain = async (id: number) => { + return await request.delete({ url: `/inspection/inspection-record-main/delete?id=` + id }) +} + +// 导出检验申请 Excel +export const exportInspectionRecordMain = async (params) => { + return await request.download({ url: `/inspection/inspection-record-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/inspection/inspection-record-main/get-import-template' }) +} diff --git a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts index 39900a607..dc1afae72 100644 --- a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts @@ -9,7 +9,7 @@ const { t } = useI18n() // 国际化 */ export const InspectionJobMain = useCrudSchemas(reactive([ { - label: '编码', + label: '工序编号', field: 'number', sort: 'custom', isSearch: true, @@ -106,7 +106,7 @@ export const InspectionJobMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: false, form: { - component: 'SelectV2' + component: 'Select' }, }, { @@ -243,30 +243,12 @@ export const InspectionJobMainRules = reactive({ * @returns {Array} 备件申请子表 */ export const InspectionJobDetail = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isSearch: true, - isForm: false, - }, { label: '单据号', field: 'number', sort: 'custom', isSearch: true, }, - { - label: '主表ID', - field: 'masterId', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - }, { label: '任务编码', field: 'taskCode', diff --git a/src/views/qms/inspection/inspectionRecord/index.vue b/src/views/qms/inspection/inspectionRecord/index.vue new file mode 100644 index 000000000..b73e9ddfd --- /dev/null +++ b/src/views/qms/inspection/inspectionRecord/index.vue @@ -0,0 +1,289 @@ + + + diff --git a/src/views/qms/inspection/inspectionRecord/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionRecord/inspectionJobMain.data.ts new file mode 100644 index 000000000..c3545b399 --- /dev/null +++ b/src/views/qms/inspection/inspectionRecord/inspectionJobMain.data.ts @@ -0,0 +1,461 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter2 } from '@/utils/formatTime' +import { validateHanset, validateEmail } from '@/utils/validator' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 备件申请主表 + */ +export const InspectionRecordMain = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isSearch: true, + isForm: false, + }, + { + label: '编码', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '申请编码', + field: 'applicationCode', + sort: 'custom', + isSearch: true, + }, + { + label: '任务编码', + field: 'taskCode', + sort: 'custom', + isSearch: true, + }, + { + label: '供应商编码', + field: 'supplierCode', + sort: 'custom', + isSearch: true, + }, + { + label: '物料编码', + field: 'materialCode', + sort: 'custom', + isSearch: true, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + }, + { + label: '检验方案编码', + field: 'inspectionSchemeCode', + sort: 'custom', + isSearch: true, + }, + { + label: '检验方案Json', + field: 'inspectionSchemeJson', + sort: 'custom', + isSearch: true, + }, + { + label: '检验批次', + field: 'inspectionBatch', + sort: 'custom', + isSearch: true, + }, + { + label: '检验批数量', + field: 'inspectionBatchAmount', + sort: 'custom', + isSearch: true, + }, + { + label: '采样总数量', + field: 'sampleTatalAmount', + sort: 'custom', + isSearch: true, + }, + { + label: '检验类型', + field: 'inspectionType', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '检验批来源', + field: 'inspectionBatchSource', + sort: 'custom', + isSearch: true, + }, + { + label: '订单号', + field: 'orderCode', + sort: 'custom', + isSearch: true, + }, + { + label: '订单行', + field: 'orderRow', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '凭证号', + field: 'certificateCode', + sort: 'custom', + isSearch: true, + }, + { + label: '凭证行', + field: 'certificateRow', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '检验阶段', + field: 'inspectionStage', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '检验严格性', + field: 'inspectionStringency', + sort: 'custom', + isSearch: true, + }, + { + label: '使用决策', + field: 'useDecision', + sort: 'custom', + isSearch: true, + }, + { + label: '计划开始时间', + field: 'planStartTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '计划结束时间', + field: 'planEndTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '实际开始时间', + field: 'realStartTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '实际结束时间', + field: 'realEndTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '检验水平', + field: 'inspectionLevel', + sort: 'custom', + isSearch: true, + }, + { + label: 'AQL值', + field: 'aqlValue', + sort: 'custom', + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +//表单校验 +export const InspectionRecordMainRules = reactive({ + number: [required], + applicationCode: [required], + taskCode: [required], + supplierCode: [required], + materialCode: [required], + batch: [required], + inspectionSchemeCode: [required], + inspectionBatch: [required], + inspectionBatchAmount: [required], + sampleTatalAmount: [required], + inspectionType: [required], + inspectionBatchSource: [required], + orderCode: [required], + orderRow: [required], + inspectionStage: [required], + inspectionStringency: [required], + useDecision: [required], + inspectionLevel: [required], + available: [required], + +}) + +/** + * @returns {Array} 备件申请子表 + */ +export const InspectionRecordDetail = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isSearch: true, + isForm: false, + }, + { + label: '记录编码', + field: 'recordCode', + sort: 'custom', + isSearch: true, + }, + { + label: '工序编码', + field: 'processCode', + sort: 'custom', + isSearch: true, + }, + { + label: '工序描述', + field: 'processDescribe', + sort: 'custom', + isSearch: true, + }, + { + label: '顺序号', + field: 'sequenceCode', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '是否破坏性检验', + field: 'isDestroyInspection', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '检验开始时间', + field: 'inspectionStartTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '检验结束时间', + field: 'inspectionEndTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '检验人', + field: 'inspectionOperator', + sort: 'custom', + isSearch: true, + }, + { + label: '检验特性编码', + field: 'inspectionFeaturesCode', + sort: 'custom', + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + }, + isTableForm: false, + } +])) + +//表单校验 +export const InspectionRecordDetailRules = reactive({ + recordCode: [required], + processCode: [required], + sequenceCode: [required], + isDestroyInspection: [required], + available: [required], +}) diff --git a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts index a7ba6ec9c..a134c9f21 100644 --- a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts +++ b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts @@ -20,7 +20,7 @@ export const InspectionMainRules = reactive({ export const InspectionMain = useCrudSchemas(reactive([ { - label: '编码', + label: '申请编码', field: 'number', sort: 'custom', isSearch: true,