|
@@ -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,
|