Преглед на файлове

fix(KIP-9787): [DE][C端]临时停车,用户在开票以后,进入开票详情,点击再次开票,会报错

john преди 2 години
родител
ревизия
95a3fab6e9

+ 2 - 2
src/pages/parkingFee/components/officeBlue/parkingReceipt/parkingInvoiceImage.vue

@@ -3,7 +3,7 @@
     <div class="part">
       <div class="part-item lines">
         <span class="part-item-key">电子邮箱</span>
-        <span class="part-item-value">{{ order.mailbox }}</span>
+        <span class="part-item-value">{{ res.email }}</span>
       </div>
       <div class="invoice-img" v-if="order.invoiceUrl">
       </div>
@@ -16,7 +16,7 @@
           'blue-push-again-btn': custTypeId === 1,
           'green-push-again-btn': custTypeId === 2,
         }"
-        @click="pushAgain(order.invoiceUrl)"
+        @click="pushAgain"
       >
         再次推送
       </div>

+ 8 - 67
src/pages/parkingFee/mixins/parkingReceipt/parkingInvoiceImage.js

@@ -20,9 +20,6 @@ export default {
   },
   created() {
     this.order = JSON.parse(this.$route.query.order);
-    // this.order = {
-    //   mailbox: '1212'
-    // }
     this.getEmail()
   },
   mounted() {
@@ -55,77 +52,21 @@ export default {
         });
       }
     },
-    pushAgain: async function (id) {
-      const self = this;
-      // if (self.setTime >= 0 && self.timer) {
-      //   uni.showToast({
-      //     title: '邮件已发送,请于1分钟后再试',
-      //     icon: 'none',
-      //   });
-      //   return false;
-      // }
-      // if (self.timer && self.setTime < 0) {
-      //   clearTimeout(self.timer);
-      //   self.timer = null;
-      // }
-      // self.timer = setTimeout(() => {
-      //   self.setTime--;
-      // }, 1000);
-      // const data = {
-      //   attachments: [
-      //     {
-      //       name: '嘉里停车发票.pdf',
-      //       invoiceId: self.order.id,
-      //       url: url,
-      //     },
-      //   ],
-      //   html: true,
-      //   sendTo: 'string',
-      //   sendTos: [self.order.mailbox],
-      //   subject: self.order.invoiceTitleName + '的电子发票',
-      //   text: '停车发票',
-      // };
-      // self.$md(data);
+    pushAgain: async function () {
+      const id = this.order.id
       try {
-        const res = await invoicesAgainSandEmail(id)
-          uni.showToast({
-            title: '邮件已发送邮箱,请注意查收',
-            icon: 'none',
-            duration: 2000
-          });
+        await invoicesAgainSandEmail(id)
+        uni.showToast({
+          title: '邮件已发送邮箱,请注意查收',
+          icon: 'none',
+          duration: 2000
+        });
       } catch {
         uni.showToast({
           title: '服务器开小差了呢,请您稍后再试',
           icon: 'none',
         });
       }
-      // uni.request({
-      //   url: self.$baseURL + 'sms/email',
-      //   method: 'POST',
-      //   data: data,
-      //   header: JSON.parse(uni.getStorageSync('handleUser')),
-      //   success: (res) => {
-      //     console.log('推送', res.data);
-      //     if (res.data.code === 0) {
-      //       uni.showToast({
-      //         title: '邮件已发送邮箱,请注意查收',
-      //         icon: 'none',
-      //       });
-      //     } else {
-      //       uni.showToast({
-      //         title: res.data.msg,
-      //         duration: 2000,
-      //         icon: 'none',
-      //       });
-      //     }
-      //   },
-      //   fail: () => {
-      //     uni.showToast({
-      //       title: '服务器开小差了呢,请您稍后再试',
-      //       icon: 'none',
-      //     });
-      //   },
-      // });
     },
   },
 };