门诊医生站-》开立诊断 页面调整

This commit is contained in:
itcast
2026-01-16 16:32:36 +08:00
parent be0514bc08
commit 8fcfb481c9
83 changed files with 3808 additions and 2205 deletions

View File

@@ -1,19 +1,20 @@
{
"name": "My Awesome App",
"short_name": "AwesomeApp",
"name": "医院信息管理系统",
"short_name": "HIS",
"icons": [
{
"src": "/android-chrome-192x192.png",
"src": "/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"src": "/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"theme_color": "#1890ff",
"background_color": "#ffffff",
"display": "standalone"
"display": "standalone",
"description": "医院信息管理系统 - 提供全面的医疗信息化解决方案"
}

View File

@@ -13,7 +13,7 @@
<meta name="author" content="OpenHIS Team" />
<!-- 安全相关 meta 标签 -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://at.alicdn.com; style-src 'self' 'unsafe-inline' https://at.alicdn.com; img-src 'self' data: https: https://at.alicdn.com; font-src 'self' 'unsafe-inline' https://at.alicdn.com data:; connect-src 'self' https://at.alicdn.com;">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://at.alicdn.com; style-src 'self' 'unsafe-inline' https://at.alicdn.com; img-src 'self' data: https: https://at.alicdn.com; font-src 'self' 'unsafe-inline' https://at.alicdn.com data:; connect-src 'self' https://at.alicdn.com http://localhost:* ws://localhost:*;">
<meta name="referrer" content="no-referrer-when-downgrade">
<!-- 移动端和 PWA 支持 -->
@@ -27,7 +27,7 @@
<link rel="icon" type="image/png" href="/favicon/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon/favicon-48x48.png" sizes="48x48">
<link rel="manifest" href="/favicon/faviconsite.webmanifest">
<link rel="manifest" href="/favicon/site.webmanifest">
<link rel="icon" type="image/png" href="/favicon/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon/android-chrome-512x512.png" sizes="512x512">
<link rel="apple-touch-icon" href="/favicon/apple-touch-icon.png">

View File

@@ -11,7 +11,7 @@ export default {
inDiagName: '急性上呼吸道感染',
name: '于浩',
officeName: '住院科室',
title: '长春市朝阳区中医院',
title: '',
operaDays: null,
outdate: null,
sex: '女',

View File

@@ -24,3 +24,12 @@ export function cleanOperlog() {
method: 'delete'
})
}
// 新增操作日志
export function addLog(data) {
return request({
url: '/monitor/operlog',
method: 'post',
data
})
}

View File

@@ -78,3 +78,16 @@ export function updateSurgeryStatus(id, statusEnum) {
params: { id, statusEnum }
})
}
/**
* 根据患者ID查询就诊列表
* @param patientId 患者ID
* @returns {AxiosPromise}
*/
export function getEncounterListByPatientId(patientId) {
return request({
url: '/clinical-manage/surgery/encounter-list',
method: 'get',
params: { patientId }
})
}

View File

@@ -1,4 +1,4 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
<path d="M512 128c-70.69 0-128 57.31-128 128 0 70.69 57.31 128 128 70.69 0 128-57.31 128-128 0-70.69-57.31-128-128-128z m0 192c-35.34 0-64-28.66-64-64 0-35.34 28.66-64 64-64 35.34 0 64 28.66 64 64 0 35.34-28.66 64-64 64z" fill="currentColor"/>
<path d="M512 128c-70.69 0-128 57.31-128 128 0 70.69 57.31 128 128 70.69 0 128-57.31 128-128 0-70.69-57.31-128-128-128zm0 192c-35.34 0-64-28.66-64-64 0-35.34 28.66-64 64-64 35.34 0 64 28.66 64 64 0 35.34-28.66 64-64 64z" fill="currentColor"/>
<path d="M832 832c0-88.36-28.7-172.6-80.4-242.4C702 521 608 480 512 480s-190 41-239.6 109.6C221 659.4 192 743.64 192 832v64h640v-64z" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 488 B

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1656035183065" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3395"
width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("https://at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("https://at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("https://at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M958.88 730.06H65.12c-18.28 0-33.12-14.82-33.12-33.12V68.91c0-18.29 14.83-33.12 33.12-33.12h893.77c18.28 0 33.12 14.82 33.12 33.12v628.03c-0.01 18.3-14.84 33.12-33.13 33.12zM98.23 663.83h827.53v-561.8H98.23v561.8z" p-id="3396"></path><path d="M512 954.55c-18.28 0-33.12-14.82-33.12-33.12V733.92c0-18.29 14.83-33.12 33.12-33.12s33.12 14.82 33.12 33.12v187.51c0 18.3-14.84 33.12-33.12 33.12z" p-id="3397"></path><path d="M762.01 988.21H261.99c-18.28 0-33.12-14.82-33.12-33.12 0-18.29 14.83-33.12 33.12-33.12h500.03c18.28 0 33.12 14.82 33.12 33.12-0.01 18.29-14.84 33.12-33.13 33.12zM514.74 578.55c-21.63 0-43.31-3.87-64.21-11.65-45.95-17.13-82.49-51.13-102.86-95.74-5.07-11.08-0.19-24.19 10.89-29.26 11.08-5.09 24.19-0.18 29.26 10.91 15.5 33.88 43.25 59.7 78.14 72.71 34.93 12.99 72.79 11.64 106.66-3.85 33.22-15.17 58.8-42.26 72.03-76.3 4.42-11.37 17.21-17.01 28.57-12.58 11.36 4.42 16.99 17.22 12.57 28.58-17.42 44.82-51.1 80.5-94.82 100.47-24.34 11.12-50.25 16.71-76.23 16.71z" p-id="3398"></path><path d="M325.27 528.78c-1.66 0-3.34-0.18-5.02-0.57-11.88-2.77-19.28-14.63-16.49-26.51l18.84-81c1.34-5.82 5-10.84 10.13-13.92 5.09-3.09 11.3-3.96 17.03-2.41l80.51 21.43c11.79 3.14 18.8 15.23 15.67 27.02-3.15 11.79-15.42 18.75-27.02 15.65l-58.49-15.57-13.69 58.81c-2.37 10.2-11.45 17.07-21.47 17.07zM360.8 351.01c-2.65 0-5.37-0.49-8-1.51-11.36-4.41-16.99-17.21-12.59-28.57 17.4-44.79 51.06-80.47 94.8-100.48 92.15-42.06 201.25-1.39 243.31 90.68 5.07 11.08 0.19 24.19-10.89 29.26-11.13 5.07-24.19 0.17-29.26-10.91-31.97-69.91-114.9-100.82-184.79-68.86-33.22 15.19-58.8 42.28-71.99 76.29-3.41 8.74-11.75 14.1-20.59 14.1z" p-id="3399"></path><path d="M684.68 376.74c-1.47 0-2.95-0.15-4.42-0.44l-81.61-16.68c-11.94-2.45-19.64-14.11-17.21-26.06 2.44-11.96 14.1-19.64 26.04-17.22l59.29 12.12 10.23-59.5c2.05-12 13.52-20.19 25.48-18.01 12.03 2.06 20.09 13.48 18.02 25.5l-14.08 81.96a22.089 22.089 0 0 1-9.29 14.49c-3.7 2.51-8.03 3.84-12.45 3.84z" p-id="3400"></path></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -87,8 +87,13 @@
</template>
<script>
import {getLodop} from '../../../plugins/print/LodopFuncs'
import useUserStore from '@/store/modules/user'
export default {
setup() {
const userStore = useUserStore();
return { userStore };
},
props: {
printData: {
type: Object,

View File

@@ -2,7 +2,7 @@
<div class="recordBill">
<div id="div1" class="printView_header">
<div style="text-align: center; font-size: 20px; height: 40px">
长春市朝阳区中医院输液执行单
{{ userStore.hospitalName }}输液执行单
</div>
<div>
<span>座位{{ printData.patientInfo.encounterLocationName }}</span>
@@ -61,8 +61,13 @@
</template>
<script>
import {getLodop} from '../../../plugins/print/LodopFuncs'
import useUserStore from '@/store/modules/user'
export default {
setup() {
const userStore = useUserStore();
return { userStore };
},
data() {
return {
printData: {

View File

@@ -1,6 +1,6 @@
<template>
<div class="printTicket">
<p>长春市朝阳区中医院</p>
<p>{{ userStore.hospitalName }}</p>
<div>
<span>姓名</span>
<span>{{ printData.patientName }}</span>
@@ -26,9 +26,14 @@
</template>
<script>
import JsBarcode from 'jsbarcode';
import useUserStore from '@/store/modules/user';
export default {
name: 'TriageTicket',
setup() {
const userStore = useUserStore();
return { userStore };
},
props: {
printData: {
type: Object,

View File

@@ -6,27 +6,62 @@
:ellipsis="false"
>
<template v-for="(item, index) in topMenus">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber">
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
</el-menu-item>
<!-- 处理有子菜单的情况 -->
<template v-if="item.children && item.children.length > 0 && index < visibleNumber">
<el-sub-menu :style="{'--theme': theme}" :index="item.path" :key="index">
<template #title>
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
</template>
<template v-for="(child, childIndex) in item.children" :key="childIndex">
<el-menu-item :index="item.path + '/' + (child.path || '')">
{{ child.meta.title }}
</el-menu-item>
</template>
</el-sub-menu>
</template>
<!-- 处理无子菜单的情况 -->
<template v-else-if="index < visibleNumber">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index">
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
</el-menu-item>
</template>
</template>
<!-- 顶部菜单超出数量折叠 -->
<el-sub-menu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
<template #title>更多菜单</template>
<template v-for="(item, index) in topMenus">
<el-menu-item
:index="item.path"
:key="index"
v-if="index >= visibleNumber">
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
</el-menu-item>
<template v-for="(item, index) in topMenus" :key="index">
<!-- 处理有子菜单的情况 -->
<template v-if="item.children && item.children.length > 0 && index >= visibleNumber">
<el-sub-menu :index="item.path">
<template #title>
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
</template>
<template v-for="(child, childIndex) in item.children" :key="childIndex">
<el-menu-item :index="item.path + '/' + (child.path || '')">
{{ child.meta.title }}
</el-menu-item>
</template>
</el-sub-menu>
</template>
<!-- 处理无子菜单的情况 -->
<template v-else-if="index >= visibleNumber">
<el-menu-item :index="item.path">
<svg-icon
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"/>
{{ item.meta.title }}
</el-menu-item>
</template>
</template>
</el-sub-menu>
</el-menu>
@@ -108,6 +143,20 @@ const activeMenu = computed(() => {
activePath = path;
appStore.toggleSideBarHide(true);
}
// 检查当前路径是否是子菜单路径
let isChildRoute = false;
for (const item of routers.value) {
if (item.children && item.children.length > 0) {
const childRoute = item.children.find(child => (item.path + '/' + (child.path || '')) === path);
if (childRoute) {
isChildRoute = true;
activePath = item.path; // 激活父菜单
break;
}
}
}
activeRoutes(activePath);
return activePath;
})
@@ -123,20 +172,42 @@ function handleSelect(key, keyPath) {
if (isHttp(key)) {
// http(s):// 路径新窗口打开
window.open(key, "_blank");
} else if (!route || !route.children) {
// 没有子路由路径内部打开
const routeMenu = childrenMenus.value.find(item => item.path === key);
if (routeMenu && routeMenu.query) {
let query = JSON.parse(routeMenu.query);
router.push({ path: key, query: query });
} else {
router.push({ path: key });
}
appStore.toggleSideBarHide(true);
} else {
// 显示左侧联动菜单
activeRoutes(key);
appStore.toggleSideBarHide(false);
// 检查是否是子菜单路径
let isChildRoute = false;
let parentRoute = null;
// 查找父路由
for (const item of routers.value) {
if (item.children && item.children.length > 0) {
const childRoute = item.children.find(child => (item.path + '/' + (child.path || '')) === key);
if (childRoute) {
isChildRoute = true;
parentRoute = item;
break;
}
}
}
if (isChildRoute) {
// 处理子菜单路径
router.push({ path: key });
appStore.toggleSideBarHide(true);
} else if (!route || !route.children) {
// 没有子路由路径内部打开
const routeMenu = childrenMenus.value.find(item => item.path === key);
if (routeMenu && routeMenu.query) {
let query = JSON.parse(routeMenu.query);
router.push({ path: key, query: query });
} else {
router.push({ path: key });
}
appStore.toggleSideBarHide(true);
} else {
// 显示左侧联动菜单
activeRoutes(key);
appStore.toggleSideBarHide(false);
}
}
}

View File

@@ -21,6 +21,12 @@
</el-badge>
</div>
</el-tooltip>
<!-- 帮助中心按钮 -->
<el-tooltip content="帮助中心" placement="bottom">
<div class="left-action-item" @click="goToHelpCenter">
<el-icon><Help /></el-icon>
</div>
</el-tooltip>
</div>
</div>
<div class="right-menu">
@@ -114,10 +120,10 @@ import HeaderSearch from '@/components/HeaderSearch';
import NoticePanel from '@/components/NoticePanel';
import useAppStore from '@/store/modules/app';
import useUserStore from '@/store/modules/user';
import useSettingsStore from '@/store/modules/settings';
import {getOrg, switchOrg} from '@/api/login';
import {getUnreadCount} from '@/api/system/notice';
import {useRouter} from 'vue-router';
import {Help} from "@element-plus/icons-vue";
const appStore = useAppStore();
const userStore = useUserStore();
@@ -232,6 +238,10 @@ function openNoticePanel() {
noticePanelRef.value.open();
}
}
function goToHelpCenter() {
router.push({name: 'HelpCenter'});
}
</script>
<style lang='scss' scoped>

View File

@@ -9,7 +9,7 @@
</app-link>
</template>
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)" teleported>
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)">
<template v-if="item.meta" #title>
<svg-icon v-if="item.meta.icon" :icon-class="item.meta.icon" />
<span class="menu-title" :title="hasTitle(item.meta.title)">{{ item.meta.title }}</span>

View File

@@ -58,7 +58,7 @@ const isCollapse = computed(() => !appStore.sidebar.opened);
const activeMenu = computed(() => {
const { meta, path } = route;
// if set path, the sidebar will highlight the path you set
// if set path, sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu;
}
@@ -183,4 +183,4 @@ const activeMenu = computed(() => {
}
}
}
</style>
</style>

View File

@@ -4,6 +4,7 @@ import Cookies from 'js-cookie';
// 导入 hiprint 并挂载到全局 window 对象
import {hiprint} from 'vue-plugin-hiprint';
import ElementPlus, {ElDialog, ElMessage} from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import 'element-plus/dist/index.css';

View File

@@ -1,377 +1,123 @@
import {createRouter, createWebHistory} from 'vue-router';
import {createWebHistory, createRouter} from 'vue-router'
/* Layout */
import Layout from '@/layout';
import Layout from '@/layout'
/**
* Note: 路由配置项说明
* Note: 路由配置项
*
* hidden: true // 当设置 true 时,该路由不会侧边栏出现如401login等页面或一些编辑页面/edit/1
* alwaysShow: true // 当路由下的 children 声明的路由大于1个时自动变为嵌套模式如组件页面
* // 只有一个时,会将子路由作为根路由显示在侧边栏如引导页面
* // 若想不管 children 个数都显示根路由,可设置 alwaysShow: true忽略之前定义的规则
* redirect: noRedirect // 当设置 noRedirect 时,该路由在面包屑导航中不可点击
* name:'router-name' // 设定路由的名字,必须填写,否则使用<keep-alive>时会出现问题
* hidden: true // 当设置 true 的时候该路由不会侧边栏出现 如401login等页面者如一些编辑页面/edit/1
* alwaysShow: true // 当你一个路由下的 children 声明的路由大于1个时自动会变成嵌套模式--如组件页面
* // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面
* // 若想不管路由下面的 children 声明的个数都显示你的根路由
* // 你可以设置 alwaysShow: true这样它就会忽略之前定义的规则一直显示根路由
* redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
* name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
* query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
* roles: ['admin', 'common'] // 访问路由的角色权限
* permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限
* meta: {
noCache: true // 如果设置为true则不会被 <keep-alive> 缓存默认 false
title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
icon: 'svg-name' // 设置该路由的图标对应路径src/assets/icons/svg
breadcrumb: false // 如果设置为false则不会在breadcrumb面包屑中显示
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮对应的侧边栏
}
* meta : {
noCache: true // 如果设置为true则不会被 <keep-alive> 缓存(默认 false)
title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
icon: 'svg-name' // 设置该路由的图标对应路径src/assets/icons/svg
breadcrumb: false // 如果设置为false则不会在breadcrumb面包屑中显示
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮对应的侧边栏
}
*/
// 公共路由 - 所有用户均可访问的路由
// 公共路由
export const constantRoutes = [
// 重定向路由
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue'),
},
],
},
// 登录路由
{
path: '/login',
component: () => import('@/views/login'),
hidden: true,
},
// 注册路由
{
path: '/register',
component: () => import('@/views/register'),
hidden: true,
},
{
path: '/:pathMatch(.*)*',
component: () => import('@/views/error/404'),
hidden: true,
},
{
path: '/401',
component: () => import('@/views/error/401'),
hidden: true,
},
// 首页路由
{
path: '',
component: Layout,
redirect: '/index',
children: [
{
path: '/index',
component: () => import('@/views/index'),
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true },
},
],
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: () => import('@/views/system/user/profile/index'),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' },
},
],
},
{
path: '/tpr',
component: () => import('@/views/inpatientNurse/tprsheet/index.vue'),
},
// {
// path: '/patientmanagement',
// component: Layout,
// redirect: '/patientmanagement/patientmanagement',
// name: 'PatientManagement',
// meta: { title: '患者管理', icon: 'patient' },
// children: [
// {
// path: 'patientmanagement',
// component: () => import('@/views/patientmanagement/patientmanagement/index.vue'),
// name: 'PatientManagementList',
// meta: { title: '患者档案管理', icon: 'patient' },
// },
// {
// path: 'outpatienrecords',
// component: () => import('@/views/patientmanagement/outpatienrecords/index.vue'),
// name: 'OutpatientRecords',
// meta: { title: '门诊就诊记录', icon: 'record' },
// },
// ],
// },
];
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue')
}
]
},
{
path: '/login',
component: () => import('@/views/login'),
hidden: true
},
{
path: '/register',
component: () => import('@/views/register'),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error/401'),
hidden: true
},
{
path: '',
component: Layout,
redirect: '/index',
children: [
{
path: '/index',
component: () => import('@/views/index'),
name: 'Index',
meta: {title: '首页', icon: 'dashboard', affix: true}
}
]
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: () => import('@/views/system/user/profile/index'),
name: 'Profile',
meta: {title: '个人中心', icon: 'user'}
}
]
}
]
// 动态路由 - 基于用户权限动态加载的路由
// 动态路由基于用户权限动态加载
export const dynamicRoutes = [
// 基础管理路由
// {
// path: '/basicmanage',
// component: Layout,
// redirect: '/basicmanage/invoice-management',
// name: 'BasicManage',
// meta: { title: '基础管理', icon: 'component' },
// children: [
// {
// path: 'invoice-management',
// component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'),
// name: 'invoice-management',
// meta: { title: '发票管理' }
// }
// ]
// },
// 兼容系统业务管理路径的发票管理路由
// {
// path: '/system/ywgz',
// component: Layout,
// redirect: '/system/ywgz/InvoiceManagement',
// hidden: true,
// children: [
// {
// path: 'InvoiceManagement',
// component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'),
// name: 'SystemInvoiceManagement',
// meta: { title: '发票管理' }
// }
// ]
// },
// 维护系统路由
// {
// path: '/maintainSystem',
// component: Layout,
// redirect: '/maintainSystem/chargeConfig',
// name: 'MaintainSystem',
// meta: { title: '维护系统', icon: 'system' },
// children: [
// {
// path: '',
// redirect: 'chargeConfig',
// name: 'MaintainSystemIndex' // 添加名称以解决警告
// },
// {
// path: 'chargeConfig', // 收费配置路由
// component: () => import('@/views/maintainSystem/chargeConfig/index.vue'),
// name: 'ChargeConfig',
// meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] }
// },
// {
// path: 'Inspection', // 检验管理路由
// component: () => import('@/views/maintainSystem/Inspection/index.vue'),
// name: 'Inspection',
// meta: { title: '检验管理', icon: 'inspection' },
// children: [
// {
// path: 'PackageManagement', // 套餐管理路由
// component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'),
// name: 'PackageManagement',
// meta: { title: '套餐管理' }
// }
// ]
// }
// ]
// },
// 系统管理路由
// {
// path: '/system',
// component: Layout,
// redirect: '/system/user',
// name: 'System',
// meta: { title: '系统管理', icon: 'system' },
// children: [
// {
// path: 'user', // 用户管理路由
// component: () => import('@/views/system/user/index.vue'),
// name: 'User',
// meta: { title: '用户管理', icon: 'user', permissions: ['system:user:list'] }
// },
// {
// path: 'role', // 角色管理路由
// component: () => import('@/views/system/role/index.vue'),
// name: 'Role',
// meta: { title: '角色管理', icon: 'role', permissions: ['system:role:list'] }
// },
// {
// path: 'menu', // 菜单管理路由
// component: () => import('@/views/system/menu/index.vue'),
// name: 'Menu',
// meta: { title: '菜单管理', icon: 'menu', permissions: ['system:menu:list'] }
// },
// {
// path: 'dept', // 部门管理路由
// component: () => import('@/views/system/dept/index.vue'),
// name: 'Dept',
// meta: { title: '部门管理', icon: 'dept', permissions: ['system:dept:list'] }
// },
// {
// path: 'post', // 岗位管理路由
// component: () => import('@/views/system/post/index.vue'),
// name: 'Post',
// meta: { title: '岗位管理', icon: 'post', permissions: ['system:post:list'] }
// },
// {
// path: 'dict', // 字典管理路由
// component: () => import('@/views/system/dict/index.vue'),
// name: 'Dict',
// meta: { title: '字典管理', icon: 'dict', permissions: ['system:dict:list'] }
// },
// {
// path: 'config', // 参数配置路由
// component: () => import('@/views/system/config/index.vue'),
// name: 'Config',
// meta: { title: '参数配置', icon: 'config', permissions: ['system:config:list'] }
// },
// {
// path: 'notice', // 通知公告路由
// component: () => import('@/views/system/notice/index.vue'),
// name: 'Notice',
// meta: { title: '通知公告', icon: 'notice', permissions: ['system:notice:list'] }
// },
// {
// path: 'tenant', // 租户管理路由
// component: () => import('@/views/system/tenant/index.vue'),
// name: 'Tenant',
// meta: { title: '租户管理', icon: 'tenant', permissions: ['system:tenant:list'] }
// }
// ]
// },
// 租户用户设置路由
{
path: '/system/tenant-user',
component: Layout,
hidden: true,
permissions: ['*:*:*'],
children: [
{
path: 'set/:tenantId(\\d+)',
component: () => import('@/views/system/tenant/setUser'),
name: 'SetUser',
meta: { title: '所属用户', activeMenu: '/system/basicmanage/tenant' },
},
],
},
//租户合同管理路由
{
path: '/system/tenant-contract',
component: Layout,
hidden: true,
permissions: ['*:*:*'],
children: [
{
path: 'set/:tenantId(\\d+)',
component: () => import('@/views/system/tenant/setContract'),
name: 'SetContract',
meta: { title: '合同管理', activeMenu: '/system/basicmanage/tenant' },
},
],
},
{
path: '/system/user-auth',
component: Layout,
hidden: true,
permissions: ['system:user:edit'],
children: [
{
path: 'role/:userId(\\d+)',
component: () => import('@/views/system/user/authRole'),
name: 'AuthRole',
meta: { title: '分配角色', activeMenu: '/system/user' },
},
],
},
{
path: '/system/role-auth',
component: Layout,
hidden: true,
permissions: ['system:role:edit'],
children: [
{
path: 'user/:roleId(\\d+)',
component: () => import('@/views/system/role/authUser'),
name: 'AuthUser',
meta: { title: '分配用户', activeMenu: '/system/role' },
},
],
},
{
path: '/system/dict-data',
component: Layout,
hidden: true,
permissions: ['system:dict:list'],
children: [
{
path: 'index/:dictId(\\d+)',
component: () => import('@/views/system/dict/data'),
name: 'Data',
meta: { title: '字典数据', activeMenu: '/system/dict' },
},
],
},
{
path: '/monitor/job-log',
component: Layout,
hidden: true,
permissions: ['monitor:job:list'],
children: [
{
path: 'index/:jobId(\\d+)',
component: () => import('@/views/monitor/job/log'),
name: 'JobLog',
meta: { title: '调度日志', activeMenu: '/monitor/job' },
},
],
},
{
path: '/tool/gen-edit',
component: Layout,
hidden: true,
permissions: ['tool:gen:edit'],
children: [
{
path: 'index/:tableId(\\d+)',
component: () => import('@/views/tool/gen/editTable'),
name: 'GenEdit',
meta: { title: '修改生成配置', activeMenu: '/tool/gen' },
},
],
},
{
path: '/help-center',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/helpcenter/index.vue'),
name: 'HelpCenter',
meta: {title: '帮助中心'},
},
],
},
];
// 合并常量路由和动态路由,确保所有路由都能被访问
const allRoutes = [...constantRoutes, ...dynamicRoutes];
// 添加404路由到所有路由的最后,确保捕获所有未匹配的路由
// 添加404路由到所有路由的最后
allRoutes.push({
path: "/:pathMatch(.*)*",
component: () => import('@/views/error/404'),
hidden: true
path: "/:pathMatch(.*)*",
component: () => import('@/views/error/404'),
hidden: true
});
// 创建Vue Router实例
const router = createRouter({
history: createWebHistory(), // 使用HTML5历史模式
routes: allRoutes, // 使用合并后的所有路由
scrollBehavior(to, from, savedPosition) {
// 页面滚动行为:如果有保存的位置则恢复,否则滚动到顶部
if (savedPosition) {
return savedPosition;
} else {
return { top: 0 };
}
},
history: createWebHistory(),
routes: allRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition
} else {
return {top: 0}
}
},
});
// 导出路由实例
export default router;
export default router;

