点击选择医生时,如果号源没选,返回时不展示日期(年月日),但默认把医生的日期设为默认

wenjuan
刘佳宇 1 year ago
parent c281c3b5f9
commit 6642a61f39

@ -182,6 +182,9 @@ const getTjTimeList = async (val) => {
}; };
apiText = "NMRGetDayPlanList"; apiText = "NMRGetDayPlanList";
} }
uni.showLoading({
title: "加载中",
});
const response = await $api(apiText, obj); const response = await $api(apiText, obj);
$response(response, () => { $response(response, () => {
console.log(response, "response"); console.log(response, "response");
@ -221,8 +224,8 @@ const changerl = (e) => {
if (isClickDoctor.value == 1) { if (isClickDoctor.value == 1) {
// //
status.value = 0; status.value = 0;
yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time = // yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time =
e.fulldate; // e.fulldate;
yytjInfo.value.doctor_date = e.fulldate; yytjInfo.value.doctor_date = e.fulldate;
$store.setYytjInfo(yytjInfo.value); $store.setYytjInfo(yytjInfo.value);
uni.navigateTo({ uni.navigateTo({
@ -233,9 +236,9 @@ const changerl = (e) => {
calendarShow.value = false; calendarShow.value = false;
return; return;
} }
uni.showLoading({ // uni.showLoading({
title: "加载中", // title: "",
}); // });
currentDate.value = e.fulldate; currentDate.value = e.fulldate;
time.value = ""; time.value = "";
timeIndex.value = null; timeIndex.value = null;
@ -259,14 +262,14 @@ const getCurrentClick = (item, i) => {
return; return;
} }
if (i != 3) { if (i != 3) {
if(yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0){ if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) {
yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => { yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => {
return { return {
...val, ...val,
time: "", time: "",
id: "" id: "",
} };
}) });
} }
time.value = ""; time.value = "";
timeIndex.value = null; timeIndex.value = null;
@ -309,7 +312,15 @@ const xmmcClick = (val, index) => {
if (val.time) { if (val.time) {
currentDate.value = val.time.split(" ")[0]; currentDate.value = val.time.split(" ")[0];
} else { } else {
currentDate.value = getToday(); if (
((yytjInfo.value.nmr_list.length > 1 && index == 1) ||
(yytjInfo.value.nmr_list.length == 1 && index == 0)) &&
yytjInfo.value.doctor_date
) {
currentDate.value = yytjInfo.value.doctor_date;
} else {
currentDate.value = getToday();
}
} }
// //
getTjTimeList(val); getTjTimeList(val);

Loading…
Cancel
Save