From b64f539826158b05b5fec28d36fd468431d2738a Mon Sep 17 00:00:00 2001 From: yanzai Date: Tue, 7 Jan 2025 14:50:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=80=89=E6=8B=A9=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/selectDoctor/selectDoctor.vue | 55 +++++++++++++++++++-- h5/pages/main/yytjsj/yytjsj.vue | 3 ++ 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/h5/pages/main/selectDoctor/selectDoctor.vue b/h5/pages/main/selectDoctor/selectDoctor.vue index 49a841d..c1d96bb 100755 --- a/h5/pages/main/selectDoctor/selectDoctor.vue +++ b/h5/pages/main/selectDoctor/selectDoctor.vue @@ -20,6 +20,7 @@ useStore } from "@/store"; const $store = useStore(); + let currentDate=ref(""); let dqDate = ref(""); let yytjInfo = ref({}); // 预约信息 let user_person = ref({}); @@ -108,6 +109,49 @@ } }; const clickDoctor = (item) => { + + if(!!yytjInfo.value.nmr_list && yytjInfo.value.nmr_list[0].time.substring(0,10) != selectedDate.value && selectedDate.value!='' &&selectedDate.value!=null){ + console.log('日期不一致'); + uni.showModal({ + title: "提示", + content: "已选择体检日期,切换日期需要重新选择体检号源,是否继续", + showCancel: true, + success: ({ + confirm + }) => { + if (confirm) { + console.log(yytjInfo.value.nmr_list[0].time.substring(0,7)); + console.log( selectedDate.value); + //return false; + yytjInfo.value.doctor_date = selectedDate.value; + yytjInfo.value.nmr_list[0].time = ""; + yytjInfo.value.nmr_list[0].id = ""; + $store.setYytjInfo(yytjInfo.value); + + yytjInfo.value.doctor_name = item.name; + yytjInfo.value.doctor_id = item.id; + yytjInfo.value.nmrIndex = -1; + $store.setYytjInfo(yytjInfo.value); + if ($props.month == 'all') { + let riqiurl='' + if(dqDate.value){ + riqiurl='?date='+dqDate.value; + } + uni.navigateTo({ + url: '/pages/main/ysdate/ysdate_new'+riqiurl + }) + } else { + // 关闭当前页面携带医生名称返回上一个,,并且携带item.name + uni.navigateBack({ + delta: 1, + }); + } + } + }, + }); + return; + } + yytjInfo.value.doctor_name = item.name; yytjInfo.value.doctor_id = item.id; yytjInfo.value.nmrIndex = -1; @@ -173,7 +217,7 @@ } else { let str = `${givenDate.year}-${givenDate.month}`; nowMonth.value=str - moreTime(str, 0); + //moreTime(str, 0); RiLiGetDoctorPaiBanFuc() } }; @@ -182,11 +226,14 @@ console.log(e) dqDate.value = e.fulldate zhou_firstday.value = e.fulldate + selectedDate.value=e.fulldate getdoctorList() } onShow(() => { - selectedDate.value = '' - dqDate.value = '' + zhou_firstday.value = $props.date ? $props.date : ""; + selectedDate.value = $props.date ? $props.date : "" + dqDate.value = $props.date ? $props.date : "" + currentDate.value=selectedDate.value console.log($props.month); if (!!config_ref.value) { mountedAction(); @@ -256,7 +303,7 @@ + :date="currentDate" @confirm="RiLiDateFunc" @monthSwitch="monthSwitch" />