From 688505dded0a49ee685abcb980bd0dc521df4241 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 18 九月 2025 22:57:36 +0800
Subject: [PATCH] SJ,XJ,RKJ

---
 pages/QC/XJ/detail.vue |  156 ++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 122 insertions(+), 34 deletions(-)

diff --git a/pages/QC/XJ/detail.vue b/pages/QC/XJ/detail.vue
index 6983982..efb6790 100644
--- a/pages/QC/XJ/detail.vue
+++ b/pages/QC/XJ/detail.vue
@@ -93,17 +93,32 @@
           </view>
           
           <view class="input-group input1">
-            <view class="input-wrapper">
-              <input v-if="tableData.length < formData.levelNum" class="result-input" type="number" v-model="formData.fcheckResu" placeholder="璇疯緭鍏ユ楠岀粨鏋�..."/>
-              <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">淇濆瓨缁撴灉</button>
-              <button class="btn upload-btn" @click="previewImage" v-if="isShowImg">
-                <uni-icons type="image" size="16" color="#fff"></uni-icons>
-                鏌ョ湅鍥剧墖
+            <view class="input-wrapper llj-flex-row">
+              <input v-if="tableData.length < formData.levelNum"
+                     class="result-input"
+                     type="number"
+                     v-model="formData.fcheckResu"
+                     placeholder="璇疯緭鍏ユ楠岀粨鏋�..." />
+              <button v-if="tableData.length < formData.levelNum"
+                      class="llj-btn llj-btn-save"
+                      @click="submit">淇濆瓨缁撴灉</button>
+              <button
+                class="llj-btn llj-btn-image"
+                @click="previewImage"
+                v-if="isShowImg"
+              >
+                <uni-icons type="image" size="20" color="#fff" style="margin-right:6px;"/>
+                涓婁紶/鏌ョ湅鍥剧墖
               </button>
-              <button class="btn upload-btn" @click="saveRemarks">
-                <uni-icons type="compose" size="16" color="#fff"></uni-icons>
+              <button
+                      class="llj-btn llj-btn-desc"
+                      @click="saveRemarks">
+                <uni-icons type="compose" size="20" color="#fff" style="margin-right:6px;"/>
                 涓嶅悎鏍兼弿杩�
               </button>
+              <view v-if="formData.remarks" class="llj-desc-tag">
+                {{ formData.remarks.length > 10 ? formData.remarks.substr(0,10)+'...' : formData.remarks }}
+              </view>
             </view>
           </view>
           
@@ -159,8 +174,8 @@
               
               <!-- NG/OK鐘舵�佹牱寮� -->
               <view v-else class="simple-status-result">
-                <view class="simple-status" :class="{'pass': item.fcheckResu === '1', 'fail': item.fcheckResu !== '1'}">
-                  {{ item.fcheckResu === '1' ? '鍚堟牸' : '涓嶅悎鏍�' }}
+                <view class="simple-status" :class="{'pass': item.fcheckResu == 1 || item.fcheckResu == 'OK' || item.fcheckResu == 'ok', 'fail': item.fcheckResu != 1 && item.fcheckResu != 'OK' && item.fcheckResu != 'ok'}">
+                  {{ (item.fcheckResu == 1 || item.fcheckResu == 'OK' || item.fcheckResu == 'ok') ? '鍚堟牸' : '涓嶅悎鏍�' }}
                 </view>
               </view>
             </view>
@@ -183,7 +198,7 @@
           <form>
             <view class="form-group">
               <label class="form-label">涓嶅悎鏍兼弿杩�:</label>
-              <input class="form-input" type="text" v-model="remarks" placeholder="璇疯緭鍏ヤ笉鍚堟牸鎻忚堪"/>
+              <input class="form-input" type="text" v-model="remarks" placeholder="璇疯緭鍏ヤ笉鍚堟牸鎻忚堪锛岀暀绌鸿〃绀烘竻闄ゆ弿杩�"/>
             </view>
             <view class="popup-buttons">
               <button type="warn" class="btn primary-btn" @click="editRemarks">淇敼</button>
@@ -203,7 +218,7 @@
               <input class="form-input" type="text" v-model="editData.fcheckResu" placeholder="璇疯緭鍏ユ楠岀粨鏋�"/>
             </view>
             <view class="popup-buttons">
-              <button type="warn" class="btn primary-btn" @click="eidt">淇敼</button>
+              <button type="warn" class="btn primary-btn" @click="edit">淇敼</button>
               <button class="btn cancel-btn" @click="showPopup = !showPopup">鍙栨秷</button>
             </view>
           </form>
