outcome.blade.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  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="liansai">
  112. @{{#if(d.match_id!=null){ }}
  113. <span>@{{ d.match_id}}</span>
  114. @{{#} }}<br>
  115. @{{#if(d.name_chinese!=null){ }}
  116. <span>@{{ d.name_chinese}}</span>
  117. @{{#} }}
  118. </script>
  119. <script type="text/html" id="dsnum">
  120. <span><a href="/admin/SoccerNoteList/notelist?type=lq&match_id=@{{d.match_id}}"> 单式</a></span>
  121. </script>
  122. <script type="text/html" id="matchstatus">
  123. @{{#if(d.status==0){ }}
  124. <span>未开始</span>
  125. @{{#} }}<br>
  126. @{{#if(d.status==1){ }}
  127. <span>进行中</span>
  128. @{{#} }}
  129. @{{#if(d.status==2){ }}
  130. <span>已结束</span>
  131. @{{#} }}
  132. @{{#if(d.status==3){ }}
  133. <span>已结算</span>
  134. @{{#} }}
  135. @{{#if(d.status==4){ }}
  136. <span>已作废</span>
  137. @{{#} }}
  138. </script>
  139. <script type="text/html" id="operation">
  140. <!-- <button onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm layui-btn-green set">赛事结果</button> -->
  141. @{{#if(d.status==2 || d.status==3){ }}
  142. @{{#if(d.status==2){ }}
  143. <span><li class="layui-btn layui-btn-sm layui-btn-green set" onclick="lqsettlement(@{{d.match_id}},1)">结算</li></span>
  144. @{{#} }}
  145. @{{#if(d.status==3){ }}
  146. <span><li class="layui-btn layui-btn-sm layui-btn-normal reset" onclick="lqsettlement(@{{d.match_id}},2)">再结算</li></span>
  147. @{{#} }}
  148. @{{#} }}
  149. @{{#if(d.status!=4 && d.status!=3){ }}
  150. <span><li class="layui-btn layui-btn-sm layui-btn-danger" onclick="lqrevoke(@{{d.match_id}})">作废</li></span>
  151. @{{#} }}
  152. @{{#if(d.status==4){ }}
  153. <span><li class="layui-btn layui-btn-sm layui-btn-danger" onclick="lqrevoke(@{{d.match_id}})">已作废</li></span>
  154. @{{#} }}
  155. </script>
  156. <script type="text/html" id="sectionone_two">
  157. <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}})">
  158. <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}})"> /
  159. <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}})">
  160. <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}})">
  161. </script>
  162. <script type="text/html" id="sectionthere_four">
  163. <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}})">
  164. <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}})"> /
  165. <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}})">
  166. <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}})">
  167. </script>
  168. <script type="text/html" id="status">
  169. @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
  170. </script>
  171. <div class="layui-row">
  172. <div class="layui-col-xs12">
  173. <form class="layui-form rewrite" eventType="eventForm" action="">
  174. <div class="layui-form-item">
  175. <div class="layui-inline">
  176. <label class="layui-form-label">{{ trans('sportsbk.sousuo') }}</label>
  177. <div class="layui-input-inline">
  178. <input type="text" name="home_team" id="home_team" eventType="event-query" value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input" placeholder="输入主队,客队名">
  179. </div>
  180. <div class="layui-input-inline checkbox">
  181. <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>
  182. <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query value="{{ $sureblurs }}">
  183. </div>
  184. </div>
  185. <div class="layui-inline">
  186. <label class="layui-form-label">{{ trans('sportsbk.status') }}</label>
  187. <div class="layui-input-inline" style="width: 200px">
  188. <select name="status" id="form_status" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
  189. <option value="-1">{{ trans('sportsbk.select_status') }}</option>
  190. @foreach(trans('status.match_operation.status') as $k=>$v):
  191. @if($status==$k))
  192. <option value="{{$k}}" selected="selected">{{$v}}</option>
  193. @else
  194. <option value="{{$k}}">{{$v}}</option>
  195. @endif
  196. @endforeach
  197. </select>
  198. </div>
  199. </div>
  200. <div class="layui-inline">
  201. <label class="layui-form-label">{{ trans('sportsfoot.star_time') }}</label>
  202. <div class="layui-input-inline">
  203. <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>
  204. </div>
  205. </div>
  206. <div class="layui-inline">
  207. <label class="layui-form-label">{{ trans('sportsfoot.end_time') }}</label>
  208. <div class="layui-input-inline">
  209. <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>
  210. </div>
  211. </div>
  212. <div class="layui-inline">
  213. <a class="layui-btn layui-btn-sm lay-btn-diy" data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
  214. <a class="layui-btn layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
  215. <a class="layui-btn layui-btn-xs" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon" onclick="refreshall('lq')">刷新赛事</i></a>
  216. <!-- @if(checkRriv('/admin/sportsbk/addoutcome'))<a href="/admin/sportsbk/addoutcome" class="layui-btn layui-btn-sm ">添加</a>@endif -->
  217. @if(checkRriv('/admin/sportsbk/deleteoutcome'))<a href="javascript:delWin('/admin/sportsbk/deleteoutcome?id=');" class="layui-btn layui-btn-sm layui-btn-danger">删除</a>@endif
  218. @if(checkRriv('/admin/sportsbk/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbk/Settlementlq?allhalf=1&id=');" class="layui-btn layui-btn-sm layui-btn-green set">结算全场</a>@endif
  219. @if(checkRriv('/admin/sportsbk/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbk/Settlementlq?allhalf=2&id=');" class="layui-btn layui-btn-xs">结算上半场</a>@endif
  220. @if(checkRriv('/admin/sportsbk/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbk/Settlementlq?allhalf=2&id=');" class="layui-btn layui-btn-sm layui-btn-green set">重新结算上半场</a>@endif
  221. </div>
  222. </div>
  223. </form>
  224. </div>
  225. </div>
  226. <!-- 弹窗隐藏区域 -->
  227. <div id="myModal" class="modal">
  228. <input type="hidden" id="match_id" name="match_id" value="@{{d.match_id}}">
  229. <div class="modal-content">
  230. <div class="modal-header">
  231. <span class="close">&times;</span>
  232. <h2>赛事结果添加</h2>
  233. </div>
  234. <div class="modal-body">
  235. <p style="text-align:left;color:#5f7788;">请认真填写赛事结果,将会按照改结果结算</p><br>
  236. <div style="text-align:left;">
  237. <div style="display: flex;">
  238. <li>最先进球球队:</li><input type="text" id="firstscore" name="firstscore" value="">
  239. </div>
  240. <div style="display: flex;">
  241. <li>最后进球球队:</li><input type="text" id="lastscore" name="lastscore" value="">
  242. </div>
  243. <div style="display: flex;">
  244. <li> 获 &nbsp;胜&nbsp; 球&nbsp; 队&nbsp;:</li><input type="text" id="matchwiner" name="matchwiner" value="">
  245. </div>
  246. <div style="display: flex;">
  247. <li>上主队进球数:</li><input type="text" id="uhomescore" AUTOCOMPLETE="off" name="uhomescore" value="">
  248. </div>
  249. <div style="display: flex;">
  250. <li>上客队进球数:</li><input type="text" id="uguestscore" AUTOCOMPLETE="off" name="uguestscore" value="">
  251. </div>
  252. <div style="display: flex;">
  253. <li>主队全场角球:</li><input type="text" id="homeallcard" AUTOCOMPLETE="off" name="homeallcard" value="">
  254. </div>
  255. <div style="display: flex;">
  256. <li>客队全场角球:</li><input type="text" id="guestallcard" AUTOCOMPLETE="off" name="guestallcard" value="">
  257. </div>
  258. <div style="display: flex;">
  259. <li>主队半场角球:</li><input type="text" id="homehalfcard" AUTOCOMPLETE="off" name="homehalfcard" value="">
  260. </div>
  261. <div style="display: flex;">
  262. <li>客队半场角球:</li><input type="text" id="guesthalfcard" AUTOCOMPLETE="off" name="guesthalfcard" value="">
  263. </div>
  264. <div style="display: flex;">
  265. <li>主队全场罚牌:</li><input type="text" id="homeallcorner" AUTOCOMPLETE="off" name="homeallcorner" value="">
  266. </div>
  267. <div style="display: flex;">
  268. <li>客队全场罚牌:</li><input type="text" id="guestallcorner" AUTOCOMPLETE="off" name="guestallcorner" value="">
  269. </div>
  270. <div style="display: flex;">
  271. <li>主队半场罚牌:</li><input type="text" id="homehalfcorner" AUTOCOMPLETE="off" name="homehalfcorner" value="">
  272. </div>
  273. <div style="display: flex;">
  274. <li>客队半场罚牌:</li><input type="text" id="guesthalfcorner" AUTOCOMPLETE="off" name="guesthalfcorner" value="">
  275. </div><br>
  276. </div>
  277. </div>
  278. <div class="modal-footer">
  279. <button class="ok" onchange="buttonClick()"><h3>确定</h3></button>&nbsp;<button class="no"><h3>取消</h3></button>
  280. </div>
  281. </div>
  282. </div>
  283. <script type="text/javascript">
  284. $(function () {
  285. $('body').on('click', 'a[eventtype="event-delete"]', function () {
  286. var span = $(this).prev();
  287. var id = span.attr('data-id');
  288. // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
  289. })
  290. $('body').on('click','#form_sureblur~.layui-form-switch',function(){
  291. var sus = $('#form_sureblur').next().text();
  292. if(sus=='精确'){
  293. $('#form_sureblurs').val('on');
  294. }else{
  295. $('#form_sureblurs').val('off');
  296. }
  297. })
  298. })
  299. function addResult($match_id){
  300. document.getElementById("firstscore").value='';
  301. document.getElementById("lastscore").value='';
  302. document.getElementById("matchwiner").value='';
  303. document.getElementById("uhomescore").value='';
  304. document.getElementById("uguestscore").value='';
  305. document.getElementById("homeallcard").value='';
  306. document.getElementById("guestallcard").value='';
  307. document.getElementById("homehalfcard").value='';
  308. document.getElementById("guesthalfcard").value='';
  309. document.getElementById("homeallcorner").value='';
  310. document.getElementById("guestallcorner").value='';
  311. document.getElementById("homehalfcorner").value='';
  312. document.getElementById("guesthalfcorner").value='';
  313. var match_id = $match_id;
  314. document.getElementById("match_id").value=$match_id;//赋值个弹窗
  315. $(":input").val("");
  316. $.ajax({
  317. type: 'POST',
  318. dataType: 'json',
  319. url: '/admin/Sportsbk/Matchresult',
  320. data: {match_id:match_id},
  321. success: function(data) {
  322. if(data){
  323. document.getElementById("firstscore").value=data.newapp.first_score;
  324. document.getElementById("lastscore").value=data.newapp.last_score;
  325. document.getElementById("matchwiner").value=data.newapp.match_winer;
  326. document.getElementById("uhomescore").value=data.newapp.u_home_score;
  327. document.getElementById("uguestscore").value=data.newapp.u_guest_score;
  328. document.getElementById("homeallcard").value=data.corner_ball.home;
  329. document.getElementById("guestallcard").value=data.corner_ball.guest;
  330. document.getElementById("homehalfcard").value=data.corner_ball.home_half;
  331. document.getElementById("guesthalfcard").value=data.corner_ball.guest_half;
  332. document.getElementById("homeallcorner").value=data.penalty_card.home;
  333. document.getElementById("guestallcorner").value=data.penalty_card.guest;
  334. document.getElementById("homehalfcorner").value=data.penalty_card.home_half;
  335. document.getElementById("guesthalfcorner").value=data.penalty_card.guest_half;
  336. }
  337. }
  338. })
  339. //获取弹窗得div
  340. var modal = document.getElementById('myModal');
  341. // 获取 <span> 元素,用于关闭弹窗 (X)
  342. var span = document.getElementsByClassName("close")[0];
  343. //获取弹窗中得确定按钮
  344. var ok=document.getElementsByClassName("ok")[0];
  345. //获取弹窗中得取消按钮
  346. var no=document.getElementsByClassName("no")[0];
  347. //窗体弹出
  348. modal.style.display = "block";
  349. //点击窗体ok
  350. ok.onclick=function(){
  351. //执行弹出窗体得确定后得操作
  352. alert("执行确定按钮点击得操作");
  353. //关闭窗口
  354. modal.style.display = "none";
  355. buttonClick();
  356. }
  357. //点击窗体取消按钮
  358. no.onclick=function(){
  359. //直接关闭窗口
  360. modal.style.display = "none";
  361. }
  362. // 点击 <span> (x), 关闭弹窗
  363. span.onclick = function() {
  364. //直接关闭窗口
  365. modal.style.display = "none";
  366. }
  367. // 在用户点击其他地方时,关闭弹窗
  368. window.onclick = function(event) {
  369. //点击窗口外内容,关闭窗口
  370. if (event.target == modal) modal.style.display = "none";
  371. }
  372. }
  373. function buttonClick(){
  374. var match_id = $("#match_id").val();
  375. var firstscore = $("#firstscore").val();
  376. var lastscore = $("#lastscore").val();
  377. var matchwiner = $("#matchwiner").val();
  378. var uhomescore = $("#uhomescore").val();
  379. var uguestscore = $("#uguestscore").val();
  380. var homeallcard = $("#homeallcard").val();
  381. var guestallcard = $("#guestallcard").val();
  382. var homehalfcard = $("#homehalfcard").val();
  383. var guesthalfcard = $("#guesthalfcard").val();
  384. var homeallcorner = $("#homeallcorner").val();
  385. var guestallcorner = $("#guestallcorner").val();
  386. var homehalfcorner = $("#homehalfcorner").val();
  387. var guesthalfcorner = $("#guesthalfcorner").val();
  388. $.ajax({
  389. type: 'POST',
  390. dataType: 'json',
  391. url: '/admin/Sportsbk/addend',
  392. data: {match_id:match_id,firstscore:firstscore,lastscore:lastscore,matchwiner:matchwiner,uhomescore:uhomescore,uguestscore:uguestscore,homeallcard:homeallcard,guestallcard:guestallcard,homehalfcard:homehalfcard,guesthalfcard:guesthalfcard,homeallcorner:homeallcorner,guestallcorner:guestallcorner,homehalfcorner:homehalfcorner,guesthalfcorner:guesthalfcorner},
  393. success: function(data) {
  394. if(data.status==1){
  395. layer.msg(data.msg);
  396. location. reload()//刷新当前页面
  397. }
  398. }
  399. })
  400. }
  401. //篮球作废
  402. function lqrevoke(match_id){
  403. var match_id = match_id;
  404. $.ajax({
  405. type: 'POST',
  406. dataType: 'json',
  407. url: '/admin/Sportsbk/revoke',
  408. data: {match_id:match_id},
  409. success: function(data) {
  410. if(data.status==1){
  411. layer.msg(data.msg);
  412. location. reload()//刷新当前页面
  413. }
  414. }
  415. })
  416. }
  417. //篮球结算
  418. function lqsettlement(match_id,type){
  419. var match_id = match_id;
  420. var type = type;
  421. // alert(match_id);
  422. // alert(type);
  423. $.ajax({
  424. type: 'POST',
  425. dataType: 'json',
  426. url: '/admin/Sportsbk/Settlementlq',
  427. data: {match_id:match_id,type:type},
  428. success: function(data) {
  429. // alert(data);
  430. if(data.status==1){
  431. layer.msg(data.msg);
  432. location. reload()//刷新当前页面
  433. }else{
  434. layer.msg(data.msg);
  435. location. reload()//刷新当前页面
  436. }
  437. }
  438. })
  439. }
  440. //修改赛事比分 only:唯一 num:inputval match_id:match_id
  441. function teamscore(only,num,match_id){
  442. var only = only;
  443. var num = num;
  444. var match_id = match_id;
  445. var reg = /^[0-99]\d*$/;
  446. var okteamscore = $("#okteamscore"+match_id).val();
  447. var ozteamscore = $("#ozteamscore"+match_id).val();
  448. var tkteamscore = $("#tkteamscore"+match_id).val();
  449. var tzteamscore = $("#tzteamscore"+match_id).val();
  450. var skteamscore = $("#skteamscore"+match_id).val();
  451. var szteamscore = $("#szteamscore"+match_id).val();
  452. var akteamscore = $("#akteamscore"+match_id).val();
  453. var azteamscore = $("#azteamscore"+match_id).val();
  454. // alert(azteamscore);
  455. // alert(akteamscore);
  456. if(reg.test(num)==false){
  457. layer.msg('不能为空值');
  458. reloadDataTable();return;
  459. }
  460. $.ajax({
  461. type: 'POST',
  462. dataType: 'json',
  463. url: '/admin/Sportsbk/updatascore',
  464. 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},
  465. success: function(data) {
  466. if(data.status==1){
  467. layer.msg(data.msg);
  468. location. reload()//刷新当前页面
  469. }
  470. }
  471. })
  472. }
  473. //刷新赛事数据
  474. function refreshall(game_code){
  475. var game_code = game_code;
  476. $.ajax({
  477. type: 'POST',
  478. dataType: 'json',
  479. url: '/setSports',
  480. data: {game_code:game_code},
  481. success: function(data) {
  482. // alert(data);
  483. if(data.status==1){
  484. layer.msg(data.msg);
  485. location. reload()//刷新当前页面
  486. }
  487. }
  488. })
  489. }
  490. </script>
  491. @push('dataTableJS')
  492. /*var active = {
  493. reload: function(){
  494. //执行重载
  495. table.reload('{{ $dataId }}', {
  496. page: {
  497. curr: 1 //重新从第 1 页开始
  498. }
  499. ,where: {
  500. account:$("#form_account").val(),
  501. register_ip:$('#form_register_ip').val(),
  502. last_ip:$('#form_last_ip').val(),
  503. register_url:$('#form_register_url').val(),
  504. last_url:$('#form_last_url').val(),
  505. regist_startime:$('#form_regist_startime').val(),
  506. regist_endtime:$('#form_regist_endtime').val(),
  507. statuss:$('#form_statuss').val(),
  508. cash_small:$('#form_cash_small').val(),
  509. cash_big:$('#form_cash_big').val(),
  510. sureblur:$('.layui-form-switch').text(),
  511. }
  512. });
  513. }
  514. };
  515. $('.lay-btn-diy').on('click', function(){
  516. var type = $(this).data('type');
  517. active[type] ? active[type].call(this) : '';
  518. });*/
  519. //重置表单
  520. $('.reset').on('click',function(){
  521. $('input').val('');
  522. $('#form_statuss').val('');
  523. //var type = $(this).data('type');
  524. //active[type] ? active[type].call(this) : '';
  525. });
  526. //刷新表单
  527. $('.set').on('click',function(){
  528. //var type = $(this).data('type');
  529. //active[type] ? active[type].call(this) : '';
  530. });
  531. @endpush
  532. @include('vip.datatable')
  533. @endsection