根因: - 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)
194 lines
5.4 KiB
Vue
Executable File
194 lines
5.4 KiB
Vue
Executable File
<template>
|
||
<div class="recordBill">
|
||
<div
|
||
id="div1"
|
||
class="printView_header"
|
||
>
|
||
<div style="text-align: center; font-size: 20px; height: 40px">
|
||
{{ userStore.hospitalName }}输液执行单
|
||
</div>
|
||
<div>
|
||
<span>座位:{{ printData.patientInfo.encounterLocationName }}</span>
|
||
<span style="margin-left: 18px">姓名:{{ printData.patientInfo.name }}</span>
|
||
<span style="margin-left: 18px">性别:{{ printData.patientInfo.sexName }}</span>
|
||
<span style="margin-left: 18px">年龄:{{ printData.patientInfo.patientAge }}</span>
|
||
<span style="margin-left: 18px">卡号:{{ printData.patientInfo.hisNo }}</span>
|
||
<span style="margin-left: 18px">科室:{{ printData.patientInfo.deptName }}</span>
|
||
</div>
|
||
</div>
|
||
<div
|
||
id="div2"
|
||
class="printView_content"
|
||
>
|
||
<table
|
||
border="1"
|
||
cellSpacing="0"
|
||
cellPadding="1"
|
||
style=" border-collapse:collapse; font-size: 14px"
|
||
bordercolor="#333333"
|
||
>
|
||
<thead>
|
||
<TR style="height: 30px">
|
||
<TD rowspan="1">
|
||
<DIV
|
||
style="width: 35px"
|
||
align="center"
|
||
>
|
||
时间
|
||
</DIV>
|
||
</TD>
|
||
<TD colspan="1">
|
||
<DIV
|
||
style="width: 280px"
|
||
align="center"
|
||
>
|
||
药品名称
|
||
</DIV>
|
||
</TD>
|
||
<TD colspan="1">
|
||
<DIV
|
||
style="width: 10px"
|
||
align="center"
|
||
/>
|
||
</TD>
|
||
<TD rowspan="1">
|
||
<DIV
|
||
style="width: 55px"
|
||
align="center"
|
||
>
|
||
剂量
|
||
</DIV>
|
||
</TD>
|
||
<TD colspan="1">
|
||
<DIV
|
||
style="width: 30px"
|
||
align="center"
|
||
>
|
||
频次
|
||
</DIV>
|
||
</TD>
|
||
<TD colspan="1">
|
||
<DIV
|
||
style="width: 55px"
|
||
align="center"
|
||
>
|
||
用法
|
||
</DIV>
|
||
</TD>
|
||
<TD rowspan="1">
|
||
<DIV
|
||
style="width: 70px"
|
||
align="center"
|
||
>
|
||
执行时间
|
||
</DIV>
|
||
</TD>
|
||
<TD rowspan="1">
|
||
<DIV
|
||
style="width: 55px"
|
||
align="center"
|
||
>
|
||
执行人
|
||
</DIV>
|
||
</TD>
|
||
</TR>
|
||
</thead>
|
||
<tbody style=" border-collapse:collapse;">
|
||
<tr
|
||
v-for="item in printData.recordData"
|
||
:key="item.id"
|
||
>
|
||
<td v-html="item.moTime.substring(0,16)" />
|
||
<td v-html="item.orderName" />
|
||
<td v-html="item.flag" />
|
||
<td v-html="item.doseOnce + item.doseUnit" />
|
||
<td v-html="item.freqName" />
|
||
<td v-html="item.usageName" />
|
||
<td />
|
||
<td />
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<script>
|
||
// 迁移到 hiprint
|
||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||
import useUserStore from '@/store/modules/user'
|
||
|
||
export default {
|
||
setup() {
|
||
const userStore = useUserStore();
|
||
return { userStore };
|
||
},
|
||
data() {
|
||
return {
|
||
printData: {
|
||
patientInfo: {},
|
||
recordData: {}
|
||
}
|
||
}
|
||
},
|
||
mounted() {},
|
||
methods: {
|
||
/**
|
||
* 使用 hiprint 执行打印
|
||
*/
|
||
async printTest() {
|
||
try {
|
||
// 构建打印数据
|
||
const recordData = (this.printData.recordData || []).map(item => ({
|
||
moTime: item.moTime ? item.moTime.substring(0, 16) : '',
|
||
orderName: item.orderName || '',
|
||
flag: item.flag || '',
|
||
doseOnceUnit: (item.doseOnce || '') + (item.doseUnit || ''),
|
||
freqName: item.freqName || '',
|
||
usageName: item.usageName || ''
|
||
}))
|
||
|
||
const printData = {
|
||
hospitalName: this.userStore.hospitalName,
|
||
encounterLocationName: this.printData.patientInfo ? this.printData.patientInfo.encounterLocationName : '',
|
||
name: this.printData.patientInfo ? this.printData.patientInfo.name : '',
|
||
sexName: this.printData.patientInfo ? this.printData.patientInfo.sexName : '',
|
||
patientAge: this.printData.patientInfo ? this.printData.patientInfo.patientAge : '',
|
||
hisNo: this.printData.patientInfo ? this.printData.patientInfo.hisNo : '',
|
||
deptName: this.printData.patientInfo ? this.printData.patientInfo.deptName : '',
|
||
recordData: recordData
|
||
}
|
||
// 使用 hiprint 打印(复用医嘱执行单模板)
|
||
await simplePrint(PRINT_TEMPLATE.EXE_ORDER_SHEET, printData)
|
||
} catch (error) {
|
||
console.error('输液执行单打印失败:', error)
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<style scoped lang="less">
|
||
.recordBill {
|
||
border: #8d8d8d 1px solid;
|
||
display: grid;
|
||
grid-template-rows: 90px 1fr;
|
||
height: 200px !important;
|
||
width: 680px;
|
||
|
||
/deep/ .el-table .cell {
|
||
font-size: 10px !important;
|
||
}
|
||
.printView_header {
|
||
grid-template-rows: 40px 30px 30px;
|
||
height: 200px !important;
|
||
h4{
|
||
text-align: center;
|
||
margin: 15px;
|
||
}
|
||
}
|
||
.printView_content{
|
||
|
||
}
|
||
}
|
||
|
||
</style>
|