|
@@ -9,8 +9,13 @@
|
|
|
<view class="c-row">
|
|
|
<view class="title">车牌号</view>
|
|
|
<view class="con-list">
|
|
|
- <input :disabled='titleBtn=="申请报销"' v-model='detailData.carNo' placeholder="请输入车牌号" maxlength="7"></input>
|
|
|
+
|
|
|
+ <!-- <input :disabled='titleBtn=="申请报销"' v-model='detailData.carNo' placeholder="请输入车牌号" maxlength="7"></input> -->
|
|
|
</view>
|
|
|
+ <picker :range="carNolist" range-key="carNo" @change='carnopicker($event)'
|
|
|
+ :disabled='titleBtn=="申请报销"' mode="selector">
|
|
|
+ <view >{{detailData.carNo?detailData.carNo:'请选择车牌号'}}</view>
|
|
|
+ </picker>
|
|
|
</view>
|
|
|
<view @click='startTrack' class="button" v-if='titleBtn=="开始轨迹"'>{{titleBtn}}</view>
|
|
|
<view @click='endTrack' class="button1" v-if='titleBtn=="结束轨迹"'>{{titleBtn}}</view>
|
|
@@ -35,6 +40,8 @@
|
|
|
}],
|
|
|
carNo:'',
|
|
|
show:false,
|
|
|
+ show4:false,
|
|
|
+ carNolist:[],
|
|
|
detailData: {
|
|
|
carNo: '',
|
|
|
travelStatus: '',
|
|
@@ -81,11 +88,32 @@
|
|
|
uni.$off("page-popup-submit")
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
-
|
|
|
+ this.$api.doRequest('get', '/carInfo/selectCars', { currentPage:1,
|
|
|
+ pageSize:9999,
|
|
|
+ compId: uni.getStorageSync('pcUserInfo').compId,})
|
|
|
+ .then(res1 => {
|
|
|
+ if(res1.data.code==200){
|
|
|
+ this.carNolist=res1.data.data.records
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
this.id = options.id
|
|
|
that = this
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.$api.doRequest('post', '/CarPostionController/api/getlocation', {currentPage:1,
|
|
|
+ pageSize:9999,compId: uni.getStorageSync('pcUserInfo').compId,})
|
|
|
+ .then(res1 => {
|
|
|
+ // if(res1.data.code==200){
|
|
|
+ console.log(res1,11111111)
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
var that = this
|
|
|
if (this.id) {
|
|
|
console.log(1111111)
|
|
@@ -97,6 +125,9 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ carnopicker(e){
|
|
|
+ this.detailData.carNo=this.carNolist[e.target.value].carNo
|
|
|
+ },
|
|
|
getLngLat(type) {
|
|
|
this.checkOpenGPSServiceByAndroidIOS()
|
|
|
var that = this
|