Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,9 @@
|
||||
<el-col :span="24" class="card-box">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%">
|
||||
<span style="vertical-align: middle; font-size: 16px; font-weight: bold;">门诊挂号</span>
|
||||
<div class="header-buttons">
|
||||
<div style="display: flex; align-items: center; width: 100%">
|
||||
<span style="font-size: 16px; font-weight: bold; margin-right: 20px;">门诊挂号</span>
|
||||
<div style="flex: 1; display: flex; justify-content: center; align-items: center;">
|
||||
<el-button type="primary" icon="Document" @click="goToPatientRecord" size="small">档案</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAddPatient" size="small">新建</el-button>
|
||||
<el-button type="primary" plain icon="Search" @click="handleSearch" size="small">查询</el-button>
|
||||
@@ -420,6 +420,16 @@
|
||||
prop="genderEnum_enumText"
|
||||
/>
|
||||
<el-table-column label="联系电话" align="center" key="phone" prop="phone" />
|
||||
<el-table-column
|
||||
label="就诊卡号"
|
||||
align="center"
|
||||
key="identifierNo"
|
||||
width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.identifierNo || scope.row.cardNo || scope.row.card || scope.row.patientCardNo || scope.row.patient?.identifierNo || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="科室名称"
|
||||
align="center"
|
||||
@@ -593,6 +603,18 @@
|
||||
:chargeItemIds="chargeItemIdList"
|
||||
:eventType="eventType"
|
||||
/>
|
||||
<ReprintDialog
|
||||
:open="openReprintDialog"
|
||||
@close="
|
||||
(value) => {
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
}
|
||||
openReprintDialog = false;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -617,6 +639,7 @@ import patientList from './components/patientList';
|
||||
import {nextTick, onMounted, onUnmounted, ref} from 'vue';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import RefundDialog from './components/refundDialog.vue';
|
||||
import ReprintDialog from './components/reprintDialog.vue';
|
||||
import {handleColor} from '@/utils/his';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
@@ -709,7 +732,6 @@ const data = reactive({
|
||||
contractNo: [{ required: true, message: '费用性质', trigger: 'blur' }],
|
||||
patientId: [{ required: true, message: '病人不能为空', trigger: 'blur' }],
|
||||
priorityEnum: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
|
||||
serviceTypeId: [{ required: true, message: '挂号类型不能为空', trigger: 'blur' }],
|
||||
organizationId: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
|
||||
orgId: [{ required: true, message: '就诊科室不能为空', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '医生不能为空', trigger: 'blur' }],
|
||||
@@ -1026,10 +1048,18 @@ function getList() {
|
||||
outpatientRegistrationList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
|
||||
// 调试:查看返回的数据结构(仅退号记录查询时)
|
||||
if (queryType.value === 'returned' && res.data.records && res.data.records.length > 0) {
|
||||
console.log('退号记录数据结构:', res.data.records[0]);
|
||||
// 调试:查看返回的数据结构,查找就诊卡号字段
|
||||
if (res.data.records && res.data.records.length > 0) {
|
||||
console.log('当日已挂号数据结构:', res.data.records[0]);
|
||||
console.log('所有字段:', Object.keys(res.data.records[0]));
|
||||
// 查找可能的就诊卡号字段
|
||||
const firstRecord = res.data.records[0];
|
||||
const possibleCardFields = ['identifierNo', 'cardNo', 'card', 'patientCardNo', 'identifier', 'medicalCardNo'];
|
||||
possibleCardFields.forEach(field => {
|
||||
if (firstRecord[field] !== undefined) {
|
||||
console.log(`找到可能的就诊卡号字段 ${field}:`, firstRecord[field]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1106,7 +1106,7 @@ onMounted(() => {
|
||||
document.addEventListener('keydown', escKeyListener);
|
||||
// 初始化时自动创建第一个西药处方
|
||||
if (westernPrescriptions.value.length === 0) {
|
||||
handleAddPrescription();
|
||||
handleAddPrescription(null, false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1531,7 +1531,7 @@ function getListInfo(addNewRow) {
|
||||
});
|
||||
getGroupMarkers(); // 更新标记
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddPrescription();
|
||||
handleAddPrescription(null, false);
|
||||
}
|
||||
|
||||
// 在所有异步操作完成后 resolve Promise
|
||||
@@ -1595,14 +1595,16 @@ function handleSelectionChange(selection, row) {
|
||||
}
|
||||
|
||||
// 新增医嘱
|
||||
function handleAddPrescription(prescriptionId) {
|
||||
function handleAddPrescription(prescriptionId, showWarning = true) {
|
||||
// 如果传入了处方ID,先切换到该处方
|
||||
if (prescriptionId && prescriptionId !== currentPrescriptionId.value) {
|
||||
switchToActivePrescription(prescriptionId);
|
||||
}
|
||||
|
||||
if (diagnosisList.value.length == 0) {
|
||||
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
|
||||
if (showWarning) {
|
||||
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isAdding.value) {
|
||||
@@ -2291,7 +2293,7 @@ function handleSaveSign(row, index, prescriptionId) {
|
||||
});
|
||||
} else {
|
||||
if (prescriptionList.value[0].adviceName) {
|
||||
handleAddPrescription();
|
||||
handleAddPrescription(null, false);
|
||||
}
|
||||
}
|
||||
adviceQueryParams.value.adviceType = undefined;
|
||||
|
||||
@@ -145,14 +145,20 @@ const fetchAll = async () => {
|
||||
}
|
||||
loadingCheck.value = true;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
|
||||
// 独立处理,互不影响
|
||||
const runFetch = async (fn, loadingRef, name) => {
|
||||
try {
|
||||
await fn();
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`);
|
||||
} finally {
|
||||
loadingRef.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
runFetch(fetchCheckReport, loadingCheck, '检查报告');
|
||||
runFetch(fetchInspectionReport, loadingInspection, '检验报告');
|
||||
};
|
||||
|
||||
const handleRefreshCheck = async () => {
|
||||
|
||||
@@ -893,7 +893,7 @@ function selectAdviceBase(key, row, pIndex) {
|
||||
).chargeItemDefinitionId;
|
||||
|
||||
// 库存列表 + 价格列表拼成批次号的下拉框
|
||||
if (row.adviceType != 3) {
|
||||
if (row.adviceType == 1 || row.adviceType == 2) {
|
||||
if (row.inventoryList && row.inventoryList.length == 0) {
|
||||
prescription.expandOrder = [];
|
||||
proxy.$modal.msgWarning('该项目无库存');
|
||||
@@ -1069,23 +1069,32 @@ function handleSaveSign(row, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const formRefName = 'formRef' + pIndex + '-' + index;
|
||||
proxy.$refs[formRefName][0].validate((valid) => {
|
||||
row.isEdit = false;
|
||||
prescription.isAdding = false;
|
||||
prescription.expandOrder = [];
|
||||
row.contentJson = undefined;
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
row.accountId = prescription.accountId;
|
||||
row.quantity = row.minUnitQuantity;
|
||||
row.conditionId = prescription.conditionId;
|
||||
row.unitPrice =
|
||||
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
|
||||
? row.unitPrice
|
||||
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
|
||||
row.conditionDefinitionId = prescription.conditionDefinitionId;
|
||||
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
|
||||
row.diagnosisName = prescription.diagnosisName;
|
||||
row.contentJson = JSON.stringify(row);
|
||||
if (valid) {
|
||||
row.isEdit = false;
|
||||
prescription.isAdding = false;
|
||||
prescription.expandOrder = [];
|
||||
row.contentJson = undefined;
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
row.accountId = prescription.accountId;
|
||||
row.quantity = row.minUnitQuantity;
|
||||
row.chineseHerbsDoseQuantity = prescription.chineseHerbsDoseQuantity;
|
||||
row.unitPrice =
|
||||
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
|
||||
? row.unitPrice
|
||||
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
|
||||
row.conditionDefinitionId = prescription.conditionDefinitionId;
|
||||
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
|
||||
row.diagnosisName = prescription.diagnosisName;
|
||||
|
||||
// 寻找当前选中的单位字典值
|
||||
const selectedUnit = row.unitCodeList.find((item) => item.value === row.minUnitCode);
|
||||
if (selectedUnit) {
|
||||
row.doseUnitCode_dictText = selectedUnit.label;
|
||||
}
|
||||
|
||||
row.contentJson = JSON.stringify(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1144,6 +1144,7 @@ async function handleSave() {
|
||||
remark: formData.remark || '',
|
||||
createDate: formData.createDate,
|
||||
items: detailData.value.map((item, index) => ({
|
||||
// 基本字段(与检查套餐 CheckPackageDetail 对应)
|
||||
itemCode: item.code || '',
|
||||
itemName: item.itemName || '',
|
||||
checkItemId: item.itemId || null,
|
||||
@@ -1157,7 +1158,13 @@ async function handleSave() {
|
||||
serviceCharge: parseFloat(item.serviceCharge) || 0,
|
||||
total: parseFloat(item.total) || 0,
|
||||
origin: item.origin || '',
|
||||
orderNum: index + 1
|
||||
orderNum: index + 1,
|
||||
// 兼容字段(部分日志/历史代码使用的命名:dosage/route/serviceFee/totalAmount)
|
||||
// 后端当前不会用到这些别名字段,但保留便于排查和兼容
|
||||
dosage: item.dose || '',
|
||||
route: item.method || '',
|
||||
serviceFee: parseFloat(item.serviceCharge) || 0,
|
||||
totalAmount: parseFloat(item.total) || 0
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user