Merge remote-tracking branch 'origin/develop' into zhaoyun

This commit is contained in:
2026-06-17 16:39:34 +08:00
2 changed files with 120 additions and 14 deletions

View File

@@ -472,7 +472,6 @@ function getDetail(encounterId) {
if (res.code === 200) {
allowAdd.value = res.data ? true : false;
console.log('设置 allowAdd =', allowAdd.value, ', 病历数据:', res.data);
} else {
allowAdd.value = false;
console.warn('获取病历详情失败:', res.msg);
}

View File

@@ -15,7 +15,6 @@
<el-radio-group
v-model="type"
@change="handleRadioChange"
>
<el-radio :value="0">
全部
</el-radio>
@@ -34,13 +33,9 @@
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 200px"
/>
<el-button
type="primary"
plain
@click="handleGetPrescription"
>
查询
</el-button>
</div>
<div style="flex: 1; min-width: 0;" />
<div style="display: flex; align-items: center; gap: 12px; flex-shrink: 1; min-width: 0;">
@@ -52,18 +47,10 @@
v-model="chooseAll"
@change="handelSwitchChange"
/>
<el-button
type="primary"
@click="handleCheck"
>
核对通过
</el-button>
<el-button
type="danger"
:disabled="hasDispensedSelected"
@click="handleCancel"
>
退回
</el-button>
</div>
</div>
@@ -746,3 +733,123 @@ defineExpose({
background-color: #eef9fd !important;
}
</style>
<!-- 未校对tab显示核对通过/退回 -->
<template v-if="activeTab === 'unverified'">
<el-button
type="primary"
@click="handleCheck"
>
核对通过
</el-button>
<el-button
type="danger"
:disabled="hasDispensedSelected"
@click="handleCancel"
>
退回
</el-button>
</template>
<!-- 已校对tab显示执行/不执行 -->
<template v-else-if="activeTab === 'verified'">
<el-button
type="success"
@click="handleExecute"
>
执行
</el-button>
<el-button
type="warning"
@click="handleVoid"
>
不执行
</el-button>
</template>
encounterId: item.encounterId,
patientId: item.patientId,
accountId: item.accountId,
therapyEnum: item.therapyEnum,
exePerformRecordList: item.exePerformRecordList,
/**
* 执行医嘱
*/
function handleExecute() {
let list = getSelectRows();
if (list.length === 0) {
proxy.$message.warning('请先选择医嘱信息');
return;
}
// 检查是否已有执行记录(已执行的不需要再执行)
let executedItems = list.filter(item => item.exePerformRecordList && item.exePerformRecordList.length > 0);
if (executedItems.length > 0) {
proxy.$message.warning('选中医嘱中包含已执行的医嘱,请取消勾选后重试');
return;
}
const now = new Date();
const exeDate = now.getFullYear() + '-' +
String(now.getMonth() + 1).padStart(2, '0') + '-' +
String(now.getDate()).padStart(2, '0') + ' ' +
String(now.getHours()).padStart(2, '0') + ':' +
String(now.getMinutes()).padStart(2, '0') + ':' +
String(now.getSeconds()).padStart(2, '0');
const adviceExecuteDetailList = list.map(item => ({
requestId: item.requestId,
encounterId: item.encounterId,
patientId: item.patientId,
accountId: item.accountId,
therapyEnum: item.therapyEnum,
adviceTable: item.requestTable,
executeTimes: [exeDate],
}));
adviceExecute({
exeDate: exeDate,
adviceExecuteDetailList: adviceExecuteDetailList,
}).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess(res.msg);
handleGetPrescription();
}
});
}
/**
* 不执行医嘱
*/
function handleVoid() {
let list = getSelectRows();
if (list.length === 0) {
proxy.$message.warning('请先选择医嘱信息');
return;
}
// 检查是否已有执行记录(已执行的不能标记为不执行)
let executedItems = list.filter(item => item.exePerformRecordList && item.exePerformRecordList.length > 0);
if (executedItems.length > 0) {
proxy.$message.warning('选中医嘱中包含已执行的医嘱,请取消勾选后重试');
return;
}
const now = new Date();
const exeDate = now.getFullYear() + '-' +
String(now.getMonth() + 1).padStart(2, '0') + '-' +
String(now.getDate()).padStart(2, '0') + ' ' +
String(now.getHours()).padStart(2, '0') + ':' +
String(now.getMinutes()).padStart(2, '0') + ':' +
String(now.getSeconds()).padStart(2, '0');
const adviceExecuteDetailList = list.map(item => ({
requestId: item.requestId,
encounterId: item.encounterId,
patientId: item.patientId,
accountId: item.accountId,
therapyEnum: item.therapyEnum,
adviceTable: item.requestTable,
executeTimes: [exeDate],
}));
adviceNoExecute({
exeDate: exeDate,
adviceExecuteDetailList: adviceExecuteDetailList,
}).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess(res.msg);
handleGetPrescription();
}
});
}