diff --git a/src/project/pingchang/AppGetewayRegister/getewayAdd.vue b/src/project/pingchang/AppGetewayRegister/getewayAdd.vue index 3716992..c4afdba 100644 --- a/src/project/pingchang/AppGetewayRegister/getewayAdd.vue +++ b/src/project/pingchang/AppGetewayRegister/getewayAdd.vue @@ -110,7 +110,7 @@ -
+ - +
@@ -449,9 +449,9 @@ export default { this.people.splice(index, 1); }, - onStartChange(e) { - this.form.startTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}` - }, + // onStartChange(e) { + // this.form.startTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}` + // }, onEndChange(e) { this.form.arriveTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}` @@ -472,7 +472,7 @@ export default { this.form = res.data this.people = res.data.companionList this.travelType = res.data.travelType?.split(',') - this.form.startTime = res.data.startTime.substr(0, res.data.startTime.length - 3) + // this.form.startTime = res.data.startTime.substr(0, res.data.startTime.length - 3) this.form.arriveTime = res.data.arriveTime.substr(0, res.data.arriveTime.length - 3) this.startAreaId = res.data.startAreaId this.startAreaName = res.data.startAreaName @@ -526,7 +526,7 @@ export default { this.startAreaName = res.data.startAreaName this.form.arriveAreaId = res.data.arriveAreaId this.form.arriveAreaName = res.data.arriveAreaName - this.form.startAddress = res.data.startAddress || '' + // this.form.startAddress = res.data.startAddress || '' this.form.arriveAddress = res.data.arriveAddress || '' } }) @@ -571,7 +571,7 @@ export default { // } if (!this.startAreaId) { - return this.$toast('请选择出发地') + return this.$toast('请选择从哪来') } if (this.startAreaId.substr(4,this.startAreaId.length - 4) === '00000000') { @@ -590,12 +590,12 @@ export default { return this.$toast('请选择抵平时间') } - if (new Date(this.form.startTime.replace(/-/g, '/')).getTime() >= new Date(this.form.arriveTime.replace(/-/g, '/')).getTime()) { - return this.$toast('到达时间不得早于出发时间') - } + // if (new Date(this.form.startTime.replace(/-/g, '/')).getTime() >= new Date(this.form.arriveTime.replace(/-/g, '/')).getTime()) { + // return this.$toast('到达时间不得早于出发时间') + // } if (!this.form.arriveAreaName) { - return this.$toast('请选择目的地') + return this.$toast('请选择到哪去') } if (this.form.arriveAreaId.substr(this.form.arriveAreaId.length - 3, 3) === '000') { @@ -630,25 +630,25 @@ export default { // } // } - // if (!this.form.companionCount || this.form.companionCount == 0) { - // this.form.companionCount = 0 - // this.form.companionList = [] - // } else { + if (!this.form.companionCount || this.form.companionCount == 0) { + this.form.companionCount = 0 + this.form.companionList = [] + } else { - // if(this.form.companionCount > 100) { - // return this.$u.toast('同行人数最多可填写100人。') - // } + if(this.form.companionCount > 100) { + return this.$u.toast('同行人数最多可填写100人。') + } - // if(this.people.length != this.form.companionCount) { - // return this.$u.toast('请输入正确的同行人信息') - // } else { - // if(this.people.some(val=> (val.name=='') || (val.phone=='')) ) { - // return this.$u.toast('请输入完整的同行人信息') - // } else { - // this.form.companionList = this.people - // } - // } - // } + if(this.people.length != this.form.companionCount) { + return this.$u.toast('请输入正确的同行人信息') + } else { + if(this.people.some(val=> (val.name=='') || (val.phone=='')) ) { + return this.$u.toast('请输入完整的同行人信息') + } else { + this.form.companionList = this.people + } + } + } if (this.flag) return this.flag = true @@ -659,7 +659,7 @@ export default { startAreaId: this.startAreaId, startAreaName: this.startAreaName, travelType: this.travelType.toString(), - startTime: this.form.startTime + ':00', + // startTime: this.form.startTime + ':00', arriveTime: this.form.arriveTime + ':00', }).then(res => { this.$hideLoading()