From e758ffefbcc4c8c06fe6c8691bf77f8249d09f66 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 23 四月 2026 10:42:02 +0800
Subject: [PATCH] fix: 发货台账内的发货图片不显示

---
 src/views/salesManagement/deliveryLedger/index.vue |   34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/views/salesManagement/deliveryLedger/index.vue b/src/views/salesManagement/deliveryLedger/index.vue
index 0eb60cc..0d0ea70 100644
--- a/src/views/salesManagement/deliveryLedger/index.vue
+++ b/src/views/salesManagement/deliveryLedger/index.vue
@@ -36,6 +36,7 @@
         <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip />
         <el-table-column label="浜у搧鍚嶇О" prop="productName" show-overflow-tooltip />
         <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
+        <el-table-column label="鍘氬害(mm)" prop="thickness" show-overflow-tooltip />
         <el-table-column label="鍙戣揣鏃堕棿" prop="shippingDate" show-overflow-tooltip />
         <el-table-column label="鍙戣揣杞︾墝鍙�" prop="shippingCarNumber" show-overflow-tooltip />
         <el-table-column label="蹇�掑叕鍙�" prop="expressCompany" show-overflow-tooltip />
@@ -192,12 +193,10 @@
 
         <div class="detail-images" v-if="detailImages.length">
           <div class="detail-images-title">鍙戣揣鍥剧墖</div>
-          <el-image
-            v-for="img in detailImages"
-            :key="img.url"
-            :src="img.url"
-            :preview-src-list="detailImages.map(i => i.url)"
-            fit="cover"
+          <ImagePreview
+            :src="detailImages.map(i => i.url).join(',')"
+            width="120px"
+            height="120px"
             class="detail-image"
           />
         </div>
@@ -246,25 +245,28 @@
 
 const normalizeFileUrl = (rawUrl = '') => {
   let fileUrl = rawUrl || '';
-  // Windows 璺緞杞� URL
+
   if (fileUrl && fileUrl.indexOf('\\') > -1) {
-    const uploadsIndex = fileUrl.toLowerCase().indexOf('uploads');
-    if (uploadsIndex > -1) {
-      const relativePath = fileUrl.substring(uploadsIndex).replace(/\\/g, '/');
-      fileUrl = '/' + relativePath;
+    const lowerPath = fileUrl.toLowerCase();
+    const uploadPathIndex = lowerPath.indexOf('uploadpath');
+
+    if (uploadPathIndex > -1) {
+      fileUrl = fileUrl
+        .substring(uploadPathIndex)
+        .replace(/\\/g, '/');
     } else {
-      const parts = fileUrl.split('\\');
-      const fileName = parts[parts.length - 1];
-      fileUrl = '/uploads/' + fileName;
+      fileUrl = fileUrl.replace(/\\/g, '/');
     }
   }
-  if (fileUrl && !fileUrl.startsWith('http')) {
+  fileUrl = fileUrl.replace(/^\/?uploadPath/, '/profile');
+
+  if (!fileUrl.startsWith('http')) {
     if (!fileUrl.startsWith('/')) fileUrl = '/' + fileUrl;
     fileUrl = javaApi + fileUrl;
   }
+
   return fileUrl;
 };
-
 // 涓婁紶閰嶇疆
 const upload = reactive({
   // 涓婁紶鐨勫湴鍧�

--
Gitblit v1.9.3