From 4e2724cb51fe4247d9c28cdf54b45337b057da73 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 19 一月 2026 14:05:05 +0800
Subject: [PATCH] 多级审核添加附件上传和反审核意见提交功能

---
 pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue |  140 ++++++++++++++++++++++++++++++++++
 manifest.json                                     |    4 
 pages/tiaomachaima/tiaomachaima2.vue              |   48 -----------
 3 files changed, 140 insertions(+), 52 deletions(-)

diff --git a/manifest.json b/manifest.json
index 06493c7..744eae3 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
     "name" : "鏅轰簯LMES",
     "appid" : "__UNI__B002F49",
     "description" : "",
-    "versionName" : "2.0.56",
-    "versionCode" : 256,
+    "versionName" : "2.0.57",
+    "versionCode" : 257,
     "transformPx" : false,
     /* 5+App鐗规湁鐩稿叧 */
     "app-plus" : {
diff --git a/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue b/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
index 6dc23a8..456e57f 100644
--- a/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
+++ b/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
@@ -69,7 +69,8 @@
 				<view class="op" v-if="operations == index">
 					<button class="op3" size="mini" plain @tap.stop="audit(item, 0)">瀹℃牳</button>
 					<button class="op3" size="mini" plain @tap.stop="audit(item, 1)">鍙嶅鏍�</button>
-					<button class="op3" size="mini" plain @tap.stop="fileUpload()">鏂囦欢涓婁紶</button>
+					<button class="op3" size="mini" plain @tap.stop="fileUpload(item)">鏂囦欢涓婁紶</button>
+					<button class="op3" size="mini" plain @tap.stop="getImage(item)">棰勮鍥剧墖</button>
 					<!-- <button class="op3" size="mini" plain @tap.stop="Reject(item)">椹冲洖</button> -->
 					<button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
 				</view>
@@ -98,8 +99,17 @@
             return {
                 showDetail: -1,
 				operations : -1,
+				serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
 				//涓婁紶鍙傛暟
-				uploadOptions: {},
+				uploadOptions: {
+					url: CommonUtils.getServerUrl() + "/LMES/UploadFile",
+					formData: {
+					    HBillNo:"",
+					    HRemark: "",
+					    HUserName: getUserInfo()["Czymc"]
+					}
+					
+				},
                 hform: {
                     HSourceBillType:'8505',
 					HSourceBillTypeName: "棣栦欢妫�楠屽崟",
@@ -255,9 +265,13 @@
                     let {count, data, Message} = res.data
                     
                     if(count == 1) {
+						
                         CommonUtils.showTips({
                             message: `瀹℃牳鎴愬姛`
                         })
+						if(mode==1){
+							this.showDialog(item["hmainid"]);
+						}
                         this.$forceUpdate()
                         setTimeout(() => {
                             this.cmdSearch()
@@ -337,7 +351,127 @@
                 })
 
             },
-            
+            //鍙嶅鏍告彁浜ゆ剰瑙�
+			showDialog(HInterID) {
+			  uni.showModal({
+				title: '璇锋彁浜ゅ弽瀹℃牳鎰忚',
+				editable: true,
+				placeholderText: '璇疯緭鍏ュ唴瀹�',
+				success: (result) => {
+				  if (result.confirm) {
+					try {
+					    let res = CommonUtils.doRequest2Sync({
+					        url: '/LMES/AuditFlowOpinion',
+					        data: {
+					            "sWhere": result.content,
+								"billType":this.hform.HSourceBillType,
+								"HInterID":HInterID,
+								"type":1,
+					            "user": getUserInfo()["Czymc"]
+					        },
+					    })
+					    if (!res) {
+					        return
+					    }
+					    let {
+					        data,
+					        count,
+					        Message
+					    } = res.data
+					    if (count > 0) {
+					        uni.showToast({
+					            icon: 'none',
+					            title: Message
+					        })
+					        
+					    } else {
+					        uni.showToast({
+					            icon: 'none',
+					            title: Message
+					        })
+					    }
+					} catch (err) {
+					    console.warn(err);
+					    uni.showToast({
+					        title: '鎺ュ彛璇锋眰澶辫触:' + err,
+					        icon: 'none'
+					    })
+					}
+				  }
+				}
+			  })
+			},
+			// 涓婁紶鏂囦欢
+			fileUpload(item) {
+				this.uploadOptions.formData.HBillNo = item.鍗曟嵁鍙�
+			    this.$refs.XeUpload.upload('image', {});// image, video, file
+			},
+			handleUploadCallback(e) { // 鏂囦欢涓婁紶鍥炶皟
+			    console.log('file: ', e);
+			    if (['choose', 'success'].includes(e.type)) {
+			      // 鏍规嵁鎺ュ彛杩斿洖淇敼瀵瑰簲鐨剅esponse鐩稿叧鐨勯�昏緫
+			      const tmpFiles = (e.data || []).map(({ response, tempFilePath, name, fileType }) => {
+			        
+					if(response.code=="1"){
+						CommonUtils.showTips({
+						    message: "涓婁紶鎴愬姛"
+						})
+					}else{
+						CommonUtils.showTips({
+						    message: "涓婁紶澶辫触"+response.Message
+						})
+					}
+			      });
+			    }
+			},
+			async getImage(item) {//棰勮鍥剧墖
+				try {
+				    let res = await CommonUtils.doRequest2Sync({
+				        url: '/LMES/Filelist',
+				        data: {
+				            "HBillNo": item.鍗曟嵁鍙�,
+				        },
+				    })
+				    if (!res) {
+				        return
+				    }
+				    let {
+				        data,
+				        count,
+				        Message
+				    } = res.data
+				    if (count > 0) {
+						if(data.length>0){
+							const imageUrl = res.data.data[0]["url"];
+							//姝e垯琛ㄨ揪寮忚幏鍙栨湇鍔″櫒璺緞鍊掓暟绗簩涓唴瀹�
+							const regex = /^(.*\/)[^\/]+\/[^\/]*\/?$/;
+							const match = this.serverUrl.match(regex);
+							console.log(match[1],imageUrl)
+							// 鎴栬�呯洿鎺ラ瑙堝浘鐗�
+							uni.previewImage({
+								urls: [match[1]+imageUrl]
+							})
+						}else{
+							CommonUtils.showTips({
+							    message: "鏃犲浘鐗囪鍏堜笂浼犲浘鐗�"
+							})
+						}
+				        
+				        
+				    } else {
+				        uni.showToast({
+				            icon: 'none',
+				            title: Message
+				        })
+				    }
+				} catch (err) {
+				    console.warn(err);
+				    uni.showToast({
+				        title: '鎺ュ彛璇锋眰澶辫触:' + err,
+				        icon: 'none'
+				    })
+				}
+			}
         },
         onShow() {
             this.$nextTick(() => {
diff --git a/pages/tiaomachaima/tiaomachaima2.vue b/pages/tiaomachaima/tiaomachaima2.vue
index 6d6b8ac..5c64f9f 100644
--- a/pages/tiaomachaima/tiaomachaima2.vue
+++ b/pages/tiaomachaima/tiaomachaima2.vue
@@ -257,53 +257,7 @@
 					}
 				)
 			},
-			//绾㈠鎵潯鐮�
-			getCode(HBarCode) {
-				if (!HBarCode) {
-					CommonUtils.playSound(0)
-					this.refreshBarCodeState()
-					uni.showToast({
-						title: '鏉$爜涓嶈兘涓虹┖',
-						icon: 'none'
-					})
-				} else {
-					uni.request({
-						url: this.serverUrl + '/Gy_BarCodeBillList/page',
-						data: {
-							sWhere: ` and 鏉$爜缂栧彿=''${this.barCodeInfoMeta.barCodeNo}''`,
-							user: this.userInfo.HEmpName,
-							page: 1,
-							size: 1
-						},
-						success: (res) => {
-							console.log('鎵爜杩斿洖', res.data.data);
-							if (res.data.count == 1) {
-								CommonUtils.playSound(1)
-								this.barCodeInfo = res.data.data[0]
-								this.barCodeSplitInfo = []
-								// 鎵弿鏉$爜鍚庨噸缃寜閽姸鎬�
-								this.resetButtonState();
-							} else {
-								CommonUtils.playSound(0)
-								this.refreshBarCodeState()
-								uni.showToast({
-									title: res.data.Message,
-									icon: 'none'
-								})
-							}
-						},
-						fail: (res) => {
-							CommonUtils.playSound(0)
-							this.refreshBarCodeState()
-							console.log(res);
-							uni.showToast({
-								title: '鎺ュ彛璇锋眰澶辫触',
-								icon: 'none'
-							})
-						},
-					});
-				}
-			},
+			
 			dialogInputConfirm(val) {
 				this.itemCache["HSplitNum"] = val
 

--
Gitblit v1.9.1