From 71e3601d51bfdbaaaa48278b1a874c09aaccc7c0 Mon Sep 17 00:00:00 2001 From: chenqi Date: Thu, 26 Mar 2026 16:54:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(prescription):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=A4=84=E6=96=B9=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E5=B9=B6=E4=BC=98=E5=8C=96=E8=8D=AF=E5=93=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=95=8C=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在处方列表中新增总价、剂量和剂量数量字段 - 修复药品审批页面跳转时仓库信息丢失问题 - 扩展药品列表列宽度并启用溢出提示功能 - 为采购单界面添加多种视图状态下的字段禁用逻辑 - 优化采购单仓库位置字段的初始化流程,防止数据丢失 --- .../prescription/prescriptionlist.vue | 5 ++- .../billapproval/index.vue | 5 +++ .../components/medicineList.vue | 3 +- .../purchaseDocument/index.vue | 38 ++++++++++++------- 4 files changed, 35 insertions(+), 16 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index a84cdbbe..af2a24f7 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -2144,7 +2144,10 @@ function handleDelete() { adviceType: item.adviceType, statusEnum: item.statusEnum, adviceName: item.adviceName, - uniqueKey: item.uniqueKey + uniqueKey: item.uniqueKey, + totalPrice: item.totalPrice, + dose: item.dose, + doseQuantity: item.doseQuantity }))); for (let i = prescriptionList.value.length - 1; i >= 0; i--) { diff --git a/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue index 0dd0c3a7..a375d896 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue @@ -310,6 +310,11 @@ function handelApplys(row, view) { // 采购入库 1 getpurchaseInventoryDetail(row.supplyBusNo).then((response) => { let currentData = response.data; + // 从明细数据中获取仓库ID并设置到row,确保跳转后仓库字段能正确显示 + if (currentData && currentData.length > 0 && !row.purposeLocationId) { + row.purposeLocationId = currentData[0].purposeLocationId; + row.purposeLocationId_dictText = currentData[0].purposeLocationName; + } store.setCurrentData({ editRow: row, item: currentData }); router.replace({ path: '/medicationmanagement/medicationmanagement/purchaseDocument', diff --git a/openhis-ui-vue3/src/views/medicationmanagement/purchaseDocument/components/medicineList.vue b/openhis-ui-vue3/src/views/medicationmanagement/purchaseDocument/components/medicineList.vue index f72d345a..fcfedefb 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/purchaseDocument/components/medicineList.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/purchaseDocument/components/medicineList.vue @@ -16,7 +16,8 @@ label="项目名称" align="center" prop="name" - width="180" + width="250" + :show-overflow-tooltip="true" /> @@ -152,6 +154,7 @@ clearable filterable style="width: 200px" + :disabled="viewStatus == 'view' || viewStatus == 'apply'" @visible-change="handleHeaderLocationVisibleChange" > @@ -219,8 +222,9 @@ align="center" key="name" prop="name" - width="200" + width="250" fixed + :show-overflow-tooltip="true" > @@ -426,7 +430,7 @@ placeholder="" @blur="handleTotalPrice(scope.$index)" :class="{ 'error-border': scope.row.error }" - :disabled="viewStatus == 'view'" + :disabled="viewStatus == 'view' || viewStatus == 'apply'" > @@ -467,7 +471,7 @@ v-model="scope.row.lotNumber" placeholder="" maxlength="100" - :disabled="viewStatus == 'view'" + :disabled="viewStatus == 'view' || viewStatus == 'apply'" /> @@ -490,7 +494,7 @@ placeholder="选择日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" - :disabled="viewStatus == 'view'" + :disabled="viewStatus == 'view' || viewStatus == 'apply'" @change="changeValStart($event, scope.$index)" /> @@ -509,7 +513,7 @@ :rules="tableRules.endTime" > @@ -557,7 +561,7 @@ @@ -1855,13 +1859,19 @@ function edit() { : editData.value.item[0].purposeTypeEnum.toString(); receiptHeaderForm.medicationType = editData.value.item[0].itemTable == "med_medication_definition" ? "1" : "2"; - receiptHeaderForm.headerLocationId = editData.value.editRow?.purposeLocationId || null; + // 先保存仓库ID,因为handleChangeLocationType会清空headerLocationId + const savedLocationId = + editData.value.editRow?.purposeLocationId || + (editData.value.item && editData.value.item.length > 0 ? editData.value.item[0].purposeLocationId : null) || + null; total.value = form.purchaseinventoryList.length; handleChangeLocationType( editData.value.editRow.purposeTypeEnum ? editData.value.editRow.purposeTypeEnum.toString() : editData.value.item[0].purposeTypeEnum.toString() ); + // 在handleChangeLocationType之后再设置仓库ID + receiptHeaderForm.headerLocationId = savedLocationId; setTimeout(() => { form.purchaseinventoryList = editData.value.item.map((item) => { return {