From 422aea7677145bc4f61f10436353d9e62d80fff5 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 25 三月 2026 16:59:35 +0800
Subject: [PATCH] 过程检验列表加上不良数量、合格数量字段。过程检验编辑页面也加上不良数量、合格数量字段,不良数量输入框手填,合格数量,数量输入框置灰,根据根据不良数量+合格数量=数量这一逻辑计算。若不填默认不良数量为0。数量是订单本次生产数量-报废数量

---
 src/views/collaborativeApproval/knowledgeBase/index.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index f7a1ef3..bdaf0b4 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -425,8 +425,15 @@
   listKnowledgeBase({...page.value, ...searchForm.value})
   .then(res => {
     tableLoading.value = false;
-    tableData.value = res.data.records
     page.value.total = res.data.total;
+    // 濡傛灉褰撳墠椤垫暟瓒呰繃鎬婚〉鏁帮紝閲嶇疆鍒扮1椤靛苟閲嶆柊鏌ヨ
+    const maxPage = Math.ceil(res.data.total / page.value.size) || 1;
+    if (page.value.current > maxPage && maxPage > 0) {
+      page.value.current = 1;
+      // 閲嶆柊鏌ヨ绗�1椤垫暟鎹�
+      return getList();
+    }
+    tableData.value = res.data.records;
   }).catch(err => {
     tableLoading.value = false;
   })
@@ -434,9 +441,14 @@
 
 // 鍒嗛〉澶勭悊
 const pagination = (obj) => {
+  const oldSize = page.value.size;
   page.value.current = obj.page;
   page.value.size = obj.limit;
-  handleQuery();
+  // 濡傛灉 size 鏀瑰彉浜嗭紝閲嶇疆鍒扮1椤碉紝閬垮厤褰撳墠椤佃秴鍑鸿寖鍥�
+  if (oldSize !== obj.limit) {
+    page.value.current = 1;
+  }
+  getList();
 };
 
 // 閫夋嫨鍙樺寲澶勭悊

--
Gitblit v1.9.3