瀏覽代碼

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

lazy 6 月之前
父節點
當前提交
c32b322817
共有 1 個文件被更改,包括 8 次插入0 次删除
  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')