diff --git a/src/api/qms/QcInspectionMain/types.ts b/src/api/qms/QcInspectionMain/types.ts index 5c881b1..a6d1424 100644 --- a/src/api/qms/QcInspectionMain/types.ts +++ b/src/api/qms/QcInspectionMain/types.ts @@ -90,9 +90,14 @@ export interface QcInspectionMainVO { team: string; /** - * 检验时间 + * 检验开始时间 */ - inspectionTime: string; + inspectionStartTime: string; + + /** + * 检验结束时间 + */ + inspectionEndTime: string; /** * 生产订单号 @@ -219,9 +224,14 @@ export interface QcInspectionMainForm extends BaseEntity { team?: string; /** - * 检验时间 + * 检验开始时间 */ - inspectionTime?: string; + inspectionStartTime?: string; + + /** + * 检验结束时间 + */ + inspectionEndTime?: string; /** * 生产订单号 @@ -325,7 +335,7 @@ export interface QcInspectionMainQuery extends PageQuery { /** * 检验类别(首检/过程检等等) */ - inspectionType?: number; + inspectionType?: number | string; /** * 单据状态(0未处理/1完成) @@ -348,9 +358,14 @@ export interface QcInspectionMainQuery extends PageQuery { team?: string; /** - * 检验时间 + * 检验开始时间 */ - inspectionTime?: string; + inspectionStartTime?: string; + + /** + * 检验结束时间 + */ + inspectionEndTime?: string; /** * 生产订单号 @@ -372,12 +387,12 @@ export interface QcInspectionMainQuery extends PageQuery { */ supplierName?: string; - + /** * 模板名称 */ templateName?: string;//join - + /** * 日期范围参数 diff --git a/src/api/qms/qcUnqualifiedRecord/types.ts b/src/api/qms/qcUnqualifiedRecord/types.ts index 5e580a6..921fc97 100644 --- a/src/api/qms/qcUnqualifiedRecord/types.ts +++ b/src/api/qms/qcUnqualifiedRecord/types.ts @@ -5,14 +5,84 @@ export interface QcUnqualifiedRecordVO { recordId: string | number; /** - * 关联待评审表ID + * 关联评审主表ID */ reviewId: string | number; /** - * 备注 + * 检测项编码 */ - remark: string; + itemCode: string; + + /** + * 检测名称 + */ + itemName: string; + + /** + * 检测位置 + */ + inspectionPosition: string; + + /** + * 检测项目类别 + */ + categoryName: number; + + /** + * 关联检测类型表 + */ + typeId: string | number; + + /** + * 检测方法 + */ + inspectionMethod: number; + + /** + * 检测方式 + */ + detectType: number; + + /** + * 检测结果 + */ + detectResult: number; + + /** + * 检测值 + */ + detectValue: number; + + /** + * 控制上限 + */ + upperLimit: number; + + /** + * 控制下限 + */ + lowerLimit: number; + + /** + * 规格检测值 + */ + specInspectionValue: string; + + /** + * 规格上限 + */ + specUpper: number; + + /** + * 规格下限 + */ + specLower: number; + + /** + * 检查项说明 + */ + description: string; } @@ -23,14 +93,84 @@ export interface QcUnqualifiedRecordForm extends BaseEntity { recordId?: string | number; /** - * 关联待评审表ID + * 关联评审主表ID */ reviewId?: string | number; /** - * 备注 + * 检测项编码 */ - remark?: string; + itemCode?: string; + + /** + * 检测名称 + */ + itemName?: string; + + /** + * 检测位置 + */ + inspectionPosition?: string; + + /** + * 检测项目类别 + */ + categoryName?: number; + + /** + * 关联检测类型表 + */ + typeId?: string | number; + + /** + * 检测方法 + */ + inspectionMethod?: number; + + /** + * 检测方式 + */ + detectType?: number; + + /** + * 检测结果 + */ + detectResult?: number; + + /** + * 检测值 + */ + detectValue?: number; + + /** + * 控制上限 + */ + upperLimit?: number; + + /** + * 控制下限 + */ + lowerLimit?: number; + + /** + * 规格检测值 + */ + specInspectionValue?: string; + + /** + * 规格上限 + */ + specUpper?: number; + + /** + * 规格下限 + */ + specLower?: number; + + /** + * 检查项说明 + */ + description?: string; } @@ -42,10 +182,85 @@ export interface QcUnqualifiedRecordQuery extends PageQuery { recordId?: string | number; /** - * 关联待评审表ID + * 关联评审主表ID */ reviewId?: string | number; + /** + * 检测项编码 + */ + itemCode?: string; + + /** + * 检测名称 + */ + itemName?: string; + + /** + * 检测位置 + */ + inspectionPosition?: string; + + /** + * 检测项目类别 + */ + categoryName?: number; + + /** + * 关联检测类型表 + */ + typeId?: string | number; + + /** + * 检测方法 + */ + inspectionMethod?: number; + + /** + * 检测方式 + */ + detectType?: number; + + /** + * 检测结果 + */ + detectResult?: number; + + /** + * 检测值 + */ + detectValue?: number; + + /** + * 控制上限 + */ + upperLimit?: number; + + /** + * 控制下限 + */ + lowerLimit?: number; + + /** + * 规格检测值 + */ + specInspectionValue?: string; + + /** + * 规格上限 + */ + specUpper?: number; + + /** + * 规格下限 + */ + specLower?: number; + + /** + * 检查项说明 + */ + description?: string; + /** * 日期范围参数 */ diff --git a/src/api/qms/qcUnqualifiedReview/types.ts b/src/api/qms/qcUnqualifiedReview/types.ts index aaff52a..6ee51b9 100644 --- a/src/api/qms/qcUnqualifiedReview/types.ts +++ b/src/api/qms/qcUnqualifiedReview/types.ts @@ -7,38 +7,38 @@ export interface QcUnqualifiedReviewVO { /** * 不合格检测单号 */ - unqualifiedNo: string; + unqualifiedReviewNo: number; /** - * 关联质检主表ID + * 评审结果 */ - inspectionId: string | number; + reviewResult: number; /** - * 检测类型ID + * 质检单号 */ - typeId: string | number; + inspectionNo: string; /** - * 派工单号 + * 检测类型 */ - workOrder: string; + inspectionType: number; /** - * 工序编码 + * 生产日期 */ - processCode: string; + productionDate: string; + + /** + * 派工单号(或者计划号/工单号) + */ + workOrderNo: string; /** * 工序名称 */ processName: string; - /** - * 批次号 - */ - batchNo: string; - /** * 物料名称 */ @@ -50,14 +50,39 @@ export interface QcUnqualifiedReviewVO { materialCode: string; /** - * 质检员检测结果 + * 物料规格 */ - inspectorResult: string; + materialSpec: string; /** - * 评审结果(0报废/1返工/2退货) + * 供应商名称 */ - reviewResult: string; + supplierName: string; + + /** + * 供应商编码 + */ + supplierCode: string; + + /** + * 质检数量 + */ + inspectionQty: number; + + /** + * 批次号 + */ + batchNo: string; + + /** + * 质检人 + */ + inspector: string; + + /** + * 质检人ID + */ + inspectorId: string | number; /** * 评审人 @@ -65,33 +90,27 @@ export interface QcUnqualifiedReviewVO { reviewer: string; /** - * 评审时间 + * 评审人ID */ - reviewTime: string; - - + reviewerId: string | number; /** - * 检测单号/卡号 + * 评审开始时间 */ - inspectionNo: string | number; + reviewStartTime: string; /** - * 检测类型编码 + * 评审结束时间 */ - typeCode: string | number; + reviewEndTime: string; /** - * 检测类型名称 + * 备注 */ - typeName: string; - - /** - * 检测类型字典 - */ - qcInspectionType: string | number; + remark: string; } + export interface QcUnqualifiedReviewForm extends BaseEntity { /** * 评审主键 @@ -101,38 +120,38 @@ export interface QcUnqualifiedReviewForm extends BaseEntity { /** * 不合格检测单号 */ - unqualifiedNo?: string; + unqualifiedReviewNo?: number; /** - * 关联质检主表ID + * 评审结果 */ - inspectionId?: string | number; + reviewResult?: number; /** - * 检测类型ID + * 质检单号 */ - typeId?: string | number; + inspectionNo?: string; /** - * 派工单号 + * 检测类型 */ - workOrder?: string; + inspectionType?: number; /** - * 工序编码 + * 生产日期 */ - processCode?: string; + productionDate?: string; + + /** + * 派工单号(或者计划号/工单号) + */ + workOrderNo?: string; /** * 工序名称 */ processName?: string; - /** - * 批次号 - */ - batchNo?: string; - /** * 物料名称 */ @@ -144,14 +163,39 @@ export interface QcUnqualifiedReviewForm extends BaseEntity { materialCode?: string; /** - * 质检员检测结果 + * 物料规格 */ - inspectorResult?: string; + materialSpec?: string; /** - * 评审结果(0报废/1返工/2退货) + * 供应商名称 */ - reviewResult?: string; + supplierName?: string; + + /** + * 供应商编码 + */ + supplierCode?: string; + + /** + * 质检数量 + */ + inspectionQty?: number; + + /** + * 批次号 + */ + batchNo?: string; + + /** + * 质检人 + */ + inspector?: string; + + /** + * 质检人ID + */ + inspectorId?: string | number; /** * 评审人 @@ -159,31 +203,24 @@ export interface QcUnqualifiedReviewForm extends BaseEntity { reviewer?: string; /** - * 评审时间 + * 评审人ID */ - reviewTime?: string; - - + reviewerId?: string | number; /** - * 检测单号/卡号 + * 评审开始时间 */ - inspectionNo?: string | number; + reviewStartTime?: string; /** - * 检测类型编码 + * 评审结束时间 */ - typeCode?: string | number; + reviewEndTime?: string; /** - * 检测类型名称 + * 备注 */ - typeName?: string; - - /** - * 检测类型字典 - */ - qcInspectionType?: string | number; + remark?: string; } @@ -197,38 +234,38 @@ export interface QcUnqualifiedReviewQuery extends PageQuery { /** * 不合格检测单号 */ - unqualifiedNo?: string; + unqualifiedReviewNo?: number; /** - * 关联质检主表ID + * 评审结果 */ - inspectionId?: string | number; + reviewResult?: number; /** - * 检测类型ID + * 质检单号 */ - typeId?: string | number; + inspectionNo?: string; /** - * 派工单号 + * 检测类型 */ - workOrder?: string; + inspectionType?: number; /** - * 工序编码 + * 生产日期 */ - processCode?: string; + productionDate?: string; + + /** + * 派工单号(或者计划号/工单号) + */ + workOrderNo?: string; /** * 工序名称 */ processName?: string; - /** - * 批次号 - */ - batchNo?: string; - /** * 物料名称 */ @@ -240,14 +277,39 @@ export interface QcUnqualifiedReviewQuery extends PageQuery { materialCode?: string; /** - * 质检员检测结果 + * 物料规格 */ - inspectorResult?: string; + materialSpec?: string; /** - * 评审结果(0报废/1返工/2退货) + * 供应商名称 */ - reviewResult?: string; + supplierName?: string; + + /** + * 供应商编码 + */ + supplierCode?: string; + + /** + * 质检数量 + */ + inspectionQty?: number; + + /** + * 批次号 + */ + batchNo?: string; + + /** + * 质检人 + */ + inspector?: string; + + /** + * 质检人ID + */ + inspectorId?: string | number; /** * 评审人 @@ -255,33 +317,19 @@ export interface QcUnqualifiedReviewQuery extends PageQuery { reviewer?: string; /** - * 评审时间 + * 评审人ID */ - reviewTime?: string; - - + reviewerId?: string | number; /** - * 检测单号/卡号 + * 评审开始时间 */ - inspectionNo?: string | number; + reviewStartTime?: string; /** - * 检测类型编码 + * 评审结束时间 */ - typeCode?: string | number; - - /** - * 检测类型名称 - */ - typeName?: string; - - /** - * 检测类型字典 - */ - qcInspectionType?: string | number; - - + reviewEndTime?: string; /** * 日期范围参数 */ diff --git a/src/views/qms/QcInspectionMain/index.vue b/src/views/qms/QcInspectionMain/index.vue index 2db1bcd..8e3bad0 100644 --- a/src/views/qms/QcInspectionMain/index.vue +++ b/src/views/qms/QcInspectionMain/index.vue @@ -21,8 +21,8 @@ - - + + @@ -31,12 +31,22 @@ - - --> + + + + + + + + + @@ -106,16 +116,21 @@ - + - {{ parseTime(scope.row.inspectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }} + {{ parseTime(scope.row.inspectionStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }} - - - - - + + + {{ parseTime(scope.row.inspectionEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }} + + + + + + + @@ -345,9 +360,9 @@ - + + + + + + + @@ -567,6 +593,7 @@ import { getProcessInfoList } from '@/api/qms/baseProcessInfo'; import { getStationInfoList } from '@/api/qms/baseStationInfo'; import MaterialSelect from "@/views/mes/baseMaterialInfo/addMaterialInQMS.vue"; +import { useRouter } from 'vue-router'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { qc_inspection_type, qc_result, qc_status, material_type, detect_type, control_type } = toRefs(proxy?.useDict('qc_inspection_type', 'qc_result', 'qc_status', 'material_type', 'detect_type', 'control_type')); @@ -611,6 +638,23 @@ const inspectionResultDialog = reactive({ title: '' }); +//0首检 1专检 2自检 3互检 4原材料检 5抽检 6成品检 7入库检 +//路由:inspectionType = 1产品检 2原材料检 3入库检 +const inspectionType = ref(); +const inspectionTypeVisible = ref(false); +const getInspectionType = async () => { + const router = useRouter(); + inspectionType.value = router.currentRoute._rawValue.query && router.currentRoute._rawValue.query.inspectionType; + if (inspectionType.value == 2){ + queryParams.value.inspectionType = '4'; + } else if (inspectionType.value == 3){ + queryParams.value.inspectionType = '7'; + } else { + queryParams.value.inspectionType = '6'; + inspectionTypeVisible.value = true; + } +}; + // 列显隐信息 const columns = ref([ { key: 0, label: `序号`, visible: true }, @@ -631,12 +675,13 @@ const columns = ref([ { key: 15, label: `检测人员`, visible: true }, { key: 16, label: `班次`, visible: true }, { key: 17, label: `班组`, visible: true }, - { key: 18, label: `检验时间`, visible: true }, - { key: 19, label: `生产订单号`, visible: true }, - { key: 20, label: `批次号`, visible: true }, - { key: 21, label: `条码号`, visible: true }, - { key: 22, label: `供应商名称`, visible: true }, - { key: 23, label: `备注`, visible: true }, + { key: 18, label: `检验开始时间`, visible: true }, + { key: 19, label: `检验结束时间`, visible: true }, + { key: 20, label: `生产订单号`, visible: true }, + { key: 21, label: `批次号`, visible: true }, + { key: 22, label: `条码号`, visible: true }, + { key: 23, label: `供应商名称`, visible: true }, + { key: 24, label: `备注`, visible: true }, ]); const initFormData: QcInspectionMainForm = { @@ -658,7 +703,8 @@ const initFormData: QcInspectionMainForm = { inspector: undefined, shift: undefined, team: undefined, - inspectionTime: undefined, + inspectionStartTime: undefined, + inspectionEndTime: undefined, productionOrder: undefined, batchNo: undefined, barcode: undefined, @@ -713,7 +759,8 @@ const data = reactive>({ inspector: undefined, shift: undefined, team: undefined, - inspectionTime: undefined, + inspectionStartTime: undefined, + inspectionEndTime: undefined, productionOrder: undefined, batchNo: undefined, barcode: undefined, @@ -765,9 +812,23 @@ const inspectionResultRules = ref({ const { queryParams, form, rules } = toRefs(data); +const dateRange = ref([]); + /** 查询质检任务列表 */ const getList = async () => { loading.value = true; + if (dateRange.value && dateRange.value.length === 2) { + queryParams.value.params = { + ...queryParams.value.params, + beginInspectionStartTime: dateRange.value[0], + endInspectionStartTime: dateRange.value[1] + }; + } else { + if (queryParams.value.params) { + delete queryParams.value.params.beginInspectionStartTime; + delete queryParams.value.params.endInspectionStartTime; + } + } const res = await listQcInspectionMain(queryParams.value); QcInspectionMainList.value = res.rows; total.value = res.total; @@ -823,6 +884,7 @@ const handleQuery = () => { const resetQuery = () => { queryFormRef.value?.resetFields(); handleQuery(); + dateRange.value = []; } /** 重置子表搜索 */ @@ -1069,8 +1131,9 @@ const submitMaterialForm = () => { }; onMounted(() => { - getList(); + getInspectionType(); getInspectionTemplateList(); getInspectionItemList(); + getList(); }); diff --git a/src/views/qms/qcUnqualifiedRecord/index.vue b/src/views/qms/qcUnqualifiedRecord/index.vue index ad30b09..40d3da1 100644 --- a/src/views/qms/qcUnqualifiedRecord/index.vue +++ b/src/views/qms/qcUnqualifiedRecord/index.vue @@ -4,12 +4,63 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 重置 @@ -40,15 +91,35 @@ - - - + + + + + + + + - {{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }} + - - + + + + + + + + + + + + + + + + + @@ -69,11 +140,74 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -91,6 +225,7 @@ import { listQcUnqualifiedRecord, getQcUnqualifiedRecord, delQcUnqualifiedRecord import { QcUnqualifiedRecordVO, QcUnqualifiedRecordQuery, QcUnqualifiedRecordForm } from '@/api/qms/qcUnqualifiedRecord/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const { qc_methond, detect_type, qc_result } = toRefs(proxy?.useDict('qc_methond', 'detect_type', 'qc_result')); const qcUnqualifiedRecordList = ref([]); const buttonLoading = ref(false); @@ -112,21 +247,49 @@ const dialog = reactive({ // 列显隐信息 const columns = ref([ { key: 0, label: `记录主键`, visible: true }, - { key: 1, label: `租户号`, visible: true }, - { key: 2, label: `关联待评审表ID`, visible: true }, - { key: 3, label: `备注`, visible: true }, - { key: 4, label: `创建部门`, visible: true }, - { key: 5, label: `创建人`, visible: true }, - { key: 6, label: `创建时间`, visible: true }, - { key: 7, label: `修改人`, visible: true }, - { key: 8, label: `修改时间`, visible: true }, - { key: 9, label: `是否删除`, visible: true }, + { key: 1, label: `关联评审主表ID`, visible: true }, + { key: 2, label: `租户id`, visible: true }, + { key: 3, label: `检测项编码`, visible: true }, + { key: 4, label: `检测名称`, visible: true }, + { key: 5, label: `检测位置`, visible: true }, + { key: 6, label: `检测项目类别`, visible: true }, + { key: 7, label: `关联检测类型表`, visible: true }, + { key: 8, label: `检测方法`, visible: true }, + { key: 9, label: `检测方式`, visible: true }, + { key: 10, label: `检测结果`, visible: true }, + { key: 11, label: `检测值`, visible: true }, + { key: 12, label: `控制上限`, visible: true }, + { key: 13, label: `控制下限`, visible: true }, + { key: 14, label: `规格检测值`, visible: true }, + { key: 15, label: `规格上限`, visible: true }, + { key: 16, label: `规格下限`, visible: true }, + { key: 17, label: `检查项说明`, visible: true }, + { key: 18, label: `创建部门`, visible: true }, + { key: 19, label: `创建人`, visible: true }, + { key: 20, label: `创建时间`, visible: true }, + { key: 21, label: `修改人`, visible: true }, + { key: 22, label: `修改时间`, visible: true }, + { key: 23, label: `是否删除`, visible: true }, ]); const initFormData: QcUnqualifiedRecordForm = { recordId: undefined, reviewId: undefined, - remark: undefined, + itemCode: undefined, + itemName: undefined, + inspectionPosition: undefined, + categoryName: undefined, + typeId: undefined, + inspectionMethod: undefined, + detectType: undefined, + detectResult: undefined, + detectValue: undefined, + upperLimit: undefined, + lowerLimit: undefined, + specInspectionValue: undefined, + specUpper: undefined, + specLower: undefined, + description: undefined, } const data = reactive>({ form: {...initFormData}, @@ -135,6 +298,21 @@ const data = reactive - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + --> + + @@ -65,7 +90,7 @@ - + 导出 + + + 流转 + + + 报废 + + + 让步接收 + + + 返工 + + + 退货 + - + - - - - {{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }} - - - - - - - - - - - - - + + + + + - - + + + - {{ parseTime(scope.row.reviewTime, '{y}-{m}-{d} {h}:{i}:{s}') }} + {{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }} + + + + + + + + + + + + + + + + {{ parseTime(scope.row.reviewStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }} + + + + + {{ parseTime(scope.row.reviewEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }} + + + @@ -124,69 +178,169 @@ - + + + + + + 不合格品评审记录 - {{ selectedUnqualifiedReviewNo }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -196,15 +350,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +