医生排班日期的正确插入

This commit is contained in:
HuangXinQuan
2026-02-05 16:00:56 +08:00
parent 74892ea80f
commit f69de5e78f
8 changed files with 161 additions and 6 deletions

View File

@@ -377,7 +377,7 @@ import {ElDialog, ElForm, ElFormItem, ElInput, ElMessage, ElMessageBox, ElOption
import {DocumentRemove, EditPen, View, Delete} from '@element-plus/icons-vue'
import {listDept, searchDept} from '@/api/appoinmentmanage/dept'
import {getLocationTree, getPractitionerMetadata, getHealthcareMetadata} from '@/views/charge/outpatientregistration/components/outpatientregistration'
import {addDoctorSchedule, updateDoctorSchedule, deleteDoctorSchedule, getRegisterOrganizations, getDoctorScheduleListByDeptId} from './api'
import {addDoctorSchedule, addDoctorScheduleWithDate, updateDoctorSchedule, deleteDoctorSchedule, getRegisterOrganizations, getDoctorScheduleListByDeptId} from './api'
import {getClinicRoomList} from '@/api/appoinmentmanage/clinicRoom'
import {getInitOption, getRegistrationItems, getClinicItems} from '@/views/basicservices/registrationfee/components/registrationfee'
import { deptTreeSelect } from '@/api/system/user'
@@ -1534,6 +1534,7 @@ const handleSave = async () => {
isStopped: item.stopClinic,
stopReason: item.stopClinic ? (item.stopReason || '') : '',
deptId: currentDept.value?.id || null,
scheduledDate: item.date // 添加具体日期字段
};
if (item.backendId) {
scheduleData.id = item.backendId;
@@ -1557,7 +1558,7 @@ const handleSave = async () => {
// 处理新增
for (const { scheduleData } of recordsToAdd) {
try {
const res = await addDoctorSchedule(scheduleData);
const res = await addDoctorScheduleWithDate(scheduleData);
if (res.code === 200) {
addSuccess++;
} else {