From 2565d78042b7cc5ac500c4bac5edefdb7a046af5 Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期三, 17 九月 2025 14:04:52 +0800 Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~cnf/HM_StandardPda-Browse --- 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 4d7c0b9..4659047 100644 --- a/pages/QC/SJ/Add.vue +++ b/pages/QC/SJ/Add.vue @@ -138,10 +138,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"> @@ -633,10 +633,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' @@ -759,10 +825,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}`; @@ -860,14 +926,15 @@ } }); } - else - { + + else + { uni.showToast({ title: '璇锋眰棰勮閾炬帴澶辫触', icon: 'none' }); - } - }, + } + }, getGenUpdate() { if (!this.formData.id || !this.formData.billNo) { -- Gitblit v1.9.3