This commit is contained in:
Ranyunqiao
2026-06-12 11:09:03 +08:00
parent f407a2a886
commit a08808b41d
2 changed files with 421 additions and 107 deletions

View File

@@ -712,6 +712,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
tempServiceRequest.setUnitCode(regAdviceSaveDto.getUnitCode()); // 请求单位编码 tempServiceRequest.setUnitCode(regAdviceSaveDto.getUnitCode()); // 请求单位编码
tempServiceRequest.setCategoryEnum(regAdviceSaveDto.getCategoryEnum()); // 请求类型 tempServiceRequest.setCategoryEnum(regAdviceSaveDto.getCategoryEnum()); // 请求类型
tempServiceRequest.setTherapyEnum(regAdviceSaveDto.getTherapyEnum()); // 治疗类型,临时(需要前端传) tempServiceRequest.setTherapyEnum(regAdviceSaveDto.getTherapyEnum()); // 治疗类型,临时(需要前端传)
tempServiceRequest.setRateCode(regAdviceSaveDto.getRateCode()); // 用药频次
// 文字医嘱(type=8)不走定价体系activityId设置为0L占位 // 文字医嘱(type=8)不走定价体系activityId设置为0L占位
if (ItemType.TEXT.getValue().equals(regAdviceSaveDto.getAdviceType())) { if (ItemType.TEXT.getValue().equals(regAdviceSaveDto.getAdviceType())) {
tempServiceRequest.setActivityId(0L); tempServiceRequest.setActivityId(0L);

View File

@@ -1,20 +1,47 @@
<template> <template>
<div class="inpatientDoctor-order-container" style="width: 100%"> <div
<div style="margin-bottom: 5px" class="order-operate-btn"> class="inpatientDoctor-order-container"
style="width: 100%"
>
<div
style="margin-bottom: 5px"
class="order-operate-btn"
>
<div style="height: 44px; display: flex; align-items: center; flex: none"> <div style="height: 44px; display: flex; align-items: center; flex: none">
<el-button type="primary" @click="handleAddPrescription()" :disabled="false"> <el-button
type="primary"
:disabled="false"
@click="handleAddPrescription()"
>
新增 新增
</el-button> </el-button>
<el-button type="primary" @click="handleSaveBatch()" :disabled="false"> 保存 </el-button> <el-button
<el-button type="primary" @click="handleSave()" :disabled="isSaveDisabled"> 签发 </el-button> type="primary"
<el-button type="warning" plain @click="handleSingOut()" :disabled="false"> :disabled="false"
@click="handleSaveBatch()"
>
保存
</el-button>
<el-button
type="primary"
:disabled="isSaveDisabled"
@click="handleSave()"
>
签发
</el-button>
<el-button
type="warning"
plain
:disabled="false"
@click="handleSingOut()"
>
撤回 撤回
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
plain plain
@click="proxy.$refs.orderFroupRef.handleOpen()"
:disabled="false" :disabled="false"
@click="proxy.$refs.orderFroupRef.handleOpen()"
> >
组套 组套
</el-button> </el-button>
@@ -26,17 +53,50 @@
> >
历史 历史
</el-button> </el-button>
<el-button type="default" @click="combination()" :disabled="false"> 组合 </el-button> <el-button
<el-button type="default" @click="split()" :disabled="false"> 拆组 </el-button> type="default"
<el-button type="danger" plain @click="handleStopAdvice()" :disabled="false"> :disabled="false"
@click="combination()"
>
组合
</el-button>
<el-button
type="default"
:disabled="false"
@click="split()"
>
拆组
</el-button>
<el-button
type="danger"
plain
:disabled="false"
@click="handleStopAdvice()"
>
停嘱 停嘱
</el-button> </el-button>
<el-button type="success" plain @click="handleResumeAdvice()" :disabled="false"> <el-button
type="success"
plain
:disabled="false"
@click="handleResumeAdvice()"
>
恢复 恢复
</el-button> </el-button>
<el-button type="danger" plain @click="handleDelete()" :disabled="false"> 删除 </el-button> <el-button
type="danger"
plain
:disabled="false"
@click="handleDelete()"
>
删除
</el-button>
<span class="descriptions-item-label"> 诊断 </span> <span class="descriptions-item-label"> 诊断 </span>
<el-select v-model="conditionDefinitionId" placeholder="诊断" style="width: 180px"> <el-select
v-model="conditionDefinitionId"
placeholder="诊断"
style="width: 180px"
>
<el-option <el-option
v-for="item in diagnosisList" v-for="item in diagnosisList"
:key="item.conditionId" :key="item.conditionId"
@@ -46,7 +106,11 @@
/> />
</el-select> </el-select>
<span class="descriptions-item-label"> 费用性质 </span> <span class="descriptions-item-label"> 费用性质 </span>
<el-select v-model="accountId" placeholder="费用性质" style="width: 180px"> <el-select
v-model="accountId"
placeholder="费用性质"
style="width: 180px"
>
<el-option <el-option
v-for="item in contractList" v-for="item in contractList"
:key="item.accountId" :key="item.accountId"
@@ -61,50 +125,96 @@
刷新 刷新
</el-button> --> </el-button> -->
</div> </div>
<div class="operate-btns" style="display: flex; align-items: center; gap: 12px;"> <div
<el-radio-group v-model="therapyEnum"> class="operate-btns"
<el-radio-button value="">全部</el-radio-button> style="display: flex; align-items: center; gap: 12px;"
<el-radio-button value="1">长期</el-radio-button> >
<el-radio-button value="2">临时</el-radio-button> <el-radio-group v-model="therapyEnum">
</el-radio-group> <el-radio-button value="">
<el-select v-model="orderClassCode" placeholder="医嘱类型" style="width: 240px" clearable> 全部
<el-option </el-radio-button>
v-for="item in adviceTypeList" <el-radio-button value="1">
:key="item.value" 长期
:label="item.label" </el-radio-button>
:value="item.value" <el-radio-button value="2">
/> 临时
</el-select> </el-radio-button>
<el-select v-model="orderStatus" placeholder="医嘱状态" style="width: 240px" clearable> </el-radio-group>
<el-option <el-select
v-for="item in statusOption" v-model="orderClassCode"
:key="item.value" placeholder="医嘱类型"
:label="item.label" style="width: 240px"
:value="item.value" clearable
/> >
</el-select> <el-option
<el-button link type="primary" @click="handleTransferOrg">转科</el-button> v-for="item in adviceTypeList"
<el-button link type="primary" :disabled="buttonDisabled" @click="handleLeaveHospital"> :key="item.value"
出院 :label="item.label"
</el-button> :value="item.value"
<el-button link type="primary" @click="onNursingStatus">护理状态</el-button> />
<el-button link type="primary" @click="refresh()">刷新数据</el-button> </el-select>
<el-select
v-model="orderStatus"
placeholder="医嘱状态"
style="width: 240px"
clearable
>
<el-option
v-for="item in statusOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-button
link
type="primary"
@click="handleTransferOrg"
>
转科
</el-button>
<el-button
link
type="primary"
:disabled="buttonDisabled"
@click="handleLeaveHospital"
>
出院
</el-button>
<el-button
link
type="primary"
@click="onNursingStatus"
>
护理状态
</el-button>
<el-button
link
type="primary"
@click="refresh()"
>
刷新数据
</el-button>
</div> </div>
</div> </div>
<div class="inpatientDoctor-order-table"> <div class="inpatientDoctor-order-table">
<vxe-table <vxe-table
ref="prescriptionRef"
v-loading="loading"
auto-resize auto-resize
height="100%" height="100%"
ref="prescriptionRef"
:data="filterPrescriptionList" :data="filterPrescriptionList"
:row-config="{ keyField: 'uniqueKey' }" :expand-config="{ expandRowKeys: expandOrder }" :row-config="{ keyField: 'uniqueKey' }"
:expand-config="{ expandRowKeys: expandOrder }"
border border
@cell-click="clickRow" @cell-click="clickRow"
@cell-dblclick="clickRowDb" @cell-dblclick="clickRowDb"
v-loading="loading"
@checkbox-change="handleSelectionChange" @checkbox-change="handleSelectionChange"
> >
<vxe-column type="expand" width="40"> <vxe-column
type="expand"
width="40"
>
<template #content="scope"> <template #content="scope">
<OrderForm <OrderForm
:row="scope.row" :row="scope.row"
@@ -118,21 +228,39 @@
/> />
</template> </template>
</vxe-column> </vxe-column>
<vxe-column type="checkbox" align="center" width="60" /> <vxe-column
<vxe-column title="组" align="center" width="60" field="groupIcon" /> type="checkbox"
align="center"
width="60"
/>
<vxe-column
title="组"
align="center"
width="60"
field="groupIcon"
/>
<vxe-column title="类型" align="center" field="" width="140"> <vxe-column
title="类型"
align="center"
field=""
width="140"
>
<template #default="scope"> <template #default="scope">
<el-radio-group <el-radio-group
v-if="getRowDisabled(scope.row)"
v-model="scope.row.therapyEnum" v-model="scope.row.therapyEnum"
size="small" size="small"
v-if="getRowDisabled(scope.row)"
:disabled="scope.row.dischargeFlag" :disabled="scope.row.dischargeFlag"
@click.stop
style="white-space: nowrap" style="white-space: nowrap"
@click.stop
> >
<el-radio-button value="1">长期</el-radio-button> <el-radio-button value="1">
<el-radio-button value="2">临时</el-radio-button> 长期
</el-radio-button>
<el-radio-button value="2">
临时
</el-radio-button>
</el-radio-group> </el-radio-group>
<span <span
v-else v-else
@@ -142,12 +270,22 @@
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="开嘱医生" align="center" field="requesterId_dictText" width="120"> <vxe-column
title="开嘱医生"
align="center"
field="requesterId_dictText"
width="120"
>
<template #default="scope"> <template #default="scope">
{{ scope.row.requesterId_dictText || '-' }} {{ scope.row.requesterId_dictText || '-' }}
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="开始时间" align="center" field="startTime" width="200"> <vxe-column
title="开始时间"
align="center"
field="startTime"
width="200"
>
<template #default="scope"> <template #default="scope">
<el-date-picker <el-date-picker
v-if="scope.row.isEdit" v-if="scope.row.isEdit"
@@ -164,14 +302,20 @@
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="医嘱" align="center" field="productName" width="300"> <vxe-column
title="医嘱"
align="center"
field="productName"
width="300"
>
<template #default="scope"> <template #default="scope">
<template v-if="getRowDisabled(scope.row)"> <template v-if="getRowDisabled(scope.row)">
<el-select <el-select
:ref="'adviceTypeRef' + scope.rowIndex"
style="width: 35%; margin-right: 8px" style="width: 35%; margin-right: 8px"
:model-value="getRowSelectValue(scope.row)" :model-value="getRowSelectValue(scope.row)"
:ref="'adviceTypeRef' + scope.rowIndex"
:disabled="!isCategoryLoaded" :disabled="!isCategoryLoaded"
clearable
@change=" @change="
(value) => { (value) => {
filterPrescriptionList[scope.rowIndex].adviceName = undefined; filterPrescriptionList[scope.rowIndex].adviceName = undefined;
@@ -206,7 +350,6 @@
} }
} }
" "
clearable
> >
<el-option <el-option
v-for="item in adviceTypeList" v-for="item in adviceTypeList"
@@ -223,14 +366,14 @@
> >
<adviceBaseList <adviceBaseList
ref="adviceTableRef" ref="adviceTableRef"
:patientInfo="patientInfo" :patient-info="patientInfo"
@selectAdviceBase="(row) => selectAdviceBase(scope.row.uniqueKey, row)" @select-advice-base="(row) => selectAdviceBase(scope.row.uniqueKey, row)"
/> />
<template #reference> <template #reference>
<el-input <el-input
:ref="'adviceRef' + scope.rowIndex" :ref="'adviceRef' + scope.rowIndex"
style="width: 62%"
v-model="scope.row.adviceName" v-model="scope.row.adviceName"
style="width: 62%"
placeholder="请选择项目" placeholder="请选择项目"
@input="handleChange" @input="handleChange"
@focus="handleFocus(scope.row, scope.rowIndex)" @focus="handleFocus(scope.row, scope.rowIndex)"
@@ -255,33 +398,99 @@
<span v-else>{{ scope.row.adviceName }}</span> <span v-else>{{ scope.row.adviceName }}</span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="状态" align="center" field="" width="90"> <vxe-column
title="状态"
align="center"
field=""
width="90"
>
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.chargeStatus == 5" type="info"> <el-tag
v-if="scope.row.chargeStatus == 5"
type="info"
>
{{ scope.row.chargeStatus_enumText }} {{ scope.row.chargeStatus_enumText }}
</el-tag> </el-tag>
<el-tag v-else-if="scope.row.statusEnum == 2" type="success">已签发</el-tag> <el-tag
<el-tag v-else-if="!scope.row.requestId && scope.row.statusEnum == 1" type="warning"> v-else-if="scope.row.statusEnum == 2"
type="success"
>
已签发
</el-tag>
<el-tag
v-else-if="!scope.row.requestId && scope.row.statusEnum == 1"
type="warning"
>
待保存 待保存
</el-tag> </el-tag>
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">待签发</el-tag> <el-tag
<el-tag v-else-if="scope.row.statusEnum == 10" type="primary">已校对</el-tag> v-else-if="scope.row.statusEnum == 1"
<el-tag v-else-if="scope.row.statusEnum == 11" type="primary">待接收</el-tag> type="primary"
<el-tag v-else-if="scope.row.statusEnum == 3" type="success">已校对</el-tag> >
<el-tag v-else-if="scope.row.statusEnum == 13" type="warning">已停嘱</el-tag> 待签发
<el-tag v-else-if="scope.row.statusEnum == 6" type="danger">停止</el-tag> </el-tag>
<el-tag v-else-if="scope.row.statusEnum == 20" type="success">已完成</el-tag> <el-tag
<el-tag v-else type="info">{{ scope.row.chargeStatus_enumText }}</el-tag> v-else-if="scope.row.statusEnum == 10"
type="primary"
>
已校对
</el-tag>
<el-tag
v-else-if="scope.row.statusEnum == 11"
type="primary"
>
待接收
</el-tag>
<el-tag
v-else-if="scope.row.statusEnum == 3"
type="success"
>
已校对
</el-tag>
<el-tag
v-else-if="scope.row.statusEnum == 13"
type="warning"
>
已停嘱
</el-tag>
<el-tag
v-else-if="scope.row.statusEnum == 6"
type="danger"
>
停止
</el-tag>
<el-tag
v-else-if="scope.row.statusEnum == 20"
type="success"
>
已完成
</el-tag>
<el-tag
v-else
type="info"
>
{{ scope.row.chargeStatus_enumText }}
</el-tag>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="单次剂量" align="center" field="" width="120"> <vxe-column
title="单次剂量"
align="center"
field=""
width="120"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.dose ? scope.row.dose + ' ' + scope.row.doseUnitCode_dictText : '' }} {{ scope.row.dose ? scope.row.dose + ' ' + scope.row.doseUnitCode_dictText : '' }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="总量" align="center" field="" width="100"> <vxe-column
title="总量"
align="center"
field=""
width="100"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ {{
@@ -292,43 +501,77 @@
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="总金额" align="right" field="" header-align="center" width="100"> <vxe-column
title="总金额"
align="right"
field=""
header-align="center"
width="100"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit" style="text-align: right"> <span
v-if="!scope.row.isEdit"
style="text-align: right"
>
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }} {{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="药房/科室" align="center" field="" width="240"> <vxe-column
title="药房/科室"
align="center"
field=""
width="240"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.positionName || scope.row.orgName }} {{ scope.row.positionName || scope.row.orgName }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="频次/用法" align="center" field="" width="180"> <vxe-column
title="频次/用法"
align="center"
field=""
width="180"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit && scope.row.adviceType == 1" style="text-align: right"> <span
v-if="!scope.row.isEdit && (scope.row.adviceType == 1 || scope.row.adviceType == 7 || scope.row.adviceType == 8)"
style="text-align: right"
>
{{ {{
[ scope.row.adviceType == 8
scope.row.rateCode_dictText, ? (scope.row.rateCode_dictText || scope.row.rateCode || '-')
scope.row.dispensePerDuration ? scope.row.dispensePerDuration + '' : '', : [
scope.row.methodCode_dictText, scope.row.rateCode_dictText,
] scope.row.dispensePerDuration ? scope.row.dispensePerDuration + '天' : '',
.filter(Boolean) scope.row.methodCode_dictText,
.join(' ') ]
.filter(Boolean)
.join(' ')
}} }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="注射药品" align="center" field="" width="80"> <vxe-column
title="注射药品"
align="center"
field=""
width="80"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.injectFlag_enumText || '-' }} {{ scope.row.injectFlag_enumText || '-' }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="皮试" align="center" field="" width="80"> <vxe-column
title="皮试"
align="center"
field=""
width="80"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.skinTestFlag_enumText || '-' }} {{ scope.row.skinTestFlag_enumText || '-' }}
@@ -340,33 +583,60 @@
size="small" size="small"
@click.stop @click.stop
> >
<el-option :value="1" label="是" /> <el-option
<el-option :value="0" label="否" /> :value="1"
label=""
/>
<el-option
:value="0"
label=""
/>
</el-select> </el-select>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="停嘱医生" align="center" field="stopUserName" width="120"> <vxe-column
title="停嘱医生"
align="center"
field="stopUserName"
width="120"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.stopUserName || "-" }} {{ scope.row.stopUserName || "-" }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="停嘱时间" align="center" field="stopTime" width="170"> <vxe-column
title="停嘱时间"
align="center"
field="stopTime"
width="170"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.stopTime || "-" }} {{ scope.row.stopTime || "-" }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="备注" align="center" field="remark" width="150" show-overflow="title"> <vxe-column
title="备注"
align="center"
field="remark"
width="150"
show-overflow="title"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.remark || '-' }} {{ scope.row.remark || '-' }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="诊断" align="center" field="diagnosisName" width="150"> <vxe-column
title="诊断"
align="center"
field="diagnosisName"
width="150"
>
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.isEdit"> <span v-if="!scope.row.isEdit">
{{ scope.row.diagnosisName || scope.row.conditionDefinitionName }} {{ scope.row.diagnosisName || scope.row.conditionDefinitionName }}
@@ -376,18 +646,21 @@
</vxe-table> </vxe-table>
</div> </div>
<!-- // 底部按钮 --> <!-- // 底部按钮 -->
<application-form-bottom-btn :patientInfo="patientInfo" @refResh="refresh" /> <application-form-bottom-btn
:patient-info="patientInfo"
@ref-resh="refresh"
/>
<OrderGroupDrawer <OrderGroupDrawer
ref="orderFroupRef" ref="orderFroupRef"
:diagnosis="diagnosisInfo" :diagnosis="diagnosisInfo"
:organizationId="patientInfo?.orgId || ''" :organization-id="patientInfo?.orgId || ''"
@useOrderGroup="handleSaveGroup" @use-order-group="handleSaveGroup"
/> />
<PrescriptionHistory <PrescriptionHistory
ref="prescriptionHistoryRef" ref="prescriptionHistoryRef"
:diagnosis="diagnosisInfo" :diagnosis="diagnosisInfo"
:patientInfo="patientInfo || {}" :patient-info="patientInfo || {}"
@userPrescriptionHistory="handleSaveHistory" @user-prescription-history="handleSaveHistory"
/> />
<LeaveHospitalDialog <LeaveHospitalDialog
ref="leaveHospitalDialogRef" ref="leaveHospitalDialogRef"
@@ -406,12 +679,27 @@
</div> </div>
</template> </template>
</el-drawer> --> </el-drawer> -->
<el-dialog v-model="openDrawer" width="85%" style="height: 800px"> <el-dialog
<NursingStatus></NursingStatus> v-model="openDrawer"
width="85%"
style="height: 800px"
>
<NursingStatus />
</el-dialog> </el-dialog>
<el-dialog v-model="stopDialogVisible" title="停嘱确认" width="400px" :close-on-click-modal="false"> <el-dialog
<el-form :model="stopForm" label-width="100px"> v-model="stopDialogVisible"
<el-form-item label="停嘱时间" required> title="停嘱确认"
width="400px"
:close-on-click-modal="false"
>
<el-form
:model="stopForm"
label-width="100px"
>
<el-form-item
label="停嘱时间"
required
>
<el-date-picker <el-date-picker
v-model="stopForm.stopTime" v-model="stopForm.stopTime"
type="datetime" type="datetime"
@@ -423,8 +711,15 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<el-button @click="stopDialogVisible = false">取消</el-button> <el-button @click="stopDialogVisible = false">
<el-button type="primary" @click="confirmStopAdvice">确定</el-button> 取消
</el-button>
<el-button
type="primary"
@click="confirmStopAdvice"
>
确定
</el-button>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
@@ -764,6 +1059,9 @@ function getListInfo(addNewRow) {
// 🔧 修复:同时保存 orgName当 orgId 在科室树中匹配不到时作为兜底显示 // 🔧 修复:同时保存 orgName当 orgId 在科室树中匹配不到时作为兜底显示
// 优先从科室树查找名称,其次用 positionName后端已保存的科室名最后用 contentJson 中的 orgName // 优先从科室树查找名称,其次用 positionName后端已保存的科室名最后用 contentJson 中的 orgName
orgName: findOrgName(item.positionId || parsedContent?.orgId || item.orgId) || item.positionName || parsedContent?.orgName || undefined, orgName: findOrgName(item.positionId || parsedContent?.orgId || item.orgId) || item.positionName || parsedContent?.orgName || undefined,
// 确保文字医嘱的 rateCode / rateCode_dictText 不被 item 中的 null/undefined 覆盖
rateCode: item.rateCode || parsedContent?.rateCode || undefined,
rateCode_dictText: item.rateCode_dictText || parsedContent?.rateCode_dictText || undefined,
// Bug #589: 从contentJson检测出院带药标记恢复类型显示 // Bug #589: 从contentJson检测出院带药标记恢复类型显示
// 后端存储时adviceType转为1药品通过prescriptionCategory=3标识出院带药 // 后端存储时adviceType转为1药品通过prescriptionCategory=3标识出院带药
...(parsedContent?.prescriptionCategory == 3 ? { ...(parsedContent?.prescriptionCategory == 3 ? {
@@ -1006,6 +1304,13 @@ function clickRowDb({ row, column, event }) {
if (row.statusEnum == 1) { if (row.statusEnum == 1) {
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1') // 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
row.therapyEnum = String(row.therapyEnum ?? '1'); row.therapyEnum = String(row.therapyEnum ?? '1');
if (row.adviceType == 8) {
if (!row.orgId && userStore.orgId) {
row.orgId = userStore.orgId;
row.positionId = userStore.orgId;
row.orgName = userStore.orgName || findOrgName(userStore.orgId) || '';
}
}
row.isEdit = true; row.isEdit = true;
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey); const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
rowIndex.value = index; rowIndex.value = index;
@@ -1088,6 +1393,14 @@ function handleDiagnosisChange(item) {
function expandTextRow(rowIndex) { function expandTextRow(rowIndex) {
const row = filterPrescriptionList.value[rowIndex]; const row = filterPrescriptionList.value[rowIndex];
if (!row) return; if (!row) return;
// 自动获取当前用户所在的科室
if (!row.orgId && userStore.orgId) {
row.orgId = userStore.orgId;
row.positionId = userStore.orgId;
row.orgName = userStore.orgName || findOrgName(userStore.orgId) || '';
}
expandOrder.value = [row.uniqueKey]; expandOrder.value = [row.uniqueKey];
nextTick(() => { nextTick(() => {
if (prescriptionRef.value?.setRowExpand) { if (prescriptionRef.value?.setRowExpand) {