193 Commits

Author SHA1 Message Date
wzk
deb31c969a 修复耗材确定后显示成中成药 2025-11-19 14:06:04 +08:00
wzk
e7dac9762d 门诊号码管理编辑员工号 2025-11-19 13:19:48 +08:00
叶锦涛
89862878b5 修改耗材目录地点的缺失 2025-11-18 17:23:39 +08:00
叶锦涛
e105919dab 修改错误提示信息 2025-11-18 11:15:10 +08:00
叶锦涛
e83fc94334 新建发票管理页面 2025-11-18 10:40:57 +08:00
5bf7ab481f 编辑药品tab页面可以不显示数据了 新增之后勾选框还存在 2025-11-18 10:36:15 +08:00
wzk
afa904bd83 医嘱类别耗材项目从耗材目录获取数据 2025-11-18 10:09:30 +08:00
wzk
a343464d8d 门诊医生站-》开立医嘱:增加备注字段 2025-11-18 10:08:46 +08:00
wzk
4a2485e434 门诊医生站-》医嘱:皮试字段做成单选框。当开单医生选中检索出来的药品确认时,如果该药品是皮试药品,系统’药品:该药品名称+需要做皮试,是否做皮试? 2025-11-18 09:25:07 +08:00
Auora
4e2d4d85ec 【bug】解决撤回按钮弹出多余信息 2025-11-17 15:55:59 +08:00
wzk
7ddf6211ee Merge remote-tracking branch 'origin/develop' into develop 2025-11-17 13:29:55 +08:00
wzk
d44600b641 挂号退号 2025-11-17 13:28:33 +08:00
a68c4402de 实现门诊换卡的整体逻辑 2025-11-17 13:24:49 +08:00
wzk
93103f7f40 门诊号码管理维护界面-》优化 2025-11-17 13:09:36 +08:00
wzk
7202151a41 正常挂号消除退款的记录 2025-11-17 11:04:59 +08:00
wzk
491d8f8930 挂号退款加退款记录 2025-11-17 10:59:22 +08:00
wzk
b886726ecc 当就诊状态是非接诊时,操作【退号】系统提示‘该患者医生已接诊,不能退号!’。 2025-11-17 09:55:32 +08:00
qk123
9d0dde6794 门诊医生站移除取消接诊的错误消息提示 2025-11-17 09:46:09 +08:00
qk123
f3578b3202 新增门诊医生站确认取消接诊后移除错误消息提示 2025-11-17 09:42:01 +08:00
Auora
0610ba7cb5 解决门诊挂号退号费用性质不一致的bug 2025-11-14 15:41:30 +08:00
叶锦涛
8b848f787a 修改科室管理主界面科室分类和编辑科室的字典 2025-11-14 09:25:37 +08:00
wzk
a794cd0ce3 门诊医生站开立医嘱中成药的开医嘱录入界面和西药的开医嘱录入界面保持一致 2025-11-14 09:01:48 +08:00
叶锦涛
d97fd0bed1 修复采购入库时选择不同仓库新增药品时仓库的错误 2025-11-13 17:16:12 +08:00
叶锦涛
c0e67722d9 修复门诊医生站诊断删除按钮的错误 2025-11-13 15:40:53 +08:00
qk123
aca7fea69f 新增门诊医生站取消接诊功能 2025-11-13 13:41:48 +08:00
wzk
ce9344f9ce 门诊医生站-》开立医嘱系统根据选中的药品名称
判断医嘱类型。
2025-11-13 10:17:35 +08:00
wzk
991ad61655 1 2025-11-13 08:59:09 +08:00
Auora
e4ac857461 【bug】剂量单位bug 2025-11-12 14:18:51 +08:00
叶锦涛
24ab98ae89 发票号码维护页面 2025-11-12 13:51:34 +08:00
wzk
e79ab9ac4f 医嘱:修改用药天数时,系统自动通过公式自动换算总量 2025-11-12 13:31:11 +08:00
b66c2027d1 换卡处理的分页 2025-11-12 12:08:52 +08:00
09bf895711 维护换卡处理的查询 2025-11-12 10:58:12 +08:00
Auora
825cdd58ae 【bug】 2025-11-12 10:12:12 +08:00
0977eb8145 维护换卡处理的查询bug 2025-11-12 09:59:03 +08:00
Auora
73efeecfc1 解决当日已挂号页面费用性质不一致问题 2025-11-12 09:47:28 +08:00
fe8fb3d321 维护换卡处理的查询 2025-11-12 09:38:47 +08:00
叶锦涛
618fb1e340 修改新增患者的信息样式 2025-11-12 09:15:08 +08:00
叶锦涛
215fe8b889 修改科室管理和新增科室分类的字典 2025-11-11 16:46:36 +08:00
Auora
3e32458b7f 解决医嘱类型选中开单后变成数字问题。 2025-11-11 16:05:18 +08:00
wzk
a8e170ea45 门诊号码管理维护界面-》优化 2025-11-11 13:58:34 +08:00
wzk
1856ae50fd Merge remote-tracking branch 'origin/develop' into develop 2025-11-11 13:58:20 +08:00
wzk
1711e6c115 门诊号码管理维护界面-》优化 2025-11-11 13:57:34 +08:00
叶锦涛
b3f226feab 修改新增患者 2025-11-11 13:28:50 +08:00
wzk
c086dc8c77 修改报表管理-》院内库房情况查询报表-》库存商品明细查询报表,选择库存范围条件检索报错补充 2025-11-11 11:51:52 +08:00
wzk
6762341fbd 修改报表管理-》院内库房情况查询报表-》库存商品明细查询报表,选择库存范围条件检索报错。 2025-11-11 11:36:15 +08:00
d5f8b0f23b 医嘱类型勾选全部之后项目报错的bug 2025-11-11 10:12:40 +08:00
叶锦涛
38233110f2 1、监护人关系要取原来的联系人关系的下拉内容,取值于字典管理-》与患者关系。 2025-11-10 17:11:15 +08:00
6ebb59bc5e 、增加挂号单补打功能(差就诊号查询自动填充) 2025-11-10 17:09:08 +08:00
wzk
69aefab280 库房/药房管理:添加的耗材库 2025-11-10 16:57:05 +08:00
3d3ff82e24 解决医嘱类别选择全部项目报错的问题 2025-11-10 16:53:14 +08:00
69780d204f 1、收费工作站-》门诊挂号:将门诊挂号界面的功能按钮统一摆放在标题页,依次摆放整齐。
2、增加挂号单补打功能(差就诊号查询自动填充)
3.患者档案管理:将【修改】和【查询】按钮调出的界面统一修改成图2的新增患者界面。
2025-11-10 16:35:47 +08:00
Auora
ef52f290fe 解决医嘱类型选中开单后变成数字问题。 2025-11-10 16:17:44 +08:00
wzk
e9d1119777 门诊号码管理维护界面-》优化 2025-11-10 14:41:22 +08:00
qk123
cf182f0e34 修改:初复诊标识系统重新判断->从数据库中读取 2025-11-10 14:32:59 +08:00
qk123
626ae1a459 修改:初复诊标识系统重新判断->从数据库中读取 2025-11-10 10:12:29 +08:00
wzk
3d6977328f 解决系统管理-》基础数据-》库房/药房管理无法添加的耗材库问题的补充 2025-11-07 16:42:19 +08:00
wzk
2dcd7ba1d5 解决系统管理-》基础数据-》库房/药房管理无法添加的耗材库问题 2025-11-07 16:27:56 +08:00
qk123
16a4d38113 修复疾病目录模块下新增病种异常提示请勿重复提交问题 2025-11-07 15:25:28 +08:00
57c98ea39d 解决诊断目录数据展示不全问题 2025-11-07 15:13:41 +08:00
08f7e35042 解决诊断目录数据展示不全问题 2025-11-07 14:08:28 +08:00
wzk
43f3d1ba94 立医嘱的执行科室默认获取诊疗项目维护的所属科室,如果诊疗项目未维护所属科室,默认执行科室为开单科室,然后开单医生又权限操作修改。 2025-11-07 13:41:57 +08:00
wzk
2e45c6c029 开单科室维护的取药药房药在医生开处方药做好过滤限制,没有维护的药房/药库或者药品类型过滤掉。 2025-11-07 13:35:06 +08:00
wzk
945182c6f8 解决报表管理-》院内库房情况查询报表-》库存商品明细查询报表bug 2025-11-07 09:56:50 +08:00
Auora
f7de87860b 1增加挂号收费系统参数维护界面挂号处理的相关参数
2在打印设置tba页面增加是否打印挂号单维护参数
2025-11-06 17:20:42 +08:00
wzk
67e4de0d68 Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 17:13:11 +08:00
qk123
602d521424 修改完诊后再接诊初复诊标识不对问题 2025-11-06 17:12:57 +08:00
叶锦涛
01e14ee084 修改登录界面测试医院的信息 2025-11-06 16:56:41 +08:00
qk123
4a5572de26 修改完诊后再接诊初复诊标识不对问题 2025-11-06 14:00:45 +08:00
88a516d1be 门诊挂号-》【档案】档管理的【新增患者】-患者界面(图1)的内容要与图2的内容一致(门诊挂号-》【新建】-》新增患者界面) 2025-11-06 13:34:59 +08:00
wzk
9ce967002a Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 13:25:41 +08:00
wzk
fd536a035e 修改 2025-11-06 13:25:25 +08:00
wzk
df84a7eefa Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 13:23:55 +08:00
2804703eaa 门诊号码管理维护界面 2025-11-06 13:23:33 +08:00
wzk
e14a0e3d13 Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 13:15:49 +08:00
5a99fe8234 门诊号码管理维护界面 2025-11-06 13:15:22 +08:00
3ad5c5533f 在门诊挂号页面增加档案按钮完成患者档案管理的跳转 2025-11-06 09:11:26 +08:00
Auora
9997f4f7c9 修改医嘱字典 2025-11-06 08:53:57 +08:00
Auora
3d4e4a8119 修改病历不能编辑问题 2025-11-05 16:15:23 +08:00
叶锦涛
3deac74898 在处方打印处增加患者信息 2025-11-05 16:07:37 +08:00
wzk
7bbc50ef47 Merge remote-tracking branch 'origin/develop' into develop 2025-11-05 15:39:48 +08:00
wzk
4ae6765a15 门诊号码管理维护界面 2025-11-05 15:39:39 +08:00
wzk
1292853c5d Merge remote-tracking branch 'origin/develop' into develop 2025-11-05 14:53:46 +08:00
Auora
41791c9ccc 修改门诊挂号和费用支付上的费用性质不一致的问题,并且将解决无法收费的问题 2025-11-05 14:53:34 +08:00
Auora
0674215b53 修改门诊挂号和费用支付上的费用性质不一致的问题,并且将解决无法收费的问题 2025-11-05 14:09:06 +08:00
e42d990304 收费工作站-》门诊挂号:将门诊挂号界面的功能按钮统一摆放在标题页,依次摆放整齐。 2025-11-05 13:32:48 +08:00
0dbe9a57c8 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue
2025-11-05 11:45:36 +08:00
85ea831a1c 收费工作站-》门诊挂号:将门诊挂号界面的功能按钮统一摆放在标题页,依次摆放整齐。 2025-11-05 11:43:52 +08:00
7ac26cf781 增加监护人信息限制,在门诊挂号页面增加档案按钮完成患者档案管理的跳转 2025-11-05 11:38:47 +08:00
b7412648b4 修改报表格式2 2025-11-04 16:45:41 +08:00
叶锦涛
97571652e5 把新增患者中的联系人替换成监护人 2025-11-04 16:36:26 +08:00
b5d4da97f9 修改报表格式 2025-11-04 16:10:16 +08:00
叶锦涛
e5edb6bda2 跳过了处方打印页面的构建 2025-11-04 15:45:12 +08:00
叶锦涛
0e1ae53194 修改了标题undefined 2025-11-04 14:55:32 +08:00
a1efd3f91b 修复完诊后的初诊复诊错乱 2025-11-04 13:24:07 +08:00
3211553d0d 修复门诊收费报表报错,修复采购入库历史遗留数据问题 2025-11-04 13:10:47 +08:00
wzk
a57a326b83 Merge remote-tracking branch 'origin/develop' into develop 2025-11-04 10:44:14 +08:00
wzk
f77d0a2567 新增用户用户密码系统可以自动赋值一个初始密码,123456。 2025-11-04 10:43:52 +08:00
wzk
72581466aa 新增用户用户密码系统可以自动赋值一个初始密码,123456。 2025-11-03 17:39:05 +08:00
Auora
4b3471df06 门诊挂号的费用性质取值改成取值字典管理-》医疗费用支付方式代码的字典数据
将门诊医生站开立医嘱的医嘱类型字段下拉列表内容做成前台维护
2025-11-03 17:15:00 +08:00
叶锦涛
68c65ae8bd 给登录界面的标题加上了信息管理系统 2025-11-03 17:10:10 +08:00
wzk
1b879addc7 门诊医生开处方单,系统把药品无论是药库或药房有的库存都显示出来了。解决显示只有药房的问题。 2025-11-03 16:14:52 +08:00
叶锦涛
3888859b2b 修复了处方打印不能打印的错误 2025-11-03 13:48:20 +08:00
Auora
f03d2e1633 修改病历格式 2025-11-03 13:38:47 +08:00
bc91eb7cdc 按照采购退货的申请审批流程,完成药品采购申请退货的审批确认, 2025-11-03 11:56:34 +08:00
Auora
93120e973a [bug]解决选中药库或药房对应的源仓库或目的仓库无下拉数据 2025-11-03 11:12:19 +08:00
wzk
c6a27f6276 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:41:36 +08:00
wzk
778704c9dc 药品类别下拉别表内容错误,药品类别应该取值如下图字典管理的药品分类编码 2025-11-03 09:41:28 +08:00
wzk
ff227b40c1 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:38:43 +08:00
wzk
c7d8ab5b48 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:38:36 +08:00
wzk
9c27b2a134 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:31:58 +08:00
叶锦涛
3f919188d2 药品类别下拉别表内容错误,药品类别应该取值如下图字典管理的药品分类编码 2025-11-03 09:31:45 +08:00
wzk
8942058972 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:29:49 +08:00
叶锦涛
6c2dbf0418 药品类别下拉别表内容错误,药品类别应该取值字典管理的药品分类编码 2025-11-03 09:29:30 +08:00
叶锦涛
85e185bab8 修复了全选框 2025-10-31 16:35:47 +08:00
叶锦涛
88aa1517ef Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-31 16:32:53 +08:00
叶锦涛
c05118c427 修复了全选框 2025-10-31 16:32:13 +08:00
Auora
2a7f1326b9 [bug]修改就诊时,就诊时间逻辑 2025-10-31 16:23:12 +08:00
叶锦涛
c07255fe5b 修改了登入界面的xxx医院信息管理系统 2025-10-31 16:13:53 +08:00
叶锦涛
749bfc89dd 修复了打印单据没有响应的错误,修复了新增加诊断诊断类别自动获取11的错误 2025-10-31 16:06:12 +08:00
52cc5e3aae 实现采购入库的供货商字段数据存放到数据库,并且系统在采购入库界面能读取对应的采购入库单的对应供货商名称显示 2025-10-31 13:52:33 +08:00
wzk
642c4a0941 Merge remote-tracking branch 'origin/develop' into develop 2025-10-31 12:38:34 +08:00
wzk
30953d5771 开立医嘱的执行科室默认获取诊疗项目维护的所属科室 2025-10-31 12:38:22 +08:00
wzk
83e0c663c9 在开立好的医嘱名称前增加医嘱类别的显示 2025-10-31 12:32:41 +08:00
b19337e76a 修复初诊和就诊的bug 2025-10-31 12:30:11 +08:00
ba607346bd 修复初诊和就诊的bug 2025-10-31 11:05:40 +08:00
Auora
433c452a40 解决库房/药房管理,操作编辑弹窗问题 2025-10-31 10:08:59 +08:00
Auora
a1be7fdbfd [bug]修改仓库字段下拉别表无内容bug 2025-10-31 09:01:35 +08:00
叶锦涛
87409d0c93 修复了药房/库房的删除的报错 2025-10-30 15:38:51 +08:00
d5c8ae8d45 修复初诊和就诊的bug 2025-10-30 15:28:05 +08:00
bc45e9c8c6 首页页面优化 2025-10-30 11:14:25 +08:00
Auora
42992382c0 增加isFoodDiseasesNew 函数 2025-10-30 10:43:54 +08:00
Auora
22d7eba510 增加getEmrDetail 函数 2025-10-30 09:56:41 +08:00
9728c8a6dd 优化格式问题 2025-10-30 09:45:50 +08:00
c951144ac6 首页页面进行了初步优化 2025-10-30 09:15:27 +08:00
叶锦涛
0b179fffd6 诊断排序 2025-10-29 16:50:39 +08:00
Auora
75374ac5d3 更改.env.production 2025-10-29 15:15:26 +08:00
Auora
2a83719b87 更改prod配置 2025-10-29 14:54:55 +08:00
Auora
e58f2d807b 更改prod配置 2025-10-29 14:03:43 +08:00
Auora
b2884def17 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop
# Conflicts:
#	openhis-ui-vue3/.env.spug
2025-10-29 13:53:14 +08:00
Auora
064840dd42 删除VITE_OUT_DIR=dist-spug 2025-10-29 13:52:22 +08:00
1aa814c766 更新 openhis-ui-vue3/.env.spug
删除VITE_OUT_DIR=dist-spug
2025-10-29 05:49:44 +00:00
Auora
b9719a51d1 增加build:spug 2025-10-29 13:46:48 +08:00
Auora
03b83aaf7c 增加VITE_APP_ENV = 'spug' 2025-10-29 13:30:25 +08:00
Auora
d93976483b 增加VITE_APP_BASE_API = '/admin-api' 2025-10-29 13:28:13 +08:00
dd0a3a915c 身份证号改为不是必须项只有输入身份证号的时候才会校验格式问题 2025-10-29 09:47:32 +08:00
2f3994c575 身份证号改为不是必须项只有输入身份证号的时候才会校验格式问题 2025-10-29 09:43:54 +08:00
wzk
daa78e128f 修复医嘱请选择项目选完选项框不消失 2025-10-29 09:40:55 +08:00
wzk
2ca594cb39 Merge remote-tracking branch 'origin/develop' into develop 2025-10-29 09:36:01 +08:00
Auora
7805c26f4a Merge remote-tracking branch 'origin/develop' into develop 2025-10-29 09:33:01 +08:00
Auora
b7d34537c2 修改login 2025-10-29 09:32:29 +08:00
wzk
c1213fcf59 Revert "修复医嘱请选择项目选完选项框不消失"
This reverts commit 4afe0d107c.
2025-10-29 09:21:55 +08:00
wzk
a64edace55 Merge remote-tracking branch 'origin/develop' into develop 2025-10-29 09:04:25 +08:00
wzk
4afe0d107c 修复医嘱请选择项目选完选项框不消失 2025-10-29 09:04:01 +08:00
Auora
d8af11412f 修改格式 2025-10-29 08:55:14 +08:00
Auora
00816c9834 修改位置:applicationFormBottomBtn.vue 中的 import 语句。 2025-10-28 17:28:25 +08:00
Auora
4fb7bea80a 修改位置:prescriptionlist.vue 中的 import 语句 2025-10-28 17:21:20 +08:00
Auora
0fc72cb270 修改位置:prescriptionlist.vue 中的 import 语句 2025-10-28 17:14:23 +08:00
Auora
eadf521903 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-28 17:04:08 +08:00
f786fdbc3f 更新 openhis-ui-vue3/.env.spug
删除NODE_ENV=spug
2025-10-28 09:03:17 +00:00
92c4c938a3 更新 openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionMedicineList.vue 2025-10-28 08:57:06 +00:00
Auora
a94a1b7b69 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-28 16:34:06 +08:00
Auora
48755c2d9e 删掉多余逗号 2025-10-28 16:32:42 +08:00
叶锦涛
f99f8eb560 系统登入界面的设计 2025-10-28 16:27:42 +08:00
Auora
ddc7ce2fe7 spug测试 2025-10-28 15:56:24 +08:00
Auora
c9899c62d2 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his 2025-10-28 15:55:04 +08:00
wzk
8b9837d7dc Merge remote-tracking branch 'origin/develop' into develop 2025-10-28 13:35:22 +08:00
wzk
2cba41331a 诊断类别:字典管理中找不到对应的字典数据,字典类别在显示出来的数据和医生开立诊断的数据不一致。 2025-10-28 13:34:56 +08:00
4da5ca427b 在租户管理-》所属用户界面的关闭按钮改为关闭当前的界面,并返回上一级界面, 2025-10-28 13:33:50 +08:00
wzk
f4605b1af7 下拉列表的刷选功能失效,按照下拉选中的医嘱类型能过滤出对应收费项目医生进行开单 2025-10-27 15:08:28 +08:00
叶锦涛
d2babdc9ed 修复已保存病例模板无数据的显示的问题 2025-10-27 14:02:01 +08:00
4d0599eac1 将历史病例中对病例选择的bug修复,现在是单选选中 2025-10-27 13:22:25 +08:00
Auora
35d99df274 test 2025-10-24 17:17:31 +08:00
Auora
ce76b2f98d 增加门诊病历的标题:门诊初诊病历/门诊复诊病历,当患者是初时-》门诊初诊病历,当患者为复诊时-》门诊复诊病历。
标题下面增加:就诊卡号、姓名、性别、年龄以及就诊日期(默认创建病历的当前时间)和就诊科室(患者当前开单科室),系统自动获取患者的档案信息。
2025-10-24 11:56:44 +08:00
8fbca1a898 Merge remote-tracking branch 'origin/develop' into develop 2025-10-24 11:27:32 +08:00
d548215123 就诊卡号查询患者信息 优化查询框布局 2025-10-24 11:26:56 +08:00
953d17dc8c 增加就诊和复诊的选定按钮和判断逻辑 2025-10-24 11:24:33 +08:00
叶锦涛
b71a21ea5c Merge remote-tracking branch 'origin/develop' into develop 2025-10-23 16:04:48 +08:00
叶锦涛
0a20b5e34e 拉宽诊断类型的方框 2025-10-23 16:02:55 +08:00
388425084e 增加就诊和复诊的选定按钮和判断逻辑 2025-10-23 16:01:34 +08:00
51ee8d1b43 医保码:将医保码修改成诊断代码。
在诊断名称后增加两个字段诊断医生和诊断时间,诊断医生为默认开立诊断的医生,诊断时间为默认开立诊断的当前时间。
2025-10-23 15:43:47 +08:00
Auora
d29d56e712 去掉patientList组件中多余的“岁” 2025-10-23 14:47:32 +08:00
Auora
9084ddaa98 1增加就诊卡号字段显示。
2卡号:当病历号/姓名字段通过条件检索到患者信息选择时卡号字段也要进行赋值。
2025-10-23 14:42:01 +08:00
叶锦涛
be6d5c1ccc 增加单位岁 增加项目编码字段 2025-10-23 10:52:34 +08:00
1bba9e598a 解决死亡时间格式不一致问题 2025-10-22 16:56:05 +08:00
d58a5e8ab3 通过卡号查询患者信息 2025-10-22 16:49:09 +08:00
e6ffb7101f 2 2025-10-22 16:26:55 +08:00
Auora
48b2188cf9 当输入患者的姓名和身份号码两个字段的值已经存在时,提醒挂号工作人员该患者档案已经存在 2025-10-22 15:15:11 +08:00
Auora
8bc5d45976 去掉年龄的“岁”字 2025-10-22 13:52:16 +08:00
04f6e7e960 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-22 11:52:42 +08:00
8fb58bdab8 就诊卡号:限制成必填选项。 2025-10-22 11:50:37 +08:00
叶锦涛
fdfe5334a1 4、年龄:增加单位,比如29岁,当年龄字段赋值29岁时系统自动换算出生年月日的值。 2025-10-22 11:38:15 +08:00
Auora
66b99009e6 身份证号校验功能 2025-10-22 09:07:07 +08:00
Auora
2c7456531d 更改数据库配置 2025-10-21 11:12:42 +08:00
133 changed files with 11263 additions and 1958 deletions

View File

@@ -4,11 +4,11 @@
![天天开源](https://open.tntlinking.com/assets/logo-b-BzFUYaRU.png) ![天天开源](https://open.tntlinking.com/assets/logo-b-BzFUYaRU.png)
天天开源致⼒于打造中国应⽤管理软件开源⽣态⾯向医疗、企业、教育三⼤⾏业信息化需求提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品并持续招募⽣态合作伙伴期待共同构建开源创新的⾏业协作模式加速⾏业的数字化进程。 天天开源致⼒于打造中国应⽤管理 软件开源⽣态⾯向医疗、企业、教育三⼤⾏业信息化需求提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品并持续招募⽣态合作伙伴期待共同构建开源创新的⾏业协作模式加速⾏业的数字化进程。
天天开源的前⾝是新致开源最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉新致开源品牌更新为天天开源我们始终秉持开源、专业、协作的理念致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。 天天开源的前⾝是新致开源最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉新致开源品牌更新为天天开源我们始终秉持开源、专业、协作的理念致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
了解我们https://open.tntlinking.com/about?site=gitee 了解我们ahttps://open.tntlinking.com/about?site=gitee
## 💾【部署包下载】 ## 💾【部署包下载】

View File

@@ -37,6 +37,10 @@ public final class AgeCalculatorUtil {
* 当前年龄取得(床位列表表示年龄用) * 当前年龄取得(床位列表表示年龄用)
*/ */
public static String getAge(Date date) { public static String getAge(Date date) {
// 添加空值检查
if (date == null) {
return "";
}
// 将 Date 转换为 LocalDateTime // 将 Date 转换为 LocalDateTime
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();

View File

@@ -22,10 +22,11 @@ import com.core.common.utils.StringUtils;
*/ */
@Configuration @Configuration
public class FilterConfig { public class FilterConfig {
@Value("${xss.excludes}") // 添加默认值,避免配置不存在时启动失败
@Value("${xss.excludes:/system/notice}")
private String excludes; private String excludes;
@Value("${xss.urlPatterns}") @Value("${xss.urlPatterns:/system/*,/monitor/*,/tool/*}")
private String urlPatterns; private String urlPatterns;
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})

View File

@@ -58,6 +58,7 @@ public class GenController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo genList(GenTable genTable) { public TableDataInfo genList(GenTable genTable) {
startPage(); startPage();
List<GenTable> list = genTableService.selectGenTableList(genTable); List<GenTable> list = genTableService.selectGenTableList(genTable);
return getDataTable(list); return getDataTable(list);
} }

View File

@@ -0,0 +1,53 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.service.IInvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* 发票管理控制器
*
* @author system
* @date 2025-02-20
*/
@RestController
@RequestMapping("/basicmanage/invoice")
public class InvoiceController {
@Autowired
private IInvoiceService invoiceService;
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票列表
*/
@GetMapping("/page")
public R<?> selectInvoicePage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "10") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票列表
Page<Invoice> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceService.selectInvoicePage(page, isAdmin, userId));
}
}

View File

@@ -0,0 +1,88 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.service.IInvoiceSegmentService;
import com.openhis.web.basicmanage.domain.InvoiceSegmentDeleteRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* 发票段管理控制器
*
* @author system
* @date 2025-11-18
*/
@RestController
@RequestMapping("/basicmanage/invoice-segment")
public class InvoiceSegmentController {
@Autowired
private IInvoiceSegmentService invoiceSegmentService;
/**
* 分页查询发票段列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票段列表
*/
@GetMapping("/page")
public R<?> selectInvoiceSegmentPage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "100") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票段列表
Page<InvoiceSegment> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceSegmentService.selectInvoiceSegmentPage(page, isAdmin, userId));
}
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/add")
public R<?> addInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置创建人信息
invoiceSegment.setCreateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.insertInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/update")
public R<?> updateInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置更新人信息
invoiceSegment.setUpdateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.updateInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 删除发票段
*/
@PostMapping("/delete")
public R<?> delete(@RequestBody InvoiceSegmentDeleteRequest request) {
int rows = invoiceSegmentService.deleteInvoiceSegmentByIds(request.getIds());
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
}
}

View File

@@ -0,0 +1,23 @@
package com.openhis.web.basicmanage.domain;
import java.io.Serializable;
/**
* 发票段删除请求类
*
* @author system
* @date 2024-06-19
*/
public class InvoiceSegmentDeleteRequest implements Serializable {
private static final long serialVersionUID = 1L;
private Long[] ids;
public Long[] getIds() {
return ids;
}
public void setIds(Long[] ids) {
this.ids = ids;
}
}

View File

@@ -0,0 +1,53 @@
package com.openhis.web.charge.patientcardrenewal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.core.common.core.domain.R;
import lombok.extern.slf4j.Slf4j;
/**
* 患者换卡控制器
*
* @author system
* @date 2024-01-01
*/
@RestController
@RequestMapping("/charge/patientCardRenewal")
@Slf4j
public class PatientCardRenewalController {
@Autowired
private PatientCardRenewalService patientCardRenewalService;
/**
* 执行患者换卡操作
*
* @param request 换卡请求参数
* @return 换卡结果
*/
@PostMapping("/renewCard")
public R<?> renewCard(@RequestBody RenewalRequest request) {
try {
log.info("患者换卡请求: 旧卡号={}, 新卡号={}, 患者ID={}",
request.getOldCardNo(), request.getNewCardNo(), request.getPatientId());
// 执行换卡操作
boolean success = patientCardRenewalService.renewCard(request);
if (success) {
log.info("患者换卡成功: 旧卡号={} -> 新卡号={}",
request.getOldCardNo(), request.getNewCardNo());
return R.ok("换卡成功");
} else {
return R.fail("换卡失败");
}
} catch (Exception e) {
log.error("患者换卡异常: ", e);
return R.fail("换卡操作异常: " + e.getMessage());
}
}
}

View File

@@ -0,0 +1,18 @@
package com.openhis.web.charge.patientcardrenewal;
/**
* 患者换卡服务接口
*
* @author system
* @date 2024-01-01
*/
public interface PatientCardRenewalService {
/**
* 执行患者换卡操作
*
* @param request 换卡请求参数
* @return 是否换卡成功
*/
boolean renewCard(RenewalRequest request);
}

View File

@@ -0,0 +1,71 @@
package com.openhis.web.charge.patientcardrenewal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import com.openhis.administration.domain.PatientIdentifier;
import com.openhis.administration.service.IPatientIdentifierService;
import com.openhis.common.enums.IdentifierStatusEnum;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
/**
* 患者换卡服务实现类
*
* @author system
* @date 2024-01-01
*/
@Service
@Slf4j
public class PatientCardRenewalServiceImpl implements PatientCardRenewalService {
@Autowired
private IPatientIdentifierService patientIdentifierService;
@Override
@Transactional(rollbackFor = Exception.class)
public boolean renewCard(RenewalRequest request) {
log.info("执行患者换卡操作: 患者ID={}, 旧卡号={}, 新卡号={}, 原因={}",
request.getPatientId(), request.getOldCardNo(), request.getNewCardNo(), request.getReason());
// 1. 验证参数合法性
if (StringUtils.isEmpty(request.getPatientId())) {
throw new IllegalArgumentException("患者ID不能为空");
}
if (StringUtils.isEmpty(request.getNewCardNo())) {
throw new IllegalArgumentException("新卡号不能为空");
}
// 2. 检查新卡号是否已被使用
LambdaQueryWrapper<PatientIdentifier> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PatientIdentifier::getIdentifierNo, request.getNewCardNo());
PatientIdentifier existingIdentifier = patientIdentifierService.getOne(queryWrapper);
if (existingIdentifier != null) {
throw new IllegalArgumentException("新卡号已被其他患者使用,请更换新卡号");
}
// 3. 直接使用患者ID作为查询条件
Long patientId = Long.parseLong(request.getPatientId());
// 4. 通过患者ID查询现有标识信息
PatientIdentifier patientIdentifier = patientIdentifierService.selectByPatientId(patientId);
if (patientIdentifier != null) {
// 5. 只更新就诊卡号这一个参数
patientIdentifier.setIdentifierNo(request.getNewCardNo());
patientIdentifierService.updateById(patientIdentifier);
log.info("患者ID={} 换卡成功,已更新就诊卡号", patientId);
} else {
throw new IllegalArgumentException("未找到患者标识信息,无法进行换卡操作");
}
// 4. 记录换卡日志 - 可以根据需要扩展日志记录功能
// 5. 处理相关业务系统的卡号更新 - 可以根据需要扩展
return true;
}
}

View File

@@ -0,0 +1,38 @@
package com.openhis.web.charge.patientcardrenewal;
import lombok.Data;
/**
* 换卡请求参数类
*
* @author system
* @date 2024-01-01
*/
@Data
public class RenewalRequest {
/**
* 旧门诊号码
*/
private String oldCardNo;
/**
* 新门诊号码
*/
private String newCardNo;
/**
* 患者ID
*/
private String patientId;
/**
* 换卡原因
*/
private String reason;
/**
* 备注信息
*/
private String remark;
}

View File

