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/Add.vue     |  100 +++++++++++++++++---
 pages/QC/SJ/detail.vue  |   77 ++++++++++----
 pages/QC/SJ/yzxFrom.vue |    9 +
 pages/QC/SJ/Add.vue     |   42 ++++++-
 pages/QC/XJ/List.vue    |    2 
 pages/QC/XJ/detail.vue  |   28 +++-
 6 files changed, 196 insertions(+), 62 deletions(-)

diff --git a/pages/QC/SJ/Add.vue b/pages/QC/SJ/Add.vue
index c1cb9e1..a6737da 100644
--- a/pages/QC/SJ/Add.vue
+++ b/pages/QC/SJ/Add.vue
@@ -52,7 +52,7 @@
         <view class="info-label">宸ュ崟鏁伴噺锛�</view>
         <view class="info-value highlight">{{ formData.daa008 }}</view>
       </view>
-      <view v-if="formData.remarks && current" class="info-block">
+      <view v-if="formData.remarks" class="info-block">
         <view class="info-label">澶囨敞锛�</view>
         <view class="info-value">{{ formData.remarks }}</view>
       </view>
@@ -175,6 +175,8 @@
       comments: "",
       commentsPopup: false,
       current: true,
+      
+      getTableTimer: null, // 闃叉姈瀹氭椂鍣�
 
     };
   },
