From c2411d623b05cd8411c1b176e374ef44dc5449d6 Mon Sep 17 00:00:00 2001 From: chenghuan Date: Tue, 21 Jul 2026 14:49:51 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=BA=93=E5=AD=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E5=87=BA=E6=96=87=E4=BB=B6=E5=90=8D=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=81=B5=E6=9E=A2=E6=88=96=E4=BC=97=E5=A6=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../book/bookchaptercontent-add-or-update.vue | 27 ++++++++++++------- .../components/stockRecordList.vue | 4 ++- .../inventoryManagement/inventoryManage.vue | 3 ++- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/views/modules/book/bookchaptercontent-add-or-update.vue b/src/views/modules/book/bookchaptercontent-add-or-update.vue index 93b66fd..61cff0f 100644 --- a/src/views/modules/book/bookchaptercontent-add-or-update.vue +++ b/src/views/modules/book/bookchaptercontent-add-or-update.vue @@ -241,17 +241,24 @@ export default { 'content': content }) }).then(res => { - this.$message({ - message: '成功', - type: 'success' - }) + if (data && data.code === 0) { + this.$message({ + message: '成功', + type: 'success' + }) + this.loading = false + this.dataForm.voices = res.data.voices + var voices = { name: '音频文件', url: res.data.voices } + var attr = [] + attr.push(voices) + this.fileListVoices = attr + console.log(res) + } else { + this.$message.error(res.msg) + } + }).catch(() => { this.loading = false - this.dataForm.voices = res.data.voices - var voices = { name: '音频文件', url: res.data.voices } - var attr = [] - attr.push(voices) - this.fileListVoices = attr - console.log(res) + this.$message.error('请求失败') }) }, // 富文本内容赋值 diff --git a/src/views/modules/inventoryManagement/components/stockRecordList.vue b/src/views/modules/inventoryManagement/components/stockRecordList.vue index 055fc21..bd362a5 100644 --- a/src/views/modules/inventoryManagement/components/stockRecordList.vue +++ b/src/views/modules/inventoryManagement/components/stockRecordList.vue @@ -199,7 +199,9 @@ export default { }) const link = document.createElement('a') link.href = window.URL.createObjectURL(blob) - link.download = this.bizType === 1 ? '入库记录.xlsx' : '出库记录.xlsx' + const merchantPrefix = this.merchantId === '2' ? '众妙' : '灵枢' + const recordName = this.bizType === 1 ? '入库记录' : '出库记录' + link.download = `${merchantPrefix}${recordName}.xlsx` link.click() window.URL.revokeObjectURL(link.href) this.$message.success('导出成功') diff --git a/src/views/modules/inventoryManagement/inventoryManage.vue b/src/views/modules/inventoryManagement/inventoryManage.vue index 34d7d84..66984b8 100644 --- a/src/views/modules/inventoryManagement/inventoryManage.vue +++ b/src/views/modules/inventoryManagement/inventoryManage.vue @@ -208,7 +208,8 @@ export default { }) const link = document.createElement('a') link.href = window.URL.createObjectURL(blob) - link.download = '库存统计.xlsx' + const merchantPrefix = this.merchantId === '2' ? '众妙' : '灵枢' + link.download = `${merchantPrefix}库存统计.xlsx` link.click() window.URL.revokeObjectURL(link.href) this.$message.success('导出成功')