hurx 1 day ago
parent
commit
a87868c654
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/views/bill/statementInvoice/addInvoiceDialog.vue

+ 6 - 0
src/views/bill/statementInvoice/addInvoiceDialog.vue

@@ -174,6 +174,12 @@ const beforeUpload = (file: any) => {
 
 function handleUploadSuccess(response: any, file: any, fileListParam: any[]) {
   if (response.code === 200) {
+    // 为每个上传成功的文件设置 url 属性
+    fileListParam.forEach((f: any) => {
+      if (f.response?.code === 200 && f.response?.data?.url) {
+        f.url = f.response.data.url;
+      }
+    });
     // 更新 fileList
     fileList.value = fileListParam;
     // 收集所有已上传成功的文件URL