@@ -275,7 +290,7 @@
       });
     },
     editResult(fcheckResu) {
-      if (fcheckResu == '1') {
+      if (fcheckResu == '1' || fcheckResu == 'OK' || fcheckResu == 'ok') {
         return "鏀逛负涓嶅悎鏍�";
       } else {
         return "鏀逛负鍚堟牸";
@@ -339,7 +354,7 @@
       this.$post({
         url: "/XJ/getXjDetail02ById",
         data: {
-          pid: this.id
+          id: this.id
         }
       }).then(res => {
         this.formData = res.data.tbBillList.itemXj01;
@@ -360,14 +375,17 @@
       this.showPopup = !this.showPopup;
       this.editData = item;
     },
-    eidt() {
+    edit() {
 
       if (!this.editData.fcheckResu) {
         this.$showMessage("璇疯緭鍏ユ楠岀粨鏋�");
+        return;
       }
 
-      if (this.formData.fcheckResu == this.editData.fcheckResu) {
-        this.$showMessage("淇敼鎴愬姛");
+      // 妫�鏌ユ槸鍚︽湁瀹為檯淇敼
+      const originalValue = this.tableData.find(item => item.id === this.editData.id)?.fcheckResu;
+      if (originalValue == this.editData.fcheckResu) {
+        this.$showMessage("娌℃湁淇敼");
         return;
       }
 
@@ -426,7 +444,7 @@
       let fstand = "鈭�";
       let fcheckResu = 1;
 
-      if (item.fcheckResu == '1') {
+      if (item.fcheckResu == '1' || item.fcheckResu == 'OK' || item.fcheckResu == 'ok') {
         fstand = "脳";
         fcheckResu = 0;
       }
@@ -451,22 +469,22 @@
       this.remarks = this.formData.remarks;
     },
     editRemarks() {
-      if (this.remarks) {
-        //saveRemarksGid
-        this.$post({
-          url: "/XJ/saveRemarksPid",
-          data: {
-            pid: this.formData.id,
-            remarks: this.remarks
-          }
-        }).then(res => {
-          if (res.data.tbBillList > 0) {
-            this.formData.remarks = this.remarks;
-            this.remarksPopup = !this.remarksPopup;
-            this.$showMessage("淇濆瓨鎴愬姛");
-          }
-        })
-      }
+      // 鍏佽鐣欑┖锛岀暀绌轰唬琛ㄦ竻闄ゆ弿杩�
+      this.$post({
+        url: "/XJ/saveRemarksPid",
+        data: {
+          pid: this.formData.id,
+          remarks: this.remarks || "" // 鐣欑┖鏃朵紶閫掔┖瀛楃涓�
+        }
+      }).then(res => {
+        if (res.data.tbBillList > 0) {
+          this.formData.remarks = this.remarks || ""; // 鏇存柊鏈湴鏁版嵁
+          this.remarksPopup = !this.remarksPopup;
+          this.$showMessage(this.remarks ? "淇濆瓨鎴愬姛" : "鎻忚堪宸叉竻闄�");
+        }
+      }).catch(error => {
+        this.$showMessage("淇濆瓨澶辫触锛岃閲嶈瘯");
+      });
     },
     // 鍒ゆ柇鏁板瓧鏄惁鍦ㄨ寖鍥村唴
     isInRange(value) {
@@ -644,6 +662,76 @@
 		}
 	}
 
+	/* LLJ椋庢牸鏍峰紡 */
+	.llj-flex-row {
+		display: flex;
+		flex-wrap: wrap;
+		gap: 12px;
+		align-items: center;
+	}
+
+	.llj-btn {
+		padding: 10px 16px;
+		border: none;
+		border-radius: 6px;
+		font-size: 14px;
+		font-weight: 600;
+		cursor: pointer;
+		transition: all 0.3s ease;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		min-width: 100px;
+		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+	}
+
+	.llj-btn-save {
+		background: linear-gradient(135deg, #667eea, #764ba2);
+		color: #fff;
+	}
+
+	.llj-btn-save:hover {
+		background: linear-gradient(135deg, #5a6fd8, #6a4190);
+		transform: translateY(-1px);
+		box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
+	}
+
+	.llj-btn-image {
+		background: linear-gradient(135deg, #f093fb, #f5576c);
+		color: #fff;
+	}
+
+	.llj-btn-image:hover {
+		background: linear-gradient(135deg, #e879f9, #f43f5e);
+		transform: translateY(-1px);
+		box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
+	}
+
+	.llj-btn-desc {
+		background: linear-gradient(135deg, #4facfe, #00f2fe);
+		color: #fff;
+	}
+
+	.llj-btn-desc:hover {
+		background: linear-gradient(135deg, #3d8bfe, #00d4fe);
+		transform: translateY(-1px);
+		box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
+	}
+
+	.llj-desc-tag {
+		background: linear-gradient(135deg, #ffecd2, #fcb69f);
+		color: #8b4513;
+		padding: 6px 12px;
+		border-radius: 20px;
+		font-size: 12px;
+		font-weight: 600;
+		border: 1px solid #fcb69f;
+		max-width: 200px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+
 	/* 绠�娲佽〃鏍兼牱寮� - 閫傚悎骞撮暱鐢ㄦ埛 */
 	.simple-table-container {
 		margin: 20px 0;

--
Gitblit v1.9.3