| | |
| | | <!-- 常规检查 医生界面--> |
| | | <template> |
| | | <el-form |
| | | ref="formRef" |
| | | :model="formData" |
| | | :rules="formRules" |
| | | label-width="100px" |
| | | v-loading="formLoading" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="患者编号" prop="patId"> |
| | | <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getRentInfoByPatId" /> |
| | | <!-- <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 />--> |
| | | <Barcode v-if="displayBarCode" :value="displayBarCode" :width=100 /> |
| | | <el-button @click="copyBarcode()">复制</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="患者名称" prop="patName"> |
| | | <el-input v-model="formData.patName" placeholder="请输入患者名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="患者描述" prop="patDetails"> |
| | | <dict-tag v-if="formData.patSrc" :type="DICT_TYPE.ECG_PAT_SOURCE" :value="formData.patSrc" /> |
| | | {{formData.patDetails?.deptDesc}} {{formData.patDetails?.wardDesc}} {{formData.patDetails?.bedNo}} |
| | | </el-form-item> |
| | | <el-form-item label="检查时间" prop="rentTime"> |
| | | <el-date-picker |
| | | v-model="formData.rentTime" |
| | | type="date" |
| | | value-format="x" |
| | | placeholder="选择装机时间" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检查项目" prop=""> |
| | | {{formData.checkType && checkTypeStore.getCheckTypeName(formData.checkType)}} |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">检查完成</el-button> |
| | | <el-button @click="cancelInstall" :disabled="formLoading">放弃检查</el-button> |
| | | <el-button @click="resetForm()">重 置</el-button> |
| | | <el-button v-if="formData.checkType && checkTypeStore.getExpenseRecognition(formData.checkType)" @click="feeConfirm" :disabled="formLoading">确费</el-button> |
| | | <el-button v-if="formData.checkType && checkTypeStore.getExpenseRecognition(formData.checkType)" @click="feeCancel" :disabled="formLoading">取消确费</el-button> |
| | | <el-form |
| | | ref="formRef" |
| | | :model="formData" |
| | | :rules="formRules" |
| | | label-width="100px" |
| | | v-loading="formLoading" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="患者编号" prop="patId"> |
| | | <el-input |
| | | v-model="formData.patId" |
| | | placeholder="请输入患者编号" |
| | | @input="getRentInfoByPatId" |
| | | /> |
| | | <!-- <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 />--> |
| | | <Barcode v-if="displayBarCode" :value="displayBarCode" :width="100" /> |
| | | <el-button @click="copyBarcode()">复制</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="患者名称" prop="patName"> |
| | | <el-input v-model="formData.patName" placeholder="请输入患者名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="患者描述" prop="patDetails"> |
| | | <dict-tag |
| | | v-if="formData.patDetails?.source" |
| | | :type="DICT_TYPE.ECG_PAT_SOURCE" |
| | | :value="formData.patDetails?.source" |
| | | /> |
| | | {{ formData?.patDetails?.deptDesc }} {{ formData?.patDetails?.wardDesc }} |
| | | {{ formData?.patDetails?.bedNo }} |
| | | </el-form-item> |
| | | <el-form-item label="检查时间" prop="rentTime"> |
| | | <el-date-picker |
| | | v-model="formData.rentTime" |
| | | type="date" |
| | | value-format="x" |
| | | placeholder="选择装机时间" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检查项目" prop=""> |
| | | {{ formData?.checkType && getCheckTypeName(formData?.checkType) }} |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | <el-form-item label="是否多耐" prop="tolerance"> |
| | | <el-radio-group v-model="formData.tolerance" readonly> |
| | | <el-radio |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.ecg_tolerance)" |
| | | :key="dict.value" |
| | | :value="dict.value" |
| | | > |
| | | {{ dict.label }} |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">检查完成</el-button> |
| | | <el-button @click="cancelInstall" :disabled="formLoading">放弃检查</el-button> |
| | | <el-button @click="resetForm()">重 置</el-button> |
| | | <el-button |
| | | v-if="needAutoFeeConfirm(formData.checkType)" |
| | | @click="feeConfirm" |
| | | :disabled="formLoading" |
| | | >确费</el-button |
| | | > |
| | | <el-button |
| | | v-if="needAutoFeeConfirm(formData.checkType)" |
| | | @click="feeCancel" |
| | | :disabled="formLoading" |
| | | >取消确费</el-button |
| | | > |
| | | |
| | | <!-- 医生装机列表 --> |
| | | <ContentWrap> |
| | | <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="onRowClick" > |
| | | <!-- <el-table-column label="id" align="center" prop="id" />--> |
| | | <el-table-column label="检查状态" align="center" prop="lost" > |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="list" |
| | | :stripe="true" |
| | | :show-overflow-tooltip="true" |
| | | @row-click="onRowClick" |
| | | > |
| | | <!-- <el-table-column label="id" align="center" prop="id" />--> |
| | | <el-table-column label="检查状态" align="center" prop="lost"> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.jobType === 60">已检查</span> |
| | | <span v-if="scope.row.jobType === 50">已放弃</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="作业类型" align="center" prop="jobType" />--> |
| | | <!-- <el-table-column label="医生编号" align="center" prop="docId" />--> |
| | | <!-- <el-table-column label="作业类型" align="center" prop="jobType" />--> |
| | | <!-- <el-table-column label="医生编号" align="center" prop="docId" />--> |
| | | <el-table-column label="医生名称" align="center" prop="docName" /> |
| | | <!-- <el-table-column label="设备编号" align="center" prop="devId" />--> |
| | | <!-- <el-table-column label="设备编号" align="center" prop="devId" />--> |
| | | <el-table-column label="患者编号" align="center" prop="patId" /> |
| | | <el-table-column label="患者名称" align="center" prop="patName" /> |
| | | <el-table-column |
| | | label="作业时间" |
| | | align="center" |
| | | prop="jobTime" |
| | | :formatter="dateFormatter" |
| | | width="180px" |
| | | label="作业时间" |
| | | align="center" |
| | | prop="jobTime" |
| | | :formatter="dateFormatter" |
| | | width="180px" |
| | | /> |
| | | <!-- <el-table-column label="作业概要" align="center" prop="summary" />--> |
| | | <!-- <el-table-column label="作业概要" align="center" prop="summary" />--> |
| | | <el-table-column label="备注" align="center" prop="remark" /> |
| | | <el-table-column |
| | | label="创建时间" |
| | | align="center" |
| | | prop="createTime" |
| | | :formatter="dateFormatter" |
| | | width="180px" |
| | | label="创建时间" |
| | | align="center" |
| | | prop="createTime" |
| | | :formatter="dateFormatter" |
| | | width="180px" |
| | | /> |
| | | <!-- |
| | | <el-table-column label="操作" align="center" min-width="120px"> |
| | | <template #default="scope"> |
| | | <el-button |
| | |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | --> |
| | | </el-table> |
| | | <!-- 分页 --> |
| | | <Pagination |
| | | :total="total" |
| | | v-model:page="queryParams.pageNo" |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | :total="total" |
| | | v-model:page="queryParams.pageNo" |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </ContentWrap> |
| | | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' |
| | | |
| | | import { DevRentApi, DevRentVO } from '@/api/ecg/devrent' |
| | | import {dateFormatter} from "@/utils/formatTime"; |
| | | import {JobRecordApi, JobRecordVO} from "@/api/ecg/jobrecord"; |
| | | import {isStringEmpty} from "@/utils/stringUtil"; |
| | | import {curDayEnd, curDayStart} from "@/utils/dateUtil"; |
| | | import {QueueVO} from "@/api/ecg/queue"; |
| | | import {RoomBedVO} from "@/api/ecg/doctor"; |
| | | import {Barcode} from "@/components/Barcode"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | import {DICT_TYPE} from "@/utils/dict"; |
| | | import { dateFormatter } from '@/utils/formatTime' |
| | | import { JobRecordApi, JobRecordVO } from '@/api/ecg/jobrecord' |
| | | import { isStringEmpty } from '@/utils/stringUtil' |
| | | import { curDayEnd, curDayStart } from '@/utils/dateUtil' |
| | | import { QueueVO } from '@/api/ecg/queue' |
| | | import { RoomBedVO } from '@/api/ecg/doctor' |
| | | import { Barcode } from '@/components/Barcode' |
| | | import { useCheckTypeStore } from '@/store/modules/checkType' |
| | | import { getCheckTypeName, needAutoFeeConfirm } from '../../../../utils/checkTypeFormatter' |
| | | |
| | | /** 设备装机 表单 */ |
| | | defineComponent({ name: 'RoutinePanel' }) |
| | | |
| | | const props = defineProps({ |
| | | const props = defineProps({ |
| | | room: { |
| | | type: Object as PropType<RoomBedVO>, |
| | | required: true |
| | |
| | | formData.value.patId = queueVO?.patId |
| | | formData.value.patName = queueVO?.patName |
| | | formData.value.checkType = queueVO?.bookCheckType |
| | | formData.value.patSrc = queueVO?.patDetails.source |
| | | getFreeRentInfo(formData.value) |
| | | copyBarcode() |
| | | } |
| | |
| | | |
| | | const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
| | | |
| | | const formData = ref({ |
| | | const formData = ref<Partial<DevRentVO>>({ |
| | | id: undefined, |
| | | devId: undefined, |
| | | patId: undefined, |
| | |
| | | checkType: undefined, |
| | | rentTime: new Date().getTime(), |
| | | returnTime: undefined, |
| | | interference: undefined, |
| | | baseline: undefined, |
| | | detachment: undefined, |
| | | remark: undefined, |
| | | paid: undefined, |
| | | roomId: props.room.roomId, |
| | | bedNo: props.room.bedNo |
| | | paid: undefined |
| | | }) |
| | | |
| | | const formRules = reactive({ |
| | | // devId: [{ required: true, message: '设备编号不能为空', trigger: 'blur' }], |
| | | rentTime: [{ required: true, message: '请选择装机日期', trigger: 'blur' }], |
| | | rentTime: [{ required: true, message: '请选择装机日期', trigger: 'blur' }] |
| | | }) |
| | | const formRef = ref() // 表单 Ref |
| | | |
| | | const displayBarCode = ref<string> () |
| | | const displayBarCode = ref<string>() |
| | | |
| | | /** 提交表单 */ |
| | | const submitForm = async () => { |
| | |
| | | formData.value.bedNo = props.room.bedNo |
| | | const data = formData.value as unknown as DevRentVO |
| | | await DevRentApi.routineFinish(data) |
| | | |
| | | // 自动确费 |
| | | if (needAutoFeeConfirm(formData.value.checkType)) { |
| | | feeConfirm() |
| | | } |
| | | |
| | | message.success(t('操作成功')) |
| | | dialogVisible.value = false |
| | | // 发送操作成功的事件 |
| | | emit('event_routine') |
| | | resetForm() |
| | | getList() // 医生作业历史 |
| | | getList() // 医生作业历史 |
| | | } finally { |
| | | formLoading.value = false |
| | | } |
| | |
| | | } |
| | | |
| | | const getRentInfoByPatId = () => { |
| | | const tempPatId = formData.value.patId; |
| | | const tempPatId = formData.value.patId |
| | | resetForm() |
| | | if (isStringEmpty(tempPatId)) |
| | | return |
| | | if (isStringEmpty(tempPatId)) return |
| | | |
| | | formData.value.patId = tempPatId; |
| | | formData.value.patId = tempPatId |
| | | getFreeRentInfo(formData.value) |
| | | copyBarcode() |
| | | } |
| | | |
| | | const getFreeRentInfo = async (devRentVO) => { |
| | | const data = await DevRentApi.getFreeRent(devRentVO) |
| | | if (null === data) |
| | | if ( |
| | | (devRentVO.devId == null || devRentVO.devId === '') && |
| | | (devRentVO.patId == null || devRentVO.patId === '') |
| | | ) |
| | | return |
| | | |
| | | const data = await DevRentApi.getFreeRent(devRentVO) |
| | | if (null === data) return |
| | | |
| | | // formDate 对应 DevRent |
| | | // formData.value = data //不能整个赋值, 默认领用时间被清空 |
| | | formData.value.id = data.id; //rent id |
| | | formData.value.applyNo = data.applyNo; |
| | | formData.value.episodeId = data.episodeId; |
| | | formData.value.id = data.id //rent id |
| | | formData.value.applyNo = data.applyNo |
| | | formData.value.episodeId = data.episodeId |
| | | formData.value.patDetails = data.patDetails |
| | | } |
| | | |
| | | |
| | | const loading = ref(true) // 列表的加载中 |
| | | const list = ref<JobRecordVO[]>([]) // 列表的数据 |
| | |
| | | } |
| | | |
| | | const onRowClick = (cur) => { |
| | | if (cur !== null) |
| | | getSelectedRent( cur.rentId ) |
| | | if (cur !== null) getSelectedRent(cur.rentId) |
| | | } |
| | | |
| | | const getSelectedRent = async (rentId) => { |
| | |
| | | } |
| | | |
| | | const feeConfirm = async () => { |
| | | const result = await DevRentApi.feeConfirm(formData.value.id) |
| | | if (0 == result) |
| | | message.success(t('操作成功')) |
| | | if (formData.value.id == null) { |
| | | message.error(t('请先检查')) |
| | | return |
| | | } |
| | | |
| | | try { |
| | | const result = await DevRentApi.feeConfirm(formData.value.id) |
| | | if (0 == result) { |
| | | //message.success(t('确费操作成功')) |
| | | } |
| | | } catch (err) { |
| | | // 框架 会给出 后台的 错误信息 |
| | | } |
| | | } |
| | | |
| | | const feeCancel = async () => { |
| | | const result = await DevRentApi.feeCancel(formData.value.id) |
| | | if (0 == result) |
| | | message.success(t('操作成功')) |
| | | if (formData.value.id == null) { |
| | | message.error(t('请先检查')) |
| | | return |
| | | } |
| | | |
| | | try { |
| | | const result = await DevRentApi.feeCancel(formData.value.id) |
| | | if (0 == result) { |
| | | // message.success(t('确费取消成功')) |
| | | } |
| | | } catch (err) { |
| | | // 框架 会给出 后台的 错误信息 |
| | | } |
| | | } |
| | | |
| | | const getDisplayBarcode = (): string => { |
| | | if (!formData.value.checkType) |
| | | return "" |
| | | if (formData.value.checkType == null) return '' |
| | | |
| | | const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType!) |
| | | if (!displayBarcode.includes( formData.value.patSrc )) |
| | | return "" |
| | | if ( |
| | | formData.value.patDetails == null || |
| | | formData.value.patDetails.source == null || |
| | | !displayBarcode.includes(formData.value.patDetails.source) |
| | | ) |
| | | return '' |
| | | |
| | | return getBarcode() |
| | | } |
| | | |
| | | const getBarcode = (): string => { |
| | | if (!formData.value.checkType) |
| | | return "" |
| | | if (formData.value.checkType == null) return '' |
| | | |
| | | if (1 === formData.value.patSrc || 2 === formData.value.patSrc) |
| | | return formData.value.applyNo??"" |
| | | else if (3 === formData.value.patSrc || 4 === formData.value.patSrc) |
| | | return formData.value.episodeId??"" |
| | | const patSource = formData.value.patDetails?.source |
| | | if (patSource == null) return '' |
| | | |
| | | return "" |
| | | if (1 === patSource || 2 === patSource) return formData.value.applyNo ?? '' |
| | | else if (3 === patSource || 4 === patSource) return formData.value.episodeId ?? '' |
| | | |
| | | return '' |
| | | } |
| | | |
| | | const copyBarcode = async () => { |
| | | displayBarCode.value = getDisplayBarcode() |
| | | await navigator.clipboard.writeText( getBarcode() ); |
| | | await navigator.clipboard.writeText(getBarcode()) |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | |
| | | resetForm() |
| | | getList() |
| | | }) |
| | | |
| | | </script> |