eight
2025-04-15 563952b6d7c953ab7888512ea6c78d9cad0f80b6
src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -11,7 +11,7 @@
      v-loading="formLoading"
    >
      <el-form-item label="检查项目" prop="">
        {{formData?.checkType && getCheckTypeName(formData?.checkType)}}
        {{getCheckTypeName(formData.checkType)}}
      </el-form-item>
      <el-form-item label="患者编号" prop="patId">
        <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getRentInfoByPatId" />
@@ -166,15 +166,13 @@
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const autoPrint = ref<boolean>(true);
const checkTypeStore = useCheckTypeStore()
const formData = ref<Partial<DevRentVO>>({
const formData = ref<DevRentVO>({
  id: undefined,
  devId: undefined,
  patId: undefined,
@@ -217,6 +215,9 @@
// 根据患者或设备, 获取 Free的租赁
const getFreeRentInfo = async (devRentVO) => {
  if ((devRentVO.devId == null || devRentVO.devId === '') && (devRentVO.patId == null || devRentVO.patId === '') )
    return
  const data = await DevRentApi.getFreeRent(devRentVO)
  if (null === data)
    return
@@ -248,12 +249,11 @@
      feeConfirm()
    }
    dialogVisible.value = false
    // 发送操作成功的事件
    emit('event_dev_ready')
    resetForm()
    getList()
    // 发送操作成功的事件
    emit('event_dev_ready')
    message.success(t('操作完成'))
  } finally {
    formLoading.value = false
@@ -305,7 +305,7 @@
  formData.value.patId = queueVO?.patId
  formData.value.patName = queueVO?.patName
  formData.value.checkType = queueVO?.bookCheckType
  getFreeRentInfo(formData.value)
  getFreeRentInfo(formData.value)  // 待检查的信息  @ dev_rent 表
  copyBarcode()
}
defineExpose({ setPatient }) // 提供 setPatient 方法,用于设置患者
@@ -360,7 +360,7 @@
const printBill = async (patId: string, checkType: number, printMode?: number) => {
  const curAppointment: AppointmentVO = await AppointmentApi.getCurAppointmentByPatIdAndCheckType( patId, checkType )
  console.info( curAppointment )
  //console.info( curAppointment )
// 引入后使用示例
  hiprint.init({
@@ -469,9 +469,14 @@
  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 ))
  if (formData.value.patDetails?.source == null)
    return ""
  const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType)
  if (displayBarcode == null || displayBarcode.length === 0)
    return ""
  if (!displayBarcode.includes( formData.value.patDetails.source ))
    return ""
  return getBarcode()