Commit 0652445fee56d003c53a0e9eb875609ce70d02c6

Authored by vking
1 parent 32b2f5d5

seller-do

@@ -90,7 +90,8 @@ @@ -90,7 +90,8 @@
90 "pages/book/smsbatch/result", 90 "pages/book/smsbatch/result",
91 "pages/book/roomtype/roomtype", 91 "pages/book/roomtype/roomtype",
92 "pages/book/b_reserve", 92 "pages/book/b_reserve",
93 - "pages/checkout/index" 93 + "pages/checkout/index",
  94 + "pages/checkout/invoice"
94 ] 95 ]
95 } 96 }
96 ], 97 ],
@@ -225,7 +225,8 @@ image{ @@ -225,7 +225,8 @@ image{
225 } 225 }
226 226
227 .Medium{ 227 .Medium{
228 - font-weight: 400; 228 + font-family:PingFangSC-Medium,PingFang SC;
  229 + font-weight: 500;
229 } 230 }
230 .button-none { 231 .button-none {
231 display: inline-block; 232 display: inline-block;
@@ -210,7 +210,8 @@ image{ @@ -210,7 +210,8 @@ image{
210 } 210 }
211 211
212 .Medium{ 212 .Medium{
213 - font-weight: 400; 213 + font-family:PingFangSC-Medium,PingFang SC;
  214 + font-weight: 500;
214 } 215 }
215 .button-none { 216 .button-none {
216 display: inline-block; 217 display: inline-block;
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <block wx:if="{{detail.order_info.status>1}}"> 5 <block wx:if="{{detail.order_info.status>1}}">
6 <view class="block payinfo"> 6 <view class="block payinfo">
7 <view class="title flex-lr"> 7 <view class="title flex-lr">
8 - <view>消费信息</view> 8 + <view class="Medium">消费信息</view>
9 </view> 9 </view>
10 <view class="center"> 10 <view class="center">
11 <view class="item flex-lr"> 11 <view class="item flex-lr">
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </view> 21 </view>
22 <view class="block userinfo"> 22 <view class="block userinfo">
23 <view class="title flex-lr"> 23 <view class="title flex-lr">
24 - <view>顾客信息</view> 24 + <view class="Medium">顾客信息</view>
25 <view class="orderRemark">{{detail.orderRemark}}</view> 25 <view class="orderRemark">{{detail.orderRemark}}</view>
26 </view> 26 </view>
27 <view class="center"> 27 <view class="center">
@@ -55,9 +55,9 @@ @@ -55,9 +55,9 @@
55 </view> 55 </view>
56 </view> 56 </view>
57 </view> 57 </view>
58 - <view class="block userinfo" wx:if="{{detail.order_info.status==3}}"> 58 + <view class="block payinfo" wx:if="{{detail.order_info.status==3}}">
59 <view class="title flex-lr"> 59 <view class="title flex-lr">
60 - <view>买单信息</view> 60 + <view class="Medium">买单信息</view>
61 </view> 61 </view>
62 <view class="center"> 62 <view class="center">
63 <view class="item flex-lr"> 63 <view class="item flex-lr">
@@ -69,8 +69,8 @@ @@ -69,8 +69,8 @@
69 <view class="item-value">¥ {{detail.order_info.subsidy_price}}</view> 69 <view class="item-value">¥ {{detail.order_info.subsidy_price}}</view>
70 </view> 70 </view>
71 <view class="item flex-lr"> 71 <view class="item flex-lr">
72 - <view class="item-label">实收金额</view>  
73 - <view class="item-value">¥ {{detail.order_info.price}}</view> 72 + <view class="item-label Medium">实收金额</view>
  73 + <view class="item-value Medium">¥ {{detail.order_info.price}}</view>
74 </view> 74 </view>
75 <view class="item flex-lr"> 75 <view class="item flex-lr">
76 <view class="item-label">支付方式</view> 76 <view class="item-label">支付方式</view>
@@ -92,6 +92,9 @@ page{ @@ -92,6 +92,9 @@ page{
92 font-weight:500; 92 font-weight:500;
93 color:rgba(53,53,53,1); 93 color:rgba(53,53,53,1);
94 } 94 }
  95 +.payinfo .item-value{
  96 + font-weight:400;
  97 +}
95 .pay-tips-icon{ 98 .pay-tips-icon{
96 position: absolute; 99 position: absolute;
97 top:calc(50% - 84rpx); 100 top:calc(50% - 84rpx);
  1 +// pack-book/pages/checkout/index.js
  2 +import util from '../../../utils/util';
  3 +import App from '../../../utils/api';
  4 +import RS from '../../../utils/reserveStatus';
  5 +Page({
  6 +
  7 + /**
  8 + * 页面的初始数据
  9 + */
  10 + data: {
  11 +
  12 + },
  13 +
  14 + /**
  15 + * 生命周期函数--监听页面加载
  16 + */
  17 + onLoad: function (options) {
  18 + this.options=options
  19 + },
  20 +
  21 + /**
  22 + * 生命周期函数--监听页面初次渲染完成
  23 + */
  24 + onReady: function () {
  25 +
  26 + },
  27 +
  28 + /**
  29 + * 生命周期函数--监听页面显示
  30 + */
  31 + onShow: function () {
  32 + this.getDetail();
  33 + },
  34 +
  35 + /**
  36 + * 生命周期函数--监听页面隐藏
  37 + */
  38 + onHide: function () {
  39 +
  40 + },
  41 +
  42 + /**
  43 + * 生命周期函数--监听页面卸载
  44 + */
  45 + onUnload: function () {
  46 +
  47 + },
  48 +
  49 + /**
  50 + * 页面相关事件处理函数--监听用户下拉动作
  51 + */
  52 + onPullDownRefresh: function () {
  53 +
  54 + },
  55 +
  56 + /**
  57 + * 页面上拉触底事件的处理函数
  58 + */
  59 + onReachBottom: function () {
  60 +
  61 + },
  62 + detail:null,
  63 + getDetail(hasCache=false){
  64 + App.Reserve.Detail({
  65 + openid: getApp().openid,
  66 + rid: this.options.rid
  67 + },hasCache).then(async res => {
  68 + this.detail=this.formatDatail(res.data)
  69 + this.detail.ddate_solt=Number(this.detail.ddate_solt);
  70 + let title=''
  71 + if(this.detail.order_info.status>1){
  72 + title='买单申请详情'
  73 + }
  74 + this.setData({
  75 + detail: this.detail,
  76 + title:title,
  77 + })
  78 + })
  79 + },
  80 + formatDatail(detail) {
  81 + detail=RS.reserve(detail);
  82 + let formatDate='YYYY-MM-DD '+detail.soltName
  83 + if(detail.type==1 && detail.is_set_ddate==1){
  84 + formatDate +=' HH:II'
  85 + }
  86 + detail.rdateStr = util.unixtoTime(detail.ddate, formatDate);
  87 + detail.orderRemark='';
  88 + if(detail.order_info){
  89 + if(detail.order_info.is_wine==1 || detail.order_info.is_pack==1){
  90 + detail.orderRemark='*顾客'
  91 + let orderRemark=[]
  92 + if(detail.order_info.is_wine==1){
  93 + orderRemark.push('有酒水要退')
  94 + }
  95 + if(detail.order_info.is_pack==1){
  96 + orderRemark.push('菜品需要打包')
  97 + }
  98 + detail.orderRemark+=orderRemark.join(',')
  99 + }
  100 + }
  101 + return detail;
  102 + },
  103 + displayTables(){
  104 + if(this.data.tabs){
  105 + this.setData({
  106 + tabs:'',
  107 + })
  108 + return;
  109 + }
  110 + let tables=this.detail.tables
  111 + let tabs={}
  112 + tables.some(t=>{
  113 + if(!tabs[t.tid]){
  114 + tabs[t.tid]=t.name
  115 + }else{
  116 + tabs[t.tid]+="、"+t.name
  117 + }
  118 + })
  119 + this.setData({
  120 + tabs:tabs,
  121 + })
  122 + },
  123 +})
  1 +{
  2 + "backgroundTextStyle":"light",
  3 + "navigationBarBackgroundColor": "#fff",
  4 + "navigationBarTextStyle":"white",
  5 + "usingComponents": {
  6 + "nav":"/components/nav/nav",
  7 + "qnupload": "plugin://vktool/qnupload",
  8 + "confirm-price":"../../components/checkout/confirm-price"
  9 + }
  10 +
  11 +}
  1 +<!--pack-book/pages/checkout/index.wxml-->
  2 +<wxs src="../../../utils/util.wxs" module="util" />
  3 +<nav hasHome backgroundColor="#199095" color="#fefefe">invoice</nav>
  4 +<view class="pages flex-vc">
  5 + <view class="block userinfo">
  6 + <view class="center">
  7 + <view class="item {{tabs?'auto-height':''}}">
  8 + <view class="flex-lr" bindtap="{{detail.tables.length>1?'displayTables':''}}">
  9 + <view class="item-label">桌位信息</view>
  10 + <view class="item-value flex-rr">
  11 + <view wx:if="{{!tabs}}">【{{util.reserveTidName(detail.tables[0].tid)}}】{{detail.tables[0].name}}</view>
  12 + <view class="bg-img bg-{{tabs?'x2':'x1'}}" wx:if="{{detail.tables.length>1}}"></view>
  13 + </view>
  14 + </view>
  15 + <view class="tabs-view" wx:if="{{tabs}}">
  16 + <view class="tabs-item" wx:for="{{tabs}}" wx:key="tabs">【{{util.reserveTidName(index)}}】{{item}}</view>
  17 + </view>
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="block invoice">
  22 + <view class="title flex-lr">
  23 + <view class="Medium">发票信息</view>
  24 + </view>
  25 + <view class="center">
  26 + <view class="item flex-lr" style="align-items:flex-start">
  27 + <view class="item-label">名称</view>
  28 + <view class="item-value Medium">{{detail.invoice.title}}</view>
  29 + </view>
  30 + <view class="item flex-lr">
  31 + <view class="item-label">税号</view>
  32 + <view class="item-value Medium">{{detail.invoice.taxnumber}}</view>
  33 + </view>
  34 + <view class="item flex-lr" style="align-items:flex-start">
  35 + <view class="item-label">单位地址</view>
  36 + <view class="item-value">{{detail.invoice.companyaddress}}</view>
  37 + </view>
  38 + <view class="item flex-lr">
  39 + <view class="item-label">电话号码</view>
  40 + <view class="item-value">{{detail.invoice.telephone}}</view>
  41 + </view>
  42 + <view class="item flex-lr" style="align-items:flex-start">
  43 + <view class="item-label">开户银行</view>
  44 + <view class="item-value">{{detail.invoice.bankname}}</view>
  45 + </view>
  46 + <view class="item flex-lr">
  47 + <view class="item-label">银行账户</view>
  48 + <view class="item-value">{{detail.invoice.bankaccount}}</view>
  49 + </view>
  50 + </view>
  51 + </view>
  52 + <view class="block userinfo">
  53 + <view class="title flex-lr">
  54 + <view class="Medium">顾客信息</view>
  55 + </view>
  56 + <view class="center">
  57 + <view class="item flex-lr">
  58 + <view class="item-label">买单顾客</view>
  59 + <view class="item-value">{{detail.rname}} {{util.reserveSexName(detail.sex)}}</view>
  60 + </view>
  61 + <view class="item flex-lr">
  62 + <view class="item-label">顾客电话</view>
  63 + <view class="item-value">{{detail.phone}}</view>
  64 + </view>
  65 + <view class="item flex-lr">
  66 + <view class="item-label">到店时间</view>
  67 + <view class="item-value">{{detail.rdateStr}}</view>
  68 + </view>
  69 + <view class="item flex-lr">
  70 + <view class="item-label">申请时间</view>
  71 + <view class="item-value">{{util.unixtoTime(detail.order_info.create_time,'YYYY-MM-DD HH:II')}}</view>
  72 + </view>
  73 + </view>
  74 + </view>
  75 +</view>
  1 +/* pack-book/pages/checkout/index.wxss */
  2 +page{
  3 + background:rgba(245,245,245,1);
  4 +}
  5 +.bg-img{
  6 + background-image: url("http://nosqn.colorcun.com/checkout/images/css_sprites.png");
  7 + zoom: 33.5%;
  8 +}
  9 +.bg-add {
  10 + width: 48px; height: 48px;
  11 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -141px -111px;
  12 +}
  13 +.bg-x2 {
  14 + width: 42px; height: 24px;
  15 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -265px -111px;
  16 +}
  17 +.bg-x1 {
  18 + width: 42px; height: 24px;
  19 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -141px -179px;
  20 + margin-left: 20rpx;
  21 +}
  22 +.bg-pay3 {
  23 + width: 165px; height: 81px;
  24 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -10px -10px;
  25 +}
  26 +.bg-pay2 {
  27 + width: 165px; height: 81px;
  28 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -195px -10px;
  29 +}
  30 +.bg-pay {
  31 + width: 111px; height: 99px;
  32 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -10px -111px;
  33 +}
  34 +.bg-c2 {
  35 + width: 30px; height: 30px;
  36 + background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -10px -230px;
  37 +}
  38 +
  39 +.pay-image-view{
  40 + margin-top: 40rpx;
  41 +}
  42 +.pay-txt{
  43 + margin-top: 12rpx;
  44 + height:44rpx;
  45 + font-size:32rpx;
  46 + font-weight:500;
  47 + color:rgba(53,53,53,1);
  48 + line-height:44rpx;
  49 +}
  50 +.block{
  51 + background:rgba(250,250,250,1);
  52 + border-radius:10rpx;
  53 + width: calc(100% - 40rpx);
  54 + margin-top: 20rpx;
  55 +}
  56 +.block .title{
  57 + height: 116rpx;
  58 + line-height: 116rpx;
  59 + font-size:32rpx;
  60 + font-weight:500;
  61 + color:rgba(53,53,53,1);
  62 + padding: 0 20rpx;
  63 + box-sizing: border-box;
  64 +}
  65 +.orderRemark{
  66 + font-size:28rpx;
  67 + font-weight:500;
  68 + color:rgba(253,86,86,1);
  69 +}
  70 +.orderRemark-view{
  71 + width: calc(100% - 40rpx);
  72 + height:40rpx;
  73 + line-height:40rpx;
  74 + margin: 10rpx auto;
  75 + font-weight:500;
  76 +}
  77 +.block .center{
  78 + padding: 0 40rpx 36rpx;
  79 + background:rgba(255,255,255,1);
  80 + box-sizing: border-box;
  81 + position: relative;
  82 +}
  83 +.center .item{
  84 + padding-top: 24rpx;
  85 + font-size:28rpx;
  86 + font-weight:400;
  87 + color:rgba(112,112,112,1);
  88 +}
  89 +.item-label{
  90 + min-width: 150rpx;
  91 +}
  92 +.item-value{
  93 + font-weight:500;
  94 + color:rgba(53,53,53,1);
  95 + text-align: right;
  96 +}
  97 +.invoice .item-value{
  98 + font-size:28rpx;
  99 + font-family:PingFangSC-Regular,PingFang SC;
  100 + font-weight:400;
  101 + color:rgba(112,112,112,1);
  102 + line-height:40rpx;
  103 +}
  104 +.invoice .item-value.Medium{
  105 + font-family:PingFangSC-Medium,PingFang SC;
  106 + font-weight:500;
  107 + color:rgba(53,53,53,1);
  108 +}
  109 +.pay-tips-icon{
  110 + position: absolute;
  111 + top:calc(50% - 84rpx);
  112 + left:calc(50% - 111rpx);
  113 +}
  114 +.order_info-price{
  115 + font-size:32rpx;
  116 + font-weight:500;
  117 + color:rgba(53,53,53,1);
  118 +}
  119 +.order_info-bill_list{
  120 + font-size:24rpx;
  121 + font-weight:500;
  122 + color:rgba(36,164,168,1);
  123 + height:34rpx;
  124 + line-height: 34rpx;
  125 + border-bottom: 2rpx solid #24A4A8;
  126 +}
  127 +
  128 +.orderinput{
  129 + margin-top: 40rpx;
  130 +}
  131 +.orderinput .center{
  132 + padding-bottom: 0;
  133 +}
  134 +.orderinput .item{
  135 + font-size:32rpx;
  136 + font-weight:400;
  137 + height: 116rpx;
  138 + line-height: 116rpx;
  139 + box-sizing: border-box;
  140 + border-bottom: 2rpx solid rgba(238,238,238,1);
  141 + padding-top: 0;
  142 +}
  143 +.orderinput .auto-height,.userinfo .auto-height{
  144 + height: auto;
  145 +}
  146 +.orderinput .item:last-child{
  147 + border-bottom-width: 0;
  148 +}
  149 +.item-value-input{
  150 + text-align: right;
  151 + font-size:44rpx;
  152 + font-weight:500;
  153 + color:rgba(53,53,53,1);
  154 +}
  155 +.tabs-view{
  156 + font-size:32rpx;
  157 + font-weight:400;
  158 + color:rgba(53,53,53,1);
  159 + padding: 0 20rpx 36rpx;
  160 +}
  161 +.tabs-item{
  162 + line-height: 44rpx;
  163 +}
  164 +.userinfo .tabs-view{
  165 + font-size:28rpx;
  166 + font-family:PingFangSC-Medium,PingFang SC;
  167 + font-weight:500;
  168 + padding: 24rpx 20rpx 0;
  169 +}
  170 +.userinfo .tabs-item{
  171 + line-height:40rpx;
  172 +}
  173 +.hasPrice{
  174 + position: absolute;
  175 + top:0;
  176 + right:30rpx;
  177 + height: 44rpx;
  178 + line-height: 44rpx;
  179 +}
  180 +.orderimage .center{
  181 + padding: 40rpx 0 36rpx 56rpx;
  182 +}
@@ -653,6 +653,13 @@ @@ -653,6 +653,13 @@
653 "pathName": "pack-book/pages/checkout/index", 653 "pathName": "pack-book/pages/checkout/index",
654 "query": "rid=62202", 654 "query": "rid=62202",
655 "scene": null 655 "scene": null
  656 + },
  657 + {
  658 + "id": -1,
  659 + "name": "pack-book/pages/checkout/invoice",
  660 + "pathName": "pack-book/pages/checkout/invoice",
  661 + "query": "rid=62202",
  662 + "scene": null
656 } 663 }
657 ] 664 ]
658 } 665 }