From 7c803e1ce6c6d9765a99203544bf200ecd52aa2d Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期三, 17 九月 2025 14:04:40 +0800
Subject: [PATCH] 首检巡检入库检修改,增加bom物料plm图纸查看

---
 pages/QC/SJ/Add.vue |   87 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 77 insertions(+), 10 deletions(-)

diff --git a/pages/QC/SJ/Add.vue b/pages/QC/SJ/Add.vue
index a846c6d..7a6fe07 100644
--- a/pages/QC/SJ/Add.vue
+++ b/pages/QC/SJ/Add.vue
@@ -157,10 +157,10 @@
 					</uni-tr>
 					<uni-tr v-for="(item,index) in (drawing || [])" style="height: 100px;">
 						<uni-td align="center">{{item.itemNo}}</uni-td>
-						<uni-td align="center" style="font-size:25px;">
+						<uni-td align="center" >
 							<div >{{item.itemName}}</div>
 						</uni-td>
-						<uni-td align="center" style="font-size:25px;">
+						<uni-td align="center" >
 							<div>{{item.itemModel}}</div>
 						</uni-td>
 						<uni-td align="center" class="click-wd">
@@ -622,10 +622,76 @@
 				this.drawingShow = false
 				this.imageShow = false
 				this.productionShow = false
+					// const item = '83040700101'
+					const item = this.formData.billNo;
+					console.log(this.formData.billNo );
+					console.log('daa001:', item);
+					console.log('ItemNo:', this.formData.itemNo);
+					
+					const url = this.$store.state.serverInfo.serverAPI + "/LLJ/getWomdab";
+					// 鎴栬�呭鏋滆矾寰勪笉鍚岋紝璇蜂娇鐢ㄦ纭殑绔偣
+					// const url = "http://192.168.0.100:10054/api/getWomdab"
+					
+					let _this = this;
+					
+					uni.request({
+					    url: url,
+					    method: 'POST',
+					    header: {
+					        'Content-Type': 'application/json'
+					    },
+					    data: {
+					          daa001: item,  // 鏍规嵁DTO灞炴�у悕浼犻��
+					          ItemNo: this.formData.itemNo   // 娉ㄦ剰澶у皬鍐欏尮閰�
+					    },
+					    success: (response) => {
+					        console.log(response);
+					        console.log("-------------------------------------");
+					        // 鏍规嵁鍚庣杩斿洖鐨勬暟鎹粨鏋勮繘琛岃皟鏁�
+					        if (response.data.status === 1) {
+					            // 鐘舵�佷负1琛ㄧず娌℃湁鏁版嵁
+					            _this.drawing = [];
+					        } else if (response.data.status === 0) {
+					            // 鐘舵�佷负0琛ㄧず鎴愬姛
+					            if (response.data.data && response.data.data.tbBillList) {
+					                _this.drawing = response.data.data.tbBillList;
+					                
+					                // 閬嶅巻鏁版嵁锛屽垽鏂枃浠跺悗缂�骞舵坊鍔犲瓧娈�
+					                _this.drawing.forEach((file) => {
+					                    // 鑾峰彇鏂囦欢鍚嶇殑鍚庣紑
+					                    const fileExtension = file.fName ? file.fName.split('.').pop().toLowerCase() : '';
+					                    
+					                    // 瀹氫箟鏀寔鐨勬枃浠剁被鍨�
+					                    const supportedExtensions = ['jpg', 'pdf', 'xlsx', 'doc', 'docx', 'xls'];
+					                    
+					                    // 鍒ゆ柇鏄惁鏀寔璇ユ枃浠剁被鍨�
+					                    file.isSupported = supportedExtensions.includes(fileExtension);
+					                });
+					            } else {
+					                _this.drawing = [];
+					            }
+					        } else {
+					            // 鍏朵粬鐘舵�佺爜澶勭悊
+					            _this.drawing = [];
+					            uni.showToast({
+					                title: response.data.message || '璇锋眰澶辫触',
+					                icon: 'none'
+					            });
+					        }
+					    },
+					    fail: (error) => {
+					        uni.showToast({
+					            title: '璇锋眰鍥剧焊閾炬帴澶辫触',
+					            icon: 'none'
+					        });
+					        console.error('璇锋眰澶辫触:', error);
+					    }
+					});
 			},
 			itemCancel() {
 				this.itemShow=false
 			},
+			
 			
 			fetchDrawingNumber(itemNo) {
 				// const item = '83040700101'
@@ -748,10 +814,10 @@
 				this.itemShow = true
 			},
 			
-		//鍥剧焊鐩稿叧鏂囨。
-		openDrawings(item) {
-			console.log("jkjoi", item)
-			if (item.fRelevantObject.length > 2) {
+		    //鍥剧焊鐩稿叧鏂囨。
+		    openDrawings(item) {
+			  console.log("jkjoi", item)
+			  if (item.fRelevantObject.length > 2) {
 				// 鐢熸垚璇锋眰URL锛堢畝鍖栫紪鐮侀�昏緫锛�
 				const encodedName = encodeURIComponent(item.fName); 
 				const url = this.$store.state.serverInfo.serverAPI+`/PLM/OpenDrawingsGet?fileId=${item.fRelevantObject}&fName=${encodedName}`;
@@ -849,14 +915,15 @@
 					}
 				});
 			}
-			else
-			{
+		
+			  else
+			  {
 				uni.showToast({
 					title: '璇锋眰棰勮閾炬帴澶辫触',
 					icon: 'none'
 				});
-			}
-		},
+			  }
+		    },
 			
 			getGenUpdate() {
 				if (!this.formData.id || !this.formData.billNo) {

--
Gitblit v1.9.3