Commit 4d7ba3e9884b978d15ef36d304bd555ee488f9c7
Merge branch 'master' of http://123.56.79.57/xt/xcx-book
# By vking # Via vking * 'master' of http://123.56.79.57/xt/xcx-book: online
Showing
5 changed files
with
20 additions
and
12 deletions
| 1 | // components/seller-card/seller-card.js | 1 | // components/seller-card/seller-card.js |
| 2 | import util from '../../utils/util'; | 2 | import util from '../../utils/util'; |
| 3 | +import RS from '../../utils/reserveStatus' | ||
| 3 | 4 | ||
| 4 | Component({ | 5 | Component({ |
| 5 | options: { | 6 | options: { |
| @@ -91,12 +92,14 @@ Component({ | @@ -91,12 +92,14 @@ Component({ | ||
| 91 | } | 92 | } |
| 92 | if (this.data.hasShowStatus) { | 93 | if (this.data.hasShowStatus) { |
| 93 | let ns = new Date() / 1000 | 94 | let ns = new Date() / 1000 |
| 94 | - obj.showStatusStr = '已预订' | 95 | + obj.showStatusStr = RS.reserve(obj).getStatusStr; |
| 96 | + /* | ||
| 95 | if (this.data.detail.status == 4) { | 97 | if (this.data.detail.status == 4) { |
| 96 | obj.showStatusStr = '已取消' | 98 | obj.showStatusStr = '已取消' |
| 97 | } else if (this.data.detail.status >= 2 || ns > this.data.detail.ddate) { | 99 | } else if (this.data.detail.status >= 2 || ns > this.data.detail.ddate) { |
| 98 | obj.showStatusStr = '已完成' | 100 | obj.showStatusStr = '已完成' |
| 99 | } | 101 | } |
| 102 | + */ | ||
| 100 | } | 103 | } |
| 101 | this.setData(obj) | 104 | this.setData(obj) |
| 102 | } | 105 | } |
| 1 | // pages/customer/detail_owner.js | 1 | // pages/customer/detail_owner.js |
| 2 | import util from '../../utils/util'; | 2 | import util from '../../utils/util'; |
| 3 | import App from '../../utils/api'; | 3 | import App from '../../utils/api'; |
| 4 | -import RS from './reserveStatus'; | 4 | +import RS from '../../utils/reserveStatus'; |
| 5 | 5 | ||
| 6 | const {regeneratorRuntime} = global | 6 | const {regeneratorRuntime} = global |
| 7 | import TP from '../../utils/tpls'; | 7 | import TP from '../../utils/tpls'; |
| @@ -149,4 +149,7 @@ Page({ | @@ -149,4 +149,7 @@ Page({ | ||
| 149 | }) | 149 | }) |
| 150 | return util.timetouUnix(ddate[0]+' '+rd[0]+':00')+'-'+util.timetouUnix(ddate[0]+' '+rd[1]+':00') | 150 | return util.timetouUnix(ddate[0]+' '+rd[0]+':00')+'-'+util.timetouUnix(ddate[0]+' '+rd[1]+':00') |
| 151 | }, | 151 | }, |
| 152 | + editorReserve(){ | ||
| 153 | + wx.navigateBack() | ||
| 154 | + }, | ||
| 152 | }) | 155 | }) |
| @@ -6,9 +6,7 @@ | @@ -6,9 +6,7 @@ | ||
| 6 | <view slot="opt" class="back flex-rr"> | 6 | <view slot="opt" class="back flex-rr"> |
| 7 | <formids | 7 | <formids |
| 8 | id="userinfo-share-{{detail.id}}" | 8 | id="userinfo-share-{{detail.id}}" |
| 9 | - binduserinfo="userinfo" | ||
| 10 | - bindshare="share" | ||
| 11 | - share="{{detail}}"> | 9 | + bindclick="editorReserve"> |
| 12 | <view class="opt-button">修改</view> | 10 | <view class="opt-button">修改</view> |
| 13 | </formids> | 11 | </formids> |
| 14 | </view> | 12 | </view> |
| 1 | //0:待确认1:已定座2:确认到店(到店)3:用餐完成(离店)4:取消预定 5:C端在线预定(分配包间)6:拒单 | 1 | //0:待确认1:已定座2:确认到店(到店)3:用餐完成(离店)4:取消预定 5:C端在线预定(分配包间)6:拒单 |
| 2 | const status=[ | 2 | const status=[ |
| 3 | - '待确认',//0 | ||
| 4 | - '已定座',//1 | ||
| 5 | - '确认到店(到店)',//2 | ||
| 6 | - '用餐完成(离店)',//3 | ||
| 7 | - '取消预定',//4 | ||
| 8 | - 'C端在线预定(分配包间)',//5 | ||
| 9 | - '拒单'//6 | 3 | + '待确认',//0:待确认 |
| 4 | + '已预订',//1:已定座 | ||
| 5 | + '已完成',//2:确认到店(到店) | ||
| 6 | + '已完成',//3:用餐完成(离店) | ||
| 7 | + '已取消',//4:取消预定 | ||
| 8 | + '已预订',//5:C端在线预定(分配包间) | ||
| 9 | + '已拒绝'//6:拒单 | ||
| 10 | ]; | 10 | ]; |
| 11 | export default { | 11 | export default { |
| 12 | reserve(detail){ | 12 | reserve(detail){ |
| @@ -21,6 +21,10 @@ export default { | @@ -21,6 +21,10 @@ export default { | ||
| 21 | }else{//C端 | 21 | }else{//C端 |
| 22 | detail.hasRunning = !detail.hasOvered && !detail.hasCancel && detail.status==5 | 22 | detail.hasRunning = !detail.hasOvered && !detail.hasCancel && detail.status==5 |
| 23 | } | 23 | } |
| 24 | + detail.getStatusStr=''; | ||
| 25 | + if(detail.status>=0){ | ||
| 26 | + detail.getStatusStr=status[detail.status]; | ||
| 27 | + } | ||
| 24 | return detail; | 28 | return detail; |
| 25 | }, | 29 | }, |
| 26 | } | 30 | } |
-
Please register or login to post a comment