Browse Source

自助核酸检测开放混检

lighter 2 years ago
parent
commit
1854b6c4c7

+ 2 - 2
src/api/order-covid-exam.js

@@ -8,11 +8,11 @@ export function hasDoneCovidAssessment(patientId) {
   })
 }
 
-export function savePrescription(patientId) {
+export function savePrescription(patientId, type) {
   return request({
     url: '/orderCovid/savePrescription',
     method: 'get',
-    params: { patientId },
+    params: { patientId, type },
   })
 }
 

+ 3 - 2
src/views/hospital-service/assessments/Covid19Assessment.vue

@@ -178,8 +178,9 @@ export default {
                 } else {
                   router.push('/payAppointmentFee')
                 }
-              } else {
-                savePrescription(answer.patientId).then(() => {
+              } else if (from.value.startsWith('covidExam_')) {
+                let type = from.value.split('_')[1]
+                savePrescription(answer.patientId, type).then(() => {
                   router.push(`/unPaidList/${answer.patientId}`)
                 })
               }

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

@@ -1,6 +1,7 @@
 <template>
   <window-size>
-    <van-cell title="核酸检测自助开单" is-link @click="showDiaglog"></van-cell>
+    <van-cell title="核酸检测自助开单(单人单管)" is-link @click="showDiaglog(1)"></van-cell>
+    <van-cell title="核酸检测自助开单(混检)" is-link @click="showDiaglog(2)"></van-cell>
     <van-cell title="查询检测结果" is-link :to="'/checkCovidExamResult/' + patientId"></van-cell>
 
     <van-dialog v-model:show="showInputIdCard" title="填写身份证" show-cancel-button @confirm="confirmChangeIdCard">
@@ -34,28 +35,27 @@ export default {
         })
       }
     }
-    const showDiaglog = () => {
+    const showDiaglog = (flag) => {
+      const type = flag === 1 ? '(单人单管)?' : '(混检)?'
       Dialog.confirm({
-        message: '是否确认预定新冠核酸检测',
+        message: '是否确认预定新冠核酸检测' + type,
         title: '提示',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
           .then(() => {
-
-            savePrescription(patientId)
+            savePrescription(patientId, flag)
                 .then(() => {
                   router.push(`/unPaidList/${patientId}`)
                 })
                 .catch(() => {
                   showInputIdCard.value = true
                 })
-
             // hasDoneCovidAssessment(patientId).then((res) => {
             //   if (res === 'no') {
-            //     router.push(`/assessments/covid/${patientId}/covidExam`)
+            //     router.push(`/assessments/covid/${patientId}/covidExam_${flag}`)
             //   } else {
-            //     savePrescription(patientId)
+            //     savePrescription(patientId, flag)
             //       .then(() => {
             //         router.push(`/unPaidList/${patientId}`)
             //       })