diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue index 1ef2ac86..a0519226 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue @@ -176,6 +176,8 @@ const projectWithDepartment = (selectProjectIds, type) => { }); arr.push(searchData); }); + // 保存用户手动选择的发往科室(提交时需要保留) + const manualDept = type === 2 ? form.targetDepartment : ''; // 清空科室 form.targetDepartment = ''; if (arr.length > 0) { @@ -194,11 +196,17 @@ const projectWithDepartment = (selectProjectIds, type) => { // 选中项目中的执行科室id与全部科室数据做匹配 const findItem = findTreeItem(orgOptions.value, obj.orgId); if (!findItem) { - isRelease = false; - ElMessage({ - type: 'error', - message: '未找到项目执行的科室', - }); + // type=2(提交)时,若用户已手动选择发往科室,则允许提交 + if (type === 2 && manualDept) { + form.targetDepartment = manualDept; + isRelease = true; + } else { + isRelease = false; + ElMessage({ + type: 'error', + message: '未找到项目执行的科室', + }); + } } if (type == 1) { if (isRelease) { @@ -232,7 +240,7 @@ const submit = () => { unitCode: item.priceList[0].unitCode /** 请求单位编码 */, unitPrice: item.priceList[0].price /** 单价 */, totalPrice: item.priceList[0].price /** 总价 */, - positionId: item.positionId, //执行科室id + positionId: item.positionId || form.targetDepartment, //执行科室id,未配置时使用用户手动选择的科室 ybClassEnum: item.ybClassEnum, //类别医保编码 conditionId: item.conditionId, //诊断ID encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id