Commit 5759fb9f authored by miko's avatar miko

aa

parent 7dee6b67
...@@ -90,7 +90,8 @@ wepy.app({ ...@@ -90,7 +90,8 @@ wepy.app({
{ {
pages: [ pages: [
'pages/index', 'pages/index',
'pages/progress' 'pages/progress'
], ],
window: { window: {
navigationStyle: "custom", navigationStyle: "custom",
...@@ -116,7 +117,7 @@ wepy.app({ ...@@ -116,7 +117,7 @@ wepy.app({
"text": "捎带快递", "text": "捎带快递",
"iconPath": "assets/close.png", "iconPath": "assets/close.png",
"selectedIconPath": "assets/close.png" "selectedIconPath": "assets/close.png"
}, }
] ]
} }
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.main { .main {
margin-bottom: 161rpx;
box-sizing: border-box; box-sizing: border-box;
flex: 1; flex: 1;
overflow-y: scroll; overflow-y: scroll;
...@@ -515,19 +516,21 @@ ...@@ -515,19 +516,21 @@
<!-- 自定义tabbar--> <!-- 自定义tabbar-->
<van-tabbar active="{{ active }}" @change="onTabChange" class="mytabbar"> <van-tabbar
active-color="#FE991B"
active="{{ active }}" @change="onTabChange" class="mytabbar">
<van-tabbar-item> <van-tabbar-item>
<image <image
slot="icon" slot="icon"
src="@/assets/close.png" src="@/assets/tab1.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
<image <image
slot="icon-active" slot="icon-active"
src="@/assets/close.png" src="@/assets/tab1s.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
捎带快递 捎带快递
</van-tabbar-item> </van-tabbar-item>
...@@ -535,15 +538,15 @@ ...@@ -535,15 +538,15 @@
<van-tabbar-item> <van-tabbar-item>
<image <image
slot="icon" slot="icon"
src="@/assets/close.png" src="@/assets/tab2.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
<image <image
slot="icon-active" slot="icon-active"
src="@/assets/close.png" src="@/assets/tab2s.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
我的捎带 我的捎带
</van-tabbar-item> </van-tabbar-item>
...@@ -665,6 +668,7 @@ wepy.page({ ...@@ -665,6 +668,7 @@ wepy.page({
remark: remark, remark: remark,
phone: this.address.phone, phone: this.address.phone,
addressID: this.address.addressID, addressID: this.address.addressID,
receiverName: this.address.name,
parcelInfo: this.messageText, parcelInfo: this.messageText,
courierCompany: this.messageComp, courierCompany: this.messageComp,
pickupCode: this.messagePacketCode pickupCode: this.messagePacketCode
...@@ -805,7 +809,7 @@ wepy.page({ ...@@ -805,7 +809,7 @@ wepy.page({
} }
}, },
created() { onLoad() {
//TODO 初始化学校 id //TODO 初始化学校 id
wx.setStorageSync('schoolID', 2) wx.setStorageSync('schoolID', 2)
......
<style lang="less" type="text/less" scoped> <style lang="less" type="text/less" scoped>
.list-item{ .list-item{
padding: 0 19rpx;
margin-top: 18rpx; margin-top: 18rpx;
border-radius: 5rpx; border-radius: 10rpx;
background: white; background: white;
box-sizing: border-box; box-sizing: border-box;
height: 266rpx; height: 265rpx;
width: 100%; width: 100%;
.top{
justify-content: space-between;
display: flex;
flex-direction: row;
align-items: center;
height: 100rpx;
width: 100%;
.right{
label{
font-size: 30rpx;
font-weight: 400;
}
}
}
.middle{
position:relative;
//display: flex;
//flex-direction: row;
//align-items: center;
height: 60rpx;
width: 100%;
padding-top: 16rpx;
.cover{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
position: absolute;
margin-top: -44rpx;height: 52rpx;
}
.p1{
border-radius: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: absolute;
background: red;width: 52rpx;height: 52rpx;
}
label{
color: white;
font-size: 24rpx;
}
}
.bottom{
display: flex;
flex-direction: row;
align-items: center;
height: 90rpx;
width: 100%;
}
} }
.main { .main {
margin-bottom: 165rpx;
width: 716rpx; width: 716rpx;
flex: 1; flex: 1;
overflow-y: scroll; overflow-y: scroll;
} }
.progress{
--progress-height: 36rpx;
}
.detail-sheet {
--action-sheet-header-font-size: 36rpx;
--action-sheet-header-height: 108rpx;
--font-weight-bold: 400;
--popup-round-border-radius: 15rpx;
.container {
padding: 0rpx 38rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
background: white;
height: 910rpx;
width: 100%;
}
.middle{
position:relative;
//display: flex;
//flex-direction: row;
//align-items: center;
height: 60rpx;
width: 100%;
padding-top: 16rpx;
.cover{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
position: absolute;
margin-top: -44rpx;height: 52rpx;
}
.p1{
border-radius: 26rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: absolute;
background: red;width: 52rpx;height: 52rpx;
}
label{
color: white;
font-size: 24rpx;
}
}
.item{
width: 100%;
height: 100rpx;
display: flex;
flex-direction: row;
align-items: center;
.left{
width: 193rpx;
font-weight: 400;
font-size: 30rpx;
}
.right{
color: #aaaaaa;
font-size: 30rpx;
}
}
}
</style> </style>
<wxs module="m1" lang="babel">
const getTime = (time) => {
let date = getDate(time);
let hour = date.getHours();
let mins = date.getMinutes();
let sec = date.getSeconds();
let milli = date.getMilliseconds();
return `${hour}-${mins}-${sec}.${milli}`;
}
module.exports.getTime = getTime;
</wxs>
<template> <template>
<div class="container" style="align-items: center"> <div class="container" style="align-items: center">
<header background="#FE991B " title_text="进度查询"/> <header background="#FE991B " title_text="进度查询"/>
<div class="main"> <div class="main">
<div class="list-item">
<div v-for="(item,index) in list" class="list-item" @tap="itemClick(item)">
<div class="top">
<div class="right">
<span>{{item.courierCompany}}</span>
<span style="margin-left: 20rpx">{{item.pickupCode}}</span>
</div> </div>
<span style="font-size: 23rpx;color: #BABABA">{{item.submitTime}}</span>
</div>
<div class="middle">
<van-progress
class="progress"
:percentage="item.percentage"
track-color="#B9b9b9"
pivot-text=" "
color="linear-gradient(to right, #FE9f1f, #FE991B)"
stroke-width="" />
<div class="cover">
<span style="margin-left: 30rpx">取件点</span>
<span style="margin-left: 50rpx" >快到楼下</span>
<div class="p1" style="margin-left: 266rpx">
<van-icon color="white" name="photograph" />
</div>
<span style="margin-left: 100rpx" >楼内配送</span>
<span style="margin-left: 90rpx" >送达照片</span>
<div class="p1" style="margin-left: 637rpx">
<van-icon color="white" name="photograph" />
</div> </div>
</div> </div>
</div>
<div class="bottom">
<van-icon name="info-o" color="#BABABA" size="36rpx"/>
<span style="margin-left: 9rpx;color: #bABABa">已送达,普通规格快递</span>
</div>
</div>
</div>
</div>
<van-action-sheet
@close="closeDetailSheet"
class="detail-sheet"
@click-overlay="closeDetailSheet"
v-bind:show="showDetailSheet" title="订单详情">
<div class="container">
<div class="middle">
<van-progress
class="progress"
:percentage="item.percentage"
track-color="#B9b9b9"
pivot-text=" "
color="linear-gradient(to right, #FE9f1f, #FE991B)"
stroke-width="" />
<div class="cover">
<span style="margin-left: 30rpx">取件点</span>
<span style="margin-left: 50rpx" >快到楼下</span>
<div class="p1" style="margin-left: 266rpx">
<van-icon color="white" name="photograph" />
</div>
<span style="margin-left: 100rpx" >楼内配送</span>
<span style="margin-left: 90rpx" >送达照片</span>
<div class="p1" style="margin-left: 637rpx">
<van-icon color="white" name="photograph" />
</div>
</div>
</div>
<div class="item" style="margin-top: 10rpx">
<div class="left">收件人姓名
</div>
<div class="right">{{currentItem.receiverName}}</div>
</div>
<div class="item">
<div class="left">收件人电话</div>
<div class="right">{{currentItem.phone}}</div>
</div>
<div class="item">
<div class="left">快递公司</div>
<div class="right">{{currentItem.courierCompany}}</div>
</div>
<div class="item">
<div class="left">取件码</div>
<div class="right">{{currentItem.pickupCode}}</div>
</div>
<div class="item">
<div class="left">寝室号</div>
<div class="right">{{currentItem.address}}</div>
</div>
<div class="item">
<div class="left">下单时间</div>
<div class="right">{{currentItem.submitTime}}</div>
</div>
<div class="item">
<div class="left">备注</div>
<div class="right">{{currentItem.remark}}</div>
</div>
<div class="item">
<div class="left">情况描述</div>
<div class="right">{{currentItem.remark}}</div>
</div>
</div>
</van-action-sheet>
<!-- 自定义tabbar--> <!-- 自定义tabbar-->
<van-tabbar active="{{ active }}" @change="onTabChange" class="mytabbar"> <van-tabbar
active-color="#FE991B"
active="{{ active }}" @change="onTabChange" class="mytabbar">
<van-tabbar-item> <van-tabbar-item>
<image <image
slot="icon" slot="icon"
src="@/assets/close.png" src="@/assets/tab1.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
<image <image
slot="icon-active" slot="icon-active"
src="@/assets/close.png" src="@/assets/tab1s.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
捎带快递 捎带快递
</van-tabbar-item> </van-tabbar-item>
...@@ -46,15 +292,15 @@ ...@@ -46,15 +292,15 @@
<van-tabbar-item> <van-tabbar-item>
<image <image
slot="icon" slot="icon"
src="@/assets/close.png" src="@/assets/tab2.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
<image <image
slot="icon-active" slot="icon-active"
src="@/assets/close.png" src="@/assets/tab2s.png"
mode="aspectFit" mode="aspectFit"
style="width: 30px; height: 18px;" style="width: 67rpx; height: 67rpx;"
/> />
我的捎带 我的捎带
</van-tabbar-item> </van-tabbar-item>
...@@ -74,10 +320,21 @@ const app = getApp().$wepy.$options ...@@ -74,10 +320,21 @@ const app = getApp().$wepy.$options
wepy.page({ wepy.page({
data:{ data:{
active: 1 active: 1,
list: [],
showDetailSheet: false,
currentItem: {},
}, },
methods: { methods: {
closeDetailSheet(){
this.showDetailSheet = false
},
itemClick(item){
this.currentItem = item
this.showDetailSheet = true
},
onTabChange(event){ onTabChange(event){
this.active = event.detail this.active = event.detail
if(this.active === 1){ if(this.active === 1){
...@@ -89,10 +346,26 @@ wepy.page({ ...@@ -89,10 +346,26 @@ wepy.page({
} }
} }
}, },
created() { onShow() {
http.post('/task/getSdHistory', { pageIndex: 1, pageSize: 1000, pageSorts: [{column: 'submittime',asc: false }] }).then(res => {
if(res.code === 200){
this.list = res.data.records
this.list.map(v=>{
if(v.status === 0){
v.percentage = 20
}else if(v.status === 1){
v.percentage = 40
}else if(v.status === 2){
v.percentage = 60
}else if(v.status === 3){
v.percentage = 100
}
return v
})
}
})
} }
}) })
</script> </script>
...@@ -108,6 +381,8 @@ header: '~@/components/header', ...@@ -108,6 +381,8 @@ header: '~@/components/header',
'van-button': 'module:@vant/weapp/lib/button', 'van-button': 'module:@vant/weapp/lib/button',
"van-tabbar": "module:@vant/weapp/lib/tabbar/index", "van-tabbar": "module:@vant/weapp/lib/tabbar/index",
"van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index", "van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index",
"van-progress": "module:@vant/weapp/lib/progress/index",
"van-icon": "module:@vant/weapp/lib/icon/index",
"van-action-sheet": "module:@vant/weapp/lib/action-sheet/index" "van-action-sheet": "module:@vant/weapp/lib/action-sheet/index"
} }
} }
......
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