From 113ca01ea4abdeee4e01695df973219ee4671ef0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 30 六月 2026 17:05:41 +0800
Subject: [PATCH] 新疆海川开心 1.质量管理、回款登记修改默认数据
---
src/views/qualityManagement/processInspection/components/formDia.vue | 35 +++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/src/views/qualityManagement/processInspection/components/formDia.vue b/src/views/qualityManagement/processInspection/components/formDia.vue
index 36f9cf9..9bf4e1d 100644
--- a/src/views/qualityManagement/processInspection/components/formDia.vue
+++ b/src/views/qualityManagement/processInspection/components/formDia.vue
@@ -214,10 +214,41 @@
form.value.unit = "鍖�"; // 鍗曚綅榛樿涓哄寘
form.value.quantity = 3; // 鏁伴噺榛樿涓�3
form.value.checkResult = "鍚堟牸"; // 妫�楠岀粨鏋滈粯璁や负鍚堟牸
+ // 浜у搧鍚嶇О榛樿鍌昏�佸ぇ鍘熷懗鐡滃瓙锛堣川妫�璇曞帇锛�
+ productTreeList({productName: '璐ㄩ噺'}).then((res) => {
+ productOptions.value = convertIdToValue(res);
+ // 閫掑綊鏌ユ壘鐩爣鑺傜偣
+ const findTarget = (nodes) => {
+ for (const node of nodes) {
+ if (node.label === "鍌昏�佸ぇ鍘熷懗鐡滃瓙锛堣川妫�璇曞帇锛�") {
+ return node;
+ }
+ if (node.children && node.children.length > 0) {
+ const found = findTarget(node.children);
+ if (found) return found;
+ }
+ }
+ return null;
+ };
+ const target = findTarget(res);
+ if (target) {
+ form.value.productId = target.id;
+ form.value.productName = target.label;
+ currentProductId.value = target.id;
+ // 鍔犺浇瑙勬牸鍒楄〃
+ modelList({ id: target.id }).then((modelRes) => {
+ modelOptions.value = modelRes;
+ });
+ // 鍔犺浇妫�楠屽弬鏁�
+ qualityInspectDetailByProductId(target.id).then((paramRes) => {
+ tableData.value = paramRes.data;
+ });
+ }
+ });
}
// 榛樿妫�楠屽憳涓哄綋鍓嶇櫥褰曚汉锛屾娴嬫棩鏈熼粯璁や负褰撳ぉ锛堢┖鏃跺~鍏咃級
- if (currentUserName.value && !form.value.checkName) {
- form.value.checkName = currentUserName.value;
+ if (!form.value.checkName) {
+ form.value.checkName = "渚洓鏉�";
}
if (!form.value.checkTime) {
form.value.checkTime = getToday();
--
Gitblit v1.9.3