|
|
@@ -235,6 +235,8 @@
|
|
|
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
+
|
|
|
+ <el-button text type="primary" @click="handleDownloadAllInvoice(scope.row)">下载所有格式发票</el-button>
|
|
|
<el-button
|
|
|
v-if="hasPermission('cw_finance:invoice:add') && scope.row.status === '5' && scope.row.account > 0"
|
|
|
text type="primary" @click="handleRedInvoice(scope.row)">红冲</el-button>
|
|
|
@@ -1136,6 +1138,25 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ handleDownloadAllInvoice(row) {
|
|
|
+ this.$confirm(`确定下载当前全部发票文件吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.loading = true
|
|
|
+ financeInvoiceService.downLoadOMSInvoiceAttachzip(row.omsAttachmentUrl).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadZip(res, '发票文件')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|