View File

@@ -4,96 +4,96 @@ import defAva from '@/assets/images/user.png'
import {defineStore} from 'pinia'
const useUserStore = defineStore(
'user',
{
state: () => ({
token: getToken(),
id: '',
name: '',
avatar: '',
orgId: '',
practitionerId: '',
orgName: '',
nickName: '',
fixmedinsCode: '', // 医疗机构编码
roles: [],
permissions: [],
tenantId: '',
tenantName: '', // 租户名称
hospitalName:'',
optionMap: {} // 租户配置项Map从sys_tenant_option表读取
}),
actions: {
// 登录
login(userInfo) {
const username = userInfo.username.trim()
const password = userInfo.password
const code = userInfo.code
const uuid = userInfo.uuid
const tenantId = userInfo.tenantId
return new Promise((resolve, reject) => {
login(username, password, code, uuid ,tenantId).then(res => {
setToken(res.token)
this.token = res.token
this.tenantId = tenantId
resolve()
}).catch(error => {
reject(error)
'user',
{
state: () => ({
token: getToken(),
id: '',
name: '',
avatar: '',
orgId: '',
practitionerId: '',
orgName: '',
nickName: '',
fixmedinsCode: '', // 医疗机构编码
roles: [],
permissions: [],
tenantId: '',
tenantName: '', // 租户名称
hospitalName:'',
optionMap: {} // 租户配置项Map从sys_tenant_option表读取
}),
actions: {
// 登录
login(userInfo) {
const username = userInfo.username.trim()
const password = userInfo.password
const code = userInfo.code
const uuid = userInfo.uuid
const tenantId = userInfo.tenantId
return new Promise((resolve, reject) => {
login(username, password, code, uuid ,tenantId).then(res => {
setToken(res.token)
this.token = res.token
this.tenantId = tenantId
resolve()
}).catch(error => {
reject(error)
})
})
})
},
// 获取用户信息
getInfo() {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.user
const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar;
},
// 获取用户信息
getInfo() {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.user
const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar;
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
this.roles = res.roles
this.permissions = res.permissions
} else {
this.roles = ['ROLE_DEFAULT']
}
// console.log('user info:', user);
this.id = user.userId
this.name = user.userName // 用户账号对应数据库的user_name字段如'admin'
this.orgId = user.orgId
this.orgName = user.orgName
this.nickName = user.nickName
this.practitionerId = res.practitionerId
this.fixmedinsCode = res.optionJson.fixmedinsCode
this.avatar = avatar
this.optionMap = res.optionMap || {}
// 优先从optionMap获取配置如果没有则从optionJson获取
this.hospitalName = this.optionMap.hospitalName || res.optionJson.hospitalName || ''
this.tenantName = res.tenantName || ''
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
this.roles = res.roles
this.permissions = res.permissions
} else {
this.roles = ['ROLE_DEFAULT']
}
// console.log('user info:', user);
this.id = user.userId
this.name = user.userName // 用户账号对应数据库的user_name字段如'admin'
this.orgId = user.orgId
this.orgName = user.orgName
this.nickName = user.nickName
this.practitionerId = res.practitionerId
this.fixmedinsCode = res.optionJson.fixmedinsCode
this.avatar = avatar
this.optionMap = res.optionMap || {}
// 优先从optionMap获取配置如果没有则从optionJson获取
this.hospitalName = this.optionMap.hospitalName || res.optionJson.hospitalName || ''
this.tenantName = res.tenantName || ''
resolve(res)
}).catch(error => {
reject(error)
resolve(res)
}).catch(error => {
reject(error)
})
})
})
},
// 退出系统
logOut() {
return new Promise((resolve, reject) => {
logout(this.token).then(() => {
this.token = ''
this.roles = []
this.permissions = []
this.tenantId = ''
removeToken()
resolve()
}).catch(error => {
reject(error)
},
// 退出系统
logOut() {
return new Promise((resolve, reject) => {
logout(this.token).then(() => {
this.token = ''
this.roles = []
this.permissions = []
this.tenantId = ''
removeToken()
resolve()
}).catch(error => {
reject(error)
})
})
})
},
removeRoles(){
this.roles = []
},
removeRoles(){
this.roles = []
}
}
}
})
})
export default useUserStore

View File

