demo_gameconfig.blade.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <style type="text/css">
  5. .table th {
  6. padding: 0.5375rem;
  7. vertical-align: top;
  8. border-top: 1px solid #ebedf2;
  9. }
  10. </style>
  11. <div class="main-panel">
  12. <div class="content-wrapper">
  13. <div class="page-header">
  14. <h3 class="page-title">
  15. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  16. <i class="mdi mdi-settings"></i>
  17. </span>
  18. {{ __('auto.试玩场游戏配置修改') }}
  19. </h3>
  20. <nav aria-label="breadcrumb">
  21. <ol class="breadcrumb">
  22. <li class="breadcrumb-item"><a href="#">{{ __('auto.金币场管理') }}</a></li>
  23. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.游戏配置修改') }}</li>
  24. </ol>
  25. </nav>
  26. </div>
  27. <div class="row">
  28. <div class="col-lg-12 grid-margin stretch-card">
  29. <div class="card">
  30. <div class="card-body">
  31. <h4 class="card-title">{{ __('auto.试玩场游戏配置修改') }}</h4>
  32. <form class="well form-inline margin-top-20" method="get" action='/admin/gold/demo_gameconfig'>
  33. <span style="padding-left: 5px">{{ __('auto.游戏:') }}</span>
  34. <select class="form-control" name="kind_id" value="{{$kind_id}}" id="select"
  35. onchange="gradeChange(this.options[this.options.selectedIndex].value)">
  36. <option value="">{{ __('auto.选择游戏') }}</option>
  37. @foreach($game_name as $k=>$v)
  38. <option value="{{$k}}" @if($k==$kind_id) selected @endif >{{$v}}</option>
  39. @endforeach
  40. </select>
  41. <span style="padding-left: 5px">{{ __('auto.房间:') }}</span>
  42. <select class="form-control" name="game_level" value="" id="game_level">
  43. <option value="">{{ __('auto.选择房间') }}</option>
  44. @foreach($room_list as $k=>$v)
  45. <option value="{{$v->ServerID}}"
  46. @if($v->ServerID==$game_level) selected @endif>{{$v->ServerName}}</option>
  47. @endforeach
  48. </select> &nbsp;&nbsp;
  49. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  50. <a href="/admin/gold/demo_gameconfig" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>
  51. </form>
  52. <table class="table table-bordered">
  53. <thead>
  54. <tr>
  55. <th width="6%">{{ __('auto.游戏') }}ID</th>
  56. <th width="6%">{{ __('auto.游戏类型') }}</th>
  57. <th width="6%">{{ __('auto.游戏名称') }}</th>
  58. <th width="6%">{{ __('auto.房间累计税收') }}</th>
  59. <th width="6%">{{ __('auto.游戏房间') }}</th>
  60. <th width="6%">{{ __('auto.游戏库存') }}</th>
  61. <th width="6%">{{ __('auto.当前触发概率') }}</th>
  62. <th width="6%">{{ __('auto.档位基准值') }}</th>
  63. <th width="6%">{{ __('auto.系统赢初始概率') }}</th>
  64. <th width="6%">{{ __('auto.系统输初始概率') }}</th>
  65. <th width="6%">{{ __('auto.系统赢增加概率/档位') }}</th>
  66. <th width="6%">{{ __('auto.系统赢增加概率上限') }}</th>
  67. <th width="6%">{{ __('auto.系统输增加概率/档位') }}</th>
  68. <th width="6%">{{ __('auto.系统输增加概率上限') }}</th>
  69. <th width="10%">{{ __('auto.操作') }}</th>
  70. </tr>
  71. </thead>
  72. <tbody>
  73. @foreach($list as $k=>$v)
  74. <tr>
  75. <td>{{ $v->KindID }}</td>
  76. <td>{{ __('auto.试玩场') }}</td>
  77. <td>{{ $v->KindName }}</td>
  78. <td>{{ $v->Revenue}}</td>
  79. <td>{{ $v->ServerName }}</td>
  80. <td id="stock">{{ $v->RoomStock }}</td>
  81. <td>
  82. @if ($v->RoomStock < 0 and $v->gailv != '')
  83. {{ __('auto.系统') }} <span style="color: red">{{ __('auto.赢') }}</span> {{ __('auto.玩家') }}
  84. {{$v->gailv}}%
  85. @elseif($v->RoomStock > 0 and $v->gailv != '')
  86. {{ __('auto.系统') }} <span style="color: green">{{ __('auto.输') }}</span> {{ __('auto.玩家') }}
  87. {{$v->gailv}}%
  88. @endif
  89. </td>
  90. <td>{{ $v->BaseScore}}</td>
  91. <td>{{ $v->WinInitPercent}}</td>
  92. <td>{{ $v->LostInitPercent}}</td>
  93. <td>{{ $v->WinBasePercent}}</td>
  94. <td>{{ $v->WinMaxPercent}}</td>
  95. <td>{{ $v->LostBasePercent}}</td>
  96. <td>{{ $v->LostMaxPercent}}</td>
  97. <td>
  98. @if (empty(hidden()) || hidden() == 'general_administrator')
  99. <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text"
  100. onclick="edit({{ $v->gi_ServerID }})">
  101. {{ __('auto.修改') }}
  102. </button>
  103. @endif
  104. <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
  105. onclick="show({{$v->gi_ServerID}})">
  106. {{ __('auto.查配置') }}
  107. </button>
  108. <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
  109. onclick="sync_stock(this,{{$v->gi_ServerID}})">
  110. {{ __('auto.更新库存') }}
  111. </button>
  112. </td>
  113. </tr>
  114. @endforeach
  115. </tbody>
  116. </table>
  117. <div class="box-footer clearfix">
  118. {{ __('auto.总共') }} <b>{{ $list->appends(['kind_id'=>$kind_id])->total() }}</b>
  119. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  120. {!! $list->links() !!}
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <script>
  129. let demo = {{$demo}}
  130. function edit(id) {
  131. var page = layer.open({
  132. type: 2,
  133. title: '{{ __('auto.配置修改') }}',
  134. shadeClose: true,
  135. shade: 0.8,
  136. area: ['70%', '90%'],
  137. content: '/admin/gold/gameconfig/update/' + id
  138. });
  139. }
  140. function show(value) {
  141. var page = layer.open({
  142. type: 2,
  143. title: '{{ __('auto.查看配置') }}',
  144. shadeClose: true,
  145. shade: 0.8,
  146. area: ['50%', '60%'],
  147. content: '/admin/global/show_config/' + value
  148. });
  149. }
  150. function sync_stock(obj, serverID) {
  151. // 库存
  152. var stock = $(obj).parents('tr').find('td').eq(5);
  153. // 税收
  154. var revenue = $(obj).parents('tr').find('td').eq(3);
  155. myRequest("/admin/gold/sync_stock/" + serverID, "post", {}, function (res) {
  156. layer.msg(res.msg)
  157. if (res.code == 200) {
  158. stock.text(res.data.data.stock);
  159. revenue.text(res.data.data.revenue);
  160. }
  161. });
  162. }
  163. function gradeChange(value) {
  164. console.log(demo)
  165. myRequest("/admin/gold/roomlist", "post", {'GameID': value,'demo':demo}, function (res) {
  166. // layer.msg(res.msg)
  167. var data = res.data
  168. var html = ''
  169. for (var i of data) {
  170. html += '<option value=' + i['ServerID'] + '>' + i['ServerName'] + '</option>'
  171. }
  172. $("#game_level").html(html)
  173. });
  174. }
  175. </script>
  176. @endsection