bug
This commit is contained in:
		@@ -274,7 +274,7 @@
 | 
			
		||||
      </div> -->
 | 
			
		||||
 | 
			
		||||
      <!-- 同行情况 -->
 | 
			
		||||
      <!-- <div class="title">同行情况</div>
 | 
			
		||||
      <div class="title">同行情况</div>
 | 
			
		||||
      <div class="form-item__group">
 | 
			
		||||
        <div class="form-item">
 | 
			
		||||
          <div class="form-item__wrapper">
 | 
			
		||||
@@ -294,7 +294,7 @@
 | 
			
		||||
          :phone.sync="item.phone" :index="index" @delCountHandle="delCountHandle"/>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="addCount" @click="addCountHandle" v-if="form.companionCount > 0">添加同行人</div>
 | 
			
		||||
      </div> -->
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <u-picker mode="time" :params="params" v-model="isShowStartTime" @confirm="onStartChange"></u-picker>
 | 
			
		||||
      <u-picker mode="time" :params="params" v-model="isShowEndTime" @confirm="onEndChange"></u-picker>
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -590,9 +590,9 @@ 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('请选择目的地')
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user