| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- @extends('vip.layouts')
- @section('seo_title')
- 篮球赛事
- @endsection
- @section('content')
- <style>
- .layui-laydate-range {
- width: auto;
- }
- .layui-form-switch em {
- width: auto;
- }
- .layui-form-switch {
- width: 44px;
- line-height: 23px;
- }
- .layui-form-item .checkbox {
- width: auto;
- }
- </style>
- <script type="text/html" id="liansai">
- @{{#if(d.match_id!=null){ }}
- <span>@{{ d.match_id}}</span>
- @{{#} }}<br>
- @{{#if(d.name_chinese!=null){ }}
- <span>@{{ d.name_chinese}}</span>
- @{{#} }}
- </script>
- <script type="text/html" id="matchstatus">
- @{{#if(d.status==0){ }}
- <span>未开始</span>
- @{{#} }}<br>
- @{{#if(d.status==1){ }}
- <span>进行中</span>
- @{{#} }}
- @{{#if(d.status==2){ }}
- <span>已结束</span>
- @{{#} }}
- </script>
-
- <script type="text/html" id="sectionone_two">
- <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}})">
- <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}})"> /
- <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}})">
- <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}})">
- </script>
- <script type="text/html" id="sectionthere_four">
- <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}})">
- <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}})"> /
- <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}})">
- <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}})">
- </script>
- <script type="text/html" id="status">
- @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
- </script>
- <div class="layui-row">
- <div class="layui-col-xs12">
- <form class="layui-form rewrite" eventType="eventForm" action="">
- <div class="layui-form-item">
- <div class="layui-inline">
- <label class="layui-form-label">{{ trans('sportsbk.sousuo') }}</label>
- <div class="layui-input-inline">
- <input type="text" name="home_team" id="home_team" eventType="event-query" value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input">
- </div>
- <div class="layui-input-inline checkbox">
- <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>
- <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query value="{{ $sureblurs }}">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">{{ trans('sportsbk.status') }}</label>
- <div class="layui-input-inline" style="width: 200px">
- <select name="status" id="form_status" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
- <option value="-1">{{ trans('sportsbk.select_status') }}</option>
- @foreach(trans('status.match_status.status') as $k=>$v):
- @if($status==$k))
- <option value="{{$k}}" selected="selected">{{$v}}</option>
- @else
- <option value="{{$k}}">{{$v}}</option>
- @endif
- @endforeach
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">{{ trans('sportsbk.sjsource') }}</label>
- <div class="layui-input-inline" style="width: 200px">
- <select name="source" id="form_source" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
- <option value="">请选择{{ trans('sportsbk.sjsource') }}</option>
- @foreach(trans('status.sjsource.source') as $k=>$v):
- @if($source==$k)
- <option value={{$v}} selected>{{$v}}</option>
- @else
- <option value={{$v}}>{{$v}}</option>
- @endif
- @endforeach
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <a class="layui-btn layui-btn-sm lay-btn-diy" data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
- <a class="layui-btn layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
- <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>
- @if(checkRriv('/admin/sportsbk/addoutcome'))<a href="/admin/sportsbk/addoutcome" class="layui-btn layui-btn-sm ">添加</a>@endif
- @if(checkRriv('/admin/sportsbk/deleteoutcome'))<a href="javascript:delWin('/admin/sportsbk/deleteoutcome?id=');" class="layui-btn layui-btn-sm layui-btn-danger">删除</a>@endif
- </div>
- </div>
- </form>
- </div>
- </div>
- <script type="text/javascript">
- $(function () {
- $('body').on('click', 'a[eventtype="event-delete"]', function () {
- var span = $(this).prev();
- var id = span.attr('data-id');
- // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
- })
- $('body').on('click','#form_sureblur~.layui-form-switch',function(){
- var sus = $('#form_sureblur').next().text();
- if(sus=='精确'){
- $('#form_sureblurs').val('on');
- }else{
- $('#form_sureblurs').val('off');
- }
- })
- })
- //修改赛事比分 only:唯一 num:inputval match_id:match_id
- function teamscore(only,num,match_id){
- var only = only;
- var num = num;
- var match_id = match_id;
- var reg = /^[0-99]\d*$/;
- var okteamscore = $("#okteamscore"+match_id).val();
- var ozteamscore = $("#ozteamscore"+match_id).val();
- var tkteamscore = $("#tkteamscore"+match_id).val();
- var tzteamscore = $("#tzteamscore"+match_id).val();
- var skteamscore = $("#skteamscore"+match_id).val();
- var szteamscore = $("#szteamscore"+match_id).val();
- var akteamscore = $("#akteamscore"+match_id).val();
- var azteamscore = $("#azteamscore"+match_id).val();
- // alert(azteamscore);
- // alert(akteamscore);
- if(reg.test(num)==false){
- layer.msg('不能为空值');
- reloadDataTable();return;
- }
- $.ajax({
- type: 'POST',
- dataType: 'json',
- url: '/admin/Sportsbk/updatascore',
- 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},
- success: function(data) {
- if(data.status==1){
- layer.msg(data.msg);
- location. reload()//刷新当前页面
- }
- }
- })
- }
- //刷新赛事数据
- function refreshall(game_code){
- var game_code = game_code;
- $.ajax({
- type: 'POST',
- dataType: 'json',
- url: '/setSports',
- data: {game_code:game_code},
- success: function(data) {
- alert(data);
- if(data.status==1){
- layer.msg(data.msg);
- location. reload()//刷新当前页面
- }
- }
- })
- }
- </script>
- @push('dataTableJS')
- /*var active = {
- reload: function(){
- //执行重载
- table.reload('{{ $dataId }}', {
- page: {
- curr: 1 //重新从第 1 页开始
- }
- ,where: {
- account:$("#form_account").val(),
- register_ip:$('#form_register_ip').val(),
- last_ip:$('#form_last_ip').val(),
- register_url:$('#form_register_url').val(),
- last_url:$('#form_last_url').val(),
- regist_startime:$('#form_regist_startime').val(),
- regist_endtime:$('#form_regist_endtime').val(),
- statuss:$('#form_statuss').val(),
- cash_small:$('#form_cash_small').val(),
- cash_big:$('#form_cash_big').val(),
- sureblur:$('.layui-form-switch').text(),
- }
- });
- }
- };
- $('.lay-btn-diy').on('click', function(){
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });*/
- //重置表单
- $('.reset').on('click',function(){
- $('input').val('');
- $('#form_statuss').val('');
- //var type = $(this).data('type');
- //active[type] ? active[type].call(this) : '';
- });
- //刷新表单
- $('.set').on('click',function(){
- //var type = $(this).data('type');
- //active[type] ? active[type].call(this) : '';
- });
- @endpush
- @include('vip.datatable')
- @endsection
|