Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Ranyunqiao
2026-05-12 12:21:46 +08:00
2 changed files with 19 additions and 14 deletions

View File

@@ -270,7 +270,7 @@ function normalizeDayTimeHm(part) {
return `${h}:${m}`; return `${h}:${m}`;
} }
function handleGetPrescription() { function handleGetPrescription(skipAutoSelectAll = false) {
if (patientInfoList.value.length > 0) { if (patientInfoList.value.length > 0) {
loading.value = true; loading.value = true;
let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(','); let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(',');
@@ -430,10 +430,12 @@ function handleGetPrescription() {
// 将分组结果转换为数组形式 // 将分组结果转换为数组形式
prescriptionList.value = Object.values(groupedPrescriptions); prescriptionList.value = Object.values(groupedPrescriptions);
// 默认选中全部行 // 默认选中全部行(执行后刷新时不自动全选,保持用户操作状态)
nextTick(() => { if (!skipAutoSelectAll) {
defaultSelectAllRows(); nextTick(() => {
}); defaultSelectAllRows();
});
}
} catch (error) { } catch (error) {
console.error('医嘱执行-获取处方列表数据处理失败:', error); console.error('医嘱执行-获取处方列表数据处理失败:', error);
prescriptionList.value = []; prescriptionList.value = [];
@@ -469,18 +471,17 @@ function handleExecute() {
console.log(list, 'list'); console.log(list, 'list');
adviceExecute({ exeDate: exeDate.value, adviceExecuteDetailList: list }).then((res) => { adviceExecute({ exeDate: exeDate.value, adviceExecuteDetailList: list }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
handleGetPrescription(); // 仅当选中医嘱中包含耗材类医嘱时,才调用耗材批号匹配(排除纯药品医嘱场景)
// 仅当选中医嘱中包含药品/耗材类医嘱时,才调用耗材批号匹配 const hasDevice = list.some((item) =>
const hasMedOrDevice = list.some( String(item.adviceTable || '').includes('device'),
(item) =>
item.adviceTable === 'med_medication_request' ||
String(item.adviceTable || '').includes('device'),
); );
if (hasMedOrDevice) { if (hasDevice) {
lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => { lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => {
console.warn('lotNumberMatch failed after adviceExecute:', error); console.warn('lotNumberMatch failed after adviceExecute:', error);
}); });
} }
// 刷新列表(不自动全选,保持用户操作前的选择状态)
handleGetPrescription(true);
proxy.$modal.msgSuccess(res.msg || '医嘱执行成功'); proxy.$modal.msgSuccess(res.msg || '医嘱执行成功');
} else { } else {
proxy.$modal.msgError(res.msg || '医嘱执行失败'); proxy.$modal.msgError(res.msg || '医嘱执行失败');
@@ -504,7 +505,7 @@ function handleNoExecute() {
adviceNoExecute({ adviceExecuteDetailList: list }).then((res) => { adviceNoExecute({ adviceExecuteDetailList: list }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
proxy.$modal.msgSuccess(res.msg || '操作成功'); proxy.$modal.msgSuccess(res.msg || '操作成功');
handleGetPrescription(); handleGetPrescription(true);
} else { } else {
proxy.$modal.msgError(res.msg || '操作失败'); proxy.$modal.msgError(res.msg || '操作失败');
} }
@@ -543,7 +544,7 @@ function handleCancel() {
adviceCancel({ adviceExecuteDetailList: producerIds }).then((res) => { adviceCancel({ adviceExecuteDetailList: producerIds }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
proxy.$modal.msgSuccess(res.msg || '取消执行成功'); proxy.$modal.msgSuccess(res.msg || '取消执行成功');
handleGetPrescription(); handleGetPrescription(true);
} else { } else {
proxy.$modal.msgError(res.msg || '取消执行失败'); proxy.$modal.msgError(res.msg || '取消执行失败');
} }

View File

@@ -1412,6 +1412,10 @@ async function handleChargeCharge(row) {
// 关闭计费弹窗 // 关闭计费弹窗
function closeChargeDialog() { function closeChargeDialog() {
// 先关闭 prescriptionlist 内所有已打开的项目字典 popover
if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) {
prescriptionRef.value.closeAllPopovers()
}
showChargeDialog.value = false showChargeDialog.value = false
chargePatientInfo.value = {} chargePatientInfo.value = {}
chargeSurgeryInfo.value = {} chargeSurgeryInfo.value = {}