hotel_list.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. @extends('layouts.base')
  2. @section('content')
  3. @section('title', trans('酒店列表'))
  4. <link href="{{static_url('yunshop/css/member.css')}}" media="all" rel="stylesheet" type="text/css"/>
  5. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/goods.css')}}"/>
  6. @if(config('app.framework') == 'platform')
  7. <script type="text/javascript" src="/static/resource/js/lib/jquery-ui-1.10.3.min.js"></script>
  8. @else
  9. <script type="text/javascript" src="/addons/yun_shop/static/resource/js/lib/jquery-ui-1.10.3.min.js"></script>
  10. @endif
  11. <div class='panel panel-default'>
  12. <div class='panel-heading'>
  13. 酒店管理
  14. </div>
  15. <div class='panel-body'>
  16. <form action="" method="post" class="form-horizontal" role="form" id="form1">
  17. <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-4">
  18. <label class="col-xs-12 col-sm-4 col-md-4 col-lg-2 control-label">酒店地址</label>
  19. <div class="">
  20. <input type="hidden" id="province_id" value="{{ $search['province_id']?:0 }}"/>
  21. <input type="hidden" id="city_id" value="{{ $search['city_id']?:0 }}"/>
  22. <input type="hidden" id="district_id" value="{{ $search['district_id']?:0 }}"/>
  23. <input type="hidden" id="street_id" value="{{ $search['street_id']?:0 }}"/>
  24. {!! app\common\helpers\AddressHelper::tplLinkedAddress(['search[province_id]','search[city_id]','search[district_id]','search[street_id]'], [])!!}
  25. </div>
  26. </div>
  27. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  28. {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">酒店ID</label>--}}
  29. <div class="">
  30. <input type="text" class="form-control" name="search[hotel_id]" value="{{$search['hotel_id']?$search['hotel_id']:''}}" placeholder="酒店ID"/>
  31. </div>
  32. </div>
  33. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  34. {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">酒店名称</label>--}}
  35. <div class="">
  36. <input type="text" class="form-control" name="search[hotel_name]" value="{{$search['hotel_name']?$search['hotel_name']:''}}" placeholder="酒店名称"/>
  37. </div>
  38. </div>
  39. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  40. {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">分类</label>--}}
  41. <div class="">
  42. <select name='search[category]' class='form-control'>
  43. <option value=''>分类不限</option>
  44. @foreach( $category as $item )
  45. <option value='{{ $item->id }}'>{{ $item->name }}</option>
  46. @endforeach
  47. </select>
  48. </div>
  49. </div>
  50. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  51. {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">管理员会员ID</label>--}}
  52. <div class="">
  53. <input type="text" class="form-control" name="search[member_id]" value="{{$search['member_id']?$search['member_id']:''}}" placeholder="管理员会员ID"/>
  54. </div>
  55. </div>
  56. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  57. {{--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">管理员昵称/姓名/手机号</label>--}}
  58. <div class="">
  59. <input type="text" class="form-control" name="search[member]" value="{{$search['member']?$search['member']:''}}" placeholder="管理员昵称/姓名/手机号"/>
  60. </div>
  61. </div>
  62. <div class="form-group col-xs-12 col-sm-7 col-lg-4">
  63. <div class="">
  64. <input type="hidden" id="route" name="route" value="plugin.hotel.admin.hotel.index"/>
  65. <button type="submit" class="btn btn-success "><i class="fa fa-search"></i> 搜索</button>
  66. <button type="button" name="export" value="1" id="export" class="btn btn-default excel back ">导出 Excel</button>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. <div class='panel-heading'>总数:{{$list->total()}}</div>
  72. <div class='panel-body' style="margin-bottom:120px">
  73. <table class="table table-hover" style="overflow:visible">
  74. <thead class="navbar-inner">
  75. <tr>
  76. <th style='width:4%;text-align: center;'>ID</th>
  77. <th style='width:10%;text-align: center;'>酒店名称</th>
  78. <th style='width:20%;text-align: center;'>酒店地址</th>
  79. <th style='width:10%;text-align: center;'>酒店电话</th>
  80. <th style='width:8%;text-align: center;'>管理员</th>
  81. <th style='width:10%;text-align: center;'>分类</th>
  82. <th style='width:8%;text-align: center;'>平台扣点</th>
  83. <th style='width:8%;text-align: center;'>完成订单金额<br>元</th>
  84. <th style='width:8%;text-align: center;'>已结算提成<br>元</th>
  85. <th style='width:8%;text-align: center;'>公众号收银台/主页</th>
  86. <th style='width:8%;text-align: center;'>小程序收银台/主页</th>
  87. {{-- <th style='width:6%;text-align: center;'>公众号主页</th>--}}
  88. {{-- <th style='width:6%;text-align: center;'>小程序主页</th>--}}
  89. <th style='width:8%;'>操作</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. @foreach($list as $item)
  94. <tr style="height: 9em;">
  95. <td style='text-align: center;'>{{ $item->id }}</td>
  96. <td style='text-align: center;'>
  97. <img src='{{ yz_tomedia($item->thumb) }}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' alt="酒店图片"/>
  98. <br/>
  99. <a href="#">{{ $item->hotel_name }}</a>
  100. </td>
  101. <td style='text-align: center;'>{{ $item->province }}<br>{{ $item->address }}</td>
  102. <td style='text-align: center;'>{{ $item->mobile }}</td>
  103. <td style='text-align: center;'>
  104. <img src='{{ $item->hasOneMember->avatar_image }}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' alt="管理员头像"/>
  105. <br/>
  106. <a href="{{yzWebUrl('member.member.detail',['id' => $item->uid])}}">{{ $item->hasOneMember->nickname }}</a>
  107. </td>
  108. <td style='text-align: center;'>分类:{{ $item->hasOneCategory->name }}</td>
  109. <td style='text-align: center;'>{{ $item->hasOneSetting->value['shop_commission'] ?: '0' }}%</td>
  110. <td style='text-align: center;'>{{ $item->belongsToManyOrder->sum('price') ?: '0.00' }}</td>
  111. <td style='text-align: center;'>{{ $item->hasManyHotelOrder->sum('amount') ?: '0.00' }}</td>
  112. <td style="text-align: center;position:relative; overflow:visible;" width="20%">
  113. <a class="btn btn-sm btn-default umphp" title="酒店收银台二维码"
  114. data-url="
  115. @if($item->uid)
  116. {{yzAppFullUrl('hotel/cashier_pay/' . $item->id, ['mid'=>$item->uid])}}
  117. @endif"
  118. data-goodsid="{{$item->goods_id}}" href="{{$item->download_url}}" download>
  119. <div class="img">
  120. {!! QrCode::size(120)->generate(yzAppFullUrl('hotel/cashier_pay/'.$item['id'].'&mid='.$item['uid'])) !!}
  121. <!-- <img style="width: 120px;high:120px;" src="{{ $item->download_url }}"> -->
  122. </div>
  123. <i class="fa fa-qrcode"></i>
  124. </a><br>
  125. <a class="btn btn-sm btn-default umphp" title="酒店主页二维码"
  126. data-url="
  127. @if($item->uid)
  128. {{yzAppFullUrl('hotel/home_page/' . $item->id, ['mid'=>$item->uid])}}
  129. @endif"
  130. data-goodsid="{{$item->goods_id}}" href="{{$item->index_download_url}}" download>
  131. <div class="img">
  132. {!! QrCode::size(120)->generate(yzAppFullUrl('hotel/home_page/'.$item['id'].'&mid='.$item['uid'])) !!}
  133. </div>
  134. <i class="fa fa-qrcode"></i>
  135. </a>
  136. </td>
  137. <td style="text-align: center;position: relative;overflow: visible;">
  138. <a class="btn btn-sm btn-default umphp" title="小程序收银台二维码"
  139. data-url="
  140. @if($item->uid)
  141. {{$item->collect_money_url}}
  142. @endif"
  143. data-goodsid="{{$item->goods_id}}" @if($item->collect_money_url) href="{{$item->collect_money_url}}" @else disabled="true" @endif download>
  144. <div class="img">
  145. <img style="width: 120px;high:120px;" src="{{ $item->collect_money_url }}">
  146. </div>
  147. <i class="fa fa-qrcode"></i>
  148. </a><br>
  149. <a class="btn btn-sm btn-default umphp" title="酒店主页小程序码"
  150. data-url="
  151. @if($item->uid)
  152. {{$item->hotel_index_mini_url}}
  153. @endif"
  154. data-goodsid="{{$item->goods_id}}" @if($item->hotel_index_mini_url) href="{{$item->hotel_index_mini_url}}" @else disabled="true" @endif download>
  155. <div class="img">
  156. <img style="width: 120px;high:120px;" src="{{ $item->hotel_index_mini_url }}">
  157. </div>
  158. <i class="fa fa-qrcode"></i>
  159. </a>
  160. </td>
  161. <td style='overflow:visible;'>
  162. <div class="btn-group btn-group-sm">
  163. <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="javascript:;">操作 <span class="caret"></span></a>
  164. <ul class="dropdown-menu">
  165. <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel.edit',['hotel_id'=> $item->id])}}" title='编辑'><i class='fa fa-pencil'></i> 编辑</a></li>
  166. <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>
  167. @if($isEnabledDiyQueue)
  168. <li><a href="{{yzWebUrl('plugin.hotel.admin.diyQueue.hotel.index',['hotel_id'=> $item->id])}}" title='酒店队列设置'><i class='fa fa-pencil'></i> 酒店队列设置</a></li>
  169. <li>
  170. <a href="{{yzWebUrl('plugin.hotel.admin.diyQueue.cashier.index',['cashier_id'=> $item->cashier_id])}}" title='收银台队列设置'>
  171. <i class='fa fa-pencil'></i> 收银台队列设置
  172. </a>
  173. </li>
  174. @endif
  175. <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.generateCollectMoneyCode', ['hotel_id' => $item->id])}}" title='生成小程序收款码'><i class='fa fa-eraser'></i> 小程序收款码生成</a></li>
  176. <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.hotelIndexMiniUrl', ['hotel_id' => $item->id])}}" title='生成酒店主页小程序码'><i class='fa fa-eraser'></i> 首页小程序码生成</a></li>
  177. <li><a href="{{yzWebUrl('plugin.hotel.admin.hotel-set.edit-password', ['hotel_id' => $item->id])}}" title='修改密码'><i class='fa fa-eraser'></i> 修改密码</a></li>
  178. <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>
  179. </ul>
  180. </div>
  181. </td>
  182. </tr>
  183. @endforeach
  184. </tbody>
  185. </table>
  186. {!!$pager!!}
  187. </div>
  188. <div class='panel-footer'>
  189. <a class='btn btn-info' href="{{ yzWebUrl('plugin.hotel.admin.hotel.add') }}"><i class='fa fa-plus'></i> 添加酒店</a>
  190. </div>
  191. </div>
  192. <script type="text/javascript" src="{{static_url('js/area/cascade_street.js')}}"></script>
  193. <script type="text/javascript">
  194. var province_id = $('#province_id').val();
  195. var city_id = $('#city_id').val();
  196. var district_id = $('#district_id').val();
  197. var street_id = $('#street_id').val();
  198. cascdeInit(province_id, city_id, district_id, street_id);
  199. </script>
  200. <script language='javascript'>
  201. // cascdeInit();
  202. $('.umphp').hover(function () {
  203. var url = $(this).attr('data-url');
  204. $(this).addClass("selected");
  205. },
  206. function () {
  207. $(this).removeClass("selected");
  208. }
  209. );
  210. $('.js-clip').each(function () {
  211. util.clip(this, $(this).attr('data-url'));
  212. });
  213. $(function () {
  214. $('#export').click(function(){
  215. $('#route').val("plugin.hotel.admin.hotel.export");
  216. $('#form1').submit();
  217. $('#route').val("plugin.hotel.admin.hotel.index");
  218. });
  219. });
  220. </script>
  221. @endsection