Commit b8da979aa33930d8a4adc3c7febd8a71a116136b

Authored by liuxuqinfhp1220
1 parent 9373c6cf

no message

@@ -69,38 +69,43 @@ Component({ @@ -69,38 +69,43 @@ Component({
69 let _target=e.currentTarget.dataset; 69 let _target=e.currentTarget.dataset;
70 console.log(typeof _target.selectnum,this.data.usecondition) 70 console.log(typeof _target.selectnum,this.data.usecondition)
71 if(this.data.usecondition=='custom'){ 71 if(this.data.usecondition=='custom'){
72 - if((this.data.seletroomlist && this.data.seletroomlist.length<3) || !this.data.seletroomlist){  
73 - let setkey='roomlist['+_target.index+'].selectnum';  
74 - this.setData({  
75 - [setkey]:_target.selectnum+1  
76 - })  
77 - let obj={  
78 - id:_target.id,  
79 - name:this.data.roomlist[_target.index].name  
80 - }  
81 - this.triggerEvent('selectroom',obj) 72 + console.log(this.data.roomlist[_target.index].isorderFull,this.data.roomlist[_target.index].isFull)
  73 + if(this.data.roomlist[_target.index].isorderFull==1 || this.data.roomlist[_target.index].isFull==1){
82 }else{ 74 }else{
83 - util.toast('最多可选3个包间','none'); 75 + if((this.data.seletroomlist && this.data.seletroomlist.length<3) || !this.data.seletroomlist){
  76 + let setkey='roomlist['+_target.index+'].selectnum';
  77 + this.setData({
  78 + [setkey]:_target.selectnum+1
  79 + })
  80 + let obj={
  81 + id:_target.id,
  82 + name:this.data.roomlist[_target.index].name
  83 + }
  84 + this.triggerEvent('selectroom',obj)
  85 + }else{
  86 + util.toast('最多可选3个包间','none');
  87 + }
84 } 88 }
85 -  
86 }else{ 89 }else{
87 ////// 90 //////
88 console.log('置满') 91 console.log('置满')
89 - let parmdata={  
90 - classid:_target.id,  
91 - day:util.timetouUnix(this.data.date+' 00:00:00'),  
92 - interval:dur.indexOf(this.data.section)+1  
93 - }  
94 - if(_target.fid){  
95 - parmdata.id=_target.fid;  
96 - }  
97 - App.Seller.SetTableClassFull(parmdata).then((json)=>{  
98 - console.log(json)  
99 - if(json.ret==200){  
100 - this.triggerEvent('changeroom',{id:_target.id,action:parmdata.id ? 'cancel' : 'confirm'})  
101 - this.getroomtype(); 92 + if(!this.data.roomlist[_target.index].isorderFull){
  93 + let parmdata={
  94 + classid:_target.id,
  95 + day:util.timetouUnix(this.data.date+' 00:00:00'),
  96 + interval:dur.indexOf(this.data.section)+1
102 } 97 }
103 - }) 98 + if(_target.fid){
  99 + parmdata.id=_target.fid;
  100 + }
  101 + App.Seller.SetTableClassFull(parmdata).then((json)=>{
  102 + console.log(json)
  103 + if(json.ret==200){
  104 + this.triggerEvent('changeroom',{id:_target.id,action:parmdata.id ? 'cancel' : 'confirm'})
  105 + this.getroomtype();
  106 + }
  107 + })
  108 + }
104 } 109 }
105 }, 110 },
106 cancelroom(id){ 111 cancelroom(id){
1 <view class="room-list flex-rs"> 1 <view class="room-list flex-rs">
2 <block wx:for="{{roomlist}}" wx:key="{{index}}"> 2 <block wx:for="{{roomlist}}" wx:key="{{index}}">
3 <block wx:if="{{item.status==1}}"> 3 <block wx:if="{{item.status==1}}">
4 - <view class="room-item black-font {{(item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1) ? 'border-gray bg-gray' : 'border-yellow bg-yellow'}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum ? item.selectnum : 0}}" data-fid="{{item.fid ? item.fid : null}}" catchtap="{{usecondition=='seller' ? (item.isorderFull && item.isorderFull==1 ? '' : 'selectroom') : ((item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1) ? '' : 'selectroom')}}"> 4 + <view class="room-item black-font {{(item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1) ? 'border-gray bg-gray' : 'border-yellow bg-yellow'}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum ? item.selectnum : 0}}" data-fid="{{item.fid ? item.fid : null}}" catchtap="selectroom">
5 <view class="font30r font-bold" style="width:100%;padding-right:62rpx;box-sizing:border-box; block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item.name}}</view> 5 <view class="font30r font-bold" style="width:100%;padding-right:62rpx;box-sizing:border-box; block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item.name}}</view>
6 <block wx:if="{{item.max && item.max!=0}}"> 6 <block wx:if="{{item.max && item.max!=0}}">
7 <view class="font24r room-more">最多可坐{{item.max}}人</view> 7 <view class="font24r room-more">最多可坐{{item.max}}人</view>
@@ -138,7 +138,8 @@ Component({ @@ -138,7 +138,8 @@ Component({
138 this.triggerEvent('selectdate',{date:_target.date,action:'click'}); 138 this.triggerEvent('selectdate',{date:_target.date,action:'click'});
139 this.setData({ 139 this.setData({
140 date:_target.date, 140 date:_target.date,
141 - showYearMonth:this.getshowmonth(_target.date) 141 + showYearMonth:this.getshowmonth(_target.date),
  142 + hidecalendar:true
142 }) 143 })
143 if(_target.date in this.datelist){ 144 if(_target.date in this.datelist){
144 this.changedatestyle(_target.date) 145 this.changedatestyle(_target.date)
@@ -72,11 +72,13 @@ Page({ @@ -72,11 +72,13 @@ Page({
72 ...this.user 72 ...this.user
73 }).then(res=>{ 73 }).then(res=>{
74 if(res.ret==200){ 74 if(res.ret==200){
75 - App.Customer.GetCustomerInfo({},'clear')  
76 - }else{  
77 - return util.toast(res.msg,'none') 75 + if(re.data==-1){
  76 + return util.toast('手机号已存在',none')
  77 + }else{
  78 + App.Customer.GetCustomerInfo({},'clear')
  79 + }
78 } 80 }
79 - wx.navigateBack() 81 + wx.navigateBack()
80 }) 82 })
81 }, 83 },
82 changeInput(e) { 84 changeInput(e) {
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 "id": 0, 55 "id": 0,
56 "name": "预订本-商家1", 56 "name": "预订本-商家1",
57 "pathName": "pack-book/pages/book/b_index", 57 "pathName": "pack-book/pages/book/b_index",
58 - "query": "seller_id=1007&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500", 58 + "query": "seller_id=1009&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
59 "scene": 1001 59 "scene": 1001
60 }, 60 },
61 { 61 {