From 9c49917bb7ec38cc4317591763f80ccf89c2e729 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期三, 03 十二月 2025 19:26:58 +0800
Subject: [PATCH] 将判断上限值过大过小逻辑删除

---
 pages/QC/XJ/detail.vue |   73 ++++++++++++++++++++++++++++++------
 1 files changed, 60 insertions(+), 13 deletions(-)

diff --git a/pages/QC/XJ/detail.vue b/pages/QC/XJ/detail.vue
index 6383ad3..6a80a09 100644
--- a/pages/QC/XJ/detail.vue
+++ b/pages/QC/XJ/detail.vue
@@ -76,7 +76,7 @@
               <view class="info-value">{{ formData.result }}</view>
             </view>
             <view v-if="formData.remarks" class="info-item">
-              <view class="info-label">涓嶅悎鏍兼弿杩�</view>
+              <view class="info-label">澶囨敞</view>
               <view class="info-value danger">{{ formData.remarks }}</view>
             </view>
           </view>
@@ -94,9 +94,14 @@
 
           <view class="input-group input1">
             <view class="input-wrapper">
+              <button class="btn upload-btn" @click="chooseImage">
+                <uni-icons type="upload" size="16" color="#fff"></uni-icons>
+                涓婁紶/鏌ョ湅鍥剧墖
+              </button>
               <input v-if="tableData.length < formData.levelNum" v-model="formData.fcheckResu" class="result-input"
                      placeholder="璇疯緭鍏ユ楠岀粨鏋�..." type="number"/>
-              <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">淇濆瓨缁撴灉
+              <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit" style="margin: 0;">淇濆瓨缁撴灉 
+			   
               </button>
               <button v-if="isShowImg" class="btn upload-btn" @click="previewImage">
                 <uni-icons color="#fff" size="16" type="image"></uni-icons>
@@ -104,7 +109,7 @@
               </button>
               <button class="btn upload-btn" @click="saveRemarks">
                 <uni-icons color="#fff" size="16" type="compose"></uni-icons>
-                涓嶅悎鏍兼弿杩�
+                澶囨敞
               </button>
             </view>
           </view>
@@ -112,13 +117,17 @@
           <!-- 鍝嶅簲寮忚璁$殑绗簩涓緭鍏ョ粍 -->
           <view class="input-group input2">
             <view class="input-wrapper">
+              <button class="btn upload-btn" @click="chooseImage">
+                <uni-icons type="upload" size="16" color="#fff"></uni-icons>
+                涓婁紶/鏌ョ湅鍥剧墖
+              </button>
               <button v-if="isShowImg" class="btn upload-btn" @click="previewImage">
                 <uni-icons color="#fff" size="16" type="image"></uni-icons>
                 鏌ョ湅鍥剧墖
               </button>
               <button class="btn upload-btn" @click="saveRemarks">
                 <uni-icons color="#fff" size="16" type="compose"></uni-icons>
-                涓嶅悎鏍兼弿杩�
+                澶囨敞
               </button>
             </view>
             <view class="input-wrapper" style="margin-top: 15px;">
@@ -181,14 +190,14 @@
         </view>
       </view>
 
-      <!-- 寮瑰嚭灞� - 涓嶅悎鏍兼弿杩� -->
+      <!-- 寮瑰嚭灞� - 澶囨敞 -->
       <view v-if="remarksPopup" class="overlay">
         <view class="popup">
-          <h3>淇敼涓嶅悎鏍兼弿杩�</h3>
+          <h3>淇敼澶囨敞</h3>
           <form>
             <view class="form-group">
-              <label class="form-label">涓嶅悎鏍兼弿杩�:</label>
-              <input v-model="remarks" class="form-input" placeholder="璇疯緭鍏ヤ笉鍚堟牸鎻忚堪" type="text"/>
+              <label class="form-label">澶囨敞:</label>
+              <input v-model="remarks" class="form-input" placeholder="璇疯緭鍏ュ娉�" type="text"/>
             </view>
             <view class="popup-buttons">
               <button class="btn primary-btn" type="warn" @click="editRemarks">淇敼</button>
@@ -299,8 +308,16 @@
           return;
         }
 
-        if (this.formData.fcheckResu >= this.formData.minValue && this.formData.fcheckResu <= this.formData
-            .maxValue) {
+        let checkValue = Number(this.formData.fcheckResu);
+        let minValue = Number(this.formData.minValue);
+        let maxValue = Number(this.formData.maxValue);
+
+        if (isNaN(checkValue) || isNaN(minValue) || isNaN(maxValue)) {
+          this.$showMessage("妫�楠屽�兼垨鑼冨洿鍊兼牸寮忎笉姝g‘锛岃妫�鏌ヨ緭鍏�");
+          return;
+        }
+
+        if (checkValue >= minValue && checkValue <= maxValue) {
           fstand = "鈭�"
         } else {
           fstand = "脳";
@@ -348,6 +365,10 @@
         }
       }).then(res => {
         this.formData = res.data.tbBillList.itemXj01;
+        // 纭繚formData鍖呭惈id灞炴�э紝鐢ㄤ簬鍥剧墖涓婁紶鍔熻兘
+        if (!this.formData.id && this.id) {
+          this.formData.id = this.id;
+        }
 
         this.tableData = res.data.tbBillList.itemXj02s;
 
@@ -385,8 +406,16 @@
           return;
         }
 
-        if (this.editData.fcheckResu >= this.formData.minValue && this.editData.fcheckResu <= this.formData
-            .maxValue) {
+        let checkValue = Number(this.editData.fcheckResu);
+        let minValue = Number(this.formData.minValue);
+        let maxValue = Number(this.formData.maxValue);
+
+        if (isNaN(checkValue) || isNaN(minValue) || isNaN(maxValue)) {
+          this.$showMessage("妫�楠屽�兼垨鑼冨洿鍊兼牸寮忎笉姝g‘锛岃妫�鏌ヨ緭鍏�");
+          return;
+        }
+
+        if (checkValue >= minValue && checkValue <= maxValue) {
           this.editData.isPass = 1
         } else {
           this.editData.isPass = 0
@@ -427,7 +456,6 @@
       })
     },
     numberEdit(item) {
-
       let fstand = "鈭�";
       let fcheckResu = 1;
 
@@ -450,6 +478,12 @@
         this.$showMessage("淇敼鎴愬姛");
         this.refreshResult(); //鍒锋柊椤甸潰
       })
+    },
+    // 涓婁紶鍥剧墖
+    chooseImage() {
+      uni.navigateTo({
+        url: 'ImageItem?id=666' + this.formData.id + '&gid=' + this.gid
+      });
     },
     saveRemarks() {
       this.remarksPopup = !this.remarksPopup;
@@ -645,6 +679,12 @@
       color: #fff;
       padding: 0 10px;
       margin: 0;
+      height: 45px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      border: none;
+      border-radius: 4px;
     }
   }
 }
@@ -955,6 +995,13 @@
   &.primary-btn {
     background-color: $primary-color;
     color: #fff;
+    height: 45px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border: none;
+    border-radius: 4px;
+    padding: 0 20px;
   }
 
   &.danger-btn {

--
Gitblit v1.9.3