From 0293d4f776f88ebc307a750f38a16454f4553701 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期二, 19 八月 2025 21:01:35 +0800
Subject: [PATCH] 首检、巡检一致性前端代码提交

---
 pages/QC/LLJ/yzxFrom.vue |   58 ++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/pages/QC/LLJ/yzxFrom.vue b/pages/QC/LLJ/yzxFrom.vue
index c9a145b..59fcbb9 100644
--- a/pages/QC/LLJ/yzxFrom.vue
+++ b/pages/QC/LLJ/yzxFrom.vue
@@ -5,6 +5,7 @@
       <view class="th name">鍏冨櫒浠跺悕绉�</view>
       <view class="th spec">瑙勬牸</view>
       <view class="th manufacturer">鍒堕�犲晢</view>
+	  <view class="th operation">涓婁紶鍥剧墖</view>
       
     </view>
 
@@ -34,6 +35,9 @@
           </view>
         </view>
 		
+		<view class="td operation" v-if="current=='true'">
+		   <button class="secondary-btn" @click="uploadImages(item.id)">涓婁紶/鏌ョ湅鍥剧墖</button>
+		</view>
  
  <!-- 瑙勬牸鍒� -->
  <view class="td spec" v-if="current!='true'">
@@ -56,7 +60,9 @@
      <text class="option-text">{{ mfg }}</text>
    </view>
  </view>
- 
+ <view class="td operation" v-if="current!='true'">
+    <button class="secondary-btn" @click="uploadImages(item.id)">涓婁紶/鏌ョ湅鍥剧墖</button>
+ </view>
  
  
       </view>
@@ -69,7 +75,7 @@
               @tap="handleSubmit">
         {{ isSubmitting ? '鎻愪氦涓�...' : '淇濆瓨娓呭崟' }}
       </button>
-	  <button class="secondary-btn" @click="uploadImages">涓婁紶/鏌ョ湅鍥剧墖</button>
+	  <!-- <button class="secondary-btn" @click="uploadImages">涓婁紶/鏌ョ湅鍥剧墖</button> -->
     </view>
 	<view class="submit-container" v-if="components.length==0">
 	  <h1>娓╅Θ鎻愮ず锛�</h1>
@@ -103,10 +109,10 @@
         item.selectedSpec = index
       }
     },
-	uploadImages() {
+	uploadImages(id) {
 	  // 涓婁紶/鏌ョ湅鍥剧墖鐨勯�昏緫
 	 uni.navigateTo({
-	 	url: 'ImageItem?id=888' + this.formid
+	 	url: 'ImageItem?id=888' + id.sort()[0]
 	 });
 	},
     async handleSubmit() {
@@ -147,30 +153,42 @@
 				data: submitData
 			}
 		}).then(res => {
-			
+			if(res.status==0){
+				uni.showToast({
+				  title: '淇濆瓨鎴愬姛',
+				  icon: 'success',
+				  duration: 2000
+				})
+			}else{
+				uni.showModal({
+					title: "鎻愮ず",
+					content: res.message,
+					confirmText: "纭畾",
+					showCancel: false,
+					success: (res) => {
+						
+					}
+				})
+			}
 		}).catch(() => {
 			this.isLoading = false; // 鍑虹幇閿欒鏃剁粨鏉熷姞杞�
 		});
 
-        uni.showToast({
-          title: '淇濆瓨鎴愬姛',
-          icon: 'success',
-          duration: 2000
-        })
+      
         
       } finally {
         this.isSubmitting = false
       }
     },
     validateForm() {
-      for (const item of this.components) {
-        if (item.selectedSpec === -1 || item.selectedMfg === -1) {
-          return {
-            valid: false,
-            msg: `${item.name} 鏈畬鎴愰�夋嫨`
-          }
-        }
-      }
+      // for (const item of this.components) {
+      //   if (item.selectedSpec === -1 || item.selectedMfg === -1) {
+      //     return {
+      //       valid: false,
+      //       msg: `${item.name} 鏈畬鎴愰�夋嫨`
+      //     }
+      //   }
+      // }
       return { valid: true }
     },
 			onLoad(options) {
@@ -223,8 +241,8 @@
 
 .name { width: 20%; }
 .spec { width: 30%; }
-.manufacturer { width: 35%; }
-.operation { width: 15%; }
+.manufacturer { width: 30%; }
+.operation { width: 20%; }
 
 /* 閫夐」鏍峰紡 */
 .option-item {

--
Gitblit v1.9.3