| | |
| | | <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="!isStringEmpty(formData.patId) && 1 === checkTypeStore.getCheckTypeDispBarCode(formData.checkType)" :value="formData.patId" :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="patDeptDesc"> |
| | | 科室: {{formData.patDeptDesc}} 病区: {{formData.patWardDesc}} 床位: {{formData.patBedNo}} |
| | | <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 |
| | |
| | | </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-row> |
| | | </el-form> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">检查完成</el-button> |
| | | <el-button @click="resetForm()">重 置</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-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> |
| | |
| | | :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 |
| | |
| | | import {RoomBedVO} from "@/api/ecg/doctor"; |
| | | import {Barcode} from "@/components/Barcode"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | import {DICT_TYPE} from "@/utils/dict"; |
| | | import {getCheckTypeName, needAutoFeeConfirm} from "../../../../utils/checkTypeFormatter"; |
| | | |
| | | /** 设备装机 表单 */ |
| | | defineComponent({ name: 'RoutinePanel' }) |
| | |
| | | |
| | | const setPatient = (queueVO: QueueVO | undefined) => { |
| | | resetForm() |
| | | formData.value.applyNo = queueVO?.applyNo |
| | | formData.value.episodeId = queueVO?.episodeId |
| | | formData.value.patId = queueVO?.patId |
| | | formData.value.patName = queueVO?.patName |
| | | formData.value.checkType = queueVO?.bookCheckType |
| | | getFreeRentInfo(formData.value) |
| | | copyBarcode() |
| | | } |
| | | defineExpose({ setPatient }) // 提供 setPatient 方法,用于设置患者 |
| | | |
| | |
| | | |
| | | const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
| | | |
| | | const formData = ref({}) |
| | | const formData = ref<Partial<DevRentVO>>({ |
| | | id: undefined, |
| | | devId: undefined, |
| | | patId: undefined, |
| | | patName: undefined, |
| | | patDetails: undefined, |
| | | checkType: undefined, |
| | | rentTime: new Date().getTime(), |
| | | returnTime: undefined, |
| | | remark: undefined, |
| | | paid: undefined, |
| | | }) |
| | | |
| | | const formRules = reactive({ |
| | | // devId: [{ required: true, message: '设备编号不能为空', trigger: 'blur' }], |
| | | rentTime: [{ required: true, message: '请选择装机日期', trigger: 'blur' }], |
| | | }) |
| | | const formRef = ref() // 表单 Ref |
| | | |
| | | 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 |
| | | // 发送操作成功的事件 |
| | |
| | | devId: undefined, |
| | | patId: undefined, |
| | | patName: undefined, |
| | | patDeptCode: undefined, |
| | | patDeptDesc: undefined, |
| | | patWardCode: undefined, |
| | | patWardDesc: undefined, |
| | | patBedNo: undefined, |
| | | checkType: undefined, |
| | | rentTime: new Date().getTime(), |
| | | returnTime: undefined, |
| | | interference: undefined, |
| | | baseline: undefined, |
| | | detachment: undefined, |
| | | remark: undefined, |
| | | category: '', |
| | | brand: '', |
| | | model: '', |
| | | patDetails: undefined, |
| | | paid: undefined, |
| | | roomId: props.room.roomId, |
| | | bedNo: props.room.bedNo |
| | | } |
| | | formRef.value?.resetFields() |
| | | } |
| | |
| | | |
| | | formData.value.patId = tempPatId; |
| | | getFreeRentInfo(formData.value) |
| | | copyBarcode() |
| | | } |
| | | |
| | | const getFreeRentInfo = async (devRentVO) => { |
| | |
| | | |
| | | // formDate 对应 DevRent |
| | | // formData.value = data //不能整个赋值, 默认领用时间被清空 |
| | | formData.value.id = data.id; |
| | | formData.value.id = data.id; //rent id |
| | | formData.value.applyNo = data.applyNo; |
| | | formData.value.episodeId = data.episodeId; |
| | | formData.value.patDetails = data.patDetails |
| | | } |
| | | |
| | |
| | | formData.value.roomId = props.room.roomId |
| | | formData.value.bedNo = props.room.bedNo |
| | | const data = formData.value as unknown as DevRentVO |
| | | if (formData.value.id === null || formData.value.id === undefined) { |
| | | const result = await DevRentApi.routineCheckCancel(data) |
| | | formData.value.id = result |
| | | message.success(t('操作成功')) |
| | | } else { |
| | | await DevRentApi.routineCheckCancel(data) |
| | | message.success(t('操作成功')) |
| | | } |
| | | await DevRentApi.routineCheckCancel(data) |
| | | |
| | | // 发送操作成功的事件 |
| | | emit('event_routine') |
| | | resetForm() |
| | | getList() |
| | | |
| | | message.success(t('操作成功')) |
| | | } |
| | | |
| | | const feeConfirm = async () => { |
| | | if (formData.value.id == null) { |
| | | message.error(t('请先检查')) |
| | | return |
| | | } |
| | | |
| | | const result = await DevRentApi.feeConfirm(formData.value.id) |
| | | if (0 == result) |
| | | message.success(t('操作成功')) |
| | | } |
| | | |
| | | const feeCancel = async () => { |
| | | if (formData.value.id == null) { |
| | | message.error(t('请先检查')) |
| | | return |
| | | } |
| | | |
| | | const result = await DevRentApi.feeCancel(formData.value.id) |
| | | if (0 == result) |
| | | message.success(t('操作成功')) |
| | | } |
| | | |
| | | const getDisplayBarcode = (): string => { |
| | | if (formData.value.checkType == null) |
| | | return "" |
| | | |
| | | const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType!) |
| | | 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 == null) |
| | | return "" |
| | | |
| | | const patSource = formData.value.patDetails?.source |
| | | if (patSource == null) |
| | | 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() ); |
| | | } |
| | | |
| | | /** 初始化 **/ |