From 91874fc927117dfeb9050791dd8f060e874d2fd6 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期四, 21 五月 2026 14:06:55 +0800
Subject: [PATCH]  feat: 质检功能优化 - 支持快速合格判定   1. 将检验管理页面的"编辑"按钮改为"质检"   2. 点击"质检"时弹出对话框选择合格/不合格   3. 选择"合格"时自动填充当前时间和当前用户,直接提交   4. 选择"不合格"时进入详细填写页面,检测结果默认为"不合格"涉及文件:- 原材料检验、出厂检验、过程检验的index.vue和formDia.vue

---
 src/views/qualityManagement/finalInspection/components/formDia.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/views/qualityManagement/finalInspection/components/formDia.vue b/src/views/qualityManagement/finalInspection/components/formDia.vue
index 5f4c975..09b1e61 100644
--- a/src/views/qualityManagement/finalInspection/components/formDia.vue
+++ b/src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -203,13 +203,13 @@
 const modelOptions = ref([]);
 
 // 鎵撳紑寮规
-const openDialog = async (type, row) => {
+const openDialog = async (type, row, defaultCheckResult = "") => {
   operationType.value = type;
   dialogFormVisible.value = true;
   // 鍏堟竻绌鸿〃鍗曢獙璇佺姸鎬侊紝閬垮厤闂儊
   await nextTick();
   proxy.$refs.formRef?.clearValidate();
-  
+
   // 骞惰鍔犺浇鍩虹鏁版嵁
   const [userListsRes] = await Promise.all([
     userListNoPage(),
@@ -219,16 +219,20 @@
     })
   ]);
   userList.value = userListsRes.data;
-  
+
   form.value = {}
   testStandardOptions.value = [];
   tableData.value = [];
-  
+
   if (operationType.value === 'edit') {
     // 鍏堜繚瀛� testStandardId锛岄伩鍏嶈娓呯┖
     const savedTestStandardId = row.testStandardId;
     // 鍏堣缃〃鍗曟暟鎹紝浣嗘殏鏃舵竻绌� testStandardId锛岀瓑閫夐」鍔犺浇瀹屾垚鍚庡啀璁剧疆
     form.value = {...row, testStandardId: ''}
+    // 濡傛灉浼犲叆浜嗛粯璁ゆ娴嬬粨鏋滐紝瑕嗙洊row涓殑鍊�
+    if (defaultCheckResult) {
+      form.value.checkResult = defaultCheckResult;
+    }
     currentProductId.value = row.productId || 0
     // 娓呯┖楠岃瘉鐘舵�侊紝閬垮厤鏁版嵁鍔犺浇杩囩▼涓殑鏍¢獙闂儊
     nextTick(() => {

--
Gitblit v1.9.3