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

This commit is contained in:
2026-01-13 17:01:29 +08:00
5 changed files with 37 additions and 9 deletions

View File

@@ -127,8 +127,8 @@
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
<el-checkbox
label="主诊断"
:trueLabel="1"
:falseLabel="0"
:true-value="1"
:false-value="0"
v-model="scope.row.maindiseFlag"
border
size="small"
@@ -409,10 +409,10 @@ function getTree() {
function handleAddDiagnosis() {
proxy.$refs.formRef.validate((valid) => {
if (valid) {
// if (!allowAdd.value) {
// proxy.$modal.msgWarning('请先填写病历');
// return;
// }
const maxSortNo = form.value.diagnosisList.length > 0
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
: 0;
form.value.diagnosisList.push({
showPopover: false,
name: undefined,
@@ -491,6 +491,7 @@ function handleSaveDiagnosis() {
return false;
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
proxy.$modal.msgWarning('至少添加一条主诊断');
return false;
} else {
// 保存前按排序号排序
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));

View File

@@ -38,7 +38,7 @@ watch(
queryParams.value.searchKey = newValue;
getList();
},
{ immdiate: true }
{ immediate: true }
);
getList();

View File

@@ -2472,8 +2472,8 @@ function setValue(row) {
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
: 0;
prescriptionList.value[targetIndex] = {
...prescriptionList.value[targetIndex],
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...JSON.parse(JSON.stringify(row)),
// 确保adviceType为数字类型避免类型不匹配导致的显示问题
adviceType: Number(row.adviceType),

View File

@@ -775,6 +775,19 @@ function deletePrescription(prescription) {
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
if (index !== -1) {
const prescriptionData = tcmPrescriptionList.value[index];
if (prescriptionData.prescriptionList && prescriptionData.prescriptionList.length > 0) {
proxy.$modal.msgWarning('该处方单还有药品,请先删除所有药品后再删除处方单');
return;
}
const hasChargedItems = prescriptionData.prescriptionList && prescriptionData.prescriptionList.some(item => item.statusEnum === 2);
if (hasChargedItems) {
proxy.$modal.msgWarning('该处方单已收费,不能删除');
return;
}
tcmPrescriptionList.value.splice(index, 1);
}
}