From b85c5b7c184c6b6bf407fc0b542a781acdfdcf03 Mon Sep 17 00:00:00 2001 From: zch Date: Thu, 24 Jul 2025 11:11:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(qms):=20=E4=BC=98=E5=8C=96=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E6=A8=A1=E6=9D=BF=E7=9A=84=E7=89=A9=E6=96=99=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将物料名称输入框改为只读,并添加搜索图标 - 点击物料名称输入框时弹出物料选择对话框 - 在对话框中选择物料后,自动填充物料名称和编码 - 修改关联检测类型表的标签为关联类型 --- src/views/qms/qcInspectionTemplate/index.vue | 50 ++++++++++++++++---- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/src/views/qms/qcInspectionTemplate/index.vue b/src/views/qms/qcInspectionTemplate/index.vue index 57f73c8..9d662a7 100644 --- a/src/views/qms/qcInspectionTemplate/index.vue +++ b/src/views/qms/qcInspectionTemplate/index.vue @@ -58,7 +58,7 @@ - + @@ -163,12 +163,16 @@ - - - + + + - - + + @@ -359,6 +363,17 @@ + + + + + + + + @@ -377,6 +392,9 @@ import { getProcessInfoList } from '@/api/qms/baseProcessInfo'; import { getBaseSupplierInfoList } from '@/api/qms/baseSupplierInfo'; import { getQcInspectionItemCategoryList } from '@/api/qms/qcInspectionItemCategory'; +import MaterialSelect from "@/views/mes/baseMaterialInfo/addMaterialInQMS.vue"; + + const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { detect_type, control_type } = toRefs(proxy?.useDict('detect_type', 'control_type')); @@ -660,7 +678,7 @@ const handleRowClick = (row: QcInspectionTemplateVO) => { /** 新增按钮操作 */ const handleAdd = () => { reset(); - getMaterialList(); + // getMaterialList(); getBaseProcessList(); getBaseStationList(); getBaseSupplierList(); @@ -671,7 +689,7 @@ const handleAdd = () => { /** 修改按钮操作 */ const handleUpdate = async (row?: QcInspectionTemplateVO) => { reset(); - await getMaterialList(); + // await getMaterialList(); await getBaseProcessList(); await getBaseStationList(); await getBaseSupplierList(); @@ -945,6 +963,22 @@ const getBaseSupplierList = async () => { baseSupplierInfoList.value = res.data; } +/** 物料选择弹窗 */ +const materialOpen = ref(false); +const materialSelectRef = ref(); +const handleMaterialAdd = () => { + materialOpen.value = true; +}; +const submitMaterialForm = () => { + const selected = materialSelectRef.value.tableRef.store.states.currentRow.value; + if (selected) { + selectedMaterialId.value = selected.materialId; + form.value.materialName = selected.materialName; + form.value.materialCode = selected.materialCode; + } + materialOpen.value = false; +}; + onMounted(() => { getList();