转诊方优化
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

This commit is contained in:
李琦
2026-03-07 13:11:23 +08:00
parent 8e81929bf1
commit 235cccc146
3 changed files with 35 additions and 7 deletions

View File

@@ -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);

View File

@@ -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: '确定生成药店二维码吗',

View File

@@ -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) => {
<template #type="{ row }">
</template>
<template #clinic_type="{ row }">
<Tag
<Tag
:color="row.clinic_type === 1 ? 'blue' : row.clinic_type === 2 ? 'green' : 'default'"
class="clinic-type-tag cursor-pointer"
@click="handleSwitchClinicType(row)"
@@ -362,7 +363,7 @@ const handleSwitchClinicType = (row: any) => {
type: 'link',
icon: 'uil:edit',
size: 'small',
// auth: ['store', 'sys:role:detail'],
auth: ['Super Admin', 'Admin'],
onClick: showModal.bind(null, row, true),
},
{
@@ -370,6 +371,7 @@ const handleSwitchClinicType = (row: any) => {
type: 'link',
icon: 'ant-design:delete-outlined',
size: 'small',
auth: ['Super Admin', 'Admin'],
// auth: ['store', 'sys:role:detail'],
popConfirm: {
title: '确定删除吗?',
@@ -402,6 +404,7 @@ const handleSwitchClinicType = (row: any) => {
type: 'link',
icon: 'uil:edit',
size: 'small',
auth: ['Super Admin', 'Admin'],
// auth: ['store', 'sys:role:detail'],
popConfirm: {
title: '确定开通后台吗',
@@ -413,6 +416,7 @@ const handleSwitchClinicType = (row: any) => {
type: 'link',
icon: 'uil:edit',
size: 'small',
auth: ['Super Admin', 'Admin'],
// auth: ['store', 'sys:role:detail'],
popConfirm: {
title: '确定生成诊所二维码吗',
@@ -443,12 +447,12 @@ const handleSwitchClinicType = (row: any) => {
.clinic-type-tag {
transition: all 0.2s ease;
user-select: none;
&:hover {
opacity: 0.8;
transform: scale(1.05);
}
&:active {
transform: scale(0.95);
}