|
@@ -93,6 +93,10 @@ export default {
|
|
|
},
|
|
|
handlerOperate(type, row) {
|
|
|
if (type === 'seeInvoice') {
|
|
|
+ if (row && row.status && row.status.name !== '已开票') {
|
|
|
+ this.$message.warning('只有已开票状态的发票才能查看发票')
|
|
|
+ return
|
|
|
+ }
|
|
|
// 查看发票
|
|
|
saleInvoicePreview({ id: row.id }).then((res) => {
|
|
|
const curFile = res.data[0]
|
|
@@ -101,6 +105,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else if (type === 'downloadInvoice') {
|
|
|
+ if (row && row.status && row.status.name !== '已开票') {
|
|
|
+ this.$message.warning('只有已开票状态的发票才能下载发票')
|
|
|
+ return
|
|
|
+ }
|
|
|
// 下载发票
|
|
|
saleInvoiceDownload({ id: row.id }).then((res) => {
|
|
|
console.log('saleInvoiceDownload')
|