From 532b4922dff5b2ad17dcd242acc7ee60c5a4e21e Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 25 Jul 2025 16:01:20 +0800 Subject: [PATCH] =?UTF-8?q?update=20qms=E8=B4=A8=E6=A3=80=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=B7=AF=E7=94=B1=EF=BC=9A=E4=BA=A7=E5=93=81=E6=A3=80?= =?UTF-8?q?=E3=80=81=E5=8E=9F=E6=9D=90=E6=96=99=E6=A3=80=E3=80=81=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/QcInspectionMain/types.ts | 2 +- src/views/qms/QcInspectionMain/index.vue | 25 +++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/api/qms/QcInspectionMain/types.ts b/src/api/qms/QcInspectionMain/types.ts index 58d815a..a6d1424 100644 --- a/src/api/qms/QcInspectionMain/types.ts +++ b/src/api/qms/QcInspectionMain/types.ts @@ -335,7 +335,7 @@ export interface QcInspectionMainQuery extends PageQuery { /** * 检验类别(首检/过程检等等) */ - inspectionType?: number; + inspectionType?: number | string; /** * 单据状态(0未处理/1完成) diff --git a/src/views/qms/QcInspectionMain/index.vue b/src/views/qms/QcInspectionMain/index.vue index 7449f28..8e3bad0 100644 --- a/src/views/qms/QcInspectionMain/index.vue +++ b/src/views/qms/QcInspectionMain/index.vue @@ -21,8 +21,8 @@ - - + + @@ -593,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')); @@ -637,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 }, @@ -1113,8 +1131,9 @@ const submitMaterialForm = () => { }; onMounted(() => { - getList(); + getInspectionType(); getInspectionTemplateList(); getInspectionItemList(); + getList(); });