From 17c7cc70ed281459b5d81421c913959934764170 Mon Sep 17 00:00:00 2001 From: nanyangbreeze <1955231298@qq.com> Date: Wed, 24 Dec 2025 15:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E5=93=81=E5=87=BA=E8=B4=A7=E5=8D=95?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E8=A2=AB=E9=9A=90=E8=97=8Fbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...macyWarehouseStockOutOrderServiceImpl.java | 12 +- .../openhis/common/enums/SupplyCategory.java | 8 +- .../stockOutOrder/components/orderTable.vue | 20 +++- .../medicineStorage/stockOutOrder/index.vue | 109 ++++++++++++++++-- 4 files changed, 125 insertions(+), 24 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacyWarehousemanage/appservice/impl/PharmacyWarehouseStockOutOrderServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacyWarehousemanage/appservice/impl/PharmacyWarehouseStockOutOrderServiceImpl.java index a470a972..493da6ae 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacyWarehousemanage/appservice/impl/PharmacyWarehouseStockOutOrderServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacyWarehousemanage/appservice/impl/PharmacyWarehouseStockOutOrderServiceImpl.java @@ -59,12 +59,12 @@ public class PharmacyWarehouseStockOutOrderServiceImpl implements IPharmacyWareh // 单据分类 List supplyCategoryOption = new ArrayList<>(); -// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.IN_HOSPITAL_OUTBOUND.getValue(), -// SupplyCategory.IN_HOSPITAL_OUTBOUND.getInfo())); -// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getValue(), -// SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getInfo())); -// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OTHER_OUTBOUND.getValue(), -// SupplyCategory.OTHER_OUTBOUND.getInfo())); + supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.IN_HOSPITAL_OUTBOUND.getValue(), + SupplyCategory.IN_HOSPITAL_OUTBOUND.getInfo())); + supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getValue(), + SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getInfo())); + supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OTHER_OUTBOUND.getValue(), + SupplyCategory.OTHER_OUTBOUND.getInfo())); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); diff --git a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/SupplyCategory.java b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/SupplyCategory.java index 1fec199b..f174abf0 100644 --- a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/SupplyCategory.java +++ b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/SupplyCategory.java @@ -24,7 +24,7 @@ public enum SupplyCategory implements HisEnumInterface { /** * 非库存供应 */ - NON_STOCK(2, "2", "非库存供应"); + NON_STOCK(2, "2", "非库存供应"), // /** // * 普通 @@ -61,15 +61,15 @@ public enum SupplyCategory implements HisEnumInterface { // /** // * 院内出库 // */ - // IN_HOSPITAL_OUTBOUND(11, "11","0.院内出库"), + IN_HOSPITAL_OUTBOUND(11, "11","0.院内出库"), // /** // * 院外出库 // */ - // OUT_OF_HOSPITAL_OUTBOUND(12, "12","1.院外出库"), + OUT_OF_HOSPITAL_OUTBOUND(12, "12","1.院外出库"), // /** // * 其他出库 // */ - // OTHER_OUTBOUND(13, "13","2.其他出库"), + OTHER_OUTBOUND(13, "13","2.其他出库"); // /** // * 普通损益 // */ diff --git a/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/components/orderTable.vue b/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/components/orderTable.vue index 23598d40..dab8e3b9 100644 --- a/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/components/orderTable.vue +++ b/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/components/orderTable.vue @@ -1353,27 +1353,37 @@ const handleSave = async () => { addOrEditOrder(editData).then((res) => { if (res.code === 200) { proxy.$message.success('新增成功'); - // 调用父组件的 getList 方法 - emit('getList'); + // 调用父组件的 getList 方法,传递 true 清除临时订单 + emit('getList', true); // 清空表单 resetAllData(); // 关闭加载 loading.value = false; + } else { + proxy.$message.error(res.msg || '新增失败'); + loading.value = false; } + }).catch((error) => { + proxy.$message.error(error.message || '新增失败,请检查网络或联系管理员'); + loading.value = false; }); } else if (localIsAddOrEditOrder.value.isEditOrder) { addOrEditOrder(editData).then((res) => { if (res.code === 200) { proxy.$message.success('保存成功'); - // 调用父组件的 getList 方法 - emit('getList'); + // 调用父组件的 getList 方法,传递 true 清除临时订单 + emit('getList', true); // 清空表单 resetAllData(); } else { - proxy.$message.error('保存失败'); + proxy.$message.error(res.msg || '保存失败'); } // 关闭加载 loading.value = false; + }).catch((error) => { + proxy.$message.error(error.message || '保存失败,请检查网络或联系管理员'); + // 关闭加载 + loading.value = false; }); } }; diff --git a/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/index.vue b/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/index.vue index bebc1f2f..01a80c1c 100644 --- a/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/index.vue +++ b/openhis-ui-vue3/src/views/medicineStorage/stockOutOrder/index.vue @@ -113,6 +113,14 @@
+ +
+ + + 新增单据 + +
+ - -
- - 新增单据 - + +
+
@@ -205,7 +211,7 @@