祁鹏飞 3 місяців тому
батько
коміт
cb53c33fda
1 змінених файлів з 8 додано та 9 видалено
  1. 8 9
      src/views/receivable/handingFee/ticket.vue

+ 8 - 9
src/views/receivable/handingFee/ticket.vue

@@ -385,21 +385,20 @@ const handleTicket = (bool) => {
     companyId: route.query.id,
     invoiceType: route.query.invoiceType
   }
-  api.financeApi.invoicingCheck(params).then((res: any) => {
+  api.financeApi.invoicingCheck(params).then(async (res: any) => {
     if (res.code == 200) {
+      await calBeforeInvoice(params)
       openCountForm()
-      calBeforeInvoice(params)
     }
   })
 }
 
-const calBeforeInvoice = (params: any) => {
-  api.financeApi.calBeforeInvoice(params).then((res: any) => {
-    if (sub.code == 200) {
-      countForm.value.invoiceTime = res.data.invoiceTime
-      countForm.value.receivableSupervisePremium = res.data.receivableSupervisePremium
-    }
-  })
+const calBeforeInvoice = async (params: any) => {
+  const res = await api.financeApi.calBeforeInvoice(params)
+  if (res.code == 200) {
+    countForm.value.invoiceTime = res.data.invoiceTime
+    countForm.value.receivableSupervisePremium = res.data.receivableSupervisePremium
+  }
 }
 
 const openCountForm = () => {