浏览代码

添加黄码单人单管的核酸检测

lighter 2 年之前
父节点
当前提交
13d6952747
共有 1 个文件被更改,包括 15 次插入35 次删除
  1. 15 35
      src/views/hospital-service/covid-exam/SelectCovidBranch.vue

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

@@ -1,6 +1,15 @@
 <template>
   <window-size>
-    <van-cell title="核酸检测自助开单(单人单管)" is-link @click="handleClickExamOption(1)"></van-cell>
+    <van-cell is-link @click="handleClickExamOption(1)">
+      <template #title>
+        核酸检测(单人单管)(<span style="color: green">绿码</span>)
+      </template>
+    </van-cell>
+    <van-cell is-link @click="handleClickExamOption(3)">
+      <template #title>
+        核酸检测(单人单管)(<span style="color: darkorange">黄码</span>)
+      </template>
+    </van-cell>
     <van-cell v-if="openMultipleExam" title="核酸检测自助开单(混检)" :value="timeLimit.limitValueForDisplay"
               center is-link @click="handleClickExamOption(2)">
       <template #label>
@@ -34,7 +43,7 @@ export default {
 
     const validateMultipleExamTime = (flag) => {
       return new Promise((resolve, reject) => {
-        if (flag === 1) {
+        if (flag !== 2) {
           resolve()
         } else {
           const nowtime = getHourMinute();
@@ -54,48 +63,19 @@ export default {
 
     const handleClickExamOption = (flag) => {
       validateMultipleExamTime(flag).then(() => {
-        confirmSaveCovidExam(flag)
+        savePrescription(patientId, flag).then(() => {
+          router.push(`/unPaidList/${patientId}`)
+        })
       }).catch((message) => {
         console.error(message)
       })
     }
 
-    const confirmSaveCovidExam = (flag) => {
-      const type = flag === 1 ? '(单人单管)?' : '(混检)?'
-      Dialog.confirm({
-        message: '是否确认预定新冠核酸检测' + type,
-        title: '提示',
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-      })
-          .then(() => {
-            // checkCovidAssessment(flag)
-            executeSavePrescription(flag)
-          });
-    }
-
-    const checkCovidAssessment = (flag) => {
-      hasDoneCovidAssessment(patientId).then((res) => {
-        if (res === 'no') {
-          router.push(`/assessments/covid/${patientId}/covidExam_${flag}`)
-        } else {
-          executeSavePrescription(flag)
-        }
-      })
-    }
-
-    const executeSavePrescription = (flag) => {
-      savePrescription(patientId, flag)
-          .then(() => {
-            router.push(`/unPaidList/${patientId}`)
-          })
-    }
-
     const openMultipleExam = ref(true)
     onMounted(() => {
       getMultipleExamTimeLimit().then(res => {
         timeLimit.value = res
-        if (res.limitValueForDisplay === '00:00 - 00:00') {
+        if (res.beginLimit === res.endLimit) {
           openMultipleExam.value = false
         }
       })