@@ -308,6 +310,11 @@
         if (res.statusCode === 200 || res.status === 0 || res.data === true || res.data.tbBillList === true) {
 
           this.$showMessage("鎴愬姛鎻愪氦妫�楠�");
+          
+          // 娓呴櫎鏈湴瀛樺偍鐨勪竴鑷存�ф牳瀵圭姸鎬�
+          const storageKey = `yzxChecked_${this.formData.id}`;
+          uni.removeStorageSync(storageKey);
+          
           // 鎻愪氦鎴愬姛鍚庡埛鏂伴〉闈㈡暟鎹�
           this.init();
           // 1.5绉掑悗璺宠浆鍒板垪琛ㄩ〉闈�
@@ -327,6 +334,10 @@
 
     init() {
       if (this.formData.id) {
+        // 浠庢湰鍦板瓨鍌ㄨ鍙栦竴鑷存�ф牳瀵圭姸鎬�
+        const storageKey = `yzxChecked_${this.formData.id}`;
+        const storedYzxChecked = uni.getStorageSync(storageKey);
+        
         this.$post({
           url: "/SJ/GetPage",
           data: {
@@ -337,11 +348,11 @@
         }).then(res => {
           let tbBillListElement = res.data.tbBillList[0];
           if (tbBillListElement) {
-            // 淇濆瓨褰撳墠鐨剏zxChecked鐘舵��
-            const currentYzxChecked = this.formData.yzxChecked;
             this.formData = tbBillListElement;
-            // 鎭㈠yzxChecked鐘舵�侊紝閬垮厤琚湇鍔″櫒鏁版嵁瑕嗙洊
-            this.formData.yzxChecked = currentYzxChecked;
+            // 鎭㈠鏈湴瀛樺偍鐨勪竴鑷存�ф牳瀵圭姸鎬�
+            if (storedYzxChecked) {
+              this.formData.yzxChecked = true;
+            }
             this.$post({
               url: "/SJ/getQSItems",
               data: {
@@ -464,13 +475,26 @@
           duration: 2000,
         });
       } else {
+        const currentStatus = this.current ? 'A' : 'B'; // 娣诲姞current鍙傛暟
         uni.navigateTo({
           url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData
-              .id + '&index=' + index
+              .id + '&index=' + index + '&current=' + currentStatus
         });
       }
     },
     getTable() {
+      // 娓呴櫎涓婁竴娆$殑瀹氭椂鍣�
+      if (this.getTableTimer) {
+        clearTimeout(this.getTableTimer);
+      }
+      
+      // 璁剧疆1绉掗槻鎶�
+      this.getTableTimer = setTimeout(() => {
+        this.executeGetTable();
+      }, 1000);
+    },
+    
+    executeGetTable() {
       this.$post({
         url: "/SJ/SetQSItems",
         data: {
@@ -571,7 +595,8 @@
       this.comments = this.formData.comments;
     },
     editRemarks() {
-      if (this.remarks) {
+      // 鍏佽淇濆瓨绌哄瓧绗︿覆鎴栫┖鏍硷紝鍙鏌ユ槸鍚︿负null鎴杣ndefined
+      if (this.remarks !== null && this.remarks !== undefined) {
         //saveRemarksGid
         this.$post({
           url: "/SJ/saveRemarksGid",
@@ -623,8 +648,7 @@
   },
   onShow() {
     // 姣忔杩涘叆椤甸潰閮戒細鎵ц鐨勬柟娉�
-    // 娉ㄩ噴鎺塱nit()璋冪敤,閬垮厤瑕嗙洊涓�鑷存�ф牳瀵圭姸鎬�
-    // this.init();
+    this.init();
   }
 };
 </script>
diff --git a/pages/QC/SJ/detail.vue b/pages/QC/SJ/detail.vue
index 7cbce85..c2acbf4 100644
--- a/pages/QC/SJ/detail.vue
+++ b/pages/QC/SJ/detail.vue
@@ -232,23 +232,23 @@
           const allCompleted = allItems.every(item => item.result !== '鏈畬鎴�');
           
           if (allCompleted) {
-            // 鎵�鏈夐」鐩凡瀹屾垚锛岃烦杞埌Add椤甸潰骞跺埛鏂�
-            const pages = getCurrentPages();
-            if (pages.length >= 2) {
-              const prevPage = pages[pages.length - 2];
-              const route = '/' + prevPage.route;
-              const options = prevPage.options;
-              let query = '';
-              for (let key in options) {
-                query += `${key}=${options[key]}&`;
-              }
-              query = query.slice(0, -1);
-              setTimeout(() => {
-                uni.redirectTo({
-                  url: query ? `${route}?${query}` : route
-                });
-              }, 1000);
-            }
+            // 鎵�鏈夐」鐩凡瀹屾垚锛屼笉鑷姩璺宠浆锛岀敤鎴锋墜鍔ㄨ繑鍥�
+            // const pages = getCurrentPages();
+            // if (pages.length >= 2) {
+            //   const prevPage = pages[pages.length - 2];
+            //   const route = '/' + prevPage.route;
+            //   const options = prevPage.options;
+            //   let query = '';
+            //   for (let key in options) {
+            //     query += `${key}=${options[key]}&`;
+            //   }
+            //   query = query.slice(0, -1);
+            //   setTimeout(() => {
+            //     uni.redirectTo({
+            //       url: query ? `${route}?${query}` : route
+            //     });
+            //   }, 1000);
+            // }
           }
         }
       });
@@ -282,11 +282,13 @@
             }
           });
           
-          // 鎺掑簭鍚庤嚜鍔ㄨ烦杞埌绗竴涓爣绛�
-          this.currentTab = 0;
-          if (this.tabs.length > 0) {
-            this.id = this.tabs[0].id;
-            this.refreshResult();
+          // 鏍规嵁褰撳墠id鏌ユ壘瀵瑰簲鐨勬爣绛剧储寮曪紙鍙傝�僉LJ瀹炵幇锛�
+          const foundIndex = this.tabs.findIndex(tab => tab.id == this.id); // 浣跨敤==鑰岄潪===锛岄伩鍏嶇被鍨嬩笉鍖归厤
+          if (foundIndex !== -1) {
+            this.currentTab = foundIndex;
+          } else {
+            // 濡傛灉娌℃壘鍒帮紝榛樿璺宠浆鍒扮涓�涓爣绛�
+            this.currentTab = 0;
           }
         } else {
           // 娌℃湁椤圭洰鏃惰嚦灏戞坊鍔犲綋鍓嶉」鐩埌鏍囩
@@ -365,9 +367,35 @@
       }).then(res => {
         this.formData.fcheckResu = null;
         this.$showMessage("淇濆瓨鎴愬姛");
-        this.refreshResult();
+        
         // 閲嶆柊鍔犺浇鏍囩椤逛互鏇存柊鐘舵��
         this.loadTabItems();
+        
+        // 绛夊緟tabs鏇存柊鍚�,鏌ユ壘涓嬩竴涓湭瀹屾垚鐨勯」鐩�
+        this.$nextTick(() => {
+          // 鏌ユ壘涓嬩竴涓湭瀹屾垚鐨勯」鐩�
+          const nextUnfinishedIndex = this.tabs.findIndex((tab, index) => 
+            index > this.currentTab && tab.result === '鏈畬鎴�'
+          );
+          
+          if (nextUnfinishedIndex !== -1) {
+            // 鎵惧埌浜嗕笅涓�涓湭瀹屾垚鐨勯」鐩�,璺宠浆杩囧幓
+            this.currentTab = nextUnfinishedIndex;
+            this.id = this.tabs[nextUnfinishedIndex].id;
+            this.refreshResult();
+          } else {
+            // 娌℃湁涓嬩竴涓湭瀹屾垚鐨�,浠庡ご鏌ユ壘绗竴涓湭瀹屾垚鐨�
+            const firstUnfinishedIndex = this.tabs.findIndex(tab => tab.result === '鏈畬鎴�');
+            if (firstUnfinishedIndex !== -1) {
+              this.currentTab = firstUnfinishedIndex;
+              this.id = this.tabs[firstUnfinishedIndex].id;
+              this.refreshResult();
+            } else {
+              // 鎵�鏈夐」鐩兘宸插畬鎴�,鍒锋柊褰撳墠椤圭洰
+              this.refreshResult();
+            }
+          }
+        });
         
         // 妫�鏌ユ槸鍚︽墍鏈夋楠岄」鐩兘宸插畬鎴�
         this.checkAllItemsCompleted();
@@ -527,7 +555,8 @@
       this.remarks = this.formData.remarks;
     },
     editRemarks() {
-      if (this.remarks) {
+      // 鍏佽淇濆瓨绌哄瓧绗︿覆鎴栫┖鏍硷紝鍙鏌ユ槸鍚︿负null鎴杣ndefined
+      if (this.remarks !== null && this.remarks !== undefined) {
         //saveRemarksGid
         this.$post({
           url: "/SJ/saveRemarksPid",
diff --git a/pages/QC/SJ/yzxFrom.vue b/pages/QC/SJ/yzxFrom.vue
index fe978d1..82316c9 100644
--- a/pages/QC/SJ/yzxFrom.vue
+++ b/pages/QC/SJ/yzxFrom.vue
@@ -159,6 +159,11 @@
 				  icon: 'success',
 				  duration: 2000
 				})
+				
+				// 淇濆瓨涓�鑷存�ф牳瀵圭姸鎬佸埌鏈湴瀛樺偍
+				const storageKey = `yzxChecked_${this.formid}`;
+				uni.setStorageSync(storageKey, true);
+				
 				// 淇濆瓨鎴愬姛鍚庢洿鏂扮埗椤甸潰鐘舵��
 				const pages = getCurrentPages();
 				if (pages.length > 1) {
@@ -168,10 +173,6 @@
 				    prevPage.$vm.formData.yzxChecked = true;
 				  }
 				}
-				// 鑷姩杩斿洖涓婁竴椤�  澧炲姞鐨�
-				setTimeout(() => {
-				  uni.navigateBack();
-				}, 1500);
 			}else{
 				uni.showModal({
 					title: "鎻愮ず",
diff --git a/pages/QC/XJ/Add.vue b/pages/QC/XJ/Add.vue
index faf7d70..6030281 100644
--- a/pages/QC/XJ/Add.vue
+++ b/pages/QC/XJ/Add.vue
@@ -3,14 +3,14 @@
     <!-- 澶撮儴淇℃伅 -->
     <view class="sheet-header">
       <h1>宸℃鍗�</h1>
-      <view class="inspection-number">妫�楠屽崟鍙凤細{{ formData.billNo }}</view>
+      <view class="inspection-number">宸℃鍗曞彿锛歿{ formData.releaseNo }}</view>
     </view>
 
     <!-- 鍩烘湰淇℃伅鍖� -->
     <view class="basic-info">
       <view class="info-row">
         <span class="info-label">鍒涘缓鏃堕棿锛�</span>
-        <span class="info-value">{{ formData.createTime }}</span>
+        <span class="info-value">{{ formData.createDate }}</span>
         <span class="info-label">妫�楠屼汉锛�</span>
         <span class="info-value">{{ formData.statusUser }}</span>
       </view>
@@ -29,7 +29,7 @@
         <view class="info-label">鐗╂枡缂栫爜锛�</view>
         <view v-if="!isUpdate" class="info-value">{{ formData.itemNo }}</view>
         <superwei-combox v-else v-model="formData.itemNo" :candidates="boardItems" :isJSON="true"
-                         class="picker info-value-input" keyName="itemName" placeholder="璇烽�夋嫨鎴栬緭鍏�"
+                         class="picker info-value-input" keyName="itemNo" placeholder="璇烽�夋嫨鎴栬緭鍏�"
                          @select="onItemChange"></superwei-combox>
       </view>
       <view class="info-block">
@@ -60,8 +60,8 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖� -->
     <view class="action-buttons">
-      <button v-if="current" class="secondary-btn" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
-      <button v-if="formData.billNo" class="secondary-btn" @click="closeInspection">鍏抽棴姝ゆ妫�楠�</button>
+      <button v-if="current && !isUpdate" class="secondary-btn" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
+      <button v-if="formData.billNo && !isUpdate" class="secondary-btn" @click="closeInspection">鍏抽棴姝ゆ妫�楠�</button>
     <!-- <button v-if="isShowTable && isUpdate" class="primary-btn" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button> --> 
     </view>
 
@@ -101,7 +101,7 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖� -->
     <view class="action-buttons">
-      <button v-if="isUpdate && !isShowTable" class="secondary-btn" @click="getItem">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</button>
+      <button v-if="isUpdate && !isShowTable" class="secondary-btn" @click="getItem1">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</button>
       <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="uploadImages">鏌ョ湅鎵�鏈夊浘鐗�</button>
       <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="addDefectDescription">鏌ョ湅涓嶈壇鎻忚堪</button>
       <!--  <button v-if="!isUpdate && !formData.statusUser && !isShowTable" class="secondary-btn" @click="removeXJ">
@@ -133,9 +133,10 @@
   data() {
     return {
       formData: {
-        createTime: "",
+        createDate: "",
         id: "",
         billNo: "",
+        releaseNo: "", // 娣诲姞宸℃鍗曞彿瀛楁
         itemNo: "",
         itemName: "",
         workshopCode: "",
@@ -192,11 +193,12 @@
 
         this.isUpdate = false;
 
-        // 猸愨瓙猸� 鏂板锛氬繀椤讳繚瀛樺埌 this.id锛屽悗缁帴鍙f墠鑳戒娇鐢�
-        this.id = params["id"];         // 鈫愨啇鈫� 蹇呴』鍔犺繖涓�鍙ワ紒锛侊紒
+       
+        this.id = params["id"];         
 
         // 鍘熸潵浣犵殑閫昏緫淇濇寔涓嶅姩
         this.formData.id = params["id"];
+        this.formData.releaseNo = params["releaseNo"]; // 淇濆瓨宸℃鍗曞彿
         this.formData.billNo = params["billNo"];
 
         // 鍒濆鍖栨槑缁�
@@ -209,7 +211,7 @@
             url: "/XJ/getMaxReleaseNo"
         }).then(res => {
             this.formData.billNo = res.data.tbBillList;
-            this.formData.createTime = this.$getDate("yyyy-mm-dd");
+            this.formData.createDate = this.$getDate("yyyy-mm-dd");
         });
 
         // 浜у搧缂栫爜涓嬫媺妗嗗垵濮嬪寲
@@ -288,7 +290,8 @@
         url: "/XJ/XJQaSubmit",
         data: {
           userNo: this.$loginInfo.account,
-          gid: this.formData.id
+          gid: this.formData.id,
+          releaseNo: this.formData.releaseNo
         }
       }).then(res => {
 
@@ -297,9 +300,16 @@
         console.log("Status Code鐨勫��:", res.statusCode);
         console.log("杩斿洖鐨勬暟鎹�:", res.data);
         
-        // 妫�鏌ュ绉嶆垚鍔熸潯浠�
+        // 妫�鏌bBillList涓殑閿欒娑堟伅
+        if (res.data && res.data.tbBillList) {
+          const errorMsg = res.data.tbBillList.data || res.data.tbBillList.message;
+          if (typeof errorMsg === 'string' && errorMsg) {
+            this.$showMessage(errorMsg);
+            return;
+          }
+        }
+        
         if (res.statusCode === 200 || res.status === 0 || res.data === true || res.data.tbBillList === true) {
-
           this.$showMessage("鎴愬姛鎻愪氦妫�楠�");
           // 鎻愪氦鎴愬姛鍚庤烦杞埌鍒楄〃椤甸潰
           setTimeout(() => {
@@ -395,9 +405,66 @@
       })
 
     },
+    getItem1() {
+      // 楠岃瘉蹇呭~瀛楁
+      if (!this.formData.line) {
+        this.$showMessage("璇峰厛閫夋嫨鐢熶骇绾垮埆");
+        return;
+      }
+      if (!this.formData.itemNo) {
+        this.$showMessage("璇峰厛閫夋嫨鐗╂枡缂栫爜");
+        return;
+      }
+      if (!this.formData.daa001) {
+        this.$showMessage("璇峰厛閫夋嫨宸ュ崟缂栧彿");
+        return;
+      }
+
+      // 璋冪敤鍚庣鎺ュ彛鍒涘缓妫�楠屽崟
+      this.$post({
+        url: "/XJ/createInspection",
+        data: {
+          lineNo: this.formData.line,        // 鐢熶骇绾垮埆
+          itemNo: this.formData.itemNo,      // 鐗╂枡缂栫爜
+          daa001: this.formData.daa001,       // 宸ュ崟缂栧彿
+          account: this.$loginInfo.account  // 鐧诲綍璐﹀彿
+        }
+      }).then(res => {
+        console.log("鍒涘缓妫�楠屽崟瀹屾暣鍝嶅簲:", res);
+        console.log("杩斿洖鐨勬暟鎹�:", res.data);
+        
+        // 浼樺厛妫�鏌bBillList涓殑message瀛楁锛屽瓨鍦ㄥ垯涓哄け璐�
+        if (res.data && res.data.tbBillList && res.data.tbBillList.message) {
+          this.$showMessage(res.data.tbBillList.message);
+          return;
+        }
+        
+        // 妫�鏌es.data鏄惁涓哄瓧绗︿覆閿欒娑堟伅
+        if (typeof res.data === 'string' && res.data) {
+          this.$showMessage(res.data);
+          return;
+        }
+        
+        // 妫�鏌es.data鏄惁鏈夋湁鏁堟暟鎹紝瀛樺湪Daa001绛夊瓧娈佃〃绀烘垚鍔�
+        if (res.data && (res.data.Daa001 || res.data.ItemNo)) {
+          this.$showMessage("鍒涘缓妫�楠屽崟鎴愬姛");
+          // 鏍规嵁鍚庣杩斿洖鐨勬暟鎹洿鏂伴〉闈�
+          // 鍙互鍦ㄨ繖閲屽鐞嗚繑鍥炵殑妫�楠屽崟淇℃伅
+        } else {
+          // 鍏朵粬澶辫触鎯呭喌锛屽皾璇曟彁鍙栭敊璇秷鎭�
+          const errorMsg = res.data?.message || "鍒涘缓澶辫触";
+          this.$showMessage(errorMsg);
+        }
+      }).catch(err => {
+        console.log("鍒涘缓妫�楠屽崟鍑洪敊:", err);
+        this.$showMessage("鍒涘缓妫�楠屽崟澶辫触锛岃閲嶈瘯");
+      });
+    },
     onItemChange(event) {
 
       this.formData.itemNo = event.itemNo;
+      this.formData.itemName = event.itemName;
+      this.formData.itemModel = event.itemModel;
 
       this.$post({
         url: "/XJ/getDaa001",
@@ -468,12 +535,14 @@
   const billNo = this.formData.billNo || '';
   const gid = this.formData.id || '';
   const itemIndex = index != null ? index : 0;
+  const currentStatus = this.current ? 'A' : 'B'; // 娣诲姞current鍙傛暟
 
   uni.navigateTo({
     url: 'detail?id=' + encodeURIComponent(itemId) + 
          '&billNo=' + encodeURIComponent(billNo) + 
          '&gid=' + encodeURIComponent(gid) + 
-         '&index=' + encodeURIComponent(itemIndex)
+         '&index=' + encodeURIComponent(itemIndex) +
+         '&current=' + currentStatus // 浼犻�抍urrent鐘舵��
   });
 },
     getTable() {
@@ -494,7 +563,8 @@
       this.$post({
         url: "/XJ/setJYItem",
         data: {
-          itemNo: this.formData.itemNo
+          itemNo: this.formData.itemNo,
+          releaseNo: this.formData.releaseNo  // 浼犻�掑贰妫�鍗曞彿
         }
       }).then(res => {
         if (res.data && res.data.tbBillList && res.data.tbBillList.length > 0) {
diff --git a/pages/QC/XJ/List.vue b/pages/QC/XJ/List.vue
index 5d35528..28f2db6 100644
--- a/pages/QC/XJ/List.vue
+++ b/pages/QC/XJ/List.vue
@@ -199,7 +199,7 @@
     },
     handleFabClick() {
       uni.navigateTo({
-        url: 'Add?id'
+        url: 'Add?current=A'
       });
     },
     onClickItem(index) {
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