From 7b787644ada7a7bf84b397c9e50868cceb703d7c Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 30 十二月 2024 18:24:03 +0800
Subject: [PATCH] ll
---
h5/pages.json | 21 +
h5/pages/wdata/detail.vue | 397 ++++++++++++++++++++
h5/pages/waybill/waybillDetail.vue | 53 +-
h5/api/driver.js | 41 ++
h5/pages/login/login.vue | 2
h5/App.vue | 5
h5/pages/wdata/list.vue | 361 +++++++++++++++++++
h5/static/wdatabg.png | 0
h5/pages/wdata/home.vue | 215 +++++++++++
9 files changed, 1,071 insertions(+), 24 deletions(-)
diff --git a/h5/App.vue b/h5/App.vue
index a944dea..82f0674 100644
--- a/h5/App.vue
+++ b/h5/App.vue
@@ -7,6 +7,9 @@
if(path == '/pages/login/login' || path == '/'){
window.location.href = app_url
}
+ if(path == '/pages/wdata/home'){
+ window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
+ }
})
console.log('onLaunch')
},
@@ -204,7 +207,7 @@
}
.main_app {
- padding: 10rpx 30rpx 30rpx;
+ padding: 10rpx 30rpx 0rpx;
font-size: 28rpx;
color: #333333;
}
diff --git a/h5/api/driver.js b/h5/api/driver.js
index a8c921b..b2ce4c6 100644
--- a/h5/api/driver.js
+++ b/h5/api/driver.js
@@ -16,6 +16,14 @@
data
})
}
+// 鍙告満楠岃瘉鐮佺櫥褰�
+export const loginDriverWithCode = (data) => {
+ return http({
+ url: 'loginDriverWithCode',
+ method: 'post',
+ data
+ })
+}
// 鍙告満棣栭〉
export const driverHomeData = (data) => {
return http({
@@ -148,4 +156,37 @@
method: 'get',
data
})
+}
+// 鍙告満鎻愭姤
+// 浠诲姟鍒楄〃
+export const putTaskList = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/tms/taskList',
+ method: 'post',
+ data
+ })
+}
+// 浠诲姟璇︽儏
+export const putTaskDetail = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/tms/taskDetail',
+ method: 'post',
+ data
+ })
+}
+// 浠诲姟 鍒拌揣鎻愪氦
+export const putDriverArrival = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/tms/driverArrival',
+ method: 'post',
+ data
+ })
+}
+// 浠诲姟 鍚姩
+export const putDriverStart = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/tms/driverStart',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/h5/pages.json b/h5/pages.json
index d3c0636..7db0f08 100644
--- a/h5/pages.json
+++ b/h5/pages.json
@@ -475,6 +475,27 @@
{
"navigationBarTitleText" : "杩愬崟鏌ヨ"
}
+ },
+ {
+ "path" : "pages/wdata/home",
+ "style" :
+ {
+ "navigationBarTitleText" : "鍙告満鎻愭姤"
+ }
+ },
+ {
+ "path" : "pages/wdata/list",
+ "style" :
+ {
+ "navigationBarTitleText" : "鎴戠殑浠诲姟"
+ }
+ },
+ {
+ "path" : "pages/wdata/detail",
+ "style" :
+ {
+ "navigationBarTitleText" : "浠诲姟鎿嶄綔鏄庣粏"
+ }
}
],
"subPackages": [
diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index 7ea600a..59d9e67 100644
--- a/h5/pages/login/login.vue
+++ b/h5/pages/login/login.vue
@@ -41,7 +41,7 @@
export default {
data() {
return {
- code: ''
+ code: 'aaa'
}
},
onLoad(option) {
diff --git a/h5/pages/waybill/waybillDetail.vue b/h5/pages/waybill/waybillDetail.vue
index 202517d..c3a8251 100644
--- a/h5/pages/waybill/waybillDetail.vue
+++ b/h5/pages/waybill/waybillDetail.vue
@@ -41,7 +41,7 @@
<view class="drive_info">
<view class="title">鐗╂祦淇℃伅</view>
<view class="drive_list" v-for="dri,k in info.cicleStatusList">
- <view class="separate"></view>
+ <view class="separate" v-if="k < info.cicleStatusList.length - 1"></view>
<view class="item_title">
<view class="icon_wrap">
<image v-if="dri.key == 0 && k != 0" src="@/static/waybill/ic_dingdan@2x.png" class="icon"></image>
@@ -251,19 +251,23 @@
background: #fff;
border-radius: 16rpx;
padding: 30rpx;
- margin-bottom: 20rpx;
- position: relative;
+ margin-bottom: 20rpx;
+ position: relative;
z-index: 999;
-
- .separate {
- height: calc(100% - 250rpx);
- width: 1rpx;
- border: 1rpx dashed #CCCCCC;
- position: absolute;
- left: 53rpx;
- top: 102rpx;
- z-index: -1;
+ .drive_list{
+ position: relative;
+ z-index: 999;
+ .separate {
+ height: calc(100% - 48rpx);
+ width: 1rpx;
+ border: 1rpx dashed #CCCCCC;
+ position: absolute;
+ left: 24rpx;
+ top: 48rpx;
+ z-index: -1;
+ }
}
+
.title {
font-weight: 500;
@@ -292,15 +296,15 @@
}
.icon_wrap {
- width: 48rpx;
+ width: 50rpx;
margin-right: 30rpx;
display: flex;
- align-items: center;
+ // align-items: center;
justify-content: center;
-
+ flex-shrink: 0;
.icon {
- width: 48rpx;
- height: 48rpx;
+ width: 50rpx;
+ height: 50rpx;
position: relative;
z-index: 2;
}
@@ -310,22 +314,27 @@
position: relative;
color: #999999;
margin-bottom: 30rpx;
-
+ &:nth-last-child(1){
+ margin-bottom: 0;
+ padding-bottom: 30rpx;
+ }
.text {
- color: #666666;
+ color: #666666;
+ flex: 1;
}
.icon {
width: 20rpx;
height: 20rpx;
position: relative;
- z-index: 2;
+ z-index: 2;
+ margin-top: 12rpx;
}
.h2 {
display: flex;
- align-items: center;
- height: 48rpx;
+ // align-items: center;
+ // height: 48rpx;
}
.h1 {}
diff --git a/h5/pages/wdata/detail.vue b/h5/pages/wdata/detail.vue
new file mode 100644
index 0000000..04be1cd
--- /dev/null
+++ b/h5/pages/wdata/detail.vue
@@ -0,0 +1,397 @@
+<template>
+ <view class="main_app">
+ <view class="head_bg"></view>
+ <view class="info">
+ <view class="head">
+ <view class="title">杩愯緭鍗曞彿锛歿{info.transportCode}}</view>
+ <view class="status">{{info.logisticsStatus == 0 ? '寰呮墽琛�' : info.logisticsStatus == 1 ? '鎵ц涓�(鍦ㄩ��)' : '瀹屾垚(鍒拌揣)'}}
+ </view>
+ </view>
+ <view class="content">
+ <view class="line">
+ <view class="la">鐗╄祫绫诲瀷</view>
+ <view class="val">{{ info.materialType == '1' ? '鎴愬搧' : '鎵樼洏' }}</view>
+ </view>
+ <view class="line">
+ <view class="la">涓氬姟绫诲瀷</view>
+ <view class="val" v-if="info.businessType == 1">鎴愬搧閿�鍞�</view>
+ <view class="val" v-if="info.businessType == 2">鎴愬搧绉诲簱</view>
+ <view class="val" v-if="info.businessType == 3">绌烘墭鐩�-宸ヤ笟璋冨墏</view>
+ <view class="val" v-if="info.businessType == 4">绌烘墭鐩�-鍟嗕笟鍥炴敹</view>
+ <view class="val" v-if="info.businessType == 5">绌烘墭鐩�-鎵樼洏甯﹀洖</view>
+ </view>
+ <view class="line">
+ <view class="la">鏄惁鎵樼洏鑱旇繍</view>
+ <view class="val">{{ info.isPalletTransport == 1 ? '鏄�' : '鍚�' }}</view>
+ </view>
+ <view class="line">
+ <view class="la">鍙戣揣鐐�</view>
+ <view class="val">{{ info.startCity }}</view>
+ </view>
+ <view class="line">
+ <view class="la">鍗歌揣鐐�</view>
+ <view class="val">{{ info.endCity }}</view>
+ </view>
+ <view class="line">
+ <view class="la">杞︾墝鍙�</view>
+ <view class="val">{{ info.plateNumber }}</view>
+ </view>
+ <view class="line">
+ <view class="la">鍙告満</view>
+ <view class="val">{{ info.driverName }}</view>
+ </view>
+ <view class="line">
+ <view class="la">浠诲姟涓嬭揪鏃堕棿</view>
+ <view class="val">{{ info.receiveDate }}</view>
+ </view>
+ </view>
+ </view>
+ <!-- -->
+ <view class="record">
+ <view class="title">鍝佽鏄庣粏</view>
+ <view class="table_scroll">
+ <view class="table">
+ <view class="head line">
+ <view class="ite con">鍚堝悓鍙�</view>
+ <view class="ite name">鍝佽鍚嶇О</view>
+ <view class="ite num">鏁伴噺</view>
+ <view class="ite time">鏈�鏃╁埌璐ф椂闂�</view>
+ <view class="ite time">鏈�杩熷埌璐ф椂闂�</view>
+ </view>
+ <view class="line" v-for="item in info.productDetails">
+ <view class="ite con">{{item.contractNumber}}</view>
+ <view class="ite name">{{item.productName}}</view>
+ <view class="ite num">{{item.packageSize}}</view>
+ <view class="ite time">{{item.earliestReachDate}}</view>
+ <view class="ite time">{{item.latestReachDate}}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <!-- -->
+ <view class="flow_wrap">
+ <view class="title">浠诲姟娴佺▼</view>
+ <view class="list">
+ <view class="item" v-for="item,i in info.transportStops">
+ <view v-if="i < info.transportStops.length - 1" class="dian"></view>
+ <view class="top1">
+ <view class="left_icon">
+ <image v-if="(info.logisticsStatus == 1 && item.actualArrivedDate) || info.logisticsStatus == 2"
+ src="@/static/waybill/ic_daohuo_sel@2x.png" mode=""></image>
+ <image v-else src="@/static/waybill/ic_dingdan@2x.png" mode=""></image>
+ </view>
+ <view class="content">
+ <view class="name">{{item.receiveLocation}}</view>
+ <view class="status">
+ <view v-if="info.logisticsStatus == 0" class="btn">鍒拌揣</view>
+ <view v-else-if="info.logisticsStatus == 1 && !item.actualArrivedDate" @click="startAri(item.stopNumber)"
+ class="btn pri">鍒拌揣</view>
+ <template v-else>
+ <image src="@/static/checkbox_sel@2x.png" mode="" class="icon"></image>
+ <text class="primaryColor">宸插埌璐�</text>
+ </template>
+ </view>
+ </view>
+ </view>
+ <view class="top1">
+ <view class="left_icon"></view>
+ <view class="time">鍒拌揣鏃堕棿锛歿{ item.actualArrivedDate || '-' }}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view v-if="info.logisticsStatus == 0" @click="startTrans" class="start_btn">鍚繍</view>
+ </view>
+</template>
+
+<script>
+ import {
+ putTaskDetail,
+ putDriverArrival,
+ putDriverStart,
+
+ } from '@/api'
+ export default {
+ data() {
+ return {
+ info: {
+ productDetails: [],
+ transportStop: []
+ }
+ };
+ },
+ onLoad(options) {
+ this.id = options.id
+ this.getDetail()
+ },
+ methods: {
+ getDetail() {
+ putTaskDetail({
+ id: this.id
+ }).then(res => {
+ this.info = res.data
+ })
+ },
+ startTrans() {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭鍚繍涔堬紵',
+ success: (res) => {
+ if (res.confirm) {
+ putDriverStart({
+ id: this.id,
+ optType: 0
+ }).then((ress) => {
+ if (ress.code == 200) {
+ this.showToast('鍚繍鎴愬姛')
+ }
+ })
+ }
+ }
+ });
+ },
+ startAri(stopNumber) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭鍒拌揣涔堬紵',
+ success: (res) => {
+ if (res.confirm) {
+ putDriverArrival({
+ stopNumber,
+ optType: 1,
+ id: this.id
+ }).then(ress => {
+ if (ress.code == 200) {
+ this.showToast('鍒拌揣鎴愬姛')
+ }
+ })
+ }
+ }
+ });
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #f7f7f7;
+ }
+
+ .head_bg {
+ width: 750rpx;
+ height: 240rpx;
+ background: linear-gradient(180deg, #279BAA 0%, rgba(39, 155, 170, 0) 100%);
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -1;
+ }
+
+ .info {
+ border-radius: 8rpx;
+ overflow: hidden;
+ margin-top: 30rpx;
+ background: #FFFFFF;
+
+ .head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 84rpx;
+ background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%);
+ padding: 0 30rpx;
+
+ .title {
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #222222;
+ }
+
+ .status {
+ font-size: 26rpx;
+ color: $uni-color-primary;
+ }
+ }
+
+ .content {
+ padding: 30rpx 30rpx 10rpx;
+ font-size: 30rpx;
+
+ .line {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 20rpx;
+
+ .la {
+ color: #666666;
+ }
+
+ .val {}
+ }
+ }
+ }
+
+ .record {
+ margin-top: 20rpx;
+ width: 690rpx;
+ background: #FFFFFF;
+ border-radius: 16rpx;
+ padding: 30rpx;
+
+ .title {
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #222222;
+ margin-bottom: 24rpx;
+ }
+
+ .table_scroll {
+ width: 630rpx;
+ overflow-x: auto;
+
+ .table {
+ width: 960rpx;
+ color: #222222;
+
+ .line {
+ height: 68rpx;
+ align-items: center;
+ display: flex;
+ border-bottom: 1px solid #E5E5E5;
+ padding: 0 20rpx;
+
+ .ite {
+ width: 280rpx;
+ flex-shrink: 0;
+ overflow: hidden;
+ }
+
+ .con {
+ width: 160rpx;
+ }
+
+ .time {
+ width: 195rpx;
+ }
+
+ .num {
+ width: 100rpx;
+ }
+
+ }
+
+ .head {
+ font-weight: 500;
+ background: #F4F7FC;
+ border: none;
+ }
+
+ }
+ }
+ }
+
+ .flow_wrap {
+ background: #FFFFFF;
+ border-radius: 16rpx;
+ padding: 30rpx;
+ margin-top: 20rpx;
+
+ .title {
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #222222;
+ margin-bottom: 24rpx;
+ }
+
+ .list {
+ .item {
+ position: relative;
+
+ .dian {
+ border: 1rpx dashed #CCCCCC;
+ height: calc(100% - 48rpx);
+ width: 1rpx;
+ position: absolute;
+ top: 48rpx;
+ left: 22rpx;
+ }
+
+ .top1 {
+ display: flex;
+
+ .left_icon {
+ width: 78rpx;
+
+ image {
+ width: 48rpx;
+ height: 48rpx;
+ }
+ }
+
+ .content {
+ flex: 1;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 12rpx;
+
+ .name {
+ font-weight: 600;
+ font-size: 32rpx;
+ overflow: hidden;
+ flex: 1;
+ }
+
+ .status {
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+
+ .btn {
+ color: #999999;
+ border-radius: 30rpx;
+ border: 1rpx solid #999999;
+ width: 116rpx;
+ height: 60rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .pri {
+ color: #fff;
+ background-color: $uni-color-primary;
+ }
+
+ image {
+ width: 40rpx;
+ height: 40rpx;
+ margin-right: 10rpx;
+ }
+ }
+ }
+
+ .time {
+ font-size: 24rpx;
+ color: #999999;
+ }
+ }
+ }
+ }
+ }
+
+ .start_btn {
+ width: 690rpx;
+ height: 88rpx;
+ background: $uni-color-primary;
+ border-radius: 44rpx;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 30rpx auto;
+ }
+</style>
\ No newline at end of file
diff --git a/h5/pages/wdata/home.vue b/h5/pages/wdata/home.vue
new file mode 100644
index 0000000..980e35b
--- /dev/null
+++ b/h5/pages/wdata/home.vue
@@ -0,0 +1,215 @@
+<template>
+ <view class="main_app">
+ <image class="bg" src="@/static/wdatabg.png" mode="widthFix"></image>
+ <view class="login_wrap">
+ <view class="item">
+ <view class="la">鎵嬫満鍙�</view>
+ <input v-model="form.phone" type="tel" maxlength="18" placeholder-class="placeholder9" placeholder="璇疯緭鍏ユ墜鏈哄彿" />
+ </view>
+ <view class="item">
+ <view class="la">楠岃瘉鐮�</view>
+ <view class="df_sb">
+ <input v-model="form.code" placeholder="璇疯緭鍏ラ獙璇佺爜" placeholder-class="placeholder9" :maxlength="6"
+ type="number" />
+ <text class="captcha" v-if="countDown == 0" @click="initCaptcha">鑾峰彇楠岃瘉鐮�</text>
+ <text class="placeholder9" v-else>{{ countDown }}</text>
+ </view>
+ </view>
+ <view class="login_btn" @click="onSubmit">
+ <view class="login_btn_n">鏌ヨ</view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ sendSms,
+ wxAuthorizea,
+ loginDriverWithCode,
+ getUserInfo
+ } from '@/api'
+ export default {
+ data() {
+ return {
+ form: {
+ code: '',
+ phone: ''
+ },
+ countDown: 0,
+ code: ''
+ };
+ },
+ onShow() {
+ var that = this
+ let url = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
+ let code = ''
+ if (window.location.href.indexOf('code=') !== -1 || this.code) {
+ this.userAuth(0)
+ } else {
+ // let url = window.location.href
+ const appID = 'wx173e6caf5abc718a'
+ let uri = encodeURIComponent(url)
+ let authURL =
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base#wechat_redirect`
+ // window.location.href = authURL
+ }
+ },
+ methods: {
+ onSubmit() {
+ const {
+ code,
+ phone
+ } = this.form
+ if (!phone) return this.showToast('鎵嬫満鍙蜂笉鑳戒负绌�')
+ if (!code) return this.showToast('楠岃瘉鐮佷笉鑳戒负绌�')
+ loginDriverWithCode({
+ phone,
+ code,
+ openid: this.$store.state.openId || '000'
+ }).then(res => {
+ if (res && res.code == 200) {
+ if (res.data) {
+ this.$store.commit('setToken', res.data)
+ getUserInfo().then(ress => {
+ this.$store.commit('setDriverInfo', ress.data)
+ })
+ uni.navigateTo({
+ url: '/pages/wdata/list'
+ })
+ }
+ }
+ })
+ },
+ initCaptcha() {
+ if (!this.form.phone) return uni.showToast({
+ title: '鎵嬫満鍙蜂笉鑳戒负绌�',
+ icon: 'none'
+ })
+ sendSms({
+ phone: this.form.phone
+ }).then(res => {
+ this.countDown = 60
+ setInterval(() => {
+ if (this.countDown == 0) return
+ this.countDown--
+ }, 1000)
+ })
+ },
+ userAuth(source) {
+ var that = this
+ let url = window.location.href
+ let code = ''
+ if (url.indexOf('code=') !== -1 || this.code) {
+ const query = url.split('?')
+ for (const q of query) {
+ if (q.indexOf('code=') !== -1) {
+ let statusIndex = q.indexOf('&state')
+ code = q.substring(q.indexOf('code=') + 5, statusIndex)
+ }
+ }
+ wxAuthorizea({
+ code: code || this.code,
+ source: source
+ }).then(res => {
+ if (res.code === 200) {
+ that.$store.commit('setOpenId', res.data.openid)
+ if (res.data.token) {
+ that.$store.commit('setToken', res.data.token)
+ getUserInfo().then(ress => {
+ that.$store.commit('setDriverInfo', ress.data)
+ })
+ uni.navigateTo({
+ url: '/pages/wdata/list'
+ })
+ }
+ }
+ })
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ .main_app {
+ padding-top: 218rpx;
+
+ .bg {
+ width: 750rpx;
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: -1;
+ }
+
+ .login_wrap {
+ width: 690rpx;
+ height: 490rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(39, 155, 170, 0.16);
+ border-radius: 16rpx;
+ padding: 40rpx 30rpx;
+ box-sizing: border-box;
+
+ .item {
+ width: 100%;
+ height: 126rpx;
+ padding-right: 10rpx;
+ box-sizing: border-box;
+ margin-bottom: 30rpx;
+ border-bottom: 1px solid #E5E5E5;
+
+ &:last-child {
+ margin-bottom: 0 !important;
+ }
+
+ .la {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #222222;
+ }
+
+ .captcha {
+ color: $uni-color-primary;
+ }
+
+ .df_sb {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ input {
+ flex: 1;
+ height: 86rpx;
+ color: #666666;
+ // margin-left: 24rpx;
+ display: flex;
+ align-items: center;
+ border: none;
+ }
+ }
+ }
+
+ .login_btn {
+ width: 630rpx;
+ height: 88rpx;
+ box-sizing: border-box;
+ margin-top: 40rpx;
+
+ .login_btn_n {
+ width: 100%;
+ height: 98rpx;
+ background: $uni-color-primary;
+ box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 30rpx;
+ color: #ffffff;
+ border-radius: 50rpx;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/h5/pages/wdata/list.vue b/h5/pages/wdata/list.vue
new file mode 100644
index 0000000..3d7b149
--- /dev/null
+++ b/h5/pages/wdata/list.vue
@@ -0,0 +1,361 @@
+<template>
+ <view class="main_app">
+ <view class="title_wrap">
+ <view class="name" v-if="driverInfo.realname">{{ driverInfo.realname || "" }}锛屾杩庣櫥褰曪綖</view>
+ <view class="name" v-else>璇峰厛鐧诲綍</view>
+ <view class="btn" @click="loginOut">{{
+ driverInfo.realname ? "閫�鍑虹櫥褰�" : "鍘荤櫥褰�"
+ }}</view>
+ </view>
+ <view class="head_wrap">
+ <view class="search_box">
+ <image src="@/static/ic_search@2x.png" class="search" mode=""></image>
+ <input type="text" placeholder-class="placeholder9" v-model="param.transportCode" placeholder="鎼滅储杩愯緭鍗曞彿" @confirm="handleQuery" />
+ </view>
+ </view>
+ <!-- -->
+ <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
+ <view class="main_list">
+ <view class="item" v-for="item,index in list" :key="index">
+ <view class="head">
+ <view class="code">杩愯緭鍗曞彿锛歿{item.transportCode}}</view>
+ <view class="status" v-if="item.logisticsStatus == 0">寰呮墽琛�</view>
+ <view class="status" v-if="item.logisticsStatus == 1">鎵ц涓�(鍦ㄩ��)</view>
+ <view class="status" v-if="item.logisticsStatus == 2">瀹屾垚(鍒拌揣)</view>
+ </view>
+ <view class="content">
+ <view class="line">
+ <view class="la">鐗╄祫绫诲瀷锛�</view>
+ <view class="val">{{item.materialType == 1 ? '鎴愬搧' : '鎵樼洏'}}</view>
+ </view>
+ <view class="line">
+ <view class="la">鍙戣揣鍦帮細</view>
+ <view class="val">{{item.startCityName || '-'}}</view>
+ </view>
+ <view class="line">
+ <view class="la">鍒拌揣鍦帮細</view>
+ <view class="val">{{item.endCityName || '-'}}</view>
+ </view>
+ </view>
+ <view class="footer">
+ <view class="time">{{item.receiveDate}}</view>
+ <view class="detail" @click="handleDetail(item)">鏌ョ湅璇︽儏</view>
+ </view>
+ </view>
+ <view v-if="list.length === 0" style="text-align: center">
+ <image src="@/static/empty.png" style="width: 320rpx; margin: 120px auto 0" mode="widthFix" />
+ <view class="placeholder9 fs24">鏆傛棤鏁版嵁</view>
+ </view>
+ </view>
+ </scroll-view>
+
+ </view>
+</template>
+
+<script>
+ import {
+ putTaskList,
+ logoutPost
+ } from '@/api'
+ import dayjs from 'dayjs';
+ export default {
+ data() {
+ return {
+ param: {
+
+ },
+ list: [],
+ page: 1,
+ total: 0,
+
+ driverInfo: {}
+
+ };
+ },
+ onLoad(options) {
+ this.driverInfo = uni.getStorageSync('driverInfo')
+ this.getList()
+ },
+ methods: {
+ handleQuery() {
+ this.page = 1
+ this.list = []
+ this.getList()
+ },
+ handleDetail(item) {
+ uni.navigateTo({
+ url: '/pages/wdata/detail?id=' + item.id
+ })
+ },
+ scrolltolower() {
+ const {
+ total,
+ list
+ } = this
+ if (list.length < total) {
+ this.page = this.page + 1
+ this.getList()
+ } else {
+ this.showToast('鏆傛棤鏇村鏁版嵁')
+ }
+ },
+ getList() {
+ const {
+ param,
+ page
+ } = this
+ putTaskList({
+ parameters: {
+ ...param,
+ driverTel: this.driverInfo.username
+ },
+ pager: {
+ rows: 10,
+ page
+ }
+ }).then(res => {
+ if (res.data && res.data.rows) {
+ this.list = [...this.list, ...res.data.rows]
+ this.total = res.data.totalCount
+ }
+ })
+ },
+ loginOut() {
+ logoutPost({
+ isH5: 1
+ }).then(res => {
+ this.$store.commit('empty')
+ setTimeout(() => {
+ uni.redirectTo({
+ url: '/pages/wdata/home'
+ })
+ }, 300)
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background: #F7F7F7;
+ }
+ .main_app{
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ padding: 10rpx 30rpx 0;
+ }
+ .title_wrap {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ background-color: #fff;
+ margin: -10rpx -30rpx 0;
+ padding: 16rpx 30rpx 0;
+ .name {
+ font-weight: 600;
+ font-size: 34rpx;
+ color: #222222;
+ }
+
+ .btn {
+ width: 144rpx;
+ height: 56rpx;
+ border-radius: 36rpx;
+ border: 1rpx solid $uni-color-primary;
+ font-size: 26rpx;
+ color: $uni-color-primary;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+ }
+ .head_title{
+ color: $uni-color-primary;
+ text-decoration-line: underline;
+ margin-top: 20rpx;
+ }
+ .head_wrap {
+ display: flex;
+ align-items: center;
+ width: 750rpx;
+ background-color: #fff;
+ margin: 0 -30rpx;
+ padding: 12rpx 30rpx;
+
+ .search_box {
+ flex: 1;
+ width: 572rpx;
+ height: 76rpx;
+ background: #F7F7F7;
+ border-radius: 38rpx;
+ padding-left: 30rpx;
+ display: flex;
+ align-items: center;
+
+ input {
+ flex: 1;
+ height: 60rpx;
+ }
+
+ .search {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 16rpx;
+ }
+ }
+
+ .right {
+ display: flex;
+ align-items: center;
+ margin-left: 30rpx;
+
+ image {
+ width: 28rpx;
+ height: 28rpx;
+ }
+ }
+ }
+
+ .scroll_Y {
+ background-color: #f7f7f7;
+ height: calc(100vh - 240rpx);
+ margin-top: 20rpx;
+ .main_list {
+ width: 750rpx;
+ margin: 0 -30rpx;
+ padding: 0rpx 30rpx 20rpx;
+
+ .item {
+ border-radius: 8rpx;
+ margin-bottom: 20rpx;
+ padding: 0 30rpx;
+ background-color: #fff;
+
+ .head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 30rpx;
+ width: 690rpx;
+ height: 84rpx;
+ margin: 0 -30rpx;
+ background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%);
+
+ .code {
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #222222;
+ }
+
+ .status {
+ color: $uni-color-primary;
+ }
+ }
+
+ .content {
+ padding: 20rpx 0rpx;
+ border-bottom: 1rpx solid #E5E5E5;
+ margin-bottom: 20rpx;
+
+ .line {
+ display: flex;
+ margin-bottom: 16rpx;
+ font-size: 26rpx;
+
+ .la {
+ color: #666666;
+ }
+
+ .val {}
+
+ &:nth-last-child(1) {
+ margin-bottom: 0;
+ }
+ }
+ }
+
+ .footer {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 26rpx;
+ color: #999999;
+ padding-bottom: 20rpx;
+
+ .detail {
+ width: 168rpx;
+ height: 60rpx;
+ background: #FFFFFF;
+ border-radius: 30rpx;
+ border: 1rpx solid $uni-color-primary;
+ color: $uni-color-primary;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 26rpx;
+
+ }
+ }
+ }
+ }
+ }
+
+
+ .modal {
+ .modal_title {
+ height: 112rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #222222;
+ }
+
+ .line {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 30rpx;
+ height: 98rpx;
+ padding: 0 28rpx;
+ border-bottom: 1rpx solid #E5E5E5;
+
+ .val {
+ display: flex;
+ justify-content: flex-end;
+ flex: 1;
+
+ input {
+ text-align: right;
+ width: 100%;
+ }
+ }
+ }
+
+ .btns {
+ display: flex;
+ justify-content: space-between;
+ padding: 30rpx;
+
+ .btn {
+ width: 336rpx;
+ height: 88rpx;
+ border-radius: 44rpx;
+ border: 1rpx solid $uni-color-primary;
+ color: $uni-color-primary;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 32rpx;
+ }
+
+ .sub {
+ background-color: $uni-color-primary;
+ color: #fff;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/h5/static/wdatabg.png b/h5/static/wdatabg.png
new file mode 100644
index 0000000..cd874b9
--- /dev/null
+++ b/h5/static/wdatabg.png
Binary files differ
--
Gitblit v1.9.3