control.blade.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <!doctype html>
  2. @extends('base.base')
  3. @section('base')
  4. <!-- 内容区域 -->
  5. <style type="text/css">
  6. /*.table th {*/
  7. /* padding: 0.5375rem;*/
  8. /* vertical-align: top;*/
  9. /* border-top: 1px solid #ebedf2;*/
  10. /*}*/
  11. </style>
  12. <div class="main-panel">
  13. <div class="content-wrapper">
  14. <div class="page-header">
  15. <h3 class="page-title">
  16. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  17. <i class="mdi mdi-settings"></i>
  18. </span>
  19. {{ __('auto.群控配置') }}
  20. </h3>
  21. <nav aria-label="breadcrumb">
  22. <ol class="breadcrumb">
  23. <li class="breadcrumb-item"><a href="#">{{ __('auto.用户控制') }}</a></li>
  24. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.群控配置') }}</li>
  25. </ol>
  26. </nav>
  27. </div>
  28. <div class="row">
  29. <div class="col-lg-12 grid-margin stretch-card">
  30. <div class="card">
  31. <div class="card-body">
  32. <h4 class="card-title">{{ __('auto.群控配置') }}</h4>
  33. <form class="well form-inline margin-top-20" method="get"
  34. action='/admin/group_control/control'>
  35. <span style="padding-left: 5px">{{ __('auto.游戏:') }}</span>
  36. <select class="form-control" name="kind_id" value="{{$kind_id}}" id="select"
  37. onchange="gradeChange(this.options[this.options.selectedIndex].value)">
  38. <option value="">{{ __('auto.选择游戏') }}</option>
  39. @foreach($game_name as $k=>$v)
  40. <option value="{{$k}}" @if($k==$kind_id) selected @endif >{{$v}}</option>
  41. @endforeach
  42. </select>
  43. <span style="padding-left: 5px">{{ __('auto.房间:') }}</span>
  44. <select class="form-control" name="game_level" value="" id="game_level">
  45. <option value="">{{ __('auto.选择房间') }}</option>
  46. @foreach($room_list as $k=>$v)
  47. <option value="{{$v->GameID}}-{{$v->SortID}}"
  48. @if(($v->GameID.'-'.$v->SortID)==$game_level) selected @endif>{{$v->RoomName}}</option>
  49. @endforeach
  50. </select> &nbsp;&nbsp;
  51. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  52. <a href="/admin/group_control/control"
  53. class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}&{{ __('auto.刷新') }}</a>
  54. </form>
  55. <table class="table table-bordered">
  56. <thead>
  57. <tr>
  58. <th width="6%">{{ __('auto.游戏') }}ID</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="6%">{{ __('auto.当前触发系统赢概率') }}</th>
  70. <th width="15%">{{ __('auto.操作') }}</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. {{ gamesButton('/admin/group_control/control') }}
  75. @foreach($list as $k=>$v)
  76. <tr>
  77. <td>{{ $v->GameID }}</td>
  78. <td>{{$v->SortIDTxt}}</td>
  79. <td>{{ $v->KindName }}</td>
  80. <td>{{ $v->Revenue}}</td>
  81. <td>{{ $v->RevenueD}}</td>
  82. <td>{{ $v->RoomName }}</td>
  83. <td id="stock">{{ $v->Stock }}</td>
  84. <td>{{$v->TurnOver}}</td>
  85. <td>{{$v->Winlost}}</td>
  86. <td>{{$v->ShaLv}} %</td>
  87. <td>
  88. @if (!empty($v->LostRate))
  89. {{ __('auto.系统') }} <span style="color: green">{{ __('auto.输') }}</span> {{ __('auto.玩家') }}{{$v->LostRate}}
  90. @endif
  91. </td>
  92. <td>
  93. @if (!empty($v->WinRate))
  94. {{ __('auto.系统') }} <span style="color: red">{{ __('auto.赢') }}</span> {{ __('auto.玩家') }}{{$v->WinRate}}
  95. @endif
  96. </td>
  97. <td>
  98. <button type="button" class="btn btn-sm btn-gradient-dark"
  99. onclick="sync_res(this,{{$v->GameID}},{{$v->SortID}})">
  100. {{ __('auto.刷新') }}
  101. </button>
  102. <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
  103. onclick="show({{$v->GameID}},{{$v->SortID}})">
  104. {{ __('auto.查配置') }}
  105. </button>
  106. <button type="button"
  107. class="btn btn-sm btn-gradient-danger btn-icon-text"
  108. {{-- onclick="update_stock({{$v->ServerID}})">--}}
  109. onclick="update_stock({{$v->GameID}},{{$v->SortID}})">
  110. {{ __('auto.修改库存') }}
  111. </button>
  112. @if ($v->GameID == 3000)
  113. <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
  114. onclick="award_allocation()">
  115. {{ __('auto.奖项配置') }}
  116. </button>
  117. @endif
  118. @if ($v->GameID == 3050)
  119. <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
  120. onclick="gemstone()">
  121. {{ __('auto.奖项配置') }}
  122. </button>
  123. <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
  124. onclick="LuckyGemstoneMul()">
  125. {{ __('auto.钻石倍数') }}
  126. </button>
  127. @endif
  128. </td>
  129. </tr>
  130. @endforeach
  131. </tbody>
  132. </table>
  133. <div class="box-footer clearfix">
  134. {{ __('auto.总共') }} <b>{{ $list->appends([
  135. 'kind_id'=>$kind_id,
  136. 'gameType' => $gameType,
  137. 'game_level' => $game_level
  138. ])->total() }}</b>
  139. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  140. {!! $list->links() !!}
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. <script>
  149. function award_allocation() {
  150. var page = layer.open({
  151. type: 2,
  152. title: '{{ __('auto.奖项配置') }}',
  153. shadeClose: true,
  154. shade: 0.8,
  155. area: ['70%', '70%'],
  156. content: '/admin/group_control/award_allocation'
  157. });
  158. }
  159. function gemstone() {
  160. var page = layer.open({
  161. type: 2,
  162. title: '{{ __('auto.奖项配置') }}',
  163. shadeClose: true,
  164. shade: 0.8,
  165. area: ['70%', '70%'],
  166. content: '/admin/group_control/gemstone'
  167. });
  168. }
  169. function LuckyGemstoneMul() {
  170. var page = layer.open({
  171. type: 2,
  172. title: '{{ __('auto.奖项配置') }}',
  173. shadeClose: true,
  174. shade: 0.8,
  175. area: ['70%', '70%'],
  176. content: '/admin/group_control/LuckyGemstoneMul'
  177. });
  178. }
  179. function edit(id) {
  180. var page = layer.open({
  181. type: 2,
  182. title: '{{ __('auto.配置修改') }}',
  183. shadeClose: true,
  184. shade: 0.8,
  185. area: ['70%', '70%'],
  186. content: '/admin/gold/gameconfig/update/' + id
  187. });
  188. }
  189. function show(GameID, SortID) {
  190. layer.ready(function () {
  191. // 弹框代码
  192. var page = layer.open({
  193. type: 2,
  194. title: '{{ __('auto.查看配置') }}',
  195. shadeClose: true,
  196. shade: 0.8,
  197. area: ['70%', '70%'],
  198. content: '/admin/group_control/show_control_config/' + GameID + '?SortID=' + SortID,
  199. });
  200. })
  201. }
  202. // 修改库存
  203. function update_stock(GameID, SortID) {
  204. var page = layer.open({
  205. type: 2,
  206. title: '{{ __('auto.修改库存') }}',
  207. shadeClose: true,
  208. shade: 0.8,
  209. area: ['70%', '70%'],
  210. content: '/admin/gold/update_stock/' + GameID + '?SortID=' + SortID
  211. });
  212. }
  213. // 更新库存
  214. function sync_res(obj, GameID, SortID) {
  215. // 库存
  216. var Revenue = $(obj).parents('tr').find('td').eq(3);
  217. var RevenueD = $(obj).parents('tr').find('td').eq(4);
  218. var Stock = $(obj).parents('tr').find('td').eq(6);
  219. var TurnOver = $(obj).parents('tr').find('td').eq(7);
  220. var Winlost = $(obj).parents('tr').find('td').eq(8);
  221. var ShaLv = $(obj).parents('tr').find('td').eq(9);
  222. var LostRate = $(obj).parents('tr').find('td').eq(10);
  223. var WinRate = $(obj).parents('tr').find('td').eq(11);
  224. // 税收
  225. // var revenue = $(obj).parents('tr').find('td').eq(3);
  226. myRequest("/admin/group_control/sync_res/" + GameID, "post", {SortID}, function (res) {
  227. layer.msg(res.msg)
  228. if (res.code == 200) {
  229. LostRateText = WinRateText = ''
  230. if (res.data.LostRate != '') {
  231. LostRateText = `{{ __('auto.系统') }} {{ __('auto.输') }} {{ __('auto.玩家') }}` + res.data.LostRate
  232. }
  233. if (res.data.WinRate != '') {
  234. WinRateText = `{{ __('auto.系统') }} {{ __('auto.赢') }} {{ __('auto.玩家') }}` + res.data.WinRate
  235. }
  236. Revenue.text(res.data.Revenue);
  237. RevenueD.text(res.data.RevenueD);
  238. Stock.text(res.data.Stock);
  239. TurnOver.text(res.data.TurnOver);
  240. Winlost.text(res.data.Winlost);
  241. ShaLv.text(res.data.ShaLv + '%');
  242. LostRate.text(LostRateText);
  243. WinRate.text(WinRateText);
  244. }
  245. });
  246. }
  247. function gradeChange(value) {
  248. myRequest("/admin/group_control/roomList", "post", {'GameID': value}, function (res) {
  249. var data = res.data
  250. var html = ''
  251. for (var i of data) {
  252. html += '<option value=' + i['GameID'] + '-' + i['SortID'] + '>' + i['RoomName'] + '</option>'
  253. }
  254. console.log(html)
  255. $("#game_level").html(html)
  256. });
  257. }
  258. </script>
  259. @endsection