Pārlūkot izejas kodu

移除核酸检测健康码限制,启用挂号条件校验

lighter 2 gadi atpakaļ
vecāks
revīzija
1ca9c93453

+ 2 - 10
src/api/appointment.js

@@ -47,22 +47,14 @@ export function getDoctorInfo(doctorCode, openId) {
   })
 }
 
-export function hasValidCovidAssessment(patientId, deptCode) {
+export function checkAppointmentRequirements(patientId, deptCode) {
   return request({
-    url: '/appointment/hasValidCovidAssessment',
+    url: '/appointment/checkAppointmentRequirements',
     method: 'get',
     params: { patientId, deptCode },
   })
 }
 
-export function confirmAppointment(data) {
-  return request({
-    url: '/appointment/confirmAppointment',
-    method: 'post',
-    data,
-  })
-}
-
 export function getSourcesByDateAndDoctor(data) {
   return request({
     url: '/appointment/getSourcesByDateAndDoctor',

+ 0 - 23
src/api/order-covid-exam.js

@@ -1,32 +1,9 @@
 import request from '../utils/request'
 
-export function hasDoneCovidAssessment(patientId) {
-  return request({
-    url: '/orderCovid/hasDoneCovidAssessment',
-    method: 'get',
-    params: { patientId },
-  })
-}
-
 export function savePrescription(patientId, type) {
   return request({
     url: '/orderCovid/savePrescription',
     method: 'get',
     params: { patientId, type },
   })
-}
-
-export function getMultipleExamTimeLimit() {
-  return request({
-    url: '/orderCovid/getMultipleExamTimeLimit',
-    method: 'get',
-  })
-}
-
-export function yellowHealthCardFreeCovidExam(patientId) {
-  return request({
-    url: '/orderCovid/yellowHealthCardFreeCovidExam',
-    method: 'get',
-    params: { patientId },
-  })
 }

+ 9 - 7
src/views/hospital-service/appointment/AppointmentConfirm.vue

@@ -61,7 +61,7 @@
 <script>
 import store from '../../../store'
 import { computed, onMounted, ref, watchEffect } from 'vue'
-import { getGhFee } from '../../../api/appointment'
+import {checkAppointmentRequirements, getGhFee} from '../../../api/appointment'
 import router from '../../../router'
 import { Toast } from 'vant'
 export default {
@@ -90,13 +90,15 @@ export default {
       fetchGhFee()
     }
     const confirmAppointment = () => {
-      patientCards.value.forEach((item) => {
-        if (item.patientId === appointment.patientId) {
-          appointment.patientName = item.name
-        }
+      checkAppointmentRequirements(appointment.patientId, appointment.deptCode).then(() => {
+        patientCards.value.forEach((item) => {
+          if (item.patientId === appointment.patientId) {
+            appointment.patientName = item.name
+          }
+        })
+        store.commit('SET_APPOINTMENTINFO', appointment)
+        router.push('/payAppointmentFee')
       })
-      store.commit('SET_APPOINTMENTINFO', appointment)
-      router.push('/payAppointmentFee')
     }
 
     const disableGhBtn = ref(true)

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

@@ -2,12 +2,7 @@
   <window-size>
     <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: red">红码</span>、<span style="color: darkorange">黄码</span>)
+        核酸检测(单人单管)
       </template>
     </van-cell>
     <van-cell title="新型冠状病毒抗原检测" is-link @click="handleClickExamOption(2)"></van-cell>

+ 0 - 106
src/views/isolations/YellowHealthCardFreeCovidExam.vue

@@ -6,125 +6,19 @@
       </div>
       <div class="logo">黄码免费核酸检测</div>
     </div>
-
     <div style="text-align: center; width: 100%; margin-top: 20px; color: red">
       黄码免费核酸检测服务已关闭。
     </div>
-
-<!--    <div v-for="item in cards" :key="item.patientId">-->
-<!--      <van-cell icon="user-o" :label="item.patientId" is-link @click="confirmFreeExam(item)" >-->
-<!--        <template #title>-->
-<!--          <span class="custom-title">{{ item.name }}</span>&nbsp;-->
-<!--          <van-tag type="primary" plain v-if="item.isDefault === 1">默认</van-tag>-->
-<!--        </template>-->
-<!--      </van-cell>-->
-<!--    </div>-->
-<!--    <div style="height: 5px"></div>-->
-<!--    <van-cell-->
-<!--        v-if="showAddCard"-->
-<!--        icon="add"-->
-<!--        title="添加就诊人"-->
-<!--        :label="addCardText"-->
-<!--        is-link-->
-<!--        @click="showCreatedCardMethod = true"-->
-<!--    ></van-cell>-->
-<!--    <van-dialog-->
-<!--        v-model:show="showCreatedCardMethod"-->
-<!--        title="请选择绑定方式"-->
-<!--        :show-confirm-button="false"-->
-<!--        show-cancel-button-->
-<!--    >-->
-<!--      <div style="padding: 20px">-->
-<!--        <van-button type="primary" block to="/bindPatientCard">绑定已有的诊疗卡</van-button>-->
-<!--        <div style="height: 10px"></div>-->
-<!--        <van-button type="primary" plain block to="/createPatientCard">我没有诊疗卡</van-button>-->
-<!--      </div>-->
-<!--    </van-dialog>-->
-<!--    <div v-show="showQrcode" style="position: absolute; top: 60px; left: 0; right: 0; bottom: 0; background: white">-->
-<!--      <div style="width: 100%; text-align: center; margin: 30px 0 20px 0; font-size: 16px; color: #4b4b4b">采样时出示此二维码</div>-->
-<!--      <div id="qrcode" :style="qrMargin"></div>-->
-<!--      <div style="width: 100%; text-align: center; margin-top: 8px; font-size: 20px; color: #4b4b4b">{{currentPtnt.patientId}}</div>-->
-<!--      <div style="margin-top: 30px">-->
-<!--        <van-button block type="primary" plain hairline @click="closeWindow">关闭页面</van-button>-->
-<!--      </div>-->
-<!--    </div>-->
   </window-size>
 </template>
 
 <script>
 import logo from '../../assets/thyylogo.png'
-import store from '../../store'
-import { computed, ref } from 'vue'
-import WindowSize from "../../components/window-size";
-import {Dialog} from "vant";
-import {yellowHealthCardFreeCovidExam} from '../../api/order-covid-exam'
-import {qrcanvas} from 'qrcanvas'
 
 export default {
-  components: {WindowSize},
   setup() {
-    const showQrcode = ref(false)
-    const windowSize = store.state.windowSize
-    const qrMargin = {
-      marginLeft: (windowSize.w - 164) / 2 + 'px',
-    }
-    const cards = computed(() => {
-      return store.state.patientCards
-    })
-    const showAddCard = computed(() => {
-      return cards.value.length < 5
-    })
-    const addCardText = computed(() => {
-      return '还可添加' + (5 - cards.value.length) + '人'
-    })
-    const currentPtnt = ref({})
-    const showCreatedCardMethod = ref(false)
-    const confirmFreeExam = (ptnt) => {
-      Dialog.confirm({
-        message: '【姓名:' + ptnt.name + '】是否确认预定新冠核酸检测?',
-        title: '提示',
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-      }).then(() => {
-        currentPtnt.value = ptnt
-        yellowHealthCardFreeCovidExam(ptnt.patientId).then((res) => {
-          Dialog.alert({
-            title: '提示',
-            message: res,
-          }).then(() => {
-            drawPatientIdQrcode(ptnt.patientId)
-          })
-        }).catch(() => {
-          drawPatientIdQrcode(ptnt.patientId)
-        })
-      });
-    }
-
-    const drawPatientIdQrcode = (patientId) => {
-      const canvas = qrcanvas({
-        data: patientId,
-        size: 164,
-      })
-      document.getElementById('qrcode').appendChild(canvas)
-      showQrcode.value = true
-    }
-
-    const closeWindow = () => {
-      WeixinJSBridge.call('closeWindow');
-    }
-
     return {
       logo,
-      cards,
-      qrMargin,
-      showAddCard,
-      addCardText,
-      showQrcode,
-      currentPtnt,
-      showCreatedCardMethod,
-      closeWindow,
-      confirmFreeExam,
-      drawPatientIdQrcode,
     }
   },
 }