fix(#784): 请修复 Bug #784:【住院护士站-医嘱校对】在已校对的的医嘱中,只有核对通过和退回,没有执行和不执行
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user