|
@@ -24,9 +24,18 @@
|
|
|
<view class='row-between'>
|
|
|
<view class="row-left-text">卸货地</view>
|
|
|
<view class="row-right-text place">
|
|
|
- {{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
|
|
|
+ <view class="flex" style="justify-content: flex-end;" @click="selectMap">
|
|
|
+ {{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <u-input placeholder="请输入详细地址" border="none" v-model="detailData.unloadDetailedAddress"
|
|
|
+ inputAlign="right"></u-input>
|
|
|
+ <!-- @change="change" -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<view class='row-between'>
|
|
|
<view class="row-left-text">货名</view>
|
|
|
<view class="row-right-text">{{detailData.goodsName}}</view>
|
|
@@ -45,8 +54,9 @@
|
|
|
<view class='row-between'>
|
|
|
<view class="row-left-text">卸车净重(吨)</view>
|
|
|
<view class="row-right-text">
|
|
|
- <u--input placeholder="请输入卸车净重" border="none" type="number" v-model="detailData.unloadingWeight" inputAlign='right'
|
|
|
- clearable></u--input></view>
|
|
|
+ <u--input placeholder="请输入卸车净重" border="none" type="number" v-model="detailData.unloadingWeight"
|
|
|
+ inputAlign='right' clearable></u--input>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- <view class='row-between'>
|
|
|
<view class="row-left-text">卸车日期</view>
|
|
@@ -80,8 +90,8 @@
|
|
|
</view>
|
|
|
<view class='s-flex'>
|
|
|
<view class="row-left-text" style="margin:20rpx 0;">上传回单照片(磅单)</view>
|
|
|
- <u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event)" @delete="deletePic1"
|
|
|
- name="2" multiple :maxCount="3"></u-upload>
|
|
|
+ <u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event)"
|
|
|
+ @delete="deletePic1" name="2" multiple :maxCount="3"></u-upload>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bottom-btn">
|
|
@@ -95,9 +105,10 @@
|
|
|
:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
|
|
|
</u-picker> -->
|
|
|
<!-- :endDate="array" -->
|
|
|
- <itmister-date-picker :dateStatus="0" ref="dateEl" :startYear="1999"
|
|
|
- :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
|
|
|
+ <itmister-date-picker :dateStatus="0" ref="dateEl" :startYear="1999" :futureYear="30"
|
|
|
+ @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
+ <u-modal :show="distance" :content="distanceTips" :showConfirmButton="false" :showCancelButton="true" :closeOnClickOverlay="true" @cancel="distance=false" @close="distance=false"></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -111,23 +122,23 @@
|
|
|
return {
|
|
|
imgList: [],
|
|
|
fileList1: [],
|
|
|
- fileList2:[],
|
|
|
+ fileList2: [],
|
|
|
validityPeriod: [],
|
|
|
sourceType: ['camera'],
|
|
|
- imgList1:[],
|
|
|
+ imgList1: [],
|
|
|
detailData: {
|
|
|
addressUrl: '',
|
|
|
- hyCarrierInfo:{},
|
|
|
- totalFreight:''
|
|
|
+ hyCarrierInfo: {},
|
|
|
+ totalFreight: ''
|
|
|
},
|
|
|
- defaultIndex:[],
|
|
|
+ defaultIndex: [],
|
|
|
action: this.$helper.ossUploadUrl,
|
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
|
isAdd: true,
|
|
|
isShowAlert: false,
|
|
|
alertContent: '',
|
|
|
alertTitle: '',
|
|
|
- localtion:{},
|
|
|
+ localtion: {},
|
|
|
shippingNoteInfos: [{
|
|
|
shippingNoteNumber: '',
|
|
|
serialNumber: "",
|
|
@@ -143,36 +154,46 @@
|
|
|
driverName: "",
|
|
|
interval: "",
|
|
|
}],
|
|
|
+ // unsendLatitude: "",
|
|
|
+ // unsendLongitude: "",
|
|
|
+ distance:false,
|
|
|
+ distanceTips:"",
|
|
|
+ editPlace:true,//编辑卸车地点标识 true未编辑 false编辑
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.detailData = JSON.parse(options.obj)
|
|
|
- console.log(this.detailData,"编号编号焦点方式规范化见到过")
|
|
|
- this.fileList1=[]
|
|
|
- this.fileList2=[]
|
|
|
- if(this.detailData.hyCarrierInfo.unloadingImg){
|
|
|
- this.imgList=this.detailData.hyCarrierInfo.unloadingImg.split(',')
|
|
|
- var data=this.detailData.hyCarrierInfo.unloadingImg.split(',')
|
|
|
+ console.log(this.detailData)
|
|
|
+ this.fileList1 = []
|
|
|
+ this.fileList2 = []
|
|
|
+ if (this.detailData.hyCarrierInfo.unloadingImg) {
|
|
|
+ this.imgList = this.detailData.hyCarrierInfo.unloadingImg.split(',')
|
|
|
+ var data = this.detailData.hyCarrierInfo.unloadingImg.split(',')
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
- if(data[i]!=''){
|
|
|
- this.fileList1.push({url:data[i]})
|
|
|
+ if (data[i] != '') {
|
|
|
+ this.fileList1.push({
|
|
|
+ url: data[i]
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(this.detailData.hyCarrierInfo.receiptImg){
|
|
|
- this.imgList1=this.detailData.hyCarrierInfo.receiptImg.split(',')
|
|
|
- var data=this.detailData.hyCarrierInfo.receiptImg.split(',')
|
|
|
+ if (this.detailData.hyCarrierInfo.receiptImg) {
|
|
|
+ this.imgList1 = this.detailData.hyCarrierInfo.receiptImg.split(',')
|
|
|
+ var data = this.detailData.hyCarrierInfo.receiptImg.split(',')
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
- if(data[i]!=''){
|
|
|
- this.fileList2.push({url:data[i]})
|
|
|
+ if (data[i] != '') {
|
|
|
+ this.fileList2.push({
|
|
|
+ url: data[i]
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(this.detailData.hyCarrierInfo.totalFreight){
|
|
|
- this.$set(this.detailData,'totalFreight',String(this.detailData.hyCarrierInfo.totalFreight))
|
|
|
+ if (this.detailData.hyCarrierInfo.totalFreight) {
|
|
|
+ this.$set(this.detailData, 'totalFreight', String(this.detailData.hyCarrierInfo.totalFreight))
|
|
|
// this.detailData.totalFreight=String(this.detailData.hyCarrierInfo.totalFreight)
|
|
|
- }else{
|
|
|
- this.$set(this.detailData,'totalFreight',String(this.detailData.freight))
|
|
|
+ } else {
|
|
|
+ this.$set(this.detailData, 'totalFreight', String(this.detailData.freight))
|
|
|
// this.detailData.totalFreight=String(this.detailData.freight)
|
|
|
}
|
|
|
this.detailData.carrierInfo = {
|
|
@@ -184,9 +205,9 @@
|
|
|
// unloadArea: '',
|
|
|
// unloadingImg: '',
|
|
|
// totalFreight: '',
|
|
|
- unloadingImg:this.detailData.hyCarrierInfo.unloadingImg,
|
|
|
- receiptImg:this.detailData.hyCarrierInfo.receiptImg,
|
|
|
- id: this.detailData.carrierId?this.detailData.carrierId:this.detailData.hyCarrierInfo.id,
|
|
|
+ unloadingImg: this.detailData.hyCarrierInfo.unloadingImg,
|
|
|
+ receiptImg: this.detailData.hyCarrierInfo.receiptImg,
|
|
|
+ id: this.detailData.carrierId ? this.detailData.carrierId : this.detailData.hyCarrierInfo.id,
|
|
|
}
|
|
|
// #ifdef APP-PLUS
|
|
|
this.getLngLat();
|
|
@@ -194,40 +215,105 @@
|
|
|
this.getNowTime()
|
|
|
},
|
|
|
methods: {
|
|
|
- stop(){//结束定位
|
|
|
+ selectMap() {
|
|
|
+ let that = this
|
|
|
+ // this.isShowMap = true
|
|
|
+ uni.getLocation({
|
|
|
+ type: 'gcj02',
|
|
|
+ geocode: true,
|
|
|
+ altitude: true,
|
|
|
+ isHighAccuracy: true,
|
|
|
+ success: function(res) {
|
|
|
+ console.log('当前位置的经度:' + res.longitude);
|
|
|
+ console.log('当前位置的纬度:' + res.latitude);
|
|
|
+ uni.chooseLocation({
|
|
|
+ latitude: res.latitude,
|
|
|
+ longitude: res.longitude,
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res);
|
|
|
+ console.log('位置名称:' + res.name);
|
|
|
+ console.log('详细地址:' + res.address);
|
|
|
+ console.log('纬度:' + res.latitude);
|
|
|
+ console.log('经度:' + res.longitude);
|
|
|
+ let _address = that.$helper.formatLocation(res.address)
|
|
|
+ that.detailData.unloadPrivate = _address.Province
|
|
|
+ that.detailData.unloadCity = _address.City
|
|
|
+ that.detailData.unloadArea = _address.Country
|
|
|
+ that.detailData.unloadDetailedAddress = _address.Village
|
|
|
+ // that.unsendLatitude = res.latitude
|
|
|
+ // that.unsendLongitude = res.longitude
|
|
|
+ that.editPlace = false
|
|
|
+ //获取行政区划代码
|
|
|
+ // uni.request({
|
|
|
+ // url: 'https://restapi.amap.com/v3/config/district?key=d29a9d10160efaca0dd616bbec936d7f&subdistrict=1&keywords=' +
|
|
|
+ // _address.City,
|
|
|
+ // success: (res) => {
|
|
|
+ // for(let i = 0 ; i < res.data.districts[0].districts.length ; i++){
|
|
|
+ // if(res.data.districts[0].districts[i].name == _address.Country){
|
|
|
+ // that.addressInfo.adCode = res.data.districts[0].districts[i].adcode
|
|
|
+ // console.log("行政区划代码"+that.addressInfo.adCode)
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ that.$forceUpdate()
|
|
|
+ },
|
|
|
+ fail(err) {
|
|
|
+ console.log(err)
|
|
|
+ },
|
|
|
+ complete(res1) {
|
|
|
+ console.log(res1)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ stop() { //结束定位
|
|
|
this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
|
|
|
this.shippingNoteInfos[0].serialNumber = "0000", //分单号
|
|
|
- this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLongitude = this.detailData.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLatitude = this.detailData.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLongitude = this.detailData.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLatitude = this.detailData.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
|
|
|
- this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
|
|
|
+ this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData
|
|
|
+ .sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData
|
|
|
+ .unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLongitude = this.detailData
|
|
|
+ .sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLatitude = this.detailData
|
|
|
+ .sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLongitude = this.detailData
|
|
|
+ .unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLatitude = this.detailData
|
|
|
+ .unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLocationText = this.detailData
|
|
|
+ .sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLocationText = this.detailData
|
|
|
+ .unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].vehicleNumber = this.detailData
|
|
|
+ .carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
|
|
|
+ this.shippingNoteInfos[0].driverName = this.detailData
|
|
|
+ .driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
|
|
|
this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
|
|
|
// var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
|
|
|
- console.log("查看结束参数",this.shippingNoteInfos)
|
|
|
-
|
|
|
+ console.log("查看结束参数", this.shippingNoteInfos)
|
|
|
+
|
|
|
let remark = ""
|
|
|
- sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(res) {
|
|
|
+ sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(
|
|
|
+ res) {
|
|
|
if (res.type == "onSuccess") {
|
|
|
- console.log("结束成功!!!",res)
|
|
|
+ console.log("结束成功!!!", res)
|
|
|
//成功
|
|
|
- } else if (res.type == "onFailure"){
|
|
|
- console.log("结束成功!!!",res)
|
|
|
+ } else if (res.type == "onFailure") {
|
|
|
+ console.log("结束成功!!!", res)
|
|
|
//失败
|
|
|
- var errorCode = res.data.errorCode;//错误码
|
|
|
- var errorMsg = res.data.errorMsg;//错误描述
|
|
|
+ var errorCode = res.data.errorCode; //错误码
|
|
|
+ var errorMsg = res.data.errorMsg; //错误描述
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: errorMsg,
|
|
|
})
|
|
|
return
|
|
|
- }
|
|
|
- });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
deletePic(event) {
|
|
|
console.log(this[`fileList${event.name}`])
|
|
@@ -250,8 +336,8 @@
|
|
|
this.detailData.carrierInfo.unloadingDate = defaultDate
|
|
|
// this.$forceUpdate()
|
|
|
},
|
|
|
- eliminate(){
|
|
|
- this.$set(this.detailData,'totalFreight','')
|
|
|
+ eliminate() {
|
|
|
+ this.$set(this.detailData, 'totalFreight', '')
|
|
|
// t.totalFreight=''
|
|
|
console.log(this.detailData.totalFreight)
|
|
|
console.log(this.detailData.totalFreight.length)
|
|
@@ -280,7 +366,7 @@
|
|
|
// console.log(this.detailData.carrierInfo.sendCity)
|
|
|
// console.log(this.detailData.carrierInfo.sendArea)
|
|
|
// this.$forceUpdate()
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
// this.$helper.fUN_AmapLocation.stop({}, result => {
|
|
|
// uni.hideLoading()
|
|
@@ -297,13 +383,15 @@
|
|
|
// that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
|
|
|
that.detailData.carrierInfo.unloadingAreaLongitude = res.longitude;
|
|
|
that.detailData.carrierInfo.unloadingAreaLatitude = res.latitude;
|
|
|
- console.log("1234567890")
|
|
|
that.detailData.carrierInfo.unloadCity = that.$helper.filterUrban(res.address.city)
|
|
|
- that.detailData.carrierInfo.unloadArea = that.$helper.filterUrban(res.address.district)
|
|
|
+ that.detailData.carrierInfo.unloadArea = that.$helper.filterUrban(res.address
|
|
|
+ .district)
|
|
|
that.localtion.city = that.$helper.filterUrban(res.address.city)
|
|
|
that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
|
|
|
- that.detailData.carrierInfo.unloadingCity = that.$helper.filterUrban(res.address.city)
|
|
|
- that.detailData.carrierInfo.unloadingArea = that.$helper.filterUrban(res.address.district)
|
|
|
+ that.detailData.carrierInfo.unloadingCity = that.$helper.filterUrban(res.address
|
|
|
+ .city)
|
|
|
+ that.detailData.carrierInfo.unloadingArea = that.$helper.filterUrban(res.address
|
|
|
+ .district)
|
|
|
that.detailData.carrierInfo.unloadingLongitude = res.longitude;
|
|
|
that.detailData.carrierInfo.unloadingLatitude = res.latitude;
|
|
|
that.$forceUpdate()
|
|
@@ -385,7 +473,7 @@
|
|
|
async afterRead(event) {
|
|
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
let lists = [].concat(event.file)
|
|
|
-
|
|
|
+
|
|
|
let fileListLen = this[`fileList${event.name}`].length
|
|
|
lists.map((item) => {
|
|
|
this[`fileList${event.name}`].push({
|
|
@@ -444,16 +532,34 @@
|
|
|
// 上传成功回调函数
|
|
|
console.log('图片地址', result)
|
|
|
this.imgList1.push(result)
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
)
|
|
|
},
|
|
|
onProgress(e) {
|
|
|
console.log(e)
|
|
|
},
|
|
|
-
|
|
|
+ getDistance(lat1, lng1, lat2, lng2) {
|
|
|
+ var radLat1 = lat1 * Math.PI / 180.0;
|
|
|
+ var radLat2 = lat2 * Math.PI / 180.0;
|
|
|
+ var a = radLat1 - radLat2;
|
|
|
+ var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
|
|
|
+ var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
|
|
+ Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
|
|
+ s = s * 6378.137; // EARTH_RADIUS;
|
|
|
+ s = Math.round(s * 10000) / 10000;
|
|
|
+ // // 纬度之差
|
|
|
+ // var a = lat1 - lat2;
|
|
|
+ // // 经度之差
|
|
|
+ // var b = lng1 - lng2;
|
|
|
+ // // 计算两点距离的公式
|
|
|
+ // var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
|
|
+ // Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(b / 2), 2)));
|
|
|
+ // // 弧长乘地球半径, 返回单位: 千米
|
|
|
+ // s = s * 6378.137;
|
|
|
+ return s;
|
|
|
+ },
|
|
|
submit(type) {
|
|
|
-
|
|
|
if (type == 1) {
|
|
|
this.alertContent = '确定暂存卸车信息?'
|
|
|
} else {
|
|
@@ -471,7 +577,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (this.fileList2.length == 0) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
@@ -488,11 +594,24 @@
|
|
|
// })
|
|
|
// return
|
|
|
// }
|
|
|
+ // this.detailData.publishTaskInfo.unsendLatitude //任务卸车所在地经纬度
|
|
|
+ // this.detailData.publishTaskInfo.unsendLongitude
|
|
|
+ var lat = this.detailData.carrierInfo.unloadingLatitude //当前定位所在的经纬度
|
|
|
+ var lng = this.detailData.carrierInfo.unloadingLongitude
|
|
|
+ if(this.editPlace){//true 未编辑 判断当前定位与任务卸车地点距离 大于5KM提示,编辑卸车地点后不在判断
|
|
|
+ let juli = this.getDistance(this.detailData.publishTaskInfo.unsendLatitude,this.detailData.carrierInfo.unloadingLongitude,lat,lng)
|
|
|
+ console.log("更改卸车地后距离",juli)
|
|
|
+ if(Number(juli)>5){
|
|
|
+ this.distanceTips="当前定位与运单卸货地不符,请在指定地点确认卸车,如果卸货地发生变化,请修改本页面基本信息中的卸货地址!",
|
|
|
+ this.distance = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
this.isShowAlert = true
|
|
|
this.detailData.statusFlag = type
|
|
|
},
|
|
|
confirmClick() {
|
|
|
- var that=this
|
|
|
+ var that = this
|
|
|
if (this.detailData.statusFlag == 1) {
|
|
|
delete this.detailData.carrierInfo.unloadingAreaLongitude;
|
|
|
delete this.detailData.carrierInfo.unloadingAreaLatitude;
|
|
@@ -524,13 +643,11 @@
|
|
|
// });
|
|
|
// return
|
|
|
// }
|
|
|
-
|
|
|
-
|
|
|
this.isShowAlert = false
|
|
|
uni.showLoading({
|
|
|
- title:'加载中'
|
|
|
+ title: '加载中'
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
let time = new Date() //卸车时间 去当前时间的时分秒
|
|
|
let h = time.getHours();
|
|
|
if (h < 10) {
|
|
@@ -544,8 +661,9 @@
|
|
|
if (m < 10) {
|
|
|
m = "0" + m
|
|
|
}
|
|
|
- if(this.detailData.carrierInfo.unloadingDate){//卸车时间 去当前时间的时分秒
|
|
|
- this.detailData.carrierInfo.unloadingDate= this.detailData.carrierInfo.unloadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m
|
|
|
+ if (this.detailData.carrierInfo.unloadingDate) { //卸车时间 去当前时间的时分秒
|
|
|
+ this.detailData.carrierInfo.unloadingDate = this.detailData.carrierInfo.unloadingDate.split(" ")[0] +
|
|
|
+ " " + h + ":" + f + ":" + m
|
|
|
}
|
|
|
// this.detailData.carrierInfo.totalFreight = this.detailData.totalFreight
|
|
|
this.detailData.carrierInfo.carNo = this.detailData.carNumber
|
|
@@ -567,9 +685,10 @@
|
|
|
uni.switchTab({
|
|
|
url: '/pages/order/index'
|
|
|
})
|
|
|
- if(that.$helper.fUN_AmapLocation){
|
|
|
+ if (that.$helper.fUN_AmapLocation) {
|
|
|
that.$helper.fUN_AmapLocation.stop({}, result => {
|
|
|
- console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
|
|
|
+ console.log('====fUN_AmapLocation定位stop====', JSON
|
|
|
+ .stringify(result));
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -656,13 +775,15 @@
|
|
|
|
|
|
.totalFreight-input {
|
|
|
text-align: right;
|
|
|
- padding-right:18px;
|
|
|
+ padding-right: 18px;
|
|
|
}
|
|
|
- .close{
|
|
|
- position:absolute;
|
|
|
- right:0;
|
|
|
- width:15px;height:15px;
|
|
|
- top:50%;
|
|
|
+
|
|
|
+ .close {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ width: 15px;
|
|
|
+ height: 15px;
|
|
|
+ top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
}
|
|
|
</style>
|