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

This commit is contained in:
itcast
2026-01-16 15:46:43 +08:00
parent 2b3add4808
commit be0514bc08
86 changed files with 2224 additions and 3929 deletions

View File

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