Commit 9114e792 authored by 贺世双's avatar 贺世双

调整界面

parent bf0b8600
...@@ -208,9 +208,9 @@ ...@@ -208,9 +208,9 @@
/* 客户单号 */ /* 客户单号 */
.consumer_code { .consumer_code {
font-size: 28rpx; //font-size: 28rpx;
font-weight: 400; //font-weight: 400;
color: #8C8C8C; //color: #8C8C8C;
} }
// 通用按钮 // 通用按钮
......
<template> <template>
<view class="page-header"> <view class="page-header">
<view class="page-header-orderNo flex_center"> <view class="page-header-orderNo flex_center">
运单号: {{shipmentNo}} 运单号: {{shipment_no}}
</view> </view>
</view> </view>
</template> </template>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="shipmentItem box_shadow_card"> <view class="shipmentItem box_shadow_card">
<view class="shipment-header flex_sb" style="padding: 28rpx 24rpx 0;"> <view class="shipment-header flex_sb" style="padding: 28rpx 24rpx 0;">
<view class="consumer_code flex_center"> <view class="consumer_code flex_center">
<text selectable> 基础订单号:{{propData['order_base_no'] || ''}}</text> <text style="font-weight: 600;" selectable> 基础订单号:{{propData['order_base_no'] || ''}}</text>
</view> </view>
<view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'"> <view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'">
{{propData.execute_bu}} {{propData.execute_bu}}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="orderPodItem box_shadow_card" @click="navToOrderPodDetail()"> <view class="orderPodItem box_shadow_card" @click="navToOrderPodDetail()">
<view class="shipment-header flex_sb" style="padding: 28rpx 24rpx 0;"> <view class="shipment-header flex_sb" style="padding: 28rpx 24rpx 0;">
<view class="consumer_code flex_center"> <view class="consumer_code flex_center">
<text selectable> 回单号:{{propData['pod_no'] || ''}}</text> <text style="font-weight: 600;" selectable> 回单号:{{propData['pod_no'] || ''}}</text>
</view> </view>
<view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'"> <view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'">
{{propData.execute_bu}} {{propData.execute_bu}}
......
<template>
<view class="shipmentBriefInfo">
<bs-pageHeader-orderNo :shipmentNo="shipmentNo" />
<view class="primary-info routine_radius_card flex_center">
<view class="flex">
<view class="left-icon">
<view :class="['t-icon', stopsInfo.loadStop ? 't-icon-a-zhuang2x1' : 't-icon-a-xie2x1']" />
</view>
<view class="primary-desc flex_col">
<view style="margin-bottom: 8rpx;" class="font_bolder">{{stopsInfo.locationName}}</view>
<view>{{stopsInfo.locationAddress}}</view>
</view>
</view>
<view style="width: 100%;">
<bs-customCell label="货量 :" labelCol="2" wrapCol="10"
:value="stopsInfo.locationOrders + '单/' +stopsInfo.locationQty+ '件/' + stopsInfo.locationWeight+'千克/'+ stopsInfo.locationVolume+'方'" />
</view>
</view>
</view>
</template>
<script>
export default {
name: "shipmentBriefInfo",
options: { styleIsolation: 'shared' },
created: function() { //定义组件的生命周期
this.initData()
},
data() {
return {
stopsInfo: {}, //站点信息,
shipmentNo: '' //运单号
};
},
methods: {
initData() {
const appInstance = getApp()
const { stopsInfo, shipmentInfo } = appInstance.globalData
this.stopsInfo = stopsInfo
this.shipmentNo = shipmentInfo.shipmentNo
}
}
}
</script>
<style lang="scss">
.primary-info {
flex-wrap: wrap;
.left-icon {
position: relative;
margin-right: 20rpx;
.leftIcon-text {
font-size: 28rpx;
display: inline-block;
position: absolute;
top: 5px;
left: 12px;
}
.t-icon {
width: 70rpx;
height: 70rpx;
}
}
/deep/.custom-cell-row {
width: 100%;
margin-top: 32rpx;
color: #8C8C8C;
}
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<u-checkbox iconSize="20rpx" shape="circle" size="20px" :name="propData" :checked="propData.checked"> <u-checkbox iconSize="20rpx" shape="circle" size="20px" :name="propData" :checked="propData.checked">
</u-checkbox> </u-checkbox>
<view class="consumer_code flex_center"> <view class="consumer_code flex_center">
<text selectable> 运单号:{{propData.shipment_no}}</text> <text style="font-weight: 600;" selectable> 运单号:{{propData.shipment_no}}</text>
</view> </view>
<view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'"> <view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'">
{{propData.execute_bu}} {{propData.execute_bu}}
...@@ -106,10 +106,11 @@ ...@@ -106,10 +106,11 @@
.consumer_code { .consumer_code {
line-height: 40rpx; line-height: 40rpx;
text-shadow: 1rpx 3rpx 12rpx rgba(0, 0, 0, 0.04); text-shadow: 1rpx 3rpx 12rpx rgba(0, 0, 0, 0.04);
margin-right: 85px; margin-right: 54px;
} }
.shipment-state { .shipment-state {
font-size: 24rpx; font-size: 24rpx;
color: #F7A64A; color: #F7A64A;
......
...@@ -167,6 +167,18 @@ ...@@ -167,6 +167,18 @@
"navigationBarTitleText": "签收信息", "navigationBarTitleText": "签收信息",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path": "onWayUpload/onWayUpload",
"style": {
"navigationBarTitleText": "在途上报",
"enablePullDownRefresh": false
}
},{
"path": "reportSign/reportSign",
"style": {
"navigationBarTitleText": "上报信息",
"enablePullDownRefresh": false
}
} }
] ]
}], }],
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
},{ },{
title:"回单管理", title:"回单管理",
path:"/subpkg/orderPod/orderPod", path:"/subpkg/orderPod/orderPod",
src: "../../static/img/bg/shipmentOrder.png" src: "../../static/img/bg/orderPod.png"
} }
], ],
isAgree: false, isAgree: false,
......
...@@ -34,7 +34,11 @@ ...@@ -34,7 +34,11 @@
},{ },{
title:"回单管理", title:"回单管理",
path:"/subpkg/orderPod/orderPod", path:"/subpkg/orderPod/orderPod",
src: "../../static/img/bg/shipmentOrder.png" src: "../../static/img/bg/orderPod.png"
},{
title:"在途上报",
path:"/subpkg/onWayUpload/onWayUpload",
src: "../../static/img/bg/onWay.png"
} }
], ],
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
} }
}, },
buttonEdit(e) { buttonEdit(e) {
getApp().globalData.tableData = e getApp().globalData.tableData = e;
this.onRateItemDatail(); this.onRateItemDatail();
}, },
//跳转费用明细新增 //跳转费用明细新增
......
...@@ -150,11 +150,12 @@ ...@@ -150,11 +150,12 @@
if(data){ if(data){
this.formData = data this.formData = data
this.ficationViewEnums[this.formData.cost_classification] = this.formData.cost_classification_label; this.ficationViewEnums[this.formData.cost_classification] = this.formData.cost_classification_label;
console.log(this.ficationViewEnums)
this.rateViewEnums[this.formData.rate_item] = this.formData.rate_item; this.rateViewEnums[this.formData.rate_item] = this.formData.rate_item;
this.currencyViewEnums[this.formData.currency] = this.formData.currency; this.currencyViewEnums[this.formData.currency] = this.formData.currency;
this.formData.change = true this.formData.change = true
console.log(this.formData.change) this.formData.newStatus="Edit";
}else{
this.formData.newStatus="New"
} }
}, },
methods: { methods: {
...@@ -294,9 +295,9 @@ ...@@ -294,9 +295,9 @@
const allData = getApp().globalData.all;//所有的明细 const allData = getApp().globalData.all;//所有的明细
var totle=0; var totle=0;
if(allData.length>0){ //判断是否存在相同
console.log('222=========') if((this.formData.newStatus=="Edit" && allData.length>1) ||
console.log(allData.length) (this.formData.newStatus=="New" && allData.length>0)){
allData.map(item => { allData.map(item => {
//费用项+币种是唯一的 //费用项+币种是唯一的
if(item.rate_item==this.formData.rate_item && item.currency==this.formData.currency){ if(item.rate_item==this.formData.rate_item && item.currency==this.formData.currency){
......
<template>
<view class="waybill-content content_box">
<view class="search-input flex_center">
<u-search searchIconSize="50" searchIconColor="#FFFFFF" placeholderColor='#FFFFFF' color="#000000"
:showAction="false" :placeholder="placeholder" v-model="inputValue"@clickIcon="onSearch" @search="onSearch"
@clear="onSearch" />
</view>
<!-- 顶部tabs -->
<view class="receive-blank"></view>
<view class="emptyImg flex_col transition" v-if="!searchDatas.length">
<image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" />
<text class="empty-text">暂时未查询到运单</text>
</view>
<!-- 接单卡片 -->
<view v-for="propData in searchDatas" :key="propData.id" :propData="item" @onReload="onReload">
<view class="shipmentItem box_shadow_card">
<view class="shipment-header flex_sb">
<view class="shipment_code flex_center">
<text style="font-weight: 600;" selectable> 运单号: {{propData.shipment_no}}</text>
</view>
<view :class="propData.execute_bu == null ? 'shipment-state' : 'shipment-state shipmenting'">
{{propData.execute_bu}}
</view>
</view>
<u-line color="#E5E5E5" margin="20rpx 0" />
<view class="stations">
<view class="start-station flex_center">
<view class="t-icon-start-sddress t-icon" style="margin-right: 8rpx;"></view>
{{propData['source_location_name'] || ''}}
</view>
<view class="end-station flex_center">
<view class="t-icon-end-sddress t-icon" style="margin-right: 8rpx;"></view>
{{propData['dest_location_name'] || ''}}
</view>
</view>
<bs-customCell label="要求提货日期 :" :value="propData.early_pickup_date" labelCol="3.5" wrapCol="6" />
<view class=" flex_sb">
<view style="width: 50%;float: left;">
<bs-customCell label="车牌号 :" :value="propData.truck_no" labelCol="4" wrapCol="6" />
</view>
<view style="width: 50%;float: left;">
<bs-customCell label="司机 :" :value="propData.driver_name" labelCol="3" wrapCol="8" />
</view>
</view>
<view class=" flex_sb">
<view style="width: 50%;float: left;">
<bs-customCell label="承运商 :" :value="propData.carrier" labelCol="4" wrapCol="6" />
</view>
<view style="width: 50%;float: left;">
<bs-customCell label="司机电话 :" :value="propData.driver_tel" labelCol="5" wrapCol="8" />
</view>
</view>
<view style="display: flex;margin-top:15rpx ;">
<view style="background-color: lightgray; width: 100%; height: 5rpx;"></view>
</view>
<!-- <view class="flex_center flex_cen">
<view class="start-btn flex_center flex_cen flex_right" @click="onwayupload(propData)" >在途上报</view>
</view> -->
<view class="flex_cen flex_center orderItemButtonGroup">
<button class="flex_cen flex_center" @click="onwayupload()">在途上报</button>
</view>
</view>
</view>
<!-- 运单列表 -->
</view>
</template>
<script>
import {
getShipmentOrders,
} from '../../api/apiList'
import {
formatGMT,
formatTime
} from '../../utils/util'
export default {
options: {
styleIsolation: 'shared'
},
data() {
return {
tabActive: "Approving",
collageMessage: '',
shipmentList: [],
selectedRows: {},
selectedRows1: [],
minDate: "",
pageNum: 1, //页码
pageSize: 20, //每页条数
loadMore: true, //加载更多
message: [],
sum: 0,
weight: 0.00,
qty: 0,
isFold: false,
choose: [],
choose1: [],
searchDatas: [], //查询数据
placeholder: "运单号", //默认提示
inputValue: "", //搜索值
isOnReachBottom: false, //是否为下拉刷新
isAllChecked: false,
showPopup: false, //时间选择
show: false
}
},
onLoad: function() {
const time = setInterval(() => {
let XSRFToken = uni.getStorageSync('XSRFToken')
if (XSRFToken) {
this.initData()
clearInterval(time)
}
}, 1000);
},
onShow() {
this.pageNum = 1
this.searchDatas = []
this.initData()
},
//下拉刷新
onPullDownRefresh: function() {
this.onReload()
},
//触底加载更多
onReachBottom: function() {
this.isOnReachBottom = true
if (this.loadMore) {
this.pageNum = this.pageNum + 1
console.log(this.pageNum)
this.initData();
this.loadMore = false
}
},
methods: {
cancel() {
this.onReload()
this.show = false
},
setOrderTime(currentTime) {
const nowDate = new Date(currentTime.allStartTime)
const year = nowDate.getFullYear();
const month = nowDate.getMonth() + 1
const date = nowDate.getDate();
this.orderTime = year + "-" + month + "-" + date + " " + currentTime.timeLabel
},
onVisibleDate() {
this.minDate = Date.now()
console.log(this.minDate)
this.showPopup = !this.showPopup
},
//===在途上报====
onwayupload(propData) {
getApp().globalData.propData = propData;
uni.navigateTo({
url: `/subpkg/reportSign/reportSign`
})
},
//=========初始化参数=============
//初始化数据
initData() {
const { pageNum, pageSize } = this
let reqData = {
"args": { pageNum, pageSize }
}
if(this.searchValue){
reqData.args.restrictions = [{
"field": 'shipment_no',
"type": "like", //EQ精准匹配,LK模糊匹配
"value": this.searchValue
}]
}
getShipmentOrders(reqData).then(res => {
uni.stopPullDownRefresh()
const data = res.data.data.datas
if (data.length > 0) {
data.map(item => { //格式化时间
if (item.early_pickup_date) {
item.early_pickup_date = formatGMT(item.early_pickup_date, 'D')
}
})
this.searchDatas = this.searchDatas.concat(data)
this.pageNum += 1
this.loadMore = true
}
})
},
// 搜索功能
onSearch() {
this.pageNum = 1
this.searchDatas = []
this.initData()
},
onChange(value) {
if (value) {
this.initData()
} else {
this.initData()
}
},
// 刷新页面
onReload() {
this.searchDatas = []
this.pageNum = 1
this.initData()
},
allChaneg() {
this.isAllChecked = !this.isAllChecked;
this.searchDatas.map(item => item.checked = this.isAllChecked)
if (this.isAllChecked) {
console.log(this.searchDatas)
this.change(this.searchDatas)
} else {
this.sum = 0
this.weight = 0
this.qty = 0
this.message = 0
}
},
onSelsectDate(dateInfo) {
console.log(dateInfo)
this.createAppointment(formatTime(new Date(dateInfo.timestamp)))
this.showPopup = false
},
change(e) {
this.sum = e.length
this.weight = 0.00
this.qty = 0
e.map(item => {
this.weight += item.uc_billing_weight
this.qty += item.uc_product_qty
})
this.weight = this.weight.toFixed(2)
this.qty = this.qty.toFixed(2)
this.message = e
this.message.length = e.length
console.log(this.message.length)
}
}
}
</script>
<style lang="scss">
.search-input {
width: 100%;
position: fixed;
top: 0;
z-index: 999;
height: 100rpx;
background: linear-gradient(to bottom, #005BB5 0%, #005BB5 50%);
/deep/.u-search__content {
height: 80rpx;
margin: 24rpx;
background-color: rgba(240, 240, 240, .5) !important;
.u-search__content__input {
width: 50rpx;
background-color: transparent !important;
}
}
}
.receive-quantity {
font-size: 25rpx;
width: 100%;
height: 70rpx;
margin-top: 100px;
margin: 25rpx;
}
.receive-blank {
height: 45px;
width: 100%;
}
.waybill-content {
background-attachment: fixed;
.tabs-outer {
background: none;
position: sticky;
top: 0;
z-index: 1;
.tabs {
color: #8C8C8C;
font-weight: 400;
margin: 24rpx 24rpx 0;
background: #005BB5;
border-radius: 40rpx;
justify-content: space-between;
align-items: center;
line-height: 48rpx;
.tab {
padding: 14rpx 95rpx;
border-radius: 40rpx;
}
.active {
font-weight: 500;
color: #ffffff;
background: rgba(46, 117, 230, .15);
border-radius: 40rpx;
}
}
}
.emptyImg {
align-items: center;
image {
width: 609rpx;
}
.empty-text {
font-size: 28rpx;
text-align: center;
color: BFBFBF;
}
}
.consultImg {
width: 40px;
height: 40px;
}
.receive {
font-weight: $uni-bg-color;
margin-top: 10px;
background-color: #FFFFFF;
bottom: 0px;
position: fixed;
z-index: 999;
width: 100%;
}
.receive-button {
margin-left: 5%;
right: 0;
width: 33%;
button {
font-weight: 900;
margin: 5px;
width: 200rpx;
height: 66rpx;
border-radius: 44rpx;
font-size: 24rpx;
color: #2E75E6;
padding: 0 24rpx;
border: 3rpx solid transparent;
background-clip: padding-box, border-box;
background-origin: padding-box, border-box;
background-image: linear-gradient(90deg, #FAFAFA, #FAFAFA), linear-gradient(90deg, #2E75E6, #5E58EE);
}
}
.shipmentItem {
margin: 20rpx 10rpx;
padding: 30rpx;
&/deep/.custom-cell-row {
margin-top: 20rpx;
}
.shipment_code {
line-height: 40rpx;
text-shadow: 1rpx 3rpx 12rpx rgba(0, 0, 0, 0.04);
}
.shipment-state {
font-size: 24rpx;
color: #F7A64A;
line-height: 33rpx;
padding: 6rpx 40rpx;
border-radius: 8rpx;
background: rgba(247, 166, 74, .1);
text-shadow: 1rpx 3rpx 12rpx rgba(0, 0, 0, 0.04);
}
.shipmenting {
color: #66CCCC;
background: rgba(61, 204, 185, .1);
}
.start-station,
.pass-station,
.end-station {
margin: 20rpx 0;
font-size: 30rpx;
font-weight: bolder;
.start-icon,
.pass-icon,
.end-icon {
width: 40rpx;
height: 40rpx;
font-size: 24rpx;
padding: 8rpx;
border-radius: 50%;
color: #FFFFFF;
background-color: #2E75E6;
margin-right: 20rpx;
}
.end-icon {
background-color: #F7A64A;
}
.pass-icon {
background-color: #E3CF57;
}
}
.start-btn-left {
color: #FFFFFF;
padding: 20rpx;
margin-top: 30rpx;
border-radius: 8rpx;
box-shadow: 1rpx 3rpx 12rpx 0px rgba(0, 0, 0, 0.04);
background: linear-gradient(90deg, #e7651a 0%, #e7651a 100%);
width: 48%;
float: right;
margin-right: 2%;
}
.start-btn {
color: #FFFFFF;
padding: 15rpx;
margin-top: 20rpx;
border-radius: 8rpx;
box-shadow: 1rpx 3rpx 12rpx 0px rgba(0, 0, 0, 0.04);
background: linear-gradient(90deg, #e7651a 0%, #e7651a 100%);
width: 28%;
float: left;
margin-right: 240px;
}
.start-btn2 {
color: #FFFFFF;
padding: 20rpx;
margin-top: 30rpx;
border-radius: 8rpx;
box-shadow: 1rpx 3rpx 12rpx 0px rgba(0, 0, 0, 0.04);
background: linear-gradient(90deg, #2E75E6 0%, #5E58EE 100%);
}
.acitonButton {
border: none;
font-size: 20px;
}
.reported-detail {
background-color: #FFFFFF;
padding: 10rpx 20rpx 10rpx 20rpx;
}
.scroll-Y {
height: calc(100vh - 200rpx);
width: 100%;
margin: 10rpx;
}
.uploader-img {
line-height: 42rpx;
margin-top: 20rpx;
}
.save-mark {
height: calc(100vh - 200rpx);
width: 100%;
margin: 10rpx;
white-space: pre-line;
}
}
::v-deep .step-style {
.u-steps-item__content {
.u-text__value {
font-size: 30rpx !important;
line-height: 50rpx !important;
}
}
}
.orderItemButtonGroup {
justify-content: space-between;
margin-top: 10px;
flex-wrap: wrap;
button {
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
width: 315rpx;
height: 80rpx;
margin: 0;
border-radius: 44rpx;
background: linear-gradient(90deg, #2E75E6 0%, #5E58EE 100%);
box-shadow: 1rpx 3rpx 12rpx 0rpx rgba(0, 0, 0, 0.04);
}
}
}
</style>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<!-- 空状态 --> <!-- 空状态 -->
<view class="emptyImg flex_col" v-if="!orderList.length"> <view class="emptyImg flex_col" v-if="!orderList.length">
<image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" /> <image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" />
<text class="empty-text">暂时没有订单</text> <text class="empty-text">暂时未查询到订单</text>
</view> </view>
</view> </view>
</template> </template>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<!-- 空状态 --> <!-- 空状态 -->
<view class="emptyImg flex_col" v-if="!orderPod.length"> <view class="emptyImg flex_col" v-if="!orderPod.length">
<image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" /> <image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" />
<text class="empty-text">暂时没有回单</text> <text class="empty-text">暂时未查询到回单</text>
</view> </view>
</view> </view>
</template> </template>
......
<template>
<view class="abnormalReport content_box">
<u-toast ref="uToast" />
<bs-pageHeader-orderNo :shipment_no="shipment_no" />
<view class="location routine_radius_card">
<bs-customCell label="当前位置 :" :value="locationInfo.address" labelCol="3" wrapCol="8">
<view slot="right-icon" class="flex_center">
<view v-if="isLocation" class="t-icon t-icon-location" @click="getUserSetting" />
<view v-else>
<u-loading-icon color="#2E75E6" size="40" mode="semicircle"></u-loading-icon>
</view>
</view>
</bs-customCell>
<map id="myAMap" style="width: 100%;min-height: 150rpx;" :show-location='true'
:markers="locationInfo.markers" :longitude="locationInfo.longitude" :latitude="locationInfo.latitude">
</map>
</view>
<view class="form-content">
<u--form :model="formData" :rules="rules" ref="myForm" errorType='none'>
<u-form-item prop="eventType" required label="在途异常" labelWidth="30%">
<view @click="onVisible">
<u-input border="none" readonly inputAlign="left" placeholder="请选择上报类型"
placeholderClass="input-tip" :value="viewEnums[formData.eventType]" />
</view>
<u-icon slot="right" name="arrow-right" @click="onVisible" />
</u-form-item>
</u--form>
</view>
<view class="reported-detail">
<!-- 备注信息 -->
<bs-todoRemark ref="myRemark" />
<!-- 上传图片 -->
<view class="uploader-img">
<bs-uploader ref="myUploadImg" :required="formData.eventType !== 'LocationReporting'"
uploadTitle="上传图片" />
</view>
</view>
<!-- 底部操作按钮 -->
<view class="operation-btn flex_sb">
<button class="backBtn common_btn" @click="onNavBack">返回</button>
<button class="submitBtn common_btn" @click="onSubmit">确认</button>
</view>
<!-- 上报类型选择 -->
<bs-selectPopup ref="mySelectPop" popTitle="请选择类型" :selectEnum="optionEnums" :visible="visible"
@onVisible="onVisible" @onConfirm="onConfirmSelect" />
</view>
</template>
<script>
import { reportInfo, getOptionEnum } from '../../api/apiList'
const getUserLocation = require('../../mixins/getUserLocation')
export default {
mixins: [getUserLocation],
options: { styleIsolation: 'shared' },
data() {
return {
formData: {
eventType: "", //上报类型
},
rules: { 'eventType': { required: true } },
selectedIds: [], //运单id
shipment_no: "", //运单号
visible: false, //选择上报类型弹窗
optionEnums: [], // 上报类型枚举
viewEnums: {}, //仅页面显示使用
}
},
onLoad: function(options) {
this.initMap();
this.shipment_no = data.shipment_no;
this.selectedIds = [data.id]
this.getUserSetting()
},
onReady: function(options) {
// #ifdef H5
this.initSignMap()
// #endif
},
methods: {
//初始化地图
initSignMap() {
const { AMapInstance, userLocation } = getApp().globalData
const { latitude, longitude } = userLocation
this.map = new AMapInstance.Map('myAMap', {
center: [longitude, latitude], //中心点坐标
zoom: 16
});
// 构造矢量圆形,如签到范围, 项目根据需要自行添加
const circle = new AMapInstance.Circle({
center: new AMap.LngLat(longitude, latitude), // 圆心位置
radius: 100, //半径
strokeColor: "#F33", //线颜色
strokeOpacity: 1, //线透明度
strokeWeight: 3, //线粗细度
fillColor: "#ee2200", //填充颜色
fillOpacity: 0.35 //填充透明度
});
// 构造点标记
const marker = new AMapInstance.Marker({
position: [longitude, latitude],
anchor: 'bottom-center'
});
this.map.add([marker]); //添加多个覆盖物[circle, marker]
},
// 返回上一级
onNavBack() {
uni.navigateBack()
},
//提交数据
onSubmit() {
this.$refs.myForm.validate().then(res => {
const { eventType } = this.formData
const imgInstance = this.$refs.myUploadImg
const remarkInstance = this.$refs.myRemark
const remarks = remarkInstance.value
imgInstance.uploadImage(images => {
const { longitude, latitude, address, time } = this.locationInfo
const { viewEnums, selectedIds } = this
const data = {
"aux": {
"eventType": eventType,
"signType": viewEnums[eventType],
"content": remarks,
eventSource: 'DriverApp',
images,
longitude,
latitude,
address,
time
},
args: {
"selectedIds": selectedIds
}
}
reportInfo('sign', data).then(res => {
if (res.data.messageType === 'success') {
uni.showToast({
title: '信息上报成功',
duration: 3000
})
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
})
})
}).catch(errors => {
this.$refs.uToast.show({
message: '请选择上报类型',
})
})
},
//上报类型选择
onVisible() {
const { optionEnums, visible } = this
if (visible) { //关闭
this.visible = false
} else {
if (!optionEnums.length) {
this.getOptions()
} else {
const mySelectPop = this.$refs.mySelectPop
mySelectPop.setSelect(this.formData.eventType)
}
this.visible = true
}
},
getOptions() {
getOptionEnum('TransitType').then(res => {
let datas = res.data.data.datas
datas.map((item, index) => {
if (item.value === 'LocationReporting') {
datas.splice(index, 1)
datas.unshift(item)
}
})
let viewEnums = {}
datas.map(item => {
viewEnums[item.value] = item.label
})
this.optionEnums = datas
this.viewEnums = viewEnums
})
},
//确认选择
onConfirmSelect(value) {
this.formData.eventType = value
this.visible = false
},
}
}
</script>
<style lang="scss">
.abnormalReport {
.page-header {
padding: 40rpx 24rpx 0;
border-radius: 0 0 32rpx 32rpx;
.page-header-orderNo {
color: #181717;
padding: 30rpx 24rpx;
background: linear-gradient(90deg, rgba(46, 117, 230, .1), rgba(46, 117, 230, .1));
background-color: #EDEFFD;
border-radius: 16rpx 16rpx 0 0;
font-size: 28rpx;
}
}
/deep/.custom-cell-row {
margin: 0 0 24rpx 0;
.custom-cell-label {
color: #8C8C8C;
}
.t-icon-location {
width: 50rpx;
height: 50rpx;
}
}
/deep/.form-content {
padding: 0 40rpx;
background-color: #ffffff;
//margin: 25rpx 0;
.input-tip {
font-size: 28rpx;
color: #BFBFBF;
}
.u-form-item__body__left__content__label {
color: #8C8C8C;
font-size: 28rpx;
}
.u-form-item__body__left__content__required {
font-size: 28rpx !important;
top: auto !important;
left: -16rpx !important;
}
.u-icon {
margin-left: 20rpx;
}
}
.reported-detail {
background-color: #FFFFFF;
padding: 20rpx 25rpx;
}
.routine_radius_card {
padding: 24rpx;
/* margin: 0 24rpx 24rpx; */
background-color: #FFFFFF;
border-radius: 0 0 16rpx 16rpx;
}
.detailFoot {
position: sticky;
display: flex;
justify-content: space-between;
bottom: 0;
width: 100%;
padding-bottom: 28rpx;
background-color: #FFFFFF;
padding-top: 24rpx;
z-index: 100;
button {
width: 339rpx;
height: 88rpx;
line-height: 88rpx;
border-radius: 44rpx;
color: #f5f3f2;
padding: 0 24rpx;
border: 3rpx solid transparent;
position: relative;
background-clip: padding-box, border-box;
background-origin: padding-box, border-box;
background-image: linear-gradient(90deg, #e7651a, #e7651a), linear-gradient(90deg, #e7651a, #e7651a);
&:after {
content: "";
}
&:last-child {
background-image: linear-gradient(90deg, #e7651a, #e7651a), linear-gradient(90deg, #e7651a, #e7651a);
color: #FFFFFF;
}
}
}
}
</style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<!-- 空状态 --> <!-- 空状态 -->
<view class="emptyImg flex_col" v-if="!shipmentOrders.length"> <view class="emptyImg flex_col" v-if="!shipmentOrders.length">
<image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" /> <image mode="aspectFit" src="../../static/img/empty/shipmentEmpty.png" />
<text class="empty-text">暂时没有运单</text> <text class="empty-text">暂时未查询到运单</text>
</view> </view>
<view class="box_8"> <view class="box_8">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment