diff --git a/public/头像.png b/public/头像.png new file mode 100644 index 0000000..50292d0 Binary files /dev/null and b/public/头像.png differ diff --git a/src/api/inspect/inspectpatient/index.ts b/src/api/inspect/inspectpatient/index.ts index 6ec17c4..f3f5b3f 100644 --- a/src/api/inspect/inspectpatient/index.ts +++ b/src/api/inspect/inspectpatient/index.ts @@ -128,8 +128,8 @@ export const PatientApi = { return await request.get({ url: `/inspect/patient/createPatientitem?medicalSn=` + medicalSn }) }, //根据体检编号&姓名&身份证号获取患者信息 - getPatientInfoByMedicalSn: async (searchKey: string) => { - return await request.get({ url: `/inspect/patient/PatientBySearchKey?searchKey=` + searchKey }) + getPatientInfoByMedicalSn: async (searchKey: string,examhoscode: string,status: string) => { + return await request.get({ url: `/inspect/patient/PatientBySearchKey?searchKey=` + searchKey + `&examhoscode=` + examhoscode + `&status=` + status}) }, //获取公卫患者信息 getGwPatientInfo: async (idCard: string) => { diff --git a/src/views/Department-entry/Medical-examination-vehicle.vue b/src/views/Department-entry/Medical-examination-vehicle.vue index 3395559..4ba02e4 100644 --- a/src/views/Department-entry/Medical-examination-vehicle.vue +++ b/src/views/Department-entry/Medical-examination-vehicle.vue @@ -609,7 +609,7 @@ const handleLocalSearch = async () => { }) // 获取搜索结果 - const res = await PatientApi.getPatientInfoByMedicalSn(searchQuery.value) + const res = await PatientApi.getPatientInfoByMedicalSn(searchQuery.value,user.value.deptId,statusFilter.value) // 检查返回的数据 if (res) { @@ -2771,7 +2771,8 @@ const getDoctorList = async () => { try { const res = await DoctorApi.getDoctorPage({ pageNo: 1, - pageSize: 100 // 设置较大的数值以获取所有医生 + pageSize: 100, // 设置较大的数值以获取所有医生 + orgid: user.value?.deptId }) if (res && res.list && res.list.length > 0) { // 保存原始医生列表数据 diff --git a/src/views/Inspection-checklist/Inspection-checklist.vue b/src/views/Inspection-checklist/Inspection-checklist.vue index d222c91..d19a5ce 100644 --- a/src/views/Inspection-checklist/Inspection-checklist.vue +++ b/src/views/Inspection-checklist/Inspection-checklist.vue @@ -302,6 +302,21 @@ onMounted(() => { /** 打印报告按钮操作 */ const handlePrint = async (row: PatientVO) => { try { + const patientInfo = await PatientApi.getPatientInfo(row.medicalSn) + if (patientInfo.status == 1 && patientInfo.medicalDateTime) { + const lastMedicalDate = new Date(patientInfo.medicalDateTime) + const currentDate = new Date() + // 计算日期之间的差距(毫秒) + const timeDiff = currentDate.getTime() - lastMedicalDate.getTime() + // 转换为天数 + const daysDiff = Math.floor(timeDiff / (1000 * 3600 * 24)) + // 如果不到365天(一年) + if (daysDiff < 365) { + // 显示警告消息 + message.error(`该患者上次体检距今不满一年`) + return + } + } const userInfo = await getUserProfile() const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.deptId) await PatientApi.updatePatientOrg(row.medicalSn,deptInfo.orgid,deptInfo.orgName) @@ -355,8 +370,20 @@ const handlePrintBarcode = async (row: PatientVO) => { try { // 获取最新的患者信息 const patientInfo = await PatientApi.getPatientInfo(row.medicalSn) - console.log('患者信息:', patientInfo) - + if (patientInfo.status == 1 && patientInfo.medicalDateTime) { + const lastMedicalDate = new Date(patientInfo.medicalDateTime) + const currentDate = new Date() + // 计算日期之间的差距(毫秒) + const timeDiff = currentDate.getTime() - lastMedicalDate.getTime() + // 转换为天数 + const daysDiff = Math.floor(timeDiff / (1000 * 3600 * 24)) + // 如果不到365天(一年) + if (daysDiff < 365) { + // 显示警告消息 + message.error(`该患者上次体检距今不满一年`) + return + } + } // 检查是否存在条形码打印时间 if(patientInfo.barcodetime){ // 格式化上次打印时间,显示中文年月日格式 diff --git a/src/views/inspect/inspectorg/InspectOrgForm.vue b/src/views/inspect/inspectorg/InspectOrgForm.vue index 4063393..e5de289 100644 --- a/src/views/inspect/inspectorg/InspectOrgForm.vue +++ b/src/views/inspect/inspectorg/InspectOrgForm.vue @@ -9,17 +9,20 @@ > + + + - - + + - + @@ -82,11 +85,9 @@ const formData = ref({ }) const formRules = reactive({ highLevelOrgID: [{ required: true, message: '请选择上级机构', trigger: 'change' }], - orgSN: [{ required: true, message: '请输入机构编号', trigger: 'change' }], orgType: [{ required: true, message: '请选择医院机构类型', trigger: 'change' }], orgName: [{ required: true, message: '请输入机构名称', trigger: 'change' }], contactPerson: [{ required: true, message: '请输入联系人姓名', trigger: 'change' }], - inHisCode: [{ required: true, message: '请输入机构码', trigger: 'change' }], contactTel: [ { required: true, message: '请填入正确的手机号', trigger: 'blur' }, { diff --git a/src/views/inspect/inspectorg/index.vue b/src/views/inspect/inspectorg/index.vue index 6681fb9..53e6a0e 100644 --- a/src/views/inspect/inspectorg/index.vue +++ b/src/views/inspect/inspectorg/index.vue @@ -53,7 +53,7 @@ - + diff --git a/src/views/summary/reprot-print/components/ReportPreview.vue b/src/views/summary/reprot-print/components/ReportPreview.vue index 90e2814..3c24b37 100644 --- a/src/views/summary/reprot-print/components/ReportPreview.vue +++ b/src/views/summary/reprot-print/components/ReportPreview.vue @@ -12,7 +12,7 @@