| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- @extends('layouts.base')
- @section('content')
- @section('title', trans('酒店列表'))
- <link href="{{static_url('yunshop/css/member.css')}}" media="all" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/goods.css')}}"/>
- @if(config('app.framework') == 'platform')
- <script type="text/javascript" src="/static/resource/js/lib/jquery-ui-1.10.3.min.js"></script>
- @else
- <script type="text/javascript" src="/addons/yun_shop/static/resource/js/lib/jquery-ui-1.10.3.min.js"></script>
- @endif
- <div class='panel panel-default'>
- <div class='panel-heading'>
- 酒店管理
- </div>
- <div class='panel-body'>
- <form action="" method="post" class="form-horizontal" role="form" id="form1">
- <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-4">
- <label class="col-xs-12 col-sm-4 col-md-4 col-lg-2 control-label">酒店地址</label>
- <div class="">
- <input type="hidden" id="province_id" value="{{ $search['province_id']?:0 }}"/>
- <input type="hidden" id="city_id" value="{{ $search['city_id']?:0 }}"/>
- <input type="hidden" id="district_id" value="{{ $search['district_id']?:0 }}"/>
- <input type="hidden" id="street_id" value="{{ $search['street_id']?:0 }}"/>
- {!! app\common\helpers\AddressHelper::tplLinkedAddress(['search[province_id]','search[city_id]','search[district_id]','search[street_id]'], [])!!}
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
- {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">酒店ID</label>--}}
- <div class="">
- <input type="text" class="form-control" name="search[hotel_id]" value="{{$search['hotel_id']?$search['hotel_id']:''}}" placeholder="酒店ID"/>
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
- {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">酒店名称</label>--}}
- <div class="">
- <input type="text" class="form-control" name="search[hotel_name]" value="{{$search['hotel_name']?$search['hotel_name']:''}}" placeholder="酒店名称"/>
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
- {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">分类</label>--}}
- <div class="">
- <select name='search[category]' class='form-control'>
- <option value=''>分类不限</option>
- @foreach( $category as $item )
- <option value='{{ $item->id }}'>{{ $item->name }}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
- {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">管理员会员ID</label>--}}
- <div class="">
- <input type="text" class="form-control" name="search[member_id]" value="{{$search['member_id']?$search['member_id']:''}}" placeholder="管理员会员ID"/>
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
- {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">管理员昵称/姓名/手机号</label>--}}
- <div class="">
- <input type="text" class="form-control" name="search[member]" value="{{$search['member']?$search['member']:''}}" placeholder="管理员昵称/姓名/手机号"/>
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-7 col-lg-4">
- <div class="">
- <input type="hidden" id="route" name="route" value="plugin.hotel.admin.hotel.index"/>
- <button type="submit" class="btn btn-success "><i class="fa fa-search"></i> 搜索</button>
- <button type="button" name="export" value="1" id="export" class="btn btn-default excel back ">导出 Excel</button>
- </div>
- </div>
- </form>
- </div>
- <div class='panel-heading'>总数:{{$list->total()}}</div>
- <div class='panel-body' style="margin-bottom:120px">
- <table class="table table-hover" style="overflow:visible">
- <thead class="navbar-inner">
- <tr>
- <th style='width:4%;text-align: center;'>ID</th>
- <th style='width:10%;text-align: center;'>酒店名称</th>
- <th style='width:20%;text-align: center;'>酒店地址</th>
- <th style='width:10%;text-align: center;'>酒店电话</th>
- <th style='width:8%;text-align: center;'>管理员</th>
- <th style='width:10%;text-align: center;'>分类</th>
- <th style='width:8%;text-align: center;'>平台扣点</th>
- <th style='width:8%;text-align: center;'>完成订单金额<br>元</th>
- <th style='width:8%;text-align: center;'>已结算提成<br>元</th>
- <th style='width:8%;text-align: center;'>公众号收银台/主页</th>
- <th style='width:8%;text-align: center;'>小程序收银台/主页</th>
- {{-- <th style='width:6%;text-align: center;'>公众号主页</th>--}}
- {{-- <th style='width:6%;text-align: center;'>小程序主页</th>--}}
- <th style='width:8%;'>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $item)
- <tr style="height: 9em;">
- <td style='text-align: center;'>{{ $item->id }}</td>
- <td style='text-align: center;'>
- <img src='{{ yz_tomedia($item->thumb) }}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' alt="酒店图片"/>
- <br/>
- <a href="#">{{ $item->hotel_name }}</a>
- </td>
- <td style='text-align: center;'>{{ $item->province }}<br>{{ $item->address }}</td>
- <td style='text-align: center;'>{{ $item->mobile }}</td>
- <td style='text-align: center;'>
- <img src='{{ $item->hasOneMember->avatar_image }}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' alt="管理员头像"/>
- <br/>
- <a href="{{yzWebUrl('member.member.detail',['id' => $item->uid])}}">{{ $item->hasOneMember->nickname }}</a>
- </td>
- <td style='text-align: center;'>分类:{{ $item->hasOneCategory->name }}</td>
- <td style='text-align: center;'>{{ $item->hasOneSetting->value['shop_commission'] ?: '0' }}%</td>
- <td style='text-align: center;'>{{ $item->belongsToManyOrder->sum('price') ?: '0.00' }}</td>
- <td style='text-align: center;'>{{ $item->hasManyHotelOrder->sum('amount') ?: '0.00' }}</td>
- <td style="text-align: center;position:relative; overflow:visible;" width="20%">
- <a class="btn btn-sm btn-default umphp" title="酒店收银台二维码"
- data-url="
- @if($item->uid)
- {{yzAppFullUrl('hotel/cashier_pay/' . $item->id, ['mid'=>$item->uid])}}
- @endif"
- data-goodsid="{{$item->goods_id}}" href="{{$item->download_url}}" download>
- <div class="img">
- {!! QrCode::size(120)->generate(yzAppFullUrl('hotel/cashier_pay/'.$item['id'].'&mid='.$item['uid'])) !!}
- <!-- <img style="width: 120px;high:120px;" src="{{ $item->download_url }}"> -->
- </div>
- <i class="fa fa-qrcode"></i>
- </a><br>
- <a class="btn btn-sm btn-default umphp" title="酒店主页二维码"
- data-url="
- @if($item->uid)
- {{yzAppFullUrl('hotel/home_page/' . $item->id, ['mid'=>$item->uid])}}
- @endif"
- data-goodsid="{{$item->goods_id}}" href="{{$item->index_download_url}}" download>
- <div class="img">
- {!! QrCode::size(120)->generate(yzAppFullUrl('hotel/home_page/'.$item['id'].'&mid='.$item['uid'])) !!}
- </div>
- <i class="fa fa-qrcode"></i>
- </a>
- </td>
- <td style="text-align: center;position: relative;overflow: visible;">
- <a class="btn btn-sm btn-default umphp" title="小程序收银台二维码"
- data-url="
- @if($item->uid)
- {{$item->collect_money_url}}
- @endif"
- data-goodsid="{{$item->goods_id}}" @if($item->collect_money_url) href="{{$item->collect_money_url}}" @else disabled="true" @endif download>
- <div class="img">
- <img style="width: 120px;high:120px;" src="{{ $item->collect_money_url }}">
- </div>
- <i class="fa fa-qrcode"></i>
- </a><br>
- <a class="btn btn-sm btn-default umphp" title="酒店主页小程序码"
- data-url="
- @if($item->uid)
- {{$item->hotel_index_mini_url}}
- @endif"
- data-goodsid="{{$item->goods_id}}" @if($item->hotel_index_mini_url) href="{{$item->hotel_index_mini_url}}" @else disabled="true" @endif download>
- <div class="img">
- <img style="width: 120px;high:120px;" src="{{ $item->hotel_index_mini_url }}">
- </div>
- <i class="fa fa-qrcode"></i>
- </a>
- </td>
- <td style='overflow:visible;'>
- <div class="btn-group btn-group-sm">
- <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="javascript:;">操作 <span class="caret"></span></a>
- <ul class="dropdown-menu">
- <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel.edit',['hotel_id'=> $item->id])}}" title='编辑'><i class='fa fa-pencil'></i> 编辑</a></li>
- <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.index',['hotel_id'=> $item->id, 'user_uid' => $item->user_uid])}}" title='酒店设置'><i class='fa fa-pencil'></i> 酒店设置</a></li>
- @if($isEnabledDiyQueue)
- <li><a href="{{yzWebUrl('plugin.hotel.admin.diyQueue.hotel.index',['hotel_id'=> $item->id])}}" title='酒店队列设置'><i class='fa fa-pencil'></i> 酒店队列设置</a></li>
- <li>
- <a href="{{yzWebUrl('plugin.hotel.admin.diyQueue.cashier.index',['cashier_id'=> $item->cashier_id])}}" title='收银台队列设置'>
- <i class='fa fa-pencil'></i> 收银台队列设置
- </a>
- </li>
- @endif
- <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.generateCollectMoneyCode', ['hotel_id' => $item->id])}}" title='生成小程序收款码'><i class='fa fa-eraser'></i> 小程序收款码生成</a></li>
- <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.hotelIndexMiniUrl', ['hotel_id' => $item->id])}}" title='生成酒店主页小程序码'><i class='fa fa-eraser'></i> 首页小程序码生成</a></li>
- <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.edit-password', ['hotel_id' => $item->id])}}" title='修改密码'><i class='fa fa-eraser'></i> 修改密码</a></li>
- <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.black', ['hotel_id' => $item->id])}}" title='{{$item->black_obj['name']}}'><i class='{{$item->black_obj['style']}}'></i> {{$item->black_obj['name']}}</a></li>
- </ul>
- </div>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- {!!$pager!!}
- </div>
-
- <div class='panel-footer'>
- <a class='btn btn-info' href="{{ yzWebUrl('plugin.hotel.admin.hotel.add') }}"><i class='fa fa-plus'></i> 添加酒店</a>
- </div>
- </div>
- <script type="text/javascript" src="{{static_url('js/area/cascade_street.js')}}"></script>
- <script type="text/javascript">
- var province_id = $('#province_id').val();
- var city_id = $('#city_id').val();
- var district_id = $('#district_id').val();
- var street_id = $('#street_id').val();
- cascdeInit(province_id, city_id, district_id, street_id);
- </script>
- <script language='javascript'>
- // cascdeInit();
- $('.umphp').hover(function () {
- var url = $(this).attr('data-url');
- $(this).addClass("selected");
- },
- function () {
- $(this).removeClass("selected");
- }
- );
- $('.js-clip').each(function () {
- util.clip(this, $(this).attr('data-url'));
- });
- $(function () {
- $('#export').click(function(){
- $('#route').val("plugin.hotel.admin.hotel.export");
- $('#form1').submit();
- $('#route').val("plugin.hotel.admin.hotel.index");
- });
- });
- </script>
- @endsection
|