From dbfb045ad92072e880104e13fddb4dc7574499a1 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期五, 19 十二月 2025 13:56:02 +0800
Subject: [PATCH] 1.给SJ获取检验项目添加防抖

---
 pages/QC/XJ/detail.vue |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/pages/QC/XJ/detail.vue b/pages/QC/XJ/detail.vue
index 6a80a09..18e6037 100644
--- a/pages/QC/XJ/detail.vue
+++ b/pages/QC/XJ/detail.vue
@@ -165,9 +165,9 @@
               <view v-if="isNumber && !isNaN(parseFloat(item.fcheckResu))" class="simple-number-result">
                 <view class="result-value">{{ item.fcheckResu }}</view>
                 <view v-if="formData.unitName" class="result-unit">{{ formData.unitName }}</view>
-                <view :class="{'pass': isInRange(item.fcheckResu), 'fail': !isInRange(item.fcheckResu)}"
+                <view :class="{'pass': item.fstand === '鈭�' || item.isPass === 1, 'fail': item.fstand === '脳' || item.isPass === 0}"
                       class="result-status">
-                  {{ isInRange(item.fcheckResu) ? '鍚堟牸' : '涓嶅悎鏍�' }}
+                  {{ (item.fstand === '鈭�' || item.isPass === 1) ? '鍚堟牸' : '涓嶅悎鏍�' }}
                 </view>
               </view>
 
@@ -179,12 +179,13 @@
               </view>
             </view>
             <view class="simple-data-cell simple-action">
-              <button v-if="!isNumber" class="simple-btn" @click="numberEdit(item)">
+              <button v-if="!isNumber && current" class="simple-btn" @click="numberEdit(item)">
                 {{ editResult(item.fcheckResu) }}
               </button>
-              <button v-if="isNumber" class="simple-btn" @click="toDetail(item)">
+              <button v-if="isNumber && current" class="simple-btn" @click="toDetail(item)">
                 淇敼
               </button>
+              <view v-if="!current" class="simple-disabled">宸叉彁浜�</view>
             </view>
           </view>
         </view>
@@ -245,7 +246,8 @@
       remarks: "",
       remarksPopup: false,
       currentTab: 0,
-      tabs: []
+      tabs: [],
+      current: true, // 娣诲姞current鐘舵�侊紝A=true(鏈彁浜�)锛孊=false(宸叉彁浜�)
     }
   },
   methods: {
@@ -301,7 +303,7 @@
       let fstand = "鈭�";
 
       //鏈夋渶澶у�煎拰鏈�灏忓�煎氨鏍规嵁鏄惁绗﹀悎鏍囧噯鍊兼洿鏂板垽瀹氱粨鏋滐紝娌℃湁鏈�澶у�煎拰鏈�灏忓�煎氨鏍规嵁鏄惁閫氳繃妫�楠屽垽瀹氱粨鏋�
-      if (this.formData.maxValue && this.formData.minValue) {
+      if (this.formData.maxValue != null && this.formData.minValue != null) {
 
         if (!this.formData.fcheckResu) {
           this.$showMessage("璇疯緭鍏ユ楠屽��");
@@ -377,7 +379,7 @@
           this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData;
         }
 
-        if (this.formData.maxValue && this.formData.minValue && this.formData.standardValue) {
+        if (this.formData.maxValue != null && this.formData.minValue != null && this.formData.standardValue != null) {
           this.isNumber = true;
         }
       })
@@ -399,7 +401,7 @@
 
       let fstand = "鈭�";
 
-      if (this.formData.maxValue && this.formData.minValue) {
+      if (this.formData.maxValue != null && this.formData.minValue != null) {
 
         if (!this.editData.fcheckResu) {
           this.$showMessage("璇疯緭鍏ユ楠屽��");
@@ -490,7 +492,8 @@
       this.remarks = this.formData.remarks;
     },
     editRemarks() {
-      if (this.remarks) {
+      // 鍏佽淇濆瓨绌哄瓧绗︿覆鎴栫┖鏍硷紝鍙鏌ユ槸鍚︿负null鎴杣ndefined
+      if (this.remarks !== null && this.remarks !== undefined) {
         //saveRemarksGid
         this.$post({
           url: "/XJ/saveRemarksPid",
@@ -532,6 +535,13 @@
     this.billNo = params["billNo"];
     this.gid = params["gid"];
     this.currentTab = parseInt(params["index"] || 0);
+    
+    // 璇诲彇current鍙傛暟锛屽垽鏂槸鍚﹀凡鎻愪氦
+    if (params["current"] === 'A') {
+      this.current = true;  // 鏈彁浜わ紝鍙互淇敼
+    } else if (params["current"] === 'B') {
+      this.current = false; // 宸叉彁浜わ紝绂佹淇敼
+    }
 
     this.refreshResult();
     this.loadTabItems();

--
Gitblit v1.9.3