修改订单列表
This commit is contained in:
parent
041d7ab614
commit
5b2b2e0c78
@ -29,9 +29,9 @@ export default {
|
|||||||
check:()=>request.get('/api/order/deliveryman/check_new_order'),
|
check:()=>request.get('/api/order/deliveryman/check_new_order'),
|
||||||
|
|
||||||
markUp:{
|
markUp:{
|
||||||
status:{
|
status:{pending:"PENDING",accepted:"ACCEPTED"},
|
||||||
pending:"PENDING",
|
statusKV:{
|
||||||
accepted:"ACCEPTED"
|
PENDING:'申请中',ACCEPTED:'已同意'
|
||||||
},
|
},
|
||||||
add:(data)=>request.post('/api/order-additional-fee',data),
|
add:(data)=>request.post('/api/order-additional-fee',data),
|
||||||
get:(orderid)=>request.get(`/api/order-additional-fee/order/${orderid}`,{},{noTips:true}),
|
get:(orderid)=>request.get(`/api/order-additional-fee/order/${orderid}`,{},{noTips:true}),
|
||||||
|
|||||||
@ -63,7 +63,9 @@ Page({
|
|||||||
},
|
},
|
||||||
unReadOrderCount:0,
|
unReadOrderCount:0,
|
||||||
|
|
||||||
selectedOrderId:''
|
selectedOrderId:'',
|
||||||
|
|
||||||
|
markupStatusKV:orderApi.markUp.statusKV
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
|
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
|
||||||
@ -74,11 +76,6 @@ Page({
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.getUserInfo().then(()=>{
|
this.getUserInfo().then(()=>{
|
||||||
app.getSummary().then((data)=>{
|
|
||||||
this.setData({
|
|
||||||
summary:data
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return this.loadStatusDetail();
|
return this.loadStatusDetail();
|
||||||
}).then((data)=>{
|
}).then((data)=>{
|
||||||
return this.loadBuilding();
|
return this.loadBuilding();
|
||||||
@ -87,13 +84,6 @@ Page({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
findNewOrder(){
|
findNewOrder(){
|
||||||
// app.forceGetUserInfo().then((data)=>{
|
|
||||||
// if(data.nickname=='仙人模斗'){
|
|
||||||
// this.haveNewOrder = true;
|
|
||||||
// this.orderBackgroundNotice.notice();
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// return;
|
|
||||||
orderApi.check().then((data)=>{
|
orderApi.check().then((data)=>{
|
||||||
if(data.has_new_order){
|
if(data.has_new_order){
|
||||||
this.orderBackgroundNotice.notice();
|
this.orderBackgroundNotice.notice();
|
||||||
@ -144,7 +134,7 @@ Page({
|
|||||||
orderSummary:data
|
orderSummary:data
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
userApi.summary().then((data)=>{
|
app.forceGetSummary().then((data)=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
summary:data
|
summary:data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -37,13 +37,13 @@
|
|||||||
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
||||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail"
|
<view wx:for="{{list}}" wx:key="index"
|
||||||
data-id="{{item.orderid}}"
|
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}} {{item.order_additional_fees.length>0?'has-markup':''}}">
|
||||||
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}">
|
<view bind:tap="navToOrderDetail" data-id="{{item.orderid}}" >
|
||||||
<view class="item-head">
|
<view class="item-head">
|
||||||
<view class="tag">代取快递</view>
|
<view class="tag">代取快递</view>
|
||||||
<view class="deliver-time">
|
<view class="deliver-time">
|
||||||
期望送达 <label class="time">{{item.delivery_time}}</label>
|
期望送达<label class="time">{{item.delivery_time}}</label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="station-list">
|
<view class="station-list">
|
||||||
@ -70,6 +70,13 @@
|
|||||||
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="markup" wx:if="{{item.order_additional_fees.length>0}}">
|
||||||
|
<view class="mu-item" wx:for="{{item.order_additional_fees}}"
|
||||||
|
wx:for-item="mItem" wx:key="index">
|
||||||
|
【<label class="bold">{{markupStatusKV[mItem.result]}}</label>】加价金额:<label class="bold">{{mItem.additional_fee_amount}}元</label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="btns" wx:if="{{item.status==orderStatus.created}}">
|
<view class="btns" wx:if="{{item.status==orderStatus.created}}">
|
||||||
<button disabled="{{item.receiving}}" class="button more-btn" plain
|
<button disabled="{{item.receiving}}" class="button more-btn" plain
|
||||||
capture-catch:tap="showMoreAS" data-item="{{item}}" data-index="{{index}}">
|
capture-catch:tap="showMoreAS" data-item="{{item}}" data-index="{{index}}">
|
||||||
|
|||||||
@ -139,6 +139,7 @@
|
|||||||
.package-list .item .item-head .time{
|
.package-list .item .item-head .time{
|
||||||
color:#ff0000;
|
color:#ff0000;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
margin-left:20rpx;
|
||||||
}
|
}
|
||||||
.package-list .item:first-child{
|
.package-list .item:first-child{
|
||||||
margin-top:8rpx;
|
margin-top:8rpx;
|
||||||
@ -151,9 +152,15 @@
|
|||||||
left:38.5rpx;top:160rpx;
|
left:38.5rpx;top:160rpx;
|
||||||
bottom:250rpx;
|
bottom:250rpx;
|
||||||
}
|
}
|
||||||
|
.package-list .item.has-markup::before{
|
||||||
|
bottom:200rpx;
|
||||||
|
}
|
||||||
.package-list .item.no-btns::before{
|
.package-list .item.no-btns::before{
|
||||||
bottom:100rpx;
|
bottom:100rpx;
|
||||||
}
|
}
|
||||||
|
.package-list .item.no-btns.has-markup::before{
|
||||||
|
bottom:50rpx;
|
||||||
|
}
|
||||||
.package-list .item .name{
|
.package-list .item .name{
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@ -179,15 +186,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.package-list .item .station-list .sl-item:first-child::before{
|
|
||||||
content: '取';
|
|
||||||
left:0;top:0;
|
|
||||||
width:40rpx;height:40rpx;
|
|
||||||
color:#fff;
|
|
||||||
font-size: 24rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 40rpx;
|
|
||||||
}
|
|
||||||
.package-list .item .station-list .sl-item::before{
|
.package-list .item .station-list .sl-item::before{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left:12rpx;top:12rpx;
|
left:12rpx;top:12rpx;
|
||||||
@ -197,6 +195,46 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.package-list .item .station-list .sl-item:first-child::before,
|
||||||
|
.package-list .item .address::before,
|
||||||
|
.package-list .item .markup .mu-item::before{
|
||||||
|
position: absolute;
|
||||||
|
content: '取';
|
||||||
|
left:0;top:0;
|
||||||
|
width:40rpx;height:40rpx;
|
||||||
|
color:#fff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-list .item .address::before{
|
||||||
|
content: '送';
|
||||||
|
background-color: var(--main-color);
|
||||||
|
}
|
||||||
|
.package-list .item .markup{
|
||||||
|
font-size: 34rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
padding-bottom:20rpx;
|
||||||
|
color: var(--main-font-color);
|
||||||
|
}
|
||||||
|
.package-list .item .markup .bold{
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.package-list .item .markup .mu-item{
|
||||||
|
padding-left:48rpx;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top:30rpx;
|
||||||
|
}
|
||||||
|
.package-list .item .markup .mu-item::before{
|
||||||
|
content: '加';
|
||||||
|
background-color:#ff0000;
|
||||||
|
}
|
||||||
|
|
||||||
/* .package-list .item .package .value{
|
/* .package-list .item .package .value{
|
||||||
flex:1;
|
flex:1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -209,18 +247,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding-bottom:20rpx;
|
padding-bottom:20rpx;
|
||||||
}
|
}
|
||||||
.package-list .item .address::before{
|
|
||||||
content: '送';
|
|
||||||
position: absolute;
|
|
||||||
top:0;left:0;
|
|
||||||
width:40rpx;height:40rpx;
|
|
||||||
background-color: var(--main-color);
|
|
||||||
border-radius: 50%;
|
|
||||||
color:#fff;
|
|
||||||
line-height: 40rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
.package-list .item .address .title{
|
.package-list .item .address .title{
|
||||||
color:var(--main-font-color);
|
color:var(--main-font-color);
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
|
|||||||
@ -24,6 +24,7 @@ Page({
|
|||||||
item.endNumber = item.card_number.substr(item.card_number.length-4,item.card_number.length);
|
item.endNumber = item.card_number.substr(item.card_number.length-4,item.card_number.length);
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
|
bank:data.length>0?data[0].id:'',
|
||||||
bankList:data
|
bankList:data
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<view class="status {{item.status}}">{{statusKV[item.status]}}</view>
|
<view class="status {{item.status}}">{{statusKV[item.status]}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-empty">
|
<view class="list-empty" wx:if="{{list.length==0}}">
|
||||||
<image src="/assets/icon/list-empty.png" class="icon"/>
|
<image src="/assets/icon/list-empty.png" class="icon"/>
|
||||||
<view class="title">暂无记录</view>
|
<view class="title">暂无记录</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user