list.blade.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. @extends('base.base')
  2. @section('base')
  3. <style>
  4. .form-inline .form-group {
  5. margin-bottom: 10px;
  6. }
  7. </style>
  8. <!-- 内容区域 -->
  9. <div class="main-panel">
  10. <div class="content-wrapper">
  11. <div class="page-header">
  12. <h3 class="page-title">
  13. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  14. <i class="mdi mdi-settings"></i>
  15. </span>
  16. {{ __('auto.咖啡查询') }}
  17. </h3>
  18. <nav aria-label="breadcrumb">
  19. <ol class="breadcrumb">
  20. <li class="breadcrumb-item"><a href="#">{{ __('auto.咖啡管理') }}</a></li>
  21. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.咖啡查询') }}</li>
  22. </ol>
  23. </nav>
  24. </div>
  25. <div class="row">
  26. <div class="col-lg-12 grid-margin stretch-card">
  27. <div class="card">
  28. <div class="card-body">
  29. <h4 class="card-title">{{ __('auto.咖啡查询') }}</h4>
  30. {{-- <form class="well form-group margin-top-20" method="get" action='/admin/recharge/list'>--}}
  31. <form class="well form-inline margin-top-20" method="get">
  32. <div>
  33. <div class="form-group">
  34. <span style="padding-left: 10px">{{ __('auto.咖啡单号:') }}</span>
  35. <input class="form-control" type="text" name="order_sn" style="width: 10%; "
  36. value="{{$order_sn}}">
  37. <span style="padding-left: 10px">{{ __('auto.玩家ID:') }}</span>
  38. <input class="form-control" type="text" name="UserID" style="width: 10%; "
  39. value="{{$UserID}}">&nbsp;
  40. <span style="padding-left: 10px">{{ __('auto.咖啡状态:') }}</span>
  41. <select class="form-control" name="recharge_type" value="" style="color: black">
  42. <option value="">{{ __('auto.请选择') }}</option>
  43. <option value="1" @if ($recharge_type == 1) selected
  44. @endif >{{ __('auto.已到账') }}
  45. </option>
  46. <option value="2" @if ($recharge_type == 2) selected
  47. @endif>{{ __('auto.咖啡失败') }}
  48. <option value="3" @if ($recharge_type == 3) selected
  49. @endif>{{ __('auto.未支付') }}
  50. </option>
  51. </select>&nbsp;
  52. <span style="padding-left: 10px">{{ __('auto.渠道搜索:') }}</span>
  53. <select class="form-control" name="Channel" value="" style="color: black">
  54. <option value="">{{ __('auto.请选择') }}</option>
  55. @foreach($allChannel as $key=>$val)
  56. <option value="{{$val}}"
  57. @if($val == $Channel) selected @endif>{{$val}}</option>
  58. @endforeach
  59. </select>
  60. <span style="padding-left: 10px">{{ __('auto.选择创建时间:') }}</span>
  61. <select class="form-control" name="date" style="color: black">
  62. <option value="">{{ __('auto.选择时间') }}</option>
  63. @foreach($dates as $key=>$val)
  64. <option value="{{$key}}" @if ($key == $date)
  65. selected
  66. @endif>{{$val}}</option>
  67. @endforeach
  68. </select>&nbsp;&nbsp;
  69. <span style="padding-left: 10px">{{ __('auto.咖啡渠道:') }}</span>
  70. <select class="form-control" name="type" value="{{$type}}" style="color: black">
  71. <option value="">{{ __('auto.选择类别') }}</option>
  72. @foreach($type_list as $k=>$v)
  73. <option value="{{$v}}" @if($v==$type) selected @endif>{{$v}}</option>
  74. @endforeach
  75. </select>
  76. </div>
  77. <div class="form-group">
  78. <span style="padding-left: 10px">{{ __('auto.选择支付时间') }}({{ __('auto.当地') }}):</span>
  79. <input type="datetime-local" step="01" name="start_time" class="form-control" id="start_time"
  80. value="{{$start_time}}" onclick="start_times('start_time')"/>&nbsp;&nbsp;
  81. <input type="datetime-local" step="01" name="end_time" class="form-control" id="end_time"
  82. value="{{$end_time}}" onclick="end_times('end_time')"/>&nbsp;&nbsp;
  83. <span style="padding-left: 10px">{{ __('auto.选择支付时间') }}({{ __('auto.中国') }}):</span>
  84. <input type="datetime-local" step="01" name="start_time_cn" class="form-control" id="start_time_cn"
  85. value="{{$request->start_time_cn}}" onclick="start_times('start_time_cn')"/>&nbsp;&nbsp;
  86. <input type="datetime-local" step="01" name="end_time_cn" class="form-control" id="end_time_cn"
  87. value="{{$request->end_time_cn}}" onclick="end_times('end_time_cn')"/>
  88. <span style="padding-left: 10px;">{{ __('auto.按单价排序:') }}</span>
  89. <input type="radio" name="order" value="1">&nbsp;
  90. </div>
  91. <div class="form-group">
  92. <span style="padding-left: 10px">{{ __('auto.订单创建时间') }}({{ __('auto.当地') }}):</span>
  93. <input type="datetime-local" step="01" name="create_start_time" class="form-control" id="create_start_time"
  94. value="{{$create_start_time}}" onclick="create_start_times()"/>&nbsp;&nbsp;
  95. <input type="datetime-local" step="01" name="create_end_time" class="form-control" id="create_end_time"
  96. value="{{$create_end_time}}" onclick="create_end_times()"/>
  97. <span style="padding-left: 10px">{{ __('auto.用户注册日期:') }}</span>
  98. <input type="datetime-local" step="01" name="register_start_time" class="form-control" id="register_start_time"
  99. value="{{$register_start_time}}" onclick="register_start_timeFunc()"/>&nbsp;&nbsp;
  100. <input type="datetime-local" step="01" name="register_end_time" class="form-control" id="register_end_time"
  101. value="{{$register_end_time}}" onclick="register_end_timeFunc()"/>
  102. <span style="padding-left: 10px">{{ __('auto.咖啡来源:') }}</span>
  103. <select class="form-control" name="source" value="{{$source}}" style="color: black">
  104. <option value="">{{ __('auto.选择类别') }}</option>
  105. @foreach($sourceList as $k=>$v)
  106. <option value="{{$k}}" @if ($source == $k)
  107. selected
  108. @endif>{{$v}}</option>
  109. @endforeach
  110. </select>
  111. <span style="padding-left: 10px">{{ __('auto.咖啡档位筛选:') }}</span>
  112. <select class="form-control" name="chargeMoney" value="" style="color: black">
  113. <option value="">{{ __('auto.选择类别') }}</option>
  114. @foreach($chargeMoneyList as $k=>$v)
  115. <option value="{{$v}}" @if ($chargeMoney == $v)
  116. selected
  117. @endif>{{$v}}</option>
  118. @endforeach
  119. </select>
  120. <input type="hidden" name="isEmpty" value="{{$isEmpty}}">
  121. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  122. <a href="?isEmpty=1"
  123. class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>&nbsp;&nbsp;
  124. <a href="?excel=1&start_time={{$start_time}}&end_time={{$end_time}}&recharge_type={{$recharge_type}}&UserID={{$UserID}}&type={{$type}}&order={{$order}}&date={{$date}}&create_start_time={{$create_start_time}}&create_end_time={{$create_end_time}}&isEmpty=1"
  125. class="btn btn-sm btn-gradient-light btn-icon-text">{{ __('auto.导出') }}</a>
  126. </div>
  127. </div>
  128. </form>
  129. <table class="table table-bordered" id="tables">
  130. <thead>
  131. <tr>
  132. <th width="5%" ondblclick="copyText(1)">ID</th>
  133. <th width="8%" ondblclick="copyText(2)">{{ __('auto.订单号') }}</th>
  134. <th width="8%">{{ __('auto.支付完成时间') }}({{ __('auto.当地') }})</th>
  135. <th width="8%">{{ __('auto.支付完成时间') }}({{ __('auto.中国') }})</th>
  136. <th width="10%">
  137. <div class="sort_money">
  138. {{ __('auto.咖啡金额') }}
  139. <svg t="1611284352657" class="icon2" onclick="sort_money_func(this,'asc')"
  140. viewBox="0 0 1024 1024" version="1.1"
  141. xmlns="http://www.w3.org/2000/svg" p-id="4118" width="14">
  142. <path
  143. d="M541.866667 285.866667l345.6 345.6c17.066667 17.066667 17.066667 42.666667 0 59.733333-8.533333 8.533333-19.2 12.8-29.866667 12.8H168.533333c-23.466667 0-42.666667-19.2-42.666666-42.666667 0-10.666667 4.266667-21.333333 12.8-29.866666l343.466666-345.6c17.066667-17.066667 42.666667-17.066667 59.733334 0z"
  144. p-id="4119" fill="#707072">
  145. </path>
  146. </svg>
  147. <svg t="1611283709864" class="icon1" onclick="sort_money_func(this,'desc')"
  148. viewBox="0 0 1024 1024" version="1.1"
  149. xmlns="http://www.w3.org/2000/svg" p-id="3148" width="14">
  150. <path
  151. d="M482.133333 738.133333L136.533333 392.533333c-17.066667-17.066667-17.066667-42.666667 0-59.733333 8.533333-8.533333 19.2-12.8 29.866667-12.8h689.066667c23.466667 0 42.666667 19.2 42.666666 42.666667 0 10.666667-4.266667 21.333333-12.8 29.866666L541.866667 738.133333c-17.066667 17.066667-42.666667 17.066667-59.733334 0z"
  152. p-id="3149" fill="#707071">
  153. </path>
  154. </svg>
  155. </div>
  156. </th>
  157. <th width="8%">{{ __('auto.变化后余额') }}</th>
  158. <th width="8%">{{ __('auto.当前余额') }}</th>
  159. <th width="8%">{{ __('auto.最高分') }}</th>
  160. <th width="8%">{{ __('auto.最多赢分') }}</th>
  161. <th width="8%">{{ __('auto.咖啡来源') }}</th>
  162. <th width="8%">支付渠道</th>
  163. <th width="7%">{{ __('auto.咖啡玩家') }}ID</th>
  164. <th width="8%">{{ __('auto.状态') }}</th>
  165. <th width="8%">{{ __('auto.来源') }}</th>
  166. <th width="7%">{{ __('auto.玩家渠道') }}</th>
  167. <th width="8%">{{ __('auto.订单生成日期') }}({{ __('auto.当地') }})</th>
  168. <th width="8%">{{ __('auto.订单生成日期') }}({{ __('auto.中国') }})</th>
  169. <th width="8%">{{ __('auto.操作') }}</th>
  170. <th width="8%">{{ __('auto.添加备注') }}</th>
  171. <th width="8%">{{ __('auto.操作人') }}</th>
  172. </tr>
  173. </thead>
  174. <tbody>
  175. @if (hidden() != 'service')
  176. <div>
  177. @if (!empty($chargeMoney))
  178. <h4> {{$chargeMoney}} {{ __('auto.档位') }}</h4>
  179. @endif
  180. <h4>{{ __('auto.总金额:') }}{{$totalMoney}} &nbsp;&nbsp; {{$payTotalMoney->count_u ?? 0}}{{ __('auto.人') }}&nbsp;&nbsp;{{$payTotalMoney->count_id ?? 0}}{{ __('auto.笔') }}</h4>
  181. <h4>{{ __('auto.已到账:') }}{{$overMoney}} &nbsp;&nbsp;{{$payOverMoney->count_u ?? 0}}{{ __('auto.人') }}&nbsp;&nbsp;{{$payOverMoney->count_id ?? 0}}{{ __('auto.笔') }}</h4>
  182. </div>
  183. @endif
  184. @foreach($list as $k=>$v)
  185. <tr id="hidden_td">
  186. <td class="first_str">{{ $v->id }}</td>
  187. <td>{{ $v->order_sn }}</td>
  188. <td>{{$v->finished_at}}</td>
  189. <td>{{$v->finished_at ? dateConvert($v->finished_at) : ''}}</td>
  190. <td>{{ $v->amount }}</td>
  191. <td>{{ $v->after_amount }}</td>
  192. <td>{{ $v->score }}</td>
  193. <td>{{ $v->MaxScore }}</td>
  194. <td>{{ $v->MaxWinScore }}</td>
  195. <td>{{$v->payment_code}}</td>
  196. <td>{{@$payMethods[$v->order_title]??''}}</td>
  197. <td>
  198. <a href="/admin/global/id_find?UserID={{$v->UserID}}">
  199. {{$v->ai_GameID}}
  200. </a>
  201. @if ($v->Phone )
  202. <a target="_blank"
  203. href="https://api.whatsapp.com/send?phone=55{{$v->Phone}}">what's app</a>
  204. @endif
  205. </td>
  206. <td>
  207. @if ($v->pay_status == 1)
  208. <span style="color: #0b2e13">{{ __('auto.已到账') }}</span>
  209. @elseif($v->pay_status == 0)
  210. <span>{{ __('auto.未支付') }}</span>
  211. @else
  212. <span style="color: red">{{ __('auto.咖啡出错') }}</span>
  213. @endif
  214. </td>
  215. <td>{{$v->GiftsName}}</td>
  216. <td>{{$v->Channel}}</td>
  217. <td>{{$v->created_at}}</td>
  218. <td>{{ dateConvert($v->created_at) }}</td>
  219. <td>
  220. @if (in_array(session('admin')->roles[0]->id,[1,12])&&$v->pay_status != 1)
  221. <button type="button" class="btn-sm btn-primary"
  222. onclick="supplement({{$v->id}})">{{ __('auto.补单') }}
  223. </button>
  224. @endif
  225. </td>
  226. <td contentEditable="true"
  227. onblur="remarks(this,{{$v->id}})">{{$v->ar_remarks}}</td>
  228. <td>
  229. {{$v->account}}
  230. </td>
  231. </tr>
  232. @endforeach
  233. </tbody>
  234. </table>
  235. <div class="box-footer clearfix">
  236. {{ __('auto.总共') }}
  237. <b>{{ $list->appends([
  238. 'start_time'=>$start_time,
  239. 'UserID'=>$UserID,
  240. 'end_time'=>$end_time,
  241. 'order'=>$order,
  242. 'type'=>$type,
  243. 'recharge_type'=>$recharge_type,
  244. 'date'=>$date,
  245. 'create_start_time'=>$create_start_time,
  246. 'create_end_time'=>$create_end_time,
  247. 'Channel'=>$Channel,
  248. 'isEmpty'=>$isEmpty,
  249. 'register_start_time' => $register_start_time,
  250. 'register_end_time' => $register_end_time,
  251. 'source' => $source,
  252. 'chargeMoney' => $chargeMoney,
  253. 'amountSort' => $amountSort
  254. ])->total() }}</b>
  255. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  256. {!! $list->links() !!}
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. <script>
  265. var params = {
  266. 'start_time' : '{{$start_time}}',
  267. 'UserID':'{{$UserID}}',
  268. 'end_time':'{{$end_time}}',
  269. 'order':'{{$order}}',
  270. 'type':'{{$type}}',
  271. 'recharge_type':'{{$recharge_type}}',
  272. 'date':'{{$date}}',
  273. 'create_start_time':'{{$create_start_time}}',
  274. 'create_end_time':'{{$create_end_time}}',
  275. 'Channel':'{{$Channel}}',
  276. 'isEmpty':'{{$isEmpty}}',
  277. 'register_start_time' : '{{$register_start_time}}',
  278. 'register_end_time' :'{{$register_end_time}}',
  279. 'source' : '{{$source}}',
  280. 'chargeMoney' : '{{$chargeMoney}}',
  281. }
  282. function start_times(id) {
  283. getFormat('00', '00', '00');
  284. document.getElementById(id).value = format
  285. }
  286. function end_times(id) {
  287. getFormat('23', '59', '59');
  288. document.getElementById(id).value = format
  289. }
  290. function create_start_times() {
  291. getFormat('00', '00', '00');
  292. document.getElementById("create_start_time").value = format
  293. }
  294. function create_end_times() {
  295. getFormat('23', '59', '59');
  296. document.getElementById("create_end_time").value = format
  297. }
  298. function register_start_timeFunc(){
  299. getFormat('00', '00', '00');
  300. document.getElementById("register_start_time").value = format
  301. }
  302. function register_end_timeFunc(){
  303. getFormat('23', '59', '59');
  304. document.getElementById("register_end_time").value = format
  305. }
  306. function sort_money_func(obj, val) {
  307. if (val == 'asc') {
  308. $(".sort_money svg:eq(1)").children('path').attr('fill', '#707071');
  309. $(obj).children('path').attr('fill', 'red')
  310. } else {
  311. $(obj).children('path').attr('fill', 'red')
  312. $(".sort_money svg:eq(0)").children('path').attr('fill', '#707071');
  313. }
  314. params.amountSort = val
  315. $.ajax({
  316. type: "get",
  317. url: "/admin/recharge/list",
  318. headers: {
  319. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  320. },
  321. data: params,
  322. success: function (msg) {
  323. if (msg) {
  324. $(".main-panel").html(msg)
  325. }
  326. }
  327. })
  328. }
  329. function remarks(obj, RecordID) {
  330. let remark = $(obj).html();
  331. let type = 2
  332. if (remark != ''){
  333. myRequest("/admin/withdrawal/remarks/" + RecordID, "post", {remark,type}, function (res) {
  334. layer.msg(res.msg)
  335. setTimeout(function () {
  336. window.location.reload();
  337. }, 1500)
  338. });
  339. }
  340. }
  341. function supplement(id) {
  342. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  343. myRequest("/admin/recharge/supplement/" + id, "post", {}, function (res) {
  344. layer.msg(res.msg)
  345. setTimeout(function () {
  346. window.location.reload();
  347. }, 1500)
  348. });
  349. });
  350. }
  351. $(function () {
  352. cutStr(50);
  353. });
  354. function update(id) {
  355. myConfirm("{{ __('auto.处理操作不可逆,是否继续') }}?", function () {
  356. myRequest("/admin/accusation/edit/" + id, "post", {}, function (res) {
  357. layer.msg(res.msg)
  358. setTimeout(function () {
  359. window.location.reload();
  360. }, 1500)
  361. });
  362. });
  363. }
  364. function del(id) {
  365. myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?", function () {
  366. myRequest("/admin/accusation/del/" + id, "post", {}, function (res) {
  367. layer.msg(res.msg)
  368. setTimeout(function () {
  369. window.location.reload();
  370. }, 1500)
  371. });
  372. });
  373. }
  374. </script>
  375. @endsection