Browse Source

fix:我的结算发票管理查看下载按钮状态文案提示

lazy 6 months ago
parent
commit
c32b322817
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/views/mySettlement/invoicesManagement/index.vue

+ 8 - 0
src/views/mySettlement/invoicesManagement/index.vue

@@ -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')