wlzboy
2026-01-24 2f09efc660bf2cc94cbc5291ad25ca06fc9bdadf
app/pagesTask/edit.vue
@@ -53,7 +53,7 @@
          class="form-input" 
          type="digit" 
          placeholder="请输入行驶公里数" 
          v-model="taskForm.distance"
          v-model="taskForm.transferDistance"
        />
      </view>
      
@@ -165,7 +165,7 @@
        plannedEndTime: '',
        startLocation: '',
        endLocation: '',
        distance: '',
        transferDistance: '',
        remark: ''
      },
      loading: false
@@ -209,7 +209,7 @@
        this.taskForm.plannedEndTime = this.taskDetail.plannedEndTime || ''
        this.taskForm.startLocation = this.taskDetail.departureAddress || ''
        this.taskForm.endLocation = this.taskDetail.destinationAddress || ''
        this.taskForm.distance = this.taskDetail.estimatedDistance || ''
        this.taskForm.transferDistance = this.taskDetail.transferDistance || ''
        this.taskForm.remark = this.taskDetail.remark || ''
        
        // 设置车辆信息
@@ -289,7 +289,7 @@
      
      // 监听mixin中的距离计算完成事件
      this.$once('distance-calculated', (distance) => {
        this.taskForm.distance = this.formatDistance(distance)
        this.taskForm.transferDistance = this.formatDistance(distance)
      })
      
      this.closeMapSelector()
@@ -360,7 +360,7 @@
        destinationLatitude: this.addressCoordinates.endLocation ? this.addressCoordinates.endLocation.lat : null,
        
        // 距离(主任务字段)
        distance: this.taskForm.distance ? parseFloat(this.taskForm.distance) : null,
        transferDistance: this.taskForm.transferDistance ? parseFloat(this.taskForm.transferDistance) : null,
        
        remark: this.taskForm.remark
      }