Commit 922742ecb5147f3534af10e44c49b349ea38df96

Authored by vking
1 parent b2b94cc9

pay

@@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
15 */ 15 */
16 onLoad: function (options) { 16 onLoad: function (options) {
17 this.options=options 17 this.options=options
18 - 18 + this.GetBalance()
19 }, 19 },
20 20
21 /** 21 /**
@@ -95,4 +95,11 @@ Page({ @@ -95,4 +95,11 @@ Page({
95 util.toast('发票已提交','none') 95 util.toast('发票已提交','none')
96 }) 96 })
97 }, 97 },
  98 + GetBalance(){//获得余额
  99 + App.User.GetBalance().then(res=>{
  100 + this.setData({
  101 + user:res.data
  102 + })
  103 + })
  104 + },
98 }) 105 })
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "showModal":"/components/tips/showModal/showModal", 7 "showModal":"/components/tips/showModal/showModal",
8 "invoice":"/components/userinfo/invoice", 8 "invoice":"/components/userinfo/invoice",
  9 + "subscribe":"/components/userinfo/subscribe",
9 "jinduBar":"../components/jinduBar" 10 "jinduBar":"../components/jinduBar"
10 } 11 }
11 } 12 }
1 <!--pack-activity/pages/index.wxml--> 1 <!--pack-activity/pages/index.wxml-->
2 -<nav hasHome>周到安排</nav> 2 +<nav hasHome>{{checkout.sellername||'周到安排'}}</nav>
3 <view class="pages"> 3 <view class="pages">
4 <view class="content"> 4 <view class="content">
5 <jinduBar checkout="{{checkout}}"></jinduBar> 5 <jinduBar checkout="{{checkout}}"></jinduBar>
@@ -41,8 +41,36 @@ @@ -41,8 +41,36 @@
41 </invoice> 41 </invoice>
42 </view> 42 </view>
43 </view> 43 </view>
44 - <view class="checkout-get subscribe" bindtap="checkoutInit">商家反馈金额后提醒我</view>  
45 - <view class="checkout-get tx-seller" bindtap="checkoutInit">催一下商家</view> 44 + <subscribe ids="{{[0]}}">
  45 + <view class="checkout-get subscribe">商家反馈金额后提醒我</view>
  46 + </subscribe>
  47 + <view class="checkout-get tx-seller" bindtap="">催一下商家</view>
  48 + </block>
  49 + <block wx:elif="{{checkout.status==2}}">
  50 + <view class="content money">
  51 + <view class="list flex-lr">
  52 + <view class="list-name">消费总额</view>
  53 + <view class="list-val">¥ {{checkout.price}}</view>
  54 + </view>
  55 + <view class="list flex-lr">
  56 + <view class="list-name">账户余额</view>
  57 + <view class="list-val">-¥ {{user.price}}</view>
  58 + </view>
  59 + <view class="list flex-lr">
  60 + <view class="list-name">应付金额</view>
  61 + <view class="list-val should_price">¥{{checkout.price-user.price>0?checkout.price-user.price:0}}</view>
  62 + </view>
  63 + <view class="list flex-lr" wx:if="{{checkout.bill_list}}">
  64 + <view class="list-name">消费清单</view>
  65 + <view class="list-val">查看消费清单</view>
  66 + </view>
  67 + <view class="list flex-lr">
  68 + <view class="list-name">包间名称</view>
  69 + <view class="list-val">{{checkout.tablename}}</view>
  70 + </view>
  71 + </view>
  72 + <view class="money-tips">注:消费清单,离店时请到前台索要;</view>
  73 + <view class="checkout-get" bindtap="">立即支付{{checkout.price-user.price>0?checkout.price-user.price:0}}元</view>
46 </block> 74 </block>
47 </view> 75 </view>
48 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal> 76 <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
@@ -18,7 +18,7 @@ page{ @@ -18,7 +18,7 @@ page{
18 padding: 0 40rpx; 18 padding: 0 40rpx;
19 box-sizing: border-box; 19 box-sizing: border-box;
20 } 20 }
21 -.checkout,.invoice{ 21 +.checkout,.invoice,.money{
22 margin-top: 10rpx; 22 margin-top: 10rpx;
23 } 23 }
24 .title{ 24 .title{
@@ -73,4 +73,29 @@ page{ @@ -73,4 +73,29 @@ page{
73 } 73 }
74 .invoice-right .title.active{ 74 .invoice-right .title.active{
75 color:rgba(53,53,53,1); 75 color:rgba(53,53,53,1);
  76 +}
  77 +.content.money{
  78 + padding-top: 27rpx;
  79 + padding-bottom: 27rpx;
  80 +}
  81 +.list{
  82 + height: 68rpx;
  83 + line-height: 68rpx;
  84 + font-size:30rpx;
  85 + font-weight:500;
  86 + color:rgba(53,53,53,1);
  87 +
  88 +}
  89 +.money-tips{
  90 + height:40rpx;
  91 + font-size:28rpx;
  92 + font-family:PingFang-SC-Medium,PingFang-SC;
  93 + font-weight:500;
  94 + color:rgba(53,53,53,1);
  95 + line-height:40rpx;
  96 + margin-left: 40rpx;
  97 + margin-top: 20rpx;
  98 +}
  99 +.should_price{
  100 + color:rgba(224,32,32,1);
76 } 101 }