WXL
10 小时以前 d79ce11fcd47db138764557d214f4ea2169fb90a
src/views/ecg/appointment/AppointmentForm.vue
@@ -10,7 +10,12 @@
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="患者编号" prop="patId">
            <el-input v-model="formData.patId" placeholder="请输入患者编号" clearable @input="searchBookInfo"/>
            <el-input
              v-model="formData.patId"
              placeholder="请输入患者编号"
              clearable
              @input="searchBookInfo"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
@@ -143,9 +148,7 @@
        </el-col>
      </el-row>
      <el-form-item label="付款标记" prop="paid">
        <el-checkbox v-model="formData.paid" :true-label=1 :false-label=0>
          已付款
        </el-checkbox>
        <el-checkbox v-model="formData.paid" :true-label="1" :false-label="0"> 已付款 </el-checkbox>
      </el-form-item>
    </el-form>
    <template #footer>
@@ -157,13 +160,13 @@
<script setup lang="ts">
import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment'
import {useCheckTypeStore} from "@/store/modules/checkType";
import {getCheckTypeName} from "@/utils/checkTypeFormatter";
import { useCheckTypeStore } from '@/store/modules/checkType'
import { getCheckTypeName } from '@/utils/checkTypeFormatter'
/** 预约 表单 */
defineOptions({ name: 'AppointmentForm' })
const checkTypeStore = useCheckTypeStore();
const checkTypeStore = useCheckTypeStore()
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
@@ -191,7 +194,7 @@
  bookDate: new Date().getTime(),
  bookTimeslot: 9000930,
  bookCheckType: 100, //常规检查
  paid: 0,
  paid: 0
})
const formRules = reactive({
  patId: [{ required: true, message: '患者编号不能为空', trigger: 'blur' }],
@@ -284,15 +287,14 @@
    bookDate: new Date().getTime(),
    bookTimeslot: 9000930,
    bookCheckType: getCheckTypeName(100),
    paid: 0,
    paid: 0
  }
  formRef.value?.resetFields()
}
const searchBookInfo = async () => {
  const tmpPatId = formData.value.patId
  if (null == tmpPatId || "" === tmpPatId)
    return
  if (null == tmpPatId || '' === tmpPatId) return
  const data = await AppointmentApi.queryAppointmentFromHis( tmpPatId ) // 对应数据库中 pat_id
  console.info( data )
@@ -303,9 +305,8 @@
  ElNotification({
    title: '温馨提示',
    message: "没有开单信息",
    message: '没有开单信息',
    type: 'warning'
  })
}
</script>