From 11172e37171eeec09772e8ddcb714846d77324f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 12 Oct 2023 09:50:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A2=84=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesC/appointmenttime/appointmenttime.vue | 30 +++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pagesC/appointmenttime/appointmenttime.vue b/pagesC/appointmenttime/appointmenttime.vue index 2dca151..88bff04 100644 --- a/pagesC/appointmenttime/appointmenttime.vue +++ b/pagesC/appointmenttime/appointmenttime.vue @@ -26,19 +26,20 @@ appointlist: [], listitem: { bookingTime: '', + identity:'', }, datetimerange: [Date.now(), this.todayEndTime()], }; }, onLoad(e) { + console.log(e,'567') + this.userinfo = uni.getStorageSync('userinfo'); + // this.listitem.identity=this.userinfo.cardNo this.appointlist = JSON.parse(e.item) - // 改字段名 + console.log(this.appointlist,'56') + this.listitem = this.appointlist - this.listitem.formName = this.appointlist.projectName - this.listitem.packageNo = this.appointlist.packageId - this.listitem.formNo = this.appointlist.projectId - this.$delete(this.listitem, 'projectId') - this.$delete(this.listitem, 'projectName') + // this.single= new Date(); }, methods: { @@ -58,16 +59,24 @@ return todayTime }, submit() { - this.listitem.applyStartTime = this.datetimerange[0] - this.listitem.applyEndTime = this.datetimerange[1] + + if (this.listitem.sourceType == '1') { + this.listitem.packageNo = this.appointlist.packageId + this.listitem.formNo = this.appointlist.projectId + this.listitem.identity='372431196910127051' + this.listitem.applyStartTime = this.datetimerange[0] + this.listitem.applyEndTime = this.datetimerange[1] + this.listitem.formName = this.appointlist.projectName + this.$delete(this.listitem, 'projectId') + this.$delete(this.listitem, 'projectName') console.log(this.listitem, '55') detail(this.listitem).then(res => { // console.log(res) if (res.code == 200) { this.$refs.uToast.show({ title: '预约成功', - type: 'error' + type: 'success' }) } else if (res.code == '500') { this.$refs.uToast.show({ @@ -77,6 +86,9 @@ } }) } else if (this.listitem.sourceType == '2') { + this.listitem.identity='372431196910127051' + this.listitem.applyStartTime = this.datetimerange[0] + this.listitem.applyEndTime = this.datetimerange[1] console.log(this.listitem, '555') save(this.listitem).then(res => { if (res.code == 200) {