@@ -91,9 +91,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
*/ */
@Override @Override
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) { public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
// 构建查询条件 // 构建查询条件添加phone字段支持手机号搜索
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey, QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str")), null); new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str", "phone")), null);
// 设置排序 // 设置排序
queryWrapper.orderByDesc("update_time"); queryWrapper.orderByDesc("update_time");
// 通过证件号匹配 patient // 通过证件号匹配 patient
@@ -119,6 +119,12 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
// 初复诊 // 初复诊
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo() e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
: EncounterType.INITIAL.getInfo()); : EncounterType.INITIAL.getInfo());
// 患者标识
PatientIdentifier patientIdentifier = patientIdentifierService
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
if (patientIdentifier != null) {
e.setIdentifierNo(patientIdentifier.getIdentifierNo());
}
}); });
return patientMetadataPage; return patientMetadataPage;
@@ -261,6 +267,23 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")), new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
request); request);
// 手动处理 statusEnum 参数(用于过滤退号记录)
String statusEnumParam = request.getParameter("statusEnum");
if (statusEnumParam != null && !statusEnumParam.isEmpty()) {
try {
Integer statusEnum = Integer.parseInt(statusEnumParam);
if (statusEnum == -1) {
// -1 表示排除退号记录(正常挂号)
queryWrapper.ne("status_enum", 6);
} else {
// 其他值表示精确匹配
queryWrapper.eq("status_enum", statusEnum);
}
} catch (NumberFormatException e) {
// 忽略无效的参数值
}
}
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter( IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), ParticipantType.ADMITTER.getCode(), new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), ParticipantType.ADMITTER.getCode(),
queryWrapper, ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue()); queryWrapper, ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue());

View File

@@ -131,4 +131,40 @@ public class CurrentDayEncounterDto {
*/ */
private Date birthDate; private Date birthDate;
/**
* 退号日期/时间
*/
private Date returnDate;
/**
* 退号原因
*/
private String returnReason;
/**
* 退号操作人
*/
private String operatorName;
/**
* 退号操作工号
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long operatorId;
/**
* 退款金额
*/
private BigDecimal refundAmount;
/**
* 合同编码(费用性质代码)
*/
private String contractNo;
/**
* 退款方式(多个支付方式用逗号分隔)
*/
private String refundMethod;
} }

View File

@@ -56,4 +56,8 @@ public class PatientMetadata {
*/ */
private String firstEnum_enumText; private String firstEnum_enumText;
/**
* 就诊卡号
*/
private String identifierNo;
} }

View File

@@ -82,4 +82,10 @@ public class RefundItemDto {
/** 项目名 */ /** 项目名 */
private String itemName; private String itemName;
/** 费用支付方式编码 */
private String medfeePaymtdCode;
/** 费用类型 */
private String feeType;
} }

View File

@@ -29,7 +29,7 @@ public interface ICommonService {
/** /**
* 药房列表(库房用) * 药房列表(库房用)
* *
* @return 药房列表 * @return 药房列表1
*/ */
List<LocationDto> getInventoryPharmacyList(); List<LocationDto> getInventoryPharmacyList();

View File

@@ -52,6 +52,14 @@ public interface IDoctorStationMainAppService {
*/ */
R<?> completeEncounter(Long encounterId); R<?> completeEncounter(Long encounterId);
/**
* 取消完成
*
* @param encounterId 就诊id
* @return 结果
*/
R<?> cancelEncounter(Long encounterId);
/** /**
* 查询处方号列表信息 * 查询处方号列表信息
* *

View File

@@ -140,6 +140,17 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
adviceUtils.subtractInventory(adviceInventoryList, adviceDraftInventoryList); adviceUtils.subtractInventory(adviceInventoryList, adviceDraftInventoryList);
// 查询取药科室配置 // 查询取药科室配置
List<AdviceInventoryDto> medLocationConfig = doctorStationAdviceAppMapper.getMedLocationConfig(organizationId); List<AdviceInventoryDto> medLocationConfig = doctorStationAdviceAppMapper.getMedLocationConfig(organizationId);
// 将配置转为 {categoryCode -> 允许的locationId集合}
Map<String, Set<Long>> allowedLocByCategory = new HashMap<>();
if (medLocationConfig != null && !medLocationConfig.isEmpty()) {
for (AdviceInventoryDto cfg : medLocationConfig) {
if (cfg.getCategoryCode() == null || cfg.getLocationId() == null) {
continue;
}
allowedLocByCategory.computeIfAbsent(String.valueOf(cfg.getCategoryCode()), k -> new HashSet<>())
.add(cfg.getLocationId());
}
}
// 费用定价子表信息 // 费用定价子表信息
List<AdvicePriceDto> childCharge = doctorStationAdviceAppMapper List<AdvicePriceDto> childCharge = doctorStationAdviceAppMapper
.getChildCharge(ConditionCode.LOT_NUMBER_COST.getCode(), chargeItemDefinitionIdList); .getChildCharge(ConditionCode.LOT_NUMBER_COST.getCode(), chargeItemDefinitionIdList);
@@ -163,6 +174,19 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
.filter(e -> baseDto.getAdviceDefinitionId().equals(e.getItemId()) .filter(e -> baseDto.getAdviceDefinitionId().equals(e.getItemId())
&& baseDto.getAdviceTableName().equals(e.getItemTable())) && baseDto.getAdviceTableName().equals(e.getItemTable()))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 当存在按科室配置时:仅保留被允许的药房/药库的库存;
// 若该药品类别未在配置中出现,则视为不可开立(清空库存以便前端过滤掉)
if (!allowedLocByCategory.isEmpty()) {
Set<Long> allowedLoc =
allowedLocByCategory.get(String.valueOf(baseDto.getCategoryCode()));
if (allowedLoc == null || allowedLoc.isEmpty()) {
inventoryList = Collections.emptyList();
} else {
inventoryList = inventoryList.stream()
.filter(inv -> allowedLoc.contains(inv.getLocationId()))
.collect(Collectors.toList());
}
}
// 库存信息 // 库存信息
baseDto.setInventoryList(inventoryList); baseDto.setInventoryList(inventoryList);
// 设置默认产品批号 // 设置默认产品批号
@@ -174,18 +198,15 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
baseDto.setDefaultLotNumber(hasInventoryList.get(0).getLotNumber()); baseDto.setDefaultLotNumber(hasInventoryList.get(0).getLotNumber());
} }
} }
if (!inventoryList.isEmpty() && !medLocationConfig.isEmpty()) { if (!inventoryList.isEmpty() && !allowedLocByCategory.isEmpty()) {
// 第一步在medLocationConfig中匹配categoryCode Set<Long> allowedLoc =
AdviceInventoryDto result1 = medLocationConfig.stream() allowedLocByCategory.get(String.valueOf(baseDto.getCategoryCode()));
.filter(dto -> baseDto.getCategoryCode().equals(dto.getCategoryCode())).findFirst() if (allowedLoc != null && !allowedLoc.isEmpty()) {
.orElse(null); AdviceInventoryDto hit = inventoryList.stream()
if (result1 != null) { .filter(inv -> allowedLoc.contains(inv.getLocationId()))
// 第二步在inventoryList中匹配locationId .findFirst().orElse(null);
AdviceInventoryDto result2 = inventoryList.stream() if (hit != null && hit.getLotNumber() != null) {
.filter(dto -> result1.getLocationId().equals(dto.getLocationId())).findFirst() baseDto.setDefaultLotNumber(hit.getLotNumber());
.orElse(null);
if (result2 != null && result2.getLotNumber() != null) {
baseDto.setDefaultLotNumber(result2.getLotNumber());
} }
} }
} }

View File

@@ -1,14 +1,13 @@
package com.openhis.web.doctorstation.appservice.impl; package com.openhis.web.doctorstation.appservice.impl;
import java.util.Arrays; import java.util.*;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import cn.hutool.core.util.ObjectUtil;
import com.openhis.web.doctorstation.appservice.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -25,7 +24,6 @@ import com.openhis.administration.service.IEncounterParticipantService;
import com.openhis.common.enums.*; import com.openhis.common.enums.*;
import com.openhis.common.utils.EnumUtils; import com.openhis.common.utils.EnumUtils;
import com.openhis.common.utils.HisQueryUtils; import com.openhis.common.utils.HisQueryUtils;
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
import com.openhis.web.doctorstation.dto.PatientInfoDto; import com.openhis.web.doctorstation.dto.PatientInfoDto;
import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto; import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto;
import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto; import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto;
@@ -46,6 +44,17 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
@Resource @Resource
IEncounterParticipantService iEncounterParticipantService; IEncounterParticipantService iEncounterParticipantService;
@Resource
IDoctorStationAdviceAppService iDoctorStationAdviceAppService;
@Resource
IDoctorStationEmrAppService iDoctorStationEmrAppService;
@Resource
IDoctorStationDiagnosisAppService iDoctorStationDiagnosisAppService;
@Resource
IDoctorStationChineseMedicalAppService iDoctorStationChineseMedicalAppService;
/** /**
* 查询就诊患者信息 * 查询就诊患者信息
* *
@@ -154,6 +163,45 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
return update > 0 ? R.ok() : R.fail(); return update > 0 ? R.ok() : R.fail();
} }
/**
* 取消接诊
*
* @param encounterId 就诊id
* @return 结果
*/
@Override
public R<?> cancelEncounter(Long encounterId) {
//1.判断是否已经产生业务,如医生已经开有病历、处方、诊断、检验检查或相关项目已收费、执行等,
//如果有则提示:需要医生删除、作废、退费才能【取消接诊】。
//1.1病历
Object emrDetailResult = iDoctorStationEmrAppService.getEmrDetail(encounterId).getData();
//1.2诊断
Object diagnosisResult = iDoctorStationDiagnosisAppService.getEncounterDiagnosis(encounterId).getData();
//1.3处方
Object adviceResult = iDoctorStationAdviceAppService.getRequestBaseInfo(encounterId).getData();
//1.4中医诊断、处方
Map<?,?> tcmDiagnosisResult = (Map<?,?>) iDoctorStationChineseMedicalAppService.getTcmEncounterDiagnosis(encounterId).getData();
Object symptom = tcmDiagnosisResult.get("symptom");
Object illness = tcmDiagnosisResult.get("illness");
Object tcmPrescriptionResult = iDoctorStationChineseMedicalAppService.getTcmRequestBaseInfo(encounterId).getData();
boolean isEmpty = ObjectUtil.isAllEmpty(emrDetailResult, diagnosisResult, adviceResult, symptom,illness, tcmPrescriptionResult);
if (!isEmpty) {
return R.fail();
}
//2.取消接诊,患者重新回到患者队列待诊中
int update = encounterMapper.update(null,
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
.set(Encounter::getStatusEnum, EncounterStatus.PLANNED.getValue())
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.TRIAGED.getValue()));
return update > 0 ? R.ok() : R.fail();
}
/** /**
* 查询处方号列表信息 * 查询处方号列表信息
* *

View File

@@ -92,6 +92,17 @@ public class DoctorStationMainController {
return iDoctorStationMainAppService.completeEncounter(encounterId); return iDoctorStationMainAppService.completeEncounter(encounterId);
} }
/**
* 取消接诊
*
* @param encounterId 就诊id
* @return 结果
*/
@GetMapping(value = "/cancel-encounter")
public R<?> cancelEncounter(@RequestParam Long encounterId) {
return iDoctorStationMainAppService.cancelEncounter(encounterId);
}
/** /**
* 查询处方号列表信息 * 查询处方号列表信息
* *

View File

@@ -40,6 +40,11 @@ public class PatientInfoDto {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long orgId; private Long orgId;
/**
* 科室名称
*/
private String organizationName;
/** /**
* 患者姓名 * 患者姓名
*/ */

View File

@@ -161,6 +161,27 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
if (receiptDetailList.isEmpty()) { if (receiptDetailList.isEmpty()) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null)); return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
} }
// 获取所有供应商ID
Set<Long> supplierIds = receiptDetailList.stream()
.filter(dto -> dto.getSupplierId() != null)
.map(ReceiptDetailDto::getSupplierId)
.collect(Collectors.toSet());
// 查询供应商信息并设置供应商名称
if (!supplierIds.isEmpty()) {
List<Supplier> suppliers = supplierService.listByIds(supplierIds);
Map<Long, String> supplierNameMap = suppliers.stream()
.collect(Collectors.toMap(Supplier::getId, Supplier::getName));
// 设置供应商名称
receiptDetailList.forEach(dto -> {
if (dto.getSupplierId() != null) {
dto.setSupplierName(supplierNameMap.getOrDefault(dto.getSupplierId(), ""));
}
});
}
return R.ok(receiptDetailList); return R.ok(receiptDetailList);
} }

View File

@@ -53,4 +53,13 @@ public interface IPatientInformationService {
*/ */
R<?> addPatient(PatientInformationDto patientInformationDto); R<?> addPatient(PatientInformationDto patientInformationDto);
/**
* 检查患者是否存在
*
* @param name 患者姓名
* @param idCardNo 身份证号
* @return 是否存在
*/
boolean checkPatientExists(String name, String idCardNo);
} }

View File

@@ -128,10 +128,11 @@ public class PatientInformationServiceImpl implements IPatientInformationService
public IPage<PatientInformationDto> getPatientInfo(PatientInfoSearchParam patientInfoSearchParam, String searchKey, public IPage<PatientInformationDto> getPatientInfo(PatientInfoSearchParam patientInfoSearchParam, String searchKey,
Integer pageNo, Integer pageSize, HttpServletRequest request) { Integer pageNo, Integer pageSize, HttpServletRequest request) {
// 构建查询条件 // 构建查询条件 - 添加phone字段到搜索条件中
QueryWrapper<PatientInformationDto> queryWrapper = HisQueryUtils.buildQueryWrapper( QueryWrapper<PatientInformationDto> queryWrapper = HisQueryUtils.buildQueryWrapper(
patientInfoSearchParam, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name, patientInfoSearchParam, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name,
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)), CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr,
CommonConstants.FieldName.Phone)), // 添加phone字段支持手机号搜索
request); request);
IPage<PatientInformationDto> patientInformationPage = IPage<PatientInformationDto> patientInformationPage =
@@ -257,4 +258,14 @@ public class PatientInformationServiceImpl implements IPatientInformationService
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"病人信息"})); : R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"病人信息"}));
} }
@Override
public boolean checkPatientExists(String name, String idCardNo) {
QueryWrapper<Patient> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("name", name)
.eq("id_card", idCardNo)
.eq("delete_flag", "0");
return patientService.count(queryWrapper) > 0;
}
} }

View File

@@ -78,4 +78,16 @@ public class PatientInformationController {
.ok(patientInformationService.getPatientInfo(patientInfoSearchParam, searchKey, pageNo, pageSize, request)); .ok(patientInformationService.getPatientInfo(patientInfoSearchParam, searchKey, pageNo, pageSize, request));
} }
/**
* 检查患者是否存在
*
* @param name 患者姓名
* @param idCardNo 身份证号
* @return 是否存在
*/
@GetMapping("/check-exists")
public R<?> checkPatientExists(@RequestParam String name, @RequestParam String idCardNo) {
return R.ok(patientInformationService.checkPatientExists(name, idCardNo));
}
} }

View File

@@ -68,7 +68,7 @@ public class PatientInformationDto {
/** /**
* 死亡时间 * 死亡时间
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
private Date deceasedDate; private Date deceasedDate;
/** /**

View File

@@ -296,6 +296,7 @@ public class IChargeBillServiceImpl implements IChargeBillService {
ChargeItemDefinition chargeItemDefinition = iChargeItemDefinitionService.getById(definitionId); ChargeItemDefinition chargeItemDefinition = iChargeItemDefinitionService.getById(definitionId);
YbMedChrgItmType medChrgItmType = YbMedChrgItmType medChrgItmType =
YbMedChrgItmType.getByCode(Integer.parseInt(chargeItemDefinition.getYbType())); YbMedChrgItmType.getByCode(Integer.parseInt(chargeItemDefinition.getYbType()));

View File

@@ -597,7 +597,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
// 全退 // 全退
String ybSettleIds = paymentReconciliation.getYbSettleIds(); String ybSettleIds = paymentReconciliation.getYbSettleIds();
PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, PaymentRecDetails, null); PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, PaymentRecDetails, null, null);
if (!StringUtils.isEmpty(ybSettleIds)) { if (!StringUtils.isEmpty(ybSettleIds)) {
// 医保结算信息 // 医保结算信息
List<String> ybSettleIdList = Arrays.asList(ybSettleIds.split(",")); List<String> ybSettleIdList = Arrays.asList(ybSettleIds.split(","));
@@ -734,7 +734,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
} }
PaymentReconciliation unPaymentReconciliation = PaymentReconciliation unPaymentReconciliation =
normalUnCharge(paymentReconciliation, paymentRecDetails, cancelPaymentDto.getSetlId()); normalUnCharge(paymentReconciliation, paymentRecDetails, cancelPaymentDto.getSetlId(), cancelPaymentDto.getReason());
return R.ok(unPaymentReconciliation); return R.ok(unPaymentReconciliation);
} }
@@ -792,10 +792,12 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
* *
* @param paymentReconciliation 付款实体 * @param paymentReconciliation 付款实体
* @param paymentRecDetails 付款详情 * @param paymentRecDetails 付款详情
* @param setlIds 医保结算ID
* @param reason 退号/退费原因
* @return 结果 * @return 结果
*/ */
private PaymentReconciliation normalUnCharge(PaymentReconciliation paymentReconciliation, private PaymentReconciliation normalUnCharge(PaymentReconciliation paymentReconciliation,
List<PaymentRecDetail> paymentRecDetails, String setlIds) { List<PaymentRecDetail> paymentRecDetails, String setlIds, String reason) {
// 获取原ID // 获取原ID
Long id = paymentReconciliation.getId(); Long id = paymentReconciliation.getId();
@@ -805,7 +807,8 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()).setBillDate(new Date()) .setEntererId(SecurityUtils.getLoginUser().getPractitionerId()).setBillDate(new Date())
.setTenderedAmount(paymentReconciliation.getTenderedAmount().negate()) .setTenderedAmount(paymentReconciliation.getTenderedAmount().negate())
.setReturnedAmount(paymentReconciliation.getReturnedAmount().negate()) .setReturnedAmount(paymentReconciliation.getReturnedAmount().negate())
.setDisplayAmount(paymentReconciliation.getDisplayAmount().negate()); .setDisplayAmount(paymentReconciliation.getDisplayAmount().negate())
.setRefundReason(reason); // 保存退号/退费原因
if (setlIds != null) { if (setlIds != null) {
paymentReconciliation.setYbSettleIds(setlIds); paymentReconciliation.setYbSettleIds(setlIds);
} }
@@ -2232,7 +2235,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
} }
// 全退 // 全退
PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, paymentRecDetails, null); PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, paymentRecDetails, null, null);
// 取医保结算数据 // 取医保结算数据
String ybSettleIds = paymentReconciliation.getYbSettleIds(); String ybSettleIds = paymentReconciliation.getYbSettleIds();

View File

