desklist.wxml 3.18 KB
<view class="desk-block flex-vc {{item.status=='' || item.status==0 || item.status==1 ? 'green-light-bg border-light-green' : 'green-deep-bg border-green'}} {{item.status=='disabled'?'disabled':''}}"
      data-id="{{item.id}}" data-status="{{item.status}}"
      bindtap="{{item.status=='disabled'?'':'selectdesk'}}">
    <block wx:if="{{item.tid && (item.tid!=1 && item.tid!=0)}}">
        <view class="white-font font24r smooth desk-type flex-cc">
            <block wx:if="{{item.tid==2}}">包间</block>
            <block wx:if="{{item.tid==3}}">卡座</block>
        </view>
    </block>
    <block wx:if="{{item.status=='disabled'}}">
        <view class="font38r smooth black-font font-bold flex-cc" style="width:100%;padding:0 16rpx;box-sizing:border-box;padding-top:10rpx;height:42rpx;">{{item.name}}</view>
        <view class="font34r smooth black-font desk-pnum">{{item.most_pnum && item.table_pnum < item.most_pnum ? item.table_pnum+'-'+item.most_pnum : item.table_pnum}}人</view>
        <block wx:if="{{item.enable==0}}">
            <view class="flex-cc font-more white-font font34r desk-enable">未启用</view>
        </block>
    </block>
    <block wx:elif="{{(item.status=='' || item.status==0 || item.status==1)}}">
        <view class="font38r smooth black-font font-bold flex-cc" style="width:100%;padding:0 16rpx;box-sizing:border-box;padding-top:10rpx;height:42rpx;">{{item.name}}</view>
        <view class="font34r smooth black-font desk-pnum">{{item.most_pnum && item.table_pnum < item.most_pnum ? item.table_pnum+'-'+item.most_pnum : item.table_pnum}}人</view>
        <block wx:if="{{typepage=='cdesk'}}">
            <view class="black-circle white-font font24r smooth flex-cc" style="border:1px solid #199095;background:{{item.isselect==false ? 'transparent' : '#199095'}};">
                 <image src="/pages/image/{{item.isselect==false ? 'select-right.svg' : 'select-right-active.svg'}}" style="width:26rpx;height:26rpx;"></image>
             </view>
         </block>
        <block wx:if="{{item.enable==0}}">
            <view class="flex-cc font-more white-font font34r desk-enable">未启用</view>
        </block>
    </block>
    <block wx:else>
        <view class="table-info flex-vc">
            <view class="font38r smooth black-font font-bold flex-ll" style="width:100%;padding:0 16rpx;box-sizing:border-box;text-align:left;height:42rpx;">{{item.name}}</view>
            <view class="flex-lr desk-other-info">
                <view class="font34r smooth black-font">
                <block wx:if="{{item.spell==1}}">{{item.orderCout}}单</block>
                <block wx:else>{{item.pnum}}人</block>
                </view>
                <block wx:if="{{item.spell!=1}}">
                    <view class="flex-ll">
                        <image src="/pages/image/clock.png" class="clock-time"></image>
                        <view class="gray-font font28r">{{item.dur}}</view>
                    </view>
                </block>
            </view>
        </view>
        <view class="desk-order-status white-font font34r smooth flex-cc">
            <block wx:if="{{item.spell==1}}">拼桌中</block>
            <block wx:else>{{item.status}}</block>
        </view>
    </block>
</view>