tianyi 10 hours ago
parent
commit
dd6530a460
  1. 141
      components/tab-bar/delivery.vue

141
components/tab-bar/delivery.vue

@ -19,7 +19,7 @@
</view>
</scroll-view>
</view>
<scroll-view @scrolltolower="onReachPage" scroll-y style="width:100%;height: 620px;overflow: scroll;">
<scroll-view @scrolltolower="onReachPage" scroll-y style="width:100%;height: 1240rpx;overflow: scroll;">
<view class="box1" @tap="goDetail(item.id)" v-for="(item,index) in orderList" :key="index">
<view style="display: flex;height: 50rpx;border-bottom: 1px solid #eee;">
<view>
@ -49,15 +49,86 @@
</view>
</view>
</view>
<view @tap.stop="mealServing(item)" v-if="currentIndex == 13" style="height: 40px;border-top: 1px solid #eee;display: flex;">
<view @tap.stop="mealServing(item)" style="height: 80rpx;border-top: 1px solid #eee;display: flex;">
<view class="pinzi" @tap.stop="tanchuang(item.deliveryType)" style="width:80rpx;font-weight:700;margin-right: 20rpx;color:#00231C;background:linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1))">
{{item.deliveryType == 1?'配送':'自取'}}
</view>
<view v-if="item.orderType != 1" @tap.stop="getGroupOrders(item.id)" class="pinzi">
</view>
<view style="flex: 1;"></view>
<view style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));width: 50px;height: 30px;border-radius: 7px;line-height: 30px;text-align: center;font-weight: 700;margin-top: 10px;">
<view v-if="currentIndex == 13" style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));width: 100rpx;height: 60rpx;border-radius: 14rpx;line-height: 60rpx;text-align: center;font-weight: 700;margin-top: 20rpx;">
已出餐
</view>
</view>
</view>
</scroll-view>
<!-- 拼团详情弹窗 -->
<uni-popup ref="pintuanPopup" background-color="#fff">
<view class="guize-list">
<view v-for="(item,index) in tuanzhangOrder" :key="index">
<view style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;">
订单{{index + 1}}
</view>
<view class="">
<view class="dingdan">
<view class="pt-title">
配送信息
</view>
<view style="display:flex">
<view style="width:300rpx;">
配送编号
</view>
<view class="pituan-text">
{{item.numberCode}}
</view>
</view>
<view style="display:flex">
<view style="width:300rpx;">
订单号
</view>
<view class="pituan-text">
{{item.id}}
</view>
</view>
<view style="display:flex">
<view style="width:300rpx;">
订单时间
</view>
<view class="pituan-text">
{{item.createTime | formatISOTime}}
</view>
</view>
</view>
<view class="dingdan" v-for="(item1,index1) in item.goodsList" :key="index1">
<view class="pt-title">
商品信息
</view>
<view style="display: flex;font-weight: 700;">
<view style="flex:1">
商品名{{item1.productName}}
</view>
<view style="width:100rpx;">
X{{item1.quantity}}
</view>
<view style="width:220rpx;text-align: right;padding-right:20rpx;">
{{item1.price}}
</view>
</view>
</view>
<view class="dingdan">
<view style="text-align: right;padding-right: 20rpx;color: #777;">
餐盒费{{item.packageFee}} 配送费{{item.deliveryFee}}
</view>
<view style="text-align: right;padding-right: 20rpx;font-size: 28rpx;font-weight: 700;color: red;">
总计{{item.totalAmount}}
</view>
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -65,6 +136,7 @@
export default {
data() {
return {
tuanzhangOrder:[],
searchForm:{
pageNum:1,
pageSize:10,
@ -164,9 +236,9 @@
}else if(item.deliveryType == 1){ //
url = '/mall/order/shopMakeTime'
}
that.tui.request(url, "post", {
that.NB.sendRequest(url, {
orderId:item.id
}, false, true).then((res) => {
}, true, 'post', 'application/json').then((res) => {
if (res.code == 200) {
that.getList()
} else {
@ -179,6 +251,27 @@
}
});
},
getGroupOrders(id){
this.NB.sendRequest("/mall/order/selectAllOrderByOrderId/"+id, {}, true, 'GET', 'application/json').then((res) => {
if (res.code == 200) {
this.tuanzhangOrder = res.result;
this.$refs.pintuanPopup.open()
} else {
uni.showToast({
title: res.message,
icon: 'none'
});
return
}
uni.hideLoading()
}).catch((res) => {});
},
tanchuang(v){
uni.showToast({
title: '该订单为'+(v==1?'配送':'自取')+'单',
icon: 'none'
});
},
getList(){
let that = this
let url = ''
@ -339,7 +432,41 @@
margin: 20rpx auto;
background: #fff;
border-radius: 20rpx;
padding: 20rpx 20rpx 0;
}
.pinzi{
margin: 20rpx 0;
background: linear-gradient(90deg, #FF4500, #FFA07A);
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
border-radius: 10rpx;
color: #fff;
}
.guize-list {
width: 100%;
padding: 20rpx;
height: 100px;
overflow: scroll;
background: #fff;
max-height: 1000rpx;
line-height: 50rpx;
}
.pt-title{
font-size: 28rpx;
font-weight: 700;
color: #777;
}
.dingdan{
border-top: 1px solid #eee;
}
.uni-popup__wrapper{
border-radius: 20rpx !important;
}
.pituan-text{
flex:1;
text-align:right;
padding-right:20rpx;
font-weight: 700;
}
</style>
Loading…
Cancel
Save