From a0f48422ed179d2f82d5701a7528e77462f71483 Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期四, 16 十月 2025 13:36:04 +0800
Subject: [PATCH] 1、oqc新增获取检验项目

---
 pages/QC/OQC/Add.vue      |   38 ++++++++++++++++++
 pages/QC/OQC/ScanCode.vue |   23 ++++++++---
 2 files changed, 54 insertions(+), 7 deletions(-)

diff --git a/pages/QC/OQC/Add.vue b/pages/QC/OQC/Add.vue
index 9ce65df..3949bff 100644
--- a/pages/QC/OQC/Add.vue
+++ b/pages/QC/OQC/Add.vue
@@ -109,6 +109,7 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <view class="action-buttons">
+	  <button class="btn btn-primary" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
       <button class="btn btn-primary" @click="submitInspection">鎻愪氦</button>
       <button class="secondary-btn" @click="uploadImages">涓婁紶/鏌ョ湅鍥剧墖</button>
       <button class="btn btn-secondary" @click="addDefectDescription">娣诲姞涓嶅悎鏍兼弿杩�</button>
@@ -253,7 +254,42 @@
         }
       })
     },
-    editRemarks() {
+    
+	getTable() {
+	  // 鑾峰彇妫�楠岄」鐩�昏緫
+	  this.$post({
+	    url: "/MesOqcItemsDetect02/OqcQagetTable",
+	    data: {
+	      userNo: this.$loginInfo.account,
+	      releaseNo: this.formData.releaseNo
+	    }
+	  }).then(res => {
+	    if (res.status == 0) {
+	
+	      uni.showToast({
+	        title: res.message.toString(),
+	        icon: 'success',
+	        duration: 2000
+	      })
+	      this.getDetail5();
+	    } else {
+	      uni.showModal({
+	        title: "鎻愮ず",
+	        content: res.message.toString(),
+	        confirmText: "纭畾",
+	        showCancel: false,
+	        success: (res) => {
+	
+	        }
+	      })
+	    }
+	  })
+	  
+	  
+	},
+	
+	
+	editRemarks() {
       if (this.remarks && this.formData.id) {
         this.$post({
           url: "/MesOqcItemsDetect02/saveRemarksGid",
diff --git a/pages/QC/OQC/ScanCode.vue b/pages/QC/OQC/ScanCode.vue
index f7c77cf..05b1061 100644
--- a/pages/QC/OQC/ScanCode.vue
+++ b/pages/QC/OQC/ScanCode.vue
@@ -162,13 +162,15 @@
           ItemCode: this.formData.ItemBarcode
         }
       }).then(res => {
+		  
+		 if( res.status == 1 ){
+			 this.$showMessage(res.message);
+			 return;
+		 }
+		  
         let fr = res.data.tbBillList;
 
-        // 鏁版嵁瀹屾暣鎬ф牎楠�
-        if (!fr) {
-          this.$showMessage("鑾峰彇鏉$爜淇℃伅澶辫触锛岃閲嶈瘯");
-          return;
-        }
+        
 
         if (!fr.itemId || !fr.itemName || !fr.itemNo) {
           this.$showMessage("鏉$爜淇℃伅涓嶅畬鏁达紝璇锋鏌ユ潯鐮�");
@@ -216,7 +218,16 @@
         }
 
         this.formData = fr;
-        this.tableData.push(fr); // 灏嗘柊鏁版嵁娣诲姞鍒拌〃鏍�
+		let data = {
+			id : this.formData.id,
+			itemBarcode : this.formData.itemBarcode,
+			quantity : this.formData.quantity,
+			itemName : this.formData.itemName,
+			itemNo : this.formData.itemNo,
+			taskNo : this.formData.taskNo,
+			itemId :  this.formData.itemId
+		};
+        this.tableData.push(data); // 灏嗘柊鏁版嵁娣诲姞鍒拌〃鏍�
         this.quantity = this.tableData.reduce(function (accumulator, current) {
           return accumulator + current["quantity"];
         }, 0);

--
Gitblit v1.9.3