diff --git a/apps/web-antd/src/views/doctor/doctor-reception/index.vue b/apps/web-antd/src/views/doctor/doctor-reception/index.vue index 170063cc..8f0521f5 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/index.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/index.vue @@ -1013,9 +1013,24 @@ function tabChange(id) { /** * 检测并显示转诊提示 * @description 当切换到中药处方时,如果当前诊所为西医诊所,显示转诊提示 + * 半小时内只提醒一次 */ async function checkAndShowTransferTip() { try { + // 检查上次提醒时间,如果距离上次提醒不足30分钟,则不显示警告 + const storageKey = `transferTipLastShown_${myStoreId.value}`; + const lastShownTime = localStorage.getItem(storageKey); + const now = Date.now(); + const thirtyMinutes = 30 * 60 * 1000; // 30分钟 = 1800000 毫秒 + + if (lastShownTime) { + const timeDiff = now - Number.parseInt(lastShownTime); + if (timeDiff < thirtyMinutes) { + // 距离上次提醒不足30分钟,不显示警告 + return; + } + } + // 调用新接口获取当前诊所类型和委托诊所信息 const storeInfo = await getCurrentStoreTypeApi(); // const storeInfo = res; @@ -1036,6 +1051,9 @@ async function checkAndShowTransferTip() { content: `检测到当前诊所为西医诊所,本次处方开具后自动转接到【${storeName}】的【${doctorName}】的在线复诊中`, }); infoModalApi.open(); + + // 更新上次提醒时间戳 + localStorage.setItem(storageKey, String(now)); } } catch (error) { console.error('获取诊所信息失败:', error); diff --git a/apps/web-antd/src/views/system/pharmacy/index.vue b/apps/web-antd/src/views/system/pharmacy/index.vue index a0f53d3b..85dbdb30 100644 --- a/apps/web-antd/src/views/system/pharmacy/index.vue +++ b/apps/web-antd/src/views/system/pharmacy/index.vue @@ -211,6 +211,7 @@ const batchSyncDrugPrice = () => { label: '新增', type: 'primary', icon: 'ant-design:plus-outlined', + auth: ['Super Admin', 'Admin'], onClick: showModal.bind(null), }, ]" @@ -219,6 +220,7 @@ const batchSyncDrugPrice = () => { label: '删除', icon: 'ant-design:delete-outlined', ifShow: hasTopTableDropDownActions, + auth: ['Super Admin', 'Admin'], popConfirm: { title: '确定删除吗?', confirm: deleteApi.bind(null, false), @@ -324,6 +326,7 @@ const batchSyncDrugPrice = () => { type: 'link', icon: 'uil:edit', size: 'small', + auth: ['Super Admin', 'Admin'], onClick: showModal.bind(null, row, true), }, { @@ -331,6 +334,7 @@ const batchSyncDrugPrice = () => { type: 'link', icon: 'ant-design:delete-outlined', size: 'small', + auth: ['Super Admin', 'Admin'], popConfirm: { title: '确定删除吗?', confirm: deleteApi.bind(null, row.id), @@ -342,6 +346,7 @@ const batchSyncDrugPrice = () => { label: '开通后台', type: 'link', icon: 'uil:edit', + auth: ['Super Admin', 'Admin'], size: 'small', popConfirm: { title: '确定开通后台吗?', @@ -352,6 +357,7 @@ const batchSyncDrugPrice = () => { label: '生成药店二维码', type: 'link', icon: 'uil:edit', + auth: ['Super Admin', 'Admin'], size: 'small', popConfirm: { title: '确定生成药店二维码吗?', diff --git a/apps/web-antd/src/views/system/store/index.vue b/apps/web-antd/src/views/system/store/index.vue index d20f6591..6fdc0ec3 100644 --- a/apps/web-antd/src/views/system/store/index.vue +++ b/apps/web-antd/src/views/system/store/index.vue @@ -196,13 +196,13 @@ const batchSyncDrugPrice = () => { */ const handleSwitchClinicType = (row: any) => { if (!row) return; - + const currentType = row.clinic_type || 2; // 默认为中医诊所 const newType = currentType === 1 ? 2 : 1; const currentTypeText = currentType === 1 ? '西医诊所' : '中医诊所'; const newTypeText = newType === 1 ? '西医诊所' : '中医诊所'; const clinicName = row.name || '该诊所'; - + Modal.confirm({ title: '确认切换诊所类型', content: `确定要将【${clinicName}】的诊所类型从【${currentTypeText}】切换为【${newTypeText}】吗?`, @@ -236,7 +236,7 @@ const handleSwitchClinicType = (row: any) => { label: '新增', type: 'primary', icon: 'ant-design:plus-outlined', - // auth: ['超级诊所', 'sys:user:save'], + auth: ['Super Admin', 'Admin'], onClick: showModal.bind(null), }, ]" @@ -245,6 +245,7 @@ const handleSwitchClinicType = (row: any) => { label: '删除', icon: 'ant-design:delete-outlined', ifShow: hasTopTableDropDownActions, + auth: ['Super Admin', 'Admin'], // auth: ['超级诊所', 'sys:user:save'], popConfirm: { title: '确定删除吗?', @@ -300,7 +301,7 @@ const handleSwitchClinicType = (row: any) => {