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" />