服务预约
This commit is contained in:
parent
585de51eff
commit
11172e3717
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user