Commit 403e5e49ece770881fcc1af3c41119eb53935d3b

Authored by wangfan
1 parent 872d2dbd

状态调整

@@ -82,7 +82,12 @@ Component({ @@ -82,7 +82,12 @@ Component({
82 } 82 }
83 if(this.data.hasShowStatus){ 83 if(this.data.hasShowStatus){
84 let ns=new Date()/1000 84 let ns=new Date()/1000
85 - obj.showStatusStr=ns>this.data.detail.ddate?'已结束':'已预定'; 85 + obj.showStatusStr='已预定'
  86 + if(this.data.detail.status==4){
  87 + obj.showStatusStr='已取消'
  88 + }else if(this.data.detail.status>=2 || ns>this.data.detail.ddate){
  89 + obj.showStatusStr='已完成'
  90 + }
86 } 91 }
87 this.setData(obj) 92 this.setData(obj)
88 } 93 }
@@ -137,7 +137,11 @@ Page({ @@ -137,7 +137,11 @@ Page({
137 return $1+'**'+$3; 137 return $1+'**'+$3;
138 }) 138 })
139 } 139 }
  140 + if(res.data.status==4 && res.data.cancel){
  141 + res.data.cancel.cdateStr=util.unixtoTime(res.data.cancel.cdate,"YYYY.MM.DD HH:II")
  142 + }
140 this.detailData=res.data; 143 this.detailData=res.data;
  144 +
141 this.setData({ 145 this.setData({
142 tables:res.data.tables, 146 tables:res.data.tables,
143 bookInfo:res.data, 147 bookInfo:res.data,
@@ -55,16 +55,24 @@ @@ -55,16 +55,24 @@
55 <view class="gray-deep-font font30r">记录人</view> 55 <view class="gray-deep-font font30r">记录人</view>
56 <view class="black-font font34r">{{bookInfo.note_name}}</view> 56 <view class="black-font font34r">{{bookInfo.note_name}}</view>
57 </view> 57 </view>
58 - <view class="flex-lr order-detail" wx:if="{{bookInfo.status==4 && bookInfo.cancel}}"> 58 +</view>
  59 +<view class="order-info" wx:if="{{bookInfo.status==4 && bookInfo.cancel}}">
  60 + <view class="flex-lr order-detail">
59 <view class="gray-deep-font font30r">取消原因</view> 61 <view class="gray-deep-font font30r">取消原因</view>
60 - <view class="black-font font34r" style="width: 80%;">  
61 - <view class="flex-rr">{{bookInfo.cancel.desc}}</view>  
62 - <view class="flex-rr" wx:if="{{bookInfo.cancel.uname}}">{{bookInfo.cancel.uname}}</view> 62 + <view class="flex-lr black-font font34r">
  63 + {{bookInfo.cancel.desc}}
63 </view> 64 </view>
64 </view> 65 </view>
  66 + <view class="flex-lr order-detail">
  67 + <view class="gray-deep-font font30r">取消时间</view>
  68 + <view class="black-font font34r">{{bookInfo.cancel.cdateStr}}</view>
  69 + </view>
  70 + <view class="flex-lr order-detail">
  71 + <view class="gray-deep-font font30r">操作人</view>
  72 + <view class="black-font font34r">{{bookInfo.cancel.uname}}</view>
  73 + </view>
65 </view> 74 </view>
66 75
67 -  
68 <view style="height: 250rpx;"></view> 76 <view style="height: 250rpx;"></view>
69 77
70 <!--通知预订人--> 78 <!--通知预订人-->
@@ -73,7 +73,11 @@ Page({ @@ -73,7 +73,11 @@ Page({
73 // detail.cusman_account='wx:vking'; 73 // detail.cusman_account='wx:vking';
74 // } 74 // }
75 let ns=new Date()/1000 75 let ns=new Date()/1000
76 - detail.hasOvered=ns>detail.ddate 76 + detail.hasCancel=detail.status==4
  77 + detail.hasOvered=false
  78 + if(!detail.hasCancel){
  79 + detail.hasOvered=ns>detail.ddate || detail.status>=2
  80 + }
77 return detail; 81 return detail;
78 }, 82 },
79 showManager(){ 83 showManager(){
@@ -2,8 +2,17 @@ @@ -2,8 +2,17 @@
2 <nav hasHome>订座详情</nav> 2 <nav hasHome>订座详情</nav>
3 <view class="page"> 3 <view class="page">
4 <view class="flex-vc success"> 4 <view class="flex-vc success">
5 - <block wx:if="{{detail.hasOvered}}">  
6 - <view class="title Medium">已结束</view> 5 + <block wx:if="{{detail.hasCancel}}">
  6 + <view class="icon">
  7 + <icon type="info" size="47" color="#C9C9C9"/>
  8 + </view>
  9 + <view class="title Medium">订座已取消</view>
  10 + </block>
  11 + <block wx:elif="{{detail.hasOvered}}">
  12 + <view class="icon">
  13 + <icon type="success" size="47" color="#C8B16D"/>
  14 + </view>
  15 + <view class="title Medium">订座已完成</view>
7 </block> 16 </block>
8 <block wx:else=""> 17 <block wx:else="">
9 <view class="icon"> 18 <view class="icon">
@@ -13,17 +22,7 @@ @@ -13,17 +22,7 @@
13 <view class="info">分享订座信息给朋友,及时获知朋友们的反馈</view> 22 <view class="info">分享订座信息给朋友,及时获知朋友们的反馈</view>
14 </block> 23 </block>
15 </view> 24 </view>
16 - <view class="flex-lr share-view" wx:if="{{!detail.hasOvered}}">  
17 - <!--  
18 - <userinfo-share  
19 - binduserinfo="userinfo"  
20 - bindshare="share"  
21 - share="{{detail}}"  
22 - share-act=""  
23 - class="share-but-view">  
24 - <view class="share-but Regular">邀请朋友</view>  
25 - </userinfo-share>  
26 - --> 25 + <view class="flex-lr share-view" wx:if="{{!detail.hasOvered && !detail.hasCancel}}">
27 <userinfo-share 26 <userinfo-share
28 binduserinfo="userinfo" 27 binduserinfo="userinfo"
29 bindshare="share" 28 bindshare="share"
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 <card hasListShare 51 <card hasListShare
52 seller="{{detail.seller}}" detail="{{detail}}"> 52 seller="{{detail.seller}}" detail="{{detail}}">
53 <view slot="listshare"> 53 <view slot="listshare">
54 - <userinfo 54 + <userinfo wx:if="{{detail.status}}"
55 id="userinfo-share-{{detail.id}}" 55 id="userinfo-share-{{detail.id}}"
56 data-id="{{detail.id}}" 56 data-id="{{detail.id}}"
57 binduserinfo="accept"> 57 binduserinfo="accept">