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();