|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<!-- <u-navbar title="发布" :placeholder="true" rightText="记录" @rightClick="goToRecord" @leftClick="back()"> -->
|
|
|
- <!-- view class="u-nav-slot" slot="left">
|
|
|
+ <!-- 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>
|
|
@@ -114,7 +114,7 @@
|
|
|
<view class="right"><input type="number" value="" placeholder="输入运费单价" class="input"
|
|
|
v-model="dataObj.freightPrice" /></view>
|
|
|
</view>
|
|
|
- <view class="row" v-if="dataObj.freightAdvance">
|
|
|
+ <view class="row">
|
|
|
<view class="left">该任务申请运费垫付</view>
|
|
|
<view class="right">
|
|
|
<u-switch v-model="dataObj.freightAdvance" @change="change" size="20"></u-switch>
|
|
@@ -230,7 +230,7 @@
|
|
|
:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
|
|
|
@cancel="cancelClick"></u-modal>
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -345,37 +345,18 @@
|
|
|
})
|
|
|
} else {
|
|
|
this.alertTitle = '身份信息未认证,去认证?'
|
|
|
- this.showCancelButton = false
|
|
|
- this.isShowAlert = true
|
|
|
+ this.showCancelButton = false
|
|
|
+ this.isShowAlert = true
|
|
|
// uni.showLoading({
|
|
|
// title: '请重新提交身份信息',
|
|
|
// complete() {
|
|
|
// uni.switchTab({
|
|
|
// url:'/pages/mine/index'
|
|
|
-
|
|
|
+
|
|
|
// })
|
|
|
// }
|
|
|
// })
|
|
|
}
|
|
|
- this.getSFList()
|
|
|
- },
|
|
|
- async onLoad() {
|
|
|
- _this = this
|
|
|
- // #ifdef APP-PLUS
|
|
|
- let _status = await this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
|
|
|
- phone: this.userInfo.phone,
|
|
|
- }).then(res => {
|
|
|
- return res.data.authenticationStatus
|
|
|
- })
|
|
|
- if (_status == '已禁用') {
|
|
|
- this.isShowAlert = true
|
|
|
- this.alertTitle = '账号审核中'
|
|
|
- this.confirmText = '退出APP'
|
|
|
- this.showCancelButton = false
|
|
|
- return
|
|
|
- } else {
|
|
|
- }
|
|
|
- // #endif
|
|
|
this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
|
|
|
this.validityPeriodcq = this.$helper.makeValidityPeriod(0, '长期')
|
|
|
let _faddress = uni.getStorageSync('storage_faddress');
|
|
@@ -414,6 +395,25 @@
|
|
|
this.dataObj.loadingDateStart = '随时'
|
|
|
this.dataObj.loadingDateEnd = '随时'
|
|
|
this.dataObj.taskValidity = '长期'
|
|
|
+ this.getSFList()
|
|
|
+ },
|
|
|
+ async onLoad() {
|
|
|
+ _this = this
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ let _status = await this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
|
|
|
+ phone: this.userInfo.phone,
|
|
|
+ }).then(res => {
|
|
|
+ return res.data.authenticationStatus
|
|
|
+ })
|
|
|
+ if (_status == '已禁用') {
|
|
|
+ this.isShowAlert = true
|
|
|
+ this.alertTitle = '账号审核中'
|
|
|
+ this.confirmText = '退出APP'
|
|
|
+ this.showCancelButton = false
|
|
|
+ return
|
|
|
+ } else {}
|
|
|
+ // #endif
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
@@ -451,7 +451,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.columns = [[]]
|
|
|
+ this.columns = [
|
|
|
+ []
|
|
|
+ ]
|
|
|
this.columns[0].push("个人货主")
|
|
|
for (let i = 0; i < this.qyList.length; i++) {
|
|
|
this.columns[0].push(this.qyList[i].company ? this.qyList[i].company : this.qyList[i]
|
|
@@ -459,8 +461,7 @@
|
|
|
}
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
- .catch(res => {
|
|
|
- });
|
|
|
+ .catch(res => {});
|
|
|
|
|
|
|
|
|
},
|
|
@@ -522,10 +523,17 @@
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
- if (uni.$u.test.isEmpty(this.dataObj.receiverIdcard)) {
|
|
|
+ // if (uni.$u.test.isEmpty(this.dataObj.receiverIdcard)) {
|
|
|
+ // this.$refs.uToast.show({
|
|
|
+ // type: 'error',
|
|
|
+ // message: "收货人身份证不能为空!",
|
|
|
+ // })
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ if (!this.dataObj.receiverIdcard && !this.dataObj.receiverCreditCode) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "收货人身份证不能为空!",
|
|
|
+ message: "收款方统一社会信用代码和收货人身份证号码至少填写一个!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
@@ -584,8 +592,9 @@
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
|
- if (this.dataObj.carLengthSmall && this.dataObj.carLength && (this.dataObj.carLengthSmall > this.dataObj
|
|
|
- .carLength)) {
|
|
|
+ if (this.dataObj.carLengthSmall && this.dataObj.carLength && (Number(this.dataObj.carLengthSmall) > Number(
|
|
|
+ this.dataObj
|
|
|
+ .carLength))) {
|
|
|
uni.showToast({
|
|
|
title: '最小车长应小于最大车长!',
|
|
|
duration: 2000,
|
|
@@ -625,8 +634,9 @@
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
|
- if (this.dataObj.loadWeightSmall && this.dataObj.loadWeight && (this.dataObj.loadWeightSmall > this.dataObj
|
|
|
- .loadWeight)) {
|
|
|
+ if (this.dataObj.loadWeightSmall && this.dataObj.loadWeight && (Number(this.dataObj.loadWeightSmall) >
|
|
|
+ Number(this.dataObj
|
|
|
+ .loadWeight))) {
|
|
|
uni.showToast({
|
|
|
title: '最小载重应小于最大载重!',
|
|
|
duration: 2000,
|
|
@@ -648,13 +658,13 @@
|
|
|
return
|
|
|
}
|
|
|
// #endif
|
|
|
-
|
|
|
- if (this.alertTitle == '身份信息未认证,去认证?') {
|
|
|
- uni.switchTab({
|
|
|
- url:'/pages/mine/index'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+
|
|
|
+ if (this.alertTitle == '身份信息未认证,去认证?') {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/mine/index'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.isShowAlert = false
|
|
|
|
|
|
if (this.dataObj.billingMethod == '元/吨') {
|
|
@@ -725,7 +735,9 @@
|
|
|
_this.checkboxValue1 = ['不限']
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/order/index'
|
|
|
+ })
|
|
|
})
|
|
|
.catch(res => {
|
|
|
uni.showToast({
|
|
@@ -734,7 +746,7 @@
|
|
|
duration: 2000
|
|
|
})
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
cancelClick() {
|
|
|
this.isShowAlert = false
|
|
@@ -777,8 +789,6 @@
|
|
|
.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
|
|
|
}
|
|
|
uni.hideLoading()
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
.catch(res => {
|
|
|
uni.showToast({
|
|
@@ -831,9 +841,9 @@
|
|
|
// uni.removeStorage({
|
|
|
// key: 'storage_faddress'
|
|
|
// });
|
|
|
- uni.removeStorage({
|
|
|
- key: 'storage_saddress'
|
|
|
- });
|
|
|
+ // uni.removeStorage({
|
|
|
+ // key: 'storage_saddress'
|
|
|
+ // });
|
|
|
uni.$u.route('/pages/release/selectAddress', {
|
|
|
type: type,
|
|
|
});
|
|
@@ -904,7 +914,7 @@
|
|
|
},
|
|
|
back() {
|
|
|
uni.navigateBack({
|
|
|
- delta:1
|
|
|
+ delta: 1
|
|
|
})
|
|
|
},
|
|
|
goToRecord() {
|
|
@@ -915,19 +925,17 @@
|
|
|
},
|
|
|
submit() {
|
|
|
if (this.validate()) return
|
|
|
- if(this.dataObj.cargoOwner == '个人货主'){
|
|
|
+ if (this.dataObj.cargoOwner == '个人货主') {
|
|
|
this.dataObj.compId == ""
|
|
|
- }else{
|
|
|
- for(let i = 0;i<this.qyList.length;i++){
|
|
|
- if(this.dataObj.cargoOwner == this.qyList[i].companyName){
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < this.qyList.length; i++) {
|
|
|
+ if (this.dataObj.cargoOwner == this.qyList[i].companyName) {
|
|
|
this.dataObj.compId = this.qyList[i].id
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
this.isShowAlert = true;
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
}
|
|
|
}
|