|
@ -4,17 +4,17 @@ |
|
|
<navbar title=" " bgColor="#019245" color="#fff" /> |
|
|
<navbar title=" " bgColor="#019245" color="#fff" /> |
|
|
|
|
|
|
|
|
<!-- 搜索框 --> |
|
|
<!-- 搜索框 --> |
|
|
<view class="search-box" style="background-color: #fff; padding: 12rpx 20rpx 0rpx; "> |
|
|
|
|
|
|
|
|
<view style="background-color: #fff; padding: 12rpx 20rpx 0rpx; "> |
|
|
<uv-search placeholder="搜索商品名" v-model="keyword" :showAction="false" actionText="" height="80rpx" animation |
|
|
<uv-search placeholder="搜索商品名" v-model="keyword" :showAction="false" actionText="" height="80rpx" animation |
|
|
bgColor="#F5F5F5" inputAlign="center" color="#000" placeholderColor="#979797" |
|
|
|
|
|
searchIconSize="50rpx"></uv-search> |
|
|
|
|
|
|
|
|
bgColor="#F5F5F5" inputAlign="center" color="#000" placeholderColor="#979797" |
|
|
|
|
|
searchIconSize="50rpx"></uv-search> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 订单筛选 --> |
|
|
<!-- 订单筛选 --> |
|
|
<view class="tabs"> |
|
|
<view class="tabs"> |
|
|
<uv-tabs :list="tabs" :activeStyle="{ color: '#019245'}" lineColor="#019245" :scrollable="false" |
|
|
<uv-tabs :list="tabs" :activeStyle="{ color: '#019245'}" lineColor="#019245" :scrollable="false" |
|
|
:inactiveStyle="{color: 'black'}" lineHeight="6rpx" lineWidth="55rpx" :current="current" |
|
|
|
|
|
@tap="clickTabs" /> |
|
|
|
|
|
|
|
|
:inactiveStyle="{color: 'black'}" lineHeight="6rpx" lineWidth="55rpx" :current="current" |
|
|
|
|
|
@click="clickTabs" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 团餐列表 --> |
|
|
<!-- 团餐列表 --> |
|
@ -31,7 +31,8 @@ |
|
|
<!-- 订单列表 --> |
|
|
<!-- 订单列表 --> |
|
|
<view class="order-list" v-else> |
|
|
<view class="order-list" v-else> |
|
|
<OrderItem v-for="(order, index) in orderList" :key="order.id" :order="order" @cancel="handleCancelOrder" |
|
|
<OrderItem v-for="(order, index) in orderList" :key="order.id" :order="order" @cancel="handleCancelOrder" |
|
|
@pay="handlePayOrder" @tap="goToOrderDetail(order)" /> |
|
|
|
|
|
|
|
|
@pick="handlePickOrder" |
|
|
|
|
|
@pay="handlePayOrder" @click="goToOrderDetail" /> |
|
|
<view style="margin-top: 200rpx; min-width: 700rpx;"> |
|
|
<view style="margin-top: 200rpx; min-width: 700rpx;"> |
|
|
<uv-empty mode="order" v-if="orderList.length == 0"></uv-empty> |
|
|
<uv-empty mode="order" v-if="orderList.length == 0"></uv-empty> |
|
|
</view> |
|
|
</view> |
|
@ -191,6 +192,7 @@ |
|
|
} |
|
|
} |
|
|
// 关闭请求 |
|
|
// 关闭请求 |
|
|
// this.getData() |
|
|
// this.getData() |
|
|
|
|
|
console.log('点击了tab栏', index); |
|
|
|
|
|
|
|
|
// 模拟根据状态筛选订单 |
|
|
// 模拟根据状态筛选订单 |
|
|
this.filterOrdersByStatus(index) |
|
|
this.filterOrdersByStatus(index) |
|
@ -234,6 +236,7 @@ |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
content: '确定要取消订单吗?', |
|
|
content: '确定要取消订单吗?', |
|
|
|
|
|
confirmColor: '#019245', |
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
if (res.confirm) { |
|
|
if (res.confirm) { |
|
|
// 模拟取消订单API调用 |
|
|
// 模拟取消订单API调用 |
|
@ -283,6 +286,27 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, 1500) |
|
|
}, 1500) |
|
|
|
|
|
}, |
|
|
|
|
|
// 处理取餐完成 |
|
|
|
|
|
handlePickOrder(order) { |
|
|
|
|
|
uni.showModal( { |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '确定取餐完成?', |
|
|
|
|
|
confirmColor: '#019245', |
|
|
|
|
|
success: (res) => { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
order.status = 'completed', |
|
|
|
|
|
this.clickTabs({ |
|
|
|
|
|
index: 3 |
|
|
|
|
|
}) |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '取餐完成', |
|
|
|
|
|
icon: 'success', |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|