From d8f4bb523d8eb35b1e80e6ba080271cb075a0386 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期六, 13 六月 2026 09:16:50 +0800
Subject: [PATCH] fix: 增加质检提交loading,移除所有数据更新,只更新提交状态

---
 src/views/qualityManagement/processInspection/index.vue |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/views/qualityManagement/processInspection/index.vue b/src/views/qualityManagement/processInspection/index.vue
index eaa437c..347d37a 100644
--- a/src/views/qualityManagement/processInspection/index.vue
+++ b/src/views/qualityManagement/processInspection/index.vue
@@ -225,6 +225,7 @@
 				clickFun: (row) => {
 					submit(row.id);
 				},
+				loading: (row) => submitLoadingId.value === row.id,
 				disabled: (row) => {
 					// 宸叉彁浜ゅ垯绂佺敤
 					if (row.inspectState == 1) return true;
@@ -264,6 +265,7 @@
 const tableData = ref([]);
 const selectedRows = ref([]);
 const tableLoading = ref(false);
+const submitLoadingId = ref(null);
 const dialogFormVisible = ref(false);
 const form = ref({
 	checkName: ""
@@ -333,12 +335,20 @@
     filesDia.value?.openDialog(type, row)
   })
 };
-// 鎻愪环
+// 鎻愪氦
 const submit = async (id) => {
-	const res = await submitQualityInspect({id: id})
-	if (res.code === 200) {
-		proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
-		getList();
+	submitLoadingId.value = id;
+	try {
+		const res = await submitQualityInspect({ id });
+		if (res.code === 200) {
+			proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+			const row = tableData.value.find(item => item.id === id);
+			if (row) {
+				row.inspectState = 1;
+			}
+		}
+	} finally {
+		submitLoadingId.value = null;
 	}
 }
 const open = async (row) => {

--
Gitblit v1.9.3