diff --git a/src/api/qms/inspectionJob/inspectionJobDetail/index.ts b/src/api/qms/inspectionJob/inspectionJobDetail/index.ts
new file mode 100644
index 000000000..742627e2b
--- /dev/null
+++ b/src/api/qms/inspectionJob/inspectionJobDetail/index.ts
@@ -0,0 +1,65 @@
+import request from '@/config/axios'
+
+export interface InspectionJobDetailVO {
+ 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 getInspectionJobDetailPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/inspection/inspection-job-detail/senior', data })
+ } else {
+ return await request.get({ url: `/inspection/inspection-job-detail/page`, params })
+ }
+}
+
+// 查询检验申请详情
+export const getInspectionJobDetail = async (id: number) => {
+ return await request.get({ url: `/inspection/inspection-job-detail/get?id=` + id })
+}
+
+// 新增检验申请
+export const createInspectionJobDetail = async (data: InspectionJobDetailVO) => {
+ return await request.post({ url: `/inspection/inspection-job-detail/create`, data })
+}
+
+// 修改检验申请
+export const updateInspectionJobDetail = async (data: InspectionJobDetailVO) => {
+ return await request.put({ url: `/inspection/inspection-job-detail/update`, data })
+}
+
+// 删除检验申请
+export const deleteInspectionJobDetail = async (id: number) => {
+ return await request.delete({ url: `/inspection/inspection-job-detail/delete?id=` + id })
+}
+
+// 导出检验申请 Excel
+export const exportInspectionJobDetail = async (params) => {
+ return await request.download({ url: `/inspection/inspection-job-detail/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/inspection/inspection-job-detail/get-import-template' })
+}
diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts
new file mode 100644
index 000000000..7bb8b4411
--- /dev/null
+++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts
@@ -0,0 +1,65 @@
+import request from '@/config/axios'
+
+export interface InspectionJobMainVO {
+ 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 getInspectionJobMainPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/inspection/inspection-job-main/senior', data })
+ } else {
+ return await request.get({ url: `/inspection/inspection-job-main/page`, params })
+ }
+}
+
+// 查询检验申请详情
+export const getInspectionJobMain = async (id: number) => {
+ return await request.get({ url: `/inspection/inspection-job-main/get?id=` + id })
+}
+
+// 新增检验申请
+export const createInspectionJobMain = async (data: InspectionJobMainVO) => {
+ return await request.post({ url: `/inspection/inspection-job-main/create`, data })
+}
+
+// 修改检验申请
+export const updateInspectionJobMain = async (data: InspectionJobMainVO) => {
+ return await request.put({ url: `/inspection/inspection-job-main/update`, data })
+}
+
+// 删除检验申请
+export const deleteInspectionJobMain = async (id: number) => {
+ return await request.delete({ url: `/inspection/inspection-job-main/delete?id=` + id })
+}
+
+// 导出检验申请 Excel
+export const exportInspectionJobMain = async (params) => {
+ return await request.download({ url: `/inspection/inspection-job-main/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/inspection/inspection-job-main/get-import-template' })
+}
diff --git a/src/api/qms/inspectionRequest/index.ts b/src/api/qms/inspectionRequest/index.ts
new file mode 100644
index 000000000..0b064dc02
--- /dev/null
+++ b/src/api/qms/inspectionRequest/index.ts
@@ -0,0 +1,65 @@
+import request from '@/config/axios'
+
+export interface InspectionMainVO {
+ 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 getInspectionMainPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/inspection/inspection-main/senior', data })
+ } else {
+ return await request.get({ url: `/inspection/inspection-main/page`, params })
+ }
+}
+
+// 查询检验申请详情
+export const getInspectionMain = async (id: number) => {
+ return await request.get({ url: `/inspection/inspection-main/get?id=` + id })
+}
+
+// 新增检验申请
+export const createInspectionMain = async (data: InspectionMainVO) => {
+ return await request.post({ url: `/inspection/inspection-main/create`, data })
+}
+
+// 修改检验申请
+export const updateInspectionMain = async (data: InspectionMainVO) => {
+ return await request.put({ url: `/inspection/inspection-main/update`, data })
+}
+
+// 删除检验申请
+export const deleteInspectionMain = async (id: number) => {
+ return await request.delete({ url: `/inspection/inspection-main/delete?id=` + id })
+}
+
+// 导出检验申请 Excel
+export const exportInspectionMain = async (params) => {
+ return await request.download({ url: `/inspection/inspection-main/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/inspection/inspection-main/get-import-template' })
+}
diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue
new file mode 100644
index 000000000..392c0797f
--- /dev/null
+++ b/src/views/qms/inspection/inspectionJob/index.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
new file mode 100644
index 000000000..3931624dd
--- /dev/null
+++ b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
@@ -0,0 +1,329 @@
+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 InspectionJobMain = useCrudSchemas(reactive([
+ {
+ label: '编码',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '申请编码',
+ field: 'inspectionCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '供应商编码',
+ field: 'supplierCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '物料编码',
+ field: 'materialCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '物料批次',
+ field: 'materialBatch',
+ 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: '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: 'inspectionStage',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '检验严格性',
+ field: 'inspectionStringency',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验任务包装列表',
+ field: 'inspectionTaskPackageCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验任务工序列表',
+ field: 'inspectionTaskProcessCode',
+ 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: 'inspectionLevel',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: 'AQL值',
+ field: 'aqlValue',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 200,
+ fixed: 'right'
+ }
+ }
+]))
+
+//表单校验
+export const InspectionJobMainRules = reactive({
+ number: [required],
+ inspectionCode: [required],
+ supplierCode: [required],
+ materialCode: [required],
+ materialBatch: [required],
+ orderCode: [required],
+ certificateRow: [required],
+ inspectionSchemeCode: [required],
+ inspectionSchemeJson: [required],
+ inspectionBatch: [required],
+ inspectionBatchAmount: [required],
+ sampleTatalAmount: [required],
+ inspectionType: [required],
+ inspectionBatchSource: [required],
+ inspectionStage: [required],
+ inspectionStringency: [required],
+ inspectionLevel: [required],
+ available: [required],
+})
+
+/**
+ * @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',
+ 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: 'inspectionFeatureCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ },
+ isTableForm: false,
+ }
+]))
+
+//表单校验
+export const InspectionJobDetailRules = reactive({
+ taskCode: [required],
+ processCode: [required],
+ sequenceCode: [required],
+ available: [required],
+})
diff --git a/src/views/qms/inspection/inspectionRequest/index.vue b/src/views/qms/inspection/inspectionRequest/index.vue
new file mode 100644
index 000000000..74269bfa7
--- /dev/null
+++ b/src/views/qms/inspection/inspectionRequest/index.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
new file mode 100644
index 000000000..4b1686ebc
--- /dev/null
+++ b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
@@ -0,0 +1,239 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const InspectionMainRules = reactive({
+ number: [required],
+ applicationDate: [required],
+ applicationTime: [required],
+ supplierCode: [required],
+ materialCode: [required],
+ batch: [required],
+ referenceOrderCode: [required],
+ referenceOrderRow: [required],
+ inspectionSchemeCode: [required],
+ inspectionStageCode: [required],
+ inspectionLevel: [required],
+ available: [required],
+})
+
+export const InspectionMain = useCrudSchemas(reactive([
+
+ {
+ label: '编码',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '申请日期',
+ field: 'applicationDate',
+ 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: 'applicationTime',
+ 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: 'requestStartTime',
+ 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: 'requestEndTime',
+ 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: 'finishTime',
+ 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: 'supplierCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '物料编码',
+ field: 'materialCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '待检数量',
+ field: 'requestInspectionNum',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '参考订单号',
+ field: 'referenceOrderCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '参考订单行',
+ field: 'referenceOrderRow',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '参考凭证号',
+ field: 'referenceCertificateCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '参考凭证行',
+ field: 'referenceCertificateRow',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '检验方案编码',
+ field: 'inspectionSchemeCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验阶段',
+ field: 'inspectionStageCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验申请包装列表',
+ field: 'applicationPackageCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验水平',
+ field: 'inspectionLevel',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: 'AQL值',
+ field: 'aqlValue',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))