Commit 91de6c5a68f60ced5c9318d53ec48e272f0784ac
1 parent
06b98db0
小票界面的优化
Showing
3 changed files
with
16 additions
and
13 deletions
pages/user/order_list/ofilter.wxs
@@ -6,22 +6,22 @@ module.exports = { | @@ -6,22 +6,22 @@ module.exports = { | ||
6 | return url; | 6 | return url; |
7 | }, | 7 | }, |
8 | for_mat_val:function (e){ | 8 | for_mat_val:function (e){ |
9 | - if(e==undefined) return '-'; | ||
10 | - if(e==null) return '-'; | ||
11 | - if(e=="null") return '-'; | ||
12 | - if(e=="") return '-'; | 9 | + if(e===undefined) return '-'; |
10 | + if(e===null) return '-'; | ||
11 | + if(e==="null") return '-'; | ||
12 | + if(e==="") return '-'; | ||
13 | return e; | 13 | return e; |
14 | }, | 14 | }, |
15 | toFix: function (val, count) { | 15 | toFix: function (val, count) { |
16 | 16 | ||
17 | - if(val==undefined) return '-'; | ||
18 | - if(val==null) return '-'; | ||
19 | - if(val=="null") return '-'; | ||
20 | - if(val=="") return '-'; | 17 | + if(val===undefined) return '-'; |
18 | + if(val===null) return '-'; | ||
19 | + if(val==="null") return '-'; | ||
20 | + if(val==="") return '-'; | ||
21 | if (!val) { | 21 | if (!val) { |
22 | - return parseFloat(0).toFixed(count); | 22 | + return "0"; |
23 | } | 23 | } |
24 | val = parseFloat(val); | 24 | val = parseFloat(val); |
25 | - return val.toFixed(count) | 25 | + return parseFloat(val.toFixed(count)) |
26 | }, | 26 | }, |
27 | } | 27 | } |
28 | \ No newline at end of file | 28 | \ No newline at end of file |
pages/user/order_list/order_list.js
@@ -2683,7 +2683,10 @@ Page({ | @@ -2683,7 +2683,10 @@ Page({ | ||
2683 | var data = res.data.data.pageData; | 2683 | var data = res.data.data.pageData; |
2684 | // 判断有无更多数据可以加载,如果大于则没有更多数据,反之则有 | 2684 | // 判断有无更多数据可以加载,如果大于则没有更多数据,反之则有 |
2685 | if (res.data.data.page * res.data.data.pageSize >= res.data.data.total) { th.setData({ is_no_more2: 1 }); } | 2685 | if (res.data.data.page * res.data.data.pageSize >= res.data.data.total) { th.setData({ is_no_more2: 1 }); } |
2686 | - let list = []; | 2686 | + |
2687 | + | ||
2688 | + let list = th.data.list2; | ||
2689 | + if(!list) list=[]; | ||
2687 | 2690 | ||
2688 | if (currentIndex == 1) { | 2691 | if (currentIndex == 1) { |
2689 | //list = th.data.list2; | 2692 | //list = th.data.list2; |
pages/user/order_list/order_list.wxml
@@ -535,7 +535,7 @@ | @@ -535,7 +535,7 @@ | ||
535 | <view class="flex subitem_n2"> | 535 | <view class="flex subitem_n2"> |
536 | <view class="subitem_nn">{{i.Qty}}</view> | 536 | <view class="subitem_nn">{{i.Qty}}</view> |
537 | <view class="subitem_nn">{{i.Price}}</view> | 537 | <view class="subitem_nn">{{i.Price}}</view> |
538 | - <view class="subitem_nn je_color">{{i.Sum}}</view> | 538 | + <view class="subitem_nn je_color">{{ofil.toFix(i.Sum,2)}}</view> |
539 | </view> | 539 | </view> |
540 | </view> | 540 | </view> |
541 | <view class="line_new" style="margin-top: 34rpx;"></view> | 541 | <view class="line_new" style="margin-top: 34rpx;"></view> |
@@ -551,7 +551,7 @@ | @@ -551,7 +551,7 @@ | ||
551 | </view> | 551 | </view> |
552 | <view class="more_info flex jc_sb ai_c fs24"> | 552 | <view class="more_info flex jc_sb ai_c fs24"> |
553 | <text>实付金额</text> | 553 | <text>实付金额</text> |
554 | - <text class="je_color">{{item.FactSum}}</text> | 554 | + <text class="je_color">{{ofil.toFix(item.FactSum,2)}}</text> |
555 | </view> | 555 | </view> |
556 | <view class="more_info flex jc_sb ai_c fs24"> | 556 | <view class="more_info flex jc_sb ai_c fs24"> |
557 | <text>本次积分</text> | 557 | <text>本次积分</text> |