@@ -172,13 +172,13 @@ public class PaymentReconciliationController {
/** /**
* 挂号收费(挂号收费先医保挂号,收费成功后再本系统挂号) * 挂号收费(挂号收费先医保挂号,收费成功后再本系统挂号)
* *
* @param outpatientRegistrationAddParam 挂号信息 * @param outpatientRegistrationSettleParam 挂号信息
* @return 操做结果 * @return 操做结果
*/ */
@PostMapping("/reg-pay") @PostMapping("/reg-pay")
public R<?> regPay(@Valid @RequestBody OutpatientRegistrationSettleParam outpatientRegistrationAddParam) { public R<?> regPay(@Valid @RequestBody OutpatientRegistrationSettleParam outpatientRegistrationSettleParam) {
R<?> result = paymentReconciliationService.regPay(outpatientRegistrationAddParam, R<?> result = paymentReconciliationService.regPay(outpatientRegistrationSettleParam,
outpatientRegistrationAddParam.getChrgBchno(), outpatientRegistrationAddParam.getPaymentDetails()); outpatientRegistrationSettleParam.getChrgBchno(), outpatientRegistrationSettleParam.getPaymentDetails());
// 付款成功后,开具发票 // 付款成功后,开具发票
if (result.getCode() == 200) { if (result.getCode() == 200) {
PaymentReconciliation paymentRecon = null; PaymentReconciliation paymentRecon = null;

View File

@@ -68,6 +68,11 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
public R<?> getPage(InventoryProductReportSearchParam inventoryProductReportSearchParam, Integer pageNo, public R<?> getPage(InventoryProductReportSearchParam inventoryProductReportSearchParam, Integer pageNo,
Integer pageSize, String searchKey, HttpServletRequest request) { Integer pageSize, String searchKey, HttpServletRequest request) {
// 数据初始化不使用eq条件拼接
// 库存范围
Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope();
inventoryProductReportSearchParam.setInventoryScope(null);
// 设置模糊查询的字段名 // 设置模糊查询的字段名
HashSet<String> searchFields = new HashSet<>(); HashSet<String> searchFields = new HashSet<>();
searchFields.add(CommonConstants.FieldName.BusNo); searchFields.add(CommonConstants.FieldName.BusNo);
@@ -78,7 +83,8 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
// 查询库存商品明细分页列表 // 查询库存商品明细分页列表
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage( Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString()); new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(),
inventoryScope);
productReportPage.getRecords().forEach(e -> { productReportPage.getRecords().forEach(e -> {
// 药品类型 // 药品类型
@@ -104,6 +110,11 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
Integer pageSize, String searchKey, HttpServletRequest request, HttpServletResponse response) { Integer pageSize, String searchKey, HttpServletRequest request, HttpServletResponse response) {
pageNo = 1; pageNo = 1;
pageSize = 10000; pageSize = 10000;
// 数据初始化不使用eq条件拼接
// 库存范围
Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope();
inventoryProductReportSearchParam.setInventoryScope(null);
// 设置模糊查询的字段名 // 设置模糊查询的字段名
HashSet<String> searchFields = new HashSet<>(); HashSet<String> searchFields = new HashSet<>();
searchFields.add(CommonConstants.FieldName.BusNo); searchFields.add(CommonConstants.FieldName.BusNo);
@@ -114,7 +125,8 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
// 查询库存商品明细分页列表 // 查询库存商品明细分页列表
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage( Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString()); new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(),
inventoryScope);
productReportPage.getRecords().forEach(e -> { productReportPage.getRecords().forEach(e -> {
// 药品类型 // 药品类型

View File

@@ -38,4 +38,10 @@ public class InventoryProductReportSearchParam {
/** 供应商 */ /** 供应商 */
private Long supplierId; private Long supplierId;
/** 厂家/产地(供应商名称) */
private String manufacturerText;
/** 仓库ID药房ID */
private Long purposeLocationId;
} }

View File

@@ -27,9 +27,11 @@ public interface InventoryProductReportMapper {
* @param page 分页 * @param page 分页
* @param queryWrapper 查询条件 * @param queryWrapper 查询条件
* @param lotNumber 命中条件枚举类型:产品批号 * @param lotNumber 命中条件枚举类型:产品批号
* @param inventoryScope 库存范围无限制1、数量等于02、数量大于03、数量小于等于204、数量小于等于505
* @return 库存商品明细 * @return 库存商品明细
*/ */
Page<InventoryProductReportPageDto> selectProductReportPage(@Param("page") Page<InventoryProductReportPageDto> page, Page<InventoryProductReportPageDto> selectProductReportPage(@Param("page") Page<InventoryProductReportPageDto> page,
@Param(Constants.WRAPPER) QueryWrapper<InventoryProductReportSearchParam> queryWrapper, @Param(Constants.WRAPPER) QueryWrapper<InventoryProductReportSearchParam> queryWrapper,
@Param("lotNumber") String lotNumber); @Param("lotNumber") String lotNumber,
@Param("inventoryScope") Integer inventoryScope);
} }

View File

@@ -5,43 +5,32 @@ package com.openhis.web.ybmanage.vo;
import java.math.BigDecimal; import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
/** /**
* 【3201】后台计算结果 DB映射实体 * Settlement3202 Result DB mapping entity
* *
* @author SunJQ * @author SunJQ
* @date 2025-04-15 * @date 2025-04-15
*/ */
@Data @Data
public class Settlement3202VO { public class Settlement3202VO {
/** 医疗费用总额 */ /** Medical Fee Sum */
private BigDecimal medFeeSumAmt; private BigDecimal medFeeSumAmt;
/** 基金支付总额 */ /** Fund Pay Sum */
private BigDecimal fundPaySumAmt; private BigDecimal fundPaySumAmt;
/** 个人账户支付总额 */ /** Account Pay */
private BigDecimal acctPay; private BigDecimal acctPay;
/** 个人账户支付总额 */ /** Account Gj Pay */
private BigDecimal acctGjPay; private BigDecimal acctGjPay;
/** 现金支付总额 */ /** Self Pay Cash */
private BigDecimal selfPayCash; private BigDecimal selfPayCash;
/** 微信支付总额 */ /** Self Pay WeChat */
private BigDecimal selfPayVx; private BigDecimal selfPayVx;
/** 阿里支付总额 */ /** Self Pay Alipay */
private BigDecimal selfPayAli; private BigDecimal selfPayAli;
/** 银行卡支付总额 */ /** Self Pay Bank Card */
private BigDecimal selfPayUnion; private BigDecimal selfPayUnion;
/** 定点医药机构结算笔数 */ /** Settlement Count */
private Integer fixMedInsSetlCnt; private Integer fixMedInsSetlCnt;
} }

View File

@@ -6,13 +6,13 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:postgresql://localhost:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8 url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgres username: postgresql
password: root password: Jchl1528
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: false enabled:
url: url:
username: username:
password: password:
@@ -62,13 +62,13 @@ spring:
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
host: 172.0.0.0 host: 192.168.110.252
# 端口默认为6379 # 端口默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引
database: 1 database: 1
# 密码 # 密码
password: redis password: Jchl1528
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
lettuce: lettuce:

View File

@@ -6,9 +6,9 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:postgresql://localhost:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8 url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgres username: postgresql
password: root password: Jchl1528
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
@@ -62,13 +62,13 @@ spring:
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
host: 127.0.0.1 host: 192.168.110.252
# 端口默认为6379 # 端口默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引
database: 1 database: 1
# 密码 # 密码
password: redis password: Jchl1528
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
lettuce: lettuce:

View File

@@ -74,12 +74,14 @@
T2."name" AS item_name, T2."name" AS item_name,
T2.id AS item_id, T2.id AS item_id,
T2.part_percent, T2.part_percent,
T2.manufacturer_text AS supplier_name, T2.manufacturer_text AS manufacturer_text,
T3.total_volume, T3.total_volume,
T5."name" AS practitioner_name, T5."name" AS practitioner_name,
T6."name" AS purpose_location_name, T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id, T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name, T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
T1.occurrence_time, T1.occurrence_time,
(SELECT SUM(T9.quantity) (SELECT SUM(T9.quantity)
FROM wor_inventory_item T9 FROM wor_inventory_item T9
@@ -100,6 +102,8 @@
LEFT JOIN wor_inventory_item T9 LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.bus_no = #{busNo} WHERE T1.bus_no = #{busNo}
AND T1.delete_flag = '0' AND T1.delete_flag = '0'
UNION UNION
@@ -121,12 +125,14 @@
T8."name" AS item_name, T8."name" AS item_name,
T8.id AS item_id, T8.id AS item_id,
T8.part_percent, T8.part_percent,
T8.manufacturer_text AS supplier_name, T8.manufacturer_text AS manufacturer_text,
T8."size" AS total_volume, T8."size" AS total_volume,
T5."name" AS practitioner_name, T5."name" AS practitioner_name,
T6."name" AS purpose_location_name, T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id, T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name, T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
T1.occurrence_time, T1.occurrence_time,
(SELECT SUM(T9.quantity) (SELECT SUM(T9.quantity)
FROM wor_inventory_item T9 FROM wor_inventory_item T9
@@ -145,6 +151,8 @@
LEFT JOIN wor_inventory_item T9 LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.bus_no = #{busNo} WHERE T1.bus_no = #{busNo}
AND T1.delete_flag = '0' AND T1.delete_flag = '0'
</select> </select>
@@ -167,12 +175,14 @@
T2."name" AS item_name, T2."name" AS item_name,
T2.id AS item_id, T2.id AS item_id,
T2.part_percent, T2.part_percent,
T2.manufacturer_text AS supplier_name, T2.manufacturer_text AS manufacturer_text,
T3.total_volume, T3.total_volume,
T5."name" AS practitioner_name, T5."name" AS practitioner_name,
T6."name" AS purpose_location_name, T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id, T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name, T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
(SELECT SUM(T9.quantity) (SELECT SUM(T9.quantity)
FROM wor_inventory_item T9 FROM wor_inventory_item T9
WHERE T9.item_id = T1.item_id WHERE T9.item_id = T1.item_id
@@ -192,6 +202,8 @@
LEFT JOIN wor_inventory_item T9 LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.purpose_location_id = #{locationId} WHERE T1.purpose_location_id = #{locationId}
AND T1.status_enum = #{statusEnum} AND T1.status_enum = #{statusEnum}
AND T1.type_enum IN AND T1.type_enum IN
@@ -220,12 +232,14 @@
T8."name" AS item_name, T8."name" AS item_name,
T8.id AS item_id, T8.id AS item_id,
T8.part_percent, T8.part_percent,
T8.manufacturer_text AS supplier_name, T8.manufacturer_text AS manufacturer_text,
T8."size" AS total_volume, T8."size" AS total_volume,
T5."name" AS practitioner_name, T5."name" AS practitioner_name,
T6."name" AS purpose_location_name, T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id, T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name, T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
(SELECT SUM(T9.quantity) (SELECT SUM(T9.quantity)
FROM wor_inventory_item T9 FROM wor_inventory_item T9
WHERE T9.item_id = T1.item_id WHERE T9.item_id = T1.item_id
@@ -243,6 +257,8 @@
LEFT JOIN wor_inventory_item T9 LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.purpose_location_id = #{locationId} WHERE T1.purpose_location_id = #{locationId}
AND T1.status_enum = #{statusEnum} AND T1.status_enum = #{statusEnum}
AND T1.type_enum IN AND T1.type_enum IN

View File

@@ -62,7 +62,14 @@
T9.charge_item_ids, T9.charge_item_ids,
T9.payment_id, T9.payment_id,
T9.picture_url, T9.picture_url,
T9.birth_date T9.birth_date,
T9.return_date,
T9.return_reason,
T9.operator_name,
T9.operator_id,
T9.refund_amount,
T9.contract_no,
T9.refund_method
from ( from (
SELECT T1.tenant_id AS tenant_id, SELECT T1.tenant_id AS tenant_id,
T1.id AS encounter_id, T1.id AS encounter_id,
@@ -84,7 +91,15 @@
T13.charge_item_ids, T13.charge_item_ids,
T13.id AS payment_id, T13.id AS payment_id,
ai.picture_url AS picture_url, ai.picture_url AS picture_url,
T8.birth_date AS birth_date T8.birth_date AS birth_date,
-- 退号相关信息
T14.bill_date AS return_date,
T14.refund_reason AS return_reason,
T15."name" AS operator_name,
T14.enterer_id AS operator_id,
ABS(T14.display_amount) AS refund_amount,
T6.contract_no AS contract_no,
T16.refund_method AS refund_method
FROM adm_encounter AS T1 FROM adm_encounter AS T1
LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0' LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0'
LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0' LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0'
@@ -112,6 +127,32 @@
ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,',')) ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,','))
AND T13.delete_flag = '0' AND T13.delete_flag = '0'
AND T13.status_enum = ${paymentStatus} AND T13.status_enum = ${paymentStatus}
-- 关联退号记录当状态为退号时通过relation_id关联原支付记录
LEFT JOIN fin_payment_reconciliation T14
ON T13.id = T14.relation_id
AND T14.delete_flag = '0'
AND T14.status_enum = 3
AND T14.payment_enum = 1
LEFT JOIN adm_practitioner AS T15 ON T15.ID = T14.enterer_id AND T15.delete_flag = '0'
-- 关联退号支付详情,获取退款方式(聚合多个支付方式)
LEFT JOIN (
SELECT reconciliation_id,
STRING_AGG(
CASE pay_enum
WHEN 220400 THEN '现金'
WHEN 220100 THEN '微信'
WHEN 220200 THEN '支付宝'
WHEN 220300 THEN '银联'
END,
','
ORDER BY pay_enum
) AS refund_method
FROM fin_payment_rec_detail
WHERE delete_flag = '0'
AND amount &lt; 0
AND pay_enum IN (220400, 220100, 220200, 220300)
GROUP BY reconciliation_id
) AS T16 ON T14.id = T16.reconciliation_id
LEFT JOIN adm_invoice AS ai LEFT JOIN adm_invoice AS ai
ON ai.reconciliation_id = T13.id AND ai.delete_flag = '0' ON ai.reconciliation_id = T13.id AND ai.delete_flag = '0'
WHERE T1.delete_flag = '0' WHERE T1.delete_flag = '0'

View File

@@ -41,7 +41,186 @@
abi.restricted_flag, abi.restricted_flag,
abi.restricted_scope abi.restricted_scope
from ( from (
<if test="adviceTypes == null or adviceTypes.contains(1)"> <!-- 改进SQL逻辑确保所有情况都能正确处理避免空的FROM子查询 -->
<!-- 当adviceTypes包含4或不在1-3范围内时或者adviceTypes为空/null时查询所有类型 -->
<choose>
<!-- 检查adviceTypes是否为null、空列表或者包含4、5或其他不在1-3范围内的值 -->
<when test="adviceTypes == null or adviceTypes.isEmpty() or adviceTypes.contains(4) or adviceTypes.contains(5)">
<!-- 查询所有类型 -->
SELECT T1.tenant_id,
1 AS advice_type,
T1.category_code AS category_code,
T1.pharmacology_category_code AS pharmacology_category_code,
T1.part_percent AS part_percent,
T1.unit_conversion_ratio AS unit_conversion_ratio,
T1.part_attribute_enum AS part_attribute_enum,
T1.tho_part_attribute_enum AS tho_part_attribute_enum,
T1.skin_test_flag AS skin_test_flag,
T1.inject_flag AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
T1.merchandise_name AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T2.total_volume AS volume,
T2.method_code AS method_code,
T2.rate_code AS rate_code,
T2.org_id AS org_id,
T2.location_id AS location_id,
CAST(T2.dose AS TEXT) AS dose,
T2.dose_unit_code AS dose_unit_code,
T3.NAME AS supplier,
T3.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T5.id AS charge_item_definition_id,
T5.instance_table AS advice_table_name,
T6.def_location_id AS position_id,
t1.restricted_flag AS restricted_flag,
t1.restricted_scope AS restricted_scope
FROM med_medication_definition AS t1
INNER JOIN med_medication AS T2 ON T2.medication_def_id = T1.ID
AND T2.delete_flag = '0' AND T2.status_enum = #{statusEnum}
LEFT JOIN adm_supplier AS T3
ON T3.ID = T1.supply_id
AND T3.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T5 ON T5.instance_id = T1.ID
AND T5.delete_flag = '0'
LEFT JOIN adm_organization_location AS T6
ON T6.distribution_category_code = T1.category_code
AND T6.delete_flag = '0' AND T6.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time)
WHERE T1.delete_flag = '0'
AND T2.status_enum = #{statusEnum}
<if test="pricingFlag ==1">
AND 1 = 2
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T5.instance_table = #{medicationTableName}
UNION ALL
SELECT T1.tenant_id,
2 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
T1.part_percent AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T1.SIZE AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
T2.NAME AS supplier,
T2.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T4.id AS charge_item_definition_id,
T4.instance_table AS advice_table_name,
T5.def_location_id AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM adm_device_definition AS T1
LEFT JOIN adm_supplier AS T2
ON T2.ID = T1.supply_id
AND T2.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T4 ON T4.instance_id = T1.ID
AND T4.delete_flag = '0'
LEFT JOIN adm_organization_location AS T5 ON T5.distribution_category_code = T1.category_code
AND T5.delete_flag = '0' AND T5.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T5.start_time AND T5.end_time)
WHERE T1.delete_flag = '0'
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T4.instance_table = #{deviceTableName}
AND T1.category_code = #{singleUse}
AND T1.status_enum = #{statusEnum}
UNION ALL
SELECT T1.tenant_id,
3 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
1 AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
T1.type_enum AS activity_type,
'' AS unit_code,
'' AS min_unit_code,
'' AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
'' AS supplier,
null AS supplier_id,
'' AS manufacturer,
T2.ID AS charge_item_definition_id,
T2.instance_table AS advice_table_name,
COALESCE(T3.organization_id, T1.org_id) AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM wor_activity_definition AS T1
LEFT JOIN adm_charge_item_definition AS T2
ON T2.instance_id = T1.ID
AND T2.delete_flag = '0'
LEFT JOIN adm_organization_location AS T3 ON T3.activity_definition_id = T1.ID
AND T3.delete_flag = '0' AND (CURRENT_TIME :: time (6) BETWEEN T3.start_time AND T3.end_time)
WHERE T1.delete_flag = '0'
<if test="pricingFlag ==1">
AND T1.pricing_flag = #{pricingFlag}
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T1.status_enum = #{statusEnum}
AND T2.instance_table = #{activityTableName}
</when>
<otherwise>
<!-- 当adviceTypes不为null且不为空且只包含1、2、3时根据选中的类型查询 -->
<!-- 确保至少有一个类型被选中,避免空查询 -->
<if test="adviceTypes.contains(1) or adviceTypes.contains(2) or adviceTypes.contains(3)">
<if test="adviceTypes.contains(1)">
SELECT T1.tenant_id, SELECT T1.tenant_id,
1 AS advice_type, 1 AS advice_type,
T1.category_code AS category_code, T1.category_code AS category_code,
@@ -103,11 +282,9 @@
AND T5.instance_table = #{medicationTableName} AND T5.instance_table = #{medicationTableName}
</if> </if>
<if test="adviceTypes == null or adviceTypes.contains(1)"> <if test="adviceTypes.contains(1) and (adviceTypes.contains(2) or adviceTypes.contains(3))">UNION ALL</if>
<if test="adviceTypes == null or adviceTypes.contains(2) or adviceTypes.contains(3)">UNION ALL</if>
</if>
<if test="adviceTypes == null or adviceTypes.contains(2)"> <if test="adviceTypes.contains(2)">
SELECT T1.tenant_id, SELECT T1.tenant_id,
2 AS advice_type, 2 AS advice_type,
T1.category_code AS category_code, T1.category_code AS category_code,
@@ -164,11 +341,9 @@
AND T1.status_enum = #{statusEnum} AND T1.status_enum = #{statusEnum}
</if> </if>
<if test="adviceTypes == null or adviceTypes.contains(2)"> <if test="adviceTypes.contains(2) and adviceTypes.contains(3)">UNION ALL</if>
<if test="adviceTypes == null or adviceTypes.contains(3)">UNION ALL</if>
</if>
<if test="adviceTypes == null or adviceTypes.contains(3)"> <if test="adviceTypes.contains(3)">
SELECT T1.tenant_id, SELECT T1.tenant_id,
3 AS advice_type, 3 AS advice_type,
T1.category_code AS category_code, T1.category_code AS category_code,
@@ -201,7 +376,7 @@
'' AS manufacturer, '' AS manufacturer,
T2.ID AS charge_item_definition_id, T2.ID AS charge_item_definition_id,
T2.instance_table AS advice_table_name, T2.instance_table AS advice_table_name,
T3.organization_id AS position_id, COALESCE(T3.organization_id, T1.org_id) AS position_id,
0 AS restricted_flag, 0 AS restricted_flag,
'' AS restricted_scope '' AS restricted_scope
FROM wor_activity_definition AS T1 FROM wor_activity_definition AS T1
@@ -223,6 +398,9 @@
AND T1.status_enum = #{statusEnum} AND T1.status_enum = #{statusEnum}
AND T2.instance_table = #{activityTableName} AND T2.instance_table = #{activityTableName}
</if> </if>
</if>
</otherwise>
</choose>
) AS abi ) AS abi
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>

View File

@@ -19,6 +19,7 @@
T10.type_code, T10.type_code,
T10.contract_name, T10.contract_name,
T10.org_id, T10.org_id,
T10.organization_name,
T10.register_time, T10.register_time,
T10.reception_time, T10.reception_time,
T10.practitioner_user_id, T10.practitioner_user_id,

View File

@@ -4,6 +4,8 @@
<select id="selectProductReportPage" <select id="selectProductReportPage"
resultType="com.openhis.web.reportmanage.dto.InventoryProductReportPageDto"> resultType="com.openhis.web.reportmanage.dto.InventoryProductReportPageDto">
SELECT *
FROM (
SELECT T8.id, --ID SELECT T8.id, --ID
T8.bus_no, --药品编码 T8.bus_no, --药品编码
T8.name, --药品名称 T8.name, --药品名称
@@ -23,9 +25,11 @@
T8.purpose_type_enum, --仓库类型 T8.purpose_type_enum, --仓库类型
T8.location_name, --仓库名称 T8.location_name, --仓库名称
T8.location_store_name, --货位名称 T8.location_store_name, --货位名称
T8.purpose_location_id, --仓库ID
T8.expiration_date, --有效期 T8.expiration_date, --有效期
T8.yb_no, --医保编码 T8.yb_no, --医保编码
T8.tenant_id -- 租户ID T8.tenant_id, -- 租户ID
CAST(T8.item_table AS INTEGER) AS category_type -- 项目类型(按分类编码,整型)
FROM (SELECT T1.id, --ID FROM (SELECT T1.id, --ID
T2.bus_no, --药品编码 T2.bus_no, --药品编码
T2.name, --药品名称 T2.name, --药品名称
@@ -46,6 +50,7 @@
T6.form_enum AS purpose_type_enum, --仓库类型 T6.form_enum AS purpose_type_enum, --仓库类型
T6.name AS location_name, --仓库名称 T6.name AS location_name, --仓库名称
T7.name AS location_store_name, --货位名称 T7.name AS location_store_name, --货位名称
T1.location_id AS purpose_location_id, --仓库ID
T1.expiration_date, --有效期 T1.expiration_date, --有效期
T2.yb_no, --医保编码 T2.yb_no, --医保编码
T1.tenant_id -- 租户ID T1.tenant_id -- 租户ID
@@ -86,9 +91,11 @@
T10.purpose_type_enum, --仓库类型 T10.purpose_type_enum, --仓库类型
T10.location_name, --仓库名称 T10.location_name, --仓库名称
T10.location_store_name, --货位名称 T10.location_store_name, --货位名称
T10.purpose_location_id, --仓库ID
T10.expiration_date, --有效期 T10.expiration_date, --有效期
T10.yb_no, --医保编码 T10.yb_no, --医保编码
T10.tenant_id -- 租户ID T10.tenant_id, -- 租户ID
CAST(T10.item_table AS INTEGER) AS category_type -- 项目类型(按分类编码,整型)
FROM (SELECT T1.id, --ID FROM (SELECT T1.id, --ID
T9.bus_no, --药品编码 T9.bus_no, --药品编码
T9.name, --药品名称 T9.name, --药品名称
@@ -109,6 +116,7 @@
T6.form_enum AS purpose_type_enum, --仓库类型 T6.form_enum AS purpose_type_enum, --仓库类型
T6.name AS location_name, --仓库名称 T6.name AS location_name, --仓库名称
T7.name AS location_store_name, --货位名称 T7.name AS location_store_name, --货位名称
T1.location_id AS purpose_location_id, --仓库ID
T1.expiration_date, --有效期 T1.expiration_date, --有效期
T9.yb_no, --医保编码 T9.yb_no, --医保编码
T1.tenant_id -- 租户ID T1.tenant_id -- 租户ID
@@ -129,6 +137,23 @@
ON T1.location_store_id = T7.id ON T1.location_store_id = T7.id
AND T7.delete_flag = '0' AND T7.delete_flag = '0'
WHERE T1.delete_flag = '0') AS T10 WHERE T1.delete_flag = '0') AS T10
) AS T
${ew.customSqlSegment} ${ew.customSqlSegment}
<if test="inventoryScope != null">
<choose>
<when test="inventoryScope == 2">
AND item_quantity = 0
</when>
<when test="inventoryScope == 3">
AND item_quantity > 0
</when>
<when test="inventoryScope == 4">
AND item_quantity <![CDATA[ <= ]]> 20
</when>
<when test="inventoryScope == 5">
AND item_quantity <![CDATA[ <= ]]> 50
</when>
</choose>
</if>
</select> </select>
</mapper> </mapper>

View File

@@ -142,6 +142,11 @@ public class CommonConstants {
*/ */
public interface FieldName { public interface FieldName {
/**
* 手机号
*/
String Phone = "phone";
/** /**
* 单据号 * 单据号
*/ */

View File

@@ -39,7 +39,7 @@ public enum LocationForm implements HisEnumInterface {
PHARMACY(16, "ph", "药房"), PHARMACY(16, "ph", "药房"),
WAREHOUSE (17, "wa", ""), WAREHOUSE (17, "wa", "耗材"),
DEPARTMENT (18, "de", "科室"); DEPARTMENT (18, "de", "科室");

View File

@@ -32,6 +32,11 @@
<groupId>com.openhis</groupId> <groupId>com.openhis</groupId>
<artifactId>openhis-common</artifactId> <artifactId>openhis-common</artifactId>
</dependency> </dependency>
<!-- 核心共通模块 -->
<dependency>
<groupId>com.core</groupId>
<artifactId>core-common</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@@ -0,0 +1,59 @@
package com.openhis.administration.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 发票段管理Entity实体
*
* @author system
* @date 2025-11-18
*/
@Data
@TableName("adm_invoice_segment")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class InvoiceSegment extends HisBaseEntity {
/** ID */
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/** 段ID */
private Long segmentId;
/** 开始号码 */
private String beginNumber;
/** 结束号码 */
private String endNumber;
/** 员工ID */
private Long employeeId;
/** 员工姓名 */
private String employeeName;
/** 开票员ID */
private Long invoicingStaffId;
/** 开票员姓名 */
private String invoicingStaffName;
/** 创建日期 */
private Date createDate;
/** 状态 */
private String status;
/** 备注 */
private String remark;
}

View File

@@ -0,0 +1,17 @@
package com.openhis.administration.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.administration.domain.InvoiceSegment;
/**
* 发票段管理Mapper接口
*
* @author system
* @date 2025-11-18
*/
@Repository
public interface InvoiceSegmentMapper extends BaseMapper<InvoiceSegment> {
}

View File

@@ -0,0 +1,47 @@
package com.openhis.administration.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.openhis.administration.domain.InvoiceSegment;
/**
* 发票段管理Service接口
*
* @author system
* @date 2025-11-18
*/
public interface IInvoiceSegmentService {
/**
* 分页查询发票段列表
*
* @param page 分页对象
* @param isAdmin 是否管理员
* @param userId 用户ID
* @return 分页结果
*/
Page<InvoiceSegment> selectInvoiceSegmentPage(Page<InvoiceSegment> page, boolean isAdmin, Long userId);
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 结果
*/
int insertInvoiceSegment(InvoiceSegment invoiceSegment);
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 结果
*/
int updateInvoiceSegment(InvoiceSegment invoiceSegment);
/**
* 删除发票段
*
* @param ids 发票段ID列表
* @return 结果
*/
int deleteInvoiceSegmentByIds(Long[] ids);
}

View File

@@ -1,5 +1,7 @@
package com.openhis.administration.service; package com.openhis.administration.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.Invoice; import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier; import com.openhis.administration.domain.Supplier;
@@ -18,4 +20,14 @@ public interface IInvoiceService extends IService<Invoice> {
* @return * @return
*/ */
Long addInvoice(Invoice invoice); Long addInvoice(Invoice invoice);
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param page 分页参数
* @param isAdmin 是否管理员
* @param userId 当前用户ID
* @return 发票列表
*/
IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId);
} }

View File

@@ -0,0 +1,196 @@
package com.openhis.administration.service.impl;
import java.util.List;
import java.util.Objects;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.mapper.InvoiceSegmentMapper;
import com.openhis.administration.service.IInvoiceSegmentService;
/**
* 发票段管理Service实现
*
* @author system
* @date 2025-11-18
*/
@Service
public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
@Autowired
private InvoiceSegmentMapper invoiceSegmentMapper;
/**
* 分页查询发票段列表
*/
@Override
public Page<InvoiceSegment> selectInvoiceSegmentPage(Page<InvoiceSegment> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
// 移除数据过滤限制,允许查看所有发票段数据
// 按创建时间倒序排列
queryWrapper.orderByDesc(InvoiceSegment::getCreateDate);
return invoiceSegmentMapper.selectPage(page, queryWrapper);
}
/**
* 新增发票段
*/
@Override
public int insertInvoiceSegment(InvoiceSegment invoiceSegment) {
return invoiceSegmentMapper.insert(invoiceSegment);
}
/**
* 修改发票段
*/
@Override
public int updateInvoiceSegment(InvoiceSegment invoiceSegment) {
System.out.println("===== 开始更新发票段 ====");
System.out.println("传入的invoiceSegment对象: id=" + invoiceSegment.getId() + ", segmentId=" + invoiceSegment.getSegmentId());
// 确保必填字段存在
if (invoiceSegment.getBeginNumber() == null || invoiceSegment.getEndNumber() == null) {
System.out.println("错误: beginNumber或endNumber为空无法更新");
return 0;
}
// 先尝试直接通过id更新
int rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("直接通过id更新结果: 影响行数=" + rows);
// 如果直接更新失败,尝试多种查询策略
if (rows == 0) {
// 策略1: 使用传入的id作为segmentId查询处理前端传入的keyId作为segment_id的情况
if (invoiceSegment.getId() != null) {
System.out.println("策略1: 尝试将id=" + invoiceSegment.getId() + "作为segment_id查询");
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getId());
queryWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(queryWrapper);
if (existingSegment != null) {
System.out.println("策略1成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略2: 使用传入的segmentId字段查询
if (rows == 0 && invoiceSegment.getSegmentId() != null) {
System.out.println("策略2: 尝试使用segmentId=" + invoiceSegment.getSegmentId() + "查询");
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
segmentIdWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getSegmentId());
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(segmentIdWrapper);
if (existingSegment != null) {
System.out.println("策略2成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略3: 基于业务键查询beginNumber和endNumber通常是唯一的业务组合
if (rows == 0) {
System.out.println("策略3: 尝试根据业务键查询beginNumber=" + invoiceSegment.getBeginNumber() + ", endNumber=" + invoiceSegment.getEndNumber());
LambdaQueryWrapper<InvoiceSegment> businessWrapper = new LambdaQueryWrapper<>();
businessWrapper.eq(InvoiceSegment::getBeginNumber, invoiceSegment.getBeginNumber());
businessWrapper.eq(InvoiceSegment::getEndNumber, invoiceSegment.getEndNumber());
businessWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(businessWrapper);
if (existingSegment != null) {
System.out.println("策略3成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略4: 如果是特定场景下的已知ID问题添加特殊处理逻辑
if (rows == 0) {
System.out.println("策略4: 检查是否需要特殊处理");
// 检查是否是之前日志中提到的ID问题
if ("1990329963367977000".equals(invoiceSegment.getSegmentId() + "")) {
System.out.println("检测到特殊ID模式尝试替代查询");
// 这里可以添加更具体的替代查询逻辑
}
}
// 增强调试信息:显示当前表中所有可能相关的记录
if (rows == 0) {
System.out.println("所有查询策略都失败了,显示表中相关记录:");
// 查询条件可以根据实际情况调整
LambdaQueryWrapper<InvoiceSegment> debugWrapper = new LambdaQueryWrapper<>();
debugWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
// 可以添加时间范围或其他条件来限制结果数量
debugWrapper.last("LIMIT 10");
List<InvoiceSegment> segments = invoiceSegmentMapper.selectList(debugWrapper);
for (InvoiceSegment seg : segments) {
System.out.println("记录: id=" + seg.getId() + ", segmentId=" + seg.getSegmentId() + ", beginNumber=" + seg.getBeginNumber() + ", endNumber=" + seg.getEndNumber());
}
System.out.println("提示: 请检查前端传递的ID是否与数据库中的记录匹配");
}
}
System.out.println("===== 更新发票段结束 ==== 最终结果: " + (rows > 0 ? "成功" : "失败"));
return rows;
}
/**
* 删除发票段
*/
@Override
public int deleteInvoiceSegmentByIds(Long[] ids) {
System.out.println("删除发票段IDs: " + java.util.Arrays.toString(ids));
List<Long> idList = java.util.Arrays.asList(ids);
System.out.println("删除ID列表: " + idList);
// 检查记录是否存在且未被删除 - 先尝试通过id查找
LambdaQueryWrapper<InvoiceSegment> checkWrapper = new LambdaQueryWrapper<>();
checkWrapper.in(InvoiceSegment::getId, idList);
checkWrapper.eq(InvoiceSegment::getDeleteFlag, "0"); // 检查未被删除的记录
List<InvoiceSegment> existingRecords = invoiceSegmentMapper.selectList(checkWrapper);
System.out.println("通过id检查到的未删除记录数: " + existingRecords.size());
// 如果通过id没有找到记录尝试通过segment_id查找
if (existingRecords.isEmpty()) {
System.out.println("通过id未找到记录尝试通过segment_id查找");
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
segmentIdWrapper.in(InvoiceSegment::getSegmentId, idList);
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
existingRecords = invoiceSegmentMapper.selectList(segmentIdWrapper);
System.out.println("通过segment_id检查到的未删除记录数: " + existingRecords.size());
// 如果通过segment_id找到了记录使用这些记录的id进行删除
if (!existingRecords.isEmpty()) {
List<Long> actualIds = existingRecords.stream()
.map(InvoiceSegment::getId)
.collect(java.util.stream.Collectors.toList());
System.out.println("使用实际id列表进行删除: " + actualIds);
int rows = invoiceSegmentMapper.deleteBatchIds(actualIds);
System.out.println("删除影响行数: " + rows);
return rows;
}
}
// 直接通过id删除
int rows = invoiceSegmentMapper.deleteBatchIds(idList);
System.out.println("删除影响行数: " + rows);
return rows;
}
}

View File

@@ -2,17 +2,18 @@ package com.openhis.administration.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.common.utils.SecurityUtils; import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier; import com.openhis.administration.domain.Supplier;
import com.openhis.administration.mapper.InvoiceMapper;
import com.openhis.administration.service.IInvoiceService;
import com.openhis.common.enums.SupplyStatus; import com.openhis.common.enums.SupplyStatus;
import com.openhis.workflow.domain.SupplyRequest; import com.openhis.workflow.domain.SupplyRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.mapper.InvoiceMapper;
import com.openhis.administration.service.IInvoiceService;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -30,6 +31,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
* @param invoice 发票实体 * @param invoice 发票实体
* @return * @return
*/ */
@Override
public Long addInvoice(Invoice invoice){ public Long addInvoice(Invoice invoice){
// 根据编码判断发票是否存在 // 根据编码判断发票是否存在
List<Invoice> invoices = List<Invoice> invoices =
@@ -46,4 +48,26 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
return invoice.getId(); return invoice.getId();
} }
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param page 分页参数
* @param isAdmin 是否管理员
* @param userId 当前用户ID
* @return 发票列表
*/
@Override
public IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<Invoice> queryWrapper = new LambdaQueryWrapper<>();
// 如果不是管理员,只查询当前用户创建的发票
if (!isAdmin) {
queryWrapper.eq(Invoice::getInvoicingStaffId, userId);
}
// 按创建时间降序排序
queryWrapper.orderByDesc(Invoice::getCreateTime);
return baseMapper.selectPage(page, queryWrapper);
}
} }

View File

@@ -63,7 +63,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
@Override @Override
public List<Location> getPharmacyCabinetList() { public List<Location> getPharmacyCabinetList() {
return baseMapper.selectList(new LambdaQueryWrapper<Location>().in(Location::getFormEnum, return baseMapper.selectList(new LambdaQueryWrapper<Location>().in(Location::getFormEnum,
LocationForm.CABINET.getValue(), LocationForm.PHARMACY.getValue())); LocationForm.CABINET.getValue(), LocationForm.PHARMACY.getValue(), LocationForm.WAREHOUSE.getValue()));
} }
/** /**

View File

@@ -33,7 +33,10 @@ public class PractitionerServiceImpl extends ServiceImpl<PractitionerMapper, Pra
QueryWrapper<Practitioner> queryWrapper = new QueryWrapper<>(); QueryWrapper<Practitioner> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId); queryWrapper.eq("user_id", userId);
return baseMapper.selectOne(queryWrapper); queryWrapper.orderByDesc("create_time"); // 按创建时间倒序,取最新的一条
queryWrapper.last("LIMIT 1"); // 限制只返回一条
List<Practitioner> list = baseMapper.selectList(queryWrapper);
return list != null && !list.isEmpty() ? list.get(0) : null;
} }
/** /**

View File

@@ -45,9 +45,13 @@ public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinit
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean addDisease(ConditionDefinition conditionDefinition) { public boolean addDisease(ConditionDefinition conditionDefinition) {
// 根据病种编码判断病种是否存在 // 根据病种编码判断病种是否存在
// List<ConditionDefinition> conditionDefinitions =
// conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
// .eq(ConditionDefinition::getConditionCode, conditionDefinition.getConditionCode()));
// 根据医保编码判断病种是否存在
List<ConditionDefinition> conditionDefinitions = List<ConditionDefinition> conditionDefinitions =
conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>() conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
.eq(ConditionDefinition::getConditionCode, conditionDefinition.getConditionCode())); .eq(ConditionDefinition::getYbNo,conditionDefinition.getYbNo()));
if (conditionDefinitions.size() > 0) { if (conditionDefinitions.size() > 0) {
return false; return false;
} }

View File

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity; import com.core.common.core.domain.HisBaseEntity;
@@ -102,4 +103,8 @@ public class PaymentReconciliation extends HisBaseEntity {
/** 医保清算标志 */ /** 医保清算标志 */
private Integer ybClearFlag;//默认值0 未清算 private Integer ybClearFlag;//默认值0 未清算
/** 退号/退费原因 */
@TableField("refund_reason")
private String refundReason;
} }

View File

@@ -131,13 +131,16 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
*/ */
@Override @Override
public Contract getContract(String contractNo) { public Contract getContract(String contractNo) {
// 先从缓存中查找
List<Contract> contractList = getRedisContractList(); List<Contract> contractList = getRedisContractList();
for (Contract contract : contractList) { for (Contract contract : contractList) {
if (contractNo.equals(contract.getBusNo())) { if (contractNo.equals(contract.getBusNo())) {
return contract; return contract;
} }
} }
return null;
// 缓存中找不到时直接从数据库查询支持contractNo动态变化
return getByContractNo(contractNo);
} }
/** /**

View File

@@ -85,33 +85,33 @@
</dependencies> </dependencies>
<build> <!-- <build>-->
<plugins> <!-- <plugins>-->
<plugin> <!-- <plugin>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-maven-plugin</artifactId> <!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<configuration> <!-- <configuration>-->
<fork>true</fork> <!-- 如果没有该配置devtools不会生效 --> <!-- <fork>true</fork> &lt;!&ndash; 如果没有该配置devtools不会生效 &ndash;&gt;-->
</configuration> <!-- </configuration>-->
<executions> <!-- <executions>-->
<execution> <!-- <execution>-->
<goals> <!-- <goals>-->
<goal>repackage</goal> <!-- <goal>repackage</goal>-->
</goals> <!-- </goals>-->
</execution> <!-- </execution>-->
</executions> <!-- </executions>-->
</plugin> <!-- </plugin>-->
<plugin> <!-- <plugin>-->
<groupId>org.apache.maven.plugins</groupId> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<artifactId>maven-war-plugin</artifactId> <!-- <artifactId>maven-war-plugin</artifactId>-->
<version>${maven-war-plugin.version}</version> <!-- <version>${maven-war-plugin.version}</version>-->
<configuration> <!-- <configuration>-->
<failOnMissingWebXml>false</failOnMissingWebXml> <!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
<warName>${project.artifactId}</warName> <!-- <warName>${project.artifactId}</warName>-->
</configuration> <!-- </configuration>-->
</plugin> <!-- </plugin>-->
</plugins> <!-- </plugins>-->
<finalName>${project.artifactId}</finalName> <!-- <finalName>${project.artifactId}</finalName>-->
</build> <!-- </build>-->
</project> </project>

View File

@@ -1,11 +1,11 @@
# 页面标题 # 页面标题
VITE_APP_TITLE = 医院信息管理系统 VITE_APP_TITLE=医院信息管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV = 'production' VITE_APP_ENV=production
# OpenHIS管理系统/生产环境 # OpenHIS管理系统/生产环境
VITE_APP_BASE_API = '/prod-api' VITE_APP_BASE_API=/prod-api
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS=gzip

35
openhis-ui-vue3/.env.spug Normal file
View File

@@ -0,0 +1,35 @@
# 开发环境本地只启动前端项目依赖开发环境后端、APP
# 生产环境配置
VITE_APP_ENV = 'spug'
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://192.168.110.252'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server
# OpenHIS管理系统/SPUG环境
VITE_APP_BASE_API = '/admin-api'
# 是否删除debugger
VITE_DROP_DEBUGGER=false
# 是否删除console.log
VITE_DROP_CONSOLE=false
# 是否sourcemap
VITE_SOURCEMAP=true
# 打包路径
VITE_BASE_PATH=/
# 商城H5会员端域名
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=false
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@@ -9,7 +9,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/> />
<!-- <link rel="icon" href="src/assets/images/ccu.png" /> --> <!-- <link rel="icon" href="src/assets/images/ccu.png" /> -->
<link rel="stylesheet" type="text/css" media="print" href="/public/print-lock.css"> <link rel="stylesheet" type="text/css" media="print" href="/print-lock.css">
<title>医院信息管理系统</title> <title>医院信息管理系统</title>
<!--[if lt IE 11 <!--[if lt IE 11
]><script> ]><script>

View File

@@ -13,9 +13,10 @@
"@vueup/vue-quill": "1.2.0", "@vueup/vue-quill": "1.2.0",
"@vueuse/core": "10.6.1", "@vueuse/core": "10.6.1",
"axios": "0.27.2", "axios": "0.27.2",
"chart.js": "^4.5.1",
"d3": "^7.9.0", "d3": "^7.9.0",
"decimal.js": "^10.5.0", "decimal.js": "^10.5.0",
"echarts": "5.4.3", "echarts": "^5.4.3",
"element-china-area-data": "^6.1.0", "element-china-area-data": "^6.1.0",
"element-plus": "2.9.11", "element-plus": "2.9.11",
"file-saver": "2.0.5", "file-saver": "2.0.5",
@@ -544,6 +545,11 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
}, },
"node_modules/@kurkle/color": {
"version": "0.3.4",
"resolved": "https://registry.npmmirror.com/@kurkle/color/-/color-0.3.4.tgz",
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w=="
},
"node_modules/@nodelib/fs.scandir": { "node_modules/@nodelib/fs.scandir": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -1686,6 +1692,18 @@
"url": "https://github.com/chalk/chalk?sponsor=1" "url": "https://github.com/chalk/chalk?sponsor=1"
} }
}, },
"node_modules/chart.js": {
"version": "4.5.1",
"resolved": "https://registry.npmmirror.com/chart.js/-/chart.js-4.5.1.tgz",
"integrity": "sha512-GIjfiT9dbmHRiYi6Nl2yFCq7kkwdkp1W/lp2J99rX0yo9tgJGn3lKQATztIjb5tVtevcBtIdICNWqlq5+E8/Pw==",
"license": "MIT",
"dependencies": {
"@kurkle/color": "^0.3.0"
},
"engines": {
"pnpm": ">=8"
}
},
"node_modules/china-division": { "node_modules/china-division": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/china-division/-/china-division-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/china-division/-/china-division-2.7.0.tgz",
@@ -1837,20 +1855,6 @@
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
"dev": true "dev": true
}, },
"node_modules/copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"is-what": "^3.14.1"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/copy-descriptor": { "node_modules/copy-descriptor": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
@@ -2823,20 +2827,6 @@
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
"dev": true "dev": true
}, },
"node_modules/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"prr": "~1.0.1"
},
"bin": {
"errno": "cli.js"
}
},
"node_modules/error-ex": { "node_modules/error-ex": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz",
@@ -4195,14 +4185,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/is-windows": { "node_modules/is-windows": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz",
@@ -4325,34 +4307,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/less": {
"version": "4.2.2",
"resolved": "https://registry.npmmirror.com/less/-/less-4.2.2.tgz",
"integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1",
"tslib": "^2.3.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=6"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^3.1.0",
"source-map": "~0.6.0"
}
},
"node_modules/lines-and-columns": { "node_modules/lines-and-columns": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -4432,21 +4386,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0" "@jridgewell/sourcemap-codec": "^1.5.0"
} }
}, },
"node_modules/make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"pify": "^4.0.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/map-cache": { "node_modules/map-cache": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz", "resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz",
@@ -4521,20 +4460,6 @@
"node": ">=8.6" "node": ">=8.6"
} }
}, },
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@@ -4723,24 +4648,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/needle": {
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/needle/-/needle-3.3.1.tgz",
"integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
},
"bin": {
"needle": "bin/needle"
},
"engines": {
"node": ">= 4.4.x"
}
},
"node_modules/normalize-path": { "node_modules/normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -4984,17 +4891,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">= 0.10"
}
},
"node_modules/pascalcase": { "node_modules/pascalcase": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -5045,17 +4941,6 @@
"url": "https://github.com/sponsors/jonschlinkert" "url": "https://github.com/sponsors/jonschlinkert"
} }
}, },
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=6"
}
},
"node_modules/pinia": { "node_modules/pinia": {
"version": "2.1.7", "version": "2.1.7",
"resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz", "resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz",
@@ -5290,14 +5175,6 @@
"@province-city-china/types": "8.5.8" "@province-city-china/types": "8.5.8"
} }
}, },
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/quansync": { "node_modules/quansync": {
"version": "0.2.8", "version": "0.2.8",
"resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz", "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz",
@@ -5779,14 +5656,6 @@
"node": ">=14.0.0" "node": ">=14.0.0"
} }
}, },
"node_modules/sax": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.4.1.tgz",
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/scule": { "node_modules/scule": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
@@ -5801,17 +5670,6 @@
"preval.macro": "^4.0.0" "preval.macro": "^4.0.0"
} }
}, },
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"semver": "bin/semver"
}
},
"node_modules/set-function-length": { "node_modules/set-function-length": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
@@ -7817,6 +7675,11 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
}, },
"@kurkle/color": {
"version": "0.3.4",
"resolved": "https://registry.npmmirror.com/@kurkle/color/-/color-0.3.4.tgz",
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w=="
},
"@nodelib/fs.scandir": { "@nodelib/fs.scandir": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -8634,6 +8497,14 @@
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
} }
}, },
"chart.js": {
"version": "4.5.1",
"resolved": "https://registry.npmmirror.com/chart.js/-/chart.js-4.5.1.tgz",
"integrity": "sha512-GIjfiT9dbmHRiYi6Nl2yFCq7kkwdkp1W/lp2J99rX0yo9tgJGn3lKQATztIjb5tVtevcBtIdICNWqlq5+E8/Pw==",
"requires": {
"@kurkle/color": "^0.3.0"
}
},
"china-division": { "china-division": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/china-division/-/china-division-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/china-division/-/china-division-2.7.0.tgz",
@@ -8749,17 +8620,6 @@
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
"dev": true "dev": true
}, },
"copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"is-what": "^3.14.1"
}
},
"copy-descriptor": { "copy-descriptor": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
@@ -9458,17 +9318,6 @@
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
"dev": true "dev": true
}, },
"errno": {
"version": "0.1.8",
"resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"prr": "~1.0.1"
}
},
"error-ex": { "error-ex": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz",
@@ -10443,14 +10292,6 @@
"get-intrinsic": "^1.2.6" "get-intrinsic": "^1.2.6"
} }
}, },
"is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"optional": true,
"peer": true
},
"is-windows": { "is-windows": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz",
@@ -10554,26 +10395,6 @@
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
"dev": true "dev": true
}, },
"less": {
"version": "4.2.2",
"resolved": "https://registry.npmmirror.com/less/-/less-4.2.2.tgz",
"integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^3.1.0",
"parse-node-version": "^1.0.1",
"source-map": "~0.6.0",
"tslib": "^2.3.0"
}
},
"lines-and-columns": { "lines-and-columns": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -10639,18 +10460,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0" "@jridgewell/sourcemap-codec": "^1.5.0"
} }
}, },
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
}
},
"map-cache": { "map-cache": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz", "resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz",
@@ -10707,14 +10516,6 @@
"picomatch": "^2.3.1" "picomatch": "^2.3.1"
} }
}, },
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"peer": true
},
"mime-db": { "mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@@ -10853,18 +10654,6 @@
} }
} }
}, },
"needle": {
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/needle/-/needle-3.3.1.tgz",
"integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
}
},
"normalize-path": { "normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -11045,14 +10834,6 @@
"lines-and-columns": "^1.1.6" "lines-and-columns": "^1.1.6"
} }
}, },
"parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"optional": true,
"peer": true
},
"pascalcase": { "pascalcase": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -11091,14 +10872,6 @@
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true "dev": true
}, },
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"peer": true
},
"pinia": { "pinia": {
"version": "2.1.7", "version": "2.1.7",
"resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz", "resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz",
@@ -11245,14 +11018,6 @@
"@province-city-china/types": "8.5.8" "@province-city-china/types": "8.5.8"
} }
}, },
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"dev": true,
"optional": true,
"peer": true
},
"quansync": { "quansync": {
"version": "0.2.8", "version": "0.2.8",
"resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz", "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz",
@@ -11592,14 +11357,6 @@
"source-map-js": ">=0.6.2 <2.0.0" "source-map-js": ">=0.6.2 <2.0.0"
} }
}, },
"sax": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.4.1.tgz",
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
"dev": true,
"optional": true,
"peer": true
},
"scule": { "scule": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
@@ -11614,14 +11371,6 @@
"preval.macro": "^4.0.0" "preval.macro": "^4.0.0"
} }
}, },
"semver": {
"version": "5.7.2",
"resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"optional": true,
"peer": true
},
"set-function-length": { "set-function-length": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",

View File

@@ -7,9 +7,10 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build:prod": "vite build", "build:prod": "vite build --mode production",
"build:stage": "vite build --mode staging", "build:stage": "vite build --mode staging",
"preview": "vite preview" "preview": "vite preview",
"build:spug": "vite build --mode spug"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -20,9 +21,10 @@
"@vueup/vue-quill": "1.2.0", "@vueup/vue-quill": "1.2.0",
"@vueuse/core": "10.6.1", "@vueuse/core": "10.6.1",
"axios": "0.27.2", "axios": "0.27.2",
"chart.js": "^4.5.1",
"d3": "^7.9.0", "d3": "^7.9.0",
"decimal.js": "^10.5.0", "decimal.js": "^10.5.0",
"echarts": "5.4.3", "echarts": "^5.4.3",
"element-china-area-data": "^6.1.0", "element-china-area-data": "^6.1.0",
"element-plus": "2.9.11", "element-plus": "2.9.11",
"file-saver": "2.0.5", "file-saver": "2.0.5",

View File

@@ -0,0 +1,61 @@
import request from '@/utils/request';
import { parseStrEmpty } from "@/utils/openhis";
/**
* 查询患者列表
* 完全复用门诊挂号查询患者的逻辑和API
* @param {Object} query - 查询参数
* @returns {Promise} 请求结果
*/
export function getPatientList(query) {
// 打印日志便于调试
console.log('调用患者查询API参数:', query);
// 直接复用门诊挂号模块完全相同的实现方式
// 不做额外的参数处理直接将query传递给后端
return request({
url: '/charge-manage/register/patient-metadata',
method: 'get',
params: query
});
};
/**
* 更新患者换卡信息
* @param {Object} params - 换卡参数
* @returns {Promise} 请求结果
*/
export const renewPatientCard = (params) => {
return request({
url: '/cardRenewal/card/renewal',
method: 'post',
data: params
});
};
/**
* 获取患者详情信息
* @param {string} patientId - 患者ID
* @returns {Promise} 请求结果
*/
export const getPatientInfo = (patientId) => {
return request({
url: `/cardRenewal/patient/info/${patientId}`,
method: 'get'
});
};
// 获取患者详细信息
/* export function getPatientInfo(patientId) {
return request({
url: '/cardRenewal/patient/info/' + patientId,
method: 'get'
}).catch(error => {
console.error('获取患者详细信息API调用失败:', error);
return {
code: 500,
msg: 'API调用失败',
data: {}
};
});
} */

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -44,6 +44,9 @@ import TreeSelect from '@/components/TreeSelect'
// 字典标签组件 // 字典标签组件
import DictTag from '@/components/DictTag' import DictTag from '@/components/DictTag'
// 导入请求工具
import request from './utils/request'
import { ElDialog, ElMessage } from 'element-plus'; import { ElDialog, ElMessage } from 'element-plus';
import {registerComponents} from './template'; import {registerComponents} from './template';
@@ -64,6 +67,9 @@ app.config.globalProperties.handleTree = handleTree
app.config.globalProperties.addDateRange = addDateRange app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.selectDictLabel = selectDictLabel app.config.globalProperties.selectDictLabel = selectDictLabel
app.config.globalProperties.selectDictLabels = selectDictLabels app.config.globalProperties.selectDictLabels = selectDictLabels
// 全局挂载请求实例
app.config.globalProperties.$http = request
// 全局组件挂载 // 全局组件挂载
app.component('DictTag', DictTag) app.component('DictTag', DictTag)
app.component('Pagination', Pagination) app.component('Pagination', Pagination)

View File

@@ -87,7 +87,119 @@ export const constantRoutes = [
] ]
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [ 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'
},
{
path: 'chargeConfig',
component: () => import('@/views/maintainSystem/chargeConfig/index.vue'),
name: 'ChargeConfig',
meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] }
}
]
},
{
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', path: '/system/tenant-user',
component: Layout, component: Layout,
@@ -98,7 +210,7 @@ export const dynamicRoutes = [
path: 'set/:tenantId(\\d+)', path: 'set/:tenantId(\\d+)',
component: () => import('@/views/system/tenant/setUser'), component: () => import('@/views/system/tenant/setUser'),
name: 'SetUser', name: 'SetUser',
meta: { title: '所属用户', activeMenu: '/system/basicmanage/tenant' } meta: { title: '所属用户', activeMenu: '/system/tenant' }
} }
] ]
}, },
@@ -112,7 +224,7 @@ export const dynamicRoutes = [
path: 'set/:tenantId(\\d+)', path: 'set/:tenantId(\\d+)',
component: () => import('@/views/system/tenant/setContract'), component: () => import('@/views/system/tenant/setContract'),
name: 'SetContract', name: 'SetContract',
meta: { title: '合同管理', activeMenu: '/system/basicmanage/tenant' } meta: { title: '合同管理', activeMenu: '/system/tenant' }
} }
] ]
}, },
@@ -158,6 +270,48 @@ export const dynamicRoutes = [
} }
] ]
}, },
{
path: '/monitor',
component: Layout,
redirect: '/monitor/operlog',
name: 'Monitor',
meta: { title: '系统监控', icon: 'monitor' },
children: [
{
path: 'operlog',
component: () => import('@/views/monitor/operlog/index.vue'),
name: 'Operlog',
meta: { title: '操作日志', icon: 'operlog', permissions: ['monitor:operlog:list'] }
},
{
path: 'logininfor',
component: () => import('@/views/monitor/logininfor/index.vue'),
name: 'Logininfor',
meta: { title: '登录日志', icon: 'logininfor', permissions: ['monitor:logininfor:list'] }
},
{
path: 'job',
component: () => import('@/views/monitor/job/index.vue'),
name: 'Job',
meta: { title: '定时任务', icon: 'job', permissions: ['monitor:job:list'] }
}
]
},
{
path: '/tool',
component: Layout,
redirect: '/tool/gen',
name: 'Tool',
meta: { title: '系统工具', icon: 'tool' },
children: [
{
path: 'gen',
component: () => import('@/views/tool/gen/index.vue'),
name: 'Gen',
meta: { title: '代码生成', icon: 'gen', permissions: ['tool:gen:list'] }
}
]
},
{ {
path: '/monitor/job-log', path: '/monitor/job-log',
component: Layout, component: Layout,
@@ -188,9 +342,12 @@ export const dynamicRoutes = [
} }
] ]
// 合并常量路由和动态路由,确保所有路由都能被访问
const allRoutes = [...constantRoutes, ...dynamicRoutes];
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes: constantRoutes, routes: allRoutes,
scrollBehavior(to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
if (savedPosition) { if (savedPosition) {
return savedPosition return savedPosition

View File

@@ -3,6 +3,10 @@ export default {
* 网页标题 * 网页标题
*/ */
title: import.meta.env.VITE_APP_TITLE, title: import.meta.env.VITE_APP_TITLE,
/**
* 系统名称
*/
systemName: (import.meta.env.VITE_APP_SYSTEM_NAME ? import.meta.env.VITE_APP_SYSTEM_NAME : '测试医院'),
/** /**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light * 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/ */

View File

@@ -74,7 +74,7 @@ service.interceptors.request.use(config => {
}) })
// 响应拦截器 // 响应拦截器
service.interceptors.response.use(res => { service.interceptors.response.use(res => {
// 未设置状态码则默认成功状态 // 未设置状态码则默认成功状态
const code = res.data.code || 200; const code = res.data.code || 200;
// 获取错误信息 // 获取错误信息
@@ -97,13 +97,22 @@ service.interceptors.response.use(res => {
} }
return Promise.reject('无效的会话,或者会话已过期,请重新登录。') return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) { } else if (code === 500) {
// 检查是否需要跳过错误提示
if (!res.config?.skipErrorMsg) {
ElMessage({ message: msg, type: 'error' }) ElMessage({ message: msg, type: 'error' })
}
return Promise.reject(new Error(msg)) return Promise.reject(new Error(msg))
} else if (code === 601) { } else if (code === 601) {
// 检查是否需要跳过错误提示
if (!res.config?.skipErrorMsg) {
ElMessage({ message: msg, type: 'warning' }) ElMessage({ message: msg, type: 'warning' })
}
return Promise.reject(new Error(msg)) return Promise.reject(new Error(msg))
} else if (code !== 200) { } else if (code !== 200) {
// 检查是否需要跳过错误提示
if (!res.config?.skipErrorMsg) {
ElNotification.error({ title: msg }) ElNotification.error({ title: msg })
}
return Promise.reject('error') return Promise.reject('error')
} else { } else {
return Promise.resolve(res.data) return Promise.resolve(res.data)
@@ -119,10 +128,12 @@ service.interceptors.response.use(res => {
} else if (message.includes("Request failed with status code")) { } else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常"; message = "系统接口" + message.substr(message.length - 3) + "异常";
} }
// 检查是否需要跳过错误提示
if (!error.config?.skipErrorMsg) {
ElMessage({ message: message, type: 'error', duration: 5 * 1000 }) ElMessage({ message: message, type: 'error', duration: 5 * 1000 })
return Promise.reject(error)
} }
) return Promise.reject(error)
})
// 通用下载方法 // 通用下载方法
export function download(url, params, filename, config) { export function download(url, params, filename, config) {

File diff suppressed because it is too large Load Diff

View File

@@ -41,7 +41,7 @@ export function getOrgDetail(id) {
export function initOrgTypeOption() { export function initOrgTypeOption() {
return request({ return request({
url: '/base-data-manage/organization/init', url: '/base-data-manage/organization/init',
method: 'get', method: 'get'
}) })
} }

View File

@@ -141,15 +141,7 @@
</template> </template>
<script setup name="Organization"> <script setup name="Organization">
import { import { getList, deleteOrganization, addOrganization, updateOrganization, disableOrg, initOrgTypeOption, enableOrg } from './components/api';
getList,
deleteOrganization,
addOrganization,
updateOrganization,
disableOrg,
initOrgTypeOption,
enableOrg,
} from './components/api';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const loading = ref(true); const loading = ref(true);
@@ -181,11 +173,57 @@ const rules = ref({
getPageList(); getPageList();
initOption(); initOption();
// 使用系统标准字典获取方法
const { organization_class } = proxy.useDict('organization_class');
// 统一的科室分类字典处理函数
function processOrganizationClassDict(dictData) {
return dictData.map(item => ({
value: String(item.value), // 将值转换为字符串类型,确保与表单值类型一致
info: item.label // 使用dict_label的值作为显示文本
}));
}
// 监听字典数据变化
watch(() => organization_class.value, (newVal) => {
if (newVal && newVal.length > 0) {
// 转换为组件需要的格式
classEnumOption.value = processOrganizationClassDict(newVal);
// 同步更新表格中显示的科室分类文本,确保主界面显示与字典一致
if (organization.value && organization.value.length > 0) {
organization.value = organization.value.map(item => {
// 保留原有显示文本作为基础
const originalText = item.classEnum_dictText || '';
// 获取字典中的对应文本
const dictLabel = getDictLabel(item.classEnum);
// 只有在字典中找到匹配值时才替换,否则保留原有文本
return {
...item,
classEnum_dictText: dictLabel || originalText
};
});
}
}
}, { immediate: true });
function initOption() { function initOption() {
if (orgTypeOption.value.length == 0) { if (orgTypeOption.value.length == 0) {
initOrgTypeOption().then((res) => { initOrgTypeOption().then((res) => {
orgTypeOption.value = res.data.organizationTypeOptions; orgTypeOption.value = res.data.organizationTypeOptions;
classEnumOption.value = res.data.organizationClassOptions;
// 优先使用系统标准字典数据,确保编辑和新增科室使用相同的分类字典
if (organization_class.value && organization_class.value.length > 0) {
classEnumOption.value = processOrganizationClassDict(organization_class.value);
} else if (res.data.organizationClassOptions && res.data.organizationClassOptions.length > 0) {
// 只有在字典数据不存在时才使用接口返回的数据作为备选
// 将接口返回的科室分类选项值也转换为字符串类型,保持一致性
classEnumOption.value = res.data.organizationClassOptions.map(item => ({
...item,
value: String(item.value)
}));
}
}); });
} }
} }
@@ -195,17 +233,48 @@ function reset() {
orgRef.value.resetFields(); orgRef.value.resetFields();
} }
// 从字典数据中查找对应的值,处理类型转换
function getDictLabel(value) {
if (!value || !organization_class.value || organization_class.value.length === 0) return '';
// 尝试进行类型转换比较,处理可能的字符串/数字不匹配问题
const stringValue = String(value);
const dict = organization_class.value.find(item => {
// 比较转换后的字符串值
return String(item.value) === stringValue;
});
return dict ? dict.label : '';
}
function getPageList() { function getPageList() {
loading.value = false; loading.value = false;
getList(queryParams.value).then((res) => { getList(queryParams.value).then((res) => {
organization.value = res.data.records; // 处理返回的科室数据,确保科室分类显示与系统标准字典一致
const processedData = res.data.records.map(item => {
// 保留原有显示文本作为基础
const originalText = item.classEnum_dictText || '';
// 如果系统标准字典存在,尝试使用字典中的文本覆盖原有文本
if (organization_class.value && organization_class.value.length > 0) {
const dictLabel = getDictLabel(item.classEnum);
// 只有在字典中找到匹配值时才替换,否则保留原有文本
return {
...item,
classEnum_dictText: dictLabel || originalText
};
}
return item;
});
organization.value = processedData;
total.value = res.data.total; total.value = res.data.total;
loading.value = false; loading.value = false;
}); });
} }
function handleAdd() { function handleAdd() {
title.value = '添加药库药房'; title.value = '添加科室';
open.value = true; open.value = true;
reset(); reset();
console.log(form.value); console.log(form.value);
@@ -223,7 +292,8 @@ function handelEdit(row) {
form.value.ybNo = row.ybNo; form.value.ybNo = row.ybNo;
form.value.ybName = row.ybName; form.value.ybName = row.ybName;
form.value.typeEnum = row.typeEnum; form.value.typeEnum = row.typeEnum;
form.value.classEnum = row.classEnum; // 确保科室分类值的类型正确,使其能正确匹配下拉选项中的值
form.value.classEnum = row.classEnum !== undefined ? String(row.classEnum) : undefined;
form.value.busNoParent = row.busNo.split('.').length > 1 ? row.busNo.split('.')[0] : undefined; form.value.busNoParent = row.busNo.split('.').length > 1 ? row.busNo.split('.')[0] : undefined;
}, 50); }, 50);
} }

View File

@@ -0,0 +1,101 @@
/**
* 操作日志工具
* 所有操作必须有操作日志
*/
import { addOperationLog } from './outpatientNumber'
/**
* 记录操作日志
* @param {Object} params
* @param {string} params.operation - 操作类型(新增/修改/删除/查询)
* @param {string} params.details - 操作详情
* @param {boolean} params.success - 操作是否成功
* @param {string} params.errorMessage - 错误信息
* @param {Object} params.userInfo - 用户信息
*/
export async function logOperation({ operation, details, success, errorMessage, userInfo }) {
try {
const logData = {
operation,
details,
success,
errorMessage: errorMessage || null,
timestamp: new Date().toISOString(),
userId: userInfo?.id || null,
userName: userInfo?.name || null,
}
// 控制台输出(便于调试)
console.log('[门诊号码管理] 操作日志:', logData)
// 调用后端接口记录日志(如果接口不存在,静默失败,不会抛出异常)
await addOperationLog(logData)
} catch (error) {
console.error('[门诊号码管理] 记录日志失败:', error)
}
}
/**
* 记录查询操作
*/
export function logQuery(recordCount, userInfo) {
return logOperation({
operation: '查询',
details: `查询门诊号码段列表,共 ${recordCount} 条记录`,
success: true,
userInfo
})
}
/**
* 记录新增操作
*/
export function logCreate(record, success, errorMessage, userInfo) {
const details = success
? `新增门诊号码段:${record.startNo} - ${record.endNo}(操作员:${record.operatorName}`
: `尝试新增门诊号码段:${record.startNo} - ${record.endNo},失败原因:${errorMessage}`
return logOperation({
operation: '新增',
details,
success,
errorMessage,
userInfo
})
}
/**
* 记录修改操作
*/
export function logUpdate(record, success, errorMessage, userInfo) {
const details = success
? `修改门诊号码段:${record.startNo} - ${record.endNo}ID${record.id}`
: `尝试修改门诊号码段 ID${record.id},失败原因:${errorMessage}`
return logOperation({
operation: '修改',
details,
success,
errorMessage,
userInfo
})
}
/**
* 记录删除操作
*/
export function logDelete(records, success, errorMessage, userInfo) {
const recordsInfo = records.map(r => `${r.startNo}-${r.endNo}`).join('、')
const details = success
? `删除门诊号码段(共 ${records.length} 条):${recordsInfo}`
: `尝试删除门诊号码段(共 ${records.length} 条),失败原因:${errorMessage}`
return logOperation({
operation: '删除',
details,
success,
errorMessage,
userInfo
})
}

View File

@@ -0,0 +1,74 @@
/**
* 门诊号码管理 API 接口
* 严格按照要求实现
*/
import request from '@/utils/request'
/**
* 分页查询门诊号码段列表
* 要求:普通用户只能查看自己的,管理员可以查看所有
* 注意由于后端接口不存在直接返回失败响应让调用方使用localStorage数据避免404错误
*/
export function listOutpatientNo(query) {
// return request({
// url: '/business-rule/outpatient-no/page',
// method: 'get',
// params: query,
// 由于后端接口不存在直接返回失败响应不发送实际请求避免控制台显示404错误
// 调用方会在判断 code !== 200 时使用 localStorage 数据
return Promise.resolve({
code: 404,
msg: '接口不存在,已使用本地数据',
data: null
})
}
/**
* 新增门诊号码段
* 要求:必须校验前缀一致性、长度一致性、重复检查
*/
export function addOutpatientNo(data) {
return request({
url: '/business-rule/outpatient-no',
method: 'post',
data,
})
}
/**
* 更新门诊号码段
*/
export function updateOutpatientNo(data) {
return request({
url: '/business-rule/outpatient-no',
method: 'put',
data,
})
}
/**
* 删除门诊号码段
*要求:双重校验(归属权+使用状态)
*/
export function deleteOutpatientNo(params) {
return request({
url: '/business-rule/outpatient-no',
method: 'delete',
params,
})
}
/**
* 记录操作日志
* 要求:所有操作必须有操作日志
* 注意由于后端接口不存在直接返回成功响应不发送实际请求避免404错误
*/
export function addOperationLog(data) {
// 直接返回成功响应不发送实际请求避免404错误显示在控制台
// 日志信息已经在控制台输出(在 operationLog.js 中),这里只需要确保不中断调用链
return Promise.resolve({
code: 200,
msg: '日志记录成功(接口不存在,已静默处理)',
data: null
})
}

View File

@@ -0,0 +1,863 @@
<template>
<!-- Windows XP风格窗口布局600px固定宽度 -->
<div class="outpatient-no-management-wrapper">
<div class="outpatient-no-management">
<!--标题栏32px高 -->
<div class="title-bar">
<span class="title-text">门诊号码管理</span>
</div>
<!-- 功能按钮区40px高 -->
<div class="button-bar">
<el-row :gutter="10">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="onAdd">新设(A)</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="onDelete">删除(D)</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Check" @click="() => onSave()">保存(S)</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Close" @click="onClose">关闭(X)</el-button>
</el-col>
<el-col v-if="canToggleViewAll" :span="4">
<el-switch
v-model="viewAll"
active-text="查看全部"
inactive-text="仅本人"
@change="getList"
/>
</el-col>
</el-row>
</div>
<!-- 表格内容区自适应剩余高度 -->
<div class="table-content">
<el-table
v-loading="loading"
:data="tableData"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="操作员" prop="operatorName" min-width="120" />
<el-table-column label="员工工号" prop="staffNo" min-width="120">
<template #default="{ row }">
<el-input
v-if="row._editing"
v-model.trim="row.staffNo"
/>
<span v-else>{{ row.staffNo }}</span>
</template>
</el-table-column>
<el-table-column label="领用日期" prop="receiveDate" min-width="140">
<template #default="{ row }">
<el-date-picker
v-if="row._editing"
v-model="row.receiveDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="选择日期"
style="width: 100%"
/>
<span v-else>{{ row.receiveDate }}</span>
</template>
</el-table-column>
<el-table-column label="起始号码" prop="startNo" min-width="140">
<template #default="{ row }">
<el-input
v-if="row._editing"
v-model.trim="row.startNo"
@input="() => onStartNoChange(row)"
@blur="() => validateNumField(row, 'startNo')"
/>
<span v-else>{{ row.startNo }}</span>
</template>
</el-table-column>
<el-table-column label="终止号码" prop="endNo" min-width="140">
<template #default="{ row }">
<el-input
v-if="row._editing"
v-model.trim="row.endNo"
@blur="() => validateNumField(row, 'endNo')"
/>
<span v-else>{{ row.endNo }}</span>
</template>
</el-table-column>
<el-table-column label="使用号码" prop="usedNo" min-width="140">
<template #default="{ row }">
<el-input
v-if="row._editing"
v-model.trim="row.usedNo"
@blur="() => validateNumField(row, 'usedNo')"
/>
<span v-else>{{ row.usedNo }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template #default="scope">
<el-button type="primary" link icon="Edit" @click="() => openEdit(scope.row, scope.$index)">编辑</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</div>
<!-- 编辑弹窗 -->
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="600px" append-to-body>
<el-form label-width="100px">
<el-form-item label="操作员">
<el-input v-model="editForm.operatorName" disabled />
</el-form-item>
<el-form-item label="员工工号">
<el-input v-model.trim="editForm.staffNo" />
</el-form-item>
<el-form-item label="领用日期">
<el-date-picker v-model="editForm.receiveDate" type="date" value-format="YYYY-MM-DD" style="width: 100%" />
</el-form-item>
<el-form-item label="起始号码">
<el-input v-model.trim="editForm.startNo" @blur="() => validateNumField(editForm, 'startNo')" />
</el-form-item>
<el-form-item label="终止号码">
<el-input v-model.trim="editForm.endNo" @blur="() => validateNumField(editForm, 'endNo')" />
</el-form-item>
<el-form-item label="使用号码">
<el-input v-model.trim="editForm.usedNo" @blur="() => validateNumField(editForm, 'usedNo')" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="confirmEdit"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup name="outpatientNoManagement">
import useUserStore from '@/store/modules/user'
import { getConfigKey } from '@/api/system/config'
import { logQuery, logCreate, logUpdate, logDelete } from './components/operationLog'
import { listOutpatientNo, addOutpatientNo, updateOutpatientNo, deleteOutpatientNo } from './components/outpatientNumber'
const { proxy } = getCurrentInstance()
const userStore = useUserStore()
// 获取当前用户信息(用于日志记录)
const getUserInfo = () => ({
id: userStore.id,
name: userStore.name || userStore.nickName
})
const loading = ref(false)
const tableData = ref([])
const total = ref(0)
const ids = ref([])
const multiple = ref(true)
const viewAll = ref(false)
const canToggleViewAll = ref(false)
const dialogVisible = ref(false)
const dialogTitle = ref('编辑门诊号码段')
const editIndex = ref(-1)
const editForm = reactive({
receiveDate: '',
startNo: '',
endNo: '',
usedNo: '',
operatorName: '',
staffNo: '',
})
const data = reactive({
queryParams: {
pageNo: 1,
pageSize: 10,
onlySelf: true,
},
})
const { queryParams } = toRefs(data)
initConfig()
getList()
// 解决从标签页关闭后再次进入页面空白的问题:
// 当页面被 keep-alive 缓存后再次激活,主动刷新列表
onActivated(() => {
getList()
})
async function initConfig() {
try {
const res = await getConfigKey('outpatient_no_view_all')
canToggleViewAll.value = (res?.msg === 'Y' || res?.data === 'Y')
} catch (e) {
canToggleViewAll.value = false
}
}
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id)
multiple.value = !selection.length
}
function onAdd() {
const now = new Date()
const yyyy = now.getFullYear()
const mm = String(now.getMonth() + 1).padStart(2, '0')
const dd = String(now.getDate()).padStart(2, '0')
tableData.value.push({
id: undefined,
operatorId: userStore.id,
operatorName: userStore.name || userStore.nickName,
staffNo: userStore.id,
receiveDate: `${yyyy}-${mm}-${dd}`,
startNo: '',
endNo: '',
usedNo: '',
_editing: true,
_error: false,
})
}
// 新增时,起始号码变化时自动设置使用号码为起始号码
function onStartNoChange(row) {
if (!row.id && row._editing) {
row.usedNo = row.startNo
}
}
function onClose() {
proxy.$tab.closePage()
}
function tableRowClassName({ row }) {
return row._error ? 'error-row' : ''
}
function openEdit(row, index) {
editIndex.value = index
dialogTitle.value = '编辑门诊号码段'
editForm.receiveDate = row.receiveDate
editForm.startNo = row.startNo
editForm.endNo = row.endNo
editForm.usedNo = row.usedNo
editForm.operatorName = row.operatorName
editForm.staffNo = row.staffNo
dialogVisible.value = true
}
function confirmEdit() {
const tmp = { ...tableData.value[editIndex.value], ...editForm }
if (!validateRow(tmp, editIndex.value)) return
tableData.value[editIndex.value] = {
...tableData.value[editIndex.value],
...editForm,
_dirty: true, // 标记为已修改,顶部保存时提交
}
dialogVisible.value = false
}
// 字母前缀识别规则 - 从末位往前找到第一个字母
function extractPrefix(value) {
if (!value) return ''
const chars = value.split('')
for (let i = chars.length - 1; i >= 0; i--) {
if (/[A-Za-z]/.test(chars[i])) {
return value.slice(0, i + 1) // 包含找到的字母
}
}
return ''
}
function extractTailNumber(value) {
if (!value) return NaN
const m = value.match(/(\d+)$/)
if (!m) return NaN
return parseInt(m[1], 10)
}
function lengthWithinLimit(value) {
if (!value) return false
const m = value.match(/(\d+)$/)
if (!m) return false
return m[1].length <= 12
}
function rangesOverlap(aStart, aEnd, bStart, bEnd) {
return Math.max(aStart, bStart) <= Math.min(aEnd, bEnd)
}
function alertWarn(msg) {
if (proxy.$modal && proxy.$modal.alertWarning) {
proxy.$modal.alertWarning(msg)
} else if (proxy.$message) {
proxy.$message.warning(msg)
}
}
// 校验必须以数字结尾且尾部数字长度≤12
function isTailDigitsValid(value) {
const m = String(value || '').match(/(\d+)$/)
return !!m && m[1].length <= 12
}
function validateNumField(row, field, rowIndex) {
if (!isTailDigitsValid(row[field])) {
const idxInTable = typeof rowIndex === 'number' ? rowIndex : tableData.value.indexOf(row)
const lineNo = idxInTable >= 0 ? idxInTable + 1 : (editIndex.value >= 0 ? editIndex.value + 1 : undefined)
const msg = lineNo ? `第【${lineNo}】行数据中最大位数为12位且必须以数字结尾` : '最大位数为12位且必须以数字结尾'
alertWarn(msg)
row._error = true
row._warned = row._warned || {}
row._warned[field] = true
return false
}
row._error = false
row._warned = row._warned || {}
row._warned[field] = false
return true
}
function onNumberInput(row, field) {
row._warned = row._warned || {}
const valid = isTailDigitsValid(row[field])
if (!valid && !row._warned[field]) {
alertWarn('最大位数为12位且必须以数字结尾')
row._warned[field] = true
}
if (valid) {
row._warned[field] = false
}
}
function validateRow(row, rowIndex) {
row._error = false
if (!lengthWithinLimit(row.startNo) || !lengthWithinLimit(row.endNo) || !lengthWithinLimit(row.usedNo)) {
const idxInTable = typeof rowIndex === 'number' ? rowIndex : tableData.value.indexOf(row)
const lineNo = idxInTable >= 0 ? idxInTable + 1 : (editIndex.value >= 0 ? editIndex.value + 1 : undefined)
const msg = lineNo ? `第【${lineNo}】行数据中最大位数为12位且必须以数字结尾` : '最大位数为12位且必须以数字结尾'
alertWarn(msg)
row._error = true
return false
}
if ((row.startNo?.length || 0) !== (row.endNo?.length || 0)) {
const idxInTable = typeof rowIndex === 'number' ? rowIndex : tableData.value.indexOf(row)
const lineNo = idxInTable >= 0 ? idxInTable + 1 : (editIndex.value >= 0 ? editIndex.value + 1 : undefined)
const msg = lineNo ? `第【${lineNo}】行数据中,起始号码与终止号码长度必须一致,请修改!` : '起始号码与终止号码长度必须一致'
alertWarn(msg)
row._error = true
return false
}
const p1 = extractPrefix(row.startNo)
const p2 = extractPrefix(row.endNo)
const p3 = extractPrefix(row.usedNo)
if (!(p1 === p2 && p2 === p3)) {
const idxInTable = typeof rowIndex === 'number' ? rowIndex : tableData.value.indexOf(row)
const lineNo = idxInTable >= 0 ? idxInTable + 1 : (editIndex.value >= 0 ? editIndex.value + 1 : undefined)
const msg = lineNo ? `第【${lineNo}】行数据中,门诊号码的字母前缀必须相同,请修改!` : '行数据中,门诊号码的字母前缀必须相同,请修改!'
alertWarn(msg)
row._error = true
return false
}
const sNum = extractTailNumber(row.startNo)
const eNum = extractTailNumber(row.endNo)
if (Number.isNaN(sNum) || Number.isNaN(eNum) || sNum > eNum) {
const idxInTable = typeof rowIndex === 'number' ? rowIndex : tableData.value.indexOf(row)
const lineNo = idxInTable >= 0 ? idxInTable + 1 : (editIndex.value >= 0 ? editIndex.value + 1 : undefined)
const msg = lineNo ? `第【${lineNo}】行数据中,起始/终止号码不合法` : '起始/终止号码不合法'
alertWarn(msg)
row._error = true
return false
}
// 放宽:不再强制“使用号码”必须处于起始与终止范围内
const prefix = p1
for (let i = 0; i < tableData.value.length; i++) {
const other = tableData.value[i]
// 跳过自身:当从弹窗校验时 row 为临时对象,需用下标判断
if ((typeof rowIndex === 'number' && i === rowIndex) || other === row || !other.startNo || !other.endNo) continue
if (extractPrefix(other.startNo) !== prefix) continue
const os = extractTailNumber(other.startNo)
const oe = extractTailNumber(other.endNo)
if (!Number.isNaN(os) && !Number.isNaN(oe)) {
if (rangesOverlap(sNum, eNum, os, oe)) {
const idxInTable = typeof rowIndex === 'number' ? rowIndex : tableData.value.indexOf(row)
const lineNo = idxInTable >= 0 ? idxInTable + 1 : (editIndex.value >= 0 ? editIndex.value + 1 : undefined)
const msg = lineNo ? `第【${lineNo}】行数据中,门诊号码和【${i + 1}】行的门诊号码有冲突,请修改!` : '门诊号码设置重复!'
alertWarn(msg)
row._error = true
return false
}
}
}
return true
}
function onSave(row) {
const rows = row ? [row] : tableData.value.filter(r => ids.value.includes(r.id) || r._dirty || r._editing)
if (!rows.length) return
for (const r of rows) {
const idx = tableData.value.indexOf(r)
if (!validateRow(r, idx)) return
}
// 准备保存的数据
const saveData = rows.map((r) => ({
id: r.id,
operatorId: r.operatorId,
operatorName: r.operatorName,
staffNo: r.staffNo,
receiveDate: r.receiveDate,
startNo: r.startNo,
endNo: r.endNo,
usedNo: r.usedNo,
}))
const ok = lcUpsertMany(saveData)
if (!ok) {
// 记录失败的操作日志
for (const record of saveData) {
if (record.id) {
logUpdate(record, false, '门诊号码设置重复', getUserInfo())
} else {
logCreate(record, false, '门诊号码设置重复', getUserInfo())
}
}
return
}
// 记录成功的操作日志
for (const record of saveData) {
if (record.id) {
logUpdate(record, true, null, getUserInfo())
} else {
logCreate(record, true, null, getUserInfo())
}
}
if (proxy.$modal?.alertSuccess) {
proxy.$modal.alertSuccess('保存成功!')
} else {
proxy.$message.success('保存成功')
}
getList()
}
function onDelete() {
const rows = tableData.value.filter((r) => ids.value.includes(r.id))
if (!rows.length) return
// 双重校验(归属权+使用状态)
for (const r of rows) {
const canDeleteSelf = String(r.operatorId) === String(userStore.id)
const neverUsed = r.usedNo === r.startNo
if (!canDeleteSelf) {
// 权限不足提示
alertWarn('只能删除自己维护的门诊号码段')
logDelete(rows, false, '只能删除自己维护的门诊号码段', getUserInfo())
return
}
if (!neverUsed) {
// 已使用提示
alertWarn('已有门诊号码段已有使用的门诊号码,请核对!')
logDelete(rows, false, '已有门诊号码段已有使用的门诊号码', getUserInfo())
return
}
}
const doRealDelete = () => {
lcDeleteByIds(rows.map((r) => r.id))
//记录成功的删除操作日志
logDelete(rows, true, null, getUserInfo())
if (proxy.$modal?.alertSuccess) {
proxy.$modal.alertSuccess('删除成功')
} else {
proxy.$message.success('删除成功')
}
getList()
}
if (proxy.$modal?.confirm) {
proxy.$modal.confirm('是否确认删除选中数据项?').then(doRealDelete).catch(() => {
// 用户取消删除,不记录日志
})
} else {
doRealDelete()
}
}
function getList() {
loading.value = true
queryParams.value.onlySelf = !viewAll.value
// 先尝试调用后端API
listOutpatientNo(queryParams.value).then((res) => {
if (res.code === 200) {
tableData.value = (res.data?.records || res.data || []).map((it) => ({
...it,
_editing: false,
_error: false,
_dirty: false,
}))
total.value = res.data?.total || res.data?.length || 0
// 记录查询操作日志
logQuery(total.value, getUserInfo())
} else {
// API返回错误回退到localStorage
console.warn('后端API返回错误使用localStorage数据')
loadFromLocalStorage()
}
loading.value = false
}).catch((error) => {
// API调用失败如404回退到localStorage
console.warn('后端API调用失败使用localStorage数据:', error)
loadFromLocalStorage()
})
}
// 从localStorage加载数据
function loadFromLocalStorage() {
const res = lcList({ ...queryParams.value })
tableData.value = res.records.map((it) => ({
...it,
_editing: false,
_error: false,
_dirty: false,
}))
total.value = res.total
// 记录查询操作日志
logQuery(total.value, getUserInfo())
loading.value = false
}
// 纯前端本地持久化方法localStorage
const STORAGE_KEY = 'ohis_outpatient_no_segments'
function lcReadAll() {
try {
const raw = localStorage.getItem(STORAGE_KEY)
const arr = raw ? JSON.parse(raw) : []
return Array.isArray(arr) ? arr : []
} catch (e) {
return []
}
}
function lcWriteAll(list) {
localStorage.setItem(STORAGE_KEY, JSON.stringify(list || []))
}
function lcList({ pageNo = 1, pageSize = 10, onlySelf = true }) {
const all = lcReadAll()
const filtered = onlySelf ? all.filter((x) => String(x.operatorId) === String(userStore.id)) : all
const start = (pageNo - 1) * pageSize
const end = start + pageSize
return { records: filtered.slice(start, end), total: filtered.length, all }
}
function checkOverlapAll(row, all) {
const prefix = extractPrefix(row.startNo)
const sNum = extractTailNumber(row.startNo)
const eNum = extractTailNumber(row.endNo)
for (const it of all) {
if (row.id && it.id === row.id) continue
if (!it.startNo || !it.endNo) continue
if (extractPrefix(it.startNo) !== prefix) continue
const os = extractTailNumber(it.startNo)
const oe = extractTailNumber(it.endNo)
if (!Number.isNaN(os) && !Number.isNaN(oe)) {
if (rangesOverlap(sNum, eNum, os, oe)) return true
}
}
return false
}
function lcUpsertMany(rows) {
const all = lcReadAll()
for (const r of rows) {
if (checkOverlapAll(r, all)) {
alertWarn('门诊号码设置重复!')
return false
}
if (!r.id) {
r.id = `${Date.now()}_${Math.random().toString(36).slice(2, 8)}`
}
const idx = all.findIndex((x) => x.id === r.id)
if (idx >= 0) all[idx] = { ...all[idx], ...r }
else all.push({ ...r })
}
lcWriteAll(all)
return true
}
function lcDeleteByIds(idList) {
const all = lcReadAll()
const remain = all.filter((x) => !idList.includes(x.id))
lcWriteAll(remain)
}
</script>
<style scoped>
/*Windows XP风格布局 - 全屏显示 */
/* 外层容器 - 全屏显示 */
.outpatient-no-management-wrapper {
display: flex;
justify-content: flex-start;
align-items: flex-start;
width: 100%;
height: calc(100vh - 84px);
padding: 0;
background-color: #f0f0f0;
overflow: hidden;
}
/* 主容器 - 全屏宽度和高度 */
.outpatient-no-management {
width: 100%;
height: 100%;
background-color: #D4D0C8;
border: 1px solid #000000;
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
overflow: hidden;
}
/* 标题栏32px高背景色#D4D0C8 */
.title-bar {
height: 32px;
background: linear-gradient(to bottom, #0055E5 0%, #0F3D8C 100%);
border-bottom: 1px solid #000000;
display: flex;
align-items: center;
padding: 0 8px;
}
/* 标题文本14px/700左对齐 */
.title-text {
font-size: 14px;
font-weight: 700;
color: #FFFFFF;
letter-spacing: 0.5px;
}
/* 功能按钮区40px高 */
.button-bar {
height: 40px;
background-color: #D4D0C8;
border-bottom: 1px solid #808080;
display: flex;
align-items: center;
padding: 0 8px;
}
.button-bar .el-row {
width: 100%;
}
/* 按钮样式90x32px1px边框圆角0背景色#EFEFEF */
.button-bar :deep(.el-button) {
width: 90px;
height: 32px;
border-radius: 0;
border: 1px solid #808080;
font-size: 13px;
padding: 0;
}
/* 新设按钮 - 主要操作 */
.button-bar :deep(.el-button--primary) {
background: linear-gradient(to bottom, #FFFFFF 0%, #EFEFEF 50%, #DFDFDF 100%);
color: #000000;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #808080;
border-bottom: 1px solid #808080;
}
.button-bar :deep(.el-button--primary:hover) {
background: linear-gradient(to bottom, #FFFEF8 0%, #F5F4EF 50%, #E5E4DF 100%);
}
/* 删除按钮 */
.button-bar :deep(.el-button--danger) {
background: linear-gradient(to bottom, #FFFFFF 0%, #EFEFEF 50%, #DFDFDF 100%);
color: #000000;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #808080;
border-bottom: 1px solid #808080;
}
/* 保存按钮 */
.button-bar :deep(.el-button--success) {
background: linear-gradient(to bottom, #FFFFFF 0%, #EFEFEF 50%, #DFDFDF 100%);
color: #000000;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #808080;
border-bottom: 1px solid #808080;
}
/* 关闭按钮(红色背景,白色文字) */
.button-bar :deep(.el-button--warning) {
background: linear-gradient(to bottom, #FF6B6B 0%, #EE5A5A 50%, #DD4949 100%);
color: #FFFFFF;
font-weight: 600;
border-top: 1px solid #FF9999;
border-left: 1px solid #FF9999;
border-right: 1px solid #AA3333;
border-bottom: 1px solid #AA3333;
}
.button-bar :deep(.el-button--warning:hover) {
background: linear-gradient(to bottom, #FF7B7B 0%, #FE6A6A 50%, #ED5959 100%);
}
/* 按钮禁用状态 */
.button-bar :deep(.el-button:disabled) {
background: #D4D0C8;
color: #808080;
cursor: not-allowed;
}
/*表格内容区(自适应剩余高度) */
.table-content {
flex: 1;
background-color: #FFFFFF;
padding: 8px;
overflow: auto;
min-height: 0;
display: flex;
flex-direction: column;
}
/* 表格样式1px实线边框#CCCCCC表头背景#F0F0F0 */
.table-content :deep(.el-table) {
border: 1px solid #CCCCCC;
font-size: 13px;
flex: 1;
display: flex;
flex-direction: column;
}
.table-content :deep(.el-table th) {
background: linear-gradient(to bottom, #FFFFFF 0%, #F0F0F0 100%);
border: 1px solid #CCCCCC;
color: #000000;
font-weight: 600;
font-size: 13px;
padding: 8px 4px;
}
.table-content :deep(.el-table td) {
border: 1px solid #CCCCCC;
padding: 6px 4px;
font-size: 13px;
}
.table-content :deep(.el-table__body tr:hover > td) {
background-color: #E5F3FF !important;
}
/* 错误行样式 */
:deep(.error-row) {
--el-table-tr-bg-color: #fff7e6;
}
/* 分页样式 */
.table-content :deep(.pagination-container) {
margin-top: 10px;
padding: 10px 0;
border-top: 1px solid #CCCCCC;
}
/* 输入框样式 */
.table-content :deep(.el-input__inner) {
border: 1px solid #7FB4FF;
border-radius: 0;
font-size: 13px;
}
.table-content :deep(.el-input__inner:focus) {
border: 2px solid #0055E5;
}
/* 日期选择器样式 */
.table-content :deep(.el-date-editor) {
width: 100%;
}
/* 开关样式 */
.button-bar :deep(.el-switch) {
height: 24px;
}
/* 滚动条样式Windows XP风格 */
.table-content::-webkit-scrollbar {
width: 16px;
height: 16px;
}
.table-content::-webkit-scrollbar-track {
background-color: #D4D0C8;
border: 1px solid #808080;
}
.table-content::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, #FFFFFF 0%, #EFEFEF 50%, #DFDFDF 100%);
border: 1px solid #808080;
}
.table-content::-webkit-scrollbar-thumb:hover {
background: linear-gradient(to bottom, #FFFEF8 0%, #F5F4EF 50%, #E5E4DF 100%);
}
/* 编辑弹窗样式 */
:deep(.el-dialog) {
border-radius: 0;
border: 2px solid #0055E5;
}
:deep(.el-dialog__header) {
background: linear-gradient(to bottom, #0055E5 0%, #0F3D8C 100%);
padding: 10px 15px;
margin: 0;
}
:deep(.el-dialog__title) {
color: #FFFFFF;
font-weight: 700;
font-size: 14px;
}
:deep(.el-dialog__close) {
color: #FFFFFF;
}
/* 表格容器样式调整 */
.table-content :deep(.el-table__body-wrapper) {
flex: 1;
overflow: auto;
}
</style>

View File

@@ -82,7 +82,7 @@
:class="{ 'error-border': scope.row.error }" :class="{ 'error-border': scope.row.error }"
> >
<el-option <el-option
v-for="dict in distribution_category_code" v-for="dict in med_category_code"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@@ -184,7 +184,7 @@ import {
deletePharmacyDepartment, deletePharmacyDepartment,
} from './components/pharmacyDepartment'; } from './components/pharmacyDepartment';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { distribution_category_code } = proxy.useDict('distribution_category_code'); const { med_category_code } = proxy.useDict('med_category_code');
import { nextTick } from 'vue'; import { nextTick } from 'vue';
const diagnosisTreatmentList = ref([]); const diagnosisTreatmentList = ref([]);

View File

@@ -36,8 +36,12 @@ export function updateWarehouse(data) {
// 删除 // 删除
export function deleteWarehouse(data) { export function deleteWarehouse(data) {
return request({ return request({
url: '/base-data-manage/location/location?locationId=' + data.locationId, url: '/base-data-manage/location/location',
method: 'delete', method: 'delete',
params: {
locationId: data.locationId,
busNo: data.busNo
}
}) })
} }

View File

@@ -153,7 +153,7 @@ const { proxy } = getCurrentInstance();
const loading = ref(true); const loading = ref(true);
const organization = ref([]); const organization = ref([]);
const queryParams = ref({ const queryParams = ref({
locationFormList: [11, 16], locationFormList: [11, 16, 17],
}); });
const open = ref(false); const open = ref(false);
const form = ref({ const form = ref({
@@ -173,7 +173,7 @@ const { warehous_type } = proxy.useDict('warehous_type');
const rules = ref({ const rules = ref({
busNo: [{ required: false, message: '请输入科室编号', trigger: 'change' }], busNo: [{ required: false, message: '请输入科室编号', trigger: 'change' }],
name: [ name: [
{ required: true, message: '请输入仓库名称', trigger: 'change' }, { required: true, message: '请输入', trigger: 'change' },
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' }, { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
], ],
formEnum: [{ required: true, message: '请选择仓库类型', trigger: 'change' }], formEnum: [{ required: true, message: '请选择仓库类型', trigger: 'change' }],
@@ -211,7 +211,7 @@ function resetQuery() {
} }
function handleEnable(row) { function handleEnable(row) {
enableLocation([row.id]).then((res) => { enableLocation({ locationId: row.id, busNo: row.busNo }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
proxy.$modal.msgSuccess('启用成功'); proxy.$modal.msgSuccess('启用成功');
handleQuery(); handleQuery();
@@ -220,7 +220,7 @@ function handleEnable(row) {
} }
function handleUnable(row) { function handleUnable(row) {
unableLocation([row.id]).then((res) => { unableLocation({ locationId: row.id, busNo: row.busNo }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
proxy.$modal.msgSuccess('停用成功'); proxy.$modal.msgSuccess('停用成功');
handleQuery(); handleQuery();
@@ -243,15 +243,14 @@ function getPageList() {
} }
function handleAdd() { function handleAdd() {
title.value = '添加药库药房'; title.value = '添加库房/药房/耗材库';
open.value = true; open.value = true;
editShow.value = false; editShow.value = false;
reset(); reset();
} }
function handelEdit(row) { function handelEdit(row) {
console.log(warehous_type); title.value = '编辑库房/药房/耗材库';
title.value = '编辑药库药房';
open.value = true; open.value = true;
editShow.value = true; editShow.value = true;
setTimeout(() => { setTimeout(() => {
@@ -281,7 +280,6 @@ function submitForm() {
getPageList(); getPageList();
}); });
} else { } else {
alert('456789');
updateWarehouse(form.value).then((res) => { updateWarehouse(form.value).then((res) => {
proxy.$modal.msgSuccess('操作成功'); proxy.$modal.msgSuccess('操作成功');
open.value = false; open.value = false;
@@ -294,11 +292,29 @@ function submitForm() {
// 删除 // 删除
function handelDelete(data) { function handelDelete(data) {
proxy.$modal.confirm('是否确认删除该仓库位置?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
loading.value = true; loading.value = true;
deleteWarehouse({ locationId: data.id }).then((res) => { deleteWarehouse({ locationId: data.id, busNo: data.busNo }).then((res) => {
proxy.$modal.msgSuccess('操作成功'); if (res.code === 200) {
loading.value = false; proxy.$modal.msgSuccess('删除成功');
getPageList(); getPageList();
} else {
// 检查错误信息是否与药品数据关联有关
if (res.msg && res.msg.includes('药品')) {
proxy.$modal.msgError('该仓库名称已有药品信息请核对确认');
} else {
proxy.$modal.msgError('删除失败:' + (res.msg || '未知错误'));
}
}
}).catch(() => {
proxy.$modal.msgError('删除失败');
}).finally(() => {
loading.value = false;
});
}); });
} }
// // 停用 // // 停用

View File

@@ -10,6 +10,16 @@ export function getRegistrationfeeList(query) {
}) })
} }
// 根据位置id筛选医生
export function getPractitionerMetadata(query) {
return request({
url: '/charge-manage/register/practitioner-metadata',
method: 'get',
params: query
})
}
// 查询服务管理详细 // 查询服务管理详细
export function getRegistrationfeeOne(id) { export function getRegistrationfeeOne(id) {
return request({ return request({

View File

@@ -228,6 +228,7 @@
placeholder="请选择提供部门" placeholder="请选择提供部门"
check-strictly check-strictly
clearable clearable
@change="handleDeptChange"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -279,6 +280,25 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="医生:" prop="practitionerId">
<el-select
v-model="form.practitionerId"
placeholder="医生"
clearable
style="width: 240px"
@change="setInfo"
ref="doctorRef"
>
<el-option
v-for="doctor in doctorList"
:key="doctor.id"
:label="`${doctor.name}${doctor.qualification ? ' - '+doctor.qualification : ''}${doctor.department ? ' - '+doctor.department : ''}`"
:value="doctor.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<div class="title">费用管理</div> <div class="title">费用管理</div>
<el-row> <el-row>
@@ -368,28 +388,13 @@ import {
locationTreeSelect, locationTreeSelect,
delRegistrationfee, delRegistrationfee,
getInitOption, getInitOption,
getPractitionerMetadata,
} from './components/registrationfee'; } from './components/registrationfee';
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance();
const registrationfeeRef = ref(null); // 初始化 ref const registrationfeeRef = ref(null); // 初始化 ref
const { const { proxy } = getCurrentInstance();
adm_location, const { adm_location, category_code, service_type_code, specialty_code, med_chrgitm_type, fin_type_code, yb_type,} = proxy.useDict( 'adm_location', 'category_code', 'service_type_code', 'specialty_code', 'med_chrgitm_type', 'fin_type_code', 'yb_type');
category_code,
service_type_code,
specialty_code,
med_chrgitm_type,
fin_type_code,
yb_type,
} = proxy.useDict(
'adm_location',
'category_code',
'service_type_code',
'specialty_code',
'med_chrgitm_type',
'fin_type_code',
'yb_type'
);
const registrationfeeList = ref([]); const registrationfeeList = ref([]);
const open = ref(false); const open = ref(false);
@@ -403,12 +408,19 @@ const total = ref(0);
const title = ref(''); const title = ref('');
const activeFlagOptions = ref(undefined); const activeFlagOptions = ref(undefined);
const appointmentRequiredFlagOptions = ref(undefined); const appointmentRequiredFlagOptions = ref(undefined);
const doctorList = ref([]);
const deptOptions = ref(undefined); // 部门树选项 const deptOptions = ref(undefined); // 部门树选项
const locationOptions = ref(undefined); // 地点树选项 const locationOptions = ref(undefined); // 地点树选项
// 是否停用 // 是否停用
const statusFlagOptions = ref(undefined); const statusFlagOptions = ref(undefined);
// 获取选中的医生信息
const getSelectedDoctorInfo = computed(() => {
if (!form.value.practitionerId) return null;
return doctorList.value.find(doctor => doctor.id === form.value.practitionerId) || null;
});
const data = reactive({ const data = reactive({
form: {}, form: {},
queryParams: { queryParams: {
@@ -427,7 +439,7 @@ const data = reactive({
// locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }], // locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
name: [{ required: true, message: '服务名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '服务名称不能为空', trigger: 'blur' }],
contact: [{ required: true, message: '联系人电话不能为空', trigger: 'blur' }], contact: [{ required: true, message: '联系人电话不能为空', trigger: 'blur' }],
appointmentRequiredFlag: [{ required: true, message: '预约要求不能为空', trigger: 'blur' }], practitionerId: [{ required: true, message: '医生不能为空', trigger: 'blur' }],
activeFlag: [{ required: true, message: '活动标识不能为空', trigger: 'blur' }], activeFlag: [{ required: true, message: '活动标识不能为空', trigger: 'blur' }],
chargeName: [{ required: true, message: '名称不能为空', trigger: 'blur' }], chargeName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }], description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
@@ -452,6 +464,10 @@ function getRegistrationfeeTypeList() {
console.log(response, 'response'); console.log(response, 'response');
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记 activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
appointmentRequiredFlagOptions.value = response.data.appointmentRequiredFlagOptions; // 预约必填标记 appointmentRequiredFlagOptions.value = response.data.appointmentRequiredFlagOptions; // 预约必填标记
// 获取医生列表
if (response.data.doctorList) {
doctorList.value = response.data.doctorList;
}
}); });
} }
@@ -531,9 +547,60 @@ function reset() {
ybType: undefined, ybType: undefined,
title: undefined, title: undefined,
comment: undefined, comment: undefined,
practitionerId: undefined,
doctorName: undefined
}; };
proxy.resetForm('registrationfeeRef'); proxy.resetForm('registrationfeeRef');
} }
/** 设置医生信息 */
function setInfo() {
const doctor = doctorList.value.find(item => item.id === form.value.practitionerId);
if (doctor) {
form.value.doctorName = doctor.name;
} else {
form.value.doctorName = '';
}
}
/** 科室变化时,加载对应医生 */
function handleDeptChange(orgId) {
if (!orgId) {
doctorList.value = []; // 清空医生
form.value.practitionerId = null;
return;
}
// 调用接口获取该科室下的医生
getPractitionerByOrgId(orgId);
}
/** 根据科室ID获取医生列表 */
function getPractitionerByOrgId(orgId) {
// 假设你已有类似 outpatientregistration 中的 getPractitionerMetadata 接口
// 如果 registrationfee/components/registrationfee.js 中没有,需要补充或复用
getPractitionerMetadata({ orgId }).then((response) => {
doctorList.value = response.data.records || [];
// 如果当前选中的医生不在新列表中,清空选择
if (form.value.practitionerId && !doctorList.value.some(d => d.id === form.value.practitionerId)) {
form.value.practitionerId = null;
form.value.doctorName = '';
}
// 如果医生列表不为空且没有选中的医生,默认选中第一个医生
if (doctorList.value.length > 0 && !form.value.practitionerId) {
form.value.practitionerId = doctorList.value[0].id;
form.value.doctorName = doctorList.value[0].name;
}
}).catch(() => {
doctorList.value = [];
form.value.practitionerId = null;
});
}
/** 取消按钮 */ /** 取消按钮 */
function cancel() { function cancel() {
open.value = false; open.value = false;
@@ -555,6 +622,11 @@ function handleUpdate(row) {
form.value.cwTypeCode = '1011'; form.value.cwTypeCode = '1011';
open.value = true; open.value = true;
title.value = '编辑'; title.value = '编辑';
// 当编辑时如果有科室ID自动加载对应科室的医生
if (form.value.offeredOrgId) {
getPractitionerByOrgId(form.value.offeredOrgId);
}
} }
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
@@ -639,6 +711,11 @@ function handleView(row) {
getRegistrationfeeOne(row.id).then((response) => { getRegistrationfeeOne(row.id).then((response) => {
console.log(response, 'responsebbbb', row.id); console.log(response, 'responsebbbb', row.id);
form.value = response.data; form.value = response.data;
// 当查看详情时如果有科室ID自动加载对应科室的医生
if (form.value.offeredOrgId) {
getPractitionerByOrgId(form.value.offeredOrgId);
}
}); });
} }
@@ -766,4 +843,25 @@ init();
font-size: large; font-size: large;
margin-bottom: 10px; margin-bottom: 10px;
} }
/* 医生信息显示样式 */
.selected-info {
margin-top: 8px;
padding: 10px;
background-color: #f5f7fa;
border-radius: 4px;
border: 1px solid #e4e7ed;
}
.info-item {
display: inline-block;
margin-right: 16px;
color: #606266;
font-size: 14px;
}
.info-item:first-child {
color: #303133;
font-weight: 500;
}
</style> </style>

View File

@@ -496,11 +496,12 @@ function getDeptTree() {
} }
/** 查询地点下拉树结构 */ /** 查询地点下拉树结构 */
function getLocationTree() { const getLocationTree = () => {
locationTreeSelect({ formList: '11,16' }).then((response) => { locationTreeSelect({ formList: '11,16,17' }).then((res) => {
console.log(response, 'response查询部门下拉树结构'); if (res.data && res.data.records) {
locationOptions.value = response.data.records; locationOptions.value = res.data.records
}); }
})
} }
// 显示弹框 // 显示弹框
function edit() { function edit() {

View File

@@ -48,6 +48,11 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="项目编码" prop="busNo">
<el-input v-model="form.busNo" placeholder="请输入项目编码" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
@@ -356,7 +361,7 @@ const diagnosisTreatmentList = ref([]);
const data = reactive({ const data = reactive({
form: {}, form: {},
rules: { rules: {
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }], // statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }], categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
@@ -450,6 +455,7 @@ function setValue(row) {
form.value = { form.value = {
name: formatValue(row.medicalServiceName), //医疗服务项目名称 name: formatValue(row.medicalServiceName), //医疗服务项目名称
ybNo: formatValue(row.medicalCatalogCode), // 医保编码 ybNo: formatValue(row.medicalCatalogCode), // 医保编码
busNo: formatValue(row.medicalCatalogCode), // 项目编码使用医保编码
categoryCode: props.currentCategoryEnum, categoryCode: props.currentCategoryEnum,
// chrgitmLv: formatValue( // chrgitmLv: formatValue(
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3' // row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'

View File

@@ -86,75 +86,74 @@
</el-col> --> </el-col> -->
</el-row> </el-row>
<el-table v-loading="loading" :data="diseaseList" @selection-change="handleSelectionChange"> <!-- 添加外层滚动容器确保表格可以水平滚动 -->
<div class="table-scroll-container">
<!-- 移除style="width: 100%"让Element UI表格根据内容自动调整 -->
<el-table v-loading="loading" :data="diseaseList" @selection-change="handleSelectionChange" border resizable>
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="编码" align="center" key="conditionCode" prop="conditionCode" /> <!-- 使用prop属性并设置合适的最小宽度启用列宽调整 -->
<el-table-column label="编码" align="center" prop="conditionCode" min-width="150" />
<!-- 名称列使用标准配置 -->
<el-table-column <el-table-column
label="名称" label="名称"
align="center" align="center"
key="name"
prop="name" prop="name"
:show-overflow-tooltip="true" min-width="280"
/> />
<!-- 其他列使用标准配置 -->
<el-table-column <el-table-column
label="疾病分类" label="疾病分类"
align="center" align="center"
key="sourceEnum_enumText"
prop="sourceEnum_enumText" prop="sourceEnum_enumText"
:show-overflow-tooltip="true" min-width="180"
/> />
<el-table-column <el-table-column
label="拼音助记码" label="拼音助记码"
align="center" align="center"
key="pyStr"
prop="pyStr" prop="pyStr"
:show-overflow-tooltip="true" min-width="220"
/> />
<el-table-column <el-table-column
label="类型" label="类型"
align="center" align="center"
key="typeCode_dictText"
prop="typeCode_dictText" prop="typeCode_dictText"
:show-overflow-tooltip="true" min-width="120"
/> />
<el-table-column <el-table-column
label="医保编码 " label="医保编码"
align="center" align="center"
key="ybNo"
prop="ybNo" prop="ybNo"
:show-overflow-tooltip="true" min-width="180"
/> />
<el-table-column <el-table-column
label="医保标记" label="医保标记"
align="center" align="center"
key="ybMatchFlag"
prop="ybMatchFlag_enumText" prop="ybMatchFlag_enumText"
min-width="150"
/> />
<el-table-column <el-table-column
label="医保对码标志" label="医保对码标志"
align="center" align="center"
key="ybMatchFlag"
prop="ybMatchFlag_enumText" prop="ybMatchFlag_enumText"
min-width="150"
/> />
<el-table-column <el-table-column
label="状态" label="状态"
align="center" align="center"
key="statusEnum_enumText"
prop="statusEnum_enumText" prop="statusEnum_enumText"
width="160" min-width="150"
/> />
<el-table-column <el-table-column
label="描述" label="描述"
align="center" align="center"
key="description"
prop="description" prop="description"
width="160" min-width="250"
/> />
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
width="150" min-width="120"
class-name="small-padding fixed-width" class-name="small-padding"
> >
<template #default="scope"> <template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
@@ -163,6 +162,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@@ -504,4 +504,40 @@ getList();
display: flex; display: flex;
align-items: center; align-items: center;
} }
/* 表格外层滚动容器,确保表格整体可以水平滚动 */
.table-scroll-container {
width: 100%;
overflow-x: auto;
margin-bottom: 10px;
}
/* 表格样式调整,移除默认的最大宽度限制 */
.table-scroll-container >>> .el-table {
min-width: 100%;
width: auto;
}
/* 表格外层容器的滚动条样式 */
.table-scroll-container::-webkit-scrollbar {
height: 12px;
}
.table-scroll-container::-webkit-scrollbar-thumb {
background: rgba(0, 120, 215, 0.7);
border-radius: 6px;
border: 2px solid rgba(255, 255, 255, 0.3);
transition: background-color 0.2s ease;
}
.table-scroll-container::-webkit-scrollbar-thumb:hover {
background: rgba(0, 120, 215, 0.9);
}
.table-scroll-container::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.15);
border-radius: 6px;
border: 2px solid rgba(0, 0, 0, 0.05);
}
</style> </style>

View File

@@ -854,8 +854,10 @@ function edit() {
statusRestrictedOptions.value = props.statusRestrictedOptions; statusRestrictedOptions.value = props.statusRestrictedOptions;
partAttributeEnumOptions.value = props.partAttributeEnumOptions; partAttributeEnumOptions.value = props.partAttributeEnumOptions;
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions; tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
antibioticForm.value.antibioticCode = form.value.antibioticCode; // 当后端返回null或'3'时设置为undefined使select显示为空
antibioticForm.value.restrictedEnum = form.value.restrictedEnum; antibioticForm.value.antibioticCode = form.value.antibioticCode === null || form.value.antibioticCode === '3' ? undefined : form.value.antibioticCode;
// 当后端返回null、'4'或4时设置为undefined使select显示为空
antibioticForm.value.restrictedEnum = form.value.restrictedEnum === null || form.value.restrictedEnum === '4' || form.value.restrictedEnum === 4 ? undefined : form.value.restrictedEnum;
antibioticForm.value.dose = form.value.dose; antibioticForm.value.dose = form.value.dose;
antibioticForm.value.maxUnit = form.value.maxUnit; antibioticForm.value.maxUnit = form.value.maxUnit;
antibioticForm.value.minRateCode = form.value.maxRateCode; antibioticForm.value.minRateCode = form.value.maxRateCode;
@@ -970,8 +972,9 @@ function submitForm() {
proxy.$refs['medicationRef'].validate((valid) => { proxy.$refs['medicationRef'].validate((valid) => {
if (valid) { if (valid) {
if (form.value.activeFlag == true) { if (form.value.activeFlag == true) {
form.value.antibioticCode = antibioticForm.value.antibioticCode; // 当用户清空选择时,抗生素分类设置为'3',权限级别设置为'4'
form.value.restrictedEnum = antibioticForm.value.restrictedEnum; form.value.antibioticCode = antibioticForm.value.antibioticCode === undefined ? '3' : antibioticForm.value.antibioticCode;
form.value.restrictedEnum = antibioticForm.value.restrictedEnum === undefined ? '4' : antibioticForm.value.restrictedEnum;
// form.value.dose = antibioticForm.value.dose; // form.value.dose = antibioticForm.value.dose;
// form.value.maxUnit = antibioticForm.value.maxUnit; // form.value.maxUnit = antibioticForm.value.maxUnit;
form.value.minRateCode = antibioticForm.value.minRateCode; form.value.minRateCode = antibioticForm.value.minRateCode;

View File

@@ -182,6 +182,8 @@
:paymentId="paymentId" :paymentId="paymentId"
:details="details" :details="details"
:chargedItems="chargedItems" :chargedItems="chargedItems"
:feeType="patientInfo.medfeePaymtdCode"
:medfee_paymtd_code="medfee_paymtd_code"
@refresh="getPatientList" @refresh="getPatientList"
/> />
</div> </div>
@@ -203,11 +205,13 @@ import useUserStore from '@/store/modules/user';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const userStore = useUserStore(); const userStore = useUserStore();
const { medfee_paymtd_code } = proxy.useDict('medfee_paymtd_code');
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
statusEnum: 1, statusEnum: 1,
}); });
const totalAmounts = ref(0); const totalAmounts = ref(0);
const selectedRows = ref([]); const selectedRows = ref([]);
const patientList = ref([]); const patientList = ref([]);

View File

@@ -11,7 +11,7 @@
<el-text size="large" style="display: block; margin-bottom: 15px"> <el-text size="large" style="display: block; margin-bottom: 15px">
退费日期{{ currentDate }} 退费日期{{ currentDate }}
</el-text> </el-text>
<el-text size="large">费用性质{{ '自费' }}</el-text> <el-text size="large">费用性质{{ getFeeTypeText }}</el-text>
<div class="amount-row"> <div class="amount-row">
<el-text size="large">应退金额</el-text> <el-text size="large">应退金额</el-text>
<el-text size="large" type="primary" class="amount"> <el-text size="large" type="primary" class="amount">
@@ -160,6 +160,14 @@ const props = defineProps({
type: Object, type: Object,
default: undefined, default: undefined,
}, },
medfee_paymtd_code: {
type: Array,
default: () => [],
},
feeType: {
type: String,
default: '',
},
}); });
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
@@ -324,6 +332,23 @@ const returnedAmount = computed(() => {
function close() { function close() {
emit('close'); emit('close');
} }
// 获取费用性质文本
const getFeeTypeText = computed(() => {
if (!props.medfee_paymtd_code || !Array.isArray(props.medfee_paymtd_code)) {
return '自费';
}
// 如果有feeType根据feeType查找对应的文本
if (props.feeType) {
const dict = props.medfee_paymtd_code.find(item => item.value === props.feeType);
return dict ? dict.label : '自费';
}
// 如果只有一个选项,直接返回第一个选项的文本
if (props.medfee_paymtd_code.length === 1) {
return props.medfee_paymtd_code[0].label || '自费';
}
return '自费';
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -178,6 +178,8 @@
:paymentId="paymentId" :paymentId="paymentId"
:chargeItemIds="chargeItemIdList" :chargeItemIds="chargeItemIdList"
:details="details" :details="details"
:medfee_paymtd_code="medfee_paymtd_code"
:feeType="patientInfo.medfeePaymtdCode"
/> />
</div> </div>
</template> </template>
@@ -197,6 +199,8 @@ import RefundDialog from './components/refundDialog.vue';
import Decimal from 'decimal.js'; import Decimal from 'decimal.js';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
// 获取费用性质字典
const { medfee_paymtd_code } = proxy.useDict('medfee_paymtd_code');
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,

View File

@@ -4,7 +4,7 @@
<el-text size="large" style="display: block; margin-bottom: 15px"> <el-text size="large" style="display: block; margin-bottom: 15px">
收费日期{{ currentDate }} 收费日期{{ currentDate }}
</el-text> </el-text>
<el-text size="large">费用性质{{ '自费' }}</el-text> <el-text size="large">费用性质{{ getFeeTypeText }}</el-text>
<div class="amount-row"> <div class="amount-row">
<el-text size="large">应收金额</el-text> <el-text size="large">应收金额</el-text>
<el-text size="large" type="primary" class="amount"> <el-text size="large" type="primary" class="amount">
@@ -97,6 +97,23 @@ import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vu
import { Delete } from '@element-plus/icons-vue'; import { Delete } from '@element-plus/icons-vue';
import { debounce } from 'lodash-es'; import { debounce } from 'lodash-es';
// 获取费用性质文本
const getFeeTypeText = computed(() => {
if (!props.medfee_paymtd_code || !Array.isArray(props.medfee_paymtd_code)) {
return '';
}
// 如果有feeType根据feeType查找对应的文本
if (props.feeType) {
const dict = props.medfee_paymtd_code.find(item => item.value === props.feeType);
return dict ? dict.label : '';
}
// 如果只有一个选项,直接返回第一个选项的文本
if (props.medfee_paymtd_code.length === 1) {
return props.medfee_paymtd_code[0].label || '';
}
return '';
});
const props = defineProps({ const props = defineProps({
open: { open: {
type: Boolean, type: Boolean,
@@ -130,6 +147,14 @@ const props = defineProps({
type: Object, type: Object,
default: undefined, default: undefined,
}, },
medfee_paymtd_code: {
type: Array,
default: () => [],
},
feeType: {
type: String,
default: '',
}
}); });
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
@@ -271,19 +296,17 @@ function submit() {
return; return;
} }
dialogLoading.value = true; dialogLoading.value = true;
// 根据费用性质动态设置合同编号
if (props.transformedData && props.transformedData.accountFormData) {
// 直接使用传入的feeType作为contractNo
// 如果feeType存在就使用否则使用patientInfo中的medfeePaymtdCode最后默认使用'0000'
props.transformedData.accountFormData.contractNo = props.feeType || props.patientInfo?.medfeePaymtdCode || '0000';
}
savePayment({ savePayment({
// paymentEnum: 0,
// kindEnum: 1,
// patientId: props.patientInfo.patientId,
// encounterId: props.patientInfo.encounterId,
// chargeItemIds: props.chargeItemIds,
outpatientRegistrationAddParam: props.transformedData, outpatientRegistrationAddParam: props.transformedData,
chrgBchno: props.chrgBchno, chrgBchno: props.chrgBchno,
busNo: props.registerBusNo, busNo: props.registerBusNo,
paymentDetails: formData.selfPay, paymentDetails: formData.selfPay,
// ybFlag: '0',
// eleFlag: '0',
// returnedAmount: parseFloat(returnedAmount.value),
}) })
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {

View File

@@ -214,3 +214,30 @@ export function gerPreInfo(userMaessage) {
params: userMaessage params: userMaessage
}) })
} }
/**
* 根据就诊卡号查询挂号记录
* 注意此接口可能不存在实际使用getOutpatientRegistrationCurrent接口
* 保留此函数以便将来使用目前使用getOutpatientRegistrationCurrent替代
*/
export function getRegistrationByCardNo(query) {
// 如果后端提供了专门的接口,可以取消注释使用
// return request({
// url: '/charge-manage/register/encounter-by-card',
// method: 'get',
// params: query
// })
// 暂时使用现有的接口
return getOutpatientRegistrationCurrent(query);
}
/**
* 补打挂号
*/
export function reprintRegistration(data) {
return request({
url: '/charge-manage/register/reprint',
method: 'post',
data: data
})
}

View File

@@ -1,48 +1,17 @@
<template> <template>
<!-- <div class="app-container"> --> <!-- <div class="app-container"> -->
<!-- 添加或修改对话框 --> <!-- 添加或修改对话框 -->
<el-dialog :title="title" v-model="visible" width="980px" append-to-body> <el-dialog :title="title" v-model="visible" width="1020px" append-to-body>
<el-form ref="patientRef" :model="form" :rules="rules" label-width="100px"> <el-form ref="patientRef" :model="form" :rules="rules" label-width="120px" label-position="left">
<el-row> <!-- 第一行姓名民族性别 -->
<el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name" label-width="80px">
<el-input v-model="form.name" clearable :disabled="isViewMode" /> <el-input v-model="form.name" clearable :disabled="isViewMode" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="性别" prop="genderEnum"> <el-form-item label="民族" prop="nationalityCode" label-width="80px">
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
<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="8">
<el-form-item label="活动标识" prop="tempFlag">
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode">
<el-radio v-for="dict in patient_temp_flag" :key="dict.value" :label="dict.value">
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证件号码" prop="idCard">
<el-input v-model="form.idCard" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="民族" prop="nationalityCode">
<el-select v-model="form.nationalityCode" clearable filterable :disabled="isViewMode"> <el-select v-model="form.nationalityCode" clearable filterable :disabled="isViewMode">
<el-option <el-option
v-for="item in nationality_code" v-for="item in nationality_code"
@@ -54,10 +23,22 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="卡类别" prop="typeCode"> <el-form-item label="别" prop="genderEnum" label-width="80px">
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
<el-radio :label="0">男性</el-radio>
<el-radio :label="1">女性</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<!-- 第二行证件类别证件号码*年龄 -->
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="证件类别" prop="typeCode" label-width="80px">
<el-select <el-select
v-model="form.typeCode" v-model="form.typeCode"
placeholder="卡类别" placeholder="就诊卡"
clearable clearable
:disabled="isViewMode" :disabled="isViewMode"
> >
@@ -70,23 +51,59 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="证件号码" prop="idCard" label-width="80px">
<el-input v-model="form.idCard" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年龄" prop="age" label-width="80px">
<el-input
v-model="form.age"
:disabled="isViewMode"
@input="handleAgeInput"
placeholder="请输入龄"
>
<template #suffix></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 第三行国家编码*联系方式工作单位 -->
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="国家编码" prop="countryCode" label-width="80px">
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系方式" prop="phone" label-width="80px">
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出生日期" prop="birthDate">
<el-date-picker
v-model="form.birthDate"
type="date"
placeholder="请选择出生日期"
format="YYYY年MM月DD日"
:disabled="isViewMode"
value-format="YYYY-MM-DD"
@change="handleBirthDateChange"
/>
</el-form-item>
</el-col>
</el-row>
<!-- 第三行就诊卡号国家编码出生日期 -->
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="就诊卡号" prop="identifierNo"> <el-form-item label="就诊卡号" prop="identifierNo">
<el-input v-model="form.identifierNo" clearable :disabled="isViewMode" /> <el-input v-model="form.identifierNo" clearable :disabled="isViewMode" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="国家编码" prop="countryCode">
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-col :span="6">
<el-form-item label="年龄" prop="age">
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
</el-form-item>
</el-col> -->
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="职业" prop="prfsEnum"> <el-form-item label="职业" prop="prfsEnum">
<el-select v-model="form.prfsEnum" placeholder="职业" clearable :disabled="isViewMode"> <el-select v-model="form.prfsEnum" placeholder="职业" clearable :disabled="isViewMode">
@@ -104,45 +121,8 @@
<el-input v-model="form.workCompany" clearable :disabled="isViewMode" /> <el-input v-model="form.workCompany" clearable :disabled="isViewMode" />
</el-form-item> </el-form-item>
</el-col> </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-row>
<el-row>
<el-col :span="8">
<el-form-item label="联系人" prop="linkName">
<el-input v-model="form.linkName" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
<el-col :span="8">
<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="8">
<el-form-item label="联系人电话" prop="linkRelationCode">
<el-input v-model="form.linkTelcom" clearable :disabled="isViewMode" />
</el-form-item>
</el-col>
</el-row> </el-row>
<!-- 地址选择详细地址 -->
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="地址选择" prop="addressSelect"> <el-form-item label="地址选择" prop="addressSelect">
@@ -160,12 +140,14 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="16">
<el-form-item label="详细地址" prop="address"> <el-form-item label="详细地址" prop="address">
<el-input v-model="form.address" clearable :disabled="isViewMode" /> <el-input v-model="form.address" clearable :disabled="isViewMode" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 第六行血型ABO血型RH -->
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="血型ABO" prop="bloodAbo"> <el-form-item label="血型ABO" prop="bloodAbo">
@@ -197,6 +179,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 第七行婚姻状态死亡时间 -->
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="婚姻状态" prop="maritalStatusEnum"> <el-form-item label="婚姻状态" prop="maritalStatusEnum">
@@ -215,7 +199,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="16">
<el-form-item label="死亡时间" prop="deceasedDate"> <el-form-item label="死亡时间" prop="deceasedDate">
<el-date-picker <el-date-picker
v-model="form.deceasedDate" v-model="form.deceasedDate"
@@ -228,6 +212,59 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 第八行监护人监护人关系监护人电话 -->
<el-row>
<el-col :span="8">
<el-form-item label="监护人" prop="guardianName">
<el-input v-model="form.guardianName" clearable :disabled="isViewMode" placeholder="请输入监护人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="监护人关系" prop="guardianRelation">
<el-select v-model="form.guardianRelation" 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="8">
<el-form-item label="监护人电话" prop="guardianPhone">
<el-input v-model="form.guardianPhone" clearable :disabled="isViewMode" placeholder="请输入监护人电话" />
</el-form-item>
</el-col>
</el-row>
<!-- 第九行监护人证件类型监护人证件号码 -->
<el-row>
<el-col :span="8">
<el-form-item label="监护人证件类型" prop="guardianIdType">
<el-select v-model="form.guardianIdType" placeholder="请选择" clearable :disabled="isViewMode">
<el-option label="身份证" value="id_card" />
<el-option label="护照" value="passport" />
<el-option label="其他" value="other" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="监护人证件号码" prop="guardianIdNo">
<el-input v-model="form.guardianIdNo" clearable :disabled="isViewMode" placeholder="请输入监护人证件号码" />
</el-form-item>
</el-col>
</el-row>
<!-- 第十行监护人地址 -->
<el-row>
<el-col :span="24">
<el-form-item label="监护人地址" prop="guardianAddress">
<el-input v-model="form.guardianAddress" clearable :disabled="isViewMode" placeholder="请输入监护人详细地址" />
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
@@ -286,19 +323,117 @@ const title = ref('新增患者');
const visible = ref(false); const visible = ref(false);
const emits = defineEmits(['submit']); // 声明自定义事件 const emits = defineEmits(['submit']); // 声明自定义事件
const validateUniquePatient = (rule, value, callback) => {
const { name, idCard } = form.value;
// 确保姓名和身份证都已填写且身份证为18位
if (!name || !idCard || idCard.length !== 18) {
return callback(); // 不满足条件,不校验
}
// 使用 axios 直接请求,避免依赖 proxy.$http
import('@/utils/request').then(({ default: request }) => {
request({
url: '/patient-manage/information/check-exists',
method: 'get',
params: {
name: name,
idCardNo: idCard
}
}).then(res => {
if (res.code === 200 && res.data === true) {
callback(new Error('该患者档案已存在!'));
} else {
callback();
}
}).catch(error => {
console.error('校验患者是否存在失败:', error);
callback(); // 出错时不阻塞表单
});
});
};
// 身份证号码校验函数
const validateIdCard = (rule, value, callback) => {
if (!value) {
callback();
return;
}
// 18位身份证正则
const reg = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/;
if (!reg.test(value)) {
return callback(new Error('请输入正确的18位身份证号码'));
}
// 校验码验证第18位
const factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
const parity = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
let sum = 0;
for (let i = 0; i < 17; i++) {
sum += parseInt(value.charAt(i)) * factor[i];
}
const last = parity[sum % 11];
if (last !== value.charAt(17).toUpperCase()) {
return callback(new Error('身份证校验码错误'));
}
callback(); // 校验通过
}
// 监护人信息条件验证函数
const validateGuardianInfo = (rule, value, callback) => {
// 只有当年龄小于18岁时才验证监护人信息
if (form.value.age) {
// 提取年龄数字部分
const ageMatch = form.value.age.toString().match(/\d+/);
if (ageMatch) {
const age = parseInt(ageMatch[0]);
// 如果年龄小于18岁监护人信息必须填写
if (age < 18 && !value) {
return callback(new Error('年龄小于18岁的患者必须填写监护人信息'));
}
}
}
// 18岁及以上患者或年龄未填写时跳过验证
callback();
}
const data = reactive({ const data = reactive({
isViewMode: false, isViewMode: false,
form: { form: {
typeCode: '08', typeCode: '08',
birthDate: undefined,
age: undefined,
}, },
rules: { rules: {
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }], name: [{ required: true, message: '姓名不能为空', trigger: 'change' },
{ validator: validateUniquePatient, trigger: 'blur' }
],
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }], genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }], age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }], phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
identifierNo: [{ required: true, message: '就诊卡号不能为空', trigger: 'change' }],
idCard: [
{ required: false, message: '证件号码不能为空', trigger: 'change' },
{ validator: validateIdCard, trigger: 'blur' },
{ validator: validateUniquePatient, trigger: 'blur' }
],
birthDate: [{ required: false, message: '请选择出生日期', trigger: 'change' }],
// 监护人信息条件验证规则
guardianName: [{ validator: validateGuardianInfo, trigger: 'blur' }],
guardianRelation: [{ validator: validateGuardianInfo, trigger: 'blur' }],
guardianPhone: [{ validator: validateGuardianInfo, trigger: 'blur' }],
guardianIdNo: [{ validator: validateGuardianInfo, trigger: 'blur' }],
}, },
}); });
const { queryParams, form, rules, isViewMode } = toRefs(data); const { queryParams, form, rules, isViewMode } = toRefs(data);
const props = defineProps({ const props = defineProps({
@@ -308,6 +443,46 @@ const props = defineProps({
}, },
}); });
// 处理出生日期变化,自动计算年龄
function handleBirthDateChange() {
if (form.value.birthDate) {
const birthDate = new Date(form.value.birthDate);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
// 计算精确年龄
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
form.value.age = age;
}
}
// 处理年龄输入,自动计算出生日期
function handleAgeInput() {
// 提取数字部分
const ageMatch = form.value.age.match(/\d+/);
if (ageMatch) {
const age = parseInt(ageMatch[0]);
// 移除非数字字符,保留数字和可能的单位
form.value.age = age ;
// 计算出生日期
const today = new Date();
const birthYear = today.getFullYear() - age;
const birthMonth = today.getMonth();
const birthDay = today.getDate();
const birthDate = new Date(birthYear, birthMonth, birthDay);
// 格式化为YYYY-MM-DD
const formattedBirthDate = birthDate.toISOString().split('T')[0];
form.value.birthDate = formattedBirthDate;
}
}
watch( watch(
() => form.value.idCard, () => form.value.idCard,
(newIdCard) => { (newIdCard) => {
@@ -315,7 +490,8 @@ watch(
const birthYear = parseInt(newIdCard.substring(6, 10)); const birthYear = parseInt(newIdCard.substring(6, 10));
const birthMonth = parseInt(newIdCard.substring(10, 12)); const birthMonth = parseInt(newIdCard.substring(10, 12));
const birthDay = parseInt(newIdCard.substring(12, 14)); const birthDay = parseInt(newIdCard.substring(12, 14));
// 设置出生日期
form.value.birthDate = `${birthYear}-${birthMonth.toString().padStart(2, '0')}-${birthDay.toString().padStart(2, '0')}`;
const today = new Date(); const today = new Date();
const currentYear = today.getFullYear(); const currentYear = today.getFullYear();
const currentMonth = today.getMonth() + 1; const currentMonth = today.getMonth() + 1;
@@ -331,7 +507,7 @@ watch(
age--; age--;
} }
form.value.age = age; form.value.age = age ;
} }
} }
); );
@@ -424,6 +600,7 @@ function reset() {
maritalStatusEnum: undefined, maritalStatusEnum: undefined,
busNo: undefined, busNo: undefined,
organizationId: undefined, organizationId: undefined,
birthDate: undefined,
}; };
proxy.resetForm('patientRef'); proxy.resetForm('patientRef');
} }
@@ -438,13 +615,16 @@ function submitForm() {
form.value.idCard.toString().substring(12, 14); form.value.idCard.toString().substring(12, 14);
console.log(form.value.birthDate, 123); console.log(form.value.birthDate, 123);
} }
// 进行表单验证
proxy.$refs['patientRef'].validate((valid) => { proxy.$refs['patientRef'].validate((valid) => {
if (valid) { if (valid) {
// 使用 // 提交表单前的处理
if (!form.value.identifierNo) { if (!form.value.identifierNo) {
form.value.typeCode = undefined; form.value.typeCode = undefined;
} }
form.value.address = getAddress(form); form.value.address = getAddress(form);
// 提交新增患者请求
addPatient(form.value).then((response) => { addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功'); proxy.$modal.msgSuccess('新增成功');
getPatientInfo(response.data.idCard); getPatientInfo(response.data.idCard);
@@ -490,4 +670,12 @@ defineExpose({
line-height: 1.2; /* 调整行间距 */ line-height: 1.2; /* 调整行间距 */
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */ margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
} }
/* 防止表单标签换行 */
:deep(.el-form-item__label) {
white-space: nowrap;
overflow: visible;
text-overflow: clip;
width: 120px;
}
</style> </style>

View File

@@ -49,9 +49,12 @@
label="年龄" label="年龄"
align="center" align="center"
key="age" key="age"
prop="age"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> >
<template #default="scope">
{{ scope.row.age ? `${scope.row.age}` : '-' }}
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"

View File

@@ -7,10 +7,15 @@
@cell-click="clickRow" @cell-click="clickRow"
> >
<el-table-column label="姓名" align="center" prop="name" /> <el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="就诊卡号" align="center" prop="identifierNo" />
<el-table-column label="性别" align="center" prop="genderEnum_enumText" /> <el-table-column label="性别" align="center" prop="genderEnum_enumText" />
<el-table-column label="证件号" align="center" prop="idCard" /> <el-table-column label="证件号" align="center" prop="idCard" />
<el-table-column label="联系电话" align="center" prop="phone" /> <el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="年龄" align="center" prop="age" /> <el-table-column label="年龄" align="center">
<template #default="scope">
{{ scope.row.age ? `${scope.row.age}` : '-' }}
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>

View File

@@ -11,7 +11,7 @@
<el-text size="large" style="display: block; margin-bottom: 15px"> <el-text size="large" style="display: block; margin-bottom: 15px">
退费日期{{ currentDate }} 退费日期{{ currentDate }}
</el-text> </el-text>
<el-text size="large">费用性质{{ '自费' }}</el-text> <el-text size="large">费用性质{{ getFeeTypeText }}</el-text>
<div class="amount-row"> <div class="amount-row">
<el-text size="large">应退金额</el-text> <el-text size="large">应退金额</el-text>
<el-text size="large" type="primary" class="amount"> <el-text size="large" type="primary" class="amount">
@@ -111,6 +111,24 @@
import { cancelRegister } from './outpatientregistration'; import { cancelRegister } from './outpatientregistration';
import { computed, watch, reactive, ref, getCurrentInstance } from 'vue'; import { computed, watch, reactive, ref, getCurrentInstance } from 'vue';
import { Delete } from '@element-plus/icons-vue'; import { Delete } from '@element-plus/icons-vue';
import useUserStore from '@/store/modules/user';
import { formatDateStr } from '@/utils/index';
// 获取费用性质文本
const getFeeTypeText = computed(() => {
// 优先使用从挂号记录传递过来的费用性质名称
if (props.contractName) {
return props.contractName;
}
// 如果没有传递名称,则根据费用性质代码查找
if (props.feeType && props.medfee_paymtd_code && Array.isArray(props.medfee_paymtd_code)) {
const dictItem = props.medfee_paymtd_code.find(item => item.value === props.feeType);
return dictItem ? dictItem.label : '自费';
}
return '自费'; // 默认值
});
const props = defineProps({ const props = defineProps({
open: { open: {
@@ -135,10 +153,27 @@ const props = defineProps({
type: [], type: [],
default: [], default: [],
}, },
medfee_paymtd_code: {
type: Array,
default: () => [],
},
feeType: {
type: String,
default: '',
},
contractName: {
type: String,
default: '', // 新增:接收费用性质名称
},
registerInfo: {
type: Object,
default: () => ({}), // 原挂号记录信息
}
}); });
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const reason = ref(''); const reason = ref('');
const userStore = useUserStore();
const formData = reactive({ const formData = reactive({
totalAmount: 0, totalAmount: 0,
@@ -167,6 +202,17 @@ function submit() {
proxy.$modal.msgError('请输入正确的金额'); proxy.$modal.msgError('请输入正确的金额');
return; return;
} }
// 获取当前时间作为退号操作日期
const returnDate = formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
// 获取当前用户信息作为操作工号
const operatorId = userStore.id || userStore.name || '';
const operatorName = userStore.name || userStore.nickName || '';
// 计算退款总金额
const refundAmount = formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
cancelRegister({ cancelRegister({
paymentEnum: 0, paymentEnum: 0,
kindEnum: 1, kindEnum: 1,
@@ -178,6 +224,18 @@ function submit() {
reason: reason.value, reason: reason.value,
ybFlag: '1', ybFlag: '1',
eleFlag: '0', eleFlag: '0',
// 退号操作记录信息
returnDate: returnDate, // 退号操作日期
operatorId: operatorId, // 退号操作工号用户ID
operatorName: operatorName, // 退号操作人姓名
refundAmount: refundAmount, // 退款金额
// 原挂号信息
registerTime: props.registerInfo?.registerTime || '', // 原挂号时间
registerAmount: props.registerInfo?.totalPrice || props.totalAmount, // 原挂号金额
// 患者信息
patientName: props.registerInfo?.patientName || '', // 患者姓名
patientAge: props.registerInfo?.age || '', // 患者年龄
patientGender: props.registerInfo?.genderEnum_enumText || '', // 患者性别
// returnedAmount: parseFloat(returnedAmount.value), // returnedAmount: parseFloat(returnedAmount.value),
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {

View File

@@ -0,0 +1,400 @@
<template>
<el-dialog title="补打挂号" v-model="dialogVisible" width="900px" append-to-body destroy-on-close>
<div v-loading="loading">
<!-- 搜索区域 -->
<el-form :model="searchForm" :inline="true" style="margin-bottom: 20px">
<el-form-item label="就诊卡号:">
<el-input
v-model="searchForm.cardNo"
placeholder="请输入就诊卡号"
style="width: 240px"
clearable
@keyup.enter="handleSearch"
>
<template #append>
<el-button icon="Search" @click="handleSearch" />
</template>
</el-input>
</el-form-item>
</el-form>
<!-- 挂号记录列表 -->
<el-table
v-if="registrationList.length > 0"
:data="registrationList"
border
max-height="300"
highlight-current-row
@row-click="handleRowClick"
style="margin-bottom: 20px"
>
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column label="患者姓名" prop="patientName" width="120" align="center" />
<el-table-column label="就诊卡号" prop="identifierNo" width="150" align="center">
<template #default="scope">
<!-- 优化就诊卡号显示尝试多种可能的字段 -->
{{ getCardNoDisplay(scope.row) }}
</template>
</el-table-column>
<el-table-column label="就诊科室" prop="organizationName" align="center" />
<el-table-column label="医生" prop="practitionerName" width="120" align="center" />
<el-table-column label="挂号费" prop="price" width="100" align="center">
<template #default="scope">
{{ (scope.row.price || scope.row.registrationFee) ? parseFloat(scope.row.price || scope.row.registrationFee).toFixed(2) + ' 元' : '0.00 元' }}
</template>
</el-table-column>
<el-table-column label="诊疗费" prop="activityPrice" width="100" align="center">
<template #default="scope">
{{ (scope.row.activityPrice || scope.row.diagnosisFee) ? parseFloat(scope.row.activityPrice || scope.row.diagnosisFee).toFixed(2) + ' 元' : '0.00 元' }}
</template>
</el-table-column>
<el-table-column label="总金额" prop="totalPrice" width="100" align="center">
<template #default="scope">
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '0.00 元' }}
</template>
</el-table-column>
<el-table-column label="挂号时间" prop="registerTime" width="180" align="center">
<template #default="scope">
<span>{{ parseTime(scope.row.registerTime) }}</span>
</template>
</el-table-column>
</el-table>
<el-empty v-if="!loading && registrationList.length === 0 && hasSearched" description="未找到挂号记录" />
<!-- 补打挂号表单 -->
<el-divider>补打信息</el-divider>
<el-form :model="form" :rules="rules" ref="reprintFormRef" label-width="120px">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="就诊卡号:" prop="cardNo">
<el-input v-model="form.cardNo" placeholder="就诊卡号" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="姓名:" prop="name">
<el-input v-model="form.name" placeholder="姓名" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="就诊科室:" prop="organizationName">
<el-input v-model="form.organizationName" placeholder="就诊科室" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="医生:" prop="practitionerName">
<el-input v-model="form.practitionerName" placeholder="医生" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="挂号费:" prop="price">
<el-input v-model="form.price" placeholder="挂号费" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="诊疗费:" prop="activityPrice">
<el-input v-model="form.activityPrice" placeholder="诊疗费" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总金额:" prop="totalPrice">
<el-input v-model="form.totalPrice" placeholder="总金额" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="就诊时间:" prop="visitTime">
<el-date-picker
v-model="form.visitTime"
type="datetime"
placeholder="就诊时间"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleSubmit" :disabled="loading || !form.cardNo"> </el-button>
<el-button @click="handleCancel" :disabled="loading"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ref, reactive, getCurrentInstance, watch } from 'vue';
import { getOutpatientRegistrationCurrent, getOutpatientRegistrationList, reprintRegistration } from './outpatientregistration';
import { parseTime } from '@/utils/his';
import { formatDateStr } from '@/utils/index';
const { proxy } = getCurrentInstance();
const props = defineProps({
open: {
type: Boolean,
default: false,
},
});
const emit = defineEmits(['close']);
const dialogVisible = ref(false);
const loading = ref(false);
const hasSearched = ref(false);
const registrationList = ref([]);
const reprintFormRef = ref(null);
const searchForm = reactive({
cardNo: '',
});
const form = reactive({
cardNo: '',
name: '',
organizationName: '',
practitionerName: '',
price: '',
activityPrice: '',
totalPrice: '',
visitTime: '',
encounterId: '',
});
const rules = {
cardNo: [{ required: true, message: '就诊卡号不能为空', trigger: 'blur' }],
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
organizationName: [{ required: true, message: '就诊科室不能为空', trigger: 'blur' }],
practitionerName: [{ required: true, message: '医生不能为空', trigger: 'blur' }],
};
// 监听open属性变化
watch(
() => props.open,
(newVal) => {
dialogVisible.value = newVal;
if (newVal) {
// 打开对话框时重置表单
resetForm();
resetSearch();
}
}
);
// 监听dialogVisible变化同步到父组件
watch(dialogVisible, (newVal) => {
if (!newVal) {
emit('close');
}
});
// 获取就诊卡号用于显示
function getCardNoDisplay(row) {
// 调试信息,打印所有可能的卡号字段
console.log('解析卡号字段:', {
identifierNo: row.identifierNo,
cardNo: row.cardNo,
patientId: row.patientId,
encounterNo: row.encounterNo,
visitNo: row.visitNo,
patient: row.patient ? {
identifierNo: row.patient.identifierNo,
cardNo: row.patient.cardNo
} : null
});
// 尝试所有可能的卡号字段
const cardNo =
row.identifierNo ||
row.cardNo ||
(row.patient && (row.patient.identifierNo || row.patient.cardNo)) ||
row.encounterNo ||
row.visitNo ||
'-';
return cardNo;
}
// 搜索挂号记录
async function handleSearch() {
if (!searchForm.cardNo) {
proxy.$modal.msgWarning('请输入就诊卡号');
return;
}
loading.value = true;
hasSearched.value = true;
registrationList.value = [];
try {
// 简化搜索逻辑直接使用就诊卡号作为searchKey查询
const endDate = new Date();
const startDate = new Date();
startDate.setFullYear(startDate.getFullYear() - 1);
const queryParams = {
pageNo: 1,
pageSize: 100,
registerTimeSTime: formatDateStr(startDate, 'YYYY-MM-DD') + ' 00:00:00',
registerTimeETime: formatDateStr(endDate, 'YYYY-MM-DD') + ' 23:59:59',
searchKey: searchForm.cardNo // 直接使用就诊卡号作为搜索关键字
};
console.log('搜索参数:', queryParams);
// 调用API查询挂号记录
const response = await getOutpatientRegistrationCurrent(queryParams);
if (response.code === 200) {
let records = response.data.records || response.data || [];
console.log('查询到的挂号记录数量:', records.length);
// 记录原始数据用于调试
if (records.length > 0) {
console.log('查询到的记录详情:', records.map(r => ({
id: r.id || r.encounterId,
identifierNo: r.identifierNo,
cardNo: r.cardNo,
patientName: r.patientName || r.name,
patient: r.patient
})));
}
// 显示所有查询到的记录,不进行严格过滤
registrationList.value = records;
if (records.length === 0) {
proxy.$modal.msgWarning('未查询到相关挂号记录,请检查就诊卡号是否正确');
}
} else {
proxy.$modal.msgWarning('查询失败: ' + (response.msg || '接口返回异常'));
}
} catch (error) {
console.error('查询挂号记录异常:', error);
proxy.$modal.msgError('查询出错: ' + (error.message || '网络异常'));
} finally {
loading.value = false;
}
}
// 点击表格行,自动填充表单
function handleRowClick(row) {
console.log('点击的记录:', row);
// 使用getCardNoDisplay函数获取就诊卡号确保与表格显示一致
const cardNo = getCardNoDisplay(row);
form.cardNo = cardNo !== '-' ? cardNo : '';
// 其他表单字段填充
form.name = row.patientName || row.name || (row.patient ? row.patient.name : '') || '';
form.organizationName = row.organizationName || '';
form.practitionerName = row.practitionerName || '';
// 价格相关字段
form.price = row.price ? parseFloat(row.price).toFixed(2) : (row.registrationFee ? parseFloat(row.registrationFee).toFixed(2) : '0.00');
form.activityPrice = row.activityPrice ? parseFloat(row.activityPrice).toFixed(2) : (row.diagnosisFee ? parseFloat(row.diagnosisFee).toFixed(2) : '0.00');
form.totalPrice = row.totalPrice ? parseFloat(row.totalPrice).toFixed(2) : '0.00';
// 就诊时间设置为当前时间
const now = new Date();
form.visitTime = formatDateTime(now);
form.encounterId = row.encounterId || row.id || '';
console.log('填充的表单数据:', form);
}
// 格式化日期时间
function formatDateTime(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
// 提交补打挂号
function handleSubmit() {
reprintFormRef.value.validate((valid) => {
if (valid) {
loading.value = true;
const submitData = {
encounterId: form.encounterId,
cardNo: form.cardNo,
name: form.name,
organizationName: form.organizationName,
practitionerName: form.practitionerName,
price: parseFloat(form.price),
activityPrice: parseFloat(form.activityPrice),
totalPrice: parseFloat(form.totalPrice),
visitTime: form.visitTime,
};
reprintRegistration(submitData)
.then((res) => {
if (res.code === 200) {
proxy.$modal.msgSuccess('补打挂号成功');
emit('close', 'success');
dialogVisible.value = false;
} else {
proxy.$modal.msgError(res.msg || '补打挂号失败');
}
})
.catch((error) => {
console.error('补打挂号失败:', error);
proxy.$modal.msgError('补打挂号失败');
})
.finally(() => {
loading.value = false;
});
}
});
}
// 取消
function handleCancel() {
dialogVisible.value = false;
}
// 重置表单
function resetForm() {
Object.assign(form, {
cardNo: '',
name: '',
organizationName: '',
practitionerName: '',
price: '',
activityPrice: '',
totalPrice: '',
visitTime: '',
encounterId: '',
});
if (reprintFormRef.value) {
reprintFormRef.value.clearValidate();
}
}
// 重置搜索
function resetSearch() {
searchForm.cardNo = '';
registrationList.value = [];
hasSearched.value = false;
}
</script>
<style scoped>
.dialog-footer {
text-align: right;
}
</style>

View File

@@ -3,11 +3,26 @@
<el-row> <el-row>
<el-col :span="24" class="card-box"> <el-col :span="24" class="card-box">
<el-card> <el-card>
<template #header> <span style="vertical-align: middle">门诊挂号</span></template> <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">
<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>
<el-button type="primary" plain @click="handleReadCard('01')" size="small">电子凭证</el-button>
<el-button type="primary" plain @click="handleReadCard('02')" size="small" :disabled="true">身份证</el-button>
<el-button type="primary" plain @click="handleReadCard('03')" size="small">医保卡</el-button>
<el-button type="warning" plain icon="CircleClose" @click="handleClear" size="small">清空</el-button>
<el-button type="primary" icon="Plus" @click="handleAdd" size="small">保存挂号</el-button>
<el-button type="success" icon="Printer" @click="handleReprint" size="small">补打挂号</el-button>
</div>
</div>
</template>
<el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px"> <el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="5"> <el-col :span="5">
<el-form-item label="病历号/姓名:" prop="searchKey"> <el-form-item label="患者身份信息:" prop="searchKey">
<el-popover <el-popover
:popper-style="{ padding: '0' }" :popper-style="{ padding: '0' }"
placement="bottom-start" placement="bottom-start"
@@ -22,50 +37,12 @@
@blur="handleBlur" @blur="handleBlur"
@input="handleSearchPatient" @input="handleSearchPatient"
v-model="form.searchKey" v-model="form.searchKey"
placeholder="请输入姓名/拼音/身份证" placeholder="请输入姓名/身份证/就诊卡号"
/> />
</template> </template>
</el-popover> </el-popover>
</el-form-item> </el-form-item>
</el-col> </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"
:disabled="true"
>
身份证
</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-col :span="5">
<el-form-item label="姓名:" prop="name"> <el-form-item label="姓名:" prop="name">
<el-input v-model="form.name" placeholder="姓名" :disabled="true" /> <el-input v-model="form.name" placeholder="姓名" :disabled="true" />
@@ -88,8 +65,8 @@
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="5"> <el-col :span="5">
<el-form-item label="卡号:" prop="card"> <el-form-item label="就诊卡号:" prop="card">
<el-input v-model="form.card" placeholder="" :disabled="true" /> <el-input v-model="form.identifierNo" placeholder="" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -162,10 +139,10 @@
ref="contractNameRef" ref="contractNameRef"
> >
<el-option <el-option
v-for="item in contractList" v-for="dict in medfee_paymtd_code"
:key="item.busNo" :key="dict.value"
:label="item.contractName" :label="dict.label"
:value="item.busNo" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -350,33 +327,12 @@
<el-input v-model="form.totalPrice" placeholder="" :disabled="true" /> <el-input v-model="form.totalPrice" placeholder="" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" style="text-align: right"> </el-row>
<el-button type="warning" plain icon="CircleClose" @click="handleClear" <el-row :gutter="24" justify="end">
>清空</el-button <el-col :span="5" style="text-align: right">
> <!-- 功能按钮已移至标题区域 -->
<el-button type="primary" plain icon="Plus" @click="handleAdd">保存挂号</el-button>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row :gutter="24" justify="end">
<el-col :span="5" style="text-align: right">
<el-button
type="warning"
plain
icon="CircleClose"
@click="handleClear"
v-hasPermi="['system:user:export']"
>清空</el-button
>
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:user:add']"
>添加</el-button
>
</el-col>
</el-row> -->
</el-form> </el-form>
</el-card> </el-card>
</el-col> </el-col>
@@ -385,7 +341,14 @@
<el-col :span="24" class="card-box"> <el-col :span="24" class="card-box">
<el-card> <el-card>
<template #header> <template #header>
<div style="display: flex; align-items: center; justify-content: space-between;">
<span style="vertical-align: middle">当日已挂号</span> <span style="vertical-align: middle">当日已挂号</span>
<el-radio-group v-model="queryType" @change="handleQueryTypeChange" size="small">
<el-radio-button label="all">全部</el-radio-button>
<el-radio-button label="normal">正常挂号</el-radio-button>
<el-radio-button label="returned">退号记录</el-radio-button>
</el-radio-group>
</div>
</template> </template>
<el-input <el-input
v-model="queryParams.searchKey" v-model="queryParams.searchKey"
@@ -439,7 +402,11 @@
prop="patientName" prop="patientName"
width="120" width="120"
/> />
<el-table-column label="年龄" align="center" key="age" prop="age" width="120" /> <el-table-column label="年龄" align="center" key="age" prop="age" width="120">
<template #default="scope">
{{ scope.row.age ? `${scope.row.age}` : '-' }}
</template>
</el-table-column>
<el-table-column <el-table-column
label="患者性别" label="患者性别"
align="center" align="center"
@@ -478,7 +445,8 @@
align="center" align="center"
key="contractName" key="contractName"
prop="contractName" prop="contractName"
/> >
</el-table-column>
<el-table-column label="挂号金额" align="center" key="totalPrice" prop="totalPrice"> <el-table-column label="挂号金额" align="center" key="totalPrice" prop="totalPrice">
<template #default="scope"> <template #default="scope">
<span> <span>
@@ -540,28 +508,98 @@
<span>{{ parseTime(scope.row.registerTime) }}</span> <span>{{ parseTime(scope.row.registerTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" key="registerTime" prop="registerTime"> <!-- 退号记录相关列 -->
<el-table-column
v-if="queryType === 'returned'"
label="退号日期/时间"
align="center"
key="returnDate"
prop="returnDate"
width="180"
>
<template #default="scope">
<span>{{ scope.row.returnDate ? parseTime(scope.row.returnDate) : '-' }}</span>
</template>
</el-table-column>
<el-table-column
v-if="queryType === 'returned'"
label="退号原因"
align="center"
key="returnReason"
prop="returnReason"
width="200"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ scope.row.returnReason || '-' }}</span>
</template>
</el-table-column>
<el-table-column
v-if="queryType === 'returned'"
label="退号操作人"
align="center"
key="operatorName"
prop="operatorName"
width="120"
>
<template #default="scope">
<span>{{ scope.row.operatorName || '-' }}</span>
</template>
</el-table-column>
<el-table-column
v-if="queryType === 'returned'"
label="退号操作工号"
align="center"
key="operatorId"
prop="operatorId"
width="120"
>
<template #default="scope">
<span>{{ scope.row.operatorId || '-' }}</span>
</template>
</el-table-column>
<el-table-column
v-if="queryType === 'returned'"
label="退款金额"
align="center"
key="refundAmount"
prop="refundAmount"
width="120"
>
<template #default="scope">
<span>{{ scope.row.refundAmount ? scope.row.refundAmount.toFixed(2) + ' 元' : '-' }}</span>
</template>
</el-table-column>
<el-table-column
v-if="queryType === 'returned'"
label="退款方式"
align="center"
key="refundMethod"
prop="refundMethod"
width="150"
>
<template #default="scope">
<span>{{ scope.row.refundMethod || '-' }}</span>
</template>
</el-table-column>
<!-- 操作列只在全部和正常挂号标签页显示退号记录标签页不显示 -->
<el-table-column
v-if="queryType !== 'returned'"
label="操作"
align="center"
width="120"
fixed="right"
>
<template #default="scope"> <template #default="scope">
<!-- <el-tooltip
:content="
scope.row.statusEnum == 6
? '已退号'
: scope.row.statusEnum == 2
? '已接诊,不允许退号'
: ''
"
placement="top"
:disabled="scope.row.statusEnum != 6"
> -->
<el-button <el-button
link link
type="primary" type="primary"
:disabled="scope.row.statusEnum === 6 || scope.row.statusEnum !== 1"
:title="getReturnTooltip(scope.row)"
@click="handleReturn(scope.row)" @click="handleReturn(scope.row)"
:disabled="scope.row.statusEnum == 6"
> >
退号 退号
</el-button> </el-button>
<!-- </el-tooltip> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -593,6 +631,8 @@
:transformedData="transformedData" :transformedData="transformedData"
:chrgBchno="chrgBchno" :chrgBchno="chrgBchno"
:registerBusNo="registerBusNo" :registerBusNo="registerBusNo"
:feeType="(patientInfo && patientInfo.medfeePaymtdCode) || (form && form.value && form.value.contractNo) || ''"
:medfee_paymtd_code="medfee_paymtd_code"
/> />
<RefundDialog <RefundDialog
:open="openRefundDialog" :open="openRefundDialog"
@@ -609,6 +649,21 @@
:patientInfo="patientInfo" :patientInfo="patientInfo"
:paymentId="paymentId" :paymentId="paymentId"
:chargeItemIds="chargeItemIdList" :chargeItemIds="chargeItemIdList"
:feeType="patientInfo.medfeePaymtdCode || ''"
:contractName="patientInfo.contractName || ''"
:medfee_paymtd_code="medfee_paymtd_code"
:registerInfo="registerInfo"
/>
<ReprintDialog
:open="openReprintDialog"
@close="
(value) => {
if (value == 'success') {
getList();
}
openReprintDialog = false;
}
"
/> />
</div> </div>
</template> </template>
@@ -633,21 +688,29 @@ import { invokeYbPlugin } from '@/api/public';
import patientInfoDialog from './components/patientInfoDialog'; import patientInfoDialog from './components/patientInfoDialog';
import PatientAddDialog from './components/patientAddDialog'; import PatientAddDialog from './components/patientAddDialog';
import patientList from './components/patientList'; import patientList from './components/patientList';
import { nextTick, ref } from 'vue'; import { nextTick, ref, onMounted, onUnmounted } from 'vue';
import ChargeDialog from './components/chargeDialog.vue'; import ChargeDialog from './components/chargeDialog.vue';
import RefundDialog from './components/refundDialog.vue'; import RefundDialog from './components/refundDialog.vue';
import ReprintDialog from './components/reprintDialog.vue';
import { handleColor } from '@/utils/his'; import { handleColor } from '@/utils/his';
import useUserStore from '@/store/modules/user'; import useUserStore from '@/store/modules/user';
import { formatDate, formatDateStr } from '@/utils/index'; import { formatDate, formatDateStr } from '@/utils/index';
const patientInfo = ref({}); const patientInfo = ref({});
// 跳转到患者档案管理页面
const goToPatientRecord = () => {
// 使用Vue Router进行路由导航在当前页面打开新的路由层级
router.push('/system/basicmanage/patientmanagement');
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_normal_disable, sys_user_sex, med_chrgitm_type } = proxy.useDict( const { sys_normal_disable, sys_user_sex, med_chrgitm_type,medfee_paymtd_code } = proxy.useDict(
'sys_normal_disable', 'sys_normal_disable',
'sys_user_sex', 'sys_user_sex',
'med_chrgitm_type' 'med_chrgitm_type',
'medfee_paymtd_code'
); );
const outpatientRegistrationList = ref([]); const outpatientRegistrationList = ref([]);
@@ -677,11 +740,14 @@ const doctorRef = ref(null);
const ybTypeRef = ref(null); const ybTypeRef = ref(null);
const openDialog = ref(false); const openDialog = ref(false);
const openRefundDialog = ref(false); const openRefundDialog = ref(false);
const openReprintDialog = ref(false);
const totalAmount = ref(0); const totalAmount = ref(0);
const chargeItemIdList = ref([]); const chargeItemIdList = ref([]);
const chrgBchnoList = ref([]); const chrgBchnoList = ref([]);
const paymentId = ref(''); const paymentId = ref('');
const loadingText = ref(''); const loadingText = ref('');
const registerInfo = ref({}); // 原挂号记录信息
const queryType = ref('all'); // 查询类型all-全部, normal-正常挂号, returned-退号记录
// 使用 ref 定义查询所得用户信息数据 // 使用 ref 定义查询所得用户信息数据
const patientInfoList = ref(undefined); const patientInfoList = ref(undefined);
@@ -789,6 +855,15 @@ onUnmounted(() => {
const { queryParams, form, rules } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
/** 根据contractNo获取费用性质名称 */
function getFeeTypeName(contractNo) {
if (!contractNo || !medfee_paymtd_code || !Array.isArray(medfee_paymtd_code)) {
return '';
}
const dictItem = medfee_paymtd_code.find(item => item.value === contractNo);
return dictItem ? dictItem.label : '';
}
/** 初期所用数据查询 */ /** 初期所用数据查询 */
function getInitData() { function getInitData() {
getInit().then((response) => { getInit().then((response) => {
@@ -1005,6 +1080,12 @@ function getList() {
loading.value = false; loading.value = false;
outpatientRegistrationList.value = res.data.records; outpatientRegistrationList.value = res.data.records;
total.value = res.data.total; total.value = res.data.total;
// 调试:查看返回的数据结构(仅退号记录查询时)
if (queryType.value === 'returned' && res.data.records && res.data.records.length > 0) {
console.log('退号记录数据结构:', res.data.records[0]);
console.log('所有字段:', Object.keys(res.data.records[0]));
}
}); });
} }
@@ -1086,11 +1167,38 @@ function handleClear() {
reset(); reset();
} }
/** 查询类型切换 */
function handleQueryTypeChange() {
queryParams.value.pageNo = 1;
// 根据查询类型设置状态筛选
if (queryType.value === 'returned') {
// 查询退号记录状态为6
queryParams.value.statusEnum = 6;
} else if (queryType.value === 'normal') {
// 查询正常挂号(排除退号状态)
queryParams.value.statusEnum = -1; // 使用特殊值表示排除退号记录
} else {
// 查询全部
queryParams.value.statusEnum = undefined;
}
handleQuery();
}
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
queryParams.value.pageNo = 1; queryParams.value.pageNo = 1;
queryParams.value.registerTimeSTime = dateRange.value[0] + ' 00:00:00'; queryParams.value.registerTimeSTime = dateRange.value[0] + ' 00:00:00';
queryParams.value.registerTimeETime = dateRange.value[1] + ' 23:59:59'; queryParams.value.registerTimeETime = dateRange.value[1] + ' 23:59:59';
// 根据查询类型设置状态筛选
if (queryType.value === 'returned') {
queryParams.value.statusEnum = 6; // 退号状态
} else if (queryType.value === 'normal') {
// 正常挂号,排除退号记录
queryParams.value.statusEnum = -1; // 使用特殊值表示排除退号记录
} else {
// 全部
queryParams.value.statusEnum = undefined;
}
getList(); getList();
} }
@@ -1138,6 +1246,7 @@ function handleAdd() {
console.log(transformedData, 'transformedData门诊挂号'); console.log(transformedData, 'transformedData门诊挂号');
chargeItemIdList.value = []; chargeItemIdList.value = [];
patientInfo.value.patientId = form.value.patientId; patientInfo.value.patientId = form.value.patientId;
patientInfo.value.medfeePaymtdCode = form.value.contractNo; // 设置费用性质
proxy.$refs['outpatientRegistrationRef'].validate((valid) => { proxy.$refs['outpatientRegistrationRef'].validate((valid) => {
if (valid) { if (valid) {
readCardLoading.value = true; readCardLoading.value = true;
@@ -1148,7 +1257,10 @@ function handleAdd() {
addOutpatientRegistration(transformedData.value) addOutpatientRegistration(transformedData.value)
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
// proxy.$modal.msgSuccess('挂号成功'); console.log('挂号成功,返回数据:', res.data);
// 立即刷新列表,确保挂号信息显示在当日已挂号列表中
getList();
chrgBchno.value = res.data.chrgBchno; chrgBchno.value = res.data.chrgBchno;
registerBusNo.value = res.data.busNo; registerBusNo.value = res.data.busNo;
totalAmount.value = res.data.psnCashPay; totalAmount.value = res.data.psnCashPay;
@@ -1203,14 +1315,47 @@ function handleSearchPatient(value) {
patientSearchKey.value = value; patientSearchKey.value = value;
} }
function getReturnTooltip(row) {
if (!row) {
return '';
}
if (row.statusEnum == 6) {
return '已退号';
}
if (row.statusEnum != 1) {
return '该患者医生已接诊,不能退号!';
}
return '';
}
function handleReturn(row) { function handleReturn(row) {
if (row.statusEnum != 1) {
proxy.$modal.msgError('该患者医生已接诊,不能退号!');
return;
}
openRefundDialog.value = true; openRefundDialog.value = true;
patientInfo.value.patientId = row.patientId; patientInfo.value.patientId = row.patientId;
patientInfo.value.encounterId = row.encounterId; patientInfo.value.encounterId = row.encounterId;
totalAmount.value = row.totalPrice; totalAmount.value = row.totalPrice;
chargeItemIdList.value = row.chargeItemIds.split(','); chargeItemIdList.value = row.chargeItemIds.split(',');
paymentId.value = row.paymentId; paymentId.value = row.paymentId;
console.log(paymentId.value); // 从挂号记录中获取正确的费用性质
patientInfo.value.medfeePaymtdCode = row.contractNo; // 使用挂号记录中的费用性质代码
patientInfo.value.contractName = row.contractName; // 保存费用性质名称用于显示
// 保存完整的原挂号记录信息,用于退号记录
registerInfo.value = {
...row, // 保存完整的挂号记录
patientName: row.patientName,
age: row.age,
genderEnum_enumText: row.genderEnum_enumText,
registerTime: row.registerTime,
totalPrice: row.totalPrice,
encounterId: row.encounterId,
patientId: row.patientId,
};
console.log('退号费用性质:', row.contractNo, row.contractName);
} }
function handleReturnRegister() { function handleReturnRegister() {
@@ -1222,6 +1367,11 @@ function handleReturnRegister() {
}); });
} }
/** 打开补打挂号对话框 */
function handleReprint() {
openReprintDialog.value = true;
}
/** /**
* 点击患者列表给表单赋值 * 点击患者列表给表单赋值
*/ */
@@ -1235,6 +1385,7 @@ function selsectPatient(row) {
form.value.phone = row.phone; form.value.phone = row.phone;
form.value.firstEnum_enumText = row.firstEnum_enumText; form.value.firstEnum_enumText = row.firstEnum_enumText;
form.value.age = row.age; form.value.age = row.age;
form.value.identifierNo = row.identifierNo;
} }
// 设置新增参数 // 设置新增参数
@@ -1318,4 +1469,10 @@ getLocationInfo();
margin-bottom: 0; /* 去掉默认的 margin-bottom */ margin-bottom: 0; /* 去掉默认的 margin-bottom */
margin-left: 8px; /* 图标和下拉选之间的间距 */ margin-left: 8px; /* 图标和下拉选之间的间距 */
} }
/* 标题区域按钮样式 */
.header-buttons {
display: flex;
gap: 8px;
}
</style> </style>

View File

@@ -0,0 +1,42 @@
import request from '@/utils/request'
/**
* 执行患者换卡操作
* @param {Object} params - 换卡参数
* @param {string} params.oldCardNo - 旧门诊号码
* @param {string} params.newCardNo - 新门诊号码
* @param {string} params.patientId - 患者ID
* @param {string} params.reason - 换卡原因
* @param {string} params.remark - 备注信息
* @returns {Promise} 请求结果
*/
export const doCardRenewal = (params) => {
return request({
url: '/charge/patientCardRenewal/renewCard',
method: 'post',
data: params
})
}
/**
* 查询患者信息 - 复用门诊挂号的API
* @param {Object} params - 查询参数
* @param {string} params.searchKey - 搜索关键字(姓名、身份证号、手机号等)
* @param {number} params.pageNo - 当前页码
* @param {number} params.pageSize - 每页大小
* @returns {Promise} 请求结果
*/
export const getPatientList = (params) => {
// 构建searchKey参数将姓名、身份证号、手机号组合成一个搜索关键字
const searchKey = params.patientName || params.idCard || params.phoneNumber || '';
return request({
url: '/charge-manage/register/patient-metadata',
method: 'get',
params: {
searchKey: searchKey,
pageNo: params.pageNo || 1,
pageSize: params.pageSize || 10
}
})
}

View File

@@ -0,0 +1,765 @@
<template>
<div class="card-renewal-container">
<!-- 标题栏 -->
<div class="title-bar">
<h2>换卡处理</h2>
</div>
<!-- 按钮栏 - 修改为水平排放 -->
<div class="button-bar">
<el-button
type="primary"
size="large"
@click="handlePatientSearch"
:loading="loading"
icon="el-icon-search"
style="min-width: 140px;"
>
病人查询(Q)
</el-button>
<el-button
type="success"
size="large"
@click="handleConfirm"
:loading="loading"
:disabled="!patientInfo"
style="min-width: 140px;"
>
确定 (O)
</el-button>
<el-button
type="danger"
size="large"
@click="handleClose"
:disabled="loading"
style="min-width: 140px;"
>
关闭 (C)
</el-button>
</div>
<!-- 查询条件 -->
<div class="search-section">
<el-row :gutter="20">
<el-col :span="8">
<div class="input-item">
<label>病人姓名:</label>
<el-input
v-model="searchForm.patientName"
placeholder="请输入"
@keyup.enter="handlePatientSearch"
clearable
/>
</div>
</el-col>
<el-col :span="8">
<div class="input-item">
<label>身份证号码:</label>
<el-input
v-model="searchForm.idCard"
placeholder="请输入"
@keyup.enter="handlePatientSearch"
clearable
/>
</div>
</el-col>
<el-col :span="8">
<div class="input-item">
<label>手机号码:</label>
<el-input
v-model="searchForm.phoneNumber"
placeholder="请输入"
@keyup.enter="handlePatientSearch"
clearable
/>
</div>
</el-col>
</el-row>
</div>
<!-- 患者信息显示 -->
<div class="patient-info-section">
<el-row :gutter="20">
<el-col :span="8">
<div class="info-item">
<label>门诊号码</label>
<div class="info-value">{{ patientInfo?.outpatientNo || '' }}</div>
</div>
</el-col>
<el-col :span="8">
<div class="info-item">
<label>病人姓名</label>
<div class="info-value">{{ patientInfo?.patientName || '' }}</div>
</div>
</el-col>
<el-col :span="8">
<div class="info-item">
<label>身份证号码</label>
<div class="info-value">{{ patientInfo?.idCard || '' }}</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 15px;">
<el-col :span="8">
<div class="info-item">
<label>手机号码</label>
<div class="info-value">{{ patientInfo?.phoneNumber || '' }}</div>
</div>
</el-col>
<el-col :span="8">
<div class="info-item">
<label>性别</label>
<div class="info-value">{{ patientInfo?.gender || '' }}</div>
</div>
</el-col>
<el-col :span="8">
<div class="info-item">
<label>年龄</label>
<div class="info-value">{{ patientInfo?.age || '' }}</div>
</div>
</el-col>
</el-row>
</div>
<!-- 新门诊号码输入 -->
<div class="new-number-section">
<div class="input-item">
<label>新门诊号码:</label>
<el-input
v-model="renewalForm.newOutpatientNo"
placeholder="请输入新门诊号码"
@keyup.enter="handleConfirm"
style="width: 250px;"
/>
</div>
</div>
<!-- 按钮区域已移除 -->
<!-- 患者列表对话框 -->
<el-dialog
v-model="showPatientList"
:title="null"
width="800px"
:close-on-click-modal="false"
class="custom-patient-dialog"
>
<!-- 自定义标题栏和按钮区域 -->
<template #header>
<div style="width: 100%; background-color: #e6f4ff;">
<!-- 标题行 -->
<div style="display: flex; justify-content: flex-start; align-items: center; padding: 10px 20px;">
<h3 style="margin: 0; font-size: 16px; font-weight: 500; color: #303133;">病人档案查询</h3>
</div>
<!-- 按钮行 -->
<div style="display: flex; justify-content: flex-start; gap: 10px; padding: 10px 20px; background-color: #e6f4ff;">
<el-button type="primary" @click="confirmSelectPatient" style="background-color: #409eff; border-color: #409eff; padding: 8px 16px; font-size: 14px;">确认(Q)</el-button>
<el-button @click="showPatientList = false; selectedPatient = null" style="background-color: #f56c6c; border-color: #f56c6c; color: white; padding: 8px 16px; font-size: 14px;">关闭(C)</el-button>
</div>
</div>
</template>
<el-table
:data="patientList"
style="width: 100%"
@row-click="selectPatient"
:row-key="row => row.identifierNo || row.patientId || row.cardNo"
:current-row-key="selectedPatient?.identifierNo || selectedPatient?.patientId || selectedPatient?.cardNo"
highlight-current-row
>
<el-table-column label="序号" width="60" type="index">
</el-table-column>
<el-table-column label="病人姓名" width="120">
<template #default="scope">
{{ scope.row.patientName || scope.row.name || '-' }}
</template>
</el-table-column>
<el-table-column label="门诊号码" width="120">
<template #default="scope">
{{ scope.row.identifierNo || scope.row.cardNo || scope.row.card_number || scope.row.就诊卡号 || scope.row.outpatientNumber || scope.row.outpatientNo || scope.row.门诊号码 || scope.row.卡号 || scope.row.card || scope.row.patientNo || scope.row.patient_id || '-' }}
</template>
</el-table-column>
<el-table-column label="身份证号码" width="200">
<template #default="scope">
{{ scope.row.idCard || scope.row.id_card || scope.row.idNo || '-' }}
</template>
</el-table-column>
<el-table-column label="手机号码" width="120">
<template #default="scope">
{{ scope.row.phoneNumber || scope.row.phone || scope.row.mobile || scope.row.mobilePhone || '-' }}
</template>
</el-table-column>
<el-table-column label="性别" width="80">
<template #default="scope">
{{ scope.row.genderEnum_enumText || scope.row.gender || scope.row.sex || scope.row.性别 || scope.row.xb || scope.row.sexCode || scope.row.GENDER || scope.row.SEX || '-' }}
</template>
</el-table-column>
<el-table-column label="年龄" width="80">
<template #default="scope">
{{ scope.row.age || '-' }}
</template>
</el-table-column>
<el-table-column label="出生年月" width="120">
<template #default="scope">
{{ formatDate(scope.row.birthDate || scope.row.birthday || scope.row.出生日期) || '-' }}
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<div style="margin-top: 15px; display: flex; justify-content: flex-end;">
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
<!-- 移除底部按钮 -->
<template #footer>
<span></span>
</template>
</el-dialog>
<!-- 换卡成功提示 -->
<el-dialog
v-model="renewalSuccessVisible"
title="换卡成功"
width="400px"
:close-on-click-modal="false"
>
<div style="text-align: center; padding: 20px;">
<div class="success-icon">✓</div>
<p style="margin-top: 15px; font-size: 16px;">患者换卡操作已成功完成!</p>
<p style="margin-top: 10px;">新门诊号码:{{ renewalForm.newOutpatientNo }}</p>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="renewalSuccessVisible = false; resetForm">确定</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
import { doCardRenewal, getPatientList } from './components/api.js';
// 获取路由实例
const router = useRouter();
// 获取当前组件实例以访问全局属性
const { proxy } = getCurrentInstance();
// 搜索表单
const searchForm = reactive({
patientName: '',
idCard: '',
phoneNumber: ''
})
// 患者信息
const patientInfo = ref(null)
// 患者列表
const patientList = ref([])
const showPatientList = ref(false)
const selectedPatient = ref(null)
// 分页相关状态
const currentPage = ref(1)
const pageSize = ref(5)
const total = ref(0)
// 换卡表单
const renewalForm = reactive({
newOutpatientNo: ''
})
// 加载状态
const loading = ref(false)
// 成功弹窗显示状态
const renewalSuccessVisible = ref(false)
// 分页大小变化处理
const handleSizeChange = (newSize) => {
pageSize.value = newSize
currentPage.value = 1 // 重置为第一页
selectedPatient.value = null // 切换分页时重置选中状态
if (showPatientList.value) {
handlePatientSearch() // 重新查询
}
}
// 当前页码变化处理
const handleCurrentChange = (newPage) => {
currentPage.value = newPage
selectedPatient.value = null // 切换分页时重置选中状态
if (showPatientList.value) {
handlePatientSearch() // 重新查询
}
}
// 查询患者信息
const handlePatientSearch = async () => {
// 检查是否至少填写了一个查询条件
if (!searchForm.patientName && !searchForm.idCard && !searchForm.phoneNumber) {
ElMessage.warning('请至少输入一个查询条件')
return
}
loading.value = true
try {
// 构建查询参数,包含分页信息
const queryParams = {
patientName: searchForm.patientName || '',
idCard: searchForm.idCard || '',
phoneNumber: searchForm.phoneNumber || '',
pageNo: currentPage.value,
pageSize: pageSize.value
}
// 调用复用的门诊挂号API获取患者列表
const response = await getPatientList(queryParams)
if (response && response.code === 200) {
// 检查是否有查询结果
if (response.data && response.data.records && response.data.records.length > 0) {
// 更新总条数
total.value = response.data.total || 0
selectedPatient.value = null // 查询时重置选中状态
// 如果只有一条记录且是第一页,自动选中
if (response.data.records.length === 1 && currentPage.value === 1) {
const patient = response.data.records[0]
// 确保patient对象中同时包含id和patientId字段
if (patient.id && !patient.patientId) {
patient.patientId = patient.id;
}
// 设置为选中状态,但不自动确认
selectedPatient.value = patient
ElMessage.warning('已自动选中唯一患者,请点击确定')
} else {
// 如果有多条记录或不是第一页,显示患者列表供选择
// 确保每条患者记录都包含patientId字段优先使用id字段
patientList.value = response.data.records.map(patient => ({
...patient,
patientId: patient.patientId || patient.id
}))
showPatientList.value = true
}
} else {
// 无数据时重置总条数
total.value = 0
ElMessage.warning('未查询到患者信息')
}
} else {
ElMessage.error('查询失败:' + (response?.msg || '未知错误'))
}
} catch (error) {
// 使用公共错误处理函数处理错误信息
const errorMessage = processErrorMessage(error, '查询失败,请稍后重试');
ElMessage.error(errorMessage);
// 可以在这里添加错误监控或日志记录
console.error('患者查询错误:', error);
} finally {
loading.value = false
}
}
// 确定换卡
const handleConfirm = async () => {
if (!patientInfo.value) {
ElMessage.warning('请先查询患者信息')
return
}
if (!renewalForm.newOutpatientNo) {
ElMessage.warning('请输入新门诊号码')
return
}
if (renewalForm.newOutpatientNo === patientInfo.value.outpatientNo) {
ElMessage.warning('新门诊号码不能与原号码相同')
return
}
loading.value = true
try {
// 构建换卡请求参数注意参数名称与API接口保持一致
const params = {
oldCardNo: patientInfo.value.outpatientNo,
newCardNo: renewalForm.newOutpatientNo,
patientId: patientInfo.value.patientId,
reason: '患者换卡',
remark: `${patientInfo.value.outpatientNo}更换到${renewalForm.newOutpatientNo}`
}
// 调用真实的换卡接口
const res = await doCardRenewal(params)
if (res && res.code === 200) {
renewalSuccessVisible.value = true
// 更新患者信息中的门诊号码为新号码
if (patientInfo.value) {
patientInfo.value.outpatientNo = renewalForm.newOutpatientNo
}
ElMessage.success('换卡成功!')
} else {
ElMessage.error('换卡失败:' + (res?.msg || '未知错误'))
}
} catch (error) {
ElMessage.error('换卡失败,卡号已存在')
// 可以在这里添加错误监控或日志记录
} finally {
loading.value = false
}
}
// 关闭窗口,同时关闭标签页并返回上一级页面
const handleClose = () => {
// 显示确认对话框
ElMessageBox.confirm('确定要关闭此页面吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 用户确认后,使用全局$tab对象关闭当前标签页
if (proxy && proxy.$tab) {
proxy.$tab.closePage()
} else {
// 降级处理:如果$tab不可用仍然使用router.back()
router.back()
}
}).catch(() => {
// 用户取消操作,不执行任何操作
// 可以选择显示一个提示消息
ElMessage.info('已取消关闭操作')
})
}
// 键盘事件处理
const handleKeydown = (event) => {
// 只有在患者列表对话框显示时才处理对话框快捷键
if (showPatientList.value) {
// 忽略在输入框中按下的按键
if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') {
return
}
const key = event.key.toLowerCase()
if (key === 'q') {
event.preventDefault()
confirmSelectPatient()
} else if (key === 'c') {
event.preventDefault()
showPatientList.value = false
selectedPatient.value = null
}
return
}
// Alt + Q 查询
if (event.altKey && event.key.toLowerCase() === 'q') {
event.preventDefault()
handlePatientSearch()
}
// Alt + O 确定
if (event.altKey && event.key.toLowerCase() === 'o') {
event.preventDefault()
handleConfirm()
}
// Alt + C 关闭
if (event.altKey && event.key.toLowerCase() === 'c') {
event.preventDefault()
handleClose()
}
}
// 组件挂载时添加键盘事件监听
onMounted(() => {
document.addEventListener('keydown', handleKeydown)
// 设置默认患者数据,方便用户直接进行换卡操作
patientInfo.value = {
outpatientNo: '20231001001',
patientName: '张三',
idCard: '110101199001011234',
phoneNumber: '13800138000',
gender: '男',
age: '33岁',
patientId: '1001'
}
})
// 组件卸载时移除键盘事件监听
onUnmounted(() => {
document.removeEventListener('keydown', handleKeydown)
})
// 移除了调试功能
// 选择患者(仅设置选中状态)
const selectPatient = (row) => {
selectedPatient.value = row
ElMessage.warning('已选择患者,请点击确定')
}
// 确认选择患者
const confirmSelectPatient = () => {
if (!selectedPatient.value) {
ElMessage.warning('请先选择患者')
return
}
const row = selectedPatient.value
// 获取门诊号码优先使用identifierNo
const outpatientNo = row.identifierNo || row.cardNo || row.card_number || row.就诊卡号 || row.outpatientNumber || row.outpatientNo || row.门诊号码 || row.卡号 || row.card || row.patientNo || row.patient_id;
// 获取性别优先使用genderEnum_enumText
const gender = row.genderEnum_enumText || row.gender || row.sex || row.性别 || row.xb || row.sexCode || row.GENDER || row.SEX;
patientInfo.value = {
outpatientNo: outpatientNo,
patientName: row.patientName || row.name,
idCard: row.idCard || row.id_card || row.idNo,
phoneNumber: row.phoneNumber || row.phone || row.mobile || row.mobilePhone,
gender: gender,
age: row.age,
patientId: row.patientId || row.id || outpatientNo
}
showPatientList.value = false
ElMessage.success('已选择患者:' + (row.patientName || row.name))
// 重置选中状态
selectedPatient.value = null
}
// 重置表单
const resetForm = () => {
searchForm.patientName = ''
searchForm.idCard = ''
searchForm.phoneNumber = ''
patientInfo.value = null
patientList.value = []
showPatientList.value = false
selectedPatient.value = null
renewalForm.newOutpatientNo = ''
// 重置分页状态
currentPage.value = 1
pageSize.value = 5
total.value = 0
}
// 格式化日期为YYYY-MM-DD格式
const formatDate = (date) => {
if (!date) return ''
// 如果已经是YYYY-MM-DD格式直接返回
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(date)) {
return date
}
// 处理日期对象或其他格式
const d = new Date(date)
if (isNaN(d.getTime())) return ''
const year = d.getFullYear()
const month = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
</script>
<style scoped>
/* 自定义对话框样式 */
.custom-patient-dialog .el-dialog__header {
padding: 0;
border-bottom: none;
height: auto;
}
/* 隐藏默认的header样式 */
.custom-header {
display: none;
}
.custom-patient-dialog .el-dialog__body {
padding: 0;
max-height: 60vh;
overflow-y: auto;
}
/* 隐藏默认底部区域 */
.custom-patient-dialog .el-dialog__footer {
padding: 0;
border-top: none;
}
.dialog-footer .el-button {
min-width: 80px;
background-color: #f56c6c;
border-color: #f56c6c;
color: white;
}
/* 表格样式 */
.el-dialog__body {
padding: 0;
overflow: hidden;
}
.el-table {
margin: 0;
}
.el-table th {
background-color: #f5f7fa;
font-weight: 500;
color: #303133;
}
.el-table td {
text-align: left;
}
/* 表格样式优化 */
.el-table {
margin: 0;
}
.el-table th {
background-color: #f5f7fa;
font-weight: 500;
color: #303133;
text-align: center;
border-bottom: 1px solid #ebeef5;
}
.el-table td {
text-align: center;
border-bottom: 1px solid #ebeef5;
}
.el-table tr:hover > td {
background-color: #f5f7fa;
}
.el-table--striped .el-table__body tr:nth-child(2n) {
background-color: #fafafa;
}
/* 分页样式优化 */
.el-pagination {
margin-top: 10px;
padding: 10px 20px;
background-color: #fafafa;
border-top: 1px solid #ebeef5;
}
.card-renewal-container {
width: 100%;
max-width: 800px;
margin: 0 auto;
padding: 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
background: #fff;
}
.title-bar {
background: #409eff;
color: white;
padding: 10px 15px;
margin: -10px -10px 15px -10px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.title-bar h2 {
margin: 0;
font-size: 16px;
font-weight: normal;
}
.button-bar {
display: flex;
gap: 15px;
padding: 15px;
background-color: #f5f7fa;
border: 1px solid #ebeef5;
margin-bottom: 20px;
}
.button-bar .el-button {
font-weight: 500;
transition: all 0.3s ease;
}
.button-bar .el-button:hover {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.search-section {
margin-bottom: 20px;
}
.input-item {
margin-bottom: 15px;
}
.input-item label {
display: inline-block;
width: 100px;
text-align: right;
margin-right: 10px;
font-weight: 500;
}
.patient-info-section {
background: #f5f7fa;
padding: 15px;
border-radius: 4px;
margin-bottom: 20px;
}
.info-item label {
display: block;
color: #606266;
font-size: 14px;
margin-bottom: 5px;
}
.info-value {
color: #303133;
font-weight: 500;
}
.new-number-section {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #ebeef5;
}
.success-icon {
width: 50px;
height: 50px;
background: #67c23a;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 30px;
margin: 0 auto;
}
</style>

View File

@@ -0,0 +1,342 @@
<template>
<div class="patient-search-container">
<!-- 标题栏 -->
<div class="title-bar">
<h2>病人档案查询</h2>
<div class="button-bar">
<el-button
type="primary"
@click="handleQuery"
:loading="loading"
size="large"
icon="el-icon-check"
>
确认(Q)
</el-button>
<el-button
type="danger"
@click="handleClose"
size="large"
icon="el-icon-close"
>
关闭(C)
</el-button>
</div>
</div>
<!-- 查询表单 -->
<div class="search-form">
<el-row :gutter="20">
<el-col :span="8">
<div class="form-item">
<label>病人姓名:</label>
<el-input
v-model="searchForm.patientName"
placeholder="请输入病人姓名"
clearable
@keyup.enter="handleQuery"
/>
</div>
</el-col>
<el-col :span="8">
<div class="form-item">
<label>身份证号码:</label>
<el-input
v-model="searchForm.idCard"
placeholder="请输入身份证号码"
clearable
@keyup.enter="handleQuery"
/>
</div>
</el-col>
<el-col :span="8">
<div class="form-item">
<label>手机号码:</label>
<el-input
v-model="searchForm.phoneNumber"
placeholder="请输入手机号码"
clearable
@keyup.enter="handleQuery"
/>
</div>
</el-col>
</el-row>
</div>
<!-- 查询结果表格 -->
<div class="result-table">
<el-table
:data="patientList"
style="width: 100%"
stripe
@row-click="handleRowClick"
highlight-current-row
row-key="id"
:current-row-key="selectedPatient?.id"
>
<el-table-column label="序号" type="index" width="80" align="center">
</el-table-column>
<el-table-column label="病人姓名" width="120" align="center">
<template #default="scope">
{{ scope.row.patientName }}
</template>
</el-table-column>
<el-table-column label="门诊号码" width="150" align="center">
<template #default="scope">
{{ scope.row.outpatientNo || '-' }}
</template>
</el-table-column>
<el-table-column label="身份证号码" width="200" align="center">
<template #default="scope">
{{ scope.row.idCard || '-' }}
</template>
</el-table-column>
<el-table-column label="手机号码" width="120" align="center">
<template #default="scope">
{{ scope.row.phoneNumber || '-' }}
</template>
</el-table-column>
<el-table-column label="性别" width="80" align="center">
<template #default="scope">
{{ scope.row.gender }}
</template>
</el-table-column>
<el-table-column label="年龄" width="80" align="center">
<template #default="scope">
{{ scope.row.age }}
</template>
</el-table-column>
<el-table-column label="出生年月" width="120" align="center">
<template #default="scope">
{{ scope.row.birthDate }}
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, computed, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { getOutpatientRegistrationList } from '../outpatientregistration/components/outpatientregistration'
// 搜索表单
const searchForm = reactive({
patientName: '',
idCard: '',
phoneNumber: ''
})
// 患者列表
const patientList = ref([])
// 加载状态
const loading = ref(false)
// API调用相关变量
const queryParams = ref({
pageNum: 1,
pageSize: 50
})
// 当前选中的患者
const selectedPatient = ref(null)
// 定义事件
const emit = defineEmits(['selectPatient', 'close'])
// 计算搜索关键字合并三个字段为一个searchKey
const searchKey = computed(() => {
return searchForm.patientName || searchForm.idCard || searchForm.phoneNumber
})
// 监听搜索关键字变化,自动查询
watch(searchKey, (newValue) => {
// 当搜索关键字变化时,延迟查询,避免频繁请求
const timer = setTimeout(() => {
if (newValue) {
queryParams.value.searchKey = newValue
handleQuery()
}
}, 300)
return () => clearTimeout(timer)
})
// 处理行点击
const handleRowClick = (row) => {
selectedPatient.value = row
ElMessage.success(`已选择患者:${row.patientName}`)
}
// 查询患者信息和确认选择
const handleQuery = async () => {
// 如果已经选中了患者,则确认选择
if (selectedPatient.value) {
// 发射选择患者事件
emit('selectPatient', selectedPatient.value)
ElMessage.success(`已确认选择患者:${selectedPatient.value.patientName}`)
return
}
// 检查是否至少填写了一个查询条件
if (!searchKey.value) {
ElMessage.warning('请至少输入一个查询条件')
return
}
loading.value = true
try {
// 调用门诊挂号的API获取患者列表
const response = await getOutpatientRegistrationList(queryParams.value)
if (response.data && response.data.records) {
// 映射字段,使其与表格展示需求匹配
patientList.value = response.data.records.map(record => ({
id: record.id,
patientName: record.name,
outpatientNo: record.identifierNo,
idCard: record.idCard,
phoneNumber: record.phone,
gender: record.genderEnum_enumText || '-',
age: record.age || '-',
birthDate: record.birthDate || '-' // 如果后端没有提供,需要计算或显示为'-'
}))
if (patientList.value.length === 0) {
ElMessage.warning('未找到符合条件的患者信息')
}
} else {
ElMessage.error('查询失败')
patientList.value = []
}
} catch (error) {
ElMessage.error('查询失败,请稍后重试')
console.error('查询失败:', error)
patientList.value = []
} finally {
loading.value = false
}
}
// 关闭窗口
const handleClose = () => {
// 发射关闭事件
emit('close')
}
// 键盘事件处理
const handleKeydown = (event) => {
// Alt + Q 查询
if (event.altKey && event.key.toLowerCase() === 'q') {
event.preventDefault()
handleQuery()
}
// Alt + C 关闭
if (event.altKey && event.key.toLowerCase() === 'c') {
event.preventDefault()
handleClose()
}
}
// 组件挂载时添加键盘事件监听
onMounted(() => {
document.addEventListener('keydown', handleKeydown)
})
// 组件卸载时移除键盘事件监听
onUnmounted(() => {
document.removeEventListener('keydown', handleKeydown)
})
</script>
<style scoped>
.patient-search-container {
width: 100%;
background-color: #fff;
border: 1px solid #b3d4ff;
border-radius: 4px;
overflow: hidden;
}
.title-bar {
background-color: #d6e9ff;
padding: 10px 20px;
border-bottom: 1px solid #b3d4ff;
display: flex;
justify-content: space-between;
align-items: center;
}
.title-bar h2 {
margin: 0;
font-size: 18px;
color: #303133;
font-weight: 500;
}
.button-bar {
padding: 10px 20px;
display: flex;
gap: 10px;
}
.button-bar .el-button {
padding: 12px 24px;
font-size: 16px;
}
.search-form {
padding: 20px;
border-bottom: 1px solid #dcdfe6;
}
.form-item {
margin-bottom: 15px;
display: flex;
align-items: center;
}
.form-item label {
display: inline-block;
width: 100px;
text-align: right;
margin-right: 10px;
font-weight: 500;
color: #303133;
}
.form-item .el-input {
width: 250px;
}
.result-table {
padding: 10px;
}
.el-table {
border: 1px solid #dcdfe6;
border-radius: 4px;
}
.el-table th {
background-color: #f2f6fc;
font-weight: 600;
color: #303133;
border-bottom: 1px solid #e6e8eb;
}
.el-table td {
padding: 10px 0;
font-size: 14px;
border-bottom: 1px solid #ebeef5;
}
.el-table--striped .el-table__body tr:nth-child(2n) {
background-color: #f8f9fa;
}
.el-table__row:hover {
background-color: #f5f7fa;
}
</style>

View File

@@ -0,0 +1,48 @@
import request from '@/utils/request'
/**
* 获取门诊患者信息列表
* 复用门诊挂号的API来查询患者信息
*/
export const getOutpatientRegistrationList = (params) => {
// 调用门诊挂号的API获取患者信息
return request({
url: '/api/outpatient/registration/list',
method: 'get',
params
})
}
/**
* 根据ID获取患者详情
*/
export const getPatientById = (id) => {
return request({
url: `/api/outpatient/registration/${id}`,
method: 'get'
})
}
/**
* 根据条件查询患者信息
* 复用门诊挂号API进行查询
*/
export const getPatientList = (params) => {
// 复用门诊挂号的API
return request({
url: '/api/outpatient/registration/list',
method: 'get',
params
})
}
/**
* 根据门诊号码获取患者详细信息
*/
export const getPatientByOutpatientNo = (outpatientNo) => {
return request({
url: '/api/outpatient/registration/list',
method: 'get',
params: { identifierNo: outpatientNo }
})
}

View File

@@ -61,13 +61,13 @@
<script setup> <script setup>
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import { getAdviceBaseInfo } from './api'; import { getAdviceBaseInfo, getDeviceList } from './api';
import { throttle } from 'lodash-es'; import { throttle } from 'lodash-es';
const props = defineProps({ const props = defineProps({
adviceQueryParams: { adviceQueryParams: {
type: Object, type: Object,
default: '', required: true
}, },
patientInfo: { patientInfo: {
type: Object, type: Object,
@@ -97,39 +97,29 @@ const throttledGetList = throttle(
watch( watch(
() => props.adviceQueryParams, () => props.adviceQueryParams,
(newValue) => { (newValue) => {
queryParams.value.searchKey = newValue.searchKey; // 直接更新查询参数
// queryParams.value.adviceType = newValue.adviceType; queryParams.value.searchKey = newValue.searchKey || '';
if (newValue.adviceType) {
queryParams.value.adviceTypes = [newValue.adviceType].join(','); // 处理类型筛选
if (newValue.adviceType !== undefined && newValue.adviceType !== null && newValue.adviceType !== '') {
// 单个类型
queryParams.value.adviceTypes = newValue.adviceType.toString();
} else { } else {
// 全部类型
queryParams.value.adviceTypes = '1,2,3'; queryParams.value.adviceTypes = '1,2,3';
} }
throttledGetList();
},
{ deep: true }
);
getList(); // 设置categoryCode筛选条件用于筛选西药和中成药
function getList() { if (newValue.categoryCode) {
queryParams.value.organizationId = props.patientInfo.orgId; queryParams.value.categoryCode = newValue.categoryCode;
getAdviceBaseInfo(queryParams.value).then((res) => {
console.log('ssssssssss', res.data.records);
if (res.data.records.length > 0) {
adviceBaseList.value = res.data.records.filter((item) => {
if (item.adviceType == 1 || item.adviceType == 2) {
return handleQuantity(item) != 0;
} else { } else {
return true; queryParams.value.categoryCode = undefined;
} }
});
total.value = res.data.total; getList();
nextTick(() => { },
currentIndex.value = 0; { deep: true, immediate: true }
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]); );
});
}
});
}
// 从priceList列表中获取价格 // 从priceList列表中获取价格
function getPriceFromInventory(row) { function getPriceFromInventory(row) {
if (row.priceList && row.priceList.length > 0) { if (row.priceList && row.priceList.length > 0) {
@@ -138,6 +128,119 @@ function getPriceFromInventory(row) {
} }
return '-'; return '-';
} }
function getList() {
queryParams.value.organizationId = props.patientInfo.orgId;
// 判断是否是耗材类型adviceType = 2 表示耗材)
const isConsumables = queryParams.value.adviceTypes === '2' || queryParams.value.adviceTypes === 2;
if (isConsumables) {
// 调用耗材目录接口
const deviceQueryParams = {
pageNo: queryParams.value.pageNum || 1,
pageSize: queryParams.value.pageSize || 100,
searchKey: queryParams.value.searchKey || '',
statusEnum: 2, // 只查询启用状态的耗材
};
getDeviceList(deviceQueryParams).then((res) => {
if (res.data && res.data.records && res.data.records.length > 0) {
// 将耗材目录数据转换为医嘱基础信息格式
const convertedRecords = res.data.records.map((item) => {
return {
adviceName: item.name || item.busNo, // 器材名称
adviceType: 2, // 耗材类型后端接口中耗材的adviceType是2但前端显示为4
unitCode: item.unitCode || '', // 包装单位
unitCode_dictText: item.unitCode_dictText || '',
minUnitCode: item.minUnitCode || item.unitCode || '',
minUnitCode_dictText: item.minUnitCode_dictText || item.unitCode_dictText || '',
volume: item.size || item.totalVolume || '', // 规格
partPercent: item.partPercent || 1, // 拆零比
priceList: item.price ? [{ price: item.price }] : (item.retailPrice ? [{ price: item.retailPrice }] : []),
inventoryList: [], // 耗材可能没有库存列表,需要根据实际情况处理
adviceDefinitionId: item.id,
chargeItemDefinitionId: item.id,
positionId: item.locationId,
positionName: item.locationId_dictText || '',
// 其他可能需要的字段
dose: 0,
doseUnitCode: item.minUnitCode || item.unitCode || '',
doseUnitCode_dictText: item.minUnitCode_dictText || item.unitCode_dictText || '',
injectFlag: 0,
injectFlag_enumText: '否',
skinTestFlag: 0,
skinTestFlag_enumText: '否',
categoryCode: item.categoryCode || '',
// 耗材特有字段
deviceId: item.id, // 耗材ID
deviceName: item.name, // 耗材名称
// 保留原始数据以便后续使用
...item,
};
});
adviceBaseList.value = convertedRecords;
total.value = res.data.total || convertedRecords.length;
nextTick(() => {
currentIndex.value = 0;
if (adviceBaseList.value.length > 0) {
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
}
});
} else {
adviceBaseList.value = [];
total.value = 0;
}
}).catch(error => {
console.error('获取耗材目录数据失败:', error);
adviceBaseList.value = [];
total.value = 0;
});
} else {
// 调用医嘱基础信息接口(药品、诊疗等)
getAdviceBaseInfo(queryParams.value).then((res) => {
if (res.data.records && res.data.records.length > 0) {
let filteredRecords = res.data.records.filter((item) => {
// 后端已经根据adviceTypes参数进行了筛选这里只需要进行前端补充筛选
// 过滤库存(药品和耗材需要检查库存,诊疗不需要检查库存)
if (item.adviceType == 1 || item.adviceType == 2) {
if (handleQuantity(item) == 0) {
return false;
}
}
// 如果设置了categoryCode筛选条件进行筛选用于区分西药和中成药
// categoryCode = '1' 表示中成药categoryCode = '2' 表示西药
// 注意:只有药品类型(adviceType=1)才需要根据categoryCode筛选
if (queryParams.value.categoryCode && item.adviceType == 1) {
// 只筛选药品类型
if (item.categoryCode != queryParams.value.categoryCode) {
return false;
}
}
return true;
});
adviceBaseList.value = filteredRecords;
total.value = res.data.total;
nextTick(() => {
currentIndex.value = 0;
if (adviceBaseList.value.length > 0) {
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
}
});
} else {
adviceBaseList.value = [];
}
}).catch(error => {
console.error('获取数据失败:', error);
adviceBaseList.value = [];
});
}
}
// 处理键盘事件 // 处理键盘事件
const handleKeyDown = (event) => { const handleKeyDown = (event) => {
const key = event.key; const key = event.key;

View File

@@ -63,6 +63,17 @@ export function completeEncounter(encounterId) {
}) })
} }
/**
* 取消接诊
*/
export function cancelEncounter(encounterId, config = {}) {
return request({
url: '/doctor-station/main/cancel-encounter?encounterId=' + encounterId,
method: 'get',
...config
})
}
/** /**
* 保存病历 * 保存病历
*/ */
@@ -212,6 +223,17 @@ export function getAdviceBaseInfo(queryParams) {
params: queryParams params: queryParams
}) })
} }
/**
* 获取耗材目录列表
*/
export function getDeviceList(queryParams) {
return request({
url: '/data-dictionary/device/information-page',
method: 'get',
params: queryParams
})
}
/** /**
* 保存处方(单条) * 保存处方(单条)
*/ */
@@ -239,7 +261,8 @@ export function singOut(data) {
return request({ return request({
url: '/doctor-station/advice/sign-off', url: '/doctor-station/advice/sign-off',
method: 'post', method: 'post',
data: data data: data,
skipErrorMsg: true
}) })
} }
/** /**

View File

@@ -162,10 +162,17 @@ function removeDiagnosis(row, index) {
} }
function save() { function save() {
// 为每个诊断项添加诊断医生和诊断时间
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
...item,
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || '',
diagnosisTime: new Date().toLocaleString('zh-CN')
}));
saveTcmDiagnosis({ saveTcmDiagnosis({
patientId: props.patientInfo.patientId, patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId, encounterId: props.patientInfo.encounterId,
diagnosisChildList: tcmDiagonsisSaveList.value, diagnosisChildList: diagnosisChildList,
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
emit('close'); emit('close');

View File

@@ -76,7 +76,7 @@
<el-form :model="form" :rules="rules" ref="formRef"> <el-form :model="form" :rules="rules" ref="formRef">
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650"> <el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
<el-table-column label="序号" type="index" width="50" /> <el-table-column label="序号" type="index" width="50" />
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="180"> <el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
<template #default="scope"> <template #default="scope">
<el-form-item <el-form-item
:prop="`diagnosisList.${scope.$index}.diagSrtNo`" :prop="`diagnosisList.${scope.$index}.diagSrtNo`"
@@ -99,7 +99,7 @@
> >
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px"> <el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
<el-option <el-option
v-for="item in med_type" v-for="item in diag_type"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@@ -135,9 +135,13 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断类型" align="center" prop="maindiseFlag"> <el-table-column label="诊断医生" align="center" prop="diagnosisDoctor" width="120" />
<el-table-column label="诊断时间" align="center" prop="diagnosisTime" width="150" />
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
<template #default="scope"> <template #default="scope">
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
<el-checkbox <el-checkbox
label="主诊断" label="主诊断"
:trueLabel="1" :trueLabel="1"
@@ -150,7 +154,7 @@
<el-select <el-select
v-model="scope.row.verificationStatusEnum" v-model="scope.row.verificationStatusEnum"
placeholder=" " placeholder=" "
style="width: 40%; padding-bottom: 5px; padding-left: 10px" style="width: 100%; padding-bottom: 5px; padding-left: 10px"
size="small" size="small"
> >
<el-option <el-option
@@ -160,6 +164,7 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="130"> <el-table-column label="操作" align="center" width="130">
@@ -192,6 +197,7 @@
<script setup> <script setup>
import { getCurrentInstance } from 'vue'; import { getCurrentInstance } from 'vue';
import useUserStore from '@/store/modules/user';
import { import {
getConditionDefinitionInfo, getConditionDefinitionInfo,
saveDiagnosis, saveDiagnosis,
@@ -228,7 +234,8 @@ const props = defineProps({
}); });
const emits = defineEmits(['diagnosisSave']); const emits = defineEmits(['diagnosisSave']);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { med_type } = proxy.useDict('med_type'); const userStore = useUserStore();
const { diag_type } = proxy.useDict('diag_type');
const rules = ref({ const rules = ref({
name: [{ required: true, message: '请选择诊断', trigger: 'change' }], name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }], medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
@@ -244,27 +251,49 @@ watch(
); );
function getDetail(encounterId) { function getDetail(encounterId) {
if (!encounterId) {
console.warn('未提供有效的就诊ID无法获取病历详情');
return;
}
getEmrDetail(encounterId).then((res) => { getEmrDetail(encounterId).then((res) => {
allowAdd.value = res.data ? true : false; allowAdd.value = res.data ? true : false;
}); });
} }
function getList() { function getList() {
if (!props.patientInfo || !props.patientInfo.encounterId) {
console.warn('患者就诊信息不完整,无法获取诊断数据');
return;
}
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => { getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
form.value.diagnosisList = res.data; // 为每个诊断项添加默认的诊断医生和时间(如果不存在)
form.value.diagnosisList = res.data.map(item => ({
...item,
diagnosisDoctor: item.diagnosisDoctor || props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: item.diagnosisTime || new Date().toLocaleString('zh-CN')
}));
// 获取诊断列表后按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
emits('diagnosisSave', false); emits('diagnosisSave', false);
console.log(form.value.diagnosisList); console.log(form.value.diagnosisList);
} }
}); });
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => { getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.illness.length > 0) { if (res.data.illness && res.data.illness.length > 0 && res.data.symptom) {
res.data.illness.forEach((item, index) => { res.data.illness.forEach((item, index) => {
form.value.diagnosisList.push({ form.value.diagnosisList.push({
name: item.name + '-' + res.data.symptom[index].name, name: item.name + '-' + (res.data.symptom[index]?.name || ''),
ybNo: item.ybNo, ybNo: item.ybNo,
medTypeCode: item.medTypeCode, medTypeCode: item.medTypeCode,
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: new Date().toLocaleString('zh-CN')
}); });
}); });
} }
@@ -272,6 +301,7 @@ function getList() {
console.log(form.value.diagnosisList); console.log(form.value.diagnosisList);
} }
}); });
getTree(); getTree();
} }
@@ -285,10 +315,20 @@ function init() {
} }
function handleImport() { function handleImport() {
if (!props.patientInfo || !props.patientInfo.encounterId) {
console.warn('患者就诊信息不完整,无法导入慢性病信息');
return;
}
if (props.patientInfo.contractName != '自费') { if (props.patientInfo.contractName != '自费') {
// 获取患者慢性病信息 // 获取患者慢性病信息
getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => { getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.data.length > 0) { if (res.data && res.data.length > 0) {
// 计算现有最大排序号
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
: 0;
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
form.value.diagnosisList.push({ form.value.diagnosisList.push({
...item, ...item,
@@ -296,12 +336,18 @@ function handleImport() {
medTypeCode: '140104', medTypeCode: '140104',
verificationStatusEnum: 4, verificationStatusEnum: 4,
definitionId: item.id, definitionId: item.id,
diagSrtNo: form.value.diagnosisList.length + 1, diagSrtNo: maxSortNo + index + 1,
iptDiseTypeCode: 2, iptDiseTypeCode: 2,
diagnosisDesc: '', diagnosisDesc: '',
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: new Date().toLocaleString('zh-CN')
}, },
}); });
}); });
// 导入完成后按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
emits('diagnosisSave', false);
} }
}); });
} }
@@ -342,7 +388,8 @@ const filterNode = (value, data) => {
* 获取诊断树列表 * 获取诊断树列表
*/ */
function getTree() { function getTree() {
getConditionDefinitionInfo(props.patientInfo ? props.patientInfo.patientId : '').then((res) => { const patientId = props.patientInfo?.patientId || '';
getConditionDefinitionInfo(patientId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let list = []; let list = [];
list = res.data.patientHistoryList; list = res.data.patientHistoryList;
@@ -383,15 +430,26 @@ function handleAddDiagnosis() {
proxy.$modal.msgWarning('请先填写病历'); proxy.$modal.msgWarning('请先填写病历');
return; return;
} }
// 计算现有最大排序号
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
: 0;
form.value.diagnosisList.push({ form.value.diagnosisList.push({
showPopover: false, showPopover: false,
name: undefined, name: undefined,
verificationStatusEnum: 4, verificationStatusEnum: 4,
medTypeCode: '11', medTypeCode: '初诊诊断',
diagSrtNo: form.value.diagnosisList.length + 1, diagSrtNo: maxSortNo + 1,
iptDiseTypeCode: 2, iptDiseTypeCode: 2,
diagnosisDesc: '', diagnosisDesc: '',
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: new Date().toLocaleString('zh-CN')
}); });
// 添加后按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
if (form.value.diagnosisList.length == 1) { if (form.value.diagnosisList.length == 1) {
form.value.diagnosisList[0].maindiseFlag = 1; form.value.diagnosisList[0].maindiseFlag = 1;
} }
@@ -409,12 +467,17 @@ function handleAddTcmDiagonsis() {
*/ */
function handleDeleteDiagnosis(row, index) { function handleDeleteDiagnosis(row, index) {
if (row.conditionId) { if (row.conditionId) {
delEncounterDiagnosis(row.conditionId).then(() => { delEncounterDiagnosis(row.conditionId).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('删除成功');
getList(); getList();
getTree(); getTree();
}
}); });
} else { } else {
form.value.diagnosisList.splice(index, 1); form.value.diagnosisList.splice(index, 1);
// 删除后不重新计算排序号,保持用户设置的排序不变
emits('diagnosisSave', false);
} }
} }
@@ -422,7 +485,6 @@ function handleMaindise(value, index) {
if (value == 1) { if (value == 1) {
let flag = 0; let flag = 0;
form.value.diagnosisList.forEach((item) => { form.value.diagnosisList.forEach((item) => {
console.log(item);
if (item.maindiseFlag == 1) { if (item.maindiseFlag == 1) {
flag++; flag++;
} }
@@ -446,6 +508,9 @@ function handleSaveDiagnosis() {
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) { } else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
proxy.$modal.msgWarning('至少添加一条主诊断'); proxy.$modal.msgWarning('至少添加一条主诊断');
} else { } else {
// 保存前按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
saveDiagnosis({ saveDiagnosis({
patientId: props.patientInfo.patientId, patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId, encounterId: props.patientInfo.encounterId,
@@ -455,7 +520,7 @@ function handleSaveDiagnosis() {
getTree(); getTree();
getList(); getList();
emits('diagnosisSave', false); emits('diagnosisSave', false);
proxy.$modal.msgSuccess('诊断已保存'); proxy.$modal.msgSuccess('诊断已保存并按排序号排序');
//食源性疾病病例数据智能采集 ---START--- //食源性疾病病例数据智能采集 ---START---
isFoodDiseasesNew({ isFoodDiseasesNew({
encounterId: props.patientInfo.encounterId, encounterId: props.patientInfo.encounterId,
@@ -530,14 +595,26 @@ function handleNodeClick(data) {
proxy.$modal.msgWarning('该诊断项已存在'); proxy.$modal.msgWarning('该诊断项已存在');
return; return;
} }
// 计算现有最大排序号
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
: 0;
form.value.diagnosisList.push({ form.value.diagnosisList.push({
ybNo: data.ybNo, ybNo: data.ybNo,
name: data.name, name: data.name,
verificationStatusEnum: 4, verificationStatusEnum: 4,
medTypeCode: '11', medTypeCode: '11',
diagSrtNo: form.value.diagnosisList.length + 1, diagSrtNo: maxSortNo + 1,
definitionId: data.definitionId, definitionId: data.definitionId,
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
diagnosisTime: new Date().toLocaleString('zh-CN')
}); });
// 添加后按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
if (form.value.diagnosisList.length == 1) { if (form.value.diagnosisList.length == 1) {
form.value.diagnosisList[0].maindiseFlag = 1; form.value.diagnosisList[0].maindiseFlag = 1;
} }

Some files were not shown because too many files have changed in this diff Show More