|
@@ -64,12 +64,13 @@
|
|
<view class='row-between'>
|
|
<view class='row-between'>
|
|
<view class="">预计运费(元)</view>
|
|
<view class="">预计运费(元)</view>
|
|
{{detailData.freight ? detailData.freight:"来自合同"}}
|
|
{{detailData.freight ? detailData.freight:"来自合同"}}
|
|
- <!-- <view class=""><input class="input" type="text" value="" v-model="detailData.carrierInfo.freight"
|
|
|
|
|
|
+ <!-- <view class=""><input class="input" type="text" value="" v-model="detailData.carrierInfo.freight"
|
|
placeholder="请输入运费"></view> -->
|
|
placeholder="请输入运费"></view> -->
|
|
</view>
|
|
</view>
|
|
<view class='row-between'>
|
|
<view class='row-between'>
|
|
<view class="">定位</view>
|
|
<view class="">定位</view>
|
|
- <view class="flex align-center">{{detailData.carrierInfo?detailData.carrierInfo.sendCity:""}} {{detailData.carrierInfo?detailData.carrierInfo.sendArea:""}}
|
|
|
|
|
|
+ <view class="flex align-center">{{localtion.city}}
|
|
|
|
+ {{localtion.sendArea}}
|
|
<view class="sx-style" @click.stop="getLngLat()">刷新</view>
|
|
<view class="sx-style" @click.stop="getLngLat()">刷新</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -106,6 +107,11 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ cyId:'',
|
|
|
|
+ localtion:{
|
|
|
|
+ city:'',
|
|
|
|
+ sendArea:''
|
|
|
|
+ },
|
|
imgList: [],
|
|
imgList: [],
|
|
fileList1: [],
|
|
fileList1: [],
|
|
showDate: false,
|
|
showDate: false,
|
|
@@ -113,8 +119,8 @@
|
|
id: '',
|
|
id: '',
|
|
sourceType: ['camera'],
|
|
sourceType: ['camera'],
|
|
detailData: {
|
|
detailData: {
|
|
- carrierInfo: {},
|
|
|
|
- loadingDate:{}
|
|
|
|
|
|
+ hyCarrierInfo: {},
|
|
|
|
+ loadingDate: {}
|
|
},
|
|
},
|
|
action: this.$helper.ossUploadUrl,
|
|
action: this.$helper.ossUploadUrl,
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
@@ -127,13 +133,14 @@
|
|
gjList: [],
|
|
gjList: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onLoad(options) {
|
|
|
|
|
|
+ onLoad(options) {debugger
|
|
that = this
|
|
that = this
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
this.getLngLat();
|
|
this.getLngLat();
|
|
// #endif
|
|
// #endif
|
|
console.log(options)
|
|
console.log(options)
|
|
this.id = JSON.parse(decodeURIComponent(options.obj)).id
|
|
this.id = JSON.parse(decodeURIComponent(options.obj)).id
|
|
|
|
+ this.cyId = JSON.parse(decodeURIComponent(options.obj)).carrierId
|
|
this.getInfo()
|
|
this.getInfo()
|
|
// this.detailData = JSON.parse(options.obj) ;
|
|
// this.detailData = JSON.parse(options.obj) ;
|
|
// console.log(this.detailData)
|
|
// console.log(this.detailData)
|
|
@@ -160,7 +167,7 @@
|
|
// {latitude: 39.999861, longitude: 116.484648}
|
|
// {latitude: 39.999861, longitude: 116.484648}
|
|
// ]
|
|
// ]
|
|
// a(){},
|
|
// a(){},
|
|
- toSignContract(){
|
|
|
|
|
|
+ toSignContract() {
|
|
uni.$u.route('/pages/order/signContract', {
|
|
uni.$u.route('/pages/order/signContract', {
|
|
obj: JSON.stringify(this.detailData),
|
|
obj: JSON.stringify(this.detailData),
|
|
});
|
|
});
|
|
@@ -169,7 +176,7 @@
|
|
this.showDate = true
|
|
this.showDate = true
|
|
},
|
|
},
|
|
confirmDate(e) {
|
|
confirmDate(e) {
|
|
- this.detailData.carrierInfo.loadingDate = e[0]
|
|
|
|
|
|
+ this.detailData.hyCarrierInfo.loadingDate = e[0]
|
|
this.showDate = false
|
|
this.showDate = false
|
|
},
|
|
},
|
|
getInfo() {
|
|
getInfo() {
|
|
@@ -181,14 +188,14 @@
|
|
this.$request.baseRequest('get', '/carrierInfo/getHyCarrierInfo', {
|
|
this.$request.baseRequest('get', '/carrierInfo/getHyCarrierInfo', {
|
|
orderId: this.detailData.id,
|
|
orderId: this.detailData.id,
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- if(res.data){
|
|
|
|
- this.detailData.carNo = res.data.carNo
|
|
|
|
- this.detailData.loadingDate =res.data.loadingDate
|
|
|
|
- this.detailData.weight =res.data. loadingWeight
|
|
|
|
|
|
+ if (res.data) {
|
|
|
|
+ this.detailData.carNo = res.data.carNo
|
|
|
|
+ this.detailData.loadingDate = res.data.loadingDate
|
|
|
|
+ this.detailData.weight = res.data.loadingWeight
|
|
this.detailData.freight = res.data.estimatedFreight
|
|
this.detailData.freight = res.data.estimatedFreight
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
// this.detailData.contractNo = ''
|
|
// this.detailData.contractNo = ''
|
|
// this.detailData.id = this.detailData.carrierId
|
|
// this.detailData.id = this.detailData.carrierId
|
|
// this.detailData.carrierInfo.loadingDate = ''
|
|
// this.detailData.carrierInfo.loadingDate = ''
|
|
@@ -210,14 +217,14 @@
|
|
}
|
|
}
|
|
|
|
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//车牌号弹出键盘
|
|
//车牌号弹出键盘
|
|
handleShowKeyboard() {
|
|
handleShowKeyboard() {
|
|
- if (this.detailData.carrierInfo.carNo == '') {
|
|
|
|
|
|
+ if (this.detailData.hyCarrierInfo.carNo == '') {
|
|
this.carNumber = ''
|
|
this.carNumber = ''
|
|
} else {
|
|
} else {
|
|
- this.carNumber = this.detailData.carrierInfo.carNo
|
|
|
|
|
|
+ this.carNumber = this.detailData.hyCarrierInfo.carNo
|
|
}
|
|
}
|
|
if (this.$refs.keyboard.open) {
|
|
if (this.$refs.keyboard.open) {
|
|
this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
|
|
this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
|
|
@@ -233,93 +240,98 @@
|
|
//车牌号弹出键盘
|
|
//车牌号弹出键盘
|
|
handleClick(e) {
|
|
handleClick(e) {
|
|
this.carNumber = e.value
|
|
this.carNumber = e.value
|
|
- this.detailData.carrierInfo.carNo = e.value //键盘输入值
|
|
|
|
|
|
+ this.detailData.hyCarrierInfo.carNo = e.value //键盘输入值
|
|
},
|
|
},
|
|
getLngLat() {
|
|
getLngLat() {
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '获取定位中',
|
|
title: '获取定位中',
|
|
mask: true
|
|
mask: true
|
|
})
|
|
})
|
|
- this.$helper.fUN_AmapLocation.start({
|
|
|
|
- intervalTime: 1000 * 3,
|
|
|
|
- isReport: false,
|
|
|
|
- },
|
|
|
|
- res => {
|
|
|
|
- //见下方定位返回示例
|
|
|
|
- console.log('====fUN_AmapLocation定位====', JSON.stringify(res));
|
|
|
|
- if (res.latitude) {
|
|
|
|
- this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
|
|
|
|
- this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
|
|
|
|
- this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.city)
|
|
|
|
- this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.district);
|
|
|
|
- console.log(this.detailData.carrierInfo.sendCity)
|
|
|
|
- console.log(this.detailData.carrierInfo.sendArea)
|
|
|
|
- this.$forceUpdate()
|
|
|
|
|
|
+ // this.$helper.fUN_AmapLocation.start({
|
|
|
|
+ // intervalTime: 1000 * 3,
|
|
|
|
+ // isReport: false,
|
|
|
|
+ // },
|
|
|
|
+ // res => {
|
|
|
|
+ // //见下方定位返回示例
|
|
|
|
+ // console.log('====fUN_AmapLocation定位====', JSON.stringify(res));
|
|
|
|
+ // if (res.latitude) {
|
|
|
|
+ // this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
|
|
|
|
+ // this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
|
|
|
|
+ // this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.city)
|
|
|
|
+ // this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.district);
|
|
|
|
+ // console.log(this.detailData.carrierInfo.sendCity)
|
|
|
|
+ // console.log(this.detailData.carrierInfo.sendArea)
|
|
|
|
+ // this.$forceUpdate()
|
|
|
|
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // this.$helper.fUN_AmapLocation.stop({}, result => {
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
+ // console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // );
|
|
|
|
+ uni.getLocation({
|
|
|
|
+ type: 'gcj02',
|
|
|
|
+ geocode: true,
|
|
|
|
+ success: res => {
|
|
|
|
+ console.log('定位地址')
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.latitude) {
|
|
|
|
+ console.log('11111111111111111111111111111')
|
|
|
|
+ console.log(that.detailData)
|
|
|
|
+ that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
|
|
|
|
+ that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
|
|
|
|
+ that.detailData.hyCarrierInfo.sendCity = that.$helper.filterUrban(res.address.city)
|
|
|
|
+ that.localtion.city = that.$helper.filterUrban(res.address.city)
|
|
|
|
+ that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
|
|
|
|
+ console.log(that.detailData.hyCarrierInfo.sendCity)
|
|
|
|
+ console.log(that.detailData.hyCarrierInfo.sendArea)
|
|
|
|
+ that.$forceUpdate()
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ } else {
|
|
|
|
+ if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
+ var context = plus.android.importClass("android.content.Context");
|
|
|
|
+ var locationManager = plus.android.importClass(
|
|
|
|
+ "android.location.LocationManager");
|
|
|
|
+ var main = plus.android.runtimeMainActivity();
|
|
|
|
+ var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
|
|
|
+ that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
|
|
|
|
+ }
|
|
|
|
+ if (that.bool === false) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '请打开定位服务',
|
|
|
|
+ success: ({
|
|
|
|
+ confirm,
|
|
|
|
+ cancel
|
|
|
|
+ }) => {
|
|
|
|
+ if (confirm) {
|
|
|
|
+ if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
+ var Intent = plus.android.importClass(
|
|
|
|
+ 'android.content.Intent');
|
|
|
|
+ var Settings = plus.android.importClass(
|
|
|
|
+ 'android.provider.Settings');
|
|
|
|
+ var intent = new Intent(Settings
|
|
|
|
+ .ACTION_LOCATION_SOURCE_SETTINGS);
|
|
|
|
+ var main = plus.android.runtimeMainActivity();
|
|
|
|
+ main.startActivity(intent); // 打开系统设置GPS服务页面
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ fail: res => {
|
|
|
|
+ console.log('定位失败')
|
|
|
|
+ console.log(res)
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
|
|
|
- this.$helper.fUN_AmapLocation.stop({}, result => {
|
|
|
|
- console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
- );
|
|
|
|
- // uni.getLocation({
|
|
|
|
- // type: 'gcj02',
|
|
|
|
- // geocode: true,
|
|
|
|
- // success: res => {
|
|
|
|
- // console.log('定位地址')
|
|
|
|
- // console.log(res)
|
|
|
|
- // if (res.latitude) {
|
|
|
|
- // this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
|
|
|
|
- // this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
|
|
|
|
- // this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.address.city)
|
|
|
|
- // this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.address
|
|
|
|
- // .district);
|
|
|
|
- // console.log(this.detailData.carrierInfo.sendCity)
|
|
|
|
- // console.log(this.detailData.carrierInfo.sendArea)
|
|
|
|
- // this.$forceUpdate()
|
|
|
|
- // uni.hideLoading()
|
|
|
|
- // } else {
|
|
|
|
- // if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
- // var context = plus.android.importClass("android.content.Context");
|
|
|
|
- // var locationManager = plus.android.importClass(
|
|
|
|
- // "android.location.LocationManager");
|
|
|
|
- // var main = plus.android.runtimeMainActivity();
|
|
|
|
- // var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
|
|
|
- // this.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
|
|
|
|
- // }
|
|
|
|
- // if (this.bool === false) {
|
|
|
|
- // uni.showModal({
|
|
|
|
- // title: '提示',
|
|
|
|
- // content: '请打开定位服务',
|
|
|
|
- // success: ({
|
|
|
|
- // confirm,
|
|
|
|
- // cancel
|
|
|
|
- // }) => {
|
|
|
|
- // if (confirm) {
|
|
|
|
- // if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
|
- // var Intent = plus.android.importClass(
|
|
|
|
- // 'android.content.Intent');
|
|
|
|
- // var Settings = plus.android.importClass(
|
|
|
|
- // 'android.provider.Settings');
|
|
|
|
- // var intent = new Intent(Settings
|
|
|
|
- // .ACTION_LOCATION_SOURCE_SETTINGS);
|
|
|
|
- // var main = plus.android.runtimeMainActivity();
|
|
|
|
- // main.startActivity(intent); // 打开系统设置GPS服务页面
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // fail: res => {
|
|
|
|
- // console.log('定位失败')
|
|
|
|
- // console.log(res)
|
|
|
|
-
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
|
|
+ });
|
|
|
|
|
|
},
|
|
},
|
|
alertBtn() {
|
|
alertBtn() {
|
|
@@ -448,24 +460,24 @@
|
|
// return true
|
|
// return true
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
- confirmClick() {
|
|
|
|
|
|
+ confirmClick() {debugger
|
|
this.isShowAlert = false
|
|
this.isShowAlert = false
|
|
- if(this.validate()) return
|
|
|
|
|
|
+ if (this.validate()) return
|
|
//1暂存
|
|
//1暂存
|
|
if (this.detailData.statusFlag == 1) {
|
|
if (this.detailData.statusFlag == 1) {
|
|
- delete this.detailData.carrierInfo.loadingAreaLongitude;
|
|
|
|
- delete this.detailData.carrierInfo.loadingAreaLatitude;
|
|
|
|
- delete this.detailData.carrierInfo.sendCity;
|
|
|
|
- delete this.detailData.carrierInfo.sendArea;
|
|
|
|
|
|
+ delete this.detailData.hyCarrierInfo.loadingAreaLongitude;
|
|
|
|
+ delete this.detailData.hyCarrierInfo.loadingAreaLatitude;
|
|
|
|
+ delete this.detailData.hyCarrierInfo.sendCity;
|
|
|
|
+ delete this.detailData.hyCarrierInfo.sendArea;
|
|
}
|
|
}
|
|
- this.detailData.carrierInfo = {}
|
|
|
|
|
|
+ this.detailData.hyCarrierInfo = {}
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
- title: '加载中'
|
|
|
|
- })
|
|
|
|
- this.detailData.carrierInfo.statusFlag = this.detailData.statusFlag
|
|
|
|
- this.detailData.carrierInfo.id = this.id
|
|
|
|
- this.detailData.carrierInfo.loadingImg = this.imgList.toString()
|
|
|
|
- this.$request.baseRequest('post', '/carrierInfo/loadingAdd', this.detailData.carrierInfo).then(res => {
|
|
|
|
|
|
+ title: '加载中'
|
|
|
|
+ })
|
|
|
|
+ this.detailData.hyCarrierInfo.statusFlag = this.detailData.statusFlag
|
|
|
|
+ this.detailData.hyCarrierInfo.id = this.cyId
|
|
|
|
+ this.detailData.hyCarrierInfo.loadingImg = this.imgList.toString()
|
|
|
|
+ this.$request.baseRequest('post', '/carrierInfo/loadingAdd', this.detailData.hyCarrierInfo).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
let _title = ''
|
|
let _title = ''
|
|
@@ -474,11 +486,12 @@
|
|
} else {
|
|
} else {
|
|
_title = '提交成功!'
|
|
_title = '提交成功!'
|
|
}
|
|
}
|
|
- this.$helper.fUN_AmapLocation.start({
|
|
|
|
|
|
+ console.log(111111111111111111111111111111111111111111111)
|
|
|
|
+ that.$helper.fUN_AmapLocation.start({
|
|
// intervalTime: 1000 * 60,
|
|
// intervalTime: 1000 * 60,
|
|
intervalTime: 5000,
|
|
intervalTime: 5000,
|
|
- // isReport: true,
|
|
|
|
- reportInterval: 5,
|
|
|
|
|
|
+ // locationCacheEnable:true,
|
|
|
|
+ isReport: false
|
|
// url: 'http://192.168.0.66/fun/open/test_json.do',
|
|
// url: 'http://192.168.0.66/fun/open/test_json.do',
|
|
// params: {
|
|
// params: {
|
|
// a: 1,
|
|
// a: 1,
|
|
@@ -505,13 +518,14 @@
|
|
uni.setStorageSync('mapGJ', this.$helper.gjList);
|
|
uni.setStorageSync('mapGJ', this.$helper.gjList);
|
|
console.log('this.$helper.gjList')
|
|
console.log('this.$helper.gjList')
|
|
console.log(this.$helper.gjList)
|
|
console.log(this.$helper.gjList)
|
|
|
|
+ console.log("条数",uni.getStorageSync('mapGJ').length)
|
|
if (uni.getStorageSync('mapGJ').length > 100) {
|
|
if (uni.getStorageSync('mapGJ').length > 100) {
|
|
console.log(uni.getStorageSync('mapGJ'))
|
|
console.log(uni.getStorageSync('mapGJ'))
|
|
- this.$request.baseRequest('post', '/vehicleTrajectoryInfo/api/addInfo', {
|
|
|
|
- vehicleTrajectoryInfos: uni.getStorageSync('mapGJ')
|
|
|
|
|
|
+ this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
|
|
|
|
+ hyOrderTravelPaths: uni.getStorageSync('mapGJ')
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
+ uni.removeStorageSync('mapGJ');
|
|
this.$helper.gjList = []
|
|
this.$helper.gjList = []
|
|
- uni.setStorageSync('mapGJ', []);
|
|
|
|
})
|
|
})
|
|
.catch(res => {
|
|
.catch(res => {
|
|
uni.$u.toast(res.message);
|
|
uni.$u.toast(res.message);
|