@@ -5,7 +5,7 @@
patient?.busNo || '未知'
}}
</div>
<h2 style="text-align: center">长春市朝阳区中医院</h2>
<h2 style="text-align: center">{{ userStore.hospitalName }}</h2>
<h2 style="text-align: center">出院诊断病历</h2>
<!-- 滚动内容区域 -->
@@ -143,6 +143,9 @@ import {nextTick, onMounted, reactive, ref} from 'vue';
import {ElMessage} from 'element-plus';
import {previewPrint} from '../utils/printUtils';
import DisDiagnMedicalRecord from '../views/hospitalRecord/components/disDiagnMedicalRecord.vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
defineOptions({
name: 'DischargeDiagnosisCertificate',

View File

@@ -1,5 +1,8 @@
<script lang="ts" setup>
import {ref} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
// 1. 基础信息(复用已有变量,补充一致性格式)
const patientInfo = ref({
@@ -117,8 +120,8 @@ defineExpose({ patientInfo, firstRecordTime, firstRecordIntro, caseFeatures, chi
<div class="medical-record">
<!-- 1. 医院头部每一页PDF均包含复用已有样式 -->
<div class="hospital-header">
<img src="./imgs/logo.png" alt="长春市朝阳区中医院Logo" class="header-logo" />
<h1 class="hospital-name">长春市朝阳区中医院</h1>
<img src="./imgs/logo.png" :alt="userStore.hospitalName + 'Logo'" class="header-logo" />
<h1 class="hospital-name">{{ userStore.hospitalName }}</h1>
</div>
<!-- 2. 患者信息栏每一页PDF均包含下划线样式 -->

View File

@@ -4,7 +4,7 @@
<!-- 医院头部 -->
<div class="hospital-header">
<h1 class="hospital-name">
<span class="hospital-text">长春市朝阳区中医院</span>
<span class="hospital-text">{{ userStore.hospitalName }}</span>
</h1>
</div>
<!-- 页面标题 -->

View File

@@ -1,7 +1,7 @@
<template>
<div class="medical-form">
<h2 style="text-align: center">
{{ userStore.hospitalName || '长春市朝阳区中医院' }} -入院记录
{{ userStore.hospitalName }} -入院记录
</h2>
<!-- 滚动内容区域 -->

View File

@@ -232,23 +232,13 @@
<script setup>
import {onMounted, reactive, ref} from 'vue';
import intOperRecordSheet from '../views/hospitalRecord/components/intOperRecordSheet.vue';
import {
ElButton,
ElDatePicker,
ElForm,
ElFormItem,
ElInput,
ElMessage,
ElMessageBox,
ElOption,
ElSelect,
} from 'element-plus';
import {previewPrint} from '../utils/printUtils';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const isShowprintDom = ref(false);
const recordPrintRef = ref();
// 医院名称
const hospitalName = '长春市朝阳区中医院';
const hospitalName = userStore.hospitalName;
defineOptions({
name: 'iInHospitalSurgicalRecord',
});

View File

@@ -213,20 +213,11 @@
<script setup>
import {onMounted, reactive, ref} from 'vue';
import {
ElButton,
ElDatePicker,
ElForm,
ElFormItem,
ElInput,
ElMessage,
ElMessageBox,
ElOption,
ElSelect,
} from 'element-plus';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
// 医院名称
const hospitalName = '长春市朝阳区中医院';
const hospitalName = userStore.hospitalName;
defineOptions({
name: 'InHospitalCommunicate',
});

View File

@@ -6,7 +6,7 @@
<template>
<div class="container">
<div class="header">
<h2 class="title">长春市朝阳区中医院</h2>
<h2 class="title">{{ userStore.hospitalName }}</h2>
<h3 class="subtitle">患者护理记录单</h3>
</div>
@@ -234,8 +234,10 @@
defineOptions({
name: 'NursingRecordSheet',
});
import {getCurrentInstance, onBeforeMount, onMounted} from 'vue';
import {getCurrentInstance, onBeforeMount, onMounted, ref} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({

View File

@@ -5,7 +5,7 @@
patient?.busNo || '未知'
}}
</div>
<h2 style="text-align: center">{{ userStore.hospitalName || '长春市朝阳区中医院' }}</h2>
<h2 style="text-align: center">{{ userStore.hospitalName }}</h2>
<h2 style="text-align: center">门诊病历</h2>

View File

@@ -7,7 +7,7 @@
<div class="surgicalPatientHandover-container">
<div class="handover-form">
<div class="form-header">
<h1 class="hospital-name">长春市朝阳区中医院</h1>
<h1 class="hospital-name">{{ userStore.hospitalName }}</h1>
<h2 class="form-title">手术患者交接单</h2>
</div>
@@ -562,6 +562,9 @@ defineOptions({
});
import {getCurrentInstance, onBeforeMount, onMounted, reactive} from 'vue';
import useOptionsList from './useOptionsList';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
// import { A } from '../../dist/assets/api-DmiMW8YF';
const { statisticsOptionList, getStatisticsOptionList } = useOptionsList();
const { proxy } = getCurrentInstance();

View File

@@ -228,7 +228,11 @@ export function executePrint(data, template, printerName, options = {}, business
throw new Error('打印插件未加载');
}
const hiprintTemplate = new window.hiprint.PrintTemplate({ template });
const userStore = useUserStore();
const processedTemplate = JSON.parse(
JSON.stringify(template).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
const hiprintTemplate = new window.hiprint.PrintTemplate({ template: processedTemplate });
const printOptions = {
title: '打印标题',
height: 210,

View File

@@ -44,11 +44,17 @@
class="clinic-room-table"
>
<el-table-column prop="id" label="ID" width="180" align="center" />
<el-table-column label="卫生机构" width="200" align="center" show-overflow-tooltip>
<template #default="scope">
<!-- ==忽略类型匹配string的"3"和number的3就能匹配上 -->
{{ tenantOptions.find(item => item.id == scope.row.orgName)?.tenantName || '未知机构' }}
</template>
</el-table-column>
<el-table-column prop="roomName" label="诊室名称" width="160" align="center" show-overflow-tooltip />
<el-table-column prop="department" label="科室名称" width="160" align="center" show-overflow-tooltip />
<el-table-column prop="building" label="诊室楼号" width="120" align="center" show-overflow-tooltip />
<el-table-column prop="floor" label="楼层" width="90" align="center" />
<el-table-column prop="roomNo" label="房间号" width="120" align="center" />
<el-table-column prop="floor" label="诊室楼层" width="90" align="center" />
<el-table-column prop="roomNo" label="诊室房间号" width="120" align="center" />
<el-table-column prop="isDisabled" label="停用" width="90" align="center">
<template #default="scope">
<el-tag :type="scope.row.isDisabled ? 'danger' : 'success'">
@@ -64,6 +70,11 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" width="120" align="center" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.updateBy || scope.row.createBy || '系统默认' }}
</template>
</el-table-column>
<el-table-column label="操作" width="250" align="center" fixed="right">
<template #default="scope">
<el-button
@@ -233,8 +244,8 @@ const total = ref(0)
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
roomName: null,
orgName: null
roomName: '',
orgName: ''
})
// 科室选项
const departmentOptions = ref([])
@@ -256,7 +267,7 @@ const form = reactive({
isDisabled: false,
remarks: '',
void: false,
orgName: null
orgName: ''
})
// 表单验证规则
const rules = {
@@ -506,7 +517,7 @@ function resetForm() {
form.isDisabled = false
form.remarks = ''
form.void = false
form.orgName = null
form.orgName = ''
proxy.resetForm('formRef')
}

View File

@@ -79,6 +79,7 @@
clearable
filterable
:disabled="form.isEditInfoDisable === 1"
no-data-text=""
>
<el-option
v-for="category in activity_category_code"
@@ -91,7 +92,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="业务类型" prop="typeEnum">
<el-select v-model="form.typeEnum" placeholder="" clearable filterable>
<el-select v-model="form.typeEnum" placeholder="" clearable filterable no-data-text="">
<el-option
v-for="item in typeEnumOptions"
:key="item.value"
@@ -115,7 +116,11 @@
</el-col>
<el-col :span="8">
<el-form-item label="医保编码" prop="conditionCode">
<el-input v-model="form.ybNo" placeholder="" />
<el-input
v-model="form.ybNo"
placeholder=""
clearable
/>
</el-form-item>
</el-col>
</el-row>
@@ -130,6 +135,7 @@
filterable
style="width: 240px"
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
no-data-text=""
>
<el-option
v-for="dict in med_chrgitm_type"
@@ -161,7 +167,7 @@
<el-col :span="8">
<el-form-item label="所需标本" prop="specimenCode">
<el-select v-model="form.specimenCode" clearable filterable>
<el-select v-model="form.specimenCode" clearable filterable no-data-text="">
<el-option
v-for="category in specimen_code"
:key="category.value"
@@ -181,6 +187,7 @@
clearable
filterable
:disabled="form.isEditInfoDisable === 1"
no-data-text=""
>
<el-option
v-for="item in chrgitm_lv"
@@ -194,9 +201,14 @@
<el-col :span="8">
<el-form-item label="使用单位" prop="permittedUnitCode">
<el-select v-model="form.permittedUnitCode" clearable filterable>
<el-select
v-model="form.permittedUnitCode"
clearable
filterable
:filter-method="filterUnitCode"
>
<el-option
v-for="category in unit_code"
v-for="category in isFilteringUnitCode ? filteredUnitCode : unit_code"
:key="category.value"
:label="category.label"
:value="category.value"
@@ -206,7 +218,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="财务类型" prop="itemTypeCode">
<el-select v-model="form.itemTypeCode" clearable filterable>
<el-select v-model="form.itemTypeCode" clearable filterable no-data-text="">
<!-- :disabled="form.isEditInfoDisable === 1" -->
<el-option
@@ -355,6 +367,7 @@ import {
deptTreeSelect,
editDiagnosisTreatment,
getDiagnosisTreatmentList,
getDiseaseTreatmentByYbNo,
locationTreeSelect,
} from './diagnosistreatment';
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
@@ -384,6 +397,10 @@ const statusFlagOptions = ref(undefined);
const exeOrganizations = ref(undefined);
const typeEnumOptions = ref(undefined);
const diagnosisTreatmentList = ref([]);
// 使用单位过滤后的选项
const filteredUnitCode = ref([]);
// 标记是否正在进行过滤查询
const isFilteringUnitCode = ref(false);
const data = reactive({
form: {},
@@ -442,6 +459,7 @@ const treatmentItems = ref([
const medicineSearchKey = ref('');
const isFirstOpen = ref(true); // 标记是否首次打开弹窗
const totalPrice = ref('0.00'); // 总价
const isValidatingYbNo = ref(false); // 标记是否正在校验医保编码
// 计算总价
function calculateTotalPrice() {
@@ -489,6 +507,9 @@ function show() {
getBodyTree();
getDeptTree();
getItemList();
// 重置使用单位过滤
filteredUnitCode.value = [];
isFilteringUnitCode.value = false;
title.value = '';
title.value = props.title;
@@ -517,6 +538,9 @@ function edit() {
getBodyTree();
getDeptTree();
getItemList();
// 重置使用单位过滤
filteredUnitCode.value = [];
isFilteringUnitCode.value = false;
title.value = '';
title.value = props.title;
form.value = props.item;
@@ -579,8 +603,31 @@ function reset() {
proxy.resetForm('diagnosisTreatmentRef');
}
async function validateYbNoUnique(ybNo, currentId = null) {
if (!ybNo || ybNo.trim() === '') {
return true; // 空值不进行校验
}
try {
const response = await getDiseaseTreatmentByYbNo(ybNo);
const data = response.data;
if (data && data.length > 0) {
// 检查是否存在相同的医保编码,排除当前编辑的记录
const existingRecord = data.find(item => item.id !== currentId);
if (existingRecord) {
return false; // 医保编码已存在
}
}
return true; // 医保编码唯一
} catch (error) {
console.error('医保编码校验失败:', error);
return true; // 校验失败时允许提交,由后端处理
}
}
/** 提交按钮 */
function submitForm() {
async function submitForm() {
form.value.ybFlag ? (form.value.ybFlag = 1) : (form.value.ybFlag = 0);
form.value.ybMatchFlag ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0);
form.value.ruleId ? (form.value.ruleId = 1) : (form.value.ruleId = 0);
@@ -588,8 +635,26 @@ function submitForm() {
treatmentItems.value.length > 0 && treatmentItems.value[0].adviceDefinitionId != ''
? JSON.stringify(treatmentItems.value)
: undefined;
proxy.$refs['diagnosisTreatmentRef'].validate((valid) => {
proxy.$refs['diagnosisTreatmentRef'].validate(async (valid) => {
if (valid) {
// 医保编码唯一性校验
if (form.value.ybNo) {
try {
isValidatingYbNo.value = true;
const isUnique = await validateYbNoUnique(form.value.ybNo, form.value.id);
if (!isUnique) {
proxy.$modal.msgWarning('医保编码已存在,请输入其他医保编码');
return;
}
} catch (error) {
console.error('医保编码校验失败:', error);
proxy.$modal.msgError('医保编码校验失败,请稍后重试');
return;
} finally {
isValidatingYbNo.value = false;
}
}
if (form.value.id != undefined) {
editDiagnosisTreatment(form.value).then((response) => {
// 触发自定义事件,并传递数据给父组件
@@ -682,6 +747,23 @@ function updatePrices(value) {
form.value.maximumRetailPrice = form.value.retailPrice;
}
// 使用单位过滤函数
function filterUnitCode(query) {
if (!query || query.trim() === '') {
// 查询为空时,重置过滤状态,显示所有选项
isFilteringUnitCode.value = false;
filteredUnitCode.value = [];
return;
}
// 有查询内容时,进行过滤
isFilteringUnitCode.value = true;
const queryLower = query.toLowerCase().trim();
filteredUnitCode.value = unit_code.value.filter((item) => {
const label = item.label || '';
return label.toLowerCase().includes(queryLower);
});
}
// 监听treatmentItems变化实时更新总价
watch(
() => treatmentItems.value,

View File

@@ -104,3 +104,13 @@ export function getYbDiagnosisTreatmentList (queryParams) {
params: queryParams,
});
}
// 根据医保编码查询诊疗目录(用于医保编码唯一性校验)
export function getDiseaseTreatmentByYbNo (ybNo) {
return request ({
url: '/data-dictionary/diagnosis-treatment/information/' + ybNo,
method: 'get',
});
}

View File

@@ -299,236 +299,236 @@ async function printReceipt(param) {
// 金额大于0时显示金额和单位等于0时不显示单位
YB_FUND_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 100000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 基金支付总额
SELF_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 200000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人负担总金额
OTHER_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 其他(如医院负担金额)
// 基本医保统筹基金支出
YB_TC_FUND_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 110000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 基本医保统筹基金支出
YB_BC_FUND_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 补充医疗保险基金支出
YB_JZ_FUND_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 130000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医疗救助基金支出
YB_OTHER_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 140000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 其他支出
// 职工基本医疗保险
YB_TC_ZG_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 110100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 职工基本医疗保险
YB_TC_JM_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 110200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 居民基本医疗保险
// 补充医疗保险基金支出细分
YB_BC_JM_DB_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 全体参保人的居民大病保险
YB_BC_DE_BZ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 大额医疗费用补助
YB_BC_ZG_DE_BZ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 企业职工大额医疗费用补助
YB_BC_GWY_BZ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120400)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 公务员医疗补助
// 其他支出细分
OTHER_PAY_DD_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300001)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 兜底基金支出
OTHER_PAY_YW_SH_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300002)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 意外伤害基金支出
OTHER_PAY_LX_YL_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300003)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 离休人员医疗保障金支出
OTHER_PAY_LX_YH_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300004)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 离休人员优惠金支出
OTHER_PAY_CZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300005)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 财政基金支出
OTHER_PAY_CZ_YZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300006)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 财政预支支出
OTHER_PAY_ZG_DB_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300007)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 职工大病基金支出
OTHER_PAY_EY_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300008)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 二乙基金支出
OTHER_PAY_QX_JZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300009)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 倾斜救助支出
OTHER_PAY_YL_JZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300010)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医疗救助再救助基金
HOSP_PART_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300011)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医院负担金额
// 医保结算返回值
FULAMT_OWNPAY_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 1)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 1)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 全自费金额
OVERLMT_SELFPAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 3)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 3)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 超限价自费费用
PRESELFPAY_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 4)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 4)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 先行自付金额
INSCP_SCP_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 5)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 5)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 符合政策范围金额
ACT_PAY_DEDC: (() => {
const amount = param.detail.find((t) => t.payEnum === 6)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 6)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 实际支付起付线
POOL_PROP_SELFPAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 7)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 7)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 基本医疗保险统筹基金支付比例
BALC: (() => {
const amount = param.detail.find((t) => t.payEnum === 8)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 8)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 余额
// 特殊支付方式
SELF_YB_ZH_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 210000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人医保账户支付
SELF_YB_ZH_GJ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 210100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 账户共济支付金额
SELF_CASH_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额
SELF_VX_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 230000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 微信支付金额
SELF_ALI_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 240000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 阿里支付金额
// 现金支付细分
SELF_CASH_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(现金)
SELF_CASH_VX_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(微信)
SELF_CASH_ALI_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(支付宝)
SELF_CASH_UNION_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(银联)
// 基金类型(扩展)
BIRTH_FUND: (() => {
const amount = param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 510100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 生育基金
RETIREE_MEDICAL: (() => {
const amount = param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 340100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 离休人员医疗保障基金
URBAN_BASIC_MEDICAL: (() => {
const amount = param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 城乡居民基本医疗保险基金
URBAN_SERIOUS_ILLNESS: (() => {
const amount = param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 城乡居民大病医疗保险基金
MEDICAL_ASSISTANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 610100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医疗救助基金
GOVERNMENT_SUBSIDY: (() => {
const amount = param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 640100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 政府兜底基金
ACCIDENT_INSURANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390400)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 意外伤害基金
CARE_INSURANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 620100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 照护保险基金
FINANCIAL_FUND: (() => {
const amount = param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 360100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 财政基金
HOSPITAL_ADVANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 999900)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医院垫付
SUPPLEMENTARY_INSURANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 城乡居民大病补充保险基金
HEALTHCARE_PREPAYMENT: (() => {
const amount = param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 360300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 保健预支基金
//微信刷卡支付
SELF_CASH_VX_VALUE: (() => {
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
return vxValue + unionValue + aliValue + ' 元';
// const cashValue = param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return (Number(vxValue) + Number(unionValue) + Number(aliValue)).toFixed(2) + ' 元';
})(),
Mr_QR_Code: param.regNo,
@@ -674,7 +674,9 @@ async function print() {
};
console.log(result, '==result.data==');
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');

View File

@@ -287,7 +287,7 @@ function getPatientList() {
queryParams.value.receptionTimeETime = undefined;
}
getList(queryParams.value).then((res) => {
patientList.value = res.data.data.records;
patientList.value = res.data?.data?.records || [];
});
}
@@ -363,17 +363,17 @@ function confirmCharge() {
encounterId: patientInfo.value.encounterId,
chargeItemIds: chargeItemIdList.value,
}).then((res) => {
if (res.code == 200) {
if (res.code == 200 && res.data) {
// totalAmount.value = res.data.psnCashPay;
paymentId.value = res.data.paymentId;
chrgBchnoList.value = res.data.chrgBchnoList;
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
details.value = res.data.details.filter((item) => {
totalAmount.value = res.data.details?.find((item) => item.payEnum == 220000)?.amount ?? 0;
details.value = res.data.details?.filter((item) => {
return item.amount > 0;
});
}) || [];
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
proxy.$modal.msgError(res?.msg || '预结算失败');
}
});
// console.log(patientInfo)
@@ -517,11 +517,11 @@ async function handleReadCard(value) {
ybMdtrtCertType: userCardInfo.psnCertType,
busiCardInfo: userCardInfo.busiCardInfo,
}).then((res) => {
if (res.code == 200) {
if (res.code == 200 && res.data) {
// totalAmount.value = res.data.psnCashPay;
paymentId.value = res.data.paymentId;
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
details.value = res.data.details;
totalAmount.value = res.data.details?.find((item) => item.payEnum == 220000)?.amount ?? 0;
details.value = res.data.details || [];
// chrgBchnoList.value = res.data.chrgBchnoList;
chargeItemIdList.value = selectRows.map((item) => {
return item.id;
@@ -537,7 +537,7 @@ async function handleReadCard(value) {
});
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
proxy.$modal.msgError(res?.msg || '预结算失败');
}
});
}
@@ -648,9 +648,9 @@ function printCharge(row) {
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
// 设置实收金额
if (res.data && res.data.detail) {
const amountDetail = res.data.detail.find((item) => item.payEnum == 220000);
const amountDetail = res.data.detail?.find((item) => item.payEnum == 220000);
if (amountDetail) {
totalAmount.value = amountDetail.amount;
totalAmount.value = amountDetail.amount || 0;
// 为合并的行设置金额相关字段值
rows.forEach((item) => {

View File

@@ -302,14 +302,14 @@ function handleRefund(row) {
// return new Decimal(accumulator).add(new Decimal(currentRow.totalPrice || 0));
// }, 0);
getReturnDetail({ id: row.paymentId }).then((res) => {
if (res.data.length > 0) {
if (res.data?.length > 0) {
totalAmount.value =
res.data.find((item) => item.payEnum === 220000).amount -
(res.data.find((item) => item.payEnum === 220500)?.amount || 0);
(res.data.find((item) => item.payEnum === 220000)?.amount ?? 0) -
(res.data.find((item) => item.payEnum === 220500)?.amount ?? 0);
}
details.value = res.data.filter((item) => {
details.value = res.data?.filter((item) => {
return item.amount > 0;
});
}) || [];
});
paymentId.value = row.paymentId;
patientInfo.value.patientId = row.patientId;

View File

@@ -128,7 +128,7 @@ const getFeeTypeText = computed(() => {
}
// 如果只有一个选项,直接返回第一个选项的文本
if (props.medfee_paymtd_code.length === 1) {
return props.medfee_paymtd_code[0].label || '';
return props.medfee_paymtd_code[0]?.label || '';
}
return '';
});
@@ -214,38 +214,38 @@ async function printReceipt(param) {
{
...param,
// 基础支付类型
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
YB_FUND_PAY: param.detail?.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
// 基本医保统筹基金支出
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
YB_TC_FUND_AMOUNT: param.detail?.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
YB_BC_FUND_AMOUNT: param.detail?.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
YB_JZ_FUND_AMOUNT: param.detail?.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
YB_OTHER_AMOUNT: param.detail?.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
// 职工基本医疗保险
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险
YB_TC_ZG_FUND_VALUE: param.detail?.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
YB_TC_JM_FUND_VALUE: param.detail?.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险
// 补充医疗保险基金支出细分
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
YB_BC_JM_DB_VALUE: param.detail?.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
YB_BC_DE_BZ_VALUE: param.detail?.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
YB_BC_ZG_DE_BZ_VALUE: param.detail?.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
YB_BC_GWY_BZ_VALUE: param.detail?.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
// 其他支出细分
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
OTHER_PAY_DD_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
OTHER_PAY_YW_SH_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
OTHER_PAY_LX_YL_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
OTHER_PAY_LX_YH_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
OTHER_PAY_CZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
OTHER_PAY_EY_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
HOSP_PART_AMT: param.detail?.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
// 医保结算返回值 - 修复运算符优先级问题,添加括号确保正确拼接'元'
FULAMT_OWNPAY_AMT: (param.detail?.find((t) => t.payEnum === 1)?.amount ?? 0) + '元', // 全自费金额
@@ -347,11 +347,11 @@ async function printReceipt(param) {
: '', // 保健预支基金
//微信刷卡支付
SELF_CASH_VX_VALUE: (() => {
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
return vxValue + unionValue + aliValue + '元';
// const cashValue = param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return (Number(vxValue) + Number(unionValue) + Number(aliValue)).toFixed(2) + '元';
})(),
// 患者信息

View File

@@ -342,6 +342,7 @@
<script setup name="PatientAddDialog">
import pcas from 'china-division/dist/pcas-code.json';
import {addPatient, getOutpatientRegistrationList, patientlLists} from './outpatientregistration';
import {updatePatient} from '@/views/patientmanagement/patientmanagement/component/api';
import {getGenderAndAge, isValidCNidCardNumber, isValidCNPhoneNumber,} from '../../../../utils/validate';
import {ElMessage} from 'element-plus';
@@ -1200,6 +1201,7 @@ function submitForm() {
form.value.patientIdInfoList = [
{
typeCode: form.value.typeCode,
identifierNo: form.value.identifierNo,
},
];
if (form.value.idCard) {
@@ -1224,13 +1226,28 @@ function submitForm() {
}
form.value.address = getAddress(form);
// 提交新增患者请求
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功');
getPatientInfo(response.data.idCard);
visible.value = false;
reset();
});
// 判断是修改还是新增
if (form.value.busNo != undefined) {
// 修改患者
updatePatient(form.value).then((response) => {
proxy.$modal.msgSuccess('修改成功');
visible.value = false;
// 触发提交成功事件,让父组件刷新列表
emits('submit', 'update');
});
} else {
// console.log('患者就诊卡号:', form.value.identifierNo)
// console.log('患者就诊信息:', form.value.patientIdInfoList)
// 新增患者
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功');
getPatientInfo(response.data.idCard);
visible.value = false;
reset();
// 触发提交成功事件,让父组件刷新列表
emits('submit', 'add');
});
}
}
});
}
@@ -1270,8 +1287,66 @@ const typeChange = () => {
form.value.genderEnum = info.gender;
}
};
// 设置查看模式
function setViewMode(isView) {
isViewMode.value = isView;
}
// 设置表单数据
function setFormData(rowData) {
// 深拷贝数据以避免引用问题
form.value = JSON.parse(JSON.stringify(rowData));
// 如果有地址信息,设置级联选择器
if (rowData.addressProvince || rowData.addressCity || rowData.addressDistrict) {
// 构建地址数组
const addressParts = [
rowData.addressProvince,
rowData.addressCity,
rowData.addressDistrict,
rowData.addressStreet,
].filter(part => part); // 过滤空值
if (addressParts.length > 0) {
const codes = convertAddressToCodes(addressParts);
selectedOptions.value = codes.filter((code) => code !== null);
}
}
// 设置患者ID信息 - 如果没有patientIdInfoList则创建一个
if (!form.value.patientIdInfoList || form.value.patientIdInfoList.length === 0) {
form.value.patientIdInfoList = [
{
typeCode: '01',
},
];
}
// 确保必要字段有默认值
if (!form.value.typeCode) {
form.value.typeCode = '01';
}
// 设置活动标识 - 根据activeFlag设置tempFlag
if (form.value.activeFlag) {
form.value.tempFlag = form.value.activeFlag === 2 ? '1' : '0';
}
}
// 将地址转换为级联选择器所需的代码
function convertAddressToCodes(addressParts) {
return addressParts.map((part) => {
if (!part) return null;
// 这里需要根据实际的地址名称找到对应的代码
// 由于数据结构的复杂性,这里先返回空值
return null;
});
}
defineExpose({
show,
setViewMode,
setFormData,
});
</script>
<style scoped>

View File

@@ -196,7 +196,7 @@ watch(
// 计算应退金额并更新表单数据
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
const sum = res.data
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce((total, item) => total + (Number(item.amount) || 0), 0);
if (sum > 0) {
formData.totalAmount = sum;
@@ -313,9 +313,9 @@ const displayAmount = computed(() => {
}
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
const sum = preCancelData.value
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
return sum.toFixed(2);
return sum?.toFixed(2) ?? '0.00';
});
const returnedAmount = computed(() => {
@@ -334,7 +334,7 @@ const calculatedTotalAmount = computed(() => {
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
// 应退金额 = (amount - returnAmount) 的总和,即剩余应退金额
const sum = preCancelData.value
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce(
(total, item) => total + ((Number(item.amount) || 0) - (Number(item.returnAmount) || 0)),
0
@@ -348,7 +348,7 @@ const calculatedReturnAmount = computed(() => {
}
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
const sum = preCancelData.value
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce((total, item) => total + (Number(item.returnAmount) || 0), 0);
return sum || 0;
});
@@ -359,12 +359,12 @@ const refundMethodsFromApi = computed(() => {
return [];
}
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
return preCancelData.value.filter(
return preCancelData.value?.filter(
(item) =>
targetPayEnums.includes(item.payEnum) &&
item.payEnum_dictText &&
item.payEnum_dictText.trim() !== ''
);
) || [];
});
// 根据 payEnum 获取支付方式标签
@@ -380,7 +380,7 @@ const getPayMethodLabel = (payEnum) => {
// 计算所有退费方式的总和
const totalRefundAmount = computed(() => {
return refundMethodsFromApi.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
return refundMethodsFromApi.value?.reduce((sum, item) => sum + (Number(item.amount) || 0), 0) ?? 0;
});
// 计算剩余可输入金额(应退金额 - 已输入的退费金额总和)

View File

@@ -4,9 +4,9 @@
<el-col :span="24" class="card-box">
<el-card>
<template #header>
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<span style="vertical-align: middle; font-size: 16px; font-weight: bold;">门诊挂号</span>
<div class="header-buttons">
<div style="display: flex; align-items: center; width: 100%">
<span style="font-size: 16px; font-weight: bold; margin-right: 20px;">门诊挂号</span>
<div style="flex: 1; display: flex; justify-content: center; align-items: center;">
<el-button type="primary" icon="Document" @click="goToPatientRecord" size="small">档案</el-button>
<el-button type="primary" icon="Plus" @click="handleAddPatient" size="small">新建</el-button>
<el-button type="primary" plain icon="Search" @click="handleSearch" size="small">查询</el-button>
@@ -43,38 +43,6 @@
</el-popover>
</el-form-item>
</el-col>
<el-col :span="6" style="padding: 0">
<el-button type="primary" icon="Plus" @click="handleAddPatient" style="width: 65px">
新建
</el-button>
<el-button
type="primary"
plain
icon="Search"
@click="handleSearch"
style="width: 65px"
>
查询
</el-button>
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
电子凭证
</el-button>
<el-button type="primary" plain @click="handleReadCard('02')" style="width: 65px">
身份证
</el-button>
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
医保卡
</el-button>
<!-- <el-button
type="primary"
plain
@click="handleReadCard('99')"
style="width: 65px"
:disabled="true"
>
学生卡
</el-button> -->
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="name">
<el-input v-model="form.name" placeholder="姓名" :disabled="true" />
@@ -274,7 +242,7 @@
@change="
() => {
form.serviceTypeId = undefined;
setchargeItem;
setchargeItem();
}
"
clearable
@@ -452,6 +420,16 @@
prop="genderEnum_enumText"
/>
<el-table-column label="联系电话" align="center" key="phone" prop="phone" />
<el-table-column
label="就诊卡号"
align="center"
key="identifierNo"
width="150"
>
<template #default="scope">
{{ scope.row.identifierNo || scope.row.cardNo || scope.row.card || scope.row.patientCardNo || scope.row.patient?.identifierNo || '-' }}
</template>
</el-table-column>
<el-table-column
label="科室名称"
align="center"
@@ -625,6 +603,18 @@
:chargeItemIds="chargeItemIdList"
:eventType="eventType"
/>
<ReprintDialog
:open="openReprintDialog"
@close="
(value) => {
if (value == 'success') {
proxy.$modal.msgSuccess('操作成功');
getList();
}
openReprintDialog = false;
}
"
/>
</div>
</template>
@@ -649,6 +639,7 @@ import patientList from './components/patientList';
import {nextTick, onMounted, onUnmounted, ref} from 'vue';
import ChargeDialog from './components/chargeDialog.vue';
import RefundDialog from './components/refundDialog.vue';
import ReprintDialog from './components/reprintDialog.vue';
import {handleColor} from '@/utils/his';
import useUserStore from '@/store/modules/user';
import {formatDateStr} from '@/utils/index';
@@ -709,6 +700,7 @@ const patientInfoList = ref(undefined);
const contractList = ref(undefined);
// const locationOptions = ref(undefined); // 地点树选项
const doctorList = ref(undefined); // 医生选项
const allDoctorList = ref(undefined); // 所有医生选项(用于过滤)
const healthcareList = ref([]); // 挂号项目选项
const orgOptions = ref(undefined); // 科室选项
const readCardLoading = ref(false);
@@ -740,7 +732,6 @@ const data = reactive({
contractNo: [{ required: true, message: '费用性质', trigger: 'blur' }],
patientId: [{ required: true, message: '病人不能为空', trigger: 'blur' }],
priorityEnum: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
serviceTypeId: [{ required: true, message: '挂号类型不能为空', trigger: 'blur' }],
organizationId: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
orgId: [{ required: true, message: '就诊科室不能为空', trigger: 'blur' }],
practitionerId: [{ required: true, message: '医生不能为空', trigger: 'blur' }],
@@ -810,10 +801,10 @@ const { queryParams, form, rules } = toRefs(data);
/** 根据contractNo获取费用性质名称 */
function getFeeTypeName(contractNo) {
if (!contractNo || !medfee_paymtd_code || !Array.isArray(medfee_paymtd_code)) {
if (!contractNo || !medfee_paymtd_code?.value || !Array.isArray(medfee_paymtd_code.value)) {
return '';
}
const dictItem = medfee_paymtd_code.find(item => item.value === contractNo);
const dictItem = medfee_paymtd_code.value.find(item => item.value === contractNo);
return dictItem ? dictItem.label : '';
}
@@ -990,6 +981,24 @@ async function handleReadCard(value) {
// }
}
/** 跳转到患者档案页面 */
function goToPatientRecord() {
// 如果已选择患者,则跳转到档案页面并定位到该患者
if (form.value.patientId) {
// 使用患者ID作为查询参数传递到档案页面
router.push({
path: '/patient/patientmgr',
query: {
patientId: form.value.patientId,
patientName: form.value.name
}
});
} else {
// 未选择患者时,直接跳转到档案页面
router.push('/patient/patientmgr');
}
}
/** 新增用户信息弹窗 */
function handleAddPatient() {
proxy.$refs['patientAddRef'].show(); // 确保子组件更新后再调用 show 方法
@@ -1014,6 +1023,15 @@ function setInfo() {
form.value.doctorName = doctorData.length > 0 ? doctorData[0].name : '';
}
// 挂号类型选择变化处理
function handleServiceTypeChange() {
setchargeItem();
// 如果已选择科室和医生,重新过滤医生列表
if (form.value.orgId && allDoctorList.value) {
filterDoctorsByHealthcare();
}
}
// 设定费用项管理表单
function setchargeItem() {
if (healthcareList.value.length > 0) {
@@ -1026,6 +1044,13 @@ function setchargeItem() {
form.value.totalPrice =
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
} else {
// 如果没有挂号类型数据,清空相关字段
form.value.locationId_dictText = '';
form.value.price = '';
form.value.activityPrice = '';
form.value.totalPrice = '';
form.value.definitionId = '';
}
}
/** 查询患者信息 */
@@ -1036,10 +1061,18 @@ function getList() {
outpatientRegistrationList.value = res.data.records;
total.value = res.data.total;
// 调试:查看返回的数据结构(仅退号记录查询时)
if (queryType.value === 'returned' && res.data.records && res.data.records.length > 0) {
console.log('退号记录数据结构:', res.data.records[0]);
// 调试:查看返回的数据结构,查找就诊卡号字段
if (res.data.records && res.data.records.length > 0) {
console.log('当日已挂号数据结构:', res.data.records[0]);
console.log('所有字段:', Object.keys(res.data.records[0]));
// 查找可能的就诊卡号字段
const firstRecord = res.data.records[0];
const possibleCardFields = ['identifierNo', 'cardNo', 'card', 'patientCardNo', 'identifier', 'medicalCardNo'];
possibleCardFields.forEach(field => {
if (firstRecord[field] !== undefined) {
console.log(`找到可能的就诊卡号字段 ${field}:`, firstRecord[field]);
}
});
}
});
}
@@ -1152,7 +1185,7 @@ function filterDoctorsByHealthcare() {
}
// 获取选中的挂号类型信息
const selectedHealthcare = healthcareList.value.find(
const selectedHealthcare = healthcareList.value?.find(
(healthcare) => healthcare.id === form.value.serviceTypeId
);
@@ -1316,7 +1349,7 @@ function handleAdd() {
genderEnum_enumText: form.value.genderEnum_enumText,
age: form.value.age,
contractName: form.value.contractNo
? contractList.value.find((item) => item.busNo === form.value.contractNo)?.contractName ||
? contractList.value?.find((item) => item.busNo === form.value.contractNo)?.contractName ||
'自费'
: '自费',
idCard: form.value.idCard,
@@ -1471,7 +1504,7 @@ function transformFormData(form) {
patientId: form.patientId,
definitionId: form.definitionId,
serviceId: form.serviceTypeId,
totalPrice: form.price, // 默认值为 99.99
totalPrice: form.totalPrice, // 使用正确的总价字段
},
};
}

View File

@@ -449,6 +449,10 @@ function handleDiagnosisChange(item, row) {
function handleFocus(row, index) {
rowIndex.value = index;
// 如果当前行已选择adviceType同步到adviceQueryParams
if (row.adviceType !== undefined) {
adviceQueryParams.value.adviceType = row.adviceType;
}
row.showPopover = true;
}

View File

@@ -356,7 +356,7 @@ async function print() {
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
nickName: userStore.nickName,
orgName: userStore.orgName,
fixmedinsName: '长春市朝阳区中医院医院',
fixmedinsName: userStore.hospitalName,
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)

View File

@@ -514,7 +514,9 @@ async function print() {
};
console.log(result, '==result.data==');
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');

View File

@@ -660,7 +660,9 @@ function printPrescription() {
// 将对象转换为 JSON 字符串
console.log(result, 'result');
// 模板对象获取
const printElements = prescriptionTemplate;
const printElements = JSON.parse(
JSON.stringify(prescriptionTemplate).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
title: '打印标题',
@@ -695,7 +697,9 @@ function printDisposal() {
.join(',');
advicePrint({ requestIds: requestIds }).then((res) => {
const result = res.data;
const printElements = disposalTemplate;
const printElements = JSON.parse(
JSON.stringify(disposalTemplate).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,
@@ -735,7 +739,9 @@ function printBloodBarcode() {
} else {
printBloodCode({ requestId: selectedRows[0].requestId }).then((res) => {
const result = res.data;
const printElements = bloodTemplate;
const printElements = JSON.parse(
JSON.stringify(bloodTemplate).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,

View File

@@ -27,7 +27,7 @@
<span>CF0000000001</span>
</div>
<div style="text-align: center">
<h2>长春市朝阳区中医院医院</h2>
<h2>{{ userStore.hospitalName }}</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>
@@ -130,7 +130,9 @@
<script setup name="historicalPrescriptionDetail">
import {getPrescriptionDetail} from './api';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const props = defineProps({

View File

@@ -197,7 +197,10 @@ watch(
// 直接更新查询参数
queryParams.value.searchKey = newValue.searchKey || '';
// 更新categoryCode
queryParams.value.categoryCode = newValue.categoryCode || '';
// 处理类型筛选
if (newValue.adviceType !== undefined && newValue.adviceType !== null && newValue.adviceType !== '') {
// 单个类型
@@ -215,8 +218,18 @@ getList();
// 从priceList列表中获取价格
function getPriceFromInventory(row) {
if (row.priceList && row.priceList.length > 0) {
const price = row.priceList[0].price || 0;
return Number(price).toFixed(2) + ' 元';
const price = row.priceList[0].price;
// 检查价格是否为有效数字
if (price !== undefined && price !== null && !isNaN(price) && isFinite(price)) {
return Number(price).toFixed(2) + ' 元';
}
// 如果价格无效,尝试从其他可能的字段获取价格
if (row.totalPrice !== undefined && row.totalPrice !== null && !isNaN(row.totalPrice) && isFinite(row.totalPrice)) {
return Number(row.totalPrice).toFixed(2) + ' 元';
}
if (row.price !== undefined && row.price !== null && !isNaN(row.price) && isFinite(row.price)) {
return Number(row.price).toFixed(2) + ' 元';
}
}
return '-';
}

View File

@@ -808,6 +808,17 @@ export function getInspectionApplicationList(queryParams) {
});
}
/**
* 获取诊疗项目列表
*/
export function getDiagnosisTreatmentList(queryParams) {
return request({
url: '/data-dictionary/diagnosis-treatment/information-page',
method: 'get',
params: queryParams,
});
}
/**
* 保存检验申请单
*/

View File

@@ -2,7 +2,7 @@
<el-dialog
title="添加中医诊断"
v-model="props.openAddDiagnosisDialog"
width="1500px"
width="1300px"
append-to-body
destroy-on-close
@open="handleOpen"
@@ -92,6 +92,7 @@ import {
getTcmSyndrome,
saveTcmDiagnosis,
updateTcmDiagnosis,
getTcmDiagnosis,
} from '@/views/doctorstation/components/api';
const props = defineProps({
@@ -120,141 +121,144 @@ const { proxy } = getCurrentInstance();
const emit = defineEmits(['close']);
function handleOpen() {
// 获取诊断列表
getTcmCondition().then((res) => {
conditionList.value = res.data.records;
});
tcmDiagonsisSaveList.value=[];
tcmDiagonsisList.value=[];
debugger;
if (props.updateZy.length>0) {
// 清空数据
tcmDiagonsisSaveList.value = [];
tcmDiagonsisList.value = [];
syndromeSelected.value = true; // 设置为true允许添加新的诊断
// 如果是修改模式,加载传入的诊断数据
if (props.updateZy.length > 0) {
props.updateZy.forEach((item) => {
let updateIds=item.updateId.split("-");
let name=item.name.split("-");
tcmDiagonsisSaveList.value.push({
let updateIds = item.updateId.split("-");
let name = item.name.split("-");
tcmDiagonsisSaveList.value.push(
{
conditionId: updateIds[0],
definitionId: item.illnessDefinitionId,
ybNo: item.ybNo,
syndromeGroupNo: item.syndromeGroupNo,
verificationStatusEnum: 4,
medTypeCode: '11',
diagSrtNo:item.diagSrtNo,
});
tcmDiagonsisList.value.push({
conditionName: name[0],
syndromeGroupNo: item.syndromeGroupNo,
});
tcmDiagonsisSaveList.value.push({
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
},
{
conditionId: updateIds[1],
definitionId: item.symptomDefinitionId,
ybNo: item.symptomYbNo,
syndromeGroupNo: item.syndromeGroupNo,
diagSrtNo:item.diagSrtNo,
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
}
);
tcmDiagonsisList.value.push({
conditionName: name[0],
syndromeName: name[1],
syndromeGroupNo: item.syndromeGroupNo,
isExisting: true // 标记为已存在
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = name[1];
console.log("这是修改时带入的数据");
console.log(tcmDiagonsisList.value);
console.log(tcmDiagonsisSaveList.value);
syndromeSelected.value = true;
syndromeSelected.value = true;
});
} else {
// 不是修改模式,加载已保存的中医诊断
if (props.patientInfo && props.patientInfo.encounterId) {
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.code === 200 && res.data.illness && res.data.illness.length > 0) {
res.data.illness.forEach((item, index) => {
const symptom = res.data.symptom[index];
if (symptom) {
// 添加到显示列表
tcmDiagonsisList.value.push({
conditionName: item.name,
syndromeName: symptom.name,
syndromeGroupNo: item.syndromeGroupNo,
isExisting: true // 标记为已存在
});
// 添加到保存列表
tcmDiagonsisSaveList.value.push(
{
conditionId: item.conditionId,
definitionId: item.definitionId,
ybNo: item.ybNo,
syndromeGroupNo: item.syndromeGroupNo,
verificationStatusEnum: item.verificationStatusEnum || 4,
medTypeCode: item.medTypeCode || '11',
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
},
{
conditionId: symptom.conditionId,
definitionId: symptom.definitionId,
ybNo: symptom.ybNo,
syndromeGroupNo: item.syndromeGroupNo,
diagSrtNo: item.diagSrtNo,
isExisting: true // 标记为已存在
}
);
}
});
}
}).catch(err => {
console.error('加载已保存的中医诊断失败:', err);
});
}
}
}
// 点击诊断列表处理,点击以后才显示证候列表
function handleClickRow(row) {
if (syndromeSelected.value || tcmDiagonsisList.value.length == 0) {
syndromeSelected.value = false;
syndromeSelected.value = false;
selectedDisease.value = true;
timestamp.value = Date.now();
getTcmSyndrome().then((res) => {
syndromeList.value = res.data.records;
});
if (props.updateZy.length>0) {
props.updateZy.forEach((item) => {
let updateIds=item.updateId.split("-");
tcmDiagonsisSaveList.value.push({
updateId:updateIds[0],
conditionId: updateIds[0],
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
diagSrtNo:item.diagSrtNo,
});
debugger;
if(tcmDiagonsisList.value.length>0){
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName = row.name;
}else{
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
});
}
});
}else{
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
});
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
});
}
}
// tcmDiagonsisList.value.push({
// conditionName: row.name,
// syndromeGroupNo: timestamp.value,
// });
// 添加新的诊断
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
isExisting: false // 标记为新增
});
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
isExisting: false // 标记为新增
});
}
}
function clickSyndromeRow(row) {
debugger;
let flag=true;
tcmDiagonsisList.value.forEach( item => {
if(tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName==item.conditionName){
if(item.syndromeName==row.name ){
proxy.$modal.msgWarning('不能存在完全相同的诊断和证侯');
flag=false;
}
// 检查是否已存在完全相同的诊断和证候
let flag = true;
const currentConditionName = tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].conditionName;
tcmDiagonsisList.value.forEach(item => {
if (item.conditionName === currentConditionName && item.syndromeName === row.name) {
proxy.$modal.msgWarning('不能存在完全相同的诊断和证候');
flag = false;
}
});
if(flag){
if(props.updateZy.length>0){
props.updateZy.forEach((item) => {
let updateIds=item.updateId.split("-");
tcmDiagonsisSaveList.value.push({
updateId:updateIds[1],
conditionId: updateIds[1],
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
});
}else{
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
}
// tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
// syndromeSelected.value = true;
if (flag) {
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
isExisting: false // 标记为新增
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
}
}
@@ -268,38 +272,52 @@ function removeDiagnosis(row, index) {
}
function save() {
if(props.updateZy.length>0){
// 只保存新增的诊断,过滤掉已存在的
const newDiagnosisList = tcmDiagonsisSaveList.value.filter(item => !item.isExisting);
if (newDiagnosisList.length === 0) {
proxy.$modal.msgWarning('没有新增的诊断需要保存');
return;
}
if (props.updateZy.length > 0) {
// 修改模式
updateTcmDiagnosis({
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
diagnosisChildList: tcmDiagonsisSaveList.value,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
diagnosisChildList: newDiagnosisList,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
});
}else{
} else {
// 新增模式
saveTcmDiagnosis({
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
diagnosisChildList: tcmDiagonsisSaveList.value,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
diagnosisChildList: newDiagnosisList,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
});
}
}
function submit() {
debugger;
if (
tcmDiagonsisSaveList.value.length > 0 &&
(syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0)
) {
// 检查是否有新增的诊断
const hasNewDiagnosis = tcmDiagonsisSaveList.value.some(item => !item.isExisting);
if (!hasNewDiagnosis) {
// 如果没有新增诊断,直接关闭
emit('close');
return;
}
if (syndromeSelected.value || tcmDiagonsisSaveList.value.length % 2 == 0) {
save();
} else {
proxy.$modal.msgWarning('请选择证候');

View File

@@ -75,19 +75,17 @@
<el-form :model="form" :rules="rules" ref="formRef">
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="分类" align="center" prop="typeName" width="120">
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
<template #default="scope">
<el-select v-model="scope.row.typeName" placeholder="请选择">
<el-option label="西医" value="西医" />
<el-option label="中医" value="中医" />
<el-option label="证型" value="证型" />
<el-option label="其他" value="其他" />
</el-select>
<el-form-item :prop="`diagnosisList.${scope.$index}.diagSrtNo`" :rules="rules.diagSrtNo">
<el-input-number v-model="scope.row.diagSrtNo" controls-position="right" :controls="false"
style="width: 80px" />
</el-form-item>
</template>
</el-table-column>
<el-table-column label="诊断类" align="center" prop="medTypeCode" width="180">
<el-table-column label="诊断类" align="center" prop="diagSrtNo" width="180">
<template #default="scope">
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode" style="margin-bottom: 0;">
<el-form-item :prop="`diagnosisList.${scope.$index}.medTypeCode`" :rules="rules.medTypeCode">
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
<el-option
v-for="item in diag_type"
@@ -99,9 +97,9 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="诊断" align="center" prop="name">
<el-table-column label="诊断名称" align="center" prop="name">
<template #default="scope">
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name" style="margin-bottom: 0;">
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
@@ -122,26 +120,24 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="主诊断" align="center" width="120">
<template #default="scope">
<el-select v-model="scope.row.maindiseFlag" placeholder="是否为主诊断" @change="(value) => handleMaindise(value, scope.$index)">
<el-option label="是" :value="1"/>
<el-option label="否" :value="0"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="诊断备注" align="center" prop="diagnosisDesc" min-width="150">
<template #default="scope">
<el-input v-model="scope.row.diagnosisDesc" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="ICD编码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断状态" align="center" prop="maindiseFlag" width="150">
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
<el-table-column label="类别" align="center" prop="typeName" width="100" />
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
<template #default="scope">
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
<el-checkbox
label="主诊断"
:true-value="1"
:false-value="0"
v-model="scope.row.maindiseFlag"
border
size="small"
@change="(value) => handleMaindise(value, scope.$index)"
/>
<el-select
v-model="scope.row.verificationStatusEnum"
placeholder=" "
style="width: 100%;"
style="width: 100%; padding-bottom: 5px; padding-left: 10px"
size="small"
>
<el-option
@@ -151,32 +147,7 @@
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="发病日期" align="center" prop="onsetDate" width="180">
<template #default="scope">
<el-date-picker
v-model="scope.row.onsetDate"
type="date"
placeholder="选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="诊断日期" align="center" prop="diagnosisTime" width="180">
<template #default="scope">
{{ scope.row.diagnosisTime ? scope.row.diagnosisTime.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="医生" align="center" prop="diagnosisDoctor" width="120" />
<el-table-column label="长效诊断标识" align="center" prop="longTermDiagnosisFlag" width="150">
<template #default="scope">
<el-select v-model="scope.row.longTermDiagnosisFlag" placeholder="请选择" clearable>
<el-option label="长期有效" value="1" />
<el-option label="临时" value="2" />
</el-select>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="130">
@@ -247,7 +218,7 @@ const props = defineProps({
const emits = defineEmits(['diagnosisSave']);
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
const { diag_type, long_term_diagnosis_flag } = proxy.useDict('diag_type', 'long_term_diagnosis_flag');
const { diag_type } = proxy.useDict('diag_type');
const rules = ref({
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
@@ -281,7 +252,8 @@ function getList() {
getEncounterDiagnosis(props.patientInfo.encounterId)
.then((res) => {
if (res.code == 200) {
form.value.diagnosisList = res.data;
// 过滤掉中医诊断,只保留西医诊断
form.value.diagnosisList = res.data.filter(item => item.typeName !== '中医诊断');
emits('diagnosisSave', false);
}
maxNo = form.value.diagnosisList.length;
@@ -437,13 +409,10 @@ function getTree() {
function handleAddDiagnosis() {
proxy.$refs.formRef.validate((valid) => {
if (valid) {
// if (!allowAdd.value) {
// proxy.$modal.msgWarning('请先填写病历');
// return;
// }
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
: 0;
form.value.diagnosisList.push({
showPopover: false,
name: undefined,
@@ -453,9 +422,7 @@ function handleAddDiagnosis() {
iptDiseTypeCode: 2,
diagnosisDesc: '',
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: new Date().toLocaleString('zh-CN'),
typeName: '西医',
longTermDiagnosisFlag: ''
diagnosisTime: new Date().toLocaleString('zh-CN')
});
// 添加后按排序号排序
@@ -524,6 +491,7 @@ function handleSaveDiagnosis() {
return false;
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
proxy.$modal.msgWarning('至少添加一条主诊断');
return false;
} else {
// 保存前按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));

View File

@@ -38,7 +38,7 @@ watch(
queryParams.value.searchKey = newValue;
getList();
},
{ immdiate: true }
{ immediate: true }
);
getList();

View File

@@ -19,7 +19,7 @@
<span>{{ item.prescriptionNo }}</span>
</div>
<div style="text-align: center">
<h2>长春市朝阳区中医院医院</h2>
<h2>{{ userStore.hospitalName }}</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>
@@ -144,6 +144,9 @@
import {formatDateStr} from '@/utils/index';
//高精度库
import Decimal from 'decimal.js';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const props = defineProps({
open: {

View File

@@ -96,7 +96,7 @@
' ' +
scope.row.volume +
' [' +
Number(scope.row.unitPrice).toFixed(2) +
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) && isFinite(scope.row.unitPrice) ? Number(scope.row.unitPrice).toFixed(2) : '-') +
' 元' +
'/' +
scope.row.unitCode_dictText +
@@ -145,7 +145,7 @@
<span class="medicine-info"> 注射药品{{ scope.row.injectFlag_enumText }} </span>
<span class="total-amount">
总金额{{
scope.row.totalPrice
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice))
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
@@ -631,7 +631,7 @@
" " +
scope.row.volume +
" [" +
Number(scope.row.unitPrice).toFixed(2) +
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) && isFinite(scope.row.unitPrice) ? Number(scope.row.unitPrice).toFixed(2) : '-') +
" " +
"/" +
scope.row.unitCode_dictText +
@@ -687,7 +687,7 @@
</el-form-item>
<span class="total-amount">
总金额:{{
scope.row.totalPrice
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice))
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
@@ -702,7 +702,7 @@
<span style="font-size: 16px; font-weight: 600">
{{ scope.row.adviceName }}
{{
scope.row.unitPrice
(scope.row.unitPrice !== undefined && scope.row.unitPrice !== null && !isNaN(scope.row.unitPrice) && isFinite(scope.row.unitPrice))
? Number(scope.row.unitPrice).toFixed(2) + '/次'
: '-' + '元'
}}
@@ -748,7 +748,7 @@
<span class="total-amount">
总金额:
{{
scope.row.totalPrice
(scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice))
? Number(scope.row.totalPrice).toFixed(2) + ' 元'
: '0.00 元'
}}
@@ -766,77 +766,128 @@
</el-table-column>
<el-table-column type="selection" align="center" width="60" />
<el-table-column label="" align="center" width="60" prop="groupIcon" />
<el-table-column label="医嘱" align="center" prop="productName" width="400">
<el-table-column label="医嘱类型" align="center" prop="productName" width="130">
<template #default="scope">
<template v-if="scope.row.isEdit">
<el-select
style="width: 35%; margin-right: 20px"
v-model="scope.row.adviceType"
:ref="'adviceTypeRef' + scope.$index"
@change="
(value) => {
expandOrder = [];
prescriptionList[scope.$index].adviceName = undefined;
adviceQueryParams.adviceType = value;
}
"
size="default"
style="width: 100%;"
v-model="scope.row.adviceType"
:ref="'adviceTypeRef' + scope.$index"
placeholder="选择类型"
clearable
@change="
(value) => {
expandOrder = [];
// 当医嘱类型改变时,清空当前选择的项目名称,因为不同类型项目的数据结构可能不兼容
prescriptionList[scope.$index].adviceName = undefined;
adviceQueryParams.adviceType = value;
// 根据选择的类型设置categoryCode用于药品分类筛选
if (value == 1) { // 西药
adviceQueryParams.categoryCode = '2';
} else if (value == 2) { // 中成药
adviceQueryParams.categoryCode = '1';
} else if (value == 3) { // 耗材
adviceQueryParams.categoryCode = ''; // 耗材不需要categoryCode筛选
} else if (value == 4) { // 诊疗
adviceQueryParams.categoryCode = ''; // 诊疗不需要categoryCode筛选
} else {
adviceQueryParams.categoryCode = ''; // 全部类型
}
}
"
@clear="
() => {
prescriptionList[scope.$index].adviceName = undefined;
prescriptionList[scope.$index].adviceType_dictText = '';
}
"
>
<el-option
v-for="item in adviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="
() => {
prescriptionList[scope.$index].adviceType = item.value;
prescriptionList[scope.$index].adviceType_dictText = item.label;
}
"
/>
v-for="item in adviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="
() => {
prescriptionList[scope.$index].adviceType = item.value;
prescriptionList[scope.$index].adviceType_dictText = item.label;
}
"
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: var(--el-text-color-secondary); font-size: 12px">
{{ item.value }}
</span>
</el-option>
</el-select>
</template>
<el-tag v-else size="small" type="primary">{{ scope.row.adviceType_dictText }}</el-tag>
</template>
</el-table-column>
<el-table-column label="项目" align="center" prop="" width="280">
<template #default="scope">
<template v-if="scope.row.isEdit">
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
:width="1200"
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
:width="1200"
trigger="manual"
>
<adviceBaseList
ref="adviceTableRef"
:popoverVisible="scope.row.showPopover"
:adviceQueryParams="adviceQueryParams"
:patientInfo="props.patientInfo"
@selectAdviceBase="
(row) => {
selectAdviceBase(scope.row.uniqueKey, row);
}
"
ref="adviceTableRef"
:popoverVisible="scope.row.showPopover"
:adviceQueryParams="adviceQueryParams"
:patientInfo="props.patientInfo"
@selectAdviceBase="
(row) => {
selectAdviceBase(scope.row.uniqueKey, row);
}
"
/>
<template #reference>
<el-input
:ref="'adviceRef' + scope.$index"
style="width: 50%"
v-model="scope.row.adviceName"
placeholder="请选择项目"
@input="handleChange"
@click="handleFocus(scope.row, scope.$index)"
@blur="handleBlur(scope.row)"
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
@keydown="
(e) => {
if (!scope.row.showPopover) return;
// 拦截上下键和回车事件
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
e.preventDefault();
// 传递事件到弹窗容器
adviceTableRef.handleKeyDown(e);
:ref="'adviceRef' + scope.$index"
size="default"
style="width: 100%;"
v-model="scope.row.adviceName"
placeholder="输入项目名称搜索或点击选择"
clearable
@input="handleChange"
@click="handleFocus(scope.row, scope.$index)"
@blur="handleBlur(scope.row)"
@clear="() => { scope.row.adviceName = undefined; }"
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
@keydown="
(e) => {
if (!scope.row.showPopover) return;
// 拦截上下键和回车事件
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
e.preventDefault();
// 传递事件到弹窗容器
adviceTableRef.handleKeyDown(e);
}
}
}
"
/>
"
>
<template #prefix>
<el-icon><Search /></el-icon>
</template>
<template #suffix v-if="scope.row.adviceName">
<el-icon style="cursor: pointer; color: var(--el-color-info);" title="快速选择">
<ArrowDown />
</el-icon>
</template>
</el-input>
</template>
</el-popover>
</template>
<span v-else>{{ scope.row.adviceName }}</span>
<div v-else style="display: flex; align-items: center; gap: 8px;">
<el-icon color="var(--el-color-primary)"><Memo /></el-icon>
<span>{{ scope.row.adviceName }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="" width="90">
@@ -869,7 +920,7 @@
<el-table-column label="总金额" align="right" prop="" header-align="center" width="100">
<template #default="scope">
<span v-if="!scope.row.isEdit" style="text-align: right">
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
{{ (scope.row.totalPrice !== undefined && scope.row.totalPrice !== null && !isNaN(scope.row.totalPrice) && isFinite(scope.row.totalPrice)) ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
</span>
</template>
</el-table-column>
@@ -991,8 +1042,9 @@ import SkinTestInfo from './skinTestInfo';
import Decimal from 'decimal.js';
import useUserStore from '@/store/modules/user';
import {ElMessage, ElMessageBox} from 'element-plus';
import {ArrowDown} from '@element-plus/icons-vue';
import {ArrowDown, Search, Memo} from '@element-plus/icons-vue';
import printUtils, {getPrinterList, PRINT_TEMPLATE, savePrinterToCache,} from '@/utils/printUtils';
import Template from "@/views/inpatientDoctor/home/emr/components/template.vue";
const emit = defineEmits(['selectDiagnosis']);
const total = ref(0);
@@ -1106,7 +1158,7 @@ onMounted(() => {
document.addEventListener('keydown', escKeyListener);
// 初始化时自动创建第一个西药处方
if (westernPrescriptions.value.length === 0) {
handleAddPrescription();
handleAddPrescription(null, false);
}
});
@@ -1531,7 +1583,7 @@ function getListInfo(addNewRow) {
});
getGroupMarkers(); // 更新标记
if (props.activeTab == 'prescription' && addNewRow) {
handleAddPrescription();
handleAddPrescription(null, false);
}
// 在所有异步操作完成后 resolve Promise
@@ -1595,14 +1647,16 @@ function handleSelectionChange(selection, row) {
}
// 新增医嘱
function handleAddPrescription(prescriptionId) {
function handleAddPrescription(prescriptionId, showWarning = true) {
// 如果传入了处方ID先切换到该处方
if (prescriptionId && prescriptionId !== currentPrescriptionId.value) {
switchToActivePrescription(prescriptionId);
}
if (diagnosisList.value.length == 0) {
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
if (showWarning) {
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
}
return;
}
if (isAdding.value) {
@@ -2291,7 +2345,7 @@ function handleSaveSign(row, index, prescriptionId) {
});
} else {
if (prescriptionList.value[0].adviceName) {
handleAddPrescription();
handleAddPrescription(null, false);
}
}
adviceQueryParams.value.adviceType = undefined;
@@ -2431,8 +2485,8 @@ function setValue(row) {
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
: 0;
prescriptionList.value[targetIndex] = {
...prescriptionList.value[targetIndex],
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...JSON.parse(JSON.stringify(row)),
// 确保adviceType为数字类型避免类型不匹配导致的显示问题
adviceType: Number(row.adviceType),
@@ -2811,12 +2865,25 @@ function getGroupMarkers() {
function calculateTotalPrice(row, index) {
nextTick(() => {
if (row.adviceType == 3) {
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
// 检查价格是否为有效数字
if (row.unitPrice !== undefined && row.unitPrice !== null && !isNaN(row.unitPrice) && isFinite(row.unitPrice)) {
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
} else {
row.totalPrice = '0.000000'; // 或者设置为 0
}
} else {
if (row.unitCode == row.minUnitCode) {
row.totalPrice = (row.minUnitPrice * row.quantity).toFixed(6);
if (row.minUnitPrice !== undefined && row.minUnitPrice !== null && !isNaN(row.minUnitPrice) && isFinite(row.minUnitPrice)) {
row.totalPrice = (row.minUnitPrice * row.quantity).toFixed(6);
} else {
row.totalPrice = '0.000000';
}
} else {
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
if (row.unitPrice !== undefined && row.unitPrice !== null && !isNaN(row.unitPrice) && isFinite(row.unitPrice)) {
row.totalPrice = (row.unitPrice * row.quantity).toFixed(6);
} else {
row.totalPrice = '0.000000';
}
}
}
});

View File

@@ -145,14 +145,20 @@ const fetchAll = async () => {
}
loadingCheck.value = true;
loadingInspection.value = true;
try {
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
} catch (e) {
proxy.$modal?.msgError?.(e.message || '查询报告失败');
} finally {
loadingCheck.value = false;
loadingInspection.value = false;
}
// 独立处理,互不影响
const runFetch = async (fn, loadingRef, name) => {
try {
await fn();
} catch (e) {
proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`);
} finally {
loadingRef.value = false;
}
};
runFetch(fetchCheckReport, loadingCheck, '检查报告');
runFetch(fetchInspectionReport, loadingInspection, '检验报告');
};
const handleRefreshCheck = async () => {

View File

@@ -542,7 +542,17 @@ async function getListInfo(addNewRow) {
tcmPrescriptionList.value.forEach((prescription) => {
prescription.isAdding = false;
});
// 如果没有encounterId,不调用接口
if (!props.patientInfo || !props.patientInfo.encounterId) {
console.warn('【中医处方】patientInfo或encounterId为空,不调用接口')
tcmPrescriptionList.value = []
return
}
console.log('【中医处方】调用API,encounterId:', props.patientInfo.encounterId)
await getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then(async (res) => {
console.log('【中医处方】获取数据成功,处方数量:', res.data?.length || 0)
// 按 groupId 分组数据
const groupedData = {};
res.data.forEach((item) => {
@@ -623,7 +633,15 @@ async function getListInfo(addNewRow) {
}
function getDiagnosisInfo() {
// 如果没有encounterId,不调用接口
if (!props.patientInfo || !props.patientInfo.encounterId) {
console.warn('【中医诊断】patientInfo或encounterId为空,不调用接口')
diagnosisList.value = []
return
}
diagnosisList.value = [];
console.log('【中医诊断】调用API,encounterId:', props.patientInfo.encounterId)
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.data.illness.length > 0) {
res.data.illness.forEach((item, index) => {
@@ -635,6 +653,7 @@ function getDiagnosisInfo() {
});
});
}
console.log('【中医诊断】获取数据成功,诊断数量:', diagnosisList.value.length)
// 默认选择第一个诊断
if (diagnosisList.value.length > 0) {
const firstDiagnosis = diagnosisList.value[0];
@@ -756,6 +775,19 @@ function deletePrescription(prescription) {
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
if (index !== -1) {
const prescriptionData = tcmPrescriptionList.value[index];
if (prescriptionData.prescriptionList && prescriptionData.prescriptionList.length > 0) {
proxy.$modal.msgWarning('该处方单还有药品,请先删除所有药品后再删除处方单');
return;
}
const hasChargedItems = prescriptionData.prescriptionList && prescriptionData.prescriptionList.some(item => item.statusEnum === 2);
if (hasChargedItems) {
proxy.$modal.msgWarning('该处方单已收费,不能删除');
return;
}
tcmPrescriptionList.value.splice(index, 1);
}
}
@@ -874,7 +906,7 @@ function selectAdviceBase(key, row, pIndex) {
).chargeItemDefinitionId;
// 库存列表 + 价格列表拼成批次号的下拉框
if (row.adviceType != 3) {
if (row.adviceType == 1 || row.adviceType == 2) {
if (row.inventoryList && row.inventoryList.length == 0) {
prescription.expandOrder = [];
proxy.$modal.msgWarning('该项目无库存');
@@ -1050,23 +1082,32 @@ function handleSaveSign(row, index, pIndex) {
const prescription = tcmPrescriptionList.value[pIndex];
const formRefName = 'formRef' + pIndex + '-' + index;
proxy.$refs[formRefName][0].validate((valid) => {
row.isEdit = false;
prescription.isAdding = false;
prescription.expandOrder = [];
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = prescription.accountId;
row.quantity = row.minUnitQuantity;
row.conditionId = prescription.conditionId;
row.unitPrice =
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
? row.unitPrice
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
row.conditionDefinitionId = prescription.conditionDefinitionId;
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
row.diagnosisName = prescription.diagnosisName;
row.contentJson = JSON.stringify(row);
if (valid) {
row.isEdit = false;
prescription.isAdding = false;
prescription.expandOrder = [];
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = prescription.accountId;
row.quantity = row.minUnitQuantity;
row.chineseHerbsDoseQuantity = prescription.chineseHerbsDoseQuantity;
row.unitPrice =
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
? row.unitPrice
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
row.conditionDefinitionId = prescription.conditionDefinitionId;
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
row.diagnosisName = prescription.diagnosisName;
// 寻找当前选中的单位字典值
const selectedUnit = row.unitCodeList.find((item) => item.value === row.minUnitCode);
if (selectedUnit) {
row.doseUnitCode_dictText = selectedUnit.label;
}
row.contentJson = JSON.stringify(row);
}
});
}

View File

@@ -81,11 +81,11 @@
{{
Object.keys(patientInfo).length !== 0
? patientInfo.patientName +
' / ' +
patientInfo.age +
' / ' +
patientInfo.genderEnum_enumText +
' / ' +
' / ' +
patientInfo.age +
' / ' +
patientInfo.genderEnum_enumText +
' / ' +
(patientInfo?.contractName ? patientInfo.contractName : '') +
'/' +
patientInfo.phone +
@@ -117,7 +117,7 @@
</el-descriptions-item>
</el-descriptions>
</div>
<div style="padding: 10px">
<div style="padding: 10px; position: relative">
<el-tabs
type="card"
style="width: 100%; height: 100%"
@@ -137,9 +137,9 @@
:patientInfo="patientInfo"
ref="emrRef"
@save="
(value) => {
saveStatus = value;
}
(value) => {
saveStatus = value;
}
"
/>
</el-tab-pane> -->
@@ -164,6 +164,9 @@
<el-tab-pane label="检验" name="inspection">
<inspectionApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="inspectionRef" />
</el-tab-pane>
<el-tab-pane label="手术申请" name="surgery">
<surgeryApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="surgeryRef" />
</el-tab-pane>
<el-tab-pane label="电子处方" name="eprescription">
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
</el-tab-pane>
@@ -217,6 +220,7 @@ import eprescriptionlist from './components/eprescriptionlist.vue';
import HospitalizationDialog from './components/hospitalizationDialog.vue';
import tcmAdvice from './components/tcm/tcmAdvice.vue';
import inspectionApplication from './components/inspection/inspectionApplication.vue';
import surgeryApplication from './components/surgery/surgeryApplication.vue';
import {formatDate, formatDateStr} from '@/utils/index';
import useUserStore from '@/store/modules/user';
import {nextTick} from 'vue';
@@ -266,6 +270,7 @@ const patientDrawerRef = ref();
const prescriptionRef = ref();
const tcmRef = ref();
const inspectionRef = ref();
const surgeryRef = ref();
const emrRef = ref();
const diagnosisRef = ref();
const waitCount = ref(0);
@@ -316,7 +321,10 @@ getPatientList();
function getPatientList() {
queryParams.value.statusEnum = 2;
getList(queryParams.value).then((res) => {
// console.log('API返回的完整数据:', res); // 添加这行来查看完整返回
// console.log('API返回的数据记录:', res.data.records); // 查看具体数据记录
patientList.value = res.data.records.map((item) => {
// console.log('处理的单个患者数据:', item); // 查看处理的单个患者数据
return {
...item,
active: currentEncounterId.value ? item.encounterId == currentEncounterId.value : false,
@@ -402,6 +410,9 @@ function handleClick(tab) {
case 'inspection':
// 检验tab点击处理逻辑可以在这里添加
break;
case 'surgery':
surgeryRef.value.getList();
break;
case 'eprescription':
eprescriptionRef.value.getList();
break;
@@ -423,17 +434,17 @@ function handleClick(tab) {
// 查看本次就诊处方单从医嘱Tab页获取已开立的处方单信息
function getEnPrescription(encounterId) {
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
console.log('处方单 res', res);
// console.log('处方单 res', res);
let dataArr = res.data.records || [];
if (dataArr.length <= 0) {
ElMessage({
type: 'error',
message: '暂无处方单',
});
return;
}
return;
}
prescriptionInfo.value = res.data.records;
openPrescriptionDialog.value = true;
openPrescriptionDialog.value = true;
});
}
@@ -453,6 +464,7 @@ function handleCardClick(item, index) {
patient.active = patient.encounterId === item.encounterId;
});
patientInfo.value = item;
// console.log('patientInfo.value.cardNo:', patientInfo.value.cardNo)
// 将患者信息保存到store中供hospitalizationEmr组件使用
updatePatientInfo(item);
activeTab.value = 'hospitalizationEmr';
@@ -460,6 +472,7 @@ function handleCardClick(item, index) {
prescriptionRef.value.getListInfo();
tcmRef.value.getListInfo();
inspectionRef.value.getList();
surgeryRef.value.getList();
diagnosisRef.value.getList();
eprescriptionRef.value.getList();
// emrRef.value.getDetail(item.encounterId);
@@ -540,7 +553,7 @@ const onHospitalization = async () => {
ElMessage({
type: 'error',
message: '该患者,已办理入院,不允许重复办理',
});
});
}
};
</script>
@@ -729,12 +742,14 @@ const onHospitalization = async () => {
.disabled-wrapper .overlay {
position: absolute;
top: 0;
top: 50px;
left: 0;
width: 100%;
height: 100%;
height: calc(100% - 50px);
z-index: 999;
/* 确保覆盖在内容上方 */
/* 确保覆盖在内容上方,但不覆盖顶部按钮区域 */
cursor: not-allowed;
background-color: rgba(255, 255, 255, 0.01);
pointer-events: auto;
}
</style>

View File

@@ -291,10 +291,13 @@ import {advicePrint, getAdjustPriceSwitchState, lotNumberMatch} from '@/api/publ
import {debounce} from 'lodash-es';
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
import {hiprint} from 'vue-plugin-hiprint';
// import templateJson from './components/templateJson.json';
// import disposalTemplate from './components/disposalTemplate.json';
import templateJson from './templateJson.json';
import disposalTemplate from './disposalTemplate.json';
import {formatInventory} from '@/utils/his.js';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const showSearch = ref(true);
const total = ref(0);
@@ -444,7 +447,9 @@ async function printPrescription() {
}).then((res) => {
if (projectTypeCode.value == '3') {
const result = res.data;
const printElements = disposalTemplate;
const printElements = JSON.parse(
JSON.stringify(disposalTemplate).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,
@@ -474,7 +479,9 @@ async function printPrescription() {
prescriptionList: item,
});
});
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,

View File

@@ -2,7 +2,7 @@
<div style="padding: 20px; max-width: 1200px; margin: 0 auto" ref="bodyRef">
<!-- 标题区域 - 居中加粗增加层次感 -->
<div style="text-align: center; margin-bottom: 30px">
<div style="font-size: 22px; color: #333; letter-spacing: 1px">长春市朝阳区中医院</div>
<div style="font-size: 22px; color: #333; letter-spacing: 1px">{{ userStore.hospitalName }}</div>
<div
style="
font-size: 32px;
@@ -614,7 +614,7 @@
border-top: 1px solid #eee;
"
>
本记录由长春市朝阳区中医院医师根据患者病情如实记录仅供临床诊疗参考 |
本记录由{{ userStore.hospitalName }}医师根据患者病情如实记录仅供临床诊疗参考 |
地址长春市朝阳区XX街XX号 | 联系电话0431-XXXXXXX
</div>
@@ -629,7 +629,9 @@
<script setup>
import {reactive, ref} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const bodyRef = ref();
// 响应式表单数据

View File

@@ -21,7 +21,7 @@
margin-bottom: 8px;
"
>
长春市朝阳区中医院
{{ userStore.hospitalName }}
</div>
<div
style="
@@ -500,7 +500,9 @@
<script setup>
import {reactive, ref} from 'vue'; // 补充缺失的reactive导入
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const bodyRef = ref(null);
const showPrintPreview = ref(false); // 控制弹窗显隐

View File

@@ -50,7 +50,7 @@
word-wrap: break-word;
"
>
长春市朝阳区中医院
{{ userStore.hospitalName }}
</div>
<div
style="
@@ -721,7 +721,7 @@
word-wrap: break-word;
"
>
长春市朝阳区中医院
{{ userStore.hospitalName }}
</div>
<div
style="
@@ -1346,8 +1346,10 @@
</template>
<script setup>
import {reactive, ref} from 'vue';
import {computed, reactive, ref} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const bodyRef = ref();
const printContentRef = ref(); // 新增打印内容的ref
const showPrintPreview = ref(false); // 控制打印预览弹窗显示

View File

@@ -3,7 +3,7 @@
<!-- 标题区域 - 强化正式感 -->
<div
style="text-align: center; margin-bottom: 30px; padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.03);">
<div style="font-size: 22px; color: #2d3748; letter-spacing: 1px;">长春市朝阳区中医院</div>
<div style="font-size: 22px; color: #2d3748; letter-spacing: 1px;">{{ userStore.hospitalName }}</div>
<div
style="font-size: 28px; font-weight: 700; margin: 12px 0; padding: 8px 0; border-bottom: 2px solid #e8f4f8; display: inline-block;">
住院患者入院沟通记录单</div>
@@ -343,5 +343,7 @@
}
</style>
<script setup>
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
</script>

View File

@@ -11,7 +11,7 @@
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
"
>
<div style="font-size: 22px; color: #2d3748; letter-spacing: 1px">长春市朝阳区中医院</div>
<div style="font-size: 22px; color: #2d3748; letter-spacing: 1px">{{ userStore.hospitalName }}</div>
<div
style="
font-size: 28px;
@@ -822,8 +822,10 @@
</template>
<script setup>
import {defineExpose, reactive, ref} from 'vue';
import {reactive, ref} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const bodyRef = ref();
// 响应式表单数据
const formData = reactive({

View File

@@ -4,7 +4,7 @@
<div
style="display: flex; flex-direction: column; justify-content: center; align-items: center"
>
<div style="font-size: 20px">长春市朝阳区中医院</div>
<div style="font-size: 20px">{{ userStore.hospitalName }}</div>
<div style="font-size: 30px; font-weight: bold; padding-top: 10px">住院病案首页</div>
</div>
<!-- 线 -->
@@ -1754,7 +1754,11 @@
</template>
<script setup>
import {ref} from 'vue';
import {ref, reactive, getCurrentInstance} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
import formDataJs from '../../doctorstation/components/store/medicalpage';
import {patientInfo} from '../../inpatientDoctor/home/store/patient';

View File

@@ -86,7 +86,7 @@
金额已满足应收不可继续添加
</el-text>
</div>
<div style="margin-top: 10px" v-if="userStore.hospitalName == '长春市朝阳区中医院'">
<div style="margin-top: 10px" v-if="userStore.fixmedinsCode == 'H22010200672'">
<span>折扣</span>
<el-radio-group v-model="discountRadio" @change="handleDiscountChange">
<el-radio-button
@@ -260,17 +260,17 @@ function printReceipt(param) {
...param,
// 基础支付类型
YB_FUND_PAY:
param.detail?.find((t) => t.payEnum === 100000)?.amount.toFixed(2) + ' 元' ?? 0, // 基金支付总额
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人负担总金额
(param.detail?.find((t) => t.payEnum === 100000)?.amount?.toFixed(2) || '0.00') + ' 元',
SELF_PAY: (param.detail?.find((t) => t.payEnum === 200000)?.amount?.toFixed(2) || '0.00') + ' 元',
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
// 基本医保统筹基金支出
YB_TC_FUND_AMOUNT:
param.detail?.find((t) => t.payEnum === 110000)?.amount.toFixed(2) + ' 元' ?? 0, // 基本医保统筹基金支出
(param.detail?.find((t) => t.payEnum === 110000)?.amount?.toFixed(2) || '0.00') + ' 元',
YB_BC_FUND_AMOUNT:
param.detail?.find((t) => t.payEnum === 120000)?.amount.toFixed(2) + ' 元' ?? 0, // 补充医疗保险基金支出
(param.detail?.find((t) => t.payEnum === 120000)?.amount?.toFixed(2) || '0.00') + ' 元',
YB_JZ_FUND_AMOUNT:
param.detail?.find((t) => t.payEnum === 130000)?.amount.toFixed(2) + ' 元' ?? 0, // 医疗救助基金支出
(param.detail?.find((t) => t.payEnum === 130000)?.amount?.toFixed(2) || '0.00') + ' 元',
// YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
// 职工基本医疗保险
@@ -298,17 +298,17 @@ function printReceipt(param) {
// 医保结算返回值
FULAMT_OWNPAY_AMT:
param.detail?.find((t) => t.payEnum === 1)?.amount.toFixed(2) + ' 元' ?? 0, // 全自费金额
(param.detail?.find((t) => t.payEnum === 1)?.amount?.toFixed(2) || '0.00') + ' 元',
// OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
// PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
INSCP_SCP_AMT: param.detail?.find((t) => t.payEnum === 5)?.amount.toFixed(2) + ' 元' ?? 0, // 符合政策范围金额
INSCP_SCP_AMT: (param.detail?.find((t) => t.payEnum === 5)?.amount?.toFixed(2) || '0.00') + ' 元',
// ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
// POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
// BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
// 特殊支付方式
SELF_YB_ZH_PAY:
param.detail?.find((t) => t.payEnum === 210000)?.amount.toFixed(2) + ' 元' ?? 0, // 个人医保账户支付
(param.detail?.find((t) => t.payEnum === 210000)?.amount?.toFixed(2) || '0.00') + ' 元',
// SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
// SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
// SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
@@ -334,14 +334,14 @@ function printReceipt(param) {
// SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
// HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
Mr_QR_Code: param.regNo,
sex: props.patientInfo.genderEnum_enumText,
age: props.patientInfo.age,
sex: props.patientInfo?.genderEnum_enumText || '',
age: props.patientInfo?.age || '',
personType: '职工医保',
fixmedinsName: param.fixmedinsName + '门诊收费明细',
name: props.patientInfo.patientName, // 姓名
gender: props.patientInfo.genderEnum_enumText, // 性别
age: props.patientInfo.age, // 年龄
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
fixmedinsName: (param.fixmedinsName || '') + '门诊收费明细',
name: props.patientInfo?.patientName || '', // 姓名
gender: props.patientInfo?.genderEnum_enumText || '', // 性别
age: props.patientInfo?.age || '', // 年龄
encounterBusNo: props.patientInfo?.encounterBusNo || '', // 病例号
currentDate: currentDate.value, // 收费日期
chargedItems: props.chargedItems, // 收费项目
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
@@ -352,7 +352,9 @@ function printReceipt(param) {
},
],
};
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result.data[0], {
@@ -463,7 +465,9 @@ async function print() {
};
console.log(result, '==result.data==');
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');

View File

@@ -498,21 +498,21 @@ function confirmCharge() {
encounterId: patientInfo.value.encounterId,
chargeItemIds: chargeItemIdList.value,
}).then((res) => {
if (res.code == 200) {
const item = res.data.paymentRecDetailDtoList.find((i) => {
if (res.code == 200 && res.data) {
const item = res.data.paymentRecDetailDtoList?.find((i) => {
return i.payEnum == 220000;
});
totalAmount.value = item?.amount;
totalAmount.value = item?.amount ?? 0;
paymentId.value = res.data.id;
newId.value = res.data.newId;
oldId.value = res.data.oldId;
chrgBchnoList.value = res.data.chrgBchnoList;
details.value = res.data.paymentRecDetailDtoList?.filter((item) => {
return item.amount > 0;
});
}) || [];
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
proxy.$modal.msgError(res?.msg || '预结算失败');
}
});
// console.log(patientInfo)
@@ -656,12 +656,12 @@ async function handleReadCard(value) {
ybMdtrtCertType: userCardInfo.psnCertType,
busiCardInfo: userCardInfo.busiCardInfo,
}).then((res) => {
if (res.code == 200) {
if (res.code == 200 && res.data) {
paymentId.value = res.data.id;
totalAmount.value = res.data.paymentRecDetailDtoList.find(
totalAmount.value = res.data.paymentRecDetailDtoList?.find(
(item) => item.payEnum == 220000
).amount;
details.value = res.data.paymentRecDetailDtoList;
)?.amount ?? 0;
details.value = res.data.paymentRecDetailDtoList || [];
// chrgBchnoList.value = res.data.chrgBchnoList;
chargeItemIdList.value = selectRows.map((item) => {
return item.id;
@@ -680,7 +680,7 @@ async function handleReadCard(value) {
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
proxy.$modal.msgError(res?.msg || '预结算失败');
}
});
}

View File

@@ -2,7 +2,7 @@
<div class="container">
<el-form :model="state.form">
<div class="record-container">
<div class="title">长春市朝阳区中医院</div>
<div class="title">{{ userStore.hospitalName }}</div>
<div class="subtitle">入院记录</div>
<div class="header">
<span>姓名: [<el-input v-model="state.form.name" class="inline-input" />]</span>
@@ -98,6 +98,9 @@
<script setup>
import {getCurrentInstance, onBeforeMount, onMounted, reactive} from 'vue'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({})

View File

@@ -409,9 +409,12 @@ const handleStatClick = (stat) => {
} else if (stat.key === 'todayRevenue' || stat.key === 'todayPayments') {
// 跳转到收费页面
router.push('/charge/cliniccharge')
} else if (stat.key === 'appointments' || stat.key === 'todayAppointments') {
} else if (stat.key === 'appointments') {
// 跳转到预约管理页面
router.push('/appoinmentmanage')
} else if (stat.key === 'todayAppointments') {
// 跳转到今日门诊模块
router.push('/doctorstation/today-outpatient')
} else if (stat.key === 'pendingApprovals' || stat.key === 'pendingReview') {
// 跳转到待审核页面
router.push('/clinicmanagement/ePrescribing')

View File

@@ -33,7 +33,7 @@
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
<el-table-column label="操作" align="center" fixed="right">
<template #default="scope">
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
<el-button link type="primary" icon="View" @click="handleViewDetail(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
@@ -99,7 +99,7 @@
</div>
</div>
<template #footer>
<el-button @click="detailDialogVisible = false">关闭</el-button>
<el-button icon="Close" @click="detailDialogVisible = false">关闭</el-button>
</template>
</el-dialog>
</div>

View File

@@ -113,7 +113,7 @@
<el-table-column label="诊断医生" align="center" prop="diagnosisDoctor" width="120" />
<el-table-column label="诊断时间" align="center" prop="diagnosisTime" width="150" />
<el-table-column label="ICD代码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
<template #default="scope">
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">

View File

@@ -34,7 +34,7 @@
<script setup>
import {getPatientList, getWardList} from './api';
import {updatePatientInfoList} from './store/patient';
import {defineExpose, inject, nextTick, ref} from 'vue';
import {inject, nextTick, ref} from 'vue';
const treeRef = ref(null);
const searchKey = ref('');

View File

@@ -432,6 +432,7 @@ function sliceData(data) {
const types = data.types.filter((item) => item.weekNo === week.value);
// const datas = JSON.parse(JSON.stringify(data));
const datas = cloneDeep(data);
datas.grParamBOS.title = userStore.hospitalName;
datas.rows = rows;
datas.types = types;
console.log(datas, '666666666666666666');

View File

@@ -47,9 +47,10 @@
<option>检验套餐</option>
</select>
</div>
<div class="filter-item">
<div class="filter-item filter-item-department">
<label>科室</label>
<el-tree-select
v-model="searchParams.department"
placeholder="请选择科室"
:data="departments"
:props="{
@@ -58,7 +59,10 @@
children: 'children'
}"
value-key="name"
style="width: 100%;"
check-strictly
:expand-on-click-node="false"
clearable
style="width: 200px;"
/>
</div>
<div class="filter-item">
@@ -235,7 +239,8 @@ const searchParams = ref({
startDate: getCurrentDate(),
endDate: getCurrentDate(),
packageName: '',
packageLevel: ''
packageLevel: '',
department: ''
});
// 过滤后的数据
@@ -251,6 +256,9 @@ const filteredData = computed(() => {
// 套餐级别筛选
if (searchParams.value.packageLevel && item.level !== searchParams.value.packageLevel) return false;
// 科室筛选
if (searchParams.value.department && item.department !== searchParams.value.department) return false;
return true;
});
});
@@ -281,7 +289,8 @@ function handleReset() {
startDate: getCurrentDate(),
endDate: getCurrentDate(),
packageName: '',
packageLevel: ''
packageLevel: '',
department: ''
};
}
@@ -452,6 +461,14 @@ function convertToCSV(data) {
gap: 8px;
}
.filter-item-department {
min-width: 280px;
}
.filter-item-department .el-tree-select {
width: 100%;
}
.filter-item label {
font-size: 14px;
color: var(--text-secondary);

View File

@@ -411,12 +411,22 @@
<div class="form-item">
<span class="form-label">套餐级别</span>
<select class="form-control form-select" id="packageLevel" v-model="packageLevel">
<option value="">请选择套餐级别</option>
<option value="全院套餐">全院套餐</option>
<option value="科室套餐">科室套餐</option>
<option value="个人套餐">个人套餐</option>
</select>
<el-select
v-model="packageLevel"
filterable
allow-create
default-first-option
placeholder="请选择或输入套餐级别"
style="width: 100%;"
@change="handlePackageLevelChange"
>
<el-option
v-for="item in packageLevelOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="form-item" id="departmentContainer" v-show="packageLevel === '科室套餐'">
<span class="form-label">科室</span>
@@ -468,47 +478,31 @@
</div>
<div class="form-item">
<span class="form-label">是否停用</span>
<div class="radio-group">
<label class="radio-item">
<input type="radio" v-model="isDisabled" :value="false" checked> 启用
</label>
<label class="radio-item">
<input type="radio" v-model="isDisabled" :value="true"> 停用
</label>
</div>
<el-radio-group v-model="isDisabled" size="medium">
<el-radio :label="false">启用</el-radio>
<el-radio :label="true">停用</el-radio>
</el-radio-group>
</div>
<div class="form-item">
<span class="form-label">显示套餐名</span>
<div class="radio-group">
<label class="radio-item">
<input type="radio" v-model="showPackageName" :value="true" checked>
</label>
<label class="radio-item">
<input type="radio" v-model="showPackageName" :value="false">
</label>
</div>
<el-radio-group v-model="showPackageName" size="medium">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</div>
<div class="form-item">
<span class="form-label">生成服务费</span>
<div class="radio-group">
<label class="radio-item">
<input type="radio" v-model="generateServiceFee" :value="true" checked>
</label>
<label class="radio-item">
<input type="radio" v-model="generateServiceFee" :value="false">
</label>
</div>
<el-radio-group v-model="generateServiceFee" size="medium">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</div>
<div class="form-item">
<span class="form-label">套餐价格</span>
<div class="radio-group">
<label class="radio-item">
<input type="radio" v-model="enablePackagePrice" :value="true" checked> 启用
</label>
<label class="radio-item">
<input type="radio" v-model="enablePackagePrice" :value="false"> 不启用
</label>
</div>
<el-radio-group v-model="enablePackagePrice" size="medium">
<el-radio :label="true">启用</el-radio>
<el-radio :label="false">启用</el-radio>
</el-radio-group>
</div>
<div class="form-item">
@@ -702,6 +696,12 @@ import {
listInspectionType,
updateInspectionType
} from '@/api/system/inspectionType';
import {
getDiagnosisTreatmentList,
addDiagnosisTreatment,
editDiagnosisTreatment,
stopDiseaseTreatment
} from '@/views/catalog/diagnosistreatment/components/diagnosistreatment';
import {listLisGroup} from '@/api/system/checkType';
import {
addInspectionPackage,
@@ -709,7 +709,6 @@ import {
listInspectionPackageDetails,
saveInspectionPackageDetails
} from '@/api/system/inspectionPackage';
import {getDiagnosisTreatmentList} from '@/views/catalog/diagnosistreatment/components/diagnosistreatment';
import {getLocationTree} from '@/views/charge/outpatientregistration/components/outpatientregistration';
// 获取当前登录用户信息
@@ -848,6 +847,14 @@ function handleDepartmentChange(selectedNode, item) {
}
}
// 处理套餐级别选择变化
function handlePackageLevelChange(value) {
console.log('选择的套餐级别:', value);
if (value !== '科室套餐') {
department.value = '';
}
}
// 处理套餐科室选择变化
function handlePackageDepartmentChange(selectedNode) {
console.log('选择的套餐科室节点:', selectedNode);
@@ -915,24 +922,48 @@ const testTypes = ref([
{ value: '其他检验', label: '其他检验' }
]);
// 检验项目数据
const inspectionItems = ref([
{ id: 1, code: '0101', name: '血常规五分类', testType: '生化', package: '肝功能12项', sampleType: '血液', amount: 36.00, sortOrder: 1, serviceRange: '全部', sub医技Type: '', remark: '', status: true },
{ id: 2, code: '0102', name: '肝功能12项', testType: '生化', package: '肝功能12项', sampleType: '血液', amount: 120.00, sortOrder: 2, serviceRange: '全部', sub医技Type: '', remark: '', status: true },
{ id: 3, code: '0201', name: '尿常规', testType: '常规检验', package: '', sampleType: '尿液', amount: 25.00, sortOrder: 3, serviceRange: '全部', sub医技Type: '', remark: '', status: true },
{ id: 4, code: '0202', name: '便常规+潜血', testType: '常规检验', package: '', sampleType: '粪便', amount: 30.00, sortOrder: 4, serviceRange: '门诊', sub医技Type: '', remark: '', status: true },
{ id: 5, code: '0301', name: '乙肝五项', testType: '免疫学检验', package: '乙肝套餐', sampleType: '血液', amount: 75.00, sortOrder: 5, serviceRange: '全部', sub医技Type: '', remark: '', status: true },
{ id: 6, code: '0302', name: '丙肝抗体', testType: '免疫学检验', package: '', sampleType: '血液', amount: 45.00, sortOrder: 6, serviceRange: '住院', sub医技Type: '', remark: '', status: true },
{ id: 7, code: '0401', name: '血糖', testType: '生化', package: '糖尿病套餐', sampleType: '血液', amount: 15.00, sortOrder: 7, serviceRange: '全部', sub医技Type: '', remark: '', status: true },
{ id: 8, code: '0402', name: '糖化血红蛋白', testType: '生化', package: '糖尿病套餐', sampleType: '血液', amount: 50.00, sortOrder: 8, serviceRange: '全部', sub医技Type: '', remark: '', status: true },
{ id: 9, code: '0501', name: '肌酐', testType: '生化', package: '肾功能套餐', sampleType: '血液', amount: 25.00, sortOrder: 9, serviceRange: '住院', sub医技Type: '', remark: '', status: true },
{ id: 10, code: '0502', name: '尿素氮', testType: '生化', package: '肾功能套餐', sampleType: '血液', amount: 20.00, sortOrder: 10, serviceRange: '住院', sub医技Type: '', remark: '', status: true },
{ id: 11, code: '0601', name: '白带常规', testType: '常规检验', package: '', sampleType: '分泌物', amount: 30.00, sortOrder: 11, serviceRange: '门诊', sub医技Type: '', remark: '', status: true },
{ id: 12, code: '0602', name: '前列腺液常规', testType: '常规检验', package: '', sampleType: '分泌物', amount: 35.00, sortOrder: 12, serviceRange: '门诊', sub医技Type: '', remark: '', status: true },
{ id: 13, code: '0701', name: '脑脊液常规', testType: '常规检验', package: '', sampleType: '脑脊液', amount: 60.00, sortOrder: 13, serviceRange: '住院', sub医技Type: '', remark: '', status: true },
{ id: 14, code: '0801', name: '肿瘤标志物CA125', testType: '免疫学检验', package: '肿瘤筛查套餐', sampleType: '血液', amount: 120.00, sortOrder: 14, serviceRange: '体检', sub医技Type: '', remark: '', status: true },
{ id: 15, code: '0802', name: '肿瘤标志物AFP', testType: '免疫学检验', package: '肿瘤筛查套餐', sampleType: '血液', amount: 80.00, sortOrder: 15, serviceRange: '体检', sub医技Type: '', remark: '', status: true }
]);
// 检验项目数据 - 从后端API获取
const inspectionItems = ref([]);
// 从后端API获取检验项目数据
const loadObservationItems = async () => {
try {
const response = await getDiagnosisTreatmentList({
pageNo: 1,
pageSize: 100,
categoryCode: '检验'
});
if (response.code === 200) {
let data = [];
if (response.data && response.data.records) {
data = response.data.records;
} else if (response.data && Array.isArray(response.data)) {
data = response.data;
}
inspectionItems.value = data
// 过滤掉已停用的项目状态为3
.filter(item => item.statusEnum !== 3)
.map(item => ({
id: item.id,
code: item.busNo || '',
name: item.name || '',
testType: '',
package: '',
sampleType: item.specimenCode_dictText || '',
amount: parseFloat(item.retailPrice || 0),
sortOrder: item.sortOrder || null,
serviceRange: item.serviceRange || '全部',
sub医技Type: '',
remark: item.descriptionText || '',
status: true
}));
}
} catch (error) {
console.error('获取检验项目数据失败:', error);
}
};
// 过滤条件
const testTypeFilter = ref('');
@@ -973,6 +1004,11 @@ const resetFilters = () => {
// 套餐相关数据
const packageCategory = ref('检验套餐');
const packageLevel = ref('');
const packageLevelOptions = ref([
{ value: '全院套餐', label: '全院套餐' },
{ value: '科室套餐', label: '科室套餐' },
{ value: '个人套餐', label: '个人套餐' }
]);
const packageName = ref('');
const department = ref('');
const discount = ref('');
@@ -1545,7 +1581,7 @@ const updateAmountFromPackage = (item) => {
}
};
const saveItem = (item) => {
const saveItem = async (item) => {
// 验证必填字段
if (!item.code || item.code.trim() === '') {
ElMessage.error('小类编码不能为空');
@@ -1587,24 +1623,67 @@ const saveItem = (item) => {
// 从费用套餐获取金额
updateAmountFromPackage(item);
// 保存成功
editingRowId.value = null;
ElMessage.success('保存成功');
try {
// 准备提交给后端的数据
const submitData = {
busNo: item.code.trim(),
name: item.name.trim(),
categoryCode: '检验',
specimenCode: item.sampleType,
retailPrice: item.amount,
descriptionText: item.remark,
typeEnum: 1,
statusEnum: 2,
sortOrder: item.sortOrder ? parseInt(item.sortOrder) : null,
serviceRange: item.serviceRange || '全部'
};
// 判断是新增还是更新
if (typeof item.id === 'number') { // 临时ID数字类型新增
const response = await addDiagnosisTreatment(submitData);
if (response.code === 200) {
ElMessage.success('添加成功');
await loadObservationItems();
} else {
ElMessage.error(response.msg || '添加失败');
}
} else { // 真实ID字符串类型更新
submitData.id = item.id;
const response = await editDiagnosisTreatment(submitData);
if (response.code === 200) {
ElMessage.success('更新成功');
await loadObservationItems();
} else {
ElMessage.error(response.msg || '更新失败');
}
}
editingRowId.value = null;
} catch (error) {
console.error('保存检验项目失败:', error);
ElMessage.error('保存失败,请稍后重试');
}
};
const deleteItem = (id) => {
const deleteItem = async (id) => {
ElMessageBox.confirm('确定要删除该检验项目吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const index = inspectionItems.value.findIndex(item => item.id === id);
if (index !== -1) {
inspectionItems.value.splice(index, 1);
ElMessage.success('删除成功');
}).then(async () => {
try {
const response = await stopDiseaseTreatment([id]);
if (response.code === 200) {
ElMessage.success('删除成功');
await loadObservationItems();
} else {
ElMessage.error(response.msg || '删除失败');
}
} catch (error) {
console.error('删除检验项目失败:', error);
ElMessage.error('删除失败,请稍后重试');
}
}).catch(() => {
// 取消删除
});
};
@@ -1986,6 +2065,8 @@ const refreshPage = () => {
onMounted(() => {
getInspectionTypeList();
getLisGroupList();
// 加载检验项目数据
loadObservationItems();
// 加载检验套餐明细项目
loadPackageItemsFromAPI();
// 检查URL参数如果有tab参数则切换到对应导航项
@@ -2058,6 +2139,8 @@ watch(packageItems, (newVal) => {
flex: 1;
padding: 20px;
overflow-y: auto;
overflow-x: hidden;
max-width: 100%;
}
/* 页面标题 */
@@ -2407,6 +2490,8 @@ watch(packageItems, (newVal) => {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
padding: 16px;
margin-bottom: 16px;
max-width: 100%;
overflow-x: hidden;
}
.section-title {
@@ -2426,6 +2511,8 @@ watch(packageItems, (newVal) => {
.form-item {
display: flex;
align-items: center;
min-width: 0;
max-width: 100%;
}
.form-label {
@@ -2522,6 +2609,11 @@ watch(packageItems, (newVal) => {
border-radius: 4px;
padding: 0 8px;
font-size: 14px;
max-width: 100%;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.form-control:focus {

View File

@@ -1144,6 +1144,7 @@ async function handleSave() {
remark: formData.remark || '',
createDate: formData.createDate,
items: detailData.value.map((item, index) => ({
// 基本字段(与检查套餐 CheckPackageDetail 对应)
itemCode: item.code || '',
itemName: item.itemName || '',
checkItemId: item.itemId || null,
@@ -1157,7 +1158,13 @@ async function handleSave() {
serviceCharge: parseFloat(item.serviceCharge) || 0,
total: parseFloat(item.total) || 0,
origin: item.origin || '',
orderNum: index + 1
orderNum: index + 1,
// 兼容字段(部分日志/历史代码使用的命名dosage/route/serviceFee/totalAmount
// 后端当前不会用到这些别名字段,但保留便于排查和兼容
dosage: item.dose || '',
route: item.method || '',
serviceFee: parseFloat(item.serviceCharge) || 0,
totalAmount: parseFloat(item.total) || 0
}))
}

View File

@@ -88,7 +88,6 @@
v-for="(item, index) in tableData"
:key="index"
:class="{ 'editing-row': item.editing, 'child-row': item.row.includes('.') }"
@click="handleEdit(index)"
>
<td>{{ item.row }}</td>
<td>
@@ -169,10 +168,13 @@
</template>
</td>
<td class="actions">
<template v-if="item.actions">
<template v-if="item.editing">
<button class="btn btn-confirm" @click.stop="handleConfirm(index)" title="保存">
</button>
<button class="btn btn-cancel" @click.stop="handleCancelEdit(index)" title="取消">
</button>
<button
v-if="!item.row.includes('.')"
class="btn btn-add"
@@ -181,13 +183,18 @@
>
+
</button>
<button class="btn btn-delete" @click.stop="handleDelete(index)" title="删除">
</button>
</template>
<template v-else>
<button class="btn btn-confirm" @click.stop="handleConfirm(index)" title="保存">
<button class="btn btn-edit" @click.stop="handleEdit(index)" title="修改">
</button>
<button
v-if="!item.row.includes('.')"
class="btn btn-add"
@click.stop="handleAdd(index)"
title="添加子项"
>
+
</button>
<button class="btn btn-delete" @click.stop="handleDelete(index)" title="删除">

View File

@@ -1,6 +1,6 @@
<template>
<div class="lis-group-maintain">
<!-- 标题区域 -->
<div class="header">
<h2>LIS分组维护</h2>
@@ -10,125 +10,128 @@
<div class="table-container">
<table class="data-table">
<thead>
<tr>
<th style="width: 50px;"></th>
<th style="width: 150px;">卫生机构</th>
<th style="width: 150px;">日期</th>
<th style="width: 200px;">LIS分组名称</th>
<th style="width: 120px;">采血管</th>
<th style="width: 300px;">备注</th>
<th style="width: 150px;">操作</th>
</tr>
<tr>
<th style="width: 50px;"></th>
<th style="width: 150px;">卫生机构</th>
<th style="width: 150px;">日期</th>
<th style="width: 200px;">LIS分组名称</th>
<th style="width: 120px;">采血管</th>
<th style="width: 300px;">备注</th>
<th style="width: 150px;">操作</th>
</tr>
</thead>
<tbody>
<tr
v-for="(item, index) in tableData"
<tr
v-for="(item, index) in tableData"
:key="item.id || index"
:class="{ 'editing-row': item.editing }"
>
<td>{{ index + 1 }}</td>
<td>
<template v-if="item.editing">
<input
type="text"
v-model="item.healthInstitution"
placeholder="请输入卫生机构"
:class="{ 'error-input': item.errors?.healthInstitution }"
>
<span v-if="item.errors?.healthInstitution" class="error-message">{{ item.errors.healthInstitution }}</span>
:class="{ 'editing-row': item.editing, 'success-row': item.success, 'deleting-row': item.deleting }"
>
<td>{{ index + 1 }}</td>
<td>
<template v-if="item.editing">
<input
type="text"
v-model="item.healthInstitution"
disabled
>
</template>
<template v-else>
{{ item.healthInstitution }}
</template>
</td>
<td>
<template v-if="item.editing">
<input type="text" v-model="item.date" disabled>
</template>
<template v-else>
{{ item.date }}
</template>
</td>
<td>
<template v-if="item.editing">
<input
type="text"
v-model="item.lisGroupName"
placeholder="请输入分组名称"
:class="{ 'error-input': item.errors?.lisGroupName, 'focus-target': item.isNew }"
>
<span v-if="item.errors?.lisGroupName" class="error-message">{{ item.errors.lisGroupName }}</span>
</template>
<template v-else>
{{ item.lisGroupName }}
</template>
</td>
<td>
<template v-if="item.editing">
<select
v-model="item.bloodCollectionTube"
:class="{ 'error-input': item.errors?.bloodCollectionTube }"
>
<option value="">请选择采血管</option>
<option v-for="tube in bloodTubeOptions" :key="tube" :value="tube">
{{ tube }}
</option>
</select>
<span v-if="item.errors?.bloodCollectionTube" class="error-message">{{ item.errors.bloodCollectionTube }}</span>
</template>
<template v-else>
{{ item.bloodCollectionTube }}
</template>
</td>
<td>
<template v-if="item.editing">
<input type="text" v-model="item.remark" placeholder="请输入备注信息">
</template>
<template v-else>
{{ item.remark || '' }}
</template>
</td>
<td>
<div class="actions">
<template v-if="!item.editing">
<button class="btn btn-edit" @click="startEdit(item)"></button>
<button class="btn btn-primary" @click="addRow">+</button>
<button class="btn btn-delete" @click="deleteRow(index)">🗑</button>
</template>
<template v-else>
{{ item.healthInstitution }}
<button class="btn btn-confirm" @click="confirmEdit(item)"></button>
<button class="btn btn-cancel" @click="cancelEdit(item)">×</button>
</template>
</td>
<td>
<template v-if="item.editing">
<input type="text" v-model="item.date" disabled>
</template>
<template v-else>
{{ item.date }}
</template>
</td>
<td>
<template v-if="item.editing">
<input
type="text"
v-model="item.lisGroupName"
placeholder="请输入分组名称"
:class="{ 'error-input': item.errors?.lisGroupName }"
>
<span v-if="item.errors?.lisGroupName" class="error-message">{{ item.errors.lisGroupName }}</span>
</template>
<template v-else>
{{ item.lisGroupName }}
</template>
</td>
<td>
<template v-if="item.editing">
<select
v-model="item.bloodCollectionTube"
:class="{ 'error-input': item.errors?.bloodCollectionTube }"
>
<option value="">请选择采血管</option>
<option v-for="tube in bloodTubeOptions" :key="tube" :value="tube">
{{ tube }}
</option>
</select>
<span v-if="item.errors?.bloodCollectionTube" class="error-message">{{ item.errors.bloodCollectionTube }}</span>
</template>
<template v-else>
{{ item.bloodCollectionTube }}
</template>
</td>
<td>
<template v-if="item.editing">
<input type="text" v-model="item.remark" placeholder="请输入备注信息">
</template>
<template v-else>
{{ item.remark || '' }}
</template>
</td>
<td>
<div class="actions">
<template v-if="!item.editing">
<button class="btn btn-edit" @click="startEdit(item)"></button>
<button class="btn btn-primary" @click="addRow">+</button>
<button class="btn btn-delete" @click="deleteRow(index)">🗑</button>
</template>
<template v-else>
<button class="btn btn-confirm" @click="confirmEdit(item)"></button>
<button class="btn btn-cancel" @click="cancelEdit(item)">×</button>
</template>
</div>
</td>
</tr>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 分页区域 -->
<div class="pagination">
<button class="pagination-btn"></button>
<span>1</span>
<button class="pagination-btn"></button>
</div>
<div class="pagination">
<button class="pagination-btn" @click="prevPage" :disabled="currentPage <= 1"></button>
<span>{{ currentPage }}</span>
<button class="pagination-btn" @click="nextPage" :disabled="currentPage >= totalPages"></button>
</div>
</div>
</template>
<script>
import {computed, onMounted, reactive, ref} from 'vue'
import {computed, nextTick, onMounted, reactive, ref} from 'vue'
import {addLisGroup, delLisGroup, listLisGroup, updateLisGroup} from '@/api/system/checkType'
import {getDicts} from "@/api/system/dict/data";
import useUserStore from '@/store/modules/user';
import {ElMessage, ElMessageBox} from 'element-plus';
export default {
name: 'LisGroupMaintain',
setup() {
// 获取用户store
const userStore = useUserStore();
// 加载状态
const loading = ref(false)
// 采血管选项
const bloodTubeOptions = ref([]);
// 加载采血管颜色字典数据
const loadBloodTubeDict = async () => {
try {
@@ -138,22 +141,26 @@ export default {
bloodTubeOptions.value = response.data.map(item => item.label || item.dictLabel);
}
} catch (error) {
console.error('获取采血管颜色字典失败:', error);
// 如果字典获取失败,使用默认选项作为备选
bloodTubeOptions.value = ['黄管', '紫管', '蓝管'];
}
};
// 分页相关数据
const currentPage = ref(1)
const pageSize = ref(10)
const totalItems = ref(2) // 总数据量,实际应用中应该从后端获取
// 总页数
const totalPages = computed(() => {
return Math.ceil(totalItems.value / pageSize.value)
})
// 获取当前用户的卫生机构名称
const getCurrentHospital = () => {
return userStore.hospitalName || userStore.orgName || '演示医院';
};
// 表格数据
const tableData = reactive([])
@@ -165,7 +172,7 @@ export default {
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
// 加载LIS分组数据
const loadLisGroups = async () => {
// 确保采血管字典数据已加载
@@ -174,217 +181,85 @@ export default {
}
try {
loading.value = true
// 构建查询参数
const query = {
pageNum: currentPage.value,
pageSize: pageSize.value
}
console.log('准备调用接口,查询参数:', query)
// 调用接口获取数据
// 注意根据checkType.js中的定义这个接口使用GET方法和params参数
const response = await listLisGroup(query)
console.log('接口返回结果类型:', typeof response)
console.log('接口返回结果:', response)
console.log('响应是否包含code字段:', response && 'code' in response)
console.log('响应是否包含data字段:', response && 'data' in response)
// 清空现有数据
tableData.splice(0, tableData.length)
totalItems.value = 0
// 适配可能的不同响应格式
let items = []
let total = 0
// 检查响应是否存在
if (response) {
// 处理标准响应格式
if (typeof response === 'object') {
// 检查是否是标准API响应格式 {code, data, msg}
if ('code' in response) {
console.log('响应包含code字段:', response.code)
// 成功状态码处理
if (response.code === 200 || response.code === '200' || response.code === 0) {
console.log('响应状态码为成功状态')
// 检查data字段
if ('data' in response) {
console.log('响应包含data字段数据类型:', typeof response.data)
// 格式1: {data: {rows: [], total: number}}
if (response.data && typeof response.data === 'object') {
// 处理双重嵌套格式 {data: {code, msg, data: []}}
if (response.data.data && (Array.isArray(response.data.data) || typeof response.data.data === 'object')) {
console.log('匹配到格式: 双重嵌套 data.data');
// 如果data.data是数组直接使用
if (Array.isArray(response.data.data)) {
items = response.data.data;
total = items.length;
console.log('双重嵌套格式1: data.data是数组数据量:', items.length);
}
// 如果data.data是对象检查是否有rows字段
else if (Array.isArray(response.data.data.rows)) {
items = response.data.data.rows;
total = response.data.data.total !== undefined ? response.data.data.total : items.length;
console.log('双重嵌套格式2: data.data包含rows数据量:', items.length, ',总数:', total);
}
}
// 标准格式检查
else if (Array.isArray(response.data.rows)) {
items = response.data.rows
total = response.data.total !== undefined ? response.data.total : items.length
console.log('匹配到格式1: response.data.rows数据量:', items.length, ',总数:', total)
}
// 格式2: {data: []}
else if (Array.isArray(response.data)) {
items = response.data
total = items.length
console.log('匹配到格式2: response.data直接是数组数据量:', items.length)
}
// 检查是否有其他可能的格式
else {
console.log('响应data不是预期格式详细数据:', response.data)
// 尝试将整个data对象作为单个条目处理有些API可能直接返回单个对象
if (response.data) {
items = [response.data]
total = 1
console.log('尝试将整个data对象作为单个条目处理')
}
}
}
} else {
console.log('响应不包含data字段')
}
} else {
// 非成功状态码
const errorMsg = response.msg || response.message || `请求失败,状态码: ${response.code}`
console.error('请求失败:', errorMsg)
showMessage(errorMsg, 'error')
}
}
// 格式3: 响应本身是一个对象但没有code字段可能是单个记录
else if (!Array.isArray(response)) {
console.log('响应是对象但没有code字段尝试作为单个记录处理')
items = [response]
total = 1
}
}
// 格式4: 响应本身是数组
if (Array.isArray(response)) {
items = response
total = items.length
console.log('匹配到格式4: 响应本身是数组,数据量:', items.length)
}
// 记录最终解析到的数据量
console.log('最终解析到的数据量:', items.length, ',总数:', total)
} else {
console.error('接口返回空数据')
showMessage('获取LIS分组数据失败服务器返回空响应', 'error')
}
// 处理获取到的数据
if (items && items.length > 0) {
// 处理每条数据,确保字段正确映射
items.forEach((item, index) => {
// 确保item是对象类型
if (typeof item === 'object' && item !== null) {
console.log(`处理记录 ${index + 1} 原始数据:`, item);
// 创建格式化后的对象,确保字段存在
// 根据网络响应截图更正字段映射关系
const formattedItem = {
id: item.id || `temp_${Date.now()}_${index}`, // 确保有ID
// 更正字段映射hospital -> healthInstitution
healthInstitution: item.hospital || item.org || item.healthInstitution || '',
// 优先使用date字段
date: item.date || item.createTime || item.createDate || '',
// 更正字段映射groupName -> lisGroupName
lisGroupName: item.groupName || item.name || item.lisGroupName || '',
// 更正字段映射tube -> bloodCollectionTube
bloodCollectionTube: item.tube || item.property || item.bloodCollectionTube || item.bloodTube || '',
remark: item.remark || item.note || '',
editing: false,
// 保留原始对象的所有其他属性
...item
};
tableData.push(formattedItem);
console.log(`处理记录 ${index + 1} 格式化后数据:`, {
id: formattedItem.id,
healthInstitution: formattedItem.healthInstitution,
date: formattedItem.date,
lisGroupName: formattedItem.lisGroupName,
bloodCollectionTube: formattedItem.bloodCollectionTube,
remark: formattedItem.remark
// 处理明确的数据结构
if (response && response.code === 200) {
// 清空现有数据
tableData.splice(0, tableData.length);
// 获取最内层的数据结构
const innerResponse = response.data;
if (innerResponse && innerResponse.code === 200) {
const data = innerResponse.data;
if (data && Array.isArray(data.records)) {
// 更新总记录数
totalItems.value = data.total || 0;
// 处理每条记录
data.records.forEach((item, index) => {
const formattedItem = {
id: item.id,
healthInstitution: item.hospital,
date: item.date,
lisGroupName: item.groupName,
bloodCollectionTube: item.tube,
remark: item.remark || '',
editing: false
};
tableData.push(formattedItem);
});
} else {
console.warn(`记录 ${index + 1} 不是有效对象,跳过处理:`, item);
totalItems.value = 0;
}
});
totalItems.value = total;
console.log('数据加载完成,表格显示', tableData.length, '条记录,总数:', totalItems.value);
} else {
totalItems.value = 0;
}
} else {
console.log('未获取到有效数据,表格为空');
// 非成功状态码
const errorMsg = response.msg || response.message || `请求失败,状态码: ${response.code}`
showMessage(errorMsg, 'error')
totalItems.value = 0;
}
} catch (error) {
// 详细的错误信息记录
console.error('加载LIS分组数据异常:', error)
// 提取更详细的错误信息
// 提取错误信息
let errorMessage = '加载LIS分组数据失败请稍后重试'
if (error.response) {
// 服务器响应了但状态码不是2xx
console.error('HTTP错误状态:', error.response.status)
console.error('HTTP错误响应体:', error.response.data)
if (error.response.data) {
errorMessage = error.response.data.msg ||
error.response.data.message ||
error.response.data.error ||
`服务器错误 (${error.response.status})`
errorMessage = error.response.data.msg ||
error.response.data.message ||
error.response.data.error ||
`服务器错误 (${error.response.status})`
} else {
errorMessage = `服务器错误 (${error.response.status})`
}
// 额外记录响应体详情便于调试
if (typeof error.response.data === 'object') {
console.error('响应体详细结构:', JSON.stringify(error.response.data, null, 2))
}
} else if (error.request) {
// 请求已发出,但未收到响应
console.error('请求已发送但未收到响应:', error.request)
errorMessage = '网络错误,服务器未响应,请检查网络连接'
} else if (error.message) {
// 请求配置出错
console.error('请求配置错误:', error.message)
errorMessage = error.message
} else {
console.error('未知错误类型:', typeof error)
}
// 显示错误信息
showMessage(errorMessage, 'error')
// 确保表格状态正确
console.log('异常处理后表格状态:', {
tableDataLength: tableData.length,
totalItems: totalItems.value,
currentPage: currentPage.value
})
} finally {
loading.value = false
console.log('数据加载操作完成loading状态已更新为false')
console.log('最终表格数据量:', tableData.length, ',总数:', totalItems.value)
}
}
@@ -398,53 +273,42 @@ export default {
// 验证数据
const validateData = (item) => {
const errors = {}
// 清除之前的错误信息
delete item.errors
// 验证卫生机构
if (!item.healthInstitution || item.healthInstitution.trim() === '') {
errors.healthInstitution = '卫生机构不能为空'
} else if (item.healthInstitution.length > 100) {
errors.healthInstitution = '卫生机构名称不能超过100个字符'
}
// 验证LIS分组名称
if (!item.lisGroupName || item.lisGroupName.trim() === '') {
errors.lisGroupName = 'LIS分组名称不能为空'
} else if (item.lisGroupName.length > 50) {
errors.lisGroupName = 'LIS分组名称不能超过50个字符'
}
// 验证采血管
if (!item.bloodCollectionTube) {
errors.bloodCollectionTube = '请选择采血管'
}
// 验证备注长度
if (item.remark && item.remark.length > 200) {
errors.remark = '备注信息不能超过200个字符'
}
if (Object.keys(errors).length > 0) {
item.errors = errors
return false
}
return true
}
// 显示提示信息
const showMessage = (message, type = 'success') => {
// 在实际项目中,这里可以使用Element Plus或其他UI库的消息组件
// 这里为了简单起见使用浏览器的alert但添加了类型标识
// 使用Element Plus的消息组件
if (type === 'error') {
console.error(message)
alert(`错误: ${message}`)
ElMessage.error(message)
} else {
console.log(message)
// 可以使用更友好的提示方式这里暂时注释掉alert以避免频繁弹窗
// alert(message)
ElMessage.success(message)
}
}
@@ -455,24 +319,24 @@ export default {
showMessage('请检查并修正错误信息', 'error')
return
}
// 检查是否有重复的分组名称(在同一个卫生机构内)
const duplicate = tableData.find(data =>
data.id !== item.id &&
data.healthInstitution === item.healthInstitution &&
data.lisGroupName === item.lisGroupName
const duplicate = tableData.find(data =>
data.id !== item.id &&
data.healthInstitution === item.healthInstitution &&
data.lisGroupName === item.lisGroupName
)
if (duplicate) {
if (!item.errors) item.errors = {}
item.errors.lisGroupName = '该分组名称已存在'
showMessage('分组名称重复,请修改', 'error')
return
}
try {
loading.value = true
// 准备提交数据(使用后端期望的字段名)
const submitData = {
id: item.id,
@@ -482,7 +346,7 @@ export default {
tube: item.bloodCollectionTube, // 前端字段映射到后端字段
remark: item.remark
}
let response
// 判断是新增还是修改
if (item.isNew) {
@@ -492,29 +356,35 @@ export default {
// 修改
response = await updateLisGroup(submitData)
}
// 处理响应
if (response.code === 200) {
// 保存编辑
item.editing = false
delete item.originalData
delete item.errors
// 先检查是否是新增记录再删除isNew属性
const isNewRecord = item.isNew
delete item.isNew
// 添加保存成功样式,包括新增记录
item.success = true
// 0.5秒后移除成功样式
setTimeout(() => {
item.success = false
}, 500)
showMessage('保存成功')
// 如果是新增,重新加载数据确保数据一致
if (isNewRecord) {
// 修改完成后重新请求后端本页数据确保数据准确
setTimeout(() => {
loadLisGroups()
}
}, 500)
} else {
showMessage(`保存失败: ${response.msg || '未知错误'}`, 'error')
}
} catch (error) {
console.error('保存LIS分组数据失败:', error)
showMessage(`保存失败: ${error.message || '未知错误'}`, 'error')
} finally {
loading.value = false
@@ -543,24 +413,25 @@ export default {
item.editing = false
}
} catch (error) {
console.error('取消编辑失败:', error)
showMessage('取消编辑失败', 'error')
}
}
// 添加新行
const addRow = () => {
const addRow = async () => {
// 检查是否已有正在编辑的行
const editingRow = tableData.find(item => item.editing)
if (editingRow) {
showMessage('请先完成当前行的编辑', 'error')
return
}
const newId = String(Math.max(...tableData.map(item => parseInt(item.id) || 0), 0) + 1)
// 从用户信息中获取当前卫生机构
const currentHospital = getCurrentHospital()
tableData.push({
id: newId,
healthInstitution: '', // 默认
id: '',
healthInstitution: currentHospital, // 默认当前操作工号的卫生机构
date: getCurrentDate(), // 默认当前系统时间
lisGroupName: '',
bloodCollectionTube: '',
@@ -569,8 +440,15 @@ export default {
errors: null,
isNew: true // 标记为新记录
})
showMessage('请填写新记录信息')
// 等待DOM更新后聚焦到第一个输入框
await nextTick()
const focusElement = document.querySelector('.focus-target')
if (focusElement) {
focusElement.focus()
// 清除focus-target类避免下次添加行时影响
focusElement.classList.remove('focus-target')
}
}
// 删除行
@@ -581,36 +459,66 @@ export default {
showMessage('请先完成或取消编辑', 'error')
return
}
if (confirm(`确定要删除"${item.lisGroupName}"这条记录吗?`)) {
try {
loading.value = true
// 如果是新添加的记录,直接从数组中移除
if (item.isNew) {
tableData.splice(index, 1)
showMessage('删除成功')
totalItems.value--
} else {
// 调用API删除
const response = await delLisGroup(item.id)
if (response.code === 200) {
tableData.splice(index, 1)
showMessage('删除成功')
// 更新总数
totalItems.value--
} else {
showMessage(`删除失败: ${response.msg || '未知错误'}`, 'error')
}
try {
// 使用Element Plus的确认对话框
await ElMessageBox.confirm(
`确定要删除"${item.lisGroupName}"这条记录吗?`,
'删除确认',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
loading.value = true
// 添加删除行标记,触发渐隐效果
item.deleting = true
// 等待300ms让渐隐效果完成
await new Promise(resolve => setTimeout(resolve, 300))
// 如果是新添加的记录,直接从数组中移除
if (item.isNew) {
tableData.splice(index, 1)
showMessage('删除成功')
totalItems.value--
} else {
// 调用API删除
const response = await delLisGroup(item.id)
if (response.code === 200) {
// 更新总数
totalItems.value--
// 检查当前页码是否仍然有效
const newTotalPages = Math.ceil(totalItems.value / pageSize.value)
if (currentPage.value > newTotalPages && newTotalPages > 0) {
// 如果当前页码大于总页数且总页数大于0调整为最后一页
currentPage.value = newTotalPages
}
// 重新加载当前页数据,保持页码不变
loadLisGroups()
showMessage('删除成功')
} else {
showMessage(`删除失败: ${response.msg || '未知错误'}`, 'error')
// 如果删除失败,移除删除标记
item.deleting = false
}
} catch (error) {
console.error('删除LIS分组数据失败:', error)
showMessage(`删除失败: ${error.message || '未知错误'}`, 'error')
} finally {
loading.value = false
}
} catch (error) {
if (error !== 'cancel') {
showMessage(`删除失败: ${error.message || '未知错误'}`, 'error')
// 如果删除失败,移除删除标记
if (tableData[index]) {
tableData[index].deleting = false
}
}
} finally {
loading.value = false
}
}
@@ -638,7 +546,7 @@ export default {
loadLisGroups()
}
}
// 组件挂载时加载数据
onMounted(() => {
// 加载采血管字典数据
@@ -680,7 +588,7 @@ export default {
align-items: center;
}
.header h1 {
.header h2 {
font-size: 18px;
font-weight: 500;
color: #333;
@@ -718,6 +626,12 @@ export default {
background-color: #f0f8ff;
}
/* 保存成功行样式 */
.success-row {
background-color: #f6ffed !important;
transition: background-color 0.3s ease;
}
.actions {
white-space: nowrap;
}
@@ -732,7 +646,7 @@ export default {
/* 分页样式 */
.pagination {
display: flex;
justify-content: flex-end;
justify-content: center;
align-items: center;
padding: 16px 0;
margin-top: 8px;
@@ -741,6 +655,14 @@ export default {
.pagination span {
font-size: 14px;
margin: 0 16px;
background-color: #1890FF;
color: white;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.pagination-btn {
@@ -946,33 +868,34 @@ input:disabled {
.lis-group-maintain {
padding: 10px;
}
.header h1 {
font-size: 16px;
}
.table-container {
border-radius: 0;
}
.data-table {
font-size: 12px;
min-width: 600px; /* 确保表格在小屏幕上可以横向滚动 */
border-collapse: collapse;
min-width: 768px; /* 确保表格在小屏幕上可以横向滚动 */
}
.data-table th,
.data-table td {
padding: 8px;
text-align: center;
}
.data-table td {
padding: 8px;
text-align: center;
}
.btn {
width: 20px;
height: 20px;
font-size: 11px;
margin-right: 2px;
}
.pagination-btn {
width: 28px;
height: 28px;
@@ -984,7 +907,16 @@ input:disabled {
/* 平滑过渡效果 */
.btn,
.pagination-btn,
.editing-row {
.editing-row,
tr {
transition: all 0.3s ease;
}
/* 删除行渐隐效果 */
.deleting-row {
opacity: 0;
height: 0;
overflow: hidden;
transition: all 0.3s ease;
}

View File

@@ -1046,7 +1046,9 @@ function handlePrint() {
purchaseinventoryList: form.purchaseinventoryList,
});
console.log(result, '345678987654');
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
// printer: 'EPSON LQ-80KFII',

View File

@@ -244,7 +244,9 @@ function handlePrint() {
purposeLocationName: printList[0].purposeLocationName,
purchaseinventoryList: printList,
});
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
// printer: 'EPSON LQ-80KFII',

View File

@@ -1436,8 +1436,11 @@ function handlePrintPreview() {
console.log("打印数据:", printData);
// 创建打印模板实例
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
);
const hiprintTemplate = new hiprint.PrintTemplate({
template: templateJson,
template: printElements,
});
// 打开预览窗口(推荐)
@@ -1515,8 +1518,11 @@ function handleDirectPrint() {
console.log("打印数据:", printData);
// 创建打印模板实例
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
);
const hiprintTemplate = new hiprint.PrintTemplate({
template: templateJson,
template: printElements,
});
// 直接打印到指定打印机
@@ -1591,8 +1597,11 @@ function handlePrintWithSelectPrinter() {
console.log("打印数据:", printData);
// 创建打印模板实例
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
);
const hiprintTemplate = new hiprint.PrintTemplate({
template: templateJson,
template: printElements,
});
// 获取打印机列表并选择

View File

@@ -26,7 +26,7 @@
placeholder=""
clearable
style="width: 150px">
<el-option label="长春市朝阳区中医院" value="sameHospital" />
<el-option :label="userStore.hospitalName" value="sameHospital" />
</el-select>
</el-form-item>
@@ -120,7 +120,9 @@
<script setup name="OutpatientDepartmentMetrics">
import {getOutpatientDepartmentMetrics} from './statisticalManagent';
import {computed, reactive, ref, toRefs} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const loading = ref(true);
const total = ref(0);
const data = reactive({

View File

@@ -243,7 +243,9 @@ function handlePrint() {
busNo: printList[0].busNo,
detailsList: printList,
});
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
title: '打印标题',

View File

@@ -49,10 +49,11 @@
clearable
style="width: 120px"
>
<el-option label="待就诊" :value="1" />
<el-option label="就诊中" :value="2" />
<el-option label="已完成" :value="3" />
<el-option label="已取消" :value="4" />
<el-option label="已到达" :value="1" />
<el-option label="已分诊" :value="2" />
<el-option label="已看诊" :value="3" />
<el-option label="已离开" :value="4" />
<el-option label="已完成" :value="5" />
</el-select>
</el-form-item>
<el-form-item label="医生" prop="doctorName">
@@ -181,16 +182,18 @@ function getList() {
/** 根据状态获取标签类型 */
function getStatusTagType(status) {
// 假设状态值1-待就诊2-就诊中3-已完成4-已取消
// 状态值对应后端 EncounterSubjectStatus 枚举1-已到达2-已分诊3-已看诊4-已离开5-已完成
switch (status) {
case 1:
return 'warning'; // 待就诊 - 黄色
return 'warning'; // 已到达 - 黄色
case 2:
return 'primary'; // 就诊中 - 蓝色
return 'primary'; // 已分诊 - 蓝色
case 3:
return 'success'; // 已完成 - 绿色
return 'success'; // 已看诊 - 绿色
case 4:
return 'info'; // 已取消 - 灰色
return 'info'; // 已离开 - 灰色
case 5:
return 'success'; // 已完成 - 绿色
default:
return '';
}

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<!-- 患者添加对话框组件 -->
<!-- 患者添加/修改/查看对话框组件 -->
<patient-add-dialog ref="patientAddRef" @submit="handlePatientAdded" />
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" class="query-form">
<el-form-item label="病人名称" prop="searchKey">
@@ -111,266 +111,21 @@
/>
</div>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" v-model="open" width="1000px" append-to-body>
<el-form ref="patientRef" :model="form" :rules="rules" label-width="90px" size="medium">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="民族" prop="nationalityCode">
<el-select v-model="form.nationalityCode" filterable clearable :disabled="isViewMode">
<el-option
v-for="item in nationality_code"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="性别" prop="genderEnum">
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode" size="small">
<el-radio
v-for="item in administrativegenderList"
:key="item.value"
:label="item.value"
>
{{ item.info }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="活动标识" prop="activeFlag">
<el-radio-group v-model="form.activeFlag" :disabled="isViewMode">
<el-radio v-for="item in tempFlagList" :key="item.value" :label="item.value">
{{ item.info }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="证件类别" prop="typeCode">
<el-select
v-model="form.patientIdInfoList[0].typeCode"
placeholder="证件类别"
clearable
:disabled="isViewMode"
>
<el-option
v-for="dict in sys_idtype"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证件号码" prop="idCard">
<el-input
v-model="form.idCard"
clearable
:disabled="isViewMode"
placeholder="请输入18位身份证号"
maxlength="18"
show-word-limit
@blur="handleIdCardBlur"
/>
</el-form-item>
<el-form-item label="生日" prop="birthDate" v-show="false">
<el-input v-model="form.birthDate" v-show="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年龄" prop="age">
<el-input
v-model="form.age"
:disabled="isViewMode"
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item label="国家编码" prop="countryCode">
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
</el-form-item>
</el-col> -->
</el-row>
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="职业" prop="prfsEnum">
<el-select
v-model="form.prfsEnum"
placeholder="职业"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in occupationtypeList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工作单位" prop="workCompany">
<el-input v-model="form.workCompany" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="联系人" prop="linkName">
<el-input v-model="form.linkName" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="联系人关系" prop="linkRelationCode">
<el-select
v-model="form.linkRelationCode"
placeholder="联系人关系"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in familyrelationshiptypeList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="联系人电话" prop="linkRelationCode">
<el-input v-model="form.linkTelcom" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="血型ABO" prop="bloodAbo">
<el-select
v-model="form.bloodAbo"
placeholder="血型ABO"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in bloodtypeaboList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="血型RH" prop="bloodRh">
<el-select
v-model="form.bloodRh"
placeholder="血型RH"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in bloodtypearhList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="地址选择" prop="addressSelect">
<el-cascader
:options="options"
:props="{ checkStrictly: true, value: 'code', label: 'name' }"
v-model="selectedOptions"
@change="handleChange"
:disabled="isViewMode"
size="small"
>
<template #default="{ node, data }">
<span>{{ data.name }}</span>
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
</template>
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="详细地址" prop="address">
<el-input v-model="form.address" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="婚姻状态" prop="maritalStatusEnum">
<el-select
v-model="form.maritalStatusEnum"
placeholder="婚姻状态"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in maritalstatusList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="死亡时间" prop="deceasedDate">
<el-date-picker
v-model="form.deceasedDate"
type="datetime"
placeholder="时间"
format="YYYY-MM-DD HH:mm:ss"
:disabled="isViewMode"
value-format="YYYY-MM-DD HH:mm:ss"
size="small"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="patientManagement">
import pcas from 'china-division/dist/pcas-code.json';
import {nextTick, ref} from 'vue';
import {useRoute} from 'vue-router';
import {useRouter} from 'vue-router';
import {addPatient, listPatient, lists, updatePatient} from './component/api';
import PatientAddDialog from '@/views/charge/outpatientregistration/components/patientAddDialog';
const route = useRoute();
const router = useRouter();
const showSearch = ref(true);
const open = ref(false);
const title = ref('');
@@ -428,7 +183,9 @@ const data = reactive({
pageNo: 1,
pageSize: 10,
searchKey: undefined,
name: undefined
name: undefined,
patientId: undefined, // 新增: 专门用于数据库ID查询
searchType: 'name' // 新增: 查询类型, 'name'按姓名查询, 'patientId'按病人ID查询
},
rules: {
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
@@ -492,13 +249,25 @@ const findNodeByCode = (data, code) => {
return null;
};
/** 查询患者列表 */
/** 查询患者列表 - 基础查询方法,用于初始化等操作 */
function getList() {
// 执行查询
listPatient(queryParams.value).then((response) => {
patientList.value = response.data.records;
total.value = response.data.total;
console.log('patientList======>', JSON.stringify(patientList.value));
});
// 初始化字典数据(仅在第一次加载时执行)
if (!listsFlag.value) {
getInitDictData();
listsFlag.value = true;
}
}
/** 初始化字典数据 - 分离字典数据加载逻辑 */
const listsFlag = ref(false);
function getInitDictData() {
lists().then((response) => {
console.log(response);
occupationtypeList.value = response.data.occupationType;
@@ -512,6 +281,86 @@ function getList() {
});
}
/** 搜索按钮操作 - 支持按姓名和病人ID两种查询方式 */
function handleQuery() {
queryParams.value.pageNo = 1;
queryParams.value.createTimeSTime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : '';
queryParams.value.createTimeETime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : '';
// 根据查询类型设置查询参数
if (queryParams.value.searchType === 'patientId') {
// 按病人ID查询(数据库ID) - 直接传递ID参数
const queryParamsCopy = {
pageNo: queryParams.value.pageNo,
pageSize: queryParams.value.pageSize,
id: queryParams.value.patientId,
searchKey: undefined
};
console.log('按数据库ID查询参数:', queryParamsCopy);
// 执行查询
listPatient(queryParamsCopy).then((response) => {
patientList.value = response.data.records;
total.value = response.data.total;
console.log('查询结果:', response.data);
});
} else {
// 按姓名/拼音码/病人ID查询(兼容原有逻辑)
queryParams.value.id = undefined;
// 执行查询
listPatient(queryParams.value).then((response) => {
patientList.value = response.data.records;
total.value = response.data.total;
});
}
}
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
proxy.resetForm('queryRef');
queryParams.value.patientId = undefined;
queryParams.value.searchType = 'name';
queryParams.value.id = undefined;
queryParams.value.name = undefined;
handleQuery();
}
/** 从门诊挂号页面跳转时的精确查询 - 按数据库ID查询 */
function queryByPatientId(patientId) {
console.log('收到门诊挂号传递的patientId:', patientId);
// 直接构造查询参数,避免受到其他条件干扰
const exactQueryParams = {
pageNo: 1,
pageSize: 10,
id: patientId, // 直接使用ID字段进行精确查询
searchKey: undefined
};
console.log('精确查询参数:', exactQueryParams);
// 执行查询
listPatient(exactQueryParams).then((response) => {
patientList.value = response.data.records;
total.value = response.data.total;
console.log('按数据库ID查询结果:', JSON.stringify(patientList.value));
console.log('查询到的患者数量:', response.data.records.length);
// 如果查询成功,清空patientId以免影响后续查询
if (response.data.records && response.data.records.length > 0) {
console.log('查询成功,找到患者:', response.data.records[0].name);
} else {
console.warn('未找到匹配的患者,ID:', patientId);
}
}).catch(error => {
console.error('查询失败:', error);
});
}
/** 表单重置 */
function reset() {
form.value = {
@@ -555,36 +404,17 @@ function handlePatientAdded(patientData) {
// 患者添加成功后刷新列表
getList();
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNo = 1;
queryParams.value.createTimeSTime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : '';
queryParams.value.createTimeETime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : '';
// 执行查询
getList();
}
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
proxy.resetForm('queryRef');
handleQuery();
}
/** 新增按钮操作 */
function handleAdd() {
patientAddRef.value.show(); // 使用与门诊挂号一致的方式显示新增患者组件
}
//查看按钮
function handleSee(row) {
reset();
nextTick(() => {
isViewMode.value = true;
form.value = row;
open.value = true;
title.value = '查看患者';
});
// 使用PatientAddDialog组件显示查看模式
patientAddRef.value.show();
// 设置为查看模式并填充数据
patientAddRef.value.setViewMode(true);
patientAddRef.value.setFormData(row);
}
// 查看就诊历史
@@ -607,23 +437,11 @@ const nationalityDict = (code) => {
function handleUpdate(row) {
console.log('nationality_code=======>', JSON.stringify(nationality_code.value));
reset();
nextTick(() => {
form.value = JSON.parse(JSON.stringify(row));
addressCom.value =
row.addressProvince + row.addressCity + row.addressDistrict + row.addressStreet + row.address;
const selectedOptions1 = ref([
row.addressProvince,
row.addressCity,
row.addressDistrict,
row.addressStreet,
]);
const codes = convertAddressToCodes(selectedOptions1.value);
selectedOptions.value = codes.filter((code) => code !== null);
isViewMode.value = false;
open.value = true;
title.value = '修改菜单';
});
// 使用PatientAddDialog组件显示修改模式
patientAddRef.value.show();
// 设置为编辑模式并填充数据
patientAddRef.value.setViewMode(false);
patientAddRef.value.setFormData(row);
}
const convertAddressToCodes = (selectedOptions1) => {
const [provinceName, cityName, areaName, streetName] = selectedOptions1;
@@ -904,7 +722,14 @@ function submitForm() {
}
onMounted(() => {
getList();
// 检查是否从门诊挂号页面跳转过来,并携带了patientId参数
if (route.query.patientId) {
// 使用精确查询方法按数据库ID查询
queryByPatientId(route.query.patientId);
} else {
// 正常加载患者列表
getList();
}
});
</script>

View File

@@ -696,7 +696,10 @@ async function printPrescription() {
console.log('药房result', result);
// 根据药品分类选择对应的打印模板
const printElements = tcmFlag.value === '1' ? chineseMedicineTemplateJson : templateJson;
const template = tcmFlag.value === '1' ? chineseMedicineTemplateJson : templateJson;
const printElements = JSON.parse(
JSON.stringify(template).replace(/{{HOSPITAL_NAME}}/g, proxy.$store.useUserStore().hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({template: printElements}); // 定义模板
hiprintTemplate.print2(result, {
height: 210,

File diff suppressed because it is too large Load Diff

View File

@@ -24,4 +24,104 @@ export function updateCallNumberVoiceConfig(data) {
method: 'put',
data: data
})
}
// 分诊排队管理相关API
// 获取智能候选池(已签到未入队)
export function getCandidatePool(params) {
return request({
url: '/triage/queue/candidatePool',
method: 'get',
params: params,
skipErrorMsg: true // 跳过错误提示,由组件处理
}).catch(() => {
// 返回一个 rejected promise让组件可以捕获
return Promise.reject(new Error('API未实现'))
})
}
// 获取智能队列(当前队列)
export function getQueueList(params) {
return request({
url: '/triage/queue/list',
method: 'get',
params: params,
skipErrorMsg: true // 跳过错误提示,由组件处理
}).catch(() => {
// 返回一个 rejected promise让组件可以捕获
return Promise.reject(new Error('API未实现'))
})
}
// 获取统计信息
export function getQueueStatistics(params) {
return request({
url: '/triage/queue/statistics',
method: 'get',
params: params,
skipErrorMsg: true // 跳过错误提示,由组件处理
}).catch(() => {
// 返回一个 rejected promise让组件可以捕获
return Promise.reject(new Error('API未实现'))
})
}
// 将患者加入队列
export function addToQueue(data) {
return request({
url: '/triage/queue/add',
method: 'post',
data: data,
skipErrorMsg: true
}).catch(() => Promise.reject(new Error('API未实现')))
}
// 调整队列顺序
export function adjustQueueOrder(data) {
return request({
url: '/triage/queue/adjust',
method: 'put',
data: data,
skipErrorMsg: true
}).catch(() => Promise.reject(new Error('API未实现')))
}
// 叫号控制
export function callPatient(data) {
return request({
url: '/triage/queue/call',
method: 'post',
data: data,
skipErrorMsg: true
}).catch(() => Promise.reject(new Error('API未实现')))
}
// 跳过患者
export function skipPatient(data) {
return request({
url: '/triage/queue/skip',
method: 'post',
data: data,
skipErrorMsg: true
}).catch(() => Promise.reject(new Error('API未实现')))
}
// 完成叫号
export function completeCall(data) {
return request({
url: '/triage/queue/complete',
method: 'post',
data: data,
skipErrorMsg: true
}).catch(() => Promise.reject(new Error('API未实现')))
}
// 过号重排
export function requeuePatient(data) {
return request({
url: '/triage/queue/requeue',
method: 'post',
data: data,
skipErrorMsg: true
}).catch(() => Promise.reject(new Error('API未实现')))
}