修改订单列表
This commit is contained in:
parent
041d7ab614
commit
5b2b2e0c78
@ -29,9 +29,9 @@ export default {
|
||||
check:()=>request.get('/api/order/deliveryman/check_new_order'),
|
||||
|
||||
markUp:{
|
||||
status:{
|
||||
pending:"PENDING",
|
||||
accepted:"ACCEPTED"
|
||||
status:{pending:"PENDING",accepted:"ACCEPTED"},
|
||||
statusKV:{
|
||||
PENDING:'申请中',ACCEPTED:'已同意'
|
||||
},
|
||||
add:(data)=>request.post('/api/order-additional-fee',data),
|
||||
get:(orderid)=>request.get(`/api/order-additional-fee/order/${orderid}`,{},{noTips:true}),
|
||||
|
||||
@ -63,7 +63,9 @@ Page({
|
||||
},
|
||||
unReadOrderCount:0,
|
||||
|
||||
selectedOrderId:''
|
||||
selectedOrderId:'',
|
||||
|
||||
markupStatusKV:orderApi.markUp.statusKV
|
||||
},
|
||||
onLoad(){
|
||||
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
|
||||
@ -74,11 +76,6 @@ Page({
|
||||
});
|
||||
|
||||
this.getUserInfo().then(()=>{
|
||||
app.getSummary().then((data)=>{
|
||||
this.setData({
|
||||
summary:data
|
||||
});
|
||||
});
|
||||
return this.loadStatusDetail();
|
||||
}).then((data)=>{
|
||||
return this.loadBuilding();
|
||||
@ -87,13 +84,6 @@ Page({
|
||||
});
|
||||
},
|
||||
findNewOrder(){
|
||||
// app.forceGetUserInfo().then((data)=>{
|
||||
// if(data.nickname=='仙人模斗'){
|
||||
// this.haveNewOrder = true;
|
||||
// this.orderBackgroundNotice.notice();
|
||||
// }
|
||||
// })
|
||||
// return;
|
||||
orderApi.check().then((data)=>{
|
||||
if(data.has_new_order){
|
||||
this.orderBackgroundNotice.notice();
|
||||
@ -144,7 +134,7 @@ Page({
|
||||
orderSummary:data
|
||||
})
|
||||
});
|
||||
userApi.summary().then((data)=>{
|
||||
app.forceGetSummary().then((data)=>{
|
||||
this.setData({
|
||||
summary:data
|
||||
})
|
||||
|
||||
@ -37,37 +37,44 @@
|
||||
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail"
|
||||
data-id="{{item.orderid}}"
|
||||
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}">
|
||||
<view class="item-head">
|
||||
<view class="tag">代取快递</view>
|
||||
<view class="deliver-time">
|
||||
期望送达 <label class="time">{{item.delivery_time}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="station-list">
|
||||
<view class="sl-item" wx:for="{{item.packages}}" wx:key="index" wx:for-item="pItem" wx:for-index="pIndex">
|
||||
<view class="name">{{pItem.station_name}} {{pItem.pickup_codes.length}} 件</view>
|
||||
<view class="received-status {{item.status==orderStatus.received&&!pItem.receivedAll?'done':''}}" wx:if="{{item.status!=orderStatus.created}}">
|
||||
{{
|
||||
item.status==orderStatus.received?(pItem.receivedAll?'已取件':'待取件'):
|
||||
item.status==orderStatus.delivering?'已取件':''
|
||||
}}
|
||||
<view wx:for="{{list}}" wx:key="index"
|
||||
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':''}}">
|
||||
<view bind:tap="navToOrderDetail" data-id="{{item.orderid}}" >
|
||||
<view class="item-head">
|
||||
<view class="tag">代取快递</view>
|
||||
<view class="deliver-time">
|
||||
期望送达<label class="time">{{item.delivery_time}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sl-item" wx:if="{{item.pickup_images&&item.pickup_images.length>0}}">
|
||||
<view class="name">图片取件 {{item.pickup_images_count}} 件</view>
|
||||
<view class="station-list">
|
||||
<view class="sl-item" wx:for="{{item.packages}}" wx:key="index" wx:for-item="pItem" wx:for-index="pIndex">
|
||||
<view class="name">{{pItem.station_name}} {{pItem.pickup_codes.length}} 件</view>
|
||||
<view class="received-status {{item.status==orderStatus.received&&!pItem.receivedAll?'done':''}}" wx:if="{{item.status!=orderStatus.created}}">
|
||||
{{
|
||||
item.status==orderStatus.received?(pItem.receivedAll?'已取件':'待取件'):
|
||||
item.status==orderStatus.delivering?'已取件':''
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="sl-item" wx:if="{{item.pickup_images&&item.pickup_images.length>0}}">
|
||||
<view class="name">图片取件 {{item.pickup_images_count}} 件</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address">
|
||||
<view class="title">
|
||||
{{item.address.community_name}}
|
||||
{{item.address.building_name}}
|
||||
{{item.address.address_detail}}
|
||||
<view class="address">
|
||||
<view class="title">
|
||||
{{item.address.community_name}}
|
||||
{{item.address.building_name}}
|
||||
{{item.address.address_detail}}
|
||||
</view>
|
||||
<view class="sub-title">
|
||||
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="sub-title">
|
||||
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
||||
<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}}">
|
||||
|
||||
@ -139,6 +139,7 @@
|
||||
.package-list .item .item-head .time{
|
||||
color:#ff0000;
|
||||
font-weight: 500;
|
||||
margin-left:20rpx;
|
||||
}
|
||||
.package-list .item:first-child{
|
||||
margin-top:8rpx;
|
||||
@ -151,9 +152,15 @@
|
||||
left:38.5rpx;top:160rpx;
|
||||
bottom:250rpx;
|
||||
}
|
||||
.package-list .item.has-markup::before{
|
||||
bottom:200rpx;
|
||||
}
|
||||
.package-list .item.no-btns::before{
|
||||
bottom:100rpx;
|
||||
}
|
||||
.package-list .item.no-btns.has-markup::before{
|
||||
bottom:50rpx;
|
||||
}
|
||||
.package-list .item .name{
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
@ -179,15 +186,6 @@
|
||||
display: flex;
|
||||
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{
|
||||
position: absolute;
|
||||
left:12rpx;top:12rpx;
|
||||
@ -197,6 +195,46 @@
|
||||
border-radius: 50%;
|
||||
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{
|
||||
flex:1;
|
||||
display: flex;
|
||||
@ -209,18 +247,6 @@
|
||||
position: relative;
|
||||
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{
|
||||
color:var(--main-font-color);
|
||||
font-size: 40rpx;
|
||||
|
||||
@ -24,6 +24,7 @@ Page({
|
||||
item.endNumber = item.card_number.substr(item.card_number.length-4,item.card_number.length);
|
||||
});
|
||||
this.setData({
|
||||
bank:data.length>0?data[0].id:'',
|
||||
bankList:data
|
||||
})
|
||||
});
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<view class="status {{item.status}}">{{statusKV[item.status]}}</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"/>
|
||||
<view class="title">暂无记录</view>
|
||||
</view>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user