Commit 117e80c4f486ea16c2250e35ed66a20f494d9216

Authored by vking
1 parent cf77e9fa

拒绝订单

@@ -291,31 +291,31 @@ Page({ @@ -291,31 +291,31 @@ Page({
291 }); 291 });
292 }, 292 },
293 refuseOrder(){ 293 refuseOrder(){
294 - wx.showModal({  
295 - title: '您确定要拒绝这个订单吗?',  
296 - content: '如果该类型包间已订满,请及时停用包间', 294 + this.selectComponent("#showModal").options({
  295 + header: '您确定要拒绝这个订单吗?',
  296 + body: '如果该类型包间已订满,请及时停用包间',
297 showCancel:true, 297 showCancel:true,
298 cancelText:'拒绝订单', 298 cancelText:'拒绝订单',
299 cancelColor:'', 299 cancelColor:'',
300 confirmText:'去安排', 300 confirmText:'去安排',
301 confirmColor:'', 301 confirmColor:'',
302 - success:(async (res)=>{  
303 - console.info(res)  
304 - if(res.cancel){  
305 - let params={  
306 - rid:this.data.bookInfo.id,  
307 - status:6,  
308 - cause:await this.getCause('拒绝订单'),  
309 - }  
310 - App.Customer.SetReserveStatus(params).then(()=>{  
311 - this.getDetail(this.data.bookInfo.id,true);  
312 - PubSub.emit('fulshReseveList')  
313 - })  
314 - }else{//分配  
315 - this.arrangeOrder() 302 + }).show()
  303 + },
  304 + async showModalEvent(e){
  305 + if(e.detail.type=="confirm"){
  306 + return this.arrangeOrder()
  307 + }
  308 + if(e.detail.type=="cancel"){
  309 + let params={
  310 + rid:this.data.bookInfo.id,
  311 + status:6,
  312 + cause:await this.getCause('拒绝订单'),
316 } 313 }
  314 + App.Customer.SetReserveStatus(params).then(()=>{
  315 + this.getDetail(this.data.bookInfo.id,true);
  316 + PubSub.emit('fulshReseveList')
317 }) 317 })
318 - }) 318 + }
319 }, 319 },
320 arrangeOrder(){ 320 arrangeOrder(){
321 let bi=this.data.bookInfo 321 let bi=this.data.bookInfo
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 "cancel":"../../components/book/reserveCancel/cancel", 9 "cancel":"../../components/book/reserveCancel/cancel",
10 "nav":"/components/nav/nav", 10 "nav":"/components/nav/nav",
11 "a2l":"/components/tips/add-to-lite", 11 "a2l":"/components/tips/add-to-lite",
12 - "formids":"/components/formids/formids" 12 + "formids":"/components/formids/formids",
  13 + "showModal":"/components/showModal/showModal"
13 } 14 }
14 } 15 }
@@ -230,4 +230,5 @@ @@ -230,4 +230,5 @@
230 <action-sheet-cancel >取消</action-sheet-cancel> 230 <action-sheet-cancel >取消</action-sheet-cancel>
231 231
232 </action-sheet> 232 </action-sheet>
233 -<cancel id="cancel" bindreserveCancel="reserveCancel" bookInfo="{{bookInfo}}"></cancel>  
  233 +<cancel id="cancel" bindreserveCancel="reserveCancel" bookInfo="{{bookInfo}}"></cancel>
  234 +<showModal id="showModal" bindshowModal="showModalEvent"></showModal>
@@ -502,7 +502,7 @@ @@ -502,7 +502,7 @@
502 "id": 59, 502 "id": 59,
503 "name": "pack-book/pages/book/b_detail", 503 "name": "pack-book/pages/book/b_detail",
504 "pathName": "pack-book/pages/book/b_detail", 504 "pathName": "pack-book/pages/book/b_detail",
505 - "query": "id=76917", 505 + "query": "id=80865",
506 "scene": null 506 "scene": null
507 }, 507 },
508 { 508 {