edit.blade.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @extends('vip.layouts')
  2. @section('content')
  3. <form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType=eventAjaxForm>
  4. {!! csrf_field() !!}
  5. <div class="layui-form-item">
  6. <label class="layui-form-label">球类代码</label>
  7. <div class="layui-input-block">
  8. <input type="text" name="game_type" required lay-verify="required" placeholder="请输入主动名称" autocomplete="off" value="{{ isset($data['game_type'])?$data['game_type']:'' }}" class="layui-input">
  9. </div>
  10. </div>
  11. <div class="layui-form-item">
  12. <label class="layui-form-label">赔率玩法代码</label>
  13. <div class="layui-input-block">
  14. <input type="text" name="odds_code" lay-verify="" placeholder="请输入客队名称" autocomplete="off" class="layui-input" value="{{ isset($data['odds_code'])?$data['odds_code']:'' }}" >
  15. </div>
  16. </div>
  17. <div class="layui-form-item">
  18. <label class="layui-form-label">赔率名称</label>
  19. <div class="layui-input-block">
  20. <input type="text" name="odds_name" lay-verify="" placeholder="请输入客队让球数" autocomplete="off" class="layui-input" value="{{ isset($data['odds_name'])?$data['odds_name']:'' }}" >
  21. </div>
  22. </div>
  23. <div class="layui-form-item">
  24. <label class="layui-form-label">{{ trans('matchcode.p_id') }}:</label>
  25. <div class="layui-input-block">
  26. <select name="p_id" id="p_id" lay-filter = 'sect' lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
  27. <option value="@if($data['p_id']) {{$data['p_id']}} @else 0 @endif "> {{ trans('matchcode.choice') }}</option>
  28. @foreach($djid as $k=>$v)
  29. <option value="{{$v['id']}}">{{$v['odds_name']}}</option>
  30. @endforeach
  31. </select>
  32. </div>
  33. </div>
  34. @if(S('ACTION')!='view')
  35. <div class="layui-form-item">
  36. <div class="layui-input-block">
  37. <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
  38. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  39. </div>
  40. </div>
  41. @endif
  42. </form>
  43. <script>
  44. //Demo
  45. layui.use(['form'], function(){
  46. var form = layui.form;
  47. //监听提交
  48. form.on('submit(submitForm)', function(data){
  49. return true;
  50. });
  51. });
  52. function cbFormSuccess(data){
  53. layer.msg(data.msg);
  54. setTimeout(function(){
  55. parent.window.location.reload();
  56. },2500);
  57. }
  58. </script>
  59. @endsection