From 371594bfda1935cb6b9ffb5a04e9a4bfdb5abe69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=90=A6?= Date: Thu, 30 Jul 2026 07:37:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=AF=8A=E6=89=80=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E6=B0=94=E6=B3=A1=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E8=8D=AF=E5=93=81=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=89=93=E5=BC=80=E5=BC=80=E6=96=B9=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E5=88=87=E6=8D=A2tab=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/detail-modal.vue | 40 +++++++++++++++++-- .../system/delivery-warehouse-order/index.vue | 36 ++++++++++++++++- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/system/delivery-warehouse-order/components/detail-modal.vue b/apps/web-antd/src/views/system/delivery-warehouse-order/components/detail-modal.vue index 73db8ec7..8e729f09 100644 --- a/apps/web-antd/src/views/system/delivery-warehouse-order/components/detail-modal.vue +++ b/apps/web-antd/src/views/system/delivery-warehouse-order/components/detail-modal.vue @@ -3,8 +3,9 @@ import { computed, nextTick, ref } from 'vue'; import { useVbenModal } from '@vben/common-ui'; -import { Button, Descriptions, Image, Tabs, Tag, Timeline } from 'ant-design-vue'; +import { Button, Descriptions, Image, Space, Tabs, Tag, Timeline } from 'ant-design-vue'; +import PrescriptionDetail from '#/views/doctor/doctor-reception/components/PrescriptionDetail.vue'; import { getDeliveryWarehouseOrderDetail } from '#/views/system/delivery-warehouse-order/api'; defineOptions({ @@ -25,6 +26,18 @@ const canShip = computed(() => { Number(data.value.status) === 1; return (mineUnsent || legacy) && typeof onShipFn.value === 'function'; }); + +/** 详情内是否可查看处方:有 p_id 且非商城类订单 */ +const canViewPrescription = computed(() => { + const pId = Number(data.value.p_id ?? 0); + const orderType = Number(data.value.order_type ?? 0); + return pId > 0 && orderType !== 2 && orderType !== 3; +}); + +/** 顶部操作栏:有发货或查看处方任一即可显示 */ +const showToolbar = computed( + () => canShip.value || canViewPrescription.value, +); /** 仅使用仓侧详情返回的本仓 packages,避免平台物流接口带出他仓商品 */ const packageTabs = computed(() => { return Array.isArray(data.value.packages) ? data.value.packages : []; @@ -91,6 +104,21 @@ function handleShip() { } } +/** 详情内打开处方详情弹窗 */ +function openPrescriptionDetail() { + const pId = Number(data.value.p_id ?? 0); + if (!pId) { + return; + } + PrescriptionDetailModalApi.setData({ values: pId }); + PrescriptionDetailModalApi.open(); +} + +/** 复用医生端处方详情,详情内自建避免与列表页耦合 */ +const [PrescriptionDetailModal, PrescriptionDetailModalApi] = useVbenModal({ + connectedComponent: PrescriptionDetail, +}); + const [Modal, modalApi] = useVbenModal({ fullscreenButton: false, draggable: true, @@ -119,9 +147,15 @@ const [Modal, modalApi] = useVbenModal({