|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view class="content">
|
|
<view class="content">
|
|
- <u-navbar title="发布" :placeholder="true" rightText="记录" @rightClick="goToRecord" @leftClick="back()">
|
|
|
|
|
|
+ <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-icon name="arrow-left" size="19"></u-icon>
|
|
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
|
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
|
@@ -98,8 +98,7 @@
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="left">收货方信用代码(选填)</view>
|
|
<view class="left">收货方信用代码(选填)</view>
|
|
<view class="right flex">
|
|
<view class="right flex">
|
|
- <input placeholder="输入收货方信用代码" class="input"
|
|
|
|
- v-model="dataObj.receiverCreditCode" />
|
|
|
|
|
|
+ <input placeholder="输入收货方信用代码" class="input" v-model="dataObj.receiverCreditCode" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="flex row">
|
|
<view class="flex row">
|
|
@@ -140,7 +139,7 @@
|
|
v-model="dataObj.senderPhone" />
|
|
v-model="dataObj.senderPhone" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="left">重量(吨)</view>
|
|
<view class="left">重量(吨)</view>
|
|
<view class="right flex">
|
|
<view class="right flex">
|
|
@@ -329,14 +328,13 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- console.log("点击发布")
|
|
|
|
if (!this.hasLogin) {
|
|
if (!this.hasLogin) {
|
|
uni.$u.route('/pages/public/login');
|
|
uni.$u.route('/pages/public/login');
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (uni.getStorageSync('userInfo').statusFlag == '已认证') {
|
|
|
|
|
|
+ if (uni.getStorageSync('firstAuthentication').authenticationStatus == '已认证') {
|
|
uni.$u.route('/pages/components/empty/index');
|
|
uni.$u.route('/pages/components/empty/index');
|
|
- } else if (uni.getStorageSync('userInfo').statusFlag == '审核中') {
|
|
|
|
|
|
+ } else if (uni.getStorageSync('firstAuthentication').authenticationStatus == '审核中') {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '身份信息审核中'
|
|
title: '身份信息审核中'
|
|
})
|
|
})
|
|
@@ -365,7 +363,6 @@
|
|
this.showCancelButton = false
|
|
this.showCancelButton = false
|
|
return
|
|
return
|
|
} else {
|
|
} else {
|
|
- console.log(1231233212332312312213)
|
|
|
|
}
|
|
}
|
|
// #endif
|
|
// #endif
|
|
this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
|
|
this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
|
|
@@ -430,33 +427,28 @@
|
|
// let _dlhz = res.data.cargoOwnerCompInfoList
|
|
// let _dlhz = res.data.cargoOwnerCompInfoList
|
|
let _dlhz = res.data.hyCargoOwnerCompInfoList
|
|
let _dlhz = res.data.hyCargoOwnerCompInfoList
|
|
if (!_dlhz) _dlhz = []
|
|
if (!_dlhz) _dlhz = []
|
|
- for (let i = 0; i < _self.length; i++) {
|
|
|
|
- if (_self[i].status == '已认证') {
|
|
|
|
- this.qyList.push(_self[i])
|
|
|
|
|
|
+ if (!_self) _self = []
|
|
|
|
+ if (_self.length > 0) {
|
|
|
|
+ for (let i = 0; i < _self.length; i++) {
|
|
|
|
+ if (_self[i].status == '已认证') {
|
|
|
|
+ this.qyList.push(_self[i])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- for (let i = 0; i < _dlhz.length; i++) {
|
|
|
|
- if (_dlhz[i].status == '已认证') {
|
|
|
|
- this.qyList.push(_dlhz[i])
|
|
|
|
|
|
+ this.columns[0].push("个人货主")
|
|
|
|
+ if (_dlhz.length > 0) {
|
|
|
|
+ for (let i = 0; i < _dlhz.length; i++) {
|
|
|
|
+ if (_dlhz[i].status == '已认证') {
|
|
|
|
+ this.qyList.push(_dlhz[i])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // this.columns: [
|
|
|
|
- // ['个人货主', '黑龙江中天昊元贸易有限公司', '黑龙江利润元贸易有限公司']
|
|
|
|
- // ],
|
|
|
|
for (let i = 0; i < this.qyList.length; i++) {
|
|
for (let i = 0; i < this.qyList.length; i++) {
|
|
this.columns[0].push(this.qyList[i].company ? this.qyList[i].company : this.qyList[i]
|
|
this.columns[0].push(this.qyList[i].company ? this.qyList[i].company : this.qyList[i]
|
|
.companyName)
|
|
.companyName)
|
|
}
|
|
}
|
|
- console.log('1111', _this.columns)
|
|
|
|
-
|
|
|
|
})
|
|
})
|
|
.catch(res => {
|
|
.catch(res => {
|
|
- uni.showToast({
|
|
|
|
- title: res.message,
|
|
|
|
- icon: 'none',
|
|
|
|
- duration: 2000
|
|
|
|
- })
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
@@ -504,7 +496,7 @@
|
|
})
|
|
})
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (uni.$u.test.isEmpty(this.dataObj.receiverIdcard)) {
|
|
if (uni.$u.test.isEmpty(this.dataObj.receiverIdcard)) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -521,7 +513,7 @@
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
this.dataObj.freightPrice < 0 || this.dataObj.freightPrice > 100000 || (
|
|
this.dataObj.freightPrice < 0 || this.dataObj.freightPrice > 100000 || (
|
|
- String(this.dataObj.freightPrice).indexOf('.') != -1 && String(tthis.dataObj.freightPrice).length -
|
|
|
|
|
|
+ String(this.dataObj.freightPrice).indexOf('.') != -1 && String(this.dataObj.freightPrice).length -
|
|
(String(this.dataObj.freightPrice).indexOf(
|
|
(String(this.dataObj.freightPrice).indexOf(
|
|
'.') + 1) > 2)
|
|
'.') + 1) > 2)
|
|
) {
|
|
) {
|
|
@@ -815,7 +807,6 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
checkboxChange(n) {
|
|
checkboxChange(n) {
|
|
- console.log('change', n);
|
|
|
|
if (n.length > 1 && n.length < 4 && n.includes('不限')) {
|
|
if (n.length > 1 && n.length < 4 && n.includes('不限')) {
|
|
n.shift(0)
|
|
n.shift(0)
|
|
} else if (n.length == 4) {
|
|
} else if (n.length == 4) {
|
|
@@ -826,7 +817,6 @@
|
|
this.isShowcardValidity = true
|
|
this.isShowcardValidity = true
|
|
},
|
|
},
|
|
confirmValidityPeriod(e) {
|
|
confirmValidityPeriod(e) {
|
|
- console.log('confirm', e)
|
|
|
|
if (e.value[0] == '随时') {
|
|
if (e.value[0] == '随时') {
|
|
switch (this.ValidityPeriodType) {
|
|
switch (this.ValidityPeriodType) {
|
|
case 0:
|
|
case 0:
|
|
@@ -859,7 +849,6 @@
|
|
this.isShowValidity = false
|
|
this.isShowValidity = false
|
|
},
|
|
},
|
|
confirmValidityPeriodcq(e) {
|
|
confirmValidityPeriodcq(e) {
|
|
- console.log('confirm', e)
|
|
|
|
if (e.value[0] == '长期') {
|
|
if (e.value[0] == '长期') {
|
|
this.dataObj.taskValidity = e.value[0]
|
|
this.dataObj.taskValidity = e.value[0]
|
|
} else {
|
|
} else {
|
|
@@ -888,7 +877,6 @@
|
|
uni.$u.route('/pages/release/record');
|
|
uni.$u.route('/pages/release/record');
|
|
},
|
|
},
|
|
radioChange(n) {
|
|
radioChange(n) {
|
|
- console.log('radioChange', n);
|
|
|
|
this.dataDetails.type = n
|
|
this.dataDetails.type = n
|
|
},
|
|
},
|
|
submit() {
|
|
submit() {
|