Commit eef01393cf18038687be29ff23be353a1b456c3d

Authored by yvan.ni
1 parent 2d885774

线下订单

pages/user/order_list/order_list.js
... ... @@ -50,8 +50,8 @@ Page({
50 50 back_goods_arr:null, //返回商品的列表
51 51 currentIndex: 0,
52 52  
53   - startDate: '选择开始时间',
54   - endDate: '选择结束时间',
  53 + startDate: '',
  54 + endDate: '',
55 55 list2: [],
56 56 currentPage2: 1,
57 57 currentDate: '',
... ... @@ -65,8 +65,15 @@ Page({
65 65 },
66 66 onLoad: function(t) {
67 67 // 设置日期选择器的结束时间为当前日期
  68 + var now=new Date();
  69 + var nowDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate();
  70 + var date = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
  71 + var startDate=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  72 +
68 73 this.setData({
69   - currentDate: this.currentDate()
  74 + currentDate: this.currentDate(),
  75 + startDate:startDate,
  76 + endDate:nowDate,
70 77 });
71 78  
72 79  
... ... @@ -1354,17 +1361,22 @@ Page({
1354 1361 });
1355 1362 if(currentIndex == 0) {
1356 1363 console.log('线上订单');
  1364 + /*---
1357 1365 this.setData({
1358 1366 startDate: '选择开始时间',
1359 1367 endDate: '选择结束时间',
1360   - });
  1368 + });--*/
1361 1369 } else if(currentIndex == 1) {
1362 1370 console.log('线下订单');
1363 1371  
  1372 +
  1373 +
1364 1374 this.request_list({
1365 1375 store_id: os.stoid,
1366 1376 user_id: oo.user_id,
1367 1377 page: 1,
  1378 + BeginDate: this.data.startDate,
  1379 + EndDate: this.data.endDate
1368 1380 });
1369 1381 };
1370 1382 },
... ...
pages/user/order_list/order_list.wxml
... ... @@ -18,7 +18,7 @@
18 18 <view class="search-container" wx:if="{{currentIndex == 1}}">
19 19 <view class="flex jc_sb">
20 20 <view class="picker-container flex f1">
21   - <picker class="picker-date" mode="date" value="{{date}}" start="2015-09-01" end="{{currentDate}}" bindchange="bindDateChange1">
  21 + <picker class="picker-date" mode="date" value="{{date}}" start="2015-09-01" end="{{}}" bindchange="bindDateChange1">
22 22 <view class="picker">{{startDate}}</view>
23 23 </picker>
24 24 <view class="fs28 pdh10">至</view>
... ...