From eee1310bc134b2bb7c8a406750cb64e9fe226ac2 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 29 九月 2026 11:25:29 +0800
Subject: [PATCH] chore: 薪火智能配置文件
---
src/views/qualityManagement/rawMaterialInspection/components/formDia.vue | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index 9772e17..a66c609 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -14,6 +14,7 @@
v-model="form.supplier"
placeholder="璇烽�夋嫨"
clearable
+ filterable
:disabled="isViewMode || supplierQuantityDisabled"
>
<el-option
@@ -348,7 +349,11 @@
modelOptions.value = res || [];
// 鍚屾鍥炲~ model / unit锛堟湁浜涙帴鍙h繑鍥炵殑 row 閲屽彲鑳芥病甯﹀叏锛�
if (form.value.productModelId) {
- handleChangeModel(form.value.productModelId);
+ const selectedModel = modelOptions.value.find(item => item.id == form.value.productModelId);
+ if (selectedModel) {
+ form.value.model = selectedModel.model || '';
+ form.value.unit = selectedModel.unit || '';
+ }
}
} catch (e) {
console.error("鍔犺浇瑙勬牸鍨嬪彿澶辫触", e);
@@ -360,6 +365,7 @@
// 鍏堝姞杞芥寚鏍囬�夐」
let params = {
productId: currentProductId.value,
+ productModelId: form.value.productModelId || undefined,
inspectType: 0
}
qualityInspectDetailByProductId(params).then(res => {
@@ -424,6 +430,8 @@
const handleChangeModel = (value) => {
form.value.model = modelOptions.value.find(item => item.id == value)?.model || '';
form.value.unit = modelOptions.value.find(item => item.id == value)?.unit || '';
+ // 瑙勬牸鍨嬪彿鍙樺寲鍚庢寜 浜у搧+瑙勬牸鍨嬪彿 閲嶆柊杩囨护鍙�夋寚鏍�
+ getList(value);
}
const findNodeById = (nodes, productId) => {
@@ -482,7 +490,7 @@
})
}
-const getList = () => {
+const getList = (modelId) => {
if (!currentProductId.value) {
testStandardOptions.value = [];
tableData.value = [];
@@ -490,6 +498,7 @@
}
let params = {
productId: currentProductId.value,
+ productModelId: modelId ?? form.value.productModelId ?? undefined,
inspectType: 0
}
qualityInspectDetailByProductId(params).then(res => {
--
Gitblit v1.9.3