更新功能,修复bug

This commit is contained in:
weipengfei 2023-08-23 18:34:37 +08:00
parent 66e755a374
commit 5dfbf79adb
5 changed files with 86 additions and 17 deletions

View File

@ -12,8 +12,10 @@
<p class="tit" v-if="goodsInfo.status==2" style="background-color: #47BE62;">
收货人姓名:&nbsp;&nbsp;{{fuzzyName(goodsInfo.receiver_name)}}</p>
<p class="tit" v-if="goodsInfo.status==3" style="background-color: red;">
收货人姓名:&nbsp;&nbsp;{{fuzzyName(goodsInfo.receiver_name)}}</p>
<p class="tit" v-if="goodsInfo.status==3" style="background-color: red;display: flex;justify-content: space-between;">
<text>收货人姓名:&nbsp;&nbsp;{{fuzzyName(goodsInfo.receiver_name)}}</text>
<text>已取消</text>
</p>
<view class="contents">
<!-- 已取货 -->
<view class="left" v-if='goodsInfo.status==0'>

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -246,7 +246,7 @@ export const oaHomeData = [{
},
{
text: '驿站',
icon: '../../static/img/home/GRCW.png',
icon: '../../static/img/home/YZ.png',
url: '/pages/logistics/post',
// captain: true
},

View File

@ -6,11 +6,12 @@
<view>
<view class="content">
<u-toast ref="uToast"></u-toast>
<view class="map">
<view class="map" style="position: relative;">
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
:markers='markers' :scale="scale" style="width:100%;height: 100%;"
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
</map>
<!-- <cover-view v-show="modelShow" style="background-color: rgba(#000, 0.9);height: 100px;width: 100px;position: absolute;top: 0;left: 0;"></cover-view> -->
</view>
<view class="map_address">
<view class="li">
@ -35,23 +36,37 @@
</view>
<view v-if="address.transfer">{{address.transfer.address}}</view>
</view>
<view :class="{lg_status1:address.transfer.status==2,lg_status2:address.transfer.status==1&&address.terminus.status==2}" style="margin-top: 10rpx;">
<view :class="{red: address.transfer.status!=2&&address.terminus.status==1,yellow:address.terminus.status!=1&&address.transfer.status!=2, green: address.transfer.status==2}" style="margin-top: 10rpx;">
<text class="cir" style="background-color: transparent;"></text>
<text class="status">车辆状态</text><text v-if="address.transfer.status==2">已完成</text>
<text >车辆状态</text>
<text v-if="address.transfer.status==2">已完成</text>
<text v-else-if="address.terminus.status==1">未开始</text>
<text v-else style="color: #FF7C32;">进行中</text>
<text v-else>进行中</text>
</view>
</view>
</view>
</view>
</view>
<mybtn v-if="status==1" @click="modelShow=true" text="抵达地点(中转站) 1/2"></mybtn>
<mybtn v-else-if="status==2" @click="modelShow=true" text="抵达地点(终点) 2/2"></mybtn>
<mybtn v-else-if="status==3" text="任务已完成" my_btn_disabled></mybtn>
<u-modal :show="modelShow" title="提示" content='确认您已到达目标地点' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="getFn();modelShow=false"></u-modal>
<cover-view v-show="modelShow" class="cover">
<cover-view class="cover_model">
<cover-view class="model_title">标题</cover-view>
<cover-view class="model_content">确认抵达目的地了吗</cover-view>
<cover-view>
<cover-view style="height: 1px;width: 100%;background-color: #eee;"></cover-view>
<cover-view class="model_btn">
<cover-view class="item" @click="modelShow=false">取消</cover-view>
<cover-view style="height: 100%;width: 1px;background-color: #eee;"></cover-view>
<cover-view class="model_confirm item" @click="getFn();modelShow=false">确认</cover-view>
</cover-view>
</cover-view>
</cover-view>
</cover-view>
<!-- <u-modal :show="modelShow" title="提示" content='确认您已到达目标地点' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="getFn();modelShow=false"></u-modal> -->
</view>
</template>
@ -84,14 +99,14 @@
id: 1,
latitude: 28.8733,
longitude: 105.445717,
iconPath: '../../static/img/logistics/my_destination.png', //
iconPath: '../../static/img/logistics/WZ.png', //
},
//
{
id: 2,
latitude: undefined,
longitude: undefined,
iconPath: '../../static/img/logistics/my_position.png', //
iconPath: '../../static/img/logistics/QS.png', //
}
],
polyline: [],
@ -257,10 +272,8 @@
taskAddTricycleCoordinate(data).then(() => {
uni.hideLoading()
Toast('上传成功!')
if (this.status == 1) {
this.initPosition();
this.locationFn();
}
this.initPosition();
this.locationFn();
})
}
},
@ -313,6 +326,61 @@
</script>
<style lang='scss' scoped>
.cover{
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(#000, 0.3);
.cover_model{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 650rpx;
/* height: 300rpx; */
background-color: #fff;
border-radius: 6px;
display: flex;
flex-direction: column;
justify-content: space-between;
.model_title{
height: 92rpx;
line-height: 92rpx;
text-align: center;
font-size: 16px;
font-weight: bold;
}
.model_content{
margin: 12px 25px 25px 25px;
font-size: 15px;
}
.model_btn{
display: flex;
height: 96rpx;
font-size: 16px;
.item{
flex: 1;
text-align: center;
line-height: 96rpx;
}
.model_confirm{
color: #2979ff;
}
}
}
}
.red{
color: #ff0000;
}
.green{
color: #40bc5e;
}
.yellow{
color: #ff7c32;
}
.custom-map /deep/ .polyline {
stroke-width: 20px;
}
@ -328,7 +396,6 @@
height: 60vh;
border-radius: 2vw;
overflow: hidden;
}
.map_address {