测试:科室预约工作时间维护
This commit is contained in:
@@ -401,6 +401,20 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
// 删除
|
// 删除
|
||||||
List<AdviceSaveDto> deleteList = medicineList.stream()
|
List<AdviceSaveDto> deleteList = medicineList.stream()
|
||||||
.filter(e -> DbOpType.DELETE.getCode().equals(e.getDbOpType())).collect(Collectors.toList());
|
.filter(e -> DbOpType.DELETE.getCode().equals(e.getDbOpType())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 校验删除的医嘱是否已经收费
|
||||||
|
List<Long> delRequestIdList = deleteList.stream().map(AdviceSaveDto::getRequestId).collect(Collectors.toList());
|
||||||
|
if (!delRequestIdList.isEmpty()) {
|
||||||
|
List<ChargeItem> chargeItemList = iChargeItemService.getChargeItemInfoByReqId(delRequestIdList);
|
||||||
|
if (chargeItemList != null && !chargeItemList.isEmpty()) {
|
||||||
|
for (ChargeItem ci : chargeItemList) {
|
||||||
|
if (ChargeItemStatus.BILLED.getValue().equals(ci.getStatusEnum())) {
|
||||||
|
return R.fail("已收费的项目无法删除,请刷新页面后重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (AdviceSaveDto adviceSaveDto : deleteList) {
|
for (AdviceSaveDto adviceSaveDto : deleteList) {
|
||||||
iMedicationRequestService.removeById(adviceSaveDto.getRequestId());
|
iMedicationRequestService.removeById(adviceSaveDto.getRequestId());
|
||||||
// 删除已经产生的药品发放信息
|
// 删除已经产生的药品发放信息
|
||||||
|
|||||||
@@ -127,8 +127,8 @@
|
|||||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
label="主诊断"
|
label="主诊断"
|
||||||
:trueLabel="1"
|
:true-value="1"
|
||||||
:falseLabel="0"
|
:false-value="0"
|
||||||
v-model="scope.row.maindiseFlag"
|
v-model="scope.row.maindiseFlag"
|
||||||
border
|
border
|
||||||
size="small"
|
size="small"
|
||||||
@@ -409,10 +409,10 @@ function getTree() {
|
|||||||
function handleAddDiagnosis() {
|
function handleAddDiagnosis() {
|
||||||
proxy.$refs.formRef.validate((valid) => {
|
proxy.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// if (!allowAdd.value) {
|
const maxSortNo = form.value.diagnosisList.length > 0
|
||||||
// proxy.$modal.msgWarning('请先填写病历');
|
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
|
||||||
// return;
|
: 0;
|
||||||
// }
|
|
||||||
form.value.diagnosisList.push({
|
form.value.diagnosisList.push({
|
||||||
showPopover: false,
|
showPopover: false,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
@@ -491,6 +491,7 @@ function handleSaveDiagnosis() {
|
|||||||
return false;
|
return false;
|
||||||
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
|
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
|
||||||
proxy.$modal.msgWarning('至少添加一条主诊断');
|
proxy.$modal.msgWarning('至少添加一条主诊断');
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// 保存前按排序号排序
|
// 保存前按排序号排序
|
||||||
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
|
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ watch(
|
|||||||
queryParams.value.searchKey = newValue;
|
queryParams.value.searchKey = newValue;
|
||||||
getList();
|
getList();
|
||||||
},
|
},
|
||||||
{ immdiate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@@ -2472,8 +2472,8 @@ function setValue(row) {
|
|||||||
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
|
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
prescriptionList.value[targetIndex] = {
|
prescriptionList.value[rowIndex.value] = {
|
||||||
...prescriptionList.value[targetIndex],
|
...prescriptionList.value[rowIndex.value],
|
||||||
...JSON.parse(JSON.stringify(row)),
|
...JSON.parse(JSON.stringify(row)),
|
||||||
// 确保adviceType为数字类型,避免类型不匹配导致的显示问题
|
// 确保adviceType为数字类型,避免类型不匹配导致的显示问题
|
||||||
adviceType: Number(row.adviceType),
|
adviceType: Number(row.adviceType),
|
||||||
|
|||||||
@@ -775,6 +775,19 @@ function deletePrescription(prescription) {
|
|||||||
|
|
||||||
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
|
const index = tcmPrescriptionList.value.findIndex((p) => p.id === prescription.id);
|
||||||
if (index !== -1) {
|
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);
|
tcmPrescriptionList.value.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user