|
@@ -0,0 +1,150 @@
|
|
|
+<template>
|
|
|
+ <page-layer>
|
|
|
+ <template #header>
|
|
|
+ <el-select v-model="queryParams.wardCode" style="width: 88px" @change="handleWardChange">
|
|
|
+ <el-option v-for="item in userWards" :value="item.value" :label="item.label"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span class="ml12">
|
|
|
+ 执行日期:<el-date-picker v-model="queryParams.executeDate" :clearable="false" style="width: 102px"></el-date-picker>
|
|
|
+ </span>
|
|
|
+ <span class="ml12">床位范围:
|
|
|
+ <el-select v-model="queryParams.bedNoStart" style="width: 70px"
|
|
|
+ value-key="bedNo" @change="handleStartBedChange">
|
|
|
+ <el-option v-for="item in patientBedList" :key="item.bedNo" :value="item">
|
|
|
+ {{item.bedNoLabel}}
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span class="green-text">{{item.patNo}}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span class="blue-text">{{item.patName}}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <span style="margin: 0 4px; font-size: 11px">至</span>
|
|
|
+ <el-select v-model="queryParams.bedNoEnd" style="width: 70px"
|
|
|
+ value-key="bedNo" @change="handleEndBedChange">
|
|
|
+ <el-option v-for="item in patientBedList" :key="item.bedNo" :value="item"
|
|
|
+ :disabled="item.sortNo < queryParams.sortNoStart">
|
|
|
+ {{item.bedNoLabel}}
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span :class="item.sortNo < queryParams.sortNoStart ? 'is-disabled': 'green-text'">{{item.patNo}}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span :class="item.sortNo < queryParams.sortNoStart ? 'is-disabled': 'blue-text'">{{item.patName}}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span class="ml12">
|
|
|
+ 频率:
|
|
|
+ <el-select v-model="queryParams.frequency" style="width: 60px">
|
|
|
+ <el-option value="ALL" label="全部"></el-option>
|
|
|
+ <el-option value="ALWAYS" label="长期"></el-option>
|
|
|
+ <el-option value="ONCE" label="临时"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span class="ml12">
|
|
|
+ 打印范围:
|
|
|
+ <el-select v-model="queryParams.printRange" style="width: 76px">
|
|
|
+ <el-option value="ALL" label="全部"></el-option>
|
|
|
+ <el-option value="UNPRINTED" label="新增"></el-option>
|
|
|
+ <el-option value="PRINTED" label="已打印"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span class="ml12">
|
|
|
+ 类型:
|
|
|
+ <el-select v-model="queryParams.cardType" style="width: 76px">
|
|
|
+ <el-option value="INFUSION_CARD" label="输液卡"></el-option>
|
|
|
+ <el-option value="BOTTLE_CARD" label="瓶贴"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <el-button type="primary" icon="Search" @click="executeQuery">检索</el-button>
|
|
|
+ </template>
|
|
|
+ <template #main>main</template>
|
|
|
+ </page-layer>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import PageLayer from "@/layout/PageLayer.vue";
|
|
|
+import {formatDate, getDate} from "@/utils/date";
|
|
|
+import store from "@/store";
|
|
|
+import {getPatientBeds, queryInfusionCard} from '@/api/inpatient/nurse-module/print-infusion-card'
|
|
|
+
|
|
|
+const userWards = computed(() => {
|
|
|
+ return store.getters['user/wards']
|
|
|
+})
|
|
|
+
|
|
|
+const patientBedList = ref([])
|
|
|
+
|
|
|
+const handleWardChange = (wardCode) => {
|
|
|
+ getPatientBeds(wardCode).then(res => {
|
|
|
+ patientBedList.value = res
|
|
|
+ if (res.length > 0) {
|
|
|
+ queryParams.bedNoStart = res[0].bedNoLabel
|
|
|
+ queryParams.sortNoStart = res[0].sortNo
|
|
|
+ queryParams.bedNoEnd = res[res.length-1].bedNoLabel
|
|
|
+ queryParams.sortNoEnd = res[res.length-1].sortNo
|
|
|
+ } else {
|
|
|
+ queryParams.bedNoStart = null
|
|
|
+ queryParams.sortNoStart = null
|
|
|
+ queryParams.bedNoEnd = null
|
|
|
+ queryParams.sortNoEnd = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const queryParams = reactive({
|
|
|
+ executeDate: getDate(),
|
|
|
+ wardCode: '8000006',
|
|
|
+ bedNoStart: null,
|
|
|
+ bedNoEnd: null,
|
|
|
+ sortNoStart: null,
|
|
|
+ sortNoEnd: null,
|
|
|
+ frequency: 'ALWAYS',
|
|
|
+ printRange: 'UNPRINTED',
|
|
|
+ cardType: 'INFUSION_CARD',
|
|
|
+ bedNos: []
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+const handleStartBedChange = (bed) => {
|
|
|
+ queryParams.bedNoStart = bed.bedNoLabel
|
|
|
+ queryParams.sortNoStart = bed.sortNo
|
|
|
+}
|
|
|
+
|
|
|
+const handleEndBedChange = (bed) => {
|
|
|
+ queryParams.bedNoEnd = bed.bedNoLabel
|
|
|
+ queryParams.sortNoEnd = bed.sortNo
|
|
|
+}
|
|
|
+
|
|
|
+const executeQuery = () => {
|
|
|
+ queryParams.executeDate = formatDate(queryParams.executeDate)
|
|
|
+ queryParams.bedNos = []
|
|
|
+ patientBedList.value.forEach(bed => {
|
|
|
+ if (bed.sortNo >= queryParams.sortNoStart && bed.sortNo <= queryParams.sortNoEnd) {
|
|
|
+ queryParams.bedNos.push(bed.bedNo)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ queryInfusionCard(queryParams).then(res => {})
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ if (!queryParams.wardCode) {
|
|
|
+ queryParams.wardCode = userWards.value[0].value
|
|
|
+ }
|
|
|
+ handleWardChange(queryParams.wardCode)
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.ml12 {
|
|
|
+ margin-left: 12px;
|
|
|
+}
|
|
|
+.green-text {
|
|
|
+ color: green;
|
|
|
+}
|
|
|
+.blue-text {
|
|
|
+ color: #1146f3
|
|
|
+}
|
|
|
+.is-disabled {
|
|
|
+ color: #a8abb2;
|
|
|
+}
|
|
|
+</style>
|