From 21cde7c13103d32a2b87982b8a5ee0106bb90d04 Mon Sep 17 00:00:00 2001 From: wkc <978997012@qq.com> Date: Tue, 9 Jun 2026 09:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/loanPricing/workflow/detail.vue | 167 ++++++++++++++++-- 1 file changed, 151 insertions(+), 16 deletions(-) diff --git a/ruoyi-ui/src/views/loanPricing/workflow/detail.vue b/ruoyi-ui/src/views/loanPricing/workflow/detail.vue index 5d7bf02..40e2479 100644 --- a/ruoyi-ui/src/views/loanPricing/workflow/detail.vue +++ b/ruoyi-ui/src/views/loanPricing/workflow/detail.vue @@ -3,25 +3,39 @@ - - +
+ + - + +
@@ -72,6 +86,37 @@ export default { /** 返回上一页 */ goBack() { this.$router.go(-1) + }, + /** 打印流程详情 */ + handlePrint() { + this.$nextTick(() => { + const originalTitle = document.title + document.title = this.buildPrintFileName() + window.print() + document.title = originalTitle + }) + }, + /** 生成打印文件名 */ + buildPrintFileName() { + const custName = this.sanitizePrintFileName(this.workflowDetail?.custName || '流程详情') + return `${custName}_${this.formatPrintTimestamp(new Date())}` + }, + /** 格式化打印时间戳 */ + formatPrintTimestamp(date) { + const pad = value => String(value).padStart(2, '0') + return [ + date.getFullYear(), + pad(date.getMonth() + 1), + pad(date.getDate()) + ].join('') + [ + pad(date.getHours()), + pad(date.getMinutes()), + pad(date.getSeconds()) + ].join('') + }, + /** 清理文件名中的非法字符 */ + sanitizePrintFileName(value) { + return String(value).replace(/[\\/:*?"<>|]/g, '').trim() || '流程详情' } } } @@ -92,6 +137,96 @@ export default { font-weight: 500; color: #303133; } + + .page-actions { + display: flex; + align-items: center; + gap: 8px; + } + } +} + + +