update_stock_log.blade.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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/update_stock_log'>
  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="ServerID" 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==$ServerID) selected @endif>{{$v->ServerName}}</option>
  47. @endforeach
  48. </select> &nbsp;&nbsp;
  49. <spen style="padding-left: 10px" >{{ __('auto.选择时间:') }}</spen>
  50. <input type="datetime-local" step="01" name="start_time" id="start_time"
  51. class="form-control" value="{{$start_time}}" onclick="start_times()"/>
  52. <input type="datetime-local" step="01" name="end_time" id='end_time'
  53. class="form-control" value="{{$end_time}}" onclick="end_times()"/>
  54. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  55. <a href="/admin/gold/update_stock_log" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>
  56. </form>
  57. <table class="table table-bordered">
  58. <thead>
  59. <tr>
  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. </tr>
  67. </thead>
  68. <tbody>
  69. @foreach($list as $k=>$v)
  70. <tr>
  71. <td>{{ $v->ServerName }}</td>
  72. <td>{{$v->account}}</td>
  73. <td>{{ $v->create_time }}</td>
  74. <td>{{ $v->content}}</td>
  75. <td>{{ $v->BeforeStock}}</td>
  76. <td>{{ $v->AfterStock }}</td>
  77. </tr>
  78. @endforeach
  79. </tbody>
  80. </table>
  81. <div class="box-footer clearfix">
  82. {{ __('auto.总共') }} <b>{{ $list->appends([
  83. 'kind_id'=>$kind_id,
  84. 'start_time' => $start_time,
  85. 'end_time' => $end_time,
  86. 'ServerID' => $ServerID,
  87. 'kind_id' => $kind_id,
  88. ])->total() }}</b>
  89. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  90. {!! $list->links() !!}
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <script>
  99. function start_times() {
  100. getFormat('00', '00', '00');
  101. document.getElementById("start_time").value = format
  102. }
  103. function end_times() {
  104. getFormat('23', '59', '59');
  105. document.getElementById("end_time").value = format
  106. }
  107. function edit(id) {
  108. var page = layer.open({
  109. type: 2,
  110. title: '{{ __('auto.配置修改') }}',
  111. shadeClose: true,
  112. shade: 0.8,
  113. area: ['50%', '90%'],
  114. content: '/admin/gold/gameconfig/update/' + id
  115. });
  116. }
  117. function show(value) {
  118. var page = layer.open({
  119. type: 2,
  120. title: '{{ __('auto.查看配置') }}',
  121. shadeClose: true,
  122. shade: 0.8,
  123. area: ['50%', '60%'],
  124. content: '/admin/global/show_config/' + value
  125. });
  126. }
  127. // 修改库存
  128. function update_stock(serverID) {
  129. var page = layer.open({
  130. type: 2,
  131. title: '{{ __('auto.修改库存') }}',
  132. shadeClose: true,
  133. shade: 0.8,
  134. area: ['50%', '80%'],
  135. content: '/admin/gold/update_stock/' + serverID
  136. });
  137. }
  138. // 更新库存
  139. function sync_stock(obj, serverID) {
  140. // 库存
  141. var stock = $(obj).parents('tr').find('td').eq(6);
  142. // 税收
  143. // var revenue = $(obj).parents('tr').find('td').eq(3);
  144. myRequest("/admin/gold/sync_stock/" + serverID, "post", {}, function (res) {
  145. layer.msg(res.msg)
  146. if (res.code == 200) {
  147. stock.text(res.data.data.stock);
  148. // revenue.text(res.data.data.revenue);
  149. }
  150. });
  151. }
  152. function gradeChange(value) {
  153. myRequest("/admin/gold/roomlist", "post", {'GameID': value}, function (res) {
  154. // layer.msg(res.msg)
  155. var data = res.data
  156. var html = ''
  157. for (var i of data) {
  158. html += '<option value=' + i['ServerID'] + '>' + i['ServerName'] + '</option>'
  159. }
  160. $("#game_level").html(html)
  161. });
  162. }
  163. </script>
  164. @endsection