|
@@ -12,72 +12,74 @@
|
|
|
|
|
|
<!-- 订单轮播区 -->
|
|
|
<swiper class="swiper-area w-full" :duration="0" :current="tabCurrentIndex" @change="changeTab">
|
|
|
- <!-- 轮播项对应订单状态 -->
|
|
|
- <swiper-item class="tab-content wh-full" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
|
|
- <!-- 滚动区 -->
|
|
|
- <scroll-view class="h-full" scroll-y @scrolltolower="loadData">
|
|
|
- <!-- 空白页 -->
|
|
|
- <use-empty v-if="tabItem.orderList.length === 0 && tabItem.loaded" e-style="round" e-type="cart"
|
|
|
- tip="订单数据为空" height="93vh"></use-empty>
|
|
|
- <!-- 订单列表区 -->
|
|
|
- <view class="margin-bottom-sm" :class="index === 0 ? 'padding-top-sm' : ''" v-for="(item, index) in tabItem.orderList" :key="index">
|
|
|
- <!-- 订单项 -->
|
|
|
- <view class="order-item padding bg-main border-radius">
|
|
|
- <view @click="todetail(item.order)">
|
|
|
- <view class="dflex-b padding-bottom-sm">
|
|
|
- <view class="fs fwb dflex">
|
|
|
- <u-tag text="自提" size="mini" bgColor="#FFF4E4" color="#F5821F" shape="circle" borderColor="#FFF4E4"></u-tag>
|
|
|
- 订单编号:M000003332
|
|
|
+ <!-- 轮播项对应订单状态 -->
|
|
|
+ <swiper-item class="tab-content wh-full" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
|
|
+ <!-- 滚动区 -->
|
|
|
+ <scroll-view class="h-full" scroll-y @scrolltolower="loadData">
|
|
|
+ <!-- 空白页 -->
|
|
|
+ <use-empty v-if="tabItem.orderList.length === 0 && tabItem.loaded" e-style="round" e-type="cart"
|
|
|
+ tip="订单数据为空" height="93vh"></use-empty>
|
|
|
+ <!-- 订单列表区 -->
|
|
|
+ <view class="margin-bottom-sm" :class="index === 0 ? 'padding-top-sm' : ''"
|
|
|
+ v-for="(item, index) in tabItem.orderList" :key="index">
|
|
|
+ <!-- 订单项 -->
|
|
|
+ <view class="order-item padding bg-main border-radius">
|
|
|
+ <view @click="todetail(item.order)">
|
|
|
+ <view class="dflex-b padding-bottom-sm">
|
|
|
+ <view class="fs fwb dflex">
|
|
|
+ <u-tag text="打包" size="mini" bgColor="#FFF4E4" color="#F5821F" shape="circle"
|
|
|
+ borderColor="#FFF4E4"></u-tag>
|
|
|
+ 订单编号:M000003332
|
|
|
+ </view>
|
|
|
+ <text class="fs active">等待付款</text>
|
|
|
</view>
|
|
|
- <text class="fs active">等待付款</text>
|
|
|
- </view>
|
|
|
- <!-- 订单商品明细 -->
|
|
|
- <view class="goods-area dflex-b">
|
|
|
- <view class="pic-list dflex">
|
|
|
- <view class="pic"></view>
|
|
|
- <view class="pic"></view>
|
|
|
- <view class="pic"></view>
|
|
|
- </view>
|
|
|
- <view class="next-detail">
|
|
|
- <text>共3件</text>
|
|
|
- <u-icon name="arrow-right" size="20"></u-icon>
|
|
|
+ <!-- 订单商品明细 -->
|
|
|
+ <view class="goods-area dflex-b">
|
|
|
+ <view class="pic-list dflex">
|
|
|
+ <view class="pic"></view>
|
|
|
+ <view class="pic"></view>
|
|
|
+ <view class="pic"></view>
|
|
|
+ </view>
|
|
|
+ <view class="next-detail">
|
|
|
+ <text>共3件</text>
|
|
|
+ <u-icon name="arrow-right" size="20"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
-
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 实付款 -->
|
|
|
- <view class="dflex-e padding-top-sm">
|
|
|
- <text class="fs-xs margin-right-xs">共3件</text>
|
|
|
- <text class="fs-xs margin-right-xs">共6份商品</text>
|
|
|
- <text class="fs-xs margin-right-xs">实付</text>
|
|
|
- <text class="price ft-main">{{ item.order.order_actural_paid}}</text>
|
|
|
+ <!-- 实付款 -->
|
|
|
+ <view class="dflex-e padding-top-sm">
|
|
|
+ <text class="fs-xs margin-right-xs">共3件</text>
|
|
|
+ <text class="fs-xs margin-right-xs">共6份商品</text>
|
|
|
+ <text class="fs-xs margin-right-xs">实付</text>
|
|
|
+ <text class="price ft-main">{{ item.order.order_actural_paid}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 订单操作区 -->
|
|
|
- <view class="dflex-b margin-top-sm">
|
|
|
- <view>
|
|
|
- <text class="ft-dark" >更多</text>
|
|
|
- </view>
|
|
|
+ <!-- 订单操作区 -->
|
|
|
+ <view class="dflex-b margin-top-sm">
|
|
|
+ <view>
|
|
|
+ <text class="ft-dark">更多</text>
|
|
|
+ </view>
|
|
|
|
|
|
- <view class="dflex-e">
|
|
|
- <view class="dflex">
|
|
|
- <button class="action-btn border-radius-big bg-main">取消订单</button>
|
|
|
- <button class="action-btn border-radius-big bg-main">订单详情</button>
|
|
|
- <button class="action-btn border-radius-big bg-main main-btn">去支付</button>
|
|
|
+ <view class="dflex-e">
|
|
|
+ <view class="dflex">
|
|
|
+ <button class="action-btn border-radius-big bg-main">取消订单</button>
|
|
|
+ <button class="action-btn border-radius-big bg-main" @click="todetail">订单详情</button>
|
|
|
+ <button class="action-btn border-radius-big bg-main main-btn">去支付</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 上拉加载更多 -->
|
|
|
- <use-loadmore v-if="tabItem.orderList.length > 0 && tabItem.loaded && tabItem.hasmore"
|
|
|
- :type="tabItem.loadingType"></use-loadmore>
|
|
|
- </scroll-view>
|
|
|
- </swiper-item>
|
|
|
+ <!-- 上拉加载更多 -->
|
|
|
+ <use-loadmore v-if="tabItem.orderList.length > 0 && tabItem.loaded && tabItem.hasmore"
|
|
|
+ :type="tabItem.loadingType"></use-loadmore>
|
|
|
+ </scroll-view>
|
|
|
+ </swiper-item>
|
|
|
</swiper>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -91,38 +93,33 @@
|
|
|
id: 0,
|
|
|
state: '全部',
|
|
|
loadingType: 'more',
|
|
|
- orderList: [
|
|
|
- {
|
|
|
- order_detail:[
|
|
|
- {
|
|
|
- goods_img:'../../../static/x2.jpg',
|
|
|
- goods_name:'商品1',
|
|
|
- goods_name_pw:'小标题',
|
|
|
- goods_num:1,
|
|
|
- goods_sku_name:60,
|
|
|
- goods_price:10
|
|
|
- }
|
|
|
- ],
|
|
|
- order:{
|
|
|
- order_actural_paid:10,
|
|
|
- order_refund_state:'处理中',
|
|
|
- state:'待发货'
|
|
|
+ orderList: [{
|
|
|
+ order_detail: [{
|
|
|
+ goods_img: '../../../static/x2.jpg',
|
|
|
+ goods_name: '商品1',
|
|
|
+ goods_name_pw: '小标题',
|
|
|
+ goods_num: 1,
|
|
|
+ goods_sku_name: 60,
|
|
|
+ goods_price: 10
|
|
|
+ }],
|
|
|
+ order: {
|
|
|
+ order_actural_paid: 10,
|
|
|
+ order_refund_state: '处理中',
|
|
|
+ state: '待发货'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- order_detail:[
|
|
|
- {
|
|
|
- goods_img:'../../../static/x2.jpg',
|
|
|
- goods_name:'商品1',
|
|
|
- goods_name_pw:'小标题',
|
|
|
- goods_num:1,
|
|
|
- goods_sku_name:60,
|
|
|
- goods_price:10
|
|
|
- }
|
|
|
- ],
|
|
|
- order:{
|
|
|
- order_actural_paid:10,
|
|
|
- state:'待发货'
|
|
|
+ order_detail: [{
|
|
|
+ goods_img: '../../../static/x2.jpg',
|
|
|
+ goods_name: '商品1',
|
|
|
+ goods_name_pw: '小标题',
|
|
|
+ goods_num: 1,
|
|
|
+ goods_sku_name: 60,
|
|
|
+ goods_price: 10
|
|
|
+ }],
|
|
|
+ order: {
|
|
|
+ order_actural_paid: 10,
|
|
|
+ state: '待发货'
|
|
|
}
|
|
|
}
|
|
|
]
|
|
@@ -135,13 +132,13 @@
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
- state: '待收货',
|
|
|
+ state: '待核销',
|
|
|
loadingType: 'more',
|
|
|
orderList: []
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
- state: '待自提',
|
|
|
+ state: '已取消',
|
|
|
loadingType: 'more',
|
|
|
orderList: []
|
|
|
},
|
|
@@ -150,12 +147,6 @@
|
|
|
state: '已完成',
|
|
|
loadingType: 'more',
|
|
|
orderList: []
|
|
|
- },
|
|
|
- {
|
|
|
- id: 5,
|
|
|
- state: '已关闭',
|
|
|
- loadingType: 'more',
|
|
|
- orderList: []
|
|
|
}
|
|
|
],
|
|
|
reqdata: {
|
|
@@ -166,25 +157,27 @@
|
|
|
title: '全部'
|
|
|
}
|
|
|
},
|
|
|
+ onLoad(e) {
|
|
|
+ this.tabCurrentIndex = parseFloat(e.type);
|
|
|
+ },
|
|
|
methods: {
|
|
|
- loadData(){},
|
|
|
+ loadData() {},
|
|
|
// swiper 切换
|
|
|
changeTab(e) {
|
|
|
this.tabCurrentIndex = e.target.current;
|
|
|
-
|
|
|
},
|
|
|
//顶部tab点击
|
|
|
tabClick(index) {
|
|
|
this.tabCurrentIndex = index;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 点击跳转详情页面
|
|
|
todetail(order) {
|
|
|
// uni.navigateTo({
|
|
|
// url: `/pages/user/order/order-detail?order_id=${order.order_id}`
|
|
|
// });
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/order/orderDetail/orderDetail`
|
|
|
+ url: `/pages/order/orderPaid/orderPaid`
|
|
|
});
|
|
|
},
|
|
|
// 立即支付
|
|
@@ -194,7 +187,7 @@
|
|
|
// 删除订单
|
|
|
delOrder(item) {
|
|
|
let _this = this;
|
|
|
-
|
|
|
+
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '删除订单',
|
|
@@ -203,7 +196,7 @@
|
|
|
uni.showLoading({
|
|
|
title: '请稍后'
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
} else if (res.cancel) {
|
|
|
console.log('点击取消');
|
|
|
}
|
|
@@ -216,7 +209,7 @@
|
|
|
// 取消订单
|
|
|
cancelOrder(item) {
|
|
|
let _this = this;
|
|
|
-
|
|
|
+
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '取消订单',
|
|
@@ -225,32 +218,7 @@
|
|
|
uni.showLoading({
|
|
|
title: '请稍后'
|
|
|
});
|
|
|
-
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消');
|
|
|
- }
|
|
|
- },
|
|
|
- complete() {
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 查看物流
|
|
|
- toexpress(item) {
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pages/user/order/order-express?order_id=${item.order.order_id}`
|
|
|
- // });
|
|
|
- },
|
|
|
- // 已发货
|
|
|
- toreceipt(item) {
|
|
|
- let _this = this;
|
|
|
-
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '确认收货',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
-
|
|
|
+
|
|
|
} else if (res.cancel) {
|
|
|
console.log('用户点击取消');
|
|
|
}
|
|
@@ -262,18 +230,19 @@
|
|
|
},
|
|
|
// 申请退款
|
|
|
torefund(data) {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
// 评价
|
|
|
toevaluate(item) {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- page,.container {
|
|
|
+ page,
|
|
|
+ .container {
|
|
|
min-height: 100%;
|
|
|
background: $page-color-base;
|
|
|
}
|
|
@@ -317,6 +286,7 @@
|
|
|
|
|
|
/* 订单项 */
|
|
|
.order-item {
|
|
|
+
|
|
|
/* 订单商品明细区 */
|
|
|
.goods-area {
|
|
|
display: flex;
|
|
@@ -366,22 +336,26 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .pic-list{
|
|
|
+
|
|
|
+ .pic-list {
|
|
|
width: calc(100% - 130upx);
|
|
|
- .pic{
|
|
|
+
|
|
|
+ .pic {
|
|
|
margin-right: 20upx;
|
|
|
height: 160rpx;
|
|
|
width: 160rpx;
|
|
|
background-color: #EEE;
|
|
|
}
|
|
|
- .pic:last-child{
|
|
|
+
|
|
|
+ .pic:last-child {
|
|
|
margin: 0;
|
|
|
}
|
|
|
}
|
|
|
- .next-detail{
|
|
|
+
|
|
|
+ .next-detail {
|
|
|
width: 130upx;
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
align-items: center;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|