fix(#591): 请修复 Bug #591:【住院医生站-临床医嘱】长期医嘱点击停嘱未弹出时间录入弹窗

根因:
- Bug #请修复 Bug #591 存在的问题

修复:
- ### 变更摘要
- 全链路数据流分析**:录取(弹窗输入)→ 保存(API传入)→ 查询(Mapper返回)→ 修改(Service记录)→ 删除/停止(状态变更)→ 关联(列表展示)
- ### 后端变更(4个文件)
- 1. `AdviceBatchOpParam.java`** — 停嘱参数添加 `stopTime` 字段
- 新增 `@JsonFormat Date stopTime`,支持前端传入停嘱时间
- 2. `RequestBaseDto.java`** — 查询DTO添加 `stopUserName`、`stopTime` 字段
- 新增 `String stopUserName`(停嘱医生姓名)
- 新增 `Date stopTime`(停嘱时间)
- 3. `AdviceManageAppServiceImpl.java`** — 停嘱Service增强
- 优先使用前端传入的 `stopTime`,兜底用当前时间
- 通过 `SecurityUtils.getNickName()` 获取当前操作用户昵称,记录到 `updateBy`
- 药品和诊疗两个更新入口均已同步修改
- 4. `AdviceManageAppMapper.xml`** — 三个UNION ALL子查询添加字段
- 药品子查询:`T1.effective_dose_end AS stop_time` + `T1.update_by AS stop_user_name`
- 耗材子查询:`NULL AS stop_time` + `'' AS stop_user_name`
- 诊疗子查询:`T1.occurrence_end_time AS stop_time` + `T1.update_by AS stop_user_name`
- ### 前端变更(1个文件)
- `order/index.vue`**:
- 1. **停嘱时间弹窗** — 点击「停嘱」后弹出 `el-dialog`,内含 `el-date-picker`(datetime类型,默认当前时间),确定后才调用API
- 2. **表格列** — 在「皮试」列后面、「诊断」列前面新增两列:
- 「停嘱医生」`prop="stopUserName"`,宽度120px
- 「停嘱时间」`prop="stopTime"`,宽度170px
- 3. **`handleStopAdvice`** — 保留原有校验(未保存/未签发/已停止检查),校验通过后弹出时间选择弹窗而非直接调API
- 4. **`confirmStopAdvice`** — 新增确认函数,将 `stopTime` 拼入请求参数后调用 `stopAdvice` API
- ### 验证结果
-  前端 Lint 检查通过(仅1个预存的 `vue/no-dupe-keys` 警告)
-  后端 Maven 编译通过(BUILD SUCCESS)
This commit is contained in:
2026-05-29 00:39:26 +08:00
parent b149cc3f3e
commit 3e7d27ee61
564 changed files with 69505 additions and 23137 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,9 @@
<div class="top-container">
<!-- 标题栏 -->
<div class="title-bar">
<h1 class="title-text">门诊术中临时医嘱</h1>
<h1 class="title-text">
门诊术中临时医嘱
</h1>
</div>
<!-- 患者信息卡 -->
<div class="patient-info-card">
@@ -35,10 +37,16 @@
</div>
<!-- 操作按钮组 -->
<div class="action-buttons">
<el-button class="refresh-btn" @click="handleRefresh">
<el-button
class="refresh-btn"
@click="handleRefresh"
>
<span></span> 刷新
</el-button>
<el-button class="quote-btn" @click="handleQuoteBilling">
<el-button
class="quote-btn"
@click="handleQuoteBilling"
>
引用计费
</el-button>
</div>
@@ -48,7 +56,11 @@
<div class="medicine-section">
<div class="section-title">
已引用计费药品待生成医嘱
<span v-if="(billingMedicines || []).length >= PAGE_SIZE" style="margin-left:auto;font-size:14px;color:#4a8bc9;cursor:pointer;white-space:nowrap;" @click="billingExpanded = !billingExpanded">
<span
v-if="(billingMedicines || []).length >= PAGE_SIZE"
style="margin-left:auto;font-size:14px;color:#4a8bc9;cursor:pointer;white-space:nowrap;"
@click="billingExpanded = !billingExpanded"
>
{{ billingExpanded ? '收起' : `展开全部(${(billingMedicines || []).length}条)` }}
</span>
</div>
@@ -59,26 +71,66 @@
style="width: 100%;"
fit
>
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="药品名称" prop="medicineName" min-width="150" show-overflow-tooltip />
<el-table-column label="规格" prop="specification" min-width="100" align="center" />
<el-table-column label="数量" prop="quantity" width="80" align="center">
<el-table-column
label="序号"
type="index"
width="60"
align="center"
/>
<el-table-column
label="药品名称"
prop="medicineName"
min-width="150"
show-overflow-tooltip
/>
<el-table-column
label="规格"
prop="specification"
min-width="100"
align="center"
/>
<el-table-column
label="数量"
prop="quantity"
width="80"
align="center"
>
<template #default="{ row }">
{{ row.quantity || 0 }}
</template>
</el-table-column>
<el-table-column label="批号" prop="batchNumber" min-width="120" align="center" />
<el-table-column label="单价" prop="unitPrice" min-width="80" align="center">
<el-table-column
label="批号"
prop="batchNumber"
min-width="120"
align="center"
/>
<el-table-column
label="单价"
prop="unitPrice"
min-width="80"
align="center"
>
<template #default="{ row }">
{{ row.unitPrice ? `${row.unitPrice}` : '-' }}
</template>
</el-table-column>
<el-table-column label="小计" prop="subtotal" min-width="100" align="center">
<el-table-column
label="小计"
prop="subtotal"
min-width="100"
align="center"
>
<template #default="{ row }">
{{ row.subtotal ? `${(row.unitPrice * row.quantity).toFixed(2)}` : '-' }}
</template>
</el-table-column>
<el-table-column label="医保" prop="insuranceType" width="80" align="center">
<el-table-column
label="医保"
prop="insuranceType"
width="80"
align="center"
>
<template #default="{ row }">
<el-tag
:size="'small'"
@@ -91,9 +143,15 @@
</el-table>
<div class="medicine-summary">
<div class="summary-item insurance">医保内{{ insuranceAmount.toFixed(2) }}</div>
<div class="summary-item self-pay">自费{{ selfPayAmount.toFixed(2) }}</div>
<div class="summary-item total">总计{{ totalAmount.toFixed(2) }}</div>
<div class="summary-item insurance">
医保内{{ insuranceAmount.toFixed(2) }}
</div>
<div class="summary-item self-pay">
自费{{ selfPayAmount.toFixed(2) }}
</div>
<div class="summary-item total">
总计{{ totalAmount.toFixed(2) }}
</div>
</div>
</div>
@@ -101,7 +159,11 @@
<div class="advice-section">
<div class="section-title">
临时医嘱预览已生成
<span v-if="(displayAdvices || []).length >= PAGE_SIZE" style="margin-left:auto;font-size:14px;color:#4a8bc9;cursor:pointer;white-space:nowrap;" @click="advicesExpanded = !advicesExpanded">
<span
v-if="(displayAdvices || []).length >= PAGE_SIZE"
style="margin-left:auto;font-size:14px;color:#4a8bc9;cursor:pointer;white-space:nowrap;"
@click="advicesExpanded = !advicesExpanded"
>
{{ advicesExpanded ? '收起' : `展开全部(${(displayAdvices || []).length}条)` }}
</span>
</div>
@@ -112,21 +174,72 @@
style="width: 100%;"
fit
>
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="医嘱名称" prop="adviceName" min-width="150" show-overflow-tooltip />
<el-table-column label="剂量" prop="dosage" min-width="80" align="center" />
<el-table-column label="单位" prop="unit" min-width="80" align="center" />
<el-table-column label="用法" prop="usage" min-width="100" show-overflow-tooltip>
<el-table-column
label="序号"
type="index"
width="60"
align="center"
/>
<el-table-column
label="医嘱名称"
prop="adviceName"
min-width="150"
show-overflow-tooltip
/>
<el-table-column
label="剂量"
prop="dosage"
min-width="80"
align="center"
/>
<el-table-column
label="单位"
prop="unit"
min-width="80"
align="center"
/>
<el-table-column
label="用法"
prop="usage"
min-width="100"
show-overflow-tooltip
>
<template #default="{ row }">
{{ row.usageLabel || getUsageLabel(row.usage) }}
</template>
</el-table-column>
<el-table-column label="频次" prop="frequency" min-width="80" align="center" />
<el-table-column label="执行时间" prop="executeTime" min-width="160" align="center" />
<el-table-column label="操作" min-width="140" align="center">
<el-table-column
label="频次"
prop="frequency"
min-width="80"
align="center"
/>
<el-table-column
label="执行时间"
prop="executeTime"
min-width="160"
align="center"
/>
<el-table-column
label="操作"
min-width="140"
align="center"
>
<template #default="{ $index }">
<el-button link type="primary" @click="handleEditAdvice($index)">编辑</el-button>
<el-button link type="danger" @click="handleDeleteAdvice($index)">删除</el-button>
<el-button
link
type="primary"
@click="handleEditAdvice($index)"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDeleteAdvice($index)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -141,7 +254,10 @@
<div class="signature-card">
<div class="signature-info">
<span class="info-label">签名医师</span>
<span class="info-value" :class="{ 'unsigned': !isSigned }">{{ isSigned ? currentUser.name : '未签名' }}</span>
<span
class="info-value"
:class="{ 'unsigned': !isSigned }"
>{{ isSigned ? currentUser.name : '未签名' }}</span>
</div>
<div class="signature-info">
<span class="info-label">签名时间</span>
@@ -150,7 +266,12 @@
</div>
<!-- 底部操作按钮 -->
<div class="signature-actions">
<el-button class="cancel-btn" @click="handleCancel">取消</el-button>
<el-button
class="cancel-btn"
@click="handleCancel"
>
取消
</el-button>
<el-button
class="sign-btn"
:disabled="allItemsSubmitted"
@@ -162,7 +283,12 @@
</div>
<!-- 签名密码弹窗 -->
<el-dialog v-model="showSignDialog" title="弹窗-签名密码" width="400px" append-to-body>
<el-dialog
v-model="showSignDialog"
title="弹窗-签名密码"
width="400px"
append-to-body
>
<div class="sign-dialog-content">
<p>请输入账户密码</p>
<el-input
@@ -173,26 +299,56 @@
@keyup.enter="confirmSign"
/>
<div class="dialog-actions">
<el-button @click="showSignDialog = false">取消</el-button>
<el-button type="primary" @click="confirmSign">确认</el-button>
<el-button @click="showSignDialog = false">
取消
</el-button>
<el-button
type="primary"
@click="confirmSign"
>
确认
</el-button>
</div>
</div>
</el-dialog>
<!-- 编辑医嘱弹窗 -->
<el-dialog v-model="showEditDialog" title="编辑医嘱" width="500px" append-to-body>
<el-dialog
v-model="showEditDialog"
title="编辑医嘱"
width="500px"
append-to-body
>
<div class="edit-dialog-content">
<el-form :model="editForm" label-width="80px">
<el-form
:model="editForm"
label-width="80px"
>
<el-form-item label="药品名称">
<el-input v-model="editForm.adviceName" disabled />
<el-input
v-model="editForm.adviceName"
disabled
/>
</el-form-item>
<el-form-item label="剂量" required>
<el-input v-model.number="editForm.dosage" placeholder="请输入剂量" />
<el-form-item
label="剂量"
required
>
<el-input
v-model.number="editForm.dosage"
placeholder="请输入剂量"
/>
</el-form-item>
<el-form-item label="单位">
<el-input v-model="editForm.unit" placeholder="请输入单位" />
<el-input
v-model="editForm.unit"
placeholder="请输入单位"
/>
</el-form-item>
<el-form-item label="用法" required>
<el-form-item
label="用法"
required
>
<el-select
v-if="getMethodCodeDict.length > 0"
v-model="editForm.usage"
@@ -207,15 +363,29 @@
:value="dict.value"
/>
</el-select>
<el-input v-else disabled placeholder="加载中..." />
<el-input
v-else
disabled
placeholder="加载中..."
/>
</el-form-item>
<el-form-item label="频次">
<el-input v-model="editForm.frequency" disabled />
<el-input
v-model="editForm.frequency"
disabled
/>
</el-form-item>
</el-form>
<div class="dialog-actions">
<el-button @click="handleCancelEdit">取消</el-button>
<el-button type="primary" @click="handleSaveEdit">保存</el-button>
<el-button @click="handleCancelEdit">
取消
</el-button>
<el-button
type="primary"
@click="handleSaveEdit"
>
保存
</el-button>
</div>
</div>
</el-dialog>