outcome.blade.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  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. <!-- 样式 -->
  22. <style type="text/css">
  23. /* 弹窗 (background) */
  24. .modal {
  25. display: none; /* 默认隐藏 */
  26. /*生成绝对定位的元素,相对于浏览器窗口进行定位。*/
  27. position: fixed;
  28. z-index: 1;
  29. left: 0;
  30. top: 0;
  31. /*设置弹窗位置*/
  32. padding-top: 100px;
  33. padding-bottom: 200px;
  34. /*浮在全屏上*/
  35. width: 100%;
  36. height: 100%;
  37. /*overflow:auto;如果内容被修剪,则浏览器会显示滚动条,以便查看其余内容。*/
  38. overflow: auto;
  39. background-color: rgb(0,0,0);
  40. background-color: rgba(0,0,0,0.4);
  41. text-align: right;
  42. }
  43. /* 弹窗内容 */
  44. .modal-content {
  45. /*position: relative;*/
  46. /*弹窗背景色设置*/
  47. background-color: #fefefe;
  48. margin: auto;
  49. padding: 260px auto;
  50. width: 600px;
  51. box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
  52. -webkit-animation-name: animatetop;
  53. -webkit-animation-duration: 0.4s;
  54. animation-name: animatetop;
  55. animation-duration: 0.4s;
  56. border-radius: 10px;
  57. }
  58. /* 添加动画 */
  59. @-webkit-keyframes animatetop {
  60. from {top:-200px; opacity:0}
  61. to {top:0; opacity:1}
  62. }
  63. @keyframes animatetop {
  64. from {top:-200px; opacity:0}
  65. to {top:0; opacity:1}
  66. }
  67. /* 关闭按钮 */
  68. .close {
  69. color: white;
  70. float: right;
  71. font-size: 28px;
  72. font-weight: bold;
  73. }
  74. .close:hover, .close:focus {
  75. color: #000;
  76. text-decoration: none;
  77. cursor: pointer;
  78. }
  79. .modal-header {
  80. display: block;
  81. line-height: 30px;
  82. padding: 2px 10px;
  83. background-color: #AEAEAE;
  84. color: white;
  85. text-align: left;
  86. border-radius: 5px 5px 0 0;
  87. }
  88. .modal-body {
  89. padding: 2px 16px;
  90. font-size: 18px;
  91. /*height: 200px;*/
  92. }
  93. .modal-footer {
  94. display: flex;
  95. justify-content: space-around;
  96. align-items: center;
  97. width: 520px;
  98. padding: 0 40px;
  99. height: 50px;
  100. border-radius:0 0 5px 5px;
  101. display: block;
  102. line-height: 39px;
  103. background-color: #AEAEAE;
  104. color: white;
  105. }
  106. .ok,.no{
  107. width: 100px;
  108. height: 40px;
  109. }
  110. </style>
  111. <script type="text/html" id="newtime">
  112. @{{#if(d.match_id!=null){ }}
  113. <span>@{{ d.match_id}}</span>
  114. @{{#} }}<br>
  115. @{{#if(d.saisname!=null){ }}
  116. <span>@{{ d.saisname}}</span>
  117. @{{#} }}
  118. </script>
  119. <script type="text/html" id="totime">
  120. @{{#if(d.start_time!=null){ }}
  121. <span>@{{ d.start_time}}</span>
  122. @{{#} }}
  123. </script>
  124. <script type="text/html" id="match_score">
  125. <input type="text" style="width:30px;heigth:20px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="teamscore(1, event.target.value,@{{d.match_id}})">
  126. <input type="text" style="width:30px;heigth:20px" id="u_guest_score@{{d.id}}" name="u_guest_score" value="@{{d.u_guest_score}}" onchange="teamscore(2, event.target.value,@{{d.match_id}})"> /
  127. <input type="text" style="width:30px;heigth:20px" id="home_score@{{d.id}}" name="home_score" value="@{{d.home_score}}" onchange="teamscore(3, event.target.value,@{{d.match_id}})">
  128. <input type="text" style="width:30px;heigth:20px" id="guest_score@{{d.id}}" name="guest_score" value="@{{d.guest_score}}" onchange="teamscore(4, event.target.value,@{{d.match_id}})">
  129. </script>
  130. <script type="text/html" id="dsnum">
  131. <span><a href="/admin/SoccerNoteList/notelist?type=bq&match_id=@{{d.match_id}}"> 单式</a></span>
  132. </script>
  133. <script type="text/html" id="statusmatch">
  134. @{{#if(d.status==0){ }}
  135. <span>未开始</span>
  136. @{{#} }}
  137. @{{#if(d.status==1){ }}
  138. <span>进行中</span>
  139. @{{#} }}
  140. @{{#if(d.status==2){ }}
  141. <span>已结束</span>
  142. @{{#} }}
  143. @{{#if(d.status==3){ }}
  144. <span>已结算</span>
  145. @{{#} }}
  146. @{{#if(d.status==4){ }}
  147. <span>已作废</span>
  148. @{{#} }}
  149. </script>
  150. <script type="text/html" id="operation">
  151. <!-- <button onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm layui-btn-green set">赛事结果</button> -->
  152. @{{#if(d.status==2 || d.status==3){ }}
  153. @{{#if(d.status==2){ }}
  154. <span><li class="layui-btn layui-btn-sm layui-btn-green set" onclick="settlement(@{{d.match_id}},1)">结算</li></span>
  155. @{{#} }}
  156. @{{#if(d.status==3){ }}
  157. <span><li class="layui-btn layui-btn-sm layui-btn-normal reset" onclick="settlement(@{{d.match_id}},2)">再结算</li></span>
  158. @{{#} }}
  159. @{{#} }}
  160. @{{#if(d.status!=4 && d.status!=3){ }}
  161. <span><li class="layui-btn layui-btn-sm layui-btn-danger" onclick="revoke(@{{d.match_id}})">作废</li></span>
  162. @{{#} }}
  163. @{{#if(d.status==4){ }}
  164. <span><li class="layui-btn layui-btn-sm layui-btn-danger" onclick="revoke(@{{d.match_id}})">已作废</li></span>
  165. @{{#} }}
  166. </script>
  167. <script type="text/html" id="status">
  168. @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
  169. </script>
  170. <div class="layui-row">
  171. <div class="layui-col-xs12">
  172. <form class="layui-form rewrite" eventType="eventForm" action="">
  173. <div class="layui-form-item">
  174. <div class="layui-inline">
  175. <label class="layui-form-label">{{ trans('sportsbk.sousuo') }}</label>
  176. <div class="layui-input-inline">
  177. <input type="text" name="home_team" id="home_team" eventType="event-query" value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input">
  178. </div>
  179. <div class="layui-input-inline checkbox">
  180. <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>
  181. <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query value="{{ $sureblurs }}">
  182. </div>
  183. </div>
  184. <div class="layui-inline">
  185. <label class="layui-form-label">{{ trans('sportsbk.status') }}</label>
  186. <div class="layui-input-inline" style="width: 200px">
  187. <select name="status" id="form_status" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
  188. <option value="-1">{{ trans('sportsbk.select_status') }}</option>
  189. @foreach(trans('status.match_operation.status') as $k=>$v):
  190. @if($status==$k))
  191. <option value="{{$k}}" selected="selected">{{$v}}</option>
  192. @else
  193. <option value="{{$k}}">{{$v}}</option>
  194. @endif
  195. @endforeach
  196. </select>
  197. </div>
  198. </div>
  199. <div class="layui-inline">
  200. <label class="layui-form-label">{{ trans('sportsfoot.star_time') }}</label>
  201. <div class="layui-input-inline">
  202. <input type="text" name="star_time" value="{{ $star_time }}" id="star_time" placeholder=" - " lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
  203. </div>
  204. </div>
  205. <div class="layui-inline">
  206. <label class="layui-form-label">{{ trans('sportsfoot.end_time') }}</label>
  207. <div class="layui-input-inline">
  208. <input type="text" name="end_time" value="{{$end_time}}" id="end_time" placeholder=" - " word-break: break-all; lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
  209. </div>
  210. </div>
  211. <div class="layui-inline">
  212. <a class="layui-btn layui-btn-sm lay-btn-diy" data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
  213. <a class="layui-btn layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
  214. <a class="layui-btn layui-btn-xs" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon" onclick="refreshall('bq')">刷新赛事</i></a>
  215. <!--@if(checkRriv('/admin/sportsbk/addoutcome'))<a href="/admin/sportsbk/addoutcome" class="layui-btn layui-btn-sm ">添加</a>@endif-->
  216. @if(checkRriv('/admin/sportsbq/deleteoutcome'))<a href="javascript:delWin('/admin/sportsbq/deleteoutcome?id=');" class="layui-btn layui-btn-sm layui-btn-danger">删除</a>@endif
  217. @if(checkRriv('/admin/sportsbq/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbq/Settlementlq?allhalf=1&id=');" class="layui-btn layui-btn-sm layui-btn-green set">结算全场</a>@endif
  218. @if(checkRriv('/admin/sportsbq/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbq/Settlementlq?allhalf=2&id=');" class="layui-btn layui-btn-xs">结算上半场</a>@endif
  219. @if(checkRriv('/admin/sportsbq/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbq/Settlementlq?allhalf=2&id=');" class="layui-btn layui-btn-sm layui-btn-green set">重新结算上半场</a>@endif
  220. </div>
  221. </div>
  222. </form>
  223. </div>
  224. </div>
  225. <!-- 弹窗隐藏区域 -->
  226. <div id="myModal" class="modal">
  227. <input type="hidden" id="matchid" name="matchid" value="">
  228. <div class="modal-content">
  229. <div class="modal-header">
  230. <span class="close">&times;</span>
  231. <h2>赛事结果添加</h2>
  232. </div>
  233. <div class="modal-body">
  234. <p style="text-align:left;color:#5f7788;">请认真填写赛事结果,将会按照改结果结算</p><br>
  235. <div style="text-align:left;">
  236. <div style="display: flex;">
  237. <li>最先进球球队:</li>
  238. <select name="firstscoreplayer" id="firstscoreplayer">
  239. </select>
  240. </div>
  241. <div style="display: flex;">
  242. <li>最后进球球队:</li>
  243. <select name="lastscoreplayer" id="lastscoreplayer">
  244. </select>
  245. </div>
  246. <div style="display: flex;">
  247. <li>获&nbsp;&nbsp;胜&nbsp;&nbsp;&nbsp;球&nbsp;&nbsp;队:</li>
  248. <select name="matchwinerplayer" id="matchwinerplayer">
  249. </select>
  250. </div>
  251. <!-- <div style="display:flex;heigth:20px">
  252. <li style="width: 110px;">第一局比分</li>
  253. <div>
  254. <input type="text" style="width:50px;heigth:15px;" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  255. <input type="text" style="width:50px;heigth:15px;" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  256. </div>
  257. </div>
  258. <div style="display:flex">
  259. <li style="width: 110px;">第二局比分</li>
  260. <div>
  261. <input type="text" style="width:50px;heigth:15px;" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  262. <input type="text" style="width:50px;heigth:15px;" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  263. </div>
  264. </div>
  265. <div style="display:flex">
  266. <li style="width: 110px;">第三局比分</li>
  267. <div>
  268. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  269. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  270. </div>
  271. </div>
  272. <div style="display:flex">
  273. <li style="width: 110px;">第四局比分</li>
  274. <div>
  275. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  276. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  277. </div>
  278. </div>
  279. <div style="display:flex">
  280. <li style="width: 110px;">第五局比分</li>
  281. <div>
  282. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  283. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  284. </div>
  285. </div>
  286. <div style="display:flex">
  287. <li style="width: 110px;">第六局比分</li>
  288. <div>
  289. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  290. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  291. </div>
  292. </div>
  293. <div style="display:flex">
  294. <li style="width: 110px;">第七局比分</li>
  295. <div>
  296. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})"> -
  297. <input type="text" style="width:50px;heigth:15px" id="u_home_score@{{d.id}}" name="u_home_score" value="@{{d.u_home_score}}" onchange="inputFunc(@{{d.id}}, event.target.value,@{{d.match_id}})">
  298. </div>
  299. </div> -->
  300. </div>
  301. </div>
  302. <div class="modal-footer">
  303. <button class="ok" onchange="buttonClick()"><h3>确定</h3></button>&nbsp;<button class="no"><h3>取消</h3></button>
  304. </div>
  305. </div>
  306. </div>
  307. <script>
  308. $(function () {
  309. $('body').on('click', 'a[eventtype="event-delete"]', function () {
  310. var span = $(this).prev();
  311. var id = span.attr('data-id');
  312. // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
  313. })
  314. $('body').on('click','#form_sureblur~.layui-form-switch',function(){
  315. var sus = $('#form_sureblur').next().text();
  316. if(sus=='精确'){
  317. $('#form_sureblurs').val('on');
  318. }else{
  319. $('#form_sureblurs').val('off');
  320. }
  321. })
  322. })
  323. function addResult($match_id){
  324. $(":input",$("#myModal")).each(function(i){ $(this).val('');});
  325. var match_id = $match_id;
  326. document.getElementById("matchid").value=$match_id;//赋值个弹窗
  327. $.ajax({
  328. type: 'POST',
  329. dataType: 'json',
  330. url: '/admin/Sportsbq/Matchresult',
  331. data: {match_id:match_id},
  332. success: function(data) {
  333. // document.getElementById("matchwiner").value=data.newapp.match_winer;
  334. // document.getElementById("homeallcard").value=data.penalty_card.home;
  335. // document.getElementById("guestallcard").value=data.penalty_card.guest;
  336. // document.getElementById("homehalfcard").value=data.penalty_card.home_half;
  337. // document.getElementById("guesthalfcard").value=data.penalty_card.guest_half;
  338. // document.getElementById("homeallcorner").value=data.corner_ball.home;
  339. // document.getElementById("guestallcorner").value=data.corner_ball.guest;
  340. // document.getElementById("homehalfcorner").value=data.corner_ball.home_half;
  341. // document.getElementById("guesthalfcorner").value=data.corner_ball.guest_half;
  342. firstscoreplayer = "<option value='"+data.bqresult.first_score+"' selected=''>";
  343. if (data.bqresult.first_score != 0){
  344. firstscoreplayer += data.bqresult.first_score;
  345. }else{
  346. firstscoreplayer += '请选择最先进球';
  347. }
  348. firstscoreplayer += "</option><option value=" + data.bqresult.home_team + ">" + data.bqresult.home_team + "</option><option value=" + data.bqresult.guest_team + ">" + data.bqresult.guest_team + "</option>";
  349. $("#firstscoreplayer").html(firstscoreplayer);
  350. lastscoreplayer = "<option value='"+data.bqresult.last_score+"' selected=''>";
  351. if (data.bqresult.last_score != 0){
  352. lastscoreplayer += data.bqresult.last_score;
  353. }else{
  354. lastscoreplayer += '请选择最后进球';
  355. }
  356. lastscoreplayer += "</option><option value=" + data.bqresult.home_team + ">" + data.bqresult.home_team + "</option><option value=" + data.bqresult.guest_team + ">" + data.bqresult.guest_team + "</option>";
  357. $("#lastscoreplayer").html(lastscoreplayer);
  358. matchwinerplayer = "<option value='"+data.bqresult.match_winer+"' selected=''>";
  359. if (data.bqresult.match_winer != 0){
  360. matchwinerplayer += data.bqresult.match_winer;
  361. }else{
  362. matchwinerplayer += '请选择最后胜利球队';
  363. }
  364. matchwinerplayer += "</option><option value=" + data.bqresult.home_team + ">" + data.bqresult.home_team + "</option><option value=" + data.bqresult.guest_team + ">" + data.bqresult.guest_team + "</option>";
  365. $("#matchwinerplayer").html(matchwinerplayer);
  366. }
  367. })
  368. //获取弹窗得div
  369. var modal = document.getElementById('myModal');
  370. // 获取 <span> 元素,用于关闭弹窗 (X)
  371. var span = document.getElementsByClassName("close")[0];
  372. //获取弹窗中得确定按钮
  373. var ok=document.getElementsByClassName("ok")[0];
  374. //获取弹窗中得取消按钮
  375. var no=document.getElementsByClassName("no")[0];
  376. //窗体弹出
  377. modal.style.display = "block";
  378. //点击窗体ok
  379. ok.onclick=function(){
  380. //执行弹出窗体得确定后得操作
  381. alert("执行确定按钮点击得操作");
  382. //关闭窗口
  383. modal.style.display = "none";
  384. buttonClick();
  385. }
  386. //点击窗体取消按钮
  387. no.onclick=function(){
  388. //直接关闭窗口
  389. modal.style.display = "none";
  390. }
  391. // 点击 <span> (x), 关闭弹窗
  392. span.onclick = function() {
  393. //直接关闭窗口
  394. modal.style.display = "none";
  395. }
  396. // 在用户点击其他地方时,关闭弹窗
  397. window.onclick = function(event) {
  398. //点击窗口外内容,关闭窗口
  399. if (event.target == modal) modal.style.display = "none";
  400. }
  401. }
  402. function buttonClick(){
  403. var matchid = $("#matchid").val();
  404. var firstscoreplayer = $("#firstscoreplayer").val();
  405. var lastscoreplayer = $("#lastscoreplayer").val();
  406. var matchwinerplayer = $("#matchwinerplayer").val();
  407. $.ajax({
  408. type: 'POST',
  409. dataType: 'json',
  410. url: '/admin/Sportsbq/onlyresult',
  411. data: {matchid:matchid},
  412. success: function(data) {
  413. var allnum = data.home_score+ data.guest_score;
  414. if(allnum>0){
  415. if(firstscoreplayer.length==0){
  416. alert("请输入最先进球");return;
  417. }
  418. if(lastscoreplayer.length==0){
  419. alert("请输入最后进球");return;
  420. }
  421. }
  422. $.ajax({
  423. type: 'POST',
  424. dataType: 'json',
  425. url: '/admin/Sportsbq/addend',
  426. data: {matchid:matchid,firstscoreplayer:firstscoreplayer,lastscoreplayer:lastscoreplayer,matchwinerplayer:matchwinerplayer},
  427. success: function(data) {
  428. layer.msg(data.msg);
  429. location. reload()//刷新当前页面
  430. }
  431. })
  432. }
  433. })
  434. }
  435. //刷新赛事数据
  436. function refreshall(game_code){
  437. var game_code = game_code;
  438. $.ajax({
  439. type: 'POST',
  440. dataType: 'json',
  441. url: '/setSports',
  442. data: {game_code:game_code},
  443. success: function(data) {
  444. var data = JSON.stringify(data);
  445. if(data){
  446. layer.msg(data.msg);
  447. location. reload()//刷新当前页面
  448. }
  449. }
  450. })
  451. }
  452. //撤销
  453. function revoke(match_id){
  454. var match_id = match_id;
  455. $.ajax({
  456. type: 'POST',
  457. dataType: 'json',
  458. url: '/admin/Sportsbq/revoke',
  459. data: {match_id:match_id},
  460. success: function(data) {
  461. if(data.status==1){
  462. layer.msg(data.msg);
  463. location. reload()//刷新当前页面
  464. }
  465. }
  466. })
  467. }
  468. //结算
  469. function settlement(match_id,type){
  470. var match_id = match_id;
  471. var type = type;
  472. $.ajax({
  473. type: 'POST',
  474. dataType: 'json',
  475. url: '/admin/Sportsbq/Settlement',
  476. data: {match_id:match_id,type:type},
  477. success: function(data) {
  478. if(data.status==1){
  479. layer.msg(data.msg);
  480. location. reload()//刷新当前页面
  481. }else if(data.status==2){
  482. layer.msg(data.msg);
  483. reloadDataTable();return;
  484. }else if(data.status==4){
  485. layer.msg(data.msg);
  486. reloadDataTable();return;
  487. }else{
  488. layer.msg(data.msg);
  489. reloadDataTable();return;
  490. }
  491. }
  492. })
  493. }
  494. //修改赛事比分 only:唯一 num:inputval match_id:match_id
  495. function teamscore(only,num,match_id){
  496. var only = only;
  497. var num = num;
  498. var match_id = match_id;
  499. var reg = /^[0-99]\d*$/;
  500. if(reg.test(num)==false){
  501. layer.msg('不能为空值');
  502. reloadDataTable();return;
  503. }
  504. $.ajax({
  505. type: 'POST',
  506. dataType: 'json',
  507. url: '/admin/Sportsbq/updatascore',
  508. data: {only:only,num:num,match_id:match_id},
  509. success: function(data) {
  510. if(data.status==1){
  511. layer.msg(data.msg);
  512. location. reload()//刷新当前页面
  513. }
  514. }
  515. })
  516. }
  517. </script>
  518. @push('dataTableJS')
  519. /*var active = {
  520. reload: function(){
  521. //执行重载
  522. table.reload('{{ $dataId }}', {
  523. page: {
  524. curr: 1 //重新从第 1 页开始
  525. }
  526. ,where: {
  527. account:$("#form_account").val(),
  528. register_ip:$('#form_register_ip').val(),
  529. last_ip:$('#form_last_ip').val(),
  530. register_url:$('#form_register_url').val(),
  531. last_url:$('#form_last_url').val(),
  532. regist_startime:$('#form_regist_startime').val(),
  533. regist_endtime:$('#form_regist_endtime').val(),
  534. statuss:$('#form_statuss').val(),
  535. cash_small:$('#form_cash_small').val(),
  536. cash_big:$('#form_cash_big').val(),
  537. sureblur:$('.layui-form-switch').text(),
  538. }
  539. });
  540. }
  541. };
  542. $('.lay-btn-diy').on('click', function(){
  543. var type = $(this).data('type');
  544. active[type] ? active[type].call(this) : '';
  545. });*/
  546. //重置表单
  547. $('.reset').on('click',function(){
  548. $('input').val('');
  549. $('#form_statuss').val('');
  550. //var type = $(this).data('type');
  551. //active[type] ? active[type].call(this) : '';
  552. });
  553. //刷新表单
  554. $('.set').on('click',function(){
  555. //var type = $(this).data('type');
  556. //active[type] ? active[type].call(this) : '';
  557. });
  558. @endpush
  559. @include('vip.datatable')
  560. @endsection