Procházet zdrojové kódy

feat:启用开发票入口

yangfeng před 3 roky
rodič
revize
0bdbc1deb0
1 změnil soubory, kde provedl 27 přidání a 27 odebrání
  1. 27 27
      src/views/order/detail.vue

+ 27 - 27
src/views/order/detail.vue

@@ -340,34 +340,34 @@ export default class OrderDetail extends Vue {
   }
 
   checkInvokeIsOverFn () {
-    return this.$dialog.alert({
-      width: 303,
-      title: '温馨提示',
-      message: '因年底集中结算,发票功能暂停使用。给您带来的不便表示抱歉,我们会在恢复发票功能后第一时间通知!',
-      className: 'j-confirm-dialog text-center',
-      showCancelButton: false,
-      confirmButtonText: '我知道了',
-      confirmButtonColor: '#2CB7CA'
-    })
-    // const toast = this.$toast.loading({
-    //   message: '加载中...',
-    //   forbidClick: true,
-    //   duration: 0
-    // })
-    // this.checkInvokeIsOver({ order_code: this.ordercode }).then(res => {
-    //   toast.clear()
-    //   if (res) {
-    //     if (res.status === 1) {
-    //       // 可以开发票
-    //       location.href = this.invokeUrlMap[this.orderInfo.applybillStatus][this.$env.platform].can
-    //     } else {
-    //       // 开票时间过期
-    //       location.href = this.invokeUrlMap[this.orderInfo.applybillStatus][this.$env.platform].cannot
-    //     }
-    //   } else {
-    //     this.$toast(res.error_msg || '查询发票状态失败')
-    //   }
+    // return this.$dialog.alert({
+    //   width: 303,
+    //   title: '温馨提示',
+    //   message: '因年底集中结算,发票功能暂停使用。给您带来的不便表示抱歉,我们会在恢复发票功能后第一时间通知!',
+    //   className: 'j-confirm-dialog text-center',
+    //   showCancelButton: false,
+    //   confirmButtonText: '我知道了',
+    //   confirmButtonColor: '#2CB7CA'
     // })
+    const toast = this.$toast.loading({
+      message: '加载中...',
+      forbidClick: true,
+      duration: 0
+    })
+    this.checkInvokeIsOver({ order_code: this.ordercode }).then(res => {
+      toast.clear()
+      if (res) {
+        if (res.status === 1) {
+          // 可以开发票
+          location.href = this.invokeUrlMap[this.orderInfo.applybillStatus][this.$env.platform].can
+        } else {
+          // 开票时间过期
+          location.href = this.invokeUrlMap[this.orderInfo.applybillStatus][this.$env.platform].cannot
+        }
+      } else {
+        this.$toast(res.error_msg || '查询发票状态失败')
+      }
+    })
   }
 }
 </script>