fix(ui): 修复多个功能模块的验证和数据处理问题

- 在医生工作站退费功能中添加患者选择验证
- 统一药品管理中的仓库类型选择逻辑,移除重复代码
- 修复统计管理页面清空按钮的数据重置问题
- 修正西药管理页面处方打印按钮的功能绑定
- 完善库存报表查询的SQL过滤条件实现
- 更新多个控制器接口参数类型以支持业务流程
- 优化退费列表对话框的数据加载和错误处理
This commit is contained in:
2026-03-02 23:27:11 +08:00
parent ce8b0b16b1
commit 9116ea4a84
22 changed files with 447 additions and 155 deletions

View File

@@ -230,6 +230,67 @@
</el-button>
</div>
</template>
<!-- 🔧 Bug #147 修复:耗材类型(adviceType=4)的编辑模板 -->
<template v-else-if="scope.row.adviceType == 4">
<div style="
display: flex;
align-items: center;
margin-bottom: 16px;
gap: 16px;
">
<span class="medicine-title">
{{
scope.row.adviceName +
" " +
(scope.row.volume || '') +
" [" +
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) &&
isFinite(scope.row.unitPrice) ? Number(scope.row.unitPrice).toFixed(2) : '-') +
" " +
"/" +
(scope.row.unitCode_dictText || '个') +
"]"
}}
</span>
<el-form-item label="数量" prop="quantity" class="required-field" data-prop="quantity">
<el-input-number placeholder="数量" v-model="scope.row.quantity" style="width: 70px"
controls-position="right" :controls="false" :ref="(el) => (inputRefs.quantity = el)"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
@input="calculateTotalAmount(scope.row, scope.$index)" />
</el-form-item>
<el-form-item>
<el-select v-model="scope.row.unitCode" style="width: 70px; margin-right: 20px" placeholder=" "
@change="calculateTotalAmount(scope.row, scope.$index)">
<template v-for="item in scope.row.unitCodeList" :key="item.value">
<el-option v-if="item.type != unitMap['dose']" :value="item.value" :label="item.label" @click="
() => {
scope.row.unitCode_dictText = item.label;
}
" @keyup.enter.prevent="
handleEnter(
'executeNum',
scope.row,
scope.$index,
prescription.id
)
" style="width: 70px; margin-right: 20px" />
</template>
</el-select>
</el-form-item>
<span class="total-amount">
总金额:{{
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice)
&&
isFinite(scope.row.totalPrice))
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
</span>
</div>
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
确定
</el-button>
</template>
<template v-else-if="scope.row.adviceType == 2">
<div style="
display: flex;
@@ -2390,7 +2451,9 @@ function setValue(row) {
prescriptionList.value[rowIndex.value].executeNum = 1;
// 库存列表 + 价格列表拼成批次号的下拉框
if (row.adviceType != 3) {
// 🔧 Bug #147 修复:耗材(adviceType=4)和诊疗(adviceType=3, adviceType=5)不检查库存
// 耗材从getDeviceList接口获取inventoryList为空但需要设置价格
if (row.adviceType != 3 && row.adviceType != 4 && row.adviceType != 5) {
if (row.inventoryList && row.inventoryList.length == 0) {
expandOrder.value = [];
proxy.$modal.msgWarning(row.adviceName + '无库存');
@@ -2431,6 +2494,18 @@ function setValue(row) {
.toFixed(6);
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
}
} else if (row.adviceType == 4) {
// 🔧 Bug #147 修复:耗材类型(adviceType=4)的专门处理
// 耗材从getDeviceList接口获取使用priceList中的价格
if (row.priceList && row.priceList.length > 0) {
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
prescriptionList.value[rowIndex.value].unitTempPrice = row.priceList[0].price;
prescriptionList.value[rowIndex.value].minUnitPrice = row.priceList[0].price;
prescriptionList.value[rowIndex.value].quantity = 1;
prescriptionList.value[rowIndex.value].totalPrice = row.priceList[0].price;
prescriptionList.value[rowIndex.value].positionName = row.positionName || '';
prescriptionList.value[rowIndex.value].locationId = row.positionId;
}
} else {
getOrgList();
// 会诊类型adviceType == 5和诊疗类型adviceType == 3的处理