Commit 1f9256d27a975f185de3014915a0562a4409d69b

Authored by vking
1 parent 16156c6d

迁移到New接口,使用ddate_solt

... ... @@ -7,6 +7,10 @@ Component({
type:String,
value:"",
},
reserveId:{
type:String,
value:"",
},
hasPubSub:{
type:Boolean,
value:false
... ... @@ -20,10 +24,16 @@ Component({
var list = this.data.list;
if(this.data.hasPubSub){
let checkedTids=this.data.checkedTids.split(',');
list.forEach(function (v, i) {
list.forEach( (v, i)=>{
if (v.id == tebleid) {
console.log('click.board',v);
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
if(this.data.reserveId){
if(v.reserve_id!=this.data.reserveId){
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
}
}else{
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
}
if (v.isselect == true) {
var thisindex = tables.indexOf(tebleid);
tables.splice(thisindex, 1)
... ... @@ -37,10 +47,16 @@ Component({
var pages = getCurrentPages();
var addnewPage=pages[pages.length - 2];
let checkedTids=this.data.checkedTids.split(',');
list.forEach(function (v, i) {
list.forEach( (v, i) =>{
if (v.id == tebleid) {
console.log('click.board',v);
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
if(this.data.reserveId){
if(v.reserve_id!=this.data.reserveId) {
if (v.status_str && checkedTids._indexOf(v.id) < 0) return util.toast('不能预订该桌位', 'none');
}
}else{
if (v.status_str && checkedTids._indexOf(v.id) < 0) return util.toast('不能预订该桌位', 'none');
}
if (v.isselect == true) {
var thisindex = tables.indexOf(tebleid);
tables.splice(thisindex, 1)
... ...
... ... @@ -14,9 +14,9 @@
width:100%;
line-height:1.2;
}
.reserve-status-4,.reserve-status-3{
.reserve-status-4,.reserve-status-3,.reserve-status-6{
color:#999999;
}
.reserve-status-4 .green-font,.reserve-status-3 .green-font{
.reserve-status-4 .green-font,.reserve-status-3 .green-font,.reserve-status-6 .green-font{
color:#999999;
}
\ No newline at end of file
... ...
... ... @@ -12,6 +12,7 @@ Page({
sellerid:'',
options:null,
onLoad: function (opt) {
//rdate=1574910000-1574924400&tid=0&pnum=6&checked_tids=&rid=44038&ddate_solt=2
console.log('onLoad', opt)
wx.removeStorageSync('tableid')
this.options=opt;
... ...
... ... @@ -12,6 +12,7 @@
<view style="height: {{height-80}}px;overflow-y: auto;padding-bottom: 160rpx;overflow-x: hidden;width: 100%;">
<block wx:for="{{desklist}}" wx:key="desklist.key">
<orderDesk list="{{item.list}}" checkedTids="{{opt.checked_tids}}"
reserveId="{{opt.rid}}"
bind:changedesk="changedesk" hasPubSub="{{hasPubSub}}"
wx:if="{{item.name==menu_active_id}}"></orderDesk>
</block>
... ...