|
@@ -1,7 +1,7 @@
|
|
|
<!-- 货源 -->
|
|
|
<template>
|
|
|
- <view @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
|
|
|
-<!-- <fh-no-network></fh-no-network> -->
|
|
|
+ <view @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
|
|
|
+ <!-- <fh-no-network></fh-no-network> -->
|
|
|
<view class="banner">
|
|
|
<image class="banner-img" src="@/static/images/goodSource/banner@2x.png" mode='widthFix'></image>
|
|
|
<view class="head flex s-row paddingr35">
|
|
@@ -33,7 +33,9 @@
|
|
|
}" :class="scrollTop>1200?'fixed':''"></u-tabs>
|
|
|
<view class="tab-right" @click="selectType">
|
|
|
<view>{{pickerSelect}}</view>
|
|
|
- <image style='width:8px;height:8px;margin-left:5px;' :src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'" mode=""></image>
|
|
|
+ <image style='width:8px;height:8px;margin-left:5px;'
|
|
|
+ :src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'"
|
|
|
+ mode=""></image>
|
|
|
<!-- <u-icon name="arrow-down" size="20"></u-icon> -->
|
|
|
</view>
|
|
|
</view>
|
|
@@ -48,7 +50,9 @@
|
|
|
v-if="good.freightAdvance==1"></image>
|
|
|
<view class="flex align-center">
|
|
|
<view class="item1">
|
|
|
- <view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}</view>
|
|
|
+ <view class="ssx">
|
|
|
+ {{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}
|
|
|
+ </view>
|
|
|
<view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
|
|
|
{{$helper.filterArea(good.sendArea)}}
|
|
|
</view>
|
|
@@ -57,7 +61,9 @@
|
|
|
<image class="jt-icon item2" src="@/static/images/goodSource/jt.png" mode='widthFix'>
|
|
|
</image>
|
|
|
<view class="item3">
|
|
|
- <view class="ssx">{{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}</view>
|
|
|
+ <view class="ssx">
|
|
|
+ {{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}
|
|
|
+ </view>
|
|
|
<view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
|
|
|
{{$helper.filterArea(good.unloadArea)}}
|
|
|
</view>
|
|
@@ -95,7 +101,7 @@
|
|
|
<view class="left flex row" @click.stop="cargoOwner(good)">
|
|
|
<u--image
|
|
|
:src="good.cargoOwnerPortrait?good.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
|
|
|
- width='100rpx' height='100rpx' shape="circle" >
|
|
|
+ width='100rpx' height='100rpx' shape="circle">
|
|
|
</u--image>
|
|
|
<view class="name">{{good.cargoOwnerName}}</view>
|
|
|
<!-- <view class="hp flex fontsize-24">
|
|
@@ -117,8 +123,8 @@
|
|
|
</mescroll-body>
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :confirmText='confirmText'
|
|
|
- :showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
|
|
|
- @cancel="cancelClick"></u-modal>
|
|
|
+ :showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)"
|
|
|
+ @close="cancelClick" @cancel="cancelClick"></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -135,7 +141,7 @@
|
|
|
mixins: [MescrollMixin], // 使用mixin
|
|
|
data() {
|
|
|
return {
|
|
|
- confirmText: '确定',
|
|
|
+ confirmText: '确定',
|
|
|
showCancelButton: true,
|
|
|
isFirstIndex: null,
|
|
|
ObjSelect: {},
|
|
@@ -169,27 +175,30 @@
|
|
|
pickerSelect: '全部类型',
|
|
|
tabIndex: 0,
|
|
|
scrollTop: 0,
|
|
|
- isdblclick:0,
|
|
|
+ isdblclick: 0,
|
|
|
count: 0,
|
|
|
lng: '',
|
|
|
lat: '',
|
|
|
bool: false,
|
|
|
- showMenu:false
|
|
|
+ showMenu: false,
|
|
|
+ driverCommonId:"",
|
|
|
+ driverPhone:"",
|
|
|
+ driverName:""
|
|
|
}
|
|
|
},
|
|
|
onTabItemTap(e) {
|
|
|
this.isdblclick++
|
|
|
// tab 点击时执行,此处直接接收单击事件
|
|
|
- if(this.scrollTop>1200){
|
|
|
- if(this.isdblclick>1){
|
|
|
+ if (this.scrollTop > 1200) {
|
|
|
+ if (this.isdblclick > 1) {
|
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0,
|
|
|
duration: 300
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
created() {
|
|
|
|
|
@@ -197,20 +206,20 @@
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
|
|
|
},
|
|
|
- watch:{
|
|
|
+ watch: {
|
|
|
// startPlace(){
|
|
|
// console.log(this.startPlace)
|
|
|
- // this.upCallback({page});
|
|
|
- // },
|
|
|
+ // this.upCallback({page});
|
|
|
+ // },
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.checkOpenGPSServiceByAndroidIOS()
|
|
|
},
|
|
|
onHide() {
|
|
|
- this.isdblclick=0
|
|
|
+ this.isdblclick = 0
|
|
|
},
|
|
|
onShow() {
|
|
|
- if(this.scrollTop>1200){
|
|
|
+ if (this.scrollTop > 1200) {
|
|
|
uni.setTabBarItem({
|
|
|
index: 0,
|
|
|
text: '返回顶部',
|
|
@@ -224,10 +233,10 @@
|
|
|
iconPath: 'static/images/common/dingdan@2x(1).png',
|
|
|
selectedIconPath: 'static/images/common/dingdan@2x.png'
|
|
|
})
|
|
|
- var that= this
|
|
|
- setTimeout(()=>{
|
|
|
+ var that = this
|
|
|
+ setTimeout(() => {
|
|
|
// var photol=await permision.checkSystemEnableLocation()
|
|
|
- if(uni.getStorageSync('confirm_location')){
|
|
|
+ if (uni.getStorageSync('confirm_location')) {
|
|
|
that.get_localtion_permission()
|
|
|
}
|
|
|
//获取上一次点击起装卸地
|
|
@@ -237,13 +246,16 @@
|
|
|
if (uni.getStorageSync('sPlaceObj')) {
|
|
|
that.endPlace = uni.getStorageSync('sPlaceObj');
|
|
|
}
|
|
|
- that.upCallback({size:10,num:1})
|
|
|
- },1500)
|
|
|
-
|
|
|
+ that.upCallback({
|
|
|
+ size: 10,
|
|
|
+ num: 1
|
|
|
+ })
|
|
|
+ }, 1500)
|
|
|
+
|
|
|
that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
|
|
|
reCommonId: this.userInfo.id,
|
|
|
}).then(res3 => {
|
|
|
- if (res3.data||res3.data==0) {
|
|
|
+ if (res3.data || res3.data == 0) {
|
|
|
let name = 'myTip';
|
|
|
let value = res3.data
|
|
|
if (value == 0) {
|
|
@@ -285,7 +297,7 @@
|
|
|
// // #endif
|
|
|
|
|
|
// },
|
|
|
-
|
|
|
+
|
|
|
onPageScroll(res) {
|
|
|
this.scrollTop = res.scrollTop
|
|
|
// console.log("页面滚动了", res.scrollTop)
|
|
@@ -307,12 +319,12 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- stopRoll(){
|
|
|
-
|
|
|
+ stopRoll() {
|
|
|
+
|
|
|
},
|
|
|
async get_localtion_permission() {
|
|
|
- var photol=await permision.checkSystemEnableLocation()
|
|
|
- if(photol == true){
|
|
|
+ var photol = await permision.checkSystemEnableLocation()
|
|
|
+ if (photol == true) {
|
|
|
uni.removeStorageSync('confirm_location')
|
|
|
// uni.showToast({
|
|
|
// title: '只有文字弹窗',
|
|
@@ -320,132 +332,134 @@
|
|
|
// duration: 2000 //持续时间为 2秒
|
|
|
// })
|
|
|
this.getLngLat()
|
|
|
- }else{
|
|
|
- if(uni.getStorageSync('confirm_location')){
|
|
|
+ } else {
|
|
|
+ if (uni.getStorageSync('confirm_location')) {
|
|
|
uni.removeStorageSync('confirm_location')
|
|
|
- }
|
|
|
- uni.setStorageSync('fPlaceObj',{
|
|
|
- fchoosearea:'全部',
|
|
|
- fchoosecity:'市辖区',
|
|
|
- fchooseprovince:'北京',
|
|
|
- selected:'东城'
|
|
|
+ }
|
|
|
+ uni.setStorageSync('fPlaceObj', {
|
|
|
+ fchoosearea: '全部',
|
|
|
+ fchoosecity: '市辖区',
|
|
|
+ fchooseprovince: '北京',
|
|
|
+ selected: '东城'
|
|
|
})
|
|
|
- uni.setStorageSync('sPlaceObj',{
|
|
|
- schoosearea:'请选择区',
|
|
|
- schoosecity:'请选择市',
|
|
|
- schooseprovince:'全国',
|
|
|
- selected:'全国'
|
|
|
+ uni.setStorageSync('sPlaceObj', {
|
|
|
+ schoosearea: '请选择区',
|
|
|
+ schoosecity: '请选择市',
|
|
|
+ schooseprovince: '全国',
|
|
|
+ selected: '全国'
|
|
|
})
|
|
|
- uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
|
|
|
+ uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
|
|
|
}
|
|
|
},
|
|
|
- async getLngLat(){
|
|
|
+ async getLngLat() {
|
|
|
await uni.getLocation({
|
|
|
type: 'gcj02',
|
|
|
geocode: true,
|
|
|
success: res => {
|
|
|
if (res.latitude) {
|
|
|
- if(res.address.city){
|
|
|
- if(res.address.city.indexOf('市')!=-1){
|
|
|
- res.address.city=res.address.city.substring(0,res.address.city.length-1)
|
|
|
+ if (res.address.city) {
|
|
|
+ if (res.address.city.indexOf('市') != -1) {
|
|
|
+ res.address.city = res.address.city.substring(0, res.address.city
|
|
|
+ .length - 1)
|
|
|
}
|
|
|
}
|
|
|
- if(res.address.province){
|
|
|
- if(res.address.province.indexOf('省')!=-1){
|
|
|
- res.address.province=res.address.province.substring(0,res.address.province.length-1)
|
|
|
+ if (res.address.province) {
|
|
|
+ if (res.address.province.indexOf('省') != -1) {
|
|
|
+ res.address.province = res.address.province.substring(0, res.address
|
|
|
+ .province.length - 1)
|
|
|
}
|
|
|
}
|
|
|
- uni.setStorageSync('fPlaceObj',{
|
|
|
- fchoosearea:'全部',
|
|
|
- fchoosecity:res.address.city,
|
|
|
- fchooseprovince:res.address.province,
|
|
|
- selected:res.address.city
|
|
|
+ uni.setStorageSync('fPlaceObj', {
|
|
|
+ fchoosearea: '全部',
|
|
|
+ fchoosecity: res.address.city,
|
|
|
+ fchooseprovince: res.address.province,
|
|
|
+ selected: res.address.city
|
|
|
})
|
|
|
- uni.setStorageSync('sPlaceObj',{
|
|
|
- schoosearea:'请选择区',
|
|
|
- schoosecity:'请选择市',
|
|
|
- schooseprovince:'全国',
|
|
|
- selected:'全国'
|
|
|
+ uni.setStorageSync('sPlaceObj', {
|
|
|
+ schoosearea: '请选择区',
|
|
|
+ schoosecity: '请选择市',
|
|
|
+ schooseprovince: '全国',
|
|
|
+ selected: '全国'
|
|
|
})
|
|
|
- uni.setStorageSync('longitudeAndLatitude',res.longitude+','+res.latitude)
|
|
|
- }
|
|
|
- }
|
|
|
+ uni.setStorageSync('longitudeAndLatitude', res.longitude + ',' + res.latitude)
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
checkOpenGPSServiceByAndroidIOS() {
|
|
|
- let system = uni.getSystemInfoSync(); // 获取系统信息
|
|
|
- // console.log(system);
|
|
|
- if (system.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);
|
|
|
- if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '请打开定位服务功能',
|
|
|
- // showCancel: false, // 不显示取消按钮
|
|
|
- success(res) {
|
|
|
- if(res.confirm){
|
|
|
- uni.setStorageSync('confirm_location',1)
|
|
|
+ let system = uni.getSystemInfoSync(); // 获取系统信息
|
|
|
+ // console.log(system);
|
|
|
+ if (system.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);
|
|
|
+ if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '请打开定位服务功能',
|
|
|
+ // showCancel: false, // 不显示取消按钮
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.setStorageSync('confirm_location', 1)
|
|
|
if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
|
|
-
|
|
|
+
|
|
|
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);
|
|
|
main.startActivity(intent); // 打开系统设置GPS服务页面
|
|
|
} else {
|
|
|
- uni.setStorageSync('fPlaceObj',{
|
|
|
- fchoosearea:'全部',
|
|
|
- fchoosecity:'市辖区',
|
|
|
- fchooseprovince:'北京',
|
|
|
- selected:'东城'
|
|
|
+ uni.setStorageSync('fPlaceObj', {
|
|
|
+ fchoosearea: '全部',
|
|
|
+ fchoosecity: '市辖区',
|
|
|
+ fchooseprovince: '北京',
|
|
|
+ selected: '东城'
|
|
|
})
|
|
|
- uni.setStorageSync('sPlaceObj',{
|
|
|
- schoosearea:'请选择区',
|
|
|
- schoosecity:'请选择市',
|
|
|
- schooseprovince:'全国',
|
|
|
- selected:'全国'
|
|
|
+ uni.setStorageSync('sPlaceObj', {
|
|
|
+ schoosearea: '请选择区',
|
|
|
+ schoosecity: '请选择市',
|
|
|
+ schooseprovince: '全国',
|
|
|
+ selected: '全国'
|
|
|
})
|
|
|
- uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
|
|
|
+ uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
|
|
|
}
|
|
|
- }else{
|
|
|
- uni.setStorageSync('fPlaceObj',{
|
|
|
- fchoosearea:'全部',
|
|
|
- fchoosecity:'市辖区',
|
|
|
- fchooseprovince:'北京',
|
|
|
- selected:'东城'
|
|
|
+ } else {
|
|
|
+ uni.setStorageSync('fPlaceObj', {
|
|
|
+ fchoosearea: '全部',
|
|
|
+ fchoosecity: '市辖区',
|
|
|
+ fchooseprovince: '北京',
|
|
|
+ selected: '东城'
|
|
|
})
|
|
|
- uni.setStorageSync('sPlaceObj',{
|
|
|
- schoosearea:'请选择区',
|
|
|
- schoosecity:'请选择市',
|
|
|
- schooseprovince:'全国',
|
|
|
- selected:'全国'
|
|
|
+ uni.setStorageSync('sPlaceObj', {
|
|
|
+ schoosearea: '请选择区',
|
|
|
+ schoosecity: '请选择市',
|
|
|
+ schooseprovince: '全国',
|
|
|
+ selected: '全国'
|
|
|
})
|
|
|
- uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
|
|
|
+ uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
this.getLngLat()
|
|
|
}
|
|
|
- } else if (system.platform === 'ios') {
|
|
|
- // console.log("苹果");
|
|
|
- var cllocationManger = plus.ios.import("CLLocationManager");
|
|
|
- var enable = cllocationManger.locationServicesEnabled();
|
|
|
- var status = cllocationManger.authorizationStatus();
|
|
|
- plus.ios.deleteObject(cllocationManger);
|
|
|
- if (enable && status != 2) {
|
|
|
+ } else if (system.platform === 'ios') {
|
|
|
+ // console.log("苹果");
|
|
|
+ var cllocationManger = plus.ios.import("CLLocationManager");
|
|
|
+ var enable = cllocationManger.locationServicesEnabled();
|
|
|
+ var status = cllocationManger.authorizationStatus();
|
|
|
+ plus.ios.deleteObject(cllocationManger);
|
|
|
+ if (enable && status != 2) {
|
|
|
this.getLngLat()
|
|
|
- console.log("手机系统的定位已经打开");
|
|
|
- } else {
|
|
|
- console.log("手机系统的定位没有打开");
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '请前往设置-隐私-定位服务打开定位服务功能',
|
|
|
- // showCancel: false, // 不显示取消按钮
|
|
|
- success(res) {
|
|
|
- if(res.confirm){
|
|
|
+ console.log("手机系统的定位已经打开");
|
|
|
+ } else {
|
|
|
+ console.log("手机系统的定位没有打开");
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '请前往设置-隐私-定位服务打开定位服务功能',
|
|
|
+ // showCancel: false, // 不显示取消按钮
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
var UIApplication = plus.ios.import("UIApplication");
|
|
|
var application2 = UIApplication.sharedApplication();
|
|
|
var NSURL2 = plus.ios.import("NSURL");
|
|
@@ -460,72 +474,50 @@
|
|
|
plus.ios.deleteObject(application2);
|
|
|
this.getLngLat()
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- cargoOwner(_obj){
|
|
|
+ cargoOwner(_obj) {
|
|
|
// uni.$u.route('/pages/order/evaluateList');
|
|
|
// console.log("查看---------------",_obj)
|
|
|
- uni.$u.route('/pages/goodSource/cargoOwnerSee',_obj)
|
|
|
+ uni.$u.route('/pages/goodSource/cargoOwnerSee', _obj)
|
|
|
},
|
|
|
mescrollInit(mescroll) {
|
|
|
this.mescroll = mescroll;
|
|
|
},
|
|
|
confirmClick() {
|
|
|
let item = this.ObjSelect
|
|
|
- var that=this
|
|
|
- this.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
|
- driverPhone: this.userInfo.phone,
|
|
|
- }).then(res2 => {
|
|
|
- if(res2.data.authenticationStatus=='已过期'){
|
|
|
- that.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: '证件已过期,请上传新证件!',
|
|
|
- })
|
|
|
- return
|
|
|
- }else if(res2.data.authenticationStatus=='未认证'||res2.data.authenticationStatus=='已驳回'){
|
|
|
- that.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: '请先完成司机认证!',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- else if(res2.data.authenticationStatus=='审核中'){
|
|
|
- that.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: '司机审核中!',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- let _obj = {
|
|
|
- driverCommonId: res2.data.commonId,
|
|
|
- commonId: item.commonId,
|
|
|
- compId:item.compId,
|
|
|
- cargoOwnerName: item.cargoOwnerName,
|
|
|
- cargoOwner: item.cargoOwner,
|
|
|
- sendPrivate: item.sendPrivate,
|
|
|
- sendCity: item.sendCity,
|
|
|
- sendArea: item.sendArea,
|
|
|
- sendDetailedAddress: item.sendDetailedAddress,
|
|
|
- unloadPrivate: item.unloadPrivate,
|
|
|
- unloadCity: item.unloadCity,
|
|
|
- unloadArea: item.unloadArea,
|
|
|
- unloadDetailedAddress: item.unloadDetailedAddress,
|
|
|
- goodsName: item.goodsName,
|
|
|
- distance: item.distance,
|
|
|
- freightPrice: item.freightPrice,
|
|
|
- driverName: res2.data.driverName,
|
|
|
- driverPhone: res2.data.driverPhone,
|
|
|
- cargoOwnerPhone: item.cargoOwnerPhone,
|
|
|
- id:item.id,
|
|
|
- billingMethod:item.billingMethod,
|
|
|
- freightAdvance:item.freightAdvance,
|
|
|
- goodsType:item.goodsType,
|
|
|
- goodsTypeKey:item.goodsTypeKey
|
|
|
- }
|
|
|
- that.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
|
|
|
+ var that = this
|
|
|
+
|
|
|
+ let _obj = {
|
|
|
+ driverCommonId: that.driverCommonId,
|
|
|
+ commonId: item.commonId,
|
|
|
+ compId: item.compId,
|
|
|
+ cargoOwnerName: item.cargoOwnerName,
|
|
|
+ cargoOwner: item.cargoOwner,
|
|
|
+ sendPrivate: item.sendPrivate,
|
|
|
+ sendCity: item.sendCity,
|
|
|
+ sendArea: item.sendArea,
|
|
|
+ sendDetailedAddress: item.sendDetailedAddress,
|
|
|
+ unloadPrivate: item.unloadPrivate,
|
|
|
+ unloadCity: item.unloadCity,
|
|
|
+ unloadArea: item.unloadArea,
|
|
|
+ unloadDetailedAddress: item.unloadDetailedAddress,
|
|
|
+ goodsName: item.goodsName,
|
|
|
+ distance: item.distance,
|
|
|
+ freightPrice: item.freightPrice,
|
|
|
+ driverName: that.driverName,
|
|
|
+ driverPhone: that.driverPhone,
|
|
|
+ cargoOwnerPhone: item.cargoOwnerPhone,
|
|
|
+ id: item.id,
|
|
|
+ billingMethod: item.billingMethod,
|
|
|
+ freightAdvance: item.freightAdvance,
|
|
|
+ goodsType: item.goodsType,
|
|
|
+ goodsTypeKey: item.goodsTypeKey
|
|
|
+ }
|
|
|
+ that.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
that.$refs.uToast.show({
|
|
|
type: 'success',
|
|
@@ -546,8 +538,8 @@
|
|
|
.catch(res => {
|
|
|
uni.$u.toast(res.message);
|
|
|
});
|
|
|
-
|
|
|
- });
|
|
|
+
|
|
|
+ // });
|
|
|
this.isShowAlert = false
|
|
|
},
|
|
|
cancelClick() {
|
|
@@ -608,16 +600,47 @@
|
|
|
return String(year) + String(mouth) + String(datetime)
|
|
|
},
|
|
|
grabOrders(item) {
|
|
|
-
|
|
|
- this.isShowAlert = true
|
|
|
- this.ObjSelect = item
|
|
|
-
|
|
|
+ let that = this
|
|
|
+ this.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
|
+ driverPhone: this.userInfo.phone,
|
|
|
+ }).then(res2 => {
|
|
|
+ debugger
|
|
|
+ if (res2.data.authenticationStatus == '已过期') {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: '证件已过期,请上传新证件!',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else if (res2.data.authenticationStatus == '未认证' || res2.data.authenticationStatus ==
|
|
|
+ '已驳回') {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: '请先完成司机认证!',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else if (res2.data.authenticationStatus == '审核中') {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: '司机审核中!',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else if(res2.data.authenticationStatus == '已认证'){
|
|
|
+ this.driverCommonId = res2.data.commonId
|
|
|
+ this.driverPhone = res2.data.driverPhone
|
|
|
+ this.driverName = res2.data.driverName
|
|
|
+ this.isShowAlert = true
|
|
|
+ this.ObjSelect = item
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
confirmSelectType(val) {
|
|
|
this.pickerSelect = val.value[0]
|
|
|
-
|
|
|
+
|
|
|
this.show = false
|
|
|
- this.upCallback({size:10,num:1})
|
|
|
+ this.upCallback({
|
|
|
+ size: 10,
|
|
|
+ num: 1
|
|
|
+ })
|
|
|
},
|
|
|
selectTypeClose() {
|
|
|
this.show = false
|
|
@@ -630,7 +653,7 @@
|
|
|
// // uni.showLoading({
|
|
|
// // title: '获取定位信息'
|
|
|
// // })
|
|
|
-
|
|
|
+
|
|
|
// uni.getLocation({
|
|
|
// type: 'gcj02',
|
|
|
// geocode: true,
|
|
@@ -674,7 +697,7 @@
|
|
|
// currentPage: 1,
|
|
|
// loadingPlaceCity: that.startPlace.fchoosecity,
|
|
|
// // unLoadingPlaceCity: this.endPlace.schoosecity
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
// that.$forceUpdate()
|
|
|
// // that.$set(that.startPlace,'selected',res.address.city)
|
|
@@ -696,7 +719,7 @@
|
|
|
// }else{
|
|
|
// that.goods=[]
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
// uni.hideLoading()
|
|
|
// })
|
|
@@ -737,19 +760,19 @@
|
|
|
// });
|
|
|
// }
|
|
|
// uni.hideLoading()
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
// }
|
|
|
// });
|
|
|
// },
|
|
|
toDetail(id) {
|
|
|
- var that=this
|
|
|
+ var that = this
|
|
|
that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
|
driverPhone: this.userInfo.phone,
|
|
|
}).then(res2 => {
|
|
|
// console.log('跳转',1111111)
|
|
|
uni.setStorageSync('firstAuthentication', res2.data)
|
|
|
- that.firstAuthentication=uni.getStorageSync('firstAuthentication')
|
|
|
+ that.firstAuthentication = uni.getStorageSync('firstAuthentication')
|
|
|
// console.log(that.firstAuthentication)
|
|
|
//司机是否认证身份
|
|
|
// 保留uni.getStorageSync('firstAuthentication'),thisfirstAuthentication有缓存问题
|
|
@@ -772,7 +795,7 @@
|
|
|
},
|
|
|
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
|
|
|
upCallback(page) {
|
|
|
- var that =this
|
|
|
+ var that = this
|
|
|
let _pickerSelect;
|
|
|
if (this.pickerSelect == '运费先付') {
|
|
|
_pickerSelect = 1
|
|
@@ -794,111 +817,113 @@
|
|
|
}
|
|
|
console.log(uni.getStorageSync('longitudeAndLatitude'))
|
|
|
// if (this.tabIndex == 2) {
|
|
|
- if(uni.getStorageSync('longitudeAndLatitude')){
|
|
|
- this.lng=uni.getStorageSync('longitudeAndLatitude').split(',')[0]
|
|
|
- this.lat=uni.getStorageSync('longitudeAndLatitude').split(',')[1]
|
|
|
- }
|
|
|
- _data.driverLongitude = this.lng
|
|
|
- _data.driverLatitude = this.lat
|
|
|
- // }
|
|
|
- console.log('------')
|
|
|
- console.log(_data)
|
|
|
- if (uni.getStorageSync('fPlaceObj')) {
|
|
|
- if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
|
|
|
- .fchoosearea != '请选择区') {
|
|
|
- // _data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
- if(this.startPlace.fchoosecity=='市辖区'){
|
|
|
- _data.loadingPlaceCity = this.startPlace.fchooseprovince
|
|
|
- }else{
|
|
|
- _data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
- }
|
|
|
- } else if (this.startPlace.fchoosecity == '全部') {
|
|
|
- _data.loadingPlace = this.startPlace.selected
|
|
|
- } else {
|
|
|
- _data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
- _data.loadingPlace = this.startPlace.fchoosearea
|
|
|
- }
|
|
|
-
|
|
|
+ if (uni.getStorageSync('longitudeAndLatitude')) {
|
|
|
+ this.lng = uni.getStorageSync('longitudeAndLatitude').split(',')[0]
|
|
|
+ this.lat = uni.getStorageSync('longitudeAndLatitude').split(',')[1]
|
|
|
+ }
|
|
|
+ _data.driverLongitude = this.lng
|
|
|
+ _data.driverLatitude = this.lat
|
|
|
+ // }
|
|
|
+ console.log('------')
|
|
|
+ console.log(_data)
|
|
|
+ if (uni.getStorageSync('fPlaceObj')) {
|
|
|
+ if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
|
|
|
+ .fchoosearea != '请选择区') {
|
|
|
+ // _data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
+ if (this.startPlace.fchoosecity == '市辖区') {
|
|
|
+ _data.loadingPlaceCity = this.startPlace.fchooseprovince
|
|
|
} else {
|
|
|
_data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
}
|
|
|
- if (uni.getStorageSync('sPlaceObj')) {
|
|
|
- if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
|
|
|
- '请选择区') {
|
|
|
- if(this.endPlace.schoosecity=='市辖区'){
|
|
|
- _data.unLoadingPlaceCity = this.endPlace.schooseprovince
|
|
|
- }else{
|
|
|
- _data.unLoadingPlaceCity = this.endPlace.schoosecity
|
|
|
- }
|
|
|
- } else if (this.endPlace.schoosearea) {
|
|
|
- _data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
|
|
|
- } else {
|
|
|
- _data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
|
|
|
- _data.unLoadingPlaceCity = this.endPlace.schoosecity
|
|
|
- }
|
|
|
+ } else if (this.startPlace.fchoosecity == '全部') {
|
|
|
+ _data.loadingPlace = this.startPlace.selected
|
|
|
+ } else {
|
|
|
+ _data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
+ _data.loadingPlace = this.startPlace.fchoosearea
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ _data.loadingPlaceCity = this.startPlace.fchoosecity
|
|
|
+ }
|
|
|
+ if (uni.getStorageSync('sPlaceObj')) {
|
|
|
+ if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
|
|
|
+ '请选择区') {
|
|
|
+ if (this.endPlace.schoosecity == '市辖区') {
|
|
|
+ _data.unLoadingPlaceCity = this.endPlace.schooseprovince
|
|
|
} else {
|
|
|
- _data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
|
|
|
+ _data.unLoadingPlaceCity = this.endPlace.schoosecity
|
|
|
}
|
|
|
- if (this.lng) {
|
|
|
- _data.longitude = this.lng
|
|
|
- _data.latitude = this.lat
|
|
|
- }
|
|
|
- uni.showLoading({
|
|
|
- mask: true,
|
|
|
- title: '加载中'
|
|
|
- })
|
|
|
- console.log(_data)
|
|
|
- this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
|
|
|
- uni.hideLoading()
|
|
|
- if (res.code == 200) {
|
|
|
-
|
|
|
- if (page.num == 1) {
|
|
|
- this.goods = [];
|
|
|
- // this.otherGoods = []
|
|
|
- };
|
|
|
- if(res.data.records){
|
|
|
- for(var i=0;i<res.data.records.length;i++){
|
|
|
- if(res.data.records[i].cargoDistance){
|
|
|
- if(res.data.records[i].cargoDistance>10){
|
|
|
- res.data.records[i].cargoDistance=res.data.records[i].cargoDistance.toFixed(0)
|
|
|
- }else{
|
|
|
- res.data.records[i].cargoDistance=res.data.records[i].cargoDistance.toFixed(1)
|
|
|
- }
|
|
|
- }
|
|
|
- if(res.data.records[i].distance){
|
|
|
- if(res.data.records[i].distance>10){
|
|
|
- res.data.records[i].distance=res.data.records[i].distance.toFixed(0)
|
|
|
- }else{
|
|
|
- res.data.records[i].distance=res.data.records[i].distance.toFixed(1)
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ } else if (this.endPlace.schoosearea) {
|
|
|
+ _data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
|
|
|
+ } else {
|
|
|
+ _data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
|
|
|
+ _data.unLoadingPlaceCity = this.endPlace.schoosecity
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ _data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
|
|
|
+ }
|
|
|
+ if (this.lng) {
|
|
|
+ _data.longitude = this.lng
|
|
|
+ _data.latitude = this.lat
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ mask: true,
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ console.log(_data)
|
|
|
+ this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ if (res.code == 200) {
|
|
|
+
|
|
|
+ if (page.num == 1) {
|
|
|
+ this.goods = [];
|
|
|
+ // this.otherGoods = []
|
|
|
+ };
|
|
|
+ if (res.data.records) {
|
|
|
+ for (var i = 0; i < res.data.records.length; i++) {
|
|
|
+ if (res.data.records[i].cargoDistance) {
|
|
|
+ if (res.data.records[i].cargoDistance > 10) {
|
|
|
+ res.data.records[i].cargoDistance = res.data.records[i].cargoDistance
|
|
|
+ .toFixed(0)
|
|
|
+ } else {
|
|
|
+ res.data.records[i].cargoDistance = res.data.records[i].cargoDistance
|
|
|
+ .toFixed(1)
|
|
|
}
|
|
|
}
|
|
|
- this.mescroll.endBySize(res.data.records.length, res.data.total);
|
|
|
- // for (var i = 0; i < res.data.records.length; i++) {
|
|
|
- // res.data.records[i].cargoOwnerName1=
|
|
|
- // }
|
|
|
- //如果是第一页需手动制空列表
|
|
|
- if(res.data.records){
|
|
|
- that.goods = that.goods.concat(res.data.records);
|
|
|
- for (let i = 0; i < that.goods.length; i++) {
|
|
|
- if (that.goods[i].peripheralInfo == 1) {
|
|
|
- that.isFirstIndex = i
|
|
|
- return
|
|
|
- }
|
|
|
+ if (res.data.records[i].distance) {
|
|
|
+ if (res.data.records[i].distance > 10) {
|
|
|
+ res.data.records[i].distance = res.data.records[i].distance.toFixed(0)
|
|
|
+ } else {
|
|
|
+ res.data.records[i].distance = res.data.records[i].distance.toFixed(1)
|
|
|
}
|
|
|
- }else{
|
|
|
- that.goods=[]
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- })
|
|
|
- .catch(res => {
|
|
|
- uni.hideLoading()
|
|
|
- uni.$u.toast(res.message);
|
|
|
- this.mescroll.endErr();
|
|
|
- });
|
|
|
+ }
|
|
|
+ this.mescroll.endBySize(res.data.records.length, res.data.total);
|
|
|
+ // for (var i = 0; i < res.data.records.length; i++) {
|
|
|
+ // res.data.records[i].cargoOwnerName1=
|
|
|
+ // }
|
|
|
+ //如果是第一页需手动制空列表
|
|
|
+ if (res.data.records) {
|
|
|
+ that.goods = that.goods.concat(res.data.records);
|
|
|
+ for (let i = 0; i < that.goods.length; i++) {
|
|
|
+ if (that.goods[i].peripheralInfo == 1) {
|
|
|
+ that.isFirstIndex = i
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ that.goods = []
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ this.mescroll.endErr();
|
|
|
+ });
|
|
|
},
|
|
|
clickTab(val) {
|
|
|
this.tabIndex = val.index
|
|
@@ -951,6 +976,7 @@
|
|
|
height: 100vh;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.content {
|
|
|
background: #F2F4F7;
|
|
|
}
|
|
@@ -959,9 +985,11 @@
|
|
|
width: 100%;
|
|
|
position: relative;
|
|
|
}
|
|
|
-.u-flex-wrap{
|
|
|
- flex-wrap: wrap;
|
|
|
-}
|
|
|
+
|
|
|
+ .u-flex-wrap {
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+
|
|
|
.fixed,
|
|
|
.fixed1 {
|
|
|
background: linear-gradient(97deg, #4FABFD 0%, #2772FB 100%);
|
|
@@ -1112,7 +1140,7 @@
|
|
|
|
|
|
.other-goods {
|
|
|
// background: red;
|
|
|
- color:#999999;
|
|
|
+ color: #999999;
|
|
|
margin: 40rpx 0;
|
|
|
display: flex;
|
|
|
justify-content: center;
|