更新 体检时间优化

main
鹿和sa0ChunLuyu 1 year ago
parent 1f98ec9350
commit fd110bbc0e

@ -273,27 +273,29 @@
nmrIndex.value == yytjInfo.value.nmr_list.length - 1 && nmrIndex.value == yytjInfo.value.nmr_list.length - 1 &&
yytjInfo.value.doctor_date yytjInfo.value.doctor_date
) { ) {
console.log("切换体检时间"); console.log("切换体检时间");
uni.showModal({ if(!!yytjInfo.value.doctor_name) {
title: "提示", uni.showModal({
content: "已选择医生,切换日期将重新选择医生,是否继续", title: "提示",
showCancel: true, content: "已选择医生,切换日期将重新选择医生,是否继续",
success: ({ showCancel: true,
confirm success: ({
}) => { confirm
if (confirm) { }) => {
currentDate.value = e.fulldate; if (confirm) {
time.value = ""; currentDate.value = e.fulldate;
timeIndex.value = null; time.value = "";
yytjInfo.value.nmr_list[nmrIndex.value].time = ""; timeIndex.value = null;
yytjInfo.value.nmr_list[nmrIndex.value].id = ""; yytjInfo.value.nmr_list[nmrIndex.value].time = "";
yytjInfo.value.doctor_name = ""; // yytjInfo.value.nmr_list[nmrIndex.value].id = "";
getTjTimeList(yytjInfo.value.nmr_list[nmrIndex.value]); yytjInfo.value.doctor_name = ""; //
calendarShow.value = false; getTjTimeList(yytjInfo.value.nmr_list[nmrIndex.value]);
} calendarShow.value = false;
}, }
}); },
return; });
return;
}
} }
// uni.showLoading({ // uni.showLoading({
// title: "", // title: "",
@ -327,39 +329,41 @@
nmrIndex.value == yytjInfo.value.nmr_list.length - 1 && nmrIndex.value == yytjInfo.value.nmr_list.length - 1 &&
yytjInfo.value.doctor_date yytjInfo.value.doctor_date
) { ) {
console.log("切换体检时间"); console.log("切换体检时间");
uni.showModal({ if(!!yytjInfo.value.doctor_name){
title: "提示", uni.showModal({
content: "已选择医生,切换日期将重新选择医生,是否继续", title: "提示",
showCancel: true, content: "已选择医生,切换日期将重新选择医生,是否继续",
success: ({ showCancel: true,
confirm success: ({
}) => { confirm
console.log(confirm); }) => {
if (confirm) { console.log(confirm);
if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) { if (confirm) {
yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => { if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) {
return { yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => {
...val, return {
time: "", ...val,
id: "", time: "",
}; id: "",
}); };
} });
time.value = ""; }
timeIndex.value = null; time.value = "";
yytjInfo.value.nmr_list[nmrIndex.value].time = ""; timeIndex.value = null;
yytjInfo.value.nmr_list[nmrIndex.value].id = ""; yytjInfo.value.nmr_list[nmrIndex.value].time = "";
yytjInfo.value.doctor_name = ""; // yytjInfo.value.nmr_list[nmrIndex.value].id = "";
yytjInfo.value.doctor_date = ""; // yytjInfo.value.doctor_name = ""; //
$store.setYytjInfo(yytjInfo.value); yytjInfo.value.doctor_date = ""; //
status.value = 0; $store.setYytjInfo(yytjInfo.value);
currentDate.value = item.date; status.value = 0;
getTjTimeList(item); // currentDate.value = item.date;
} getTjTimeList(item); //
}, }
}); },
return; });
return;
}
} }
if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) { if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) {
if (!yytjInfo.value.doctor_name) { if (!yytjInfo.value.doctor_name) {

Loading…
Cancel
Save