diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js
index 64da06f..5d971a1 100644
--- a/pages/user/order_list/order_list.js
+++ b/pages/user/order_list/order_list.js
@@ -1,3 +1,4 @@
+const app = getApp();
var t = function(t) {
return t && t.__esModule ? t : {
default: t
@@ -19,7 +20,7 @@ Page({
resourceUrl: e.globalData.setting.imghost,
iurl: e.globalData.setting.imghost,
categories: [{
- name: "全部订单",
+ name: "全部",
id: 0
}, {
name: "待付款",
@@ -47,12 +48,26 @@ Page({
card_field:null,
back_goods_arr:null, //返回商品的列表
+ currentIndex: 0,
+
+ startDate: '选择开始时间',
+ endDate: '选择结束时间',
+ list2: [],
+ currentPage2: 1,
+ currentDate: '',
+ total: 0, //读取时段内记录数量
},
onLoad: function(t) {
+ // 设置日期选择器的结束时间为当前日期
+ this.setData({
+ currentDate: this.currentDate()
+ });
+
+
var th = this;
if (t.type != undefined) this.setData({
activeCategoryId: t.type
- })
+ });
s.init(this, "", "orderList");
//---查看会员的等级价---
getApp().getConfig2(function(e) {
@@ -230,15 +245,24 @@ Page({
},
//滑倒底部
onReachBottom: function() {
- if (s.data.goodsLoadFinishFlag) {
- this.setData({
- iscodeall: 1
- })
- }
- s.canloadMore() && this.requestOrderList(this.data.activeCategoryId);
+ if(this.data.currentIndex == 0) {
+ if (s.data.goodsLoadFinishFlag) {
+ this.setData({
+ iscodeall: 1
+ })
+ }
+ s.canloadMore() && this.requestOrderList(this.data.activeCategoryId);
+ } else {
+ this.request_list({
+ store_id: os.stoid,
+ user_id: oo.user_id,
+ page: this.data.currentPage2,
+ });
+ }
},
onPullDownRefresh: function(t) {
- this.resetData(), this.requestOrderList(this.data.activeCategoryId);
+ // sty取消
+ // this.resetData(), this.requestOrderList(this.data.activeCategoryId);
},
/*-----------取消订单-----------*/
@@ -767,10 +791,6 @@ Page({
}).then(res=>{
pickup = res.data.data;
})
-
- wx.showLoading({
- title:"处理中."
- });
//--------获取商品----------
var goods_list=item.order_goods;
@@ -1084,7 +1104,6 @@ Page({
if(!err_text){
th.more_add_cart();
}else{
- wx.hideLoading();
// 如果没有获取用户信息
wx.showModal({
title:'确定',
@@ -1099,7 +1118,6 @@ Page({
}
}else{
- wx.hideLoading();
getApp().confirmBox(err_text);
}
},
@@ -1197,9 +1215,8 @@ Page({
}
})
}
- }
-
- wx.hideLoading();
+ }
+
if(ok_num==0){
//-- 如果没有获取用户信息 --
wx.showModal({
@@ -1226,9 +1243,155 @@ Page({
}
}
- }
-
+ },
+
+ request_list: function(data, callback){
+ // console.log('触发上拉刷新');
+
+ var th = this;
+ if(this.data.is_load2) return false; //-- 正在加载
+ if(this.data.is_no_data2) return false; //-- 没有数据
+ if(this.data.is_no_more2) return false; //-- 没有更多
+
+ // 开启加载状态
+ this.data.is_load2=1;
+
+ // var req_data = {
+ // page:th.data.currentPage2
+ // }
+
+ app.request.promiseGet("/api/weshop/order/pagePosOrder", {
+ data: data
+ }).then(res=>{
+ // 关闭加载状态
+ th.data.is_load2=0;
+ // 请求成功
+ if(res.data.code==0) {
+ if(res.data.data.pageData.length>0) {
+ th.data.currentPage2++;
+ var data = res.data.data.pageData;
+ // 判断有无更多数据可以加载,如果大于则没有更多数据,反之则有
+ if(res.data.data.page*res.data.data.pageSize > res.data.data.total){th.setData({is_no_more2:1});}
+ var list=th.data.list2;
+ list=list.concat(data);
+ th.setData({list2:list});
+ } else {
+ if(th.data.currentPage2==1){
+ th.setData({is_no_data2:1});
+ } else {
+ th.setData({is_no_more2:1});
+ }
+ }
+ if(callback) callback();
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ },
+
+
+ onClickTab(e) {
+ let currentIndex = e.target.dataset.index;
+ this.setData({
+ currentIndex: currentIndex
+ });
+ console.log(this.data.currentIndex);
+ this.setData({
+ is_no_data2: 0,
+ is_no_more2: 0,
+ currentPage2: 1,
+ });
+ if(currentIndex == 0) {
+ console.log('线上订单');
+ } else if(currentIndex == 1) {
+ console.log('线下订单');
+
+ this.request_list({
+ store_id: os.stoid,
+ user_id: oo.user_id,
+ page: 1,
+ });
+ };
+ },
+
+ bindDateChange1: function(e) {
+ console.log('picker发送选择改变,携带值为', e.detail.value)
+ this.setData({
+ startDate: e.detail.value
+ })
+ },
+
+ bindDateChange2: function(e) {
+ console.log('picker发送选择改变,携带值为', e.detail.value)
+ this.setData({
+ endDate: e.detail.value
+ })
+ },
+ search() {
+ let th = this;
+ let startDate = this.data.startDate;
+ let endDate = this.data.endDate;
+
+ if(startDate == '选择开始时间' || endDate == '选择结束时间') {
+ wx.showToast({
+ title: '请选择完整的查询时间~',
+ icon: 'none',
+ })
+ }
+
+ if(new Date(startDate) > new Date(endDate)) {
+ wx.showToast({
+ title: '敲黑板!开始时间不能晚于结束时间噢~',
+ icon: 'none',
+ })
+ }
+
+
+ this.request_list({
+ store_id: os.stoid,
+ user_id: oo.user_id,
+ page: 1,
+ BeginDate:this.data.startDate,
+ EndDate: this.data.endDate,
+ }, function() {
+ th.setData({
+ total: res.data.data.total
+ });
+ });
+
+
+ },
+
+ currentDate() {
+ var now = new Date();
+ var year = now.getFullYear(); //年
+ var month = now.getMonth() + 1; //月
+ var day = now.getDate(); //日
+
+ var clock = year + "-";
+
+ if(month < 10) month += "0";
+ clock += month + "-";
+
+ if(day < 10) day += "0";
+ clock += day;
+
+ // if(hh < 10)
+ // clock += "0";
+
+ // clock += hh + ":";
+ // if (mm < 10) clock += '0';
+ // clock += mm + ":";
+
+ // if (ss < 10) clock += '0';
+ // clock += ss;
+ return clock;
+ },
});
\ No newline at end of file
diff --git a/pages/user/order_list/order_list.json b/pages/user/order_list/order_list.json
index 264bda9..0894e53 100644
--- a/pages/user/order_list/order_list.json
+++ b/pages/user/order_list/order_list.json
@@ -1,5 +1,6 @@
{
"navigationBarTitleText": "我的订单",
+ "enablePullDownRefresh": false,
"usingComponents": {
"qr_code": "/components/qr_code/qr_code"
}
diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml
index dbfcbb7..52a240c 100644
--- a/pages/user/order_list/order_list.wxml
+++ b/pages/user/order_list/order_list.wxml
@@ -1,194 +1,249 @@
-
-
-
- {{item.name}}
-
-
-
+
+ 线上订单
+ 线下订单
+
+
+
+ 搜索
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ {{startDate}}
+
+ 至
+
+ {{endDate}}
+
+
+ 查询
+
+ 注:读取时段内仅{{total}}笔记录
+
-
-
-
-
-
- 订单编号:{{item.order_sn}}
-
-
-
- 组团中
- 未支付
-
- 待发货
- 待收货
- 待评价
- 已评价
- 已取消
-
-
- 待支付尾款
- 退款成功
- 支付尾款失败
-
- 退款中
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 秒杀
- 团购
-
-
-
-
-
- {{goods.goods_name}}
-
-
-
-
-
-
- {{filters.show_gui_ge(goods.goods_spec, goods.goods_color)}}
-
-
-
-
- 申请退款
- 退款中
- 重新退款
- 退款完成
-
-
-
-
-
-
-
-
- ¥
- {{filters.toFix(goods.member_goods_price,2)}}
-
- x{{goods.goods_num}}
-
-
-
-
-
-
-
-
-
- 共{{item.g_num}}件商品
-
-
-
-
- 合计(改):
- ¥
- {{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}}
-
-
-
-
-
-
- 定金(改):
- ¥
- {{filters.toFix(item.order_amount+item.user_money,2)}}
-
-
-
- 合计(改):
- ¥
- {{filters.toFix(item.order_amount+item.user_money,2)}}
- +{{item.coupon_price}}元优惠券
- +{{item.integral}}积分
-
-
-
- 待支付尾款:
- ¥
- {{filters.toFix(item.pt_tail_money-item.shipping_price,2)}}
-
-
-
-
-
-
-
-
-
-
- 取消订单
- 拼团失败
-
-
- 申请退款
- 申请退款
-
-
- 删除订单
- 重新退款
- 退款详情
-
- 查看物流
- 查看物流
- 订单详情
-
-
-
-
-
-
+
+
+
+
+
+
+ 订单编号:{{item.order_sn}}
+
+
+
+ 组团中
+ 未支付
+
+ 待发货
+ 待收货
+ 待评价
+ 已评价
+ 已取消
+
+
+ 待支付尾款
+ 退款成功
+ 支付尾款失败
+
+ 退款中
+
-
- 评价
- 评价
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 秒杀
+ 团购
+
+
+
+
+
+ {{goods.goods_name}}
+
+
+
+
+
+
+ {{filters.show_gui_ge(goods.goods_spec, goods.goods_color)}}
+
+
+
+
+ 申请退款
+ 退款中
+ 重新退款
+ 退款完成
+
+
+
+
+
+
+
+
+ ¥
+ {{filters.toFix(goods.member_goods_price,2)}}
+
+ x{{goods.goods_num}}
+
+
+
+
+
+
+
+
+
+ 共{{item.g_num}}件商品
+
+
+
+
+ 合计(改):
+ ¥
+ {{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}}
+
+
+
+
+
+
+ 定金(改):
+ ¥
+ {{filters.toFix(item.order_amount+item.user_money,2)}}
+
+
+
+ 合计(改):
+ ¥
+ {{filters.toFix(item.order_amount+item.user_money,2)}}
+ +{{item.coupon_price}}元优惠券
+ +{{item.integral}}积分
+
+
+
+ 待支付尾款:
+ ¥
+ {{filters.toFix(item.pt_tail_money-item.shipping_price,2)}}
+
+
+
+
+
+
+
+
+
+
+ 取消订单
+ 拼团失败
+
+
+ 申请退款
+ 申请退款
+
+
+ 删除订单
+ 重新退款
+ 退款详情
+
+ 查看物流
+ 查看物流
+ 订单详情
+
+
+
+
+
+
+
+
+ 评价
+ 评价
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 单号:{{item.No}}
+
+ {{item.BillDate}}
+ 消费总额:¥{{item.Sum}}
+
+
+ {{i.BarCode}} - {{i.WareName}}
+
+
+ 数量
+ {{i.Qty}}
+
+
+ 单价
+ ¥{{i.Price}}({{i.PosPrice}})
+
+
+ 金额
+ ¥{{i.Sum}}
+
+
+
+
+
+
+
-
+
- 到底了
+ ——— 到底了 ———
-
+
diff --git a/pages/user/order_list/order_list.wxss b/pages/user/order_list/order_list.wxss
index c2ba572..eb7292c 100644
--- a/pages/user/order_list/order_list.wxss
+++ b/pages/user/order_list/order_list.wxss
@@ -1,5 +1,49 @@
+/* 背景色相关 */
+bg-white {
+ background-color: white;
+}
+
+/* 外边距相关 */
+mgt12 {
+ margin-top: 12rpx;
+}
+
+/* 边框相关 */
+.bdt {
+ border-top: 2rpx solid #F6F6F6;
+}
+
+/* 颜色相关 */
+.c-a9{
+ color: #A9A9A9;
+}
+.c-9 {
+ color: #999;
+}
+
+/* 内边距 */
+.pdt20 {
+ padding-top: 20rpx;
+}
+
+.bold {
+ font-weight: bold;
+}
+
+.f1 {
+ flex: 1;
+}
+
+.pdh10 {
+ padding-left: 10rpx;
+ padding-right: 10rpx;
+}
+
+
page {
font-family: microsoft yahei;
+ background-color: #F5F5F5;
+ height: 100%;
}
.type-navbar {
@@ -8,23 +52,63 @@ page {
height: 88rpx;
background-color: #fff;
justify-content: space-between;
- border-top: 1rpx solid rgb(211, 211, 211);
+ border-top: 2rpx solid #f6f6f6;
}
.type-box {
box-sizing: border-box;
- line-height: 84rpx;
+ width: 20%;
+ line-height: 88rpx;
text-align: center;
display: inline-block;
overflow: hidden;
}
.type-navbar-item {
- border-bottom: 4rpx solid #fff;
+ /* border-bottom: 4rpx solid #fff; */
}
.type-item-on {
- border-bottom: 4rpx solid #e64340;
+ background-color: #FF3B3D;
+ color: white;
+ font-weight: bold;
+ /* border-bottom: 4rpx solid #ED3036; */
+ position: relative;
+}
+.type-item-on:after {
+ /* content: '';
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 50%;
+ height: 4rpx;
+ background-color: #ED3036;
+ margin: 0 auto; */
+}
+
+.container {
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 999;
+ /* position: -webkit-sticky;
+ position:sticky;
+ top: 0; */
+}
+
+.list-container {
+ padding-left: 18rpx;
+ padding-right: 18rpx;
+ overflow: hidden;
+ /* height: calc(100% - 282rpx); */
+ padding-top: 282rpx;
+}
+
+.stay_evaluate {
+ background-color: white;
+ margin-top: 18rpx;
+ border-radius: 8rpx;
}
/* 原 */
@@ -112,7 +196,9 @@ page {
.order-total {
display: flex;
- justify-content: flex-start;
+ justify-content: flex-end;
+ padding-top: 24rpx;
+ padding-bottom: 24rpx;
}
.goods-total {
@@ -146,9 +232,11 @@ page {
/* 新 */
+
.Commodity_number {
height: 80rpx;
- border-top: 13rpx solid rgb(245, 245, 245);
+ color: #696969;
+ /* border-top: 13rpx solid rgb(245, 245, 245); */
}
.Commodity_number .lin {
@@ -159,11 +247,11 @@ page {
.Commodity_number image {
width: 30rpx;
- height: 32rpx;
+ height: 30rpx;
}
.padding {
- padding: 0rpx 27rpx;
+ padding: 0 18rpx;
}
/* 文字基线对齐 */
@@ -173,7 +261,7 @@ page {
}
.border_bottom {
- border-bottom: 4rpx solid rgb(245, 245, 245);
+ border-bottom: 2rpx solid rgb(245, 245, 245);
}
/* 单个商品框架 */
@@ -183,8 +271,11 @@ page {
}
.detail_commodity image {
- width: 185rpx;
- height: 185rpx;
+ display: block;
+ /* width: 186rpx;
+ height: 186rpx; */
+ width: 100%;
+ height: 100%;
}
.detail_commodity .goods_name {
@@ -210,27 +301,31 @@ page {
/* 商品评价按钮框架 */
.commodity_evaluate {
- padding-top: 15rpx;
- padding-bottom: 15rpx;
- border-bottom: 4rpx solid rgb(245, 245, 245);
+ /* padding-top: 15rpx;
+ padding-bottom: 15rpx; */
+ /* border-bottom: 4rpx solid rgb(245, 245, 245); */
}
.commodity_evaluate .commodity_smy .commodity_money {
margin-left: 29rpx;
letter-spacing: 1rpx;
+ font-weight: bold;
}
.commodity_evaluate .links {
/* height: 92rpx; */
- height: auto;
+ /* height: auto; */
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+ border-top: 2rpx solid #F6F6F6;
}
.commodity_evaluate .commodity_To_evaluate {
width: 155rpx;
height: 48rpx;
- border-radius: 10rpx;
+ border-radius: 6rpx;
line-height: 48rpx;
- margin-bottom: 10rpx;
+ /* margin-bottom: 10rpx; */
}
.commodity_evaluate .commodity_To_evaluate view {
@@ -239,8 +334,9 @@ page {
}
.commodity_evaluate .comment_go {
- background-color: rgb(211, 28, 52);
- color: rgb(255, 255, 255);
+ /* background-color: rgb(211, 28, 52); */
+ background-color: #FF3B3D;
+ color: white;
margin-left: 18rpx;
width: 155rpx;
height: 48rpx;
@@ -294,7 +390,7 @@ page {
}
.commodity_evaluate .View_evaluation {
- border: 1px solid #ddd;
+ border: 1px solid #E5E5E5;
color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
margin-left: 18rpx;
@@ -321,13 +417,14 @@ page {
.After_all .end {
margin: 0rpx 15rpx;
+ color: #ccc;
}
/* 无订单 */
.empty_order image {
- width: 329rpx;
- height: 229rpx;
+ width: 292rpx;
+ height: 268rpx;
margin-top: 202rpx;
}
@@ -343,16 +440,18 @@ page {
.empty_order navigator view {
width: 247rpx;
- height: 56rpx;
+ height: 60rpx;
+ line-height: 60rpx;
background-color: rgb(255, 72, 72);
- border-radius: 40rpx;
+ border-radius: 8rpx;
}
.rel {
- width: 185rpx;
- height: 185rpx;
+ box-sizing: border-box;
+ width: 184rpx;
+ height: 184rpx;
overflow: hidden;
- border: 2rpx solid rgb(236, 236, 236);
+ /* border: 2rpx solid rgb(236, 236, 236); */
}
.abs {
@@ -371,4 +470,119 @@ page {
}
.refund{
margin-top: 20rpx;
-}
\ No newline at end of file
+}
+
+.tab-container {
+ display: flex;
+ justify-content: space-between;
+ text-align: center;
+ font-size: 28rpx;
+ border-bottom: 2rpx solid #f2f2f2;
+}
+.tab {
+ flex: 1;
+ line-height: 80rpx;
+ background-color: white;
+ position: relative;
+}
+.tab.active {
+ color: #FF3B3D;
+}
+.tab.active::after {
+ content: '';
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 50%;
+ height: 2px;
+ margin: 0 auto;
+ background-color: #FF3B3D;
+}
+.search-container {
+ /* display: flex; */
+ padding: 10px;
+ background-color: white;
+}
+.search-input {
+ background-color: #f2f2f2;
+ flex: 1;
+ border-radius: 4px 0 0 4px;
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 14px;
+ padding: 0 10px;
+}
+.search-btn {
+ color: white;
+ font-size: 14px;
+ background-color: #FF3B3D;
+ padding: 8px 20px;
+ border-radius: 0 4px 4px 0;
+}
+.picker-container {
+ padding-right: 10rpx;
+ align-items: center;
+
+}
+.picker-date {
+ background-color: #f5f5f5;
+ flex: 1;
+ border-radius: 10rpx;
+}
+.picker {
+ color: #999;
+ text-align: center;
+ line-height: 70rpx;
+ font-size: 28rpx;
+}
+
+.list2 {
+ padding-left: 18rpx;
+ padding-right: 18rpx;
+}
+.title {
+ padding: 20rpx;
+ font-size: 28rpx;
+}
+.subtitle {
+ display: flex;
+ font-size: 26rpx;
+ justify-content: space-between;
+ background-color: #f0f0f0;
+ line-height: 60rpx;
+ padding: 0 20rpx;
+}
+.item {
+ background-color: white;
+ border-radius: 16rpx;
+ margin-top: 20rpx;
+}
+.subitem {
+ width: calc(100% / 3);
+ text-align: center;
+ font-size: 28rpx;
+}
+.name {
+ padding: 0 20rpx;
+ margin: 20rpx 0;
+ font-size: 30rpx;
+ word-break: break-all;
+ text-align: justify;
+}
+.key {
+ padding: 8rpx 0;
+ color: #999;
+}
+.val {
+ padding: 20rpx 0;
+ color: red;
+}
+
+.offline-container {
+ padding: 244rpx 20rpx 20rpx;
+}
+
+.search-btn2 {
+ border-radius-top-left: 8rpx;
+}