eight
2025-04-10 df2c4a7a693323a43dc74168a780a52c69e41c1b
src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -23,14 +23,14 @@
      </el-form-item>
      <el-form-item label="患者描述" prop="patDeptDesc">
        <dict-tag v-if="formData?.patSrc" :type="DICT_TYPE.ECG_PAT_SOURCE" :value="formData?.patSrc" />
        <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="devId">
        <el-input v-model="formData.devId" placeholder="请输入设备编号" @input="getDevInfo"/>
      </el-form-item>
      <el-form-item label="设备描述" prop="">
        {{(deviceInfo?.brand||'-') + "&nbsp;" + (deviceInfo?.model||'-') + "&nbsp;" + tranlateDevState(deviceInfo?.state)}}
        {{ devInfo?.brand||'-' }} {{ devInfo?.model||'-' }} {{ tranlateDevState(devInfo?.state) }}
      </el-form-item>
      <el-form-item label="领用时间" prop="rentTime">
        <el-date-picker
@@ -190,7 +190,6 @@
  detachment: undefined,
  remark: undefined,
  paid: undefined,
  patSrc: undefined,
  roomId: props.room.roomId,
  bedNo: props.room.bedNo
})
@@ -203,7 +202,12 @@
})
const formRef = ref() // 表单 Ref
const deviceInfo = ref<DeviceVO> ()
const devInfo = ref<Partial<DeviceVO>>({
  category: undefined,
  brand: undefined,
  model: undefined,
  state: undefined,
})
const displayBarCode = ref<string> ()
@@ -225,11 +229,10 @@
    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.patDetails = data.patDetails
  formData.value = data
  // 领用时间  采用当前时间
  formData.value.rentTime = new Date().getTime()
}
/** 提交表单 */
@@ -294,13 +297,17 @@
    remark: undefined,
    patDetails: undefined,
    paid: undefined,
    patSrc: undefined,
    roomId: props.room.roomId,
    bedNo: props.room.bedNo
  }
  formRef.value?.resetFields()
  deviceInfo.value = undefined
  devInfo.value = {
    category: undefined,
    brand: undefined,
    model: undefined,
    state: undefined,
  }
}
const setPatient = (queueVO: QueueVO | undefined) => {
@@ -310,7 +317,6 @@
  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()
}
@@ -353,7 +359,14 @@
}
const getSelectedRent = async (rentId) => {
  formData.value = await DevRentApi.getDevRent(rentId)
  const data = await DevRentApi.getDevRent(rentId)
  formData.value = data
  devInfo.value.category = data.category
  devInfo.value.brand = data.brand
  devInfo.value.model = data.model
  devInfo.value.state = data.devState
}
const printBill = async (patId: string, checkType: number, printMode?: number) => {
@@ -430,14 +443,16 @@
*/
const getDevInfo = async () => {
  deviceInfo.value = undefined
  if (isStringEmpty(formData.value.devId))
  if (formData.value?.devId == null) {
    devInfo.value.brand = undefined
    devInfo.value.model = undefined
    devInfo.value.state = undefined
    return
  }
  const data = await DeviceApi.getDeviceByDevId(formData.value.devId!)
  console.info( data )
  if ( null !== data)
    deviceInfo.value = data
    devInfo.value = data
}
const feeConfirm = async () => {
@@ -467,7 +482,8 @@
    return ""
  const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType!)
  if (formData.value.patSrc == null || !displayBarcode.includes( formData.value.patSrc ))
  if (formData.value.patDetails == null || formData.value.patDetails.source == null ||
      !displayBarcode.includes( formData.value.patDetails.source ))
    return ""
  return getBarcode()
@@ -477,9 +493,13 @@
  if (!formData.value.checkType)
    return ""
  if (1 === formData.value.patSrc || 2 === formData.value.patSrc)
  const patSource = formData.value.patDetails?.source
  if (patSource == null)
    return ""
  if (1 === patSource || 2 === patSource)
    return formData.value.applyNo??""
  else if (3 === formData.value.patSrc || 4 === formData.value.patSrc)
  else if (3 === patSource || 4 === patSource)
    return formData.value.episodeId??""
  return ""