From 660717439d4237a1400cc6f6076f040aec33bee6 Mon Sep 17 00:00:00 2001 From: lq Date: Thu, 25 Dec 2025 11:18:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20OSS=E5=AE=A2=E6=88=B7=E7=AB=AF=E7=9B=B4?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/pharmacy/components/modal.vue | 9 +- .../src/views/system/pharmacy/config/table.ts | 8 + .../src/views/system/pharmacy/index.vue | 39 ++++ .../src/views/system/store/api/index.ts | 30 ++++ .../components/BindConsultationModal.vue | 170 ++++++++++++++++++ .../views/system/store/components/modal.vue | 9 +- .../src/views/system/store/config/table.ts | 7 + .../web-antd/src/views/system/store/index.vue | 37 ++++ 8 files changed, 295 insertions(+), 14 deletions(-) create mode 100644 apps/web-antd/src/views/system/store/components/BindConsultationModal.vue diff --git a/apps/web-antd/src/views/system/pharmacy/components/modal.vue b/apps/web-antd/src/views/system/pharmacy/components/modal.vue index 2945f0fa..fe6dc4ca 100644 --- a/apps/web-antd/src/views/system/pharmacy/components/modal.vue +++ b/apps/web-antd/src/views/system/pharmacy/components/modal.vue @@ -58,7 +58,7 @@ const [Modal, modalApi] = useVbenModal({ await formApi.validateAndSubmitForm(); }, // 弹窗打开/关闭状态变化回调 - onOpenChange(isOpen: boolean) { + async onOpenChange(isOpen: boolean) { // 获取表格API引用 gridApi.value = isOpen ? modalApi.getData()?.gridApi : null; if (isOpen) { @@ -75,14 +75,9 @@ const [Modal, modalApi] = useVbenModal({ start_time: dayjs(values.start_time || '08:00', 'HH:mm'), end_time: dayjs(values.end_time || '20:00', 'HH:mm'), // 确保订阅状态有值,如果后端没有返回则默认为0(订阅) - subscribe_price_change: values.subscribe_price_change ?? 0 + subscribe_price_change: values.subscribe_price_change ?? 0, }); } else { - console.log({ - - start_time: dayjs('08:00', 'HH:mm'), - end_time: dayjs('20:00', 'HH:mm') - }) formApi.setValues({ start_time: dayjs('08:00', 'HH:mm'), end_time: dayjs('20:00', 'HH:mm') diff --git a/apps/web-antd/src/views/system/pharmacy/config/table.ts b/apps/web-antd/src/views/system/pharmacy/config/table.ts index e3206f54..46edd1e7 100644 --- a/apps/web-antd/src/views/system/pharmacy/config/table.ts +++ b/apps/web-antd/src/views/system/pharmacy/config/table.ts @@ -33,6 +33,14 @@ export const gridOptions: VxeGridProps = { { type: 'checkbox', width: 60 }, // 复选框列 { field: 'id', align: 'left', title: 'ID', width: 100 }, // ID列 { field: 'name', align: 'left', title: '药店名称' }, // 药店名称列(已从"诊所名称"改为"药店名称") + { + // 在线复诊配置列(合并委托诊所和负责人) + field: 'online_consultation_config', + align: 'left', + title: '在线复诊配置', + width: 160, + slots: { default: 'online_consultation_config' }, + }, { // 是否包邮列(显示为开关) field: 'is_shipping_free', diff --git a/apps/web-antd/src/views/system/pharmacy/index.vue b/apps/web-antd/src/views/system/pharmacy/index.vue index 2fa3a018..06b2d6bb 100644 --- a/apps/web-antd/src/views/system/pharmacy/index.vue +++ b/apps/web-antd/src/views/system/pharmacy/index.vue @@ -23,6 +23,8 @@ import { } from '#/views/system/store/api'; // 导入表单弹窗组件 import FormModalDemo from './components/modal.vue'; +// 导入绑定在线复诊配置弹窗(使用store的组件) +import BindConsultationModal from '#/views/system/store/components/BindConsultationModal.vue'; // 导入搜索表单配置 import { formOptions } from './config/search'; // 导入表格配置 @@ -76,6 +78,22 @@ const [FormModal, formModalApi] = useVbenModal({ connectedComponent: FormModalDemo, }); +// 初始化绑定在线复诊配置弹窗 +const [BindConsultationModalComponent, bindConsultationModalApi] = useVbenModal({ + connectedComponent: BindConsultationModal, +}); + +/** + * 打开绑定在线复诊配置弹窗 + */ +const showBindConsultationModal = (row: any) => { + bindConsultationModalApi.setData({ + values: row, + gridApi, + }); + bindConsultationModalApi.open(); +}; + // 显示表单弹窗(新增或编辑) const showModal = (data = {}, isUpdate = false) => { formModalApi.setData({ @@ -163,6 +181,7 @@ const updateSubscribe = (id: number) => { + +