| | |
| | | class="form-input" |
| | | type="digit" |
| | | placeholder="请输入公里数" |
| | | v-model="taskForm.distance" |
| | | v-model="taskForm.transferDistance" |
| | | /> |
| | | </view> |
| | | |
| | |
| | | }, |
| | | startAddress: '', |
| | | endAddress: '', |
| | | distance: '', |
| | | transferDistance: '', |
| | | price: '' |
| | | }, |
| | | vehicles: [], |
| | |
| | | this.addressCoordinates.endAddress.lat, |
| | | this.addressCoordinates.endAddress.lng |
| | | ).then(distance => { |
| | | this.taskForm.distance = distance.toFixed(2) |
| | | this.taskForm.transferDistance = distance.toFixed(2) |
| | | }).catch(error => { |
| | | console.error('距离计算失败:', error) |
| | | }) |
| | |
| | | passenger: this.taskForm.passenger, |
| | | startAddress: this.taskForm.startAddress, |
| | | endAddress: this.taskForm.endAddress, |
| | | distance: this.taskForm.distance ? parseFloat(this.taskForm.distance) : null, |
| | | transferDistance: this.taskForm.transferDistance ? parseFloat(this.taskForm.transferDistance) : null, |
| | | price: this.taskForm.price ? parseFloat(this.taskForm.price) : null |
| | | } |
| | | |