feat: 门诊手术中计费功能
- 数据库:在adm_charge_item表添加SourceBillNo字段 - 后端实体类:更新ChargeItem.java添加SourceBillNo字段 - 前端组件:创建手术计费界面(基于门诊划价界面) - 后端API:扩展PrePrePaymentDto支持手术计费标识 - 后端Service:扩展getChargeItems方法支持手术计费过滤 - 门诊手术安排界面:添加【计费】按钮 注意事项: - 需要手动执行SQL脚本:openhis-server-new/sql/add_source_bill_no_to_adm_charge_item.sql - 术后一站式结算功能待后续开发
This commit is contained in:
27
openhis-ui-vue3/package-lock.json
generated
27
openhis-ui-vue3/package-lock.json
generated
@@ -39,6 +39,7 @@
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"segmentit": "^2.0.3",
|
||||
"sortablejs": "^1.15.6",
|
||||
"v-region": "^3.3.0",
|
||||
"vue": "^3.5.13",
|
||||
"vue-area-linkage": "^5.1.0",
|
||||
@@ -1638,6 +1639,7 @@
|
||||
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/lodash": "*"
|
||||
}
|
||||
@@ -1648,6 +1650,7 @@
|
||||
"integrity": "sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~7.16.0"
|
||||
}
|
||||
@@ -3343,6 +3346,7 @@
|
||||
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
|
||||
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
@@ -5468,7 +5472,7 @@
|
||||
},
|
||||
"node_modules/json-bigint": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/json-bigint/-/json-bigint-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
|
||||
"integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -5594,13 +5598,15 @@
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash-es": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash-unified": {
|
||||
"version": "1.0.3",
|
||||
@@ -6553,6 +6559,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
@@ -6793,6 +6800,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
||||
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
@@ -6805,6 +6813,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
|
||||
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.0"
|
||||
@@ -7056,6 +7065,7 @@
|
||||
"integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.8"
|
||||
},
|
||||
@@ -7234,6 +7244,7 @@
|
||||
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
@@ -7266,6 +7277,7 @@
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
|
||||
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"preval.macro": "^4.0.0"
|
||||
}
|
||||
@@ -7598,6 +7610,12 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sortablejs": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.6.tgz",
|
||||
"integrity": "sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -8465,6 +8483,7 @@
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -8826,6 +8845,7 @@
|
||||
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.19.3",
|
||||
"postcss": "^8.4.31",
|
||||
@@ -8930,6 +8950,7 @@
|
||||
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.25.tgz",
|
||||
"integrity": "sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.5.25",
|
||||
"@vue/compiler-sfc": "3.5.25",
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"segmentit": "^2.0.3",
|
||||
"sortablejs": "^1.15.6",
|
||||
"v-region": "^3.3.0",
|
||||
"vue": "^3.5.13",
|
||||
"vue-area-linkage": "^5.1.0",
|
||||
|
||||
53
openhis-ui-vue3/src/api/consultation/confirmation.js
Normal file
53
openhis-ui-vue3/src/api/consultation/confirmation.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会诊确认列表
|
||||
export function listConfirmation(query) {
|
||||
return request({
|
||||
url: '/consultation/confirmation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会诊确认详细
|
||||
export function getConfirmation(id) {
|
||||
return request({
|
||||
url: '/consultation/confirmation/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增会诊确认
|
||||
export function addConfirmation(data) {
|
||||
return request({
|
||||
url: '/consultation/confirmation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改会诊确认
|
||||
export function updateConfirmation(data) {
|
||||
return request({
|
||||
url: '/consultation/confirmation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 确认会诊
|
||||
export function confirmConsultation(data) {
|
||||
return request({
|
||||
url: '/consultation/confirmation/confirm',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会诊确认
|
||||
export function delConfirmation(id) {
|
||||
return request({
|
||||
url: '/consultation/confirmation/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
openhis-ui-vue3/src/api/consultation/record.js
Normal file
44
openhis-ui-vue3/src/api/consultation/record.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会诊记录列表
|
||||
export function listRecord(query) {
|
||||
return request({
|
||||
url: '/consultation/record/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会诊记录详细
|
||||
export function getRecord(id) {
|
||||
return request({
|
||||
url: '/consultation/record/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增会诊记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/consultation/record',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改会诊记录
|
||||
export function updateRecord(data) {
|
||||
return request({
|
||||
url: '/consultation/record',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会诊记录
|
||||
export function delRecord(id) {
|
||||
return request({
|
||||
url: '/consultation/record/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
94
openhis-ui-vue3/src/api/consultation/request.js
Normal file
94
openhis-ui-vue3/src/api/consultation/request.js
Normal file
@@ -0,0 +1,94 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会诊申请列表
|
||||
export function listRequest(query) {
|
||||
return request({
|
||||
url: '/consultation/request/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会诊申请详细
|
||||
export function getRequest(id) {
|
||||
return request({
|
||||
url: '/consultation/request/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增会诊申请
|
||||
export function addRequest(data) {
|
||||
return request({
|
||||
url: '/consultation/request',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改会诊申请
|
||||
export function updateRequest(data) {
|
||||
return request({
|
||||
url: '/consultation/request',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会诊申请
|
||||
export function delRequest(id) {
|
||||
return request({
|
||||
url: '/consultation/request/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 提交会诊申请
|
||||
export function submitRequest(id) {
|
||||
return request({
|
||||
url: '/consultation/request/submit/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 取消提交会诊申请
|
||||
export function cancelSubmitRequest(id) {
|
||||
return request({
|
||||
url: '/consultation/request/cancelSubmit/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 结束会诊申请
|
||||
export function endRequest(id) {
|
||||
return request({
|
||||
url: '/consultation/request/end/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 作废会诊申请
|
||||
export function cancelRequest(id) {
|
||||
return request({
|
||||
url: '/consultation/request/cancel/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 确认会诊
|
||||
export function confirmRequest(data) {
|
||||
return request({
|
||||
url: '/consultation/request/confirm',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 签名会诊
|
||||
export function signRequest(data) {
|
||||
return request({
|
||||
url: '/consultation/request/sign',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -237,21 +237,6 @@ export const dynamicRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/doctorstation',
|
||||
component: Layout,
|
||||
redirect: '/doctorstation/index',
|
||||
name: 'DoctorStation',
|
||||
meta: { title: '医生工作站', icon: 'operation' },
|
||||
children: [
|
||||
{
|
||||
path: 'pending-emr',
|
||||
component: () => import('@/views/doctorstation/pendingEmr.vue'),
|
||||
name: 'PendingEmr',
|
||||
meta: { title: '待写病历', icon: 'document', permissions: ['doctorstation:pending-emr:view'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/features',
|
||||
component: Layout,
|
||||
@@ -313,20 +298,6 @@ export const dynamicRoutes = [
|
||||
meta: { title: '门诊日结', icon: 'document' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/medicationmanagement',
|
||||
component: Layout,
|
||||
name: 'MedicationManagement',
|
||||
meta: { title: '药房管理', icon: 'medication' },
|
||||
children: [
|
||||
{
|
||||
path: 'dayEndSettlement',
|
||||
component: () => import('@/views/medicationmanagement/dayEndSettlement/index.vue'),
|
||||
name: 'DayEndSettlement',
|
||||
meta: { title: '日结结算单管理', icon: 'document' }
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
502
openhis-ui-vue3/src/views/charge/surgerycharge/index.vue
Normal file
502
openhis-ui-vue3/src/views/charge/surgerycharge/index.vue
Normal file
@@ -0,0 +1,502 @@
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between" class="app-container" v-loading="loading"
|
||||
:element-loading-text="loadingText">
|
||||
<!-- 左侧:患者基本信息区 -->
|
||||
<el-card style="width: 30%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">患者基本信息</span>
|
||||
</template>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="病历号">{{ patientInfo.encounterBusNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ patientInfo.patientName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ patientInfo.genderEnum_enumText }}</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄">{{ patientInfo.age }}</el-descriptions-item>
|
||||
<el-descriptions-item label="科室">{{ patientInfo.organizationName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊时间">
|
||||
{{ formatDateStr(patientInfo.receptionTime, 'YYYY-MM-DD HH:mm:ss') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手术单号">{{ surgeryInfo.surgeryNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手术名称">{{ surgeryInfo.surgeryName }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
<!-- 右侧:收费项目区 -->
|
||||
<div style="width: 69%">
|
||||
<el-card style="min-width: 1100px">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">收费项目</span>
|
||||
</template>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-button type="primary" @click="confirmCharge()" :disabled="buttonDisabled">
|
||||
确认收费
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||
电子凭证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
|
||||
医保卡
|
||||
</el-button>
|
||||
<span style="float: right">
|
||||
合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
ref="chargeListRef"
|
||||
height="530"
|
||||
:data="chargeList"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="chargeLoading"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="单据号" align="center" prop="busNo" width="180" />
|
||||
<el-table-column label="收费项目" align="center" prop="itemName" width="200" />
|
||||
<el-table-column label="数量" align="center" prop="quantityValue" width="80" />
|
||||
<el-table-column label="医疗类型" align="center" prop="medTypeCode_dictText" />
|
||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.statusEnum === 1" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 5" type="success" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum === 8" type="danger" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="warning" disable-transitions>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="right" prop="totalPrice" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
class-name="no-hover-column"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
:disabled="!scope.row.paymentId"
|
||||
link
|
||||
type="primary"
|
||||
@click="printCharge(scope.row)"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 收费对话框 -->
|
||||
<ChargeDialog
|
||||
ref="chargeDialogRef"
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
:totalAmount="totalAmount"
|
||||
:patientInfo="patientInfo"
|
||||
:chargeItemIds="chargeItemIdList"
|
||||
:consumablesIdList="consumablesIdList"
|
||||
:chrgBchnoList="chrgBchnoList"
|
||||
:userCardInfo="userCardInfo"
|
||||
:paymentId="paymentId"
|
||||
:details="details"
|
||||
:chargedItems="chargedItems"
|
||||
:feeType="patientInfo.medfeePaymtdCode"
|
||||
:medfee_paymtd_code="medfee_paymtd_code"
|
||||
@refresh="getChargeList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="SurgeryCharge">
|
||||
import {
|
||||
getChargeList,
|
||||
precharge,
|
||||
getChargeInfo,
|
||||
} from '../cliniccharge/components/api';
|
||||
import {invokeYbPlugin5000, invokeYbPlugin5001} from '@/api/public';
|
||||
import ChargeDialog from '../cliniccharge/components/chargeDialog.vue';
|
||||
import {formatDateStr} from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import Decimal from 'decimal.js';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const { medfee_paymtd_code } = proxy.useDict('medfee_paymtd_code');
|
||||
|
||||
// Props: 从手术安排界面传入的患者信息和手术信息
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({})
|
||||
},
|
||||
surgeryInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
|
||||
// 数据定义
|
||||
const totalAmounts = ref(0);
|
||||
const selectedRows = ref([]);
|
||||
const chargeList = ref([]);
|
||||
const chargeItemIdList = ref([]);
|
||||
const chrgBchnoList = ref([]);
|
||||
const chargeLoading = ref(false);
|
||||
const encounterId = ref('');
|
||||
const paymentId = ref('');
|
||||
const openDialog = ref(false);
|
||||
const totalAmount = ref(0);
|
||||
const chargeListRef = ref();
|
||||
const details = ref({});
|
||||
const buttonDisabled = computed(() => {
|
||||
return Object.keys(props.patientInfo).length === 0;
|
||||
});
|
||||
const chargedItems = ref([]);
|
||||
const consumablesIdList = ref([]);
|
||||
const userCardInfo = ref({});
|
||||
const readCardLoading = ref(false);
|
||||
const loadingText = ref('');
|
||||
const loading = ref(false);
|
||||
|
||||
// Watch
|
||||
watch(
|
||||
() => selectedRows.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => chargeList.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
} else {
|
||||
totalAmounts.value = 0;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
if (props.patientInfo && props.patientInfo.encounterId) {
|
||||
encounterId.value = props.patientInfo.encounterId;
|
||||
fetchChargeList();
|
||||
}
|
||||
});
|
||||
|
||||
// 方法
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRows.value = selection;
|
||||
}
|
||||
|
||||
function handleTotalAmount() {
|
||||
if (selectedRows.value.length == 0) {
|
||||
totalAmounts.value = chargeList.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, new Decimal(0));
|
||||
} else {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取收费项目列表(只显示该手术已计费的项目)
|
||||
function fetchChargeList() {
|
||||
if (!props.patientInfo.encounterId) {
|
||||
return;
|
||||
}
|
||||
chargeLoading.value = true;
|
||||
// 调用门诊划价的getChargeList接口,传入encounterId
|
||||
// 只显示generateSourceEnum=2(手术计费)且sourceBillNo=手术单号的费用项
|
||||
getChargeList(props.patientInfo.encounterId).then((res) => {
|
||||
// 过滤出手术计费的收费项目
|
||||
chargeList.value = (res.data || []).filter(item =>
|
||||
item.generateSourceEnum === 2 && item.sourceBillNo === props.surgeryInfo.surgeryNo
|
||||
);
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
// 默认选中所有未收费的项目
|
||||
if (chargeListRef.value) {
|
||||
chargeListRef.value.toggleAllSelection();
|
||||
}
|
||||
}, 100);
|
||||
}).catch(() => {
|
||||
chargeLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function checkSelectable(row, index) {
|
||||
// 已结算时禁用选择框
|
||||
return row.statusEnum === 1;
|
||||
}
|
||||
|
||||
function handleClose(value, msg) {
|
||||
openDialog.value = false;
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess(msg);
|
||||
fetchChargeList();
|
||||
}
|
||||
}
|
||||
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
|
||||
precharge({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
// 传递手术计费标识
|
||||
generateSourceEnum: 2,
|
||||
sourceBillNo: props.surgeryInfo.surgeryNo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200 && res.data) {
|
||||
paymentId.value = res.data.paymentId;
|
||||
chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
totalAmount.value = res.data.details?.find((item) => item.payEnum == 220000)?.amount ?? 0;
|
||||
details.value = res.data.details?.filter((item) => {
|
||||
return item.amount > 0;
|
||||
}) || [];
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res?.msg || '预结算失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 读卡功能
|
||||
async function handleReadCard(value) {
|
||||
try {
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
await invokeYbPlugin5000({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
businessType: '01101',
|
||||
operatorId: userStore.id.toString(),
|
||||
operatorName: userStore.name,
|
||||
officeId: 'D83',
|
||||
officeName: '财务科',
|
||||
})
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.data);
|
||||
userMessage = {
|
||||
certType: '02',
|
||||
certNo: message.data.idNo,
|
||||
psnCertType: '02',
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01',
|
||||
certNo: message.data.idNo,
|
||||
psnCertType: '01',
|
||||
busiCardInfo: message.data.ecToken,
|
||||
};
|
||||
break;
|
||||
case '03': // 医保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin5001(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = JSON.stringify(res.data);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
userMessage = {
|
||||
certType: '02',
|
||||
certNo: message1.SocialSecurityNumber,
|
||||
psnCertType: '02',
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02',
|
||||
certNo: message1.SocialSecurityNumber,
|
||||
psnCertType: '02',
|
||||
busiCardInfo: message1.BusiCardInfo,
|
||||
};
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = false;
|
||||
if (userMessage.certNo) {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
precharge({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
ybMdtrtCertType: userCardInfo.psnCertType,
|
||||
busiCardInfo: userCardInfo.busiCardInfo,
|
||||
generateSourceEnum: 2,
|
||||
sourceBillNo: props.surgeryInfo.surgeryNo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200 && res.data) {
|
||||
paymentId.value = res.data.paymentId;
|
||||
totalAmount.value = res.data.details?.find((item) => item.payEnum == 220000)?.amount ?? 0;
|
||||
details.value = res.data.details || [];
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
chargedItems.value = selectRows;
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res?.msg || '预结算失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 行合并方法
|
||||
function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 10) {
|
||||
if (!row.paymentId) {
|
||||
return [1,1];
|
||||
}
|
||||
let spanCount = 1;
|
||||
if (rowIndex === 0 || chargeList.value[rowIndex - 1].paymentId !== row.paymentId) {
|
||||
for (let i = rowIndex + 1; i < chargeList.value.length; i++) {
|
||||
if (chargeList.value[i].paymentId === row.paymentId) {
|
||||
spanCount++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
} else {
|
||||
return [0, 0];
|
||||
}
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 打印功能
|
||||
function printCharge(row) {
|
||||
let rows = [];
|
||||
chargeList.value.forEach((item, index) => {
|
||||
if (item.paymentId === row.paymentId) {
|
||||
rows.push(item);
|
||||
}
|
||||
});
|
||||
chargedItems.value = rows;
|
||||
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
|
||||
if (res.data && res.data.detail) {
|
||||
const amountDetail = res.data.detail?.find((item) => item.payEnum == 220000);
|
||||
if (amountDetail) {
|
||||
totalAmount.value = amountDetail.amount || 0;
|
||||
rows.forEach((item) => {
|
||||
if (item.actualPrice === undefined || item.actualPrice === null) {
|
||||
item.actualPrice = 0;
|
||||
}
|
||||
if (item.discountAmount === undefined || item.discountAmount === null) {
|
||||
item.discountAmount = 0;
|
||||
}
|
||||
if (item.discountRate === undefined || item.discountRate === null) {
|
||||
item.discountRate = 100;
|
||||
}
|
||||
});
|
||||
}
|
||||
const enhancedPrintData = {
|
||||
...res.data,
|
||||
selectedRow: row,
|
||||
chargedItems: rows,
|
||||
};
|
||||
nextTick(() => {
|
||||
proxy.$refs['chargeDialogRef'].printReceipt(enhancedPrintData);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.no-hover-column) .cell:hover {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__body) tr:hover td.no-hover-column {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,556 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="时间类型" prop="timeType">
|
||||
<el-select v-model="queryParams.timeType" placeholder="请选择时间类型" clearable>
|
||||
<el-option label="会诊时间" value="consultation" />
|
||||
<el-option label="申请时间" value="application" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startTime"
|
||||
type="datetime"
|
||||
placeholder="请选择开始时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.endTime"
|
||||
type="datetime"
|
||||
placeholder="请选择结束时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请科室" prop="department">
|
||||
<el-input
|
||||
v-model="queryParams.department"
|
||||
placeholder="请输入申请科室"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请医生" prop="requestingPhysician">
|
||||
<el-input
|
||||
v-model="queryParams.requestingPhysician"
|
||||
placeholder="请输入申请医生"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会诊状态" prop="consultationStatus">
|
||||
<el-select v-model="queryParams.consultationStatus" placeholder="请选择会诊状态" clearable>
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="新开" :value="0" />
|
||||
<el-option label="已提交" :value="10" />
|
||||
<el-option label="已确认" :value="20" />
|
||||
<el-option label="已签名" :value="30" />
|
||||
<el-option label="已完成" :value="40" />
|
||||
<el-option label="已取消" :value="50" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人姓名" prop="patientName">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入病人姓名"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" size="mini" @click="handlePrint">打印</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['consultation:request:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-document-checked"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleSubmit"
|
||||
v-hasPermi="['consultation:request:submit']"
|
||||
>提交</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-circle-close"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleEnd"
|
||||
v-hasPermi="['consultation:request:end']"
|
||||
>结束</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="handleSave"
|
||||
v-hasPermi="['consultation:request:edit']"
|
||||
>保存</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="requestList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="id" />
|
||||
<el-table-column label="急" align="center" prop="consultationUrgency" :formatter="urgentFormatter" />
|
||||
<el-table-column label="申请单号" align="center" prop="consultationId" />
|
||||
<el-table-column label="会诊时间" align="center" prop="consultationDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.consultationDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="邀请对象" align="center" prop="invitedObject" />
|
||||
<el-table-column label="申请科室" align="center" prop="department" />
|
||||
<el-table-column label="申请医师" align="center" prop="requestingPhysician" />
|
||||
<el-table-column label="申请时间" align="center" prop="consultationRequestDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.consultationRequestDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交" align="center" prop="consultationStatus">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.consultationStatus"
|
||||
:active-value="10"
|
||||
:inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="handleToggleSubmit(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束" align="center" prop="consultationStatus">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.consultationStatus"
|
||||
:active-value="40"
|
||||
:inactive-value="30"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
:disabled="scope.row.consultationStatus !== 30"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['consultation:request:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['consultation:request:query']"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['consultation:request:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 会诊申请单弹窗 -->
|
||||
<el-dialog :title="title" v-model="open" width="80%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请单号" prop="consultationId">
|
||||
<el-input v-model="form.consultationId" placeholder="系统自动生成" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请时间" prop="consultationRequestDate">
|
||||
<el-input v-model="form.consultationRequestDate" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="病人姓名" prop="patientName">
|
||||
<el-input v-model="form.patientName" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="性别" prop="genderEnum">
|
||||
<el-input v-model="form.genderEnum" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input v-model="form.age" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会诊时间" prop="consultationDate">
|
||||
<el-date-picker
|
||||
v-model="form.consultationDate"
|
||||
type="datetime"
|
||||
placeholder="选择会诊时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="紧急程度" prop="consultationUrgency">
|
||||
<el-checkbox v-model="form.consultationUrgency" true-label="紧急" false-label="一般">是否紧急</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请医师" prop="requestingPhysician">
|
||||
<el-input v-model="form.requestingPhysician" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请科室" prop="department">
|
||||
<el-input v-model="form.department" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="门诊诊断" prop="provisionalDiagnosis">
|
||||
<el-input v-model="form.provisionalDiagnosis" type="textarea" :rows="2" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="会诊邀请对象" prop="invitedObject">
|
||||
<el-input v-model="form.invitedObject" type="textarea" :rows="2" placeholder="请选择会诊专家" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会诊确认参加医师" prop="confirmingPhysicianParticipation">
|
||||
<el-input v-model="form.confirmingPhysicianParticipation" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属医生" prop="confirmingPhysicianName">
|
||||
<el-input v-model="form.confirmingPhysicianName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="代表科室" prop="confirmingDepartmentName">
|
||||
<el-input v-model="form.confirmingDepartmentName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签名医生" prop="signature">
|
||||
<el-input v-model="form.signature" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签名时间" prop="signatureDate">
|
||||
<el-input v-model="form.signatureDate" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="病史及会诊目的" prop="consultationPurpose">
|
||||
<el-input v-model="form.consultationPurpose" type="textarea" :rows="4" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会诊意见" prop="consultationOpinion">
|
||||
<el-input v-model="form.consultationOpinion" type="textarea" :rows="4" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">保 存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ConsultationRequest">
|
||||
import { listRequest, getRequest, delRequest, addRequest, updateRequest, submitRequest, cancelSubmitRequest, endRequest, cancelRequest } from "@/api/consultation/request";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const requestList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(false);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const open = ref(false);
|
||||
const dateRange = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType: 'consultation',
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
department: null,
|
||||
requestingPhysician: null,
|
||||
consultationStatus: null,
|
||||
patientName: null
|
||||
},
|
||||
rules: {
|
||||
patientName: [
|
||||
{ required: true, message: "病人姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
consultationDate: [
|
||||
{ required: true, message: "会诊时间不能为空", trigger: "change" }
|
||||
],
|
||||
invitedObject: [
|
||||
{ required: true, message: "会诊邀请对象不能为空", trigger: "blur" }
|
||||
],
|
||||
consultationPurpose: [
|
||||
{ required: true, message: "病史及会诊目的不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询会诊申请列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listRequest(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
||||
requestList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryForm");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
consultationId: null,
|
||||
patientId: null,
|
||||
encounterId: null,
|
||||
orderId: null,
|
||||
patientName: null,
|
||||
patientBusNo: null,
|
||||
patientIdentifierNo: null,
|
||||
genderEnum: null,
|
||||
age: null,
|
||||
department: null,
|
||||
departmentId: null,
|
||||
requestingPhysician: null,
|
||||
requestingPhysicianId: null,
|
||||
consultationRequestDate: null,
|
||||
invitedObject: null,
|
||||
consultationDate: null,
|
||||
consultationPurpose: null,
|
||||
provisionalDiagnosis: null,
|
||||
consultationOpinion: null,
|
||||
consultationStatus: 0,
|
||||
consultationUrgency: '一般',
|
||||
confirmingPhysician: null,
|
||||
confirmingPhysicianId: null,
|
||||
confirmingDate: null,
|
||||
signature: null,
|
||||
signaturePhysicianId: null,
|
||||
signatureDate: null,
|
||||
cancelNatureDate: null,
|
||||
cancelReason: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
tenantId: null,
|
||||
isDeleted: 0,
|
||||
remark: null,
|
||||
consultationActivityId: null,
|
||||
consultationActivityName: null,
|
||||
confirmingPhysicianName: null,
|
||||
confirmingDepartmentName: null,
|
||||
confirmingPhysicianParticipation: null
|
||||
};
|
||||
proxy.resetForm("form");
|
||||
}
|
||||
|
||||
/** 格式化紧急标识 */
|
||||
function urgentFormatter(row, column, cellValue) {
|
||||
return cellValue === '紧急' ? '✓' : '';
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加会诊申请";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const id = row.id || ids.value[0];
|
||||
getRequest(id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改会诊申请";
|
||||
});
|
||||
}
|
||||
|
||||
/** 查看按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
const id = row.id;
|
||||
getRequest(id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "查看会诊申请";
|
||||
// 设置为只读模式
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮操作 */
|
||||
function handleSubmit() {
|
||||
const id = ids.value[0];
|
||||
if (id) {
|
||||
submitRequest(id).then(response => {
|
||||
proxy.$modal.msgSuccess(response.msg || "提交成功");
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
proxy.$modal.msgError("请选择要提交的会诊申请");
|
||||
}
|
||||
}
|
||||
|
||||
/** 结束按钮操作 */
|
||||
function handleEnd() {
|
||||
const id = ids.value[0];
|
||||
if (id) {
|
||||
endRequest(id).then(response => {
|
||||
proxy.$modal.msgSuccess(response.msg || "结束成功");
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
proxy.$modal.msgError("请选择要结束的会诊申请");
|
||||
}
|
||||
}
|
||||
|
||||
/** 保存按钮操作 */
|
||||
function handleSave() {
|
||||
proxy.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateRequest(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addRequest(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const ids = row.id ? [row.id] : ids.value;
|
||||
proxy.$modal.confirm('是否确认删除会诊申请编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRequest(ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 提交/取消提交切换 */
|
||||
function handleToggleSubmit(row) {
|
||||
if (row.consultationStatus === 10) {
|
||||
// 取消提交
|
||||
cancelSubmitRequest(row.id).then(response => {
|
||||
proxy.$modal.msgSuccess(response.msg || "取消提交成功");
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
// 提交
|
||||
submitRequest(row.id).then(response => {
|
||||
proxy.$modal.msgSuccess(response.msg || "提交成功");
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 打印按钮操作 */
|
||||
function handlePrint() {
|
||||
// 实现打印功能
|
||||
proxy.$modal.msgSuccess("打印功能待实现");
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateRequest(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addRequest(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
@@ -93,10 +93,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" align="center" width="100" prop="createByName" />
|
||||
<el-table-column label="操作" align="center" width="180" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="240" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button link type="success" @click="handleChargeCharge(scope.row)">计费</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row)" v-has="['surgicalSchedule:delete']">取消</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -775,10 +776,11 @@ import download from '@/plugins/download'
|
||||
// API 导入
|
||||
import { getSurgerySchedulePage, addSurgerySchedule, updateSurgerySchedule, deleteSurgerySchedule, getSurgeryScheduleDetail } from '@/api/surgicalschedule'
|
||||
import { listUser } from '@/api/system/user'
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
import { deptTreeSelectSelect } from '@/api/system/user'
|
||||
import { listOperatingRoom } from '@/api/operatingroom'
|
||||
import { getTestResultPage} from '@/views/inpatientDoctor/home/components/applicationShow/api.js'
|
||||
import { getTenantPage } from '@/api/system/tenant'
|
||||
import SurgeryCharge from './charge/surgerycharge/index.vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const loading = ref(true)
|
||||
@@ -1156,6 +1158,40 @@ function handleDelete(row) {
|
||||
})
|
||||
}
|
||||
|
||||
// 手术计费
|
||||
function handleChargeCharge(row) {
|
||||
// 打开手术计费对话框
|
||||
// 传递患者信息和手术信息
|
||||
const patientInfo = {
|
||||
encounterId: row.patientId, // 就诊ID
|
||||
patientId: row.patientId,
|
||||
patientName: row.patientName,
|
||||
genderEnum: row.gender,
|
||||
age: row.age,
|
||||
organizationName: row.applyDeptName,
|
||||
receptionTime: row.scheduleDate,
|
||||
encounterBusNo: row.visitId,
|
||||
categoryEnum: 1, // 门诊
|
||||
};
|
||||
|
||||
const surgeryInfo = {
|
||||
surgeryNo: row.operCode, // 手术单号
|
||||
surgeryName: row.operName, // 手术名称
|
||||
};
|
||||
|
||||
// 使用el-dialog显示手术计费组件
|
||||
proxy.$modal.open({
|
||||
title: '手术计费',
|
||||
component: SurgeryCharge,
|
||||
props: {
|
||||
patientInfo,
|
||||
surgeryInfo
|
||||
},
|
||||
width: '1400px',
|
||||
fullscreen: false,
|
||||
});
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
function resetForm() {
|
||||
Object.assign(form, {
|
||||
|
||||
Reference in New Issue
Block a user