|
@@ -21,8 +21,11 @@
|
|
<view class="content1">
|
|
<view class="content1">
|
|
<view class="row" @click="selectCargoOwner">
|
|
<view class="row" @click="selectCargoOwner">
|
|
|
|
|
|
- <view class="left select-sf" :class='dataObj.cargoOwner?"":"select-sf1"'>{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
|
|
|
|
- <view class="right"><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
|
|
|
|
|
|
+ <view class="left select-sf" :class='dataObj.cargoOwner?"":"select-sf1"'>
|
|
|
|
+ {{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
|
|
|
|
+ <view class="right">
|
|
|
|
+ <image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
|
|
<!-- <view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
|
|
<view class="left">{{dataObj.cargoOwner}}</view>
|
|
<view class="left">{{dataObj.cargoOwner}}</view>
|
|
@@ -46,7 +49,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="right" @click="selectAddress(0)" v-if="!dataObj.sendArea">
|
|
<view class="right" @click="selectAddress(0)" v-if="!dataObj.sendArea">
|
|
<view v-if='dataObj.sendArea' class="right"></view>
|
|
<view v-if='dataObj.sendArea' class="right"></view>
|
|
- <view class="right" v-else><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
|
|
|
|
|
|
+ <view class="right" v-else>
|
|
|
|
+ <image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;">
|
|
|
|
+ </image>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="row2">
|
|
<view class="row2">
|
|
@@ -63,7 +69,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="right" @click="selectAddress(1)" v-if="!dataObj.unloadArea">
|
|
<view class="right" @click="selectAddress(1)" v-if="!dataObj.unloadArea">
|
|
<view v-if='dataObj.unloadArea' class="right">{{(dataObj.unloadCity+dataObj.unloadArea)}}</view>
|
|
<view v-if='dataObj.unloadArea' class="right">{{(dataObj.unloadCity+dataObj.unloadArea)}}</view>
|
|
- <view class="right" v-else><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
|
|
|
|
|
|
+ <view class="right" v-else>
|
|
|
|
+ <image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;">
|
|
|
|
+ </image>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -74,6 +83,11 @@
|
|
{{dataObj.distance }}
|
|
{{dataObj.distance }}
|
|
km
|
|
km
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="row">
|
|
|
|
+ <view class="left">业务类型</view>
|
|
|
|
+ <view class="right" @click="businessChange">{{dataObj.businessType?dataObj.businessType:"请选择业务类型"}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="left">货物类别</view>
|
|
<view class="left">货物类别</view>
|
|
<view class="right" @click="goodstypeChange">{{dataObj.goodsType?dataObj.goodsType:"请选择货物类别"}}</view>
|
|
<view class="right" @click="goodstypeChange">{{dataObj.goodsType?dataObj.goodsType:"请选择货物类别"}}</view>
|
|
@@ -104,7 +118,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="row">
|
|
<view class="row">
|
|
- <view style='width:120px;' class="left">收货方信用代码(选填)</view>
|
|
|
|
|
|
+ <view style='width:120px;' class="left">收货方信用代码(选填)</view>
|
|
<view class="right flex">
|
|
<view class="right flex">
|
|
<input maxlength="18" placeholder="统一社会信用代码" class="input" v-model="dataObj.receiverCreditCode" />
|
|
<input maxlength="18" placeholder="统一社会信用代码" class="input" v-model="dataObj.receiverCreditCode" />
|
|
</view>
|
|
</view>
|
|
@@ -225,23 +239,36 @@
|
|
{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
|
|
{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
|
|
|
|
|
|
+ <itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022'
|
|
|
|
+ ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq">
|
|
|
|
+ </itmister-date-picker>
|
|
|
|
+ <!-- <view class="flex row noborder" >
|
|
|
|
+ <view class="left-text flex">查看
|
|
|
|
+ <u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
|
|
|
|
+ </view>
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
- <view class="submit" @click="submit">立即发布</view>
|
|
|
|
|
|
+ <view class="submit" @click="submit">下一步</view>
|
|
<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
|
|
<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
|
|
:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
|
|
:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
|
|
</u-picker> -->
|
|
</u-picker> -->
|
|
- <itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
|
|
|
|
|
|
+ <itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30"
|
|
|
|
+ @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
|
|
<!-- //货物类别 -->
|
|
<!-- //货物类别 -->
|
|
<u-picker :show="isGoodsType" ref="uPicker" :columns="goodsList" keyName="constValue" @confirm="goodsSubmit"
|
|
<u-picker :show="isGoodsType" ref="uPicker" :columns="goodsList" keyName="constValue" @confirm="goodsSubmit"
|
|
:closeOnClickOverlay='true' @close='isGoodsType=false' @cancel='isGoodsType=false'>
|
|
:closeOnClickOverlay='true' @close='isGoodsType=false' @cancel='isGoodsType=false'>
|
|
</u-picker>
|
|
</u-picker>
|
|
|
|
+ <!-- 业务类型 -->
|
|
|
|
+ <u-picker :show="isBusinessType" ref="uPicker" :columns="businessList" keyName="constValue"
|
|
|
|
+ @confirm="businessSubmit" :closeOnClickOverlay='true' @close='isBusinessType=false'
|
|
|
|
+ @cancel='isBusinessType=false'>
|
|
|
|
+ </u-picker>
|
|
<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='false'
|
|
<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='false'
|
|
- :showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
|
|
|
|
- @cancel="cancelClick"></u-modal>
|
|
|
|
|
|
+ :showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 1000)"
|
|
|
|
+ @close="cancelClick" @cancel="cancelClick"></u-modal>
|
|
<u-modal :show="isShowAlert1" :title="alertTitle" :confirmText='confirmText' :content='alertContent'
|
|
<u-modal :show="isShowAlert1" :title="alertTitle" :confirmText='confirmText' :content='alertContent'
|
|
:closeOnClickOverlay='false' :showCancelButton='showCancelButton' confirmColor='#2772FB'
|
|
:closeOnClickOverlay='false' :showCancelButton='showCancelButton' confirmColor='#2772FB'
|
|
- @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
|
|
|
|
|
|
+ @confirm="$u.throttle(confirmClick(), 1000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
|
|
<u-toast ref="uToast"></u-toast>
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -267,7 +294,7 @@
|
|
columns: [
|
|
columns: [
|
|
[]
|
|
[]
|
|
],
|
|
],
|
|
- array:{},
|
|
|
|
|
|
+ array: {},
|
|
freightAdvance: false,
|
|
freightAdvance: false,
|
|
dataObj: {
|
|
dataObj: {
|
|
commonId: '',
|
|
commonId: '',
|
|
@@ -303,6 +330,8 @@
|
|
sendLatitude: '',
|
|
sendLatitude: '',
|
|
unsendLongitude: '',
|
|
unsendLongitude: '',
|
|
unsendLatitude: '',
|
|
unsendLatitude: '',
|
|
|
|
+ sendAdCode: '',
|
|
|
|
+ unsendAdCode: ''
|
|
},
|
|
},
|
|
confirmText: '',
|
|
confirmText: '',
|
|
isShowAlert1: false,
|
|
isShowAlert1: false,
|
|
@@ -340,8 +369,11 @@
|
|
|
|
|
|
],
|
|
],
|
|
// 货物类别
|
|
// 货物类别
|
|
- isGoodsType:false,
|
|
|
|
- goodsList:[]
|
|
|
|
|
|
+ isGoodsType: false,
|
|
|
|
+ goodsList: [],
|
|
|
|
+ //业务类型
|
|
|
|
+ isBusinessType: false,
|
|
|
|
+ businessList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onNavigationBarButtonTap(e) {
|
|
onNavigationBarButtonTap(e) {
|
|
@@ -351,8 +383,12 @@
|
|
onShow() {
|
|
onShow() {
|
|
var datetime = new Date().getTime()
|
|
var datetime = new Date().getTime()
|
|
var datetime1 = datetime + (24 * 60 * 60 * 1000 * 30 * 6)
|
|
var datetime1 = datetime + (24 * 60 * 60 * 1000 * 30 * 6)
|
|
- var date=new Date(datetime1)
|
|
|
|
- this.array={year:date.getFullYear(),month:date.getMonth() + 1,day:date.getDate()}
|
|
|
|
|
|
+ var date = new Date(datetime1)
|
|
|
|
+ this.array = {
|
|
|
|
+ year: date.getFullYear(),
|
|
|
|
+ month: date.getMonth() + 1,
|
|
|
|
+ day: date.getDate()
|
|
|
|
+ }
|
|
_this = this
|
|
_this = this
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
// let _status = this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
|
|
// let _status = this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
|
|
@@ -406,14 +442,15 @@
|
|
if (_faddress) {
|
|
if (_faddress) {
|
|
this.dataObj.sendCity = _faddress.city
|
|
this.dataObj.sendCity = _faddress.city
|
|
this.dataObj.sendArea = _faddress.area
|
|
this.dataObj.sendArea = _faddress.area
|
|
|
|
+ this.dataObj.sendAdCode = _faddress.adCode
|
|
this.dataObj.sendPrivate = _faddress.province
|
|
this.dataObj.sendPrivate = _faddress.province
|
|
this.dataObj.sendDetailedAddress = _faddress.detailedAddress
|
|
this.dataObj.sendDetailedAddress = _faddress.detailedAddress
|
|
this.dataObj.sendLongitude = _faddress.longitude
|
|
this.dataObj.sendLongitude = _faddress.longitude
|
|
this.dataObj.sendLatitude = _faddress.latitude
|
|
this.dataObj.sendLatitude = _faddress.latitude
|
|
- if(_faddress.contactPhone){
|
|
|
|
|
|
+ if (_faddress.contactPhone) {
|
|
this.dataObj.senderPhone = _faddress.contactPhone
|
|
this.dataObj.senderPhone = _faddress.contactPhone
|
|
}
|
|
}
|
|
- if(_faddress.contacts){
|
|
|
|
|
|
+ if (_faddress.contacts) {
|
|
this.dataObj.sender = _faddress.contacts
|
|
this.dataObj.sender = _faddress.contacts
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -423,13 +460,14 @@
|
|
this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
|
|
this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
|
|
this.dataObj.unloadCity = _saddress.city
|
|
this.dataObj.unloadCity = _saddress.city
|
|
this.dataObj.unloadArea = _saddress.area
|
|
this.dataObj.unloadArea = _saddress.area
|
|
|
|
+ this.dataObj.unsendAdCode = _faddress.adCode
|
|
this.dataObj.unloadPrivate = _saddress.province
|
|
this.dataObj.unloadPrivate = _saddress.province
|
|
this.dataObj.unsendLongitude = _saddress.longitude
|
|
this.dataObj.unsendLongitude = _saddress.longitude
|
|
this.dataObj.unsendLatitude = _saddress.latitude
|
|
this.dataObj.unsendLatitude = _saddress.latitude
|
|
- if(_saddress.contacts){
|
|
|
|
|
|
+ if (_saddress.contacts) {
|
|
this.dataObj.receiver = _saddress.contacts
|
|
this.dataObj.receiver = _saddress.contacts
|
|
}
|
|
}
|
|
- if(_saddress.contactPhone){
|
|
|
|
|
|
+ if (_saddress.contactPhone) {
|
|
this.dataObj.receiverPhone = _saddress.contactPhone
|
|
this.dataObj.receiverPhone = _saddress.contactPhone
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -445,17 +483,18 @@
|
|
this.dataObj.loadingDateEnd = '随时'
|
|
this.dataObj.loadingDateEnd = '随时'
|
|
this.dataObj.taskValidity = '长期'
|
|
this.dataObj.taskValidity = '长期'
|
|
this.getSFList()
|
|
this.getSFList()
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
async onLoad() {
|
|
async onLoad() {
|
|
//货物类别(默认上一次)
|
|
//货物类别(默认上一次)
|
|
this.queryGoodsList() // 查询货物类别
|
|
this.queryGoodsList() // 查询货物类别
|
|
let goods = uni.getStorageSync("goodsType")
|
|
let goods = uni.getStorageSync("goodsType")
|
|
- if(goods){
|
|
|
|
|
|
+ if (goods) {
|
|
this.dataObj.goodsType = goods.name
|
|
this.dataObj.goodsType = goods.name
|
|
this.dataObj.goodsTypeKey = goods.key
|
|
this.dataObj.goodsTypeKey = goods.key
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ this.queryBusinessTypeList() //查询业务类型
|
|
|
|
+
|
|
|
|
|
|
// _this = this
|
|
// _this = this
|
|
// // #ifdef APP-PLUS
|
|
// // #ifdef APP-PLUS
|
|
@@ -481,27 +520,58 @@
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- queryGoodsList(){
|
|
|
|
|
|
+ lookContract(){
|
|
|
|
+ uni.downloadFile({
|
|
|
|
+ url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
|
|
|
|
+ success: function(res) {
|
|
|
|
+ var filePath = res.tempFilePath;
|
|
|
|
+ uni.openDocument({
|
|
|
|
+ filePath: filePath,
|
|
|
|
+ showMenu: true,
|
|
|
|
+ success: function(res) {
|
|
|
|
+ console.log('打开文档成功');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ queryGoodsList() {
|
|
this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
|
|
this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
|
|
- constId: "CON1"
|
|
|
|
- }).then(res => {
|
|
|
|
- this.goodsList.push(res.data)
|
|
|
|
- console.log(this.goodsList)
|
|
|
|
- })
|
|
|
|
|
|
+ constId: "CON1"
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.dataObj.goodsType = res.data[0].constValue
|
|
|
|
+ this.goodsList.push(res.data)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- goodstypeChange(){
|
|
|
|
|
|
+ queryBusinessTypeList() {
|
|
|
|
+ this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
|
|
|
|
+ constId: "BUS1"
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.dataObj.businessType = res.data[0].constValue
|
|
|
|
+ this.businessList.push(res.data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ goodstypeChange() {
|
|
this.isGoodsType = true
|
|
this.isGoodsType = true
|
|
},
|
|
},
|
|
- goodsSubmit(e){
|
|
|
|
|
|
+ businessChange() {
|
|
|
|
+ this.isBusinessType = true
|
|
|
|
+ },
|
|
|
|
+ goodsSubmit(e) {
|
|
this.dataObj.goodsType = e.value[0].constValue
|
|
this.dataObj.goodsType = e.value[0].constValue
|
|
this.dataObj.goodsTypeKey = e.value[0].constKey
|
|
this.dataObj.goodsTypeKey = e.value[0].constKey
|
|
- let _obj={
|
|
|
|
- name:e.value[0].constValue,
|
|
|
|
- key:e.value[0].constKey
|
|
|
|
|
|
+ let _obj = {
|
|
|
|
+ name: e.value[0].constValue,
|
|
|
|
+ key: e.value[0].constKey
|
|
}
|
|
}
|
|
- uni.setStorageSync("goodsType",_obj)
|
|
|
|
|
|
+ uni.setStorageSync("goodsType", _obj)
|
|
this.isGoodsType = false
|
|
this.isGoodsType = false
|
|
},
|
|
},
|
|
|
|
+ businessSubmit(e) {
|
|
|
|
+ this.dataObj.businessType = e.value[0].constValue
|
|
|
|
+ this.dataObj.businessTypeKey = e.value[0].constKey
|
|
|
|
+ this.isBusinessType = false
|
|
|
|
+ },
|
|
getSFList() {
|
|
getSFList() {
|
|
this.dataObj.commonId = this.userInfo.id
|
|
this.dataObj.commonId = this.userInfo.id
|
|
this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
|
|
this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
|
|
@@ -509,8 +579,8 @@
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (uni.getStorageSync('releaseCargoOwner')) {
|
|
if (uni.getStorageSync('releaseCargoOwner')) {
|
|
this.dataObj.cargoOwner = uni.getStorageSync('releaseCargoOwner')
|
|
this.dataObj.cargoOwner = uni.getStorageSync('releaseCargoOwner')
|
|
- this.dataObj.compId =uni.getStorageSync('releasecompId')
|
|
|
|
-
|
|
|
|
|
|
+ this.dataObj.compId = uni.getStorageSync('releasecompId')
|
|
|
|
+
|
|
}
|
|
}
|
|
// 可用企业货主
|
|
// 可用企业货主
|
|
this.qyList = []
|
|
this.qyList = []
|
|
@@ -524,7 +594,7 @@
|
|
if (!_self) _self = []
|
|
if (!_self) _self = []
|
|
if (_self.length > 0) {
|
|
if (_self.length > 0) {
|
|
for (let i = 0; i < _self.length; i++) {
|
|
for (let i = 0; i < _self.length; i++) {
|
|
- _self[i].compStatus='wd'
|
|
|
|
|
|
+ _self[i].compStatus = 'wd'
|
|
if (_self[i].status == '已认证') {
|
|
if (_self[i].status == '已认证') {
|
|
this.qyList.push(_self[i])
|
|
this.qyList.push(_self[i])
|
|
}
|
|
}
|
|
@@ -532,7 +602,7 @@
|
|
}
|
|
}
|
|
if (_dlhz.length > 0) {
|
|
if (_dlhz.length > 0) {
|
|
for (let i = 0; i < _dlhz.length; i++) {
|
|
for (let i = 0; i < _dlhz.length; i++) {
|
|
- _dlhz[i].compStatus='ss'
|
|
|
|
|
|
+ _dlhz[i].compStatus = 'ss'
|
|
if (_dlhz[i].status == '已认证') {
|
|
if (_dlhz[i].status == '已认证') {
|
|
this.qyList.push(_dlhz[i])
|
|
this.qyList.push(_dlhz[i])
|
|
}
|
|
}
|
|
@@ -591,6 +661,13 @@
|
|
})
|
|
})
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
+ if (uni.$u.test.isEmpty(this.dataObj.businessType)) {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "业务类型不能为空!",
|
|
|
|
+ })
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
if (uni.$u.test.isEmpty(this.dataObj.goodsType)) {
|
|
if (uni.$u.test.isEmpty(this.dataObj.goodsType)) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -612,8 +689,6 @@
|
|
})
|
|
})
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- console.log(this.dataObj.receiver,"收货方")
|
|
|
|
- console.log(this.dataObj.receiverPhone,"收货方手机号")
|
|
|
|
if (uni.$u.test.isEmpty(this.dataObj.receiver)) {
|
|
if (uni.$u.test.isEmpty(this.dataObj.receiver)) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -640,7 +715,7 @@
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
message: "信用代码和身份证号码至少填写一个!",
|
|
message: "信用代码和身份证号码至少填写一个!",
|
|
- duration:2000
|
|
|
|
|
|
+ duration: 4000
|
|
})
|
|
})
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
@@ -651,14 +726,14 @@
|
|
// })
|
|
// })
|
|
// return true
|
|
// return true
|
|
// }
|
|
// }
|
|
- if(this.dataObj.receiverIdcard&&this.dataObj.receiverIdcard.length!=18){
|
|
|
|
|
|
+ if (this.dataObj.receiverIdcard && this.dataObj.receiverIdcard.length != 18) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
- type: 'error',
|
|
|
|
- message: "身份证号输入错误!",
|
|
|
|
- })
|
|
|
|
- return true
|
|
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "身份证号输入错误!",
|
|
|
|
+ })
|
|
|
|
+ return true
|
|
}
|
|
}
|
|
- if(this.dataObj.receiverCreditCode&&this.dataObj.receiverCreditCode.length!=18){
|
|
|
|
|
|
+ if (this.dataObj.receiverCreditCode && this.dataObj.receiverCreditCode.length != 18) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
message: "信用代码输入错误!",
|
|
message: "信用代码输入错误!",
|
|
@@ -688,7 +763,7 @@
|
|
if (this.dataObj.weight) {
|
|
if (this.dataObj.weight) {
|
|
if (
|
|
if (
|
|
this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
|
|
this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
|
|
- String(this.dataObj.weight).indexOf('.') != -1 && String(tthis.dataObj.weight).length -
|
|
|
|
|
|
+ String(this.dataObj.weight).indexOf('.') != -1 && String(this.dataObj.weight).length -
|
|
(String(this.dataObj.weight).indexOf(
|
|
(String(this.dataObj.weight).indexOf(
|
|
'.') + 1) > 2)
|
|
'.') + 1) > 2)
|
|
) {
|
|
) {
|
|
@@ -734,7 +809,7 @@
|
|
if (this.dataObj.loadWeightSmall) {
|
|
if (this.dataObj.loadWeightSmall) {
|
|
if (
|
|
if (
|
|
this.dataObj.loadWeightSmall < 0.1 || this.dataObj.loadWeightSmall > 100 || (
|
|
this.dataObj.loadWeightSmall < 0.1 || this.dataObj.loadWeightSmall > 100 || (
|
|
- String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(tthis.dataObj
|
|
|
|
|
|
+ String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(this.dataObj
|
|
.loadWeightSmall).length -
|
|
.loadWeightSmall).length -
|
|
(String(this.dataObj.loadWeightSmall).indexOf(
|
|
(String(this.dataObj.loadWeightSmall).indexOf(
|
|
'.') + 1) > 3)
|
|
'.') + 1) > 3)
|
|
@@ -750,7 +825,7 @@
|
|
if (this.dataObj.loadWeight) {
|
|
if (this.dataObj.loadWeight) {
|
|
if (
|
|
if (
|
|
this.dataObj.loadWeight < 0.1 || this.dataObj.loadWeight > 100 || (
|
|
this.dataObj.loadWeight < 0.1 || this.dataObj.loadWeight > 100 || (
|
|
- String(this.dataObj.loadWeight).indexOf('.') != -1 && String(tthis.dataObj.loadWeight).length -
|
|
|
|
|
|
+ String(this.dataObj.loadWeight).indexOf('.') != -1 && String(this.dataObj.loadWeight).length -
|
|
(String(this.dataObj.loadWeight).indexOf(
|
|
(String(this.dataObj.loadWeight).indexOf(
|
|
'.') + 1) > 3)
|
|
'.') + 1) > 3)
|
|
) {
|
|
) {
|
|
@@ -776,7 +851,7 @@
|
|
confirmClick() {
|
|
confirmClick() {
|
|
uni.$u.throttle(this.requestdata, 500)
|
|
uni.$u.throttle(this.requestdata, 500)
|
|
},
|
|
},
|
|
- requestdata(){
|
|
|
|
|
|
+ requestdata() {
|
|
console.log(this.dataObj)
|
|
console.log(this.dataObj)
|
|
// // #ifdef APP-PLUS
|
|
// // #ifdef APP-PLUS
|
|
// if (this.alertTitle == '账号审核中') {
|
|
// if (this.alertTitle == '账号审核中') {
|
|
@@ -788,7 +863,7 @@
|
|
// return
|
|
// return
|
|
// }
|
|
// }
|
|
// // #endif
|
|
// // #endif
|
|
-
|
|
|
|
|
|
+
|
|
// if (this.alertTitle == '身份信息未认证,去认证?') {
|
|
// if (this.alertTitle == '身份信息未认证,去认证?') {
|
|
// uni.switchTab({
|
|
// uni.switchTab({
|
|
// url: '/pages/mine/index'
|
|
// url: '/pages/mine/index'
|
|
@@ -796,7 +871,7 @@
|
|
// return
|
|
// return
|
|
// }
|
|
// }
|
|
// this.isShowAlert = false
|
|
// this.isShowAlert = false
|
|
-
|
|
|
|
|
|
+
|
|
if (this.dataDetails.type == '元/吨') {
|
|
if (this.dataDetails.type == '元/吨') {
|
|
this.dataObj.billingMethod = 0
|
|
this.dataObj.billingMethod = 0
|
|
} else {
|
|
} else {
|
|
@@ -807,11 +882,11 @@
|
|
} else {
|
|
} else {
|
|
this.dataObj.freightAdvance = 0
|
|
this.dataObj.freightAdvance = 0
|
|
}
|
|
}
|
|
- if(!this.dataObj.receiverIdcard){
|
|
|
|
- this.dataObj.receiverIdcard=''
|
|
|
|
|
|
+ if (!this.dataObj.receiverIdcard) {
|
|
|
|
+ this.dataObj.receiverIdcard = ''
|
|
}
|
|
}
|
|
- if(!this.dataObj.receiverCreditCode){
|
|
|
|
- this.dataObj.receiverCreditCode=''
|
|
|
|
|
|
+ if (!this.dataObj.receiverCreditCode) {
|
|
|
|
+ this.dataObj.receiverCreditCode = ''
|
|
}
|
|
}
|
|
let _list = []
|
|
let _list = []
|
|
for (let i = 0; i < this.checkboxValue1.length; i++) {
|
|
for (let i = 0; i < this.checkboxValue1.length; i++) {
|
|
@@ -827,98 +902,39 @@
|
|
}
|
|
}
|
|
this.dataObj.carModel = _list.toString()
|
|
this.dataObj.carModel = _list.toString()
|
|
this.dataObj.commonId = this.userInfo.id
|
|
this.dataObj.commonId = this.userInfo.id
|
|
- this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
|
|
|
|
- uni.removeStorage({
|
|
|
|
- key: 'storage_saddress'
|
|
|
|
- });
|
|
|
|
- uni.removeStorage({
|
|
|
|
- key: 'storage_faddress'
|
|
|
|
- });
|
|
|
|
- uni.removeStorage({
|
|
|
|
- key: 'releaseCargoOwner'
|
|
|
|
- });
|
|
|
|
- uni.removeStorage({
|
|
|
|
- key: 'releasecompId'
|
|
|
|
- });
|
|
|
|
- this.$refs.uToast.show({
|
|
|
|
- type: 'success',
|
|
|
|
- message: "发布成功",
|
|
|
|
- complete() {
|
|
|
|
- // _this.dataObj = {
|
|
|
|
- // commonId: '',
|
|
|
|
- // cargoOwner: '',
|
|
|
|
- // sendPrivate: '',
|
|
|
|
- // sendCity: '',
|
|
|
|
- // sendArea: '',
|
|
|
|
- // sendDetailedAddress: '',
|
|
|
|
- // unloadPrivate: '',
|
|
|
|
- // unloadCity: '',
|
|
|
|
- // unloadArea: '',
|
|
|
|
- // unloadDetailedAddress: '',
|
|
|
|
- // distance: '',
|
|
|
|
- // goodsName: '',
|
|
|
|
- // billingMethod: '元/吨',
|
|
|
|
- // freightPrice: '',
|
|
|
|
- // freightAdvance: true,
|
|
|
|
- // sender: '',
|
|
|
|
- // senderPhone: '',
|
|
|
|
- // receiver: '',
|
|
|
|
- // receiverPhone: '',
|
|
|
|
- // weight: '',
|
|
|
|
- // loadingDateStart: '',
|
|
|
|
- // loadingDateEnd: '',
|
|
|
|
- // carLengthSmall: '',
|
|
|
|
- // carLength: '',
|
|
|
|
- // loadWeightSmall: '',
|
|
|
|
- // loadWeight: '',
|
|
|
|
- // carModel: '',
|
|
|
|
- // taskDescription: '',
|
|
|
|
- // taskValidity: '',
|
|
|
|
- // sendLongitude: '',
|
|
|
|
- // receiverIdcard:'',
|
|
|
|
- // sendLatitude: '',
|
|
|
|
- // receiverCreditCode:'',
|
|
|
|
- // unsendLongitude: '',
|
|
|
|
- // unsendLatitude: '',
|
|
|
|
- // }
|
|
|
|
- // _this.checkboxValue1 = ['不限']
|
|
|
|
- // _this.queryGoodsList() // 查询货物类别
|
|
|
|
- // let goods = uni.getStorageSync("goodsType")
|
|
|
|
- // if(goods){
|
|
|
|
- // _this.dataObj.goodsType = goods.name
|
|
|
|
- // _this.dataObj.goodsTypeKey = goods.key
|
|
|
|
- // }
|
|
|
|
- // const pages = getCurrentPages()
|
|
|
|
- // console.log(pages)
|
|
|
|
- // 声明一个pages使用getCurrentPages方法
|
|
|
|
- // const curPage = pages[pages.length - 1]
|
|
|
|
- // 声明一个当前页面
|
|
|
|
- // curPage.$vm.$options.onLoad[1].bind(curPage.$vm); // 传入参数
|
|
|
|
- // curPage.$vm.$options.onShow[1].bind(curPage.$vm); // curPage.onShow()
|
|
|
|
- // curPage.$vm.$options.onReady[1].bind(curPage.$vm);
|
|
|
|
- // curPage.onReady()
|
|
|
|
- // uni.switchTab({
|
|
|
|
- // url: '/pages/mine/index'
|
|
|
|
- // })
|
|
|
|
- // uni.switchTab({
|
|
|
|
- // url: '/pages/mine/index'
|
|
|
|
- // })
|
|
|
|
- uni.redirectTo({url:"/pages/release/release"})
|
|
|
|
- // uni.reLaunch({url:"/pages/release/release"})
|
|
|
|
- // uni.redirectTo("/pages/release/record")
|
|
|
|
- // uni.$u.route("/pages/release/record")
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.isShowAlert = false
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
- .catch(res => {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res.message,
|
|
|
|
- icon: 'none',
|
|
|
|
- duration: 2000
|
|
|
|
- })
|
|
|
|
- });
|
|
|
|
|
|
+ uni.$u.route('/pages/order/signContract', {
|
|
|
|
+ obj: JSON.stringify(this.dataObj),
|
|
|
|
+ type:1
|
|
|
|
+ });
|
|
|
|
+ // this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
|
|
|
|
+
|
|
|
|
+ // if(res.code == 200){
|
|
|
|
+ // uni.removeStorage({
|
|
|
|
+ // key: 'storage_saddress'
|
|
|
|
+ // });
|
|
|
|
+ // uni.removeStorage({
|
|
|
|
+ // key: 'storage_faddress'
|
|
|
|
+ // });
|
|
|
|
+ // uni.removeStorage({
|
|
|
|
+ // key: 'releaseCargoOwner'
|
|
|
|
+ // });
|
|
|
|
+ // uni.removeStorage({
|
|
|
|
+ // key: 'releasecompId'
|
|
|
|
+ // });
|
|
|
|
+ // // uni.redirectTo({
|
|
|
|
+ // // url: "/pages/release/release"
|
|
|
|
+ // // })
|
|
|
|
+ // this.dataObj.id = res.data
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // .catch(res => {
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: res.message,
|
|
|
|
+ // icon: 'none',
|
|
|
|
+ // duration: 2000
|
|
|
|
+ // })
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
cancelClick() {
|
|
cancelClick() {
|
|
this.isShowAlert = false
|
|
this.isShowAlert = false
|
|
@@ -961,7 +977,7 @@
|
|
this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
|
|
this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
|
|
.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
|
|
.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
.catch(res => {
|
|
.catch(res => {
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
@@ -1001,38 +1017,39 @@
|
|
for (let i = 0; i < this.qyList.length; i++) {
|
|
for (let i = 0; i < this.qyList.length; i++) {
|
|
let _name = this.qyList[i].company ? this.qyList[i].company : this.qyList[i].companyName
|
|
let _name = this.qyList[i].company ? this.qyList[i].company : this.qyList[i].companyName
|
|
if (_name == e.value[0]) {
|
|
if (_name == e.value[0]) {
|
|
- if(e.value[0]!='个人货主'){
|
|
|
|
- this.freightAdvance=true
|
|
|
|
- if(this.qyList[i].compStatus=='ss'){
|
|
|
|
- this.dataObj.compId=this.qyList[i].compId
|
|
|
|
- }else{
|
|
|
|
- this.dataObj.compId=this.qyList[i].id
|
|
|
|
|
|
+ if (e.value[0] != '个人货主') {
|
|
|
|
+ this.freightAdvance = true
|
|
|
|
+ if (this.qyList[i].compStatus == 'ss') {
|
|
|
|
+ this.dataObj.compId = this.qyList[i].compId
|
|
|
|
+ } else {
|
|
|
|
+ this.dataObj.compId = this.qyList[i].id
|
|
}
|
|
}
|
|
// console.log(this.qyList[i].compStatus,this.dataObj.compId)
|
|
// console.log(this.qyList[i].compStatus,this.dataObj.compId)
|
|
uni.setStorageSync('releasecompId', this.dataObj.compId)
|
|
uni.setStorageSync('releasecompId', this.dataObj.compId)
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.$request.baseRequest('get', '/hyCargoOwnerPayeeInfo/selectPayee', {
|
|
this.$request.baseRequest('get', '/hyCargoOwnerPayeeInfo/selectPayee', {
|
|
- commonId: this.userInfo.id,
|
|
|
|
- pageSize: 10,
|
|
|
|
- currentPage: 1,
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.code == '200') {
|
|
|
|
- if(res.data.records.length==0){
|
|
|
|
- this.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: "未绑定银行卡"})
|
|
|
|
- this.dataObj.cargoOwner=''
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- this.freightAdvance=false
|
|
|
|
|
|
+ commonId: this.userInfo.id,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.code == '200') {
|
|
|
|
+ if (res.data.records.length == 0) {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "未绑定银行卡"
|
|
|
|
+ })
|
|
|
|
+ this.dataObj.cargoOwner = ''
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ this.freightAdvance = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- this.freightAdvance= this.qyList[i].advanceFreightService == 1 ? true : false
|
|
|
|
|
|
+ this.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
|
|
this.dataObj.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
|
|
this.dataObj.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
uni.setStorageSync('releaseCargoOwner', this.dataObj.cargoOwner)
|
|
uni.setStorageSync('releaseCargoOwner', this.dataObj.cargoOwner)
|
|
this.show = false
|
|
this.show = false
|
|
},
|
|
},
|
|
@@ -1061,15 +1078,15 @@
|
|
this.$refs.dateEl.show();
|
|
this.$refs.dateEl.show();
|
|
},
|
|
},
|
|
confirmValidityPeriod(date) {
|
|
confirmValidityPeriod(date) {
|
|
-
|
|
|
|
- switch (this.ValidityPeriodType) {
|
|
|
|
- case 0:
|
|
|
|
- this.dataObj.loadingDateStart = date.date
|
|
|
|
- break
|
|
|
|
- case 1:
|
|
|
|
- this.dataObj.loadingDateEnd =date.date
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ switch (this.ValidityPeriodType) {
|
|
|
|
+ case 0:
|
|
|
|
+ this.dataObj.loadingDateStart = date.date
|
|
|
|
+ break
|
|
|
|
+ case 1:
|
|
|
|
+ this.dataObj.loadingDateEnd = date.date
|
|
|
|
+ break
|
|
|
|
+ }
|
|
},
|
|
},
|
|
getTime: function() {
|
|
getTime: function() {
|
|
|
|
|
|
@@ -1084,7 +1101,7 @@
|
|
return timer;
|
|
return timer;
|
|
},
|
|
},
|
|
confirmValidityPeriodcq(date) {
|
|
confirmValidityPeriodcq(date) {
|
|
- this.dataObj.taskValidity=date.date
|
|
|
|
|
|
+ this.dataObj.taskValidity = date.date
|
|
},
|
|
},
|
|
selectValidityPeriod(type) {
|
|
selectValidityPeriod(type) {
|
|
this.ValidityPeriodType = type
|
|
this.ValidityPeriodType = type
|
|
@@ -1119,7 +1136,8 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.isShowAlert = true;
|
|
|
|
|
|
+ uni.$u.throttle(this.requestdata, 500)
|
|
|
|
+ // this.isShowAlert = true;
|
|
},
|
|
},
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1262,7 +1280,7 @@
|
|
font-size: 36rpx;
|
|
font-size: 36rpx;
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
color: #171717;
|
|
color: #171717;
|
|
- width:90%;
|
|
|
|
|
|
+ width: 90%;
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
// text-align:left;
|
|
// text-align:left;
|
|
}
|
|
}
|
|
@@ -1352,4 +1370,8 @@
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border-radius: 10rpx;
|
|
border-radius: 10rpx;
|
|
}
|
|
}
|
|
|
|
+ uni-navigator {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ color: #2772FB;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|