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) {