diff --git a/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue index 3d0a10c6..20de7283 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/billapproval/index.vue @@ -185,6 +185,7 @@ import { getpurchaseInventoryDetail, getpurchaseInventoryDetailReturn } from "./components/api"; +import { purchaseInventoryApproved as purchaseReturnApproved } from '../returnedPurchase/components/api'; import { useStore } from '@/store/store'; import { formatDate } from "@/utils/index"; import useTagsViewStore from '@/store/modules/tagsView'; @@ -260,6 +261,21 @@ function handelApply(row) { getList(); } }) + }else if(row.typeEnum == 5){ // 采购退货审批通过 + console.log("采购退货审批通过,typeEnum:", row.typeEnum); + console.log("供应单据号:", row.supplyBusNo); + purchaseReturnApproved(row.supplyBusNo).then((res) => { + console.log("采购退货审批结果:", res); + if (res.code == 200) { + proxy.$modal.msgSuccess("操作成功"); + getList(); + } else { + proxy.$modal.msgError("操作失败: " + (res.msg || "未知错误")); + } + }).catch((error) => { + console.error("采购退货审批错误:", error); + proxy.$modal.msgError("操作异常: " + error.message); + }); }else{ purchaseInventoryApproved(row.supplyBusNo).then((res) => { if (res.code == 200) { diff --git a/openhis-ui-vue3/src/views/medicationmanagement/returnedPurchase/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/returnedPurchase/index.vue index 090af94a..6bac0fe3 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/returnedPurchase/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/returnedPurchase/index.vue @@ -693,6 +693,7 @@ const multiple = ref(true); const total = ref(0); const title = ref(""); const visible = ref(false); +const pageLoading = ref(false); const row = ref({}); const rowIndex = ref(-1); const totalAmount = ref(0);