Browse Source

核酸检测取消流调

lighter 2 years ago
parent
commit
21ee293086
1 changed files with 25 additions and 14 deletions
  1. 25 14
      src/views/hospital-service/covid-exam/SelectCovidBranch.vue

+ 25 - 14
src/views/hospital-service/covid-exam/SelectCovidBranch.vue

@@ -13,11 +13,12 @@
 </template>
 
 <script>
-import { Dialog, Toast } from 'vant'
-import { useRouter } from 'vue-router'
-import { hasDoneCovidAssessment, savePrescription, updateIdCard } from '../../../api/order-covid-exam'
-import { ref } from 'vue'
-import { isValidIdcard } from '../../../utils/validate'
+import {Dialog, Toast} from 'vant'
+import {useRouter} from 'vue-router'
+import {hasDoneCovidAssessment, savePrescription, updateIdCard} from '../../../api/order-covid-exam'
+import {ref} from 'vue'
+import {isValidIdcard} from '../../../utils/validate'
+
 export default {
   setup() {
     const router = useRouter()
@@ -40,22 +41,32 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          hasDoneCovidAssessment(patientId).then((res) => {
-            if (res === 'no') {
-              router.push(`/assessments/covid/${patientId}/covidExam`)
-            } else {
-              savePrescription(patientId)
+          .then(() => {
+
+            savePrescription(patientId)
                 .then(() => {
                   router.push(`/unPaidList/${patientId}`)
                 })
                 .catch(() => {
                   showInputIdCard.value = true
                 })
-            }
+
+            // hasDoneCovidAssessment(patientId).then((res) => {
+            //   if (res === 'no') {
+            //     router.push(`/assessments/covid/${patientId}/covidExam`)
+            //   } else {
+            //     savePrescription(patientId)
+            //       .then(() => {
+            //         router.push(`/unPaidList/${patientId}`)
+            //       })
+            //       .catch(() => {
+            //         showInputIdCard.value = true
+            //       })
+            //   }
+            // })
+          })
+          .catch(() => {
           })
-        })
-        .catch(() => {})
     }
     return {
       patientId,