diff --git a/pagesB/confirmation/confirmation.vue b/pagesB/confirmation/confirmation.vue index ac99419..8ec846b 100644 --- a/pagesB/confirmation/confirmation.vue +++ b/pagesB/confirmation/confirmation.vue @@ -255,23 +255,25 @@ if (item == 'morning') { this.formdata.appointmentStartTime = this.appointmentTimeList[this.timecurrent].morningList[0] .starttime - if(this.appointmentTimeList[this.timecurrent].morningList[0].status==true){ - this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].morningList[0].schedulePlanDetailId - - }else{ - this.formdata.schedulePlanDetailId='' - - } + if (this.appointmentTimeList[this.timecurrent].morningList[0].status == true) { + this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].morningList[0] + .schedulePlanDetailId + + } else { + this.formdata.schedulePlanDetailId = '' + + } } else if (item == 'after') { this.formdata.appointmentEndTime = this.appointmentTimeList[this.timecurrent].morningList[0] .endtime - if(this.appointmentTimeList[this.timecurrent].morningList[0].status==true){ - this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].afternoonList[0].schedulePlanDetailId - - }else{ - this.formdata.schedulePlanDetailId='' - - } + if (this.appointmentTimeList[this.timecurrent].morningList[0].status == true) { + this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].afternoonList[0] + .schedulePlanDetailId + + } else { + this.formdata.schedulePlanDetailId = '' + + } } }, @@ -291,13 +293,14 @@ .starttime this.formdata.appointmentEndTime = this.appointmentTimeList[this.timecurrent].morningList[0] .endtime - if(this.appointmentTimeList[this.timecurrent].morningList[0].status==true){ - this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].morningList[0].schedulePlanDetailId - - }else{ - this.formdata.schedulePlanDetailId='' - - } + if (this.appointmentTimeList[this.timecurrent].morningList[0].status == true) { + this.formdata.schedulePlanDetailId = this.appointmentTimeList[this.timecurrent].morningList[0] + .schedulePlanDetailId + + } else { + this.formdata.schedulePlanDetailId = '' + + } } }, updata() { @@ -423,18 +426,19 @@ .morningList[0].starttime : '' res.data[0]?.morningList[0]?.endtime ? this.formdata.appointmentEndTime = res.data[0] .morningList[0].endtime : '' - if(res.data[0]?.morningList[0]?.status==true){ - res.data[0]?.morningList[0]?.scheduleDetailId ? this.formdata.scheduleDetailId = res.data[0] - .morningList[0].scheduleDetailId : '' - - }else{ - this.formdata.scheduleDetailId='' - - } - - + if (res.data[0]?.morningList[0]?.status == true) { + res.data[0]?.morningList[0]?.scheduleDetailId ? this.formdata.scheduleDetailId = res.data[ + 0] + .morningList[0].scheduleDetailId : '' + + } else { + this.formdata.scheduleDetailId = '' + + } + + this.appointmentTimeList = res.data - console.log(this.appointmentTimeList,'0000') + console.log(this.appointmentTimeList, '0000') }) }, // 显示三级地址联动 @@ -470,4 +474,4 @@ + \ No newline at end of file