outcome.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. @extends('vip.layouts')
  2. @section('seo_title')
  3. 篮球赛事
  4. @endsection
  5. @section('content')
  6. <style>
  7. .layui-laydate-range {
  8. width: auto;
  9. }
  10. .layui-form-switch em {
  11. width: auto;
  12. }
  13. .layui-form-switch {
  14. width: 44px;
  15. line-height: 23px;
  16. }
  17. .layui-form-item .checkbox {
  18. width: auto;
  19. }
  20. </style>
  21. <script type="text/html" id="liansai">
  22. @{{#if(d.match_id!=null){ }}
  23. <span>@{{ d.match_id}}</span>
  24. @{{#} }}<br>
  25. @{{#if(d.name_chinese!=null){ }}
  26. <span>@{{ d.name_chinese}}</span>
  27. @{{#} }}
  28. </script>
  29. <script type="text/html" id="matchstatus">
  30. @{{#if(d.status==0){ }}
  31. <span>未开始</span>
  32. @{{#} }}<br>
  33. @{{#if(d.status==1){ }}
  34. <span>进行中</span>
  35. @{{#} }}
  36. @{{#if(d.status==2){ }}
  37. <span>已结束</span>
  38. @{{#} }}
  39. </script>
  40. <script type="text/html" id="sectionone_two">
  41. <input type="text" style="width:30px;heigth:20px" id="okteamscore@{{d.match_id}}" name="okteamscore" value="@{{d.okteamscore}}" onchange="teamscore(1, event.target.value,@{{ d.match_id}})">
  42. <input type="text" style="width:30px;heigth:20px" id="ozteamscore@{{d.match_id}}" name="ozteamscore" value="@{{d.ozteamscore}}" onchange="teamscore(2, event.target.value,@{{ d.match_id}})"> /
  43. <input type="text" style="width:30px;heigth:20px" id="tkteamscore@{{d.match_id}}" name="tkteamscore" value="@{{d.tkteamscore}}" onchange="teamscore(3, event.target.value,@{{ d.match_id}})">
  44. <input type="text" style="width:30px;heigth:20px" id="tzteamscore@{{d.match_id}}" name="tzteamscore" value="@{{d.tzteamscore}}" onchange="teamscore(4, event.target.value,@{{ d.match_id}})">
  45. </script>
  46. <script type="text/html" id="sectionthere_four">
  47. <input type="text" style="width:30px;heigth:20px" id="skteamscore@{{d.match_id}}" name="skteamscore" value="@{{d.skteamscore}}" onchange="teamscore(5, event.target.value,@{{ d.match_id}})">
  48. <input type="text" style="width:30px;heigth:20px" id="szteamscore@{{d.match_id}}" name="szteamscore" value="@{{d.szteamscore}}" onchange="teamscore(6, event.target.value,@{{ d.match_id}})"> /
  49. <input type="text" style="width:30px;heigth:20px" id="akteamscore@{{d.match_id}}" name="akteamscore" value="@{{d.akteamscore}}" onchange="teamscore(7, event.target.value,@{{ d.match_id}})">
  50. <input type="text" style="width:30px;heigth:20px" id="azteamscore@{{d.match_id}}" name="azteamscore" value="@{{d.azteamscore}}" onchange="teamscore(8, event.target.value,@{{ d.match_id}})">
  51. </script>
  52. <script type="text/html" id="status">
  53. @if(checkRriv('/admin/sportsbk/index'))<input type="checkbox" name="status" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
  54. </script>
  55. <div class="layui-row">
  56. <div class="layui-col-xs12">
  57. <form class="layui-form rewrite" eventType="eventForm" action="">
  58. <div class="layui-form-item">
  59. <div class="layui-inline">
  60. <label class="layui-form-label">{{ trans('sportsbk.sousuo') }}</label>
  61. <div class="layui-input-inline">
  62. <input type="text" name="home_team" id="home_team" eventType="event-query" value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input">
  63. </div>
  64. <div class="layui-input-inline checkbox">
  65. <input type="checkbox" name="sureblur" id="form_sureblur" lay-skin="switch" lay-text="精确|模糊" @if(!isset($sureblurs) || $sureblurs=='on') checked @endif class="layui-input" eventType=event-query>
  66. <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query value="{{ $sureblurs }}">
  67. </div>
  68. </div>
  69. <div class="layui-inline">
  70. <label class="layui-form-label">{{ trans('sportsbk.status') }}</label>
  71. <div class="layui-input-inline" style="width: 200px">
  72. <select name="status" id="form_status" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
  73. <option value="-1">{{ trans('sportsbk.select_status') }}</option>
  74. @foreach(trans('status.match_status.status') as $k=>$v):
  75. @if($status==$k))
  76. <option value="{{$k}}" selected="selected">{{$v}}</option>
  77. @else
  78. <option value="{{$k}}">{{$v}}</option>
  79. @endif
  80. @endforeach
  81. </select>
  82. </div>
  83. </div>
  84. <div class="layui-inline">
  85. <label class="layui-form-label">{{ trans('sportsbk.sjsource') }}</label>
  86. <div class="layui-input-inline" style="width: 200px">
  87. <select name="source" id="form_source" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
  88. <option value="">请选择{{ trans('sportsbk.sjsource') }}</option>
  89. @foreach(trans('status.sjsource.source') as $k=>$v):
  90. @if($source==$k)
  91. <option value={{$v}} selected>{{$v}}</option>
  92. @else
  93. <option value={{$v}}>{{$v}}</option>
  94. @endif
  95. @endforeach
  96. </select>
  97. </div>
  98. </div>
  99. <div class="layui-inline">
  100. <a class="layui-btn layui-btn-sm lay-btn-diy" data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
  101. <a class="layui-btn layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
  102. <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon" onclick="refreshall('lq')">ဂ</i></a>
  103. @if(checkRriv('/admin/sportsbk/addoutcome'))<a href="/admin/sportsbk/addoutcome" class="layui-btn layui-btn-sm ">添加</a>@endif
  104. @if(checkRriv('/admin/sportsbk/deleteoutcome'))<a href="javascript:delWin('/admin/sportsbk/deleteoutcome?id=');" class="layui-btn layui-btn-sm layui-btn-danger">删除</a>@endif
  105. </div>
  106. </div>
  107. </form>
  108. </div>
  109. </div>
  110. <script type="text/javascript">
  111. $(function () {
  112. $('body').on('click', 'a[eventtype="event-delete"]', function () {
  113. var span = $(this).prev();
  114. var id = span.attr('data-id');
  115. // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
  116. })
  117. $('body').on('click','#form_sureblur~.layui-form-switch',function(){
  118. var sus = $('#form_sureblur').next().text();
  119. if(sus=='精确'){
  120. $('#form_sureblurs').val('on');
  121. }else{
  122. $('#form_sureblurs').val('off');
  123. }
  124. })
  125. })
  126. //修改赛事比分 only:唯一 num:inputval match_id:match_id
  127. function teamscore(only,num,match_id){
  128. var only = only;
  129. var num = num;
  130. var match_id = match_id;
  131. var reg = /^[0-99]\d*$/;
  132. var okteamscore = $("#okteamscore"+match_id).val();
  133. var ozteamscore = $("#ozteamscore"+match_id).val();
  134. var tkteamscore = $("#tkteamscore"+match_id).val();
  135. var tzteamscore = $("#tzteamscore"+match_id).val();
  136. var skteamscore = $("#skteamscore"+match_id).val();
  137. var szteamscore = $("#szteamscore"+match_id).val();
  138. var akteamscore = $("#akteamscore"+match_id).val();
  139. var azteamscore = $("#azteamscore"+match_id).val();
  140. // alert(azteamscore);
  141. // alert(akteamscore);
  142. if(reg.test(num)==false){
  143. layer.msg('不能为空值');
  144. reloadDataTable();return;
  145. }
  146. $.ajax({
  147. type: 'POST',
  148. dataType: 'json',
  149. url: '/admin/Sportsbk/updatascore',
  150. data: {only:only,num:num,match_id:match_id,okteamscore:okteamscore,ozteamscore:ozteamscore,tkteamscore:tkteamscore,tzteamscore:tzteamscore,skteamscore:skteamscore,szteamscore:szteamscore,akteamscore:akteamscore,azteamscore:azteamscore},
  151. success: function(data) {
  152. if(data.status==1){
  153. layer.msg(data.msg);
  154. location. reload()//刷新当前页面
  155. }
  156. }
  157. })
  158. }
  159. //刷新赛事数据
  160. function refreshall(game_code){
  161. var game_code = game_code;
  162. $.ajax({
  163. type: 'POST',
  164. dataType: 'json',
  165. url: '/setSports',
  166. data: {game_code:game_code},
  167. success: function(data) {
  168. alert(data);
  169. if(data.status==1){
  170. layer.msg(data.msg);
  171. location. reload()//刷新当前页面
  172. }
  173. }
  174. })
  175. }
  176. </script>
  177. @push('dataTableJS')
  178. /*var active = {
  179. reload: function(){
  180. //执行重载
  181. table.reload('{{ $dataId }}', {
  182. page: {
  183. curr: 1 //重新从第 1 页开始
  184. }
  185. ,where: {
  186. account:$("#form_account").val(),
  187. register_ip:$('#form_register_ip').val(),
  188. last_ip:$('#form_last_ip').val(),
  189. register_url:$('#form_register_url').val(),
  190. last_url:$('#form_last_url').val(),
  191. regist_startime:$('#form_regist_startime').val(),
  192. regist_endtime:$('#form_regist_endtime').val(),
  193. statuss:$('#form_statuss').val(),
  194. cash_small:$('#form_cash_small').val(),
  195. cash_big:$('#form_cash_big').val(),
  196. sureblur:$('.layui-form-switch').text(),
  197. }
  198. });
  199. }
  200. };
  201. $('.lay-btn-diy').on('click', function(){
  202. var type = $(this).data('type');
  203. active[type] ? active[type].call(this) : '';
  204. });*/
  205. //重置表单
  206. $('.reset').on('click',function(){
  207. $('input').val('');
  208. $('#form_statuss').val('');
  209. //var type = $(this).data('type');
  210. //active[type] ? active[type].call(this) : '';
  211. });
  212. //刷新表单
  213. $('.set').on('click',function(){
  214. //var type = $(this).data('type');
  215. //active[type] ? active[type].call(this) : '';
  216. });
  217. @endpush
  218. @include('vip.datatable')
  219. @endsection