|
|
@ -15,66 +15,38 @@ |
|
|
:scroll-with-animation="true"> |
|
|
:scroll-with-animation="true"> |
|
|
<view class="status-list"> |
|
|
<view class="status-list"> |
|
|
<view v-for="(item, index) in statusList" :key="index" class="status-item" |
|
|
<view v-for="(item, index) in statusList" :key="index" class="status-item" |
|
|
:class="{ 'active': currentIndex === index }" @click="handleStatusClick(index)"> |
|
|
:class="{ 'active': currentIndex === index }" @click="handleStatusClick(index,item.value)"> |
|
|
<text class="status-text">{{ item.name }}</text> |
|
|
<text class="status-text">{{ item.name }}</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="box1" @tap="goDetail"> |
|
|
<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 style="display: flex;height: 50rpx;border-bottom: 1px solid #eee;"> |
|
|
<view> |
|
|
<view> |
|
|
#0001 |
|
|
{{'#' + item.numberCode}} |
|
|
</view> |
|
|
</view> |
|
|
<view style="flex: 1;display: flex;padding-left: 20rpx;"> |
|
|
<view style="flex: 1;display: flex;padding-left: 20rpx;"> |
|
|
2026-02-28 16:08 <text>已退款</text> |
|
|
{{item.createTime | formatISOTime}} |
|
|
|
|
|
<!-- <text>已退款</text> --> |
|
|
</view> |
|
|
</view> |
|
|
<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> |
|
|
</view> |
|
|
<view style="height: 120rpx;padding-top: 20rpx;"> |
|
|
<view style="height: 120rpx;padding-top: 20rpx;"> |
|
|
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;"> |
|
|
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;"> |
|
|
商品 <text>共<text>1</text>件</text> <text style="color: red;">已出餐</text> |
|
|
商品 <text>共<text>{{item.goodsNum}}</text>件</text> <text style="color: red;">已出餐</text> |
|
|
</view> |
|
|
</view> |
|
|
<view style="display: flex;"> |
|
|
<view style="display: flex;" v-for="(item1,index1) in item.goodsList" :key="index"> |
|
|
<view style="flex: 1;"> |
|
|
<view style="flex: 1;"> |
|
|
鱼香肉丝 |
|
|
{{item1.productName}} |
|
|
</view> |
|
|
</view> |
|
|
<view style="width: 100rpx;"> |
|
|
<view style="width: 100rpx;"> |
|
|
X1 |
|
|
{{'X' + item1.quantity}} |
|
|
</view> |
|
|
</view> |
|
|
<view> |
|
|
<view> |
|
|
¥5.00 |
|
|
{{'¥'+ item1.price}} |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="box1" @tap="goDetail"> |
|
|
|
|
|
<view style="display: flex;height: 50rpx;border-bottom: 1px solid #eee;"> |
|
|
|
|
|
<view> |
|
|
|
|
|
#0001 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="flex: 1;display: flex;padding-left: 20rpx;"> |
|
|
|
|
|
2026-02-28 16:08 <text>已退款</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view> |
|
|
|
|
|
已关闭 |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="height: 120rpx;padding-top: 20rpx;"> |
|
|
|
|
|
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;"> |
|
|
|
|
|
商品 <text>共<text>1</text>件</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="display: flex;"> |
|
|
|
|
|
<view style="flex: 1;"> |
|
|
|
|
|
鱼香肉丝 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="width: 100rpx;"> |
|
|
|
|
|
X1 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view> |
|
|
|
|
|
¥5.00 |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -86,66 +58,151 @@ |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
loadStatus: 'more', |
|
|
|
|
|
searchForm:{ |
|
|
|
|
|
pageNum:1, |
|
|
|
|
|
pageSize:10, |
|
|
|
|
|
shopName:'', |
|
|
|
|
|
searchStatus:10, |
|
|
|
|
|
shopId:uni.getStorageSync('shopId'), |
|
|
|
|
|
regionId:JSON.parse(uni.getStorageSync('area')).id |
|
|
|
|
|
}, |
|
|
|
|
|
totalPages: 1, |
|
|
|
|
|
orderList:[], |
|
|
currentIndex: 0, |
|
|
currentIndex: 0, |
|
|
menuButtonInfo: {}, |
|
|
menuButtonInfo: {}, |
|
|
statusList: [{ |
|
|
statusList: [{ |
|
|
name: '待接单', |
|
|
name: '全部', |
|
|
|
|
|
value: 10, |
|
|
|
|
|
checked: true |
|
|
|
|
|
},{ |
|
|
|
|
|
name: '待支付', |
|
|
value: 0, |
|
|
value: 0, |
|
|
checked: true |
|
|
checked: true |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '待发货', |
|
|
name: '待成团', |
|
|
value: 1, |
|
|
value: 1, |
|
|
checked: false |
|
|
checked: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '待退款', |
|
|
name: '待消费', |
|
|
value: 2, |
|
|
value: 2, |
|
|
checked: false |
|
|
checked: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '待售后', |
|
|
name: '待接单', |
|
|
value: 3, |
|
|
value: 3, |
|
|
checked: false |
|
|
checked: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '已发货', |
|
|
name: '待取货', |
|
|
value: 4, |
|
|
value: 4, |
|
|
checked: false |
|
|
checked: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '已完成', |
|
|
name: '待送达', |
|
|
value: 5, |
|
|
value: 5, |
|
|
checked: false |
|
|
checked: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '已取消', |
|
|
name: '已完成', |
|
|
value: 6, |
|
|
value: 6, |
|
|
checked: false |
|
|
checked: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '已售后', |
|
|
name: '待退款', |
|
|
value: 7, |
|
|
value: 7, |
|
|
checked: false |
|
|
checked: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '已退款', |
|
|
|
|
|
value: 8, |
|
|
|
|
|
checked: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '已取消', |
|
|
|
|
|
value: 9, |
|
|
|
|
|
checked: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '售后中', |
|
|
|
|
|
value: 11, |
|
|
|
|
|
checked: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '已售后', |
|
|
|
|
|
value: 12, |
|
|
|
|
|
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); |
|
|
|
|
|
const year = date.getFullYear(); |
|
|
|
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0'); |
|
|
|
|
|
const day = date.getDate().toString().padStart(2, '0'); |
|
|
|
|
|
const hours = date.getHours().toString().padStart(2, '0'); |
|
|
|
|
|
const minutes = date.getMinutes().toString().padStart(2, '0'); |
|
|
|
|
|
const seconds = date.getSeconds().toString().padStart(2, '0'); |
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
|
|
|
|
if(option.index){ |
|
|
|
|
|
this.searchForm.searchStatus = option.index |
|
|
|
|
|
this.currentIndex = option.index |
|
|
|
|
|
} |
|
|
|
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
goDetail(){ |
|
|
getList(){ |
|
|
|
|
|
this.loadStatus = 'loading' |
|
|
|
|
|
let that = this |
|
|
|
|
|
that.tui.request("/mall/order/page", "POST", this.searchForm, false, false).then((res) => { |
|
|
|
|
|
that.loadStatus = 'nomore'; |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
if (that.searchForm.pageNum == 1) { |
|
|
|
|
|
that.orderList = res.result.records; |
|
|
|
|
|
} else { |
|
|
|
|
|
that.orderList = [...that.orderList, ...res.result.records] |
|
|
|
|
|
} |
|
|
|
|
|
for(let i=0;i<that.orderList.length;i++){ |
|
|
|
|
|
that.orderList[i].goodsNum = 0 |
|
|
|
|
|
for(let m=0;m<that.orderList[i].goodsList.length;m++){ |
|
|
|
|
|
that.orderList[i].goodsNum += that.orderList[i].goodsList[m].quantity |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
that.totalPages = res.result.pages; // pages = 总页数 |
|
|
|
|
|
that.$forceUpdate(); |
|
|
|
|
|
} else { |
|
|
|
|
|
that.tui.toast(res.message); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
}).catch((res) => {}); |
|
|
|
|
|
}, |
|
|
|
|
|
goDetail(id){ |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:'/package1/order/orderDetail' |
|
|
url:'/package1/order/orderDetail?id=' + id |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleStatusClick(index) { |
|
|
handleStatusClick(index,value) { |
|
|
if (this.currentIndex === index) return; |
|
|
if (this.currentIndex === index) return; |
|
|
this.currentIndex = index; |
|
|
this.currentIndex = index; |
|
|
|
|
|
this.searchForm.searchStatus = value |
|
|
|
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
back() { |
|
|
back() { |
|
|
uni.navigateBack() |
|
|
uni.navigateBack() |
|
|
|