|
@@ -1,6 +1,13 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <view class="fixed1"></view>
|
|
|
+ <u-navbar title="发布" :placeholder="true" rightText="记录" @rightClick="goToRecord" @leftClick="back()">
|
|
|
+ <!-- view class="u-nav-slot" slot="left">
|
|
|
+ <u-icon name="arrow-left" size="19"></u-icon>
|
|
|
+ <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
|
|
+ <u-icon name="home" size="20"></u-icon>
|
|
|
+ </view> -->
|
|
|
+ </u-navbar>
|
|
|
+ <!-- <view class="fixed1"></view>
|
|
|
<view class='title top-title flex'>
|
|
|
<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
|
|
|
<view class="nav-title">发布</view>
|
|
@@ -10,7 +17,7 @@
|
|
|
记录
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="content1">
|
|
|
<view class="row" @click="selectCargoOwner">
|
|
|
<view class="left select-sf">{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
|
|
@@ -27,7 +34,7 @@
|
|
|
<view class="row1">
|
|
|
<view class="left">
|
|
|
<view class="top" @click="selectAddress(0)">
|
|
|
- <view class="send">寄</view>
|
|
|
+ <view class="send">发</view>
|
|
|
<view class="title">
|
|
|
{{dataObj.sendArea?(dataObj.sendPrivate + dataObj.sendCity+dataObj.sendArea):'选择发货地区'}}
|
|
|
</view>
|
|
@@ -220,7 +227,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- showCancelButton:true,
|
|
|
+ showCancelButton: true,
|
|
|
qyList: [],
|
|
|
isShowAlert: false,
|
|
|
alertTitle: '确定发布运输任务?',
|
|
@@ -341,7 +348,7 @@
|
|
|
this.isShowAlert = true
|
|
|
this.alertTitle = '账号审核中'
|
|
|
this.confirmText = '退出APP'
|
|
|
- this.showCancelButton=false
|
|
|
+ this.showCancelButton = false
|
|
|
return
|
|
|
} else {
|
|
|
console.log(1231233212332312312213)
|
|
@@ -352,7 +359,7 @@
|
|
|
let _faddress = uni.getStorageSync('storage_faddress');
|
|
|
let _saddress = uni.getStorageSync('storage_saddress');
|
|
|
if (_faddress) {
|
|
|
-
|
|
|
+
|
|
|
this.dataObj.sendCity = _faddress.city
|
|
|
this.dataObj.sendArea = _faddress.area
|
|
|
this.dataObj.sendPrivate = _faddress.province
|
|
@@ -378,20 +385,22 @@
|
|
|
}
|
|
|
if (this.dataObj.sendLatitude && this.dataObj.sendLongitude && this.dataObj.unsendLatitude && this.dataObj
|
|
|
.unsendLongitude) {
|
|
|
- this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj.unsendLongitude,
|
|
|
+ this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
|
|
|
+ .unsendLongitude,
|
|
|
this.dataObj.sendLatitude, this.dataObj.sendLongitude)
|
|
|
}
|
|
|
this.dataObj.loadingDateStart = '随时'
|
|
|
this.dataObj.loadingDateEnd = '随时'
|
|
|
this.dataObj.taskValidity = '长期'
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
|
},
|
|
|
methods: {
|
|
|
- getSFList() {debugger
|
|
|
+ getSFList() {
|
|
|
+ debugger
|
|
|
this.dataObj.commonId = this.userInfo.id
|
|
|
this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
|
|
|
commonId: this.userInfo.id
|
|
@@ -405,7 +414,7 @@
|
|
|
let _self = res.data.companyInfoList
|
|
|
//代理货主
|
|
|
let _dlhz = res.data.cargoOwnerCompInfoList
|
|
|
- if(!_dlhz) _dlhz=[]
|
|
|
+ if (!_dlhz) _dlhz = []
|
|
|
for (let i = 0; i < _self.length; i++) {
|
|
|
if (_self[i].status == '已认证') {
|
|
|
this.qyList.push(_self[i])
|
|
@@ -575,18 +584,18 @@
|
|
|
|
|
|
},
|
|
|
confirmClick() {
|
|
|
- // #ifdef APP-PLUS
|
|
|
- if (this.alertTitle == '账号审核中') {
|
|
|
- if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
- plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
|
|
- } else if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
- plus.runtime.quit();
|
|
|
- }
|
|
|
- return
|
|
|
- }
|
|
|
- // #endif
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ if (this.alertTitle == '账号审核中') {
|
|
|
+ if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
+ plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
|
|
+ } else if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
+ plus.runtime.quit();
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
this.isShowAlert = false
|
|
|
-
|
|
|
+
|
|
|
if (this.dataObj.billingMethod == '元/吨') {
|
|
|
this.dataObj.billingMethod = 0
|
|
|
} else {
|
|
@@ -617,7 +626,7 @@
|
|
|
type: 'success',
|
|
|
message: "发布成功",
|
|
|
complete() {
|
|
|
-
|
|
|
+
|
|
|
_this.dataObj = {
|
|
|
commonId: '',
|
|
|
cargoOwner: '',
|
|
@@ -688,6 +697,8 @@
|
|
|
this.dataObj.sendDetailedAddress = res.data[i].detailedAddress
|
|
|
this.dataObj.sendLongitude = res.data[i].longitude
|
|
|
this.dataObj.sendLatitude = res.data[i].latitude
|
|
|
+ this.dataObj.sender = res.data[i].contacts
|
|
|
+ this.dataObj.senderPhone = res.data[i].contactPhone
|
|
|
}
|
|
|
if (res.data[i].defaultReceipt == 1 && type == 1) {
|
|
|
this.dataObj.unloadDetailedAddress = res.data[i].detailedAddress
|
|
@@ -696,6 +707,8 @@
|
|
|
this.dataObj.unloadPrivate = res.data[i].province
|
|
|
this.dataObj.unsendLongitude = res.data[i].longitude
|
|
|
this.dataObj.unsendLatitude = res.data[i].latitude
|
|
|
+ this.dataObj.receiver = res.data[i].contacts
|
|
|
+ this.dataObj.receiverPhone = res.data[i].contactPhone
|
|
|
}
|
|
|
}
|
|
|
if (this.dataObj.sendLatitude && this.dataObj.sendLongitude && this.dataObj.unsendLatitude &&
|
|
@@ -845,8 +858,8 @@
|
|
|
submit() {
|
|
|
if (this.validate()) return
|
|
|
this.isShowAlert = true;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
}
|
|
@@ -893,7 +906,7 @@
|
|
|
|
|
|
.content1 {
|
|
|
background: white;
|
|
|
- margin: 100rpx 20rpx 0 20rpx;
|
|
|
+ margin: 40rpx 20rpx 0 20rpx;
|
|
|
border-radius: 20rpx;
|
|
|
padding: 40rpx;
|
|
|
|
|
@@ -935,15 +948,17 @@
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
- .top-title{
|
|
|
- background:#fff;
|
|
|
- padding:20rpx;
|
|
|
+
|
|
|
+ .top-title {
|
|
|
+ background: #fff;
|
|
|
+ padding: 20rpx;
|
|
|
position: fixed;
|
|
|
- z-index:100;
|
|
|
- top:0;
|
|
|
+ z-index: 100;
|
|
|
+ top: 0;
|
|
|
box-sizing: border-box;
|
|
|
- width:100%;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.content2 {
|
|
|
padding: 40rpx;
|
|
|
|