|
|
|
@ -19,36 +19,45 @@ |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
<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> |
|
|
|
{{'#' + item.numberCode}} |
|
|
|
</view> |
|
|
|
<view style="flex: 1;display: flex;padding-left: 20rpx;"> |
|
|
|
{{item.createTime | formatISOTime}} |
|
|
|
<!-- <text>已退款</text> --> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
{{item.status == 0?'待支付':item.status == 1?' 待成团':item.status == 2?'待消费':item.status == 3?'待接单':item.status == 4?'待取货':item.status == 5?'待送达':item.status == 6?'已完成':item.status == 7?'待退款':item.status == 8?'已退款':item.status == 9?'已取消':item.status == 11?'售后中':item.status == 12?'已售后':""}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="height: 120rpx;padding-top: 20rpx;"> |
|
|
|
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;display: flex;"> |
|
|
|
商品 <text>共<text>{{item.goodsNum}}</text>件</text> <text style="color: red;flex: 1;text-align: right;">已出餐</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex;" v-for="(item1,index1) in item.goodsList" :key="index"> |
|
|
|
<view style="flex: 1;"> |
|
|
|
{{item1.productName}} |
|
|
|
<scroll-view @scrolltolower="onReachPage" scroll-y style="width:100%;height: 620px;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> |
|
|
|
{{'#' + item.numberCode}} |
|
|
|
</view> |
|
|
|
<view style="width: 100rpx;"> |
|
|
|
{{'X' + item1.quantity}} |
|
|
|
<view style="flex: 1;display: flex;padding-left: 20rpx;"> |
|
|
|
{{item.createTime | formatISOTime}} |
|
|
|
<!-- <text>已退款</text> --> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
{{'¥'+ item1.price}} |
|
|
|
{{item.status == 0?'待支付':item.status == 2?'待配送员接单':(item.status == 3 && item.deliveryType == 1 && item.shopMakeTime == null) || (item.status == 3 && item.deliveryType == 2 && item.userRequireMake == 1)?'待出餐':(item.status == 3 && item.deliveryType == 1 && item.shopMakeTime != null)?'待取货':(item.status == 3 && item.deliveryType == 2)?'待消费':item.status == 4?'待送达':item.status == 5?'已完成':item.status == 7?'待同意退款':item.status == 8?'已退款':item.status == 6?'已取消':item.status == 11?'售后中':item.status == 12?'已售后':""}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="height: 120rpx;padding-top: 20rpx;"> |
|
|
|
<view v-if="item.status == 3" style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;"> |
|
|
|
商品 <text>共<text>{{item.goodsNum}}</text>件</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex;" v-for="(item1,index1) in item.goodsList" :key="index"> |
|
|
|
<view style="flex: 1;"> |
|
|
|
{{item1.productName}} |
|
|
|
</view> |
|
|
|
<view style="width: 100rpx;"> |
|
|
|
{{'X' + item1.quantity}} |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
{{'¥'+ item1.price}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @tap.stop="mealServing(item)" v-if="currentIndex == 13" style="height: 40px;border-top: 1px solid #eee;display: flex;"> |
|
|
|
<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> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -56,7 +65,6 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
loadStatus: 'more', |
|
|
|
searchForm:{ |
|
|
|
pageNum:1, |
|
|
|
pageSize:10, |
|
|
|
@ -73,24 +81,23 @@ |
|
|
|
value: 10, |
|
|
|
checked: true |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
name: '待消费', |
|
|
|
value: 2, |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '待接单', |
|
|
|
value: 3, |
|
|
|
name: '待出餐', |
|
|
|
value: 13, |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '待发货', |
|
|
|
name: '待取货', |
|
|
|
value: 4, |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '已发货', |
|
|
|
name: '待送达', |
|
|
|
value: 5, |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
@ -105,29 +112,18 @@ |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '已取消', |
|
|
|
value: 9, |
|
|
|
name: '已退款', |
|
|
|
value: 8, |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '售后中', |
|
|
|
value: 11, |
|
|
|
checked: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '已售后', |
|
|
|
value: 12, |
|
|
|
name: '已取消', |
|
|
|
value: 9, |
|
|
|
checked: false |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if (this.searchForm.pageNum >= this.totalPages) return; |
|
|
|
// this.status = 'loading'; |
|
|
|
this.searchForm.pageNum++; |
|
|
|
this.getOrderList(); |
|
|
|
}, |
|
|
|
filters:{ |
|
|
|
formatISOTime(isoString) { |
|
|
|
const date = new Date(isoString); |
|
|
|
@ -141,19 +137,64 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init(){ |
|
|
|
// if(option.index){ |
|
|
|
// this.searchForm.searchStatus = option.index |
|
|
|
// this.currentIndex = option.index |
|
|
|
// } |
|
|
|
init(index){ |
|
|
|
if(index){ |
|
|
|
this.searchForm.searchStatus = index |
|
|
|
this.currentIndex = index |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
onReachPage(){ |
|
|
|
console.log("11111") |
|
|
|
if (this.searchForm.pageNum >= this.totalPages) return; |
|
|
|
this.searchForm.pageNum++; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
mealServing(item){ |
|
|
|
let that = this |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '确定要出餐吗?', |
|
|
|
success: function (res) { |
|
|
|
if (res.confirm) { |
|
|
|
let data = {} |
|
|
|
let url = '' |
|
|
|
if(item.deliveryType == 2){ //自取单 |
|
|
|
url = '/mall/order/complete' |
|
|
|
}else if(item.deliveryType == 1){ //外卖单 |
|
|
|
url = '/mall/order/shopMakeTime' |
|
|
|
} |
|
|
|
that.tui.request(url, "post", { |
|
|
|
orderId:item.id |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.getList() |
|
|
|
} else { |
|
|
|
that.tui.toast(res.message); |
|
|
|
return; |
|
|
|
} |
|
|
|
uni.hideLoading(); |
|
|
|
}).catch((res) => {}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
getList(){ |
|
|
|
this.loadStatus = 'loading' |
|
|
|
let that = this |
|
|
|
|
|
|
|
that.NB.sendRequest("/mall/order/page", this.searchForm, true, 'POST', 'application/json').then((res) => { |
|
|
|
that.loadStatus = 'nomore'; |
|
|
|
let url = '' |
|
|
|
let data = { |
|
|
|
linkId: uni.getStorageSync('shopId'), |
|
|
|
pageNum: this.searchForm.pageNum, |
|
|
|
pageSize: 10, |
|
|
|
statusList: [0, 3], |
|
|
|
regionId:JSON.parse(uni.getStorageSync('area')).regionId |
|
|
|
} |
|
|
|
if(this.currentIndex == 11){ |
|
|
|
url = "/mall/refund/page" |
|
|
|
}else{ |
|
|
|
url = "/mall/order/page" |
|
|
|
} |
|
|
|
that.NB.sendRequest(url, this.currentIndex == 11?data : this.searchForm, true, 'POST', 'application/json').then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (that.searchForm.pageNum == 1) { |
|
|
|
that.orderList = res.result.records; |
|
|
|
@ -183,6 +224,7 @@ |
|
|
|
handleStatusClick(index,value) { |
|
|
|
if (this.currentIndex === index) return; |
|
|
|
this.currentIndex = index; |
|
|
|
this.searchForm.pageNum = 1 |
|
|
|
this.searchForm.searchStatus = value |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
@ -298,5 +340,6 @@ |
|
|
|
background: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
padding: 20rpx; |
|
|
|
height: 100px; |
|
|
|
} |
|
|
|
</style> |