Showing
1 changed file
with
24 additions
and
10 deletions
| @@ -178,8 +178,12 @@ Page({ | @@ -178,8 +178,12 @@ Page({ | ||
| 178 | }) | 178 | }) |
| 179 | }, | 179 | }, |
| 180 | gotoModify() { | 180 | gotoModify() { |
| 181 | + let url='./b_addnew' | ||
| 182 | + if(this.detailData.type==1){ | ||
| 183 | + url='./online_update' | ||
| 184 | + } | ||
| 181 | wx.redirectTo({ | 185 | wx.redirectTo({ |
| 182 | - url: './b_addnew?id=' + this.data.bookInfo.id | 186 | + url: url+'?id=' + this.data.bookInfo.id |
| 183 | }) | 187 | }) |
| 184 | }, | 188 | }, |
| 185 | cancelReserve() { | 189 | cancelReserve() { |
| @@ -195,13 +199,23 @@ Page({ | @@ -195,13 +199,23 @@ Page({ | ||
| 195 | }) | 199 | }) |
| 196 | }, | 200 | }, |
| 197 | async startDinner(e) { | 201 | async startDinner(e) { |
| 198 | - App.Reserve.SetReserveStatus({ | ||
| 199 | - rid: this.data.bookInfo.id, | ||
| 200 | - status: util.attr(e, 'status'), | ||
| 201 | - cause: await this.getCause(), | ||
| 202 | - }).then(() => { | ||
| 203 | - this.getDetail(this.data.bookInfo.id, true); | ||
| 204 | - }); | 202 | + if(this.detailData.type==1){ |
| 203 | + App.Customer.SetReserveStatus({ | ||
| 204 | + rid: this.data.bookInfo.id, | ||
| 205 | + status: util.attr(e, 'status'), | ||
| 206 | + cause: await this.getCause(), | ||
| 207 | + }).then(() => { | ||
| 208 | + this.getDetail(this.data.bookInfo.id, true); | ||
| 209 | + }); | ||
| 210 | + }else{ | ||
| 211 | + App.Reserve.SetReserveStatus({ | ||
| 212 | + rid: this.data.bookInfo.id, | ||
| 213 | + status: util.attr(e, 'status'), | ||
| 214 | + cause: await this.getCause(), | ||
| 215 | + }).then(() => { | ||
| 216 | + this.getDetail(this.data.bookInfo.id, true); | ||
| 217 | + }); | ||
| 218 | + } | ||
| 205 | }, | 219 | }, |
| 206 | showOrder() { | 220 | showOrder() { |
| 207 | wx.navigateTo({ | 221 | wx.navigateTo({ |
| @@ -229,7 +243,7 @@ Page({ | @@ -229,7 +243,7 @@ Page({ | ||
| 229 | status:6, | 243 | status:6, |
| 230 | cause:await this.getCause('拒绝订单'), | 244 | cause:await this.getCause('拒绝订单'), |
| 231 | } | 245 | } |
| 232 | - App.Reserve.SetReserveStatus(params).then(()=>{ | 246 | + App.Customer.SetReserveStatus(params).then(()=>{ |
| 233 | this.getDetail(this.data.bookInfo.id,true); | 247 | this.getDetail(this.data.bookInfo.id,true); |
| 234 | PubSub.emit('fulshReseveList') | 248 | PubSub.emit('fulshReseveList') |
| 235 | }) | 249 | }) |
| @@ -262,7 +276,7 @@ Page({ | @@ -262,7 +276,7 @@ Page({ | ||
| 262 | cause:await this.getCause('安排包间'), | 276 | cause:await this.getCause('安排包间'), |
| 263 | tid:res.tableid.toString() | 277 | tid:res.tableid.toString() |
| 264 | } | 278 | } |
| 265 | - App.Reserve.SetReserveStatus(params).then(()=>{ | 279 | + App.Customer.SetReserveStatus(params).then(()=>{ |
| 266 | this.getDetail(this.data.bookInfo.id,true); | 280 | this.getDetail(this.data.bookInfo.id,true); |
| 267 | PubSub.emit('fulshReseveList') | 281 | PubSub.emit('fulshReseveList') |
| 268 | }) | 282 | }) |
-
Please register or login to post a comment