feat:库存列表导出文件名增加灵枢或众妙

This commit is contained in:
2026-07-21 14:49:51 +08:00
parent 3ce7eaf284
commit c2411d623b
3 changed files with 22 additions and 12 deletions

View File

@@ -241,17 +241,24 @@ export default {
'content': content 'content': content
}) })
}).then(res => { }).then(res => {
this.$message({ if (data && data.code === 0) {
message: '成功', this.$message({
type: 'success' 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.loading = false
this.dataForm.voices = res.data.voices this.$message.error('请求失败')
var voices = { name: '音频文件', url: res.data.voices }
var attr = []
attr.push(voices)
this.fileListVoices = attr
console.log(res)
}) })
}, },
// 富文本内容赋值 // 富文本内容赋值

View File

@@ -199,7 +199,9 @@ export default {
}) })
const link = document.createElement('a') const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob) 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() link.click()
window.URL.revokeObjectURL(link.href) window.URL.revokeObjectURL(link.href)
this.$message.success('导出成功') this.$message.success('导出成功')

View File

@@ -208,7 +208,8 @@ export default {
}) })
const link = document.createElement('a') const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob) link.href = window.URL.createObjectURL(blob)
link.download = '库存统计.xlsx' const merchantPrefix = this.merchantId === '2' ? '众妙' : '灵枢'
link.download = `${merchantPrefix}库存统计.xlsx`
link.click() link.click()
window.URL.revokeObjectURL(link.href) window.URL.revokeObjectURL(link.href)
this.$message.success('导出成功') this.$message.success('导出成功')