调整BUG
This commit is contained in:
parent
d6b6c40d74
commit
0416b0e9e3
@ -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) => {
|
||||
|
@ -1639,14 +1639,7 @@ const handleSync = async () => {
|
||||
)
|
||||
})
|
||||
|
||||
// 直接添加超声报告请求,无需检查是否存在数据
|
||||
syncPromises.push(
|
||||
PatientApi.getUSTj(medicalSn).catch((error) => {
|
||||
console.warn('获取超声报告失败:', error)
|
||||
return null
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
// 如果需要,添加心电图报告请求
|
||||
if (needsSyncECG) {
|
||||
syncPromises.push(
|
||||
|
@ -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 || '未知错误'}`)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user