From c16edc131625d4d7dd3624cc1485695bfb89707d Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 26 十月 2026 17:43:23 +0800
Subject: [PATCH] refactor(download): 统一附件下载逻辑到 download 插件
---
src/views/business/productOrder/index.vue | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index b38642a..49965e2 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -472,6 +472,7 @@
verifyDialogVisible: false,
quashDialogVisible: false,
filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规
+ attachmentOrderId: null,
tableDataFile: [],
tableLoadingFile: false,
columnFile: [
@@ -844,12 +845,15 @@
},
// 闄勪欢鏌ョ湅
handleFileLook(row) {
+ this.attachmentOrderId = row.id
+ this.pageFile.current = 1
+ this.tableDataFile = []
this.filesDialogVisible = true
- this.getFileList(row)
+ this.getFileList()
},
- getFileList(row) {
+ getFileList() {
this.tableLoadingFile = true
- getFileList({ insOrderId: row.id }).then(res => {
+ getFileList({ insOrderId: this.attachmentOrderId, current: this.pageFile.current, size: this.pageFile.size }).then(res => {
this.tableLoadingFile = false
if (res.code === 200) {
this.tableDataFile = res.data.records
@@ -860,6 +864,7 @@
})
},
paginationFile(page) {
+ this.pageFile.current = page.page
this.pageFile.size = page.limit
this.getFileList()
},
@@ -868,7 +873,7 @@
downFile({
id: row.id,
}).then(res => {
- this.$download.saveAs(res.data.fileUrl, row.fileName);
+ return this.$download.attachment(res.data, row.fileName);
}).catch(error => {
})
--
Gitblit v1.9.3