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