Explorar o código

添加自助预约检验检查。

lighter %!s(int64=4) %!d(string=hai) anos
pai
achega
c26f109518

+ 17 - 0
src/api/bookable.js

@@ -0,0 +1,17 @@
+import request from '../utils/request'
+
+export function getBookableData(tableName) {
+  return request({
+    url: '/bookable/getBookableData',
+    method: 'get',
+    params: { tableName },
+  })
+}
+
+export function saveBookPrescription(data) {
+  return request({
+    url: '/bookable/saveBookPrescription',
+    method: 'post',
+    data,
+  })
+}

+ 34 - 0
src/views/hospital-service/health-cart/ChemicalExamination.vue

@@ -0,0 +1,34 @@
+<template>
+  <window-size>
+    <van-field v-model="searchContent" label="检索" placeholder="请输入检验名称" left-icon="search"></van-field>
+    <div v-for="item in cptExamItems" :key="item.code">
+      <van-cell :title="item.name" is-link :label="'执行科室:' + item.execUnitName"></van-cell>
+    </div>
+  </window-size>
+</template>
+
+<script>
+import { computed, onMounted, ref } from 'vue'
+import { getBookableData } from '../../../api/bookable'
+export default {
+  setup() {
+    const tableName = 'jy_zd_item'
+    const searchContent = ref('')
+    const examItems = ref([])
+    const cptExamItems = computed(() => {
+      return examItems.value.filter((item) => {
+        return item.name.indexOf(searchContent.value) !== -1
+      })
+    })
+    onMounted(() => {
+      getBookableData(tableName).then((res) => {
+        examItems.value = res
+      })
+    })
+    return {
+      searchContent,
+      cptExamItems,
+    }
+  },
+}
+</script> 

+ 2 - 2
src/views/hospital-service/health-cart/HealthCartCategory.vue

@@ -1,7 +1,7 @@
 <template>
   <window-size>
-    <van-cell title="体检套餐" is-link :to="'/physicalExaminationPackage/' + patientId"></van-cell>
-    <van-cell title="疫苗" is-link :to="'/vaccine/' + patientId"></van-cell>
+    <van-cell title="检查" is-link :to="'/physicalExaminationPackage/' + patientId"></van-cell>
+    <van-cell title="检验" is-link :to="'/vaccine/' + patientId"></van-cell>
   </window-size>
 </template>
 

+ 45 - 0
src/views/hospital-service/health-cart/PhysicalExamination.vue

@@ -0,0 +1,45 @@
+<template>
+  <window-size>
+    <van-field v-model="searchContent" label="检索" placeholder="请输入检查名称" left-icon="search"></van-field>
+    <div v-for="item in cptExamItems" :key="item.code">
+      <van-cell :title="item.name" is-link :label="'执行科室:' + item.execUnitName" @click="bookExam(item)"></van-cell>
+    </div>
+  </window-size>
+</template>
+
+<script>
+import { computed, onMounted, ref } from 'vue'
+import { getBookableData, saveBookPrescription } from '../../../api/bookable'
+import router from '../../../router'
+import { Toast } from 'vant'
+export default {
+  setup() {
+    const patientId = router.currentRoute.value.params.patientId
+    const tableName = 'jc_zd_item'
+    const searchContent = ref('')
+    const examItems = ref([])
+    const cptExamItems = computed(() => {
+      return examItems.value.filter((item) => {
+        return item.name.indexOf(searchContent.value) !== -1
+      })
+    })
+    const bookExam = (item) => {
+      item.patientId = patientId
+      saveBookPrescription(item).then(() => {
+        Toast.success('自助开单成功。')
+        router.push('/unPaidList/' + patientId)
+      })
+    }
+    onMounted(() => {
+      getBookableData(tableName).then((res) => {
+        examItems.value = res
+      })
+    })
+    return {
+      searchContent,
+      cptExamItems,
+      bookExam,
+    }
+  },
+}
+</script> 

+ 0 - 7
src/views/hospital-service/health-cart/PhysicalExaminationPackage.vue

@@ -1,7 +0,0 @@
-<template>
-  <window-size></window-size>
-</template>
-
-<script>
-export default {}
-</script>

+ 0 - 7
src/views/hospital-service/health-cart/Vaccine.vue

@@ -1,7 +0,0 @@
-<template>
-  <window-size></window-size>
-</template>
-
-<script>
-export default {}
-</script>