调整BUG

This commit is contained in:
kmd 2025-10-13 14:41:35 +08:00
parent d6b6c40d74
commit 0416b0e9e3
4 changed files with 23 additions and 41 deletions

View File

@ -166,7 +166,7 @@ export const PatientApi = {
},
//获取工作量统计
getData : async (params: any) => {
return await request.get({ url: `/inspect/patient/getworkload?dates=${params.dates[0]}&dates=${params.dates[1]}&hospitalNo=${params.hospitalNo}` })
return await request.get({ url: `/inspect/patient/getworkload?dates=${params.dates[0]}&dates=${params.dates[1]}&examhoscode=${params.examhoscode}` })
},
//导出工作量统计excel
exportData : async (params: any) => {

View File

@ -1639,14 +1639,7 @@ const handleSync = async () => {
)
})
//
syncPromises.push(
PatientApi.getUSTj(medicalSn).catch((error) => {
console.warn('获取超声报告失败:', error)
return null
})
)
//
if (needsSyncECG) {
syncPromises.push(

View File

@ -65,10 +65,10 @@
<el-option label="未打印" value="0" />
</el-select>
</el-form-item>
<el-form-item label="当前机构" prop="hospitalNo">
<el-form-item label="送检机构" prop="hospitalNo">
<el-select
v-model="hospitalNo"
placeholder="请选择当前机构"
placeholder="请选择送检机构"
clearable
class="!w-200px"
>
@ -125,10 +125,10 @@
<el-table-column label="状态" align="center" prop="isprint" :formatter="statusFormatter" />
<el-table-column label="操作" align="center" fixed="right" width="240px">
<template #default="scope">
<el-button link type="primary" @click="handlePrint(scope.row)"> 打印导检单 </el-button>
<el-button link type="primary" @click="handlePrintBarcode(scope.row)">
<el-button link type="primary" @click="handlePrint(scope.row)"> 打印条码 </el-button>
<!-- <el-button link type="primary" @click="handlePrintBarcode(scope.row)">
打印条形码
</el-button>
</el-button> -->
</template>
</el-table-column>
</el-table>
@ -314,8 +314,11 @@ const handlePrint = async (row: PatientVO) => {
const daysDiff = Math.floor(timeDiff / (1000 * 3600 * 24))
// 365
if (daysDiff < 365) {
//
message.error(`该患者上次体检距今不满一年`)
//
await ElMessageBox.alert('该患者上次体检距今不满一年', '提示', {
confirmButtonText: '确定',
type: 'warning'
})
return
}
}
@ -350,13 +353,13 @@ const handlePrint = async (row: PatientVO) => {
}
await PatientApi.bindPatientProject(row.medicalSn)
await PatientApi.syncinspectApplyTj(row.medicalSn)
await createPrint(row.medicalSn)
//await createPrint(row.medicalSn)
//
await PatientApi.updatePrintStatus(row.medicalSn, new Date())
await PatientApi.updateMedicalDateTime(row.medicalSn, new Date())
await handlePrintBarcode(row)//
//
await getList()
message.success('打印成功')
//
PatientApi.updatePatientSupplement(row.medicalSn, row.cardId)
} catch (error: any) {
@ -406,8 +409,11 @@ const handlePrintBarcode = async (row: PatientVO) => {
const daysDiff = Math.floor(timeDiff / (1000 * 3600 * 24))
// 365
if (daysDiff < 365) {
//
message.error(`该患者上次体检距今不满一年`)
//
await ElMessageBox.alert('该患者上次体检距今不满一年', '提示', {
confirmButtonText: '确定',
type: 'warning'
})
return
}
}
@ -564,7 +570,6 @@ const handlePrintBarcode = async (row: PatientVO) => {
//
await getList()
message.success('打印成功')
} catch (error: any) {
console.error('打印条形码失败,详细错误:', error)
message.error(`打印条形码失败: ${error.message || '未知错误'}`)

View File

@ -20,16 +20,6 @@
size="big"
@change="changeDatePick"
/>
<el-form-item label="当前机构" style="margin-left: 10px">
<el-select v-model="selectedHospital" placeholder="请选择当前机构" style="width: 200px" clearable>
<el-option
v-for="item in hospitals"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-button type="primary" @click="getList" style="margin-left: 20px">
<Icon icon="ep:search" class="mr-5px" /> 查询
</el-button>
@ -212,27 +202,22 @@ const changeRadio = (e) => {
}
const changeDatePick = () => {
radioType.value = null
// getList()
//getList()
}
const userInfo = ref()
/**
* 获取统计数据
*/
const getList = async () => {
if (!selectedHospital.value) {
message.warning('请先选择机构')
return
}
//
data1.value = []
//
// userInfo.value = await getUserProfile()
// const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.value.deptId)
userInfo.value = await getUserProfile()
const params = {
dates: [dayjs(time.value[0]).format('YYYY-MM-DD'), dayjs(time.value[1]).format('YYYY-MM-DD')],
hospitalNo: selectedHospital.value
examhoscode: userInfo.value.deptId
}
try {
let resp = await PatientApi.getData(params)
@ -410,8 +395,7 @@ const handleDetail = async (row) => {
enddate: time.value[1],
addname: row.districtname,
orgname: parentNode ? parentNode.orgname : row.orgname,
//orgid: userInfo.value.deptId
hospitalNo: selectedHospital.value
orgid: userInfo.value.deptId
}
const res = await PatientApi.getPatientDetails(params)
detailData.value = res