list.blade.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  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 value="9" @if ($recharge_type == 9) selected
  51. @endif>{{ __('auto.退款') }}
  52. </option>
  53. </select>&nbsp;
  54. <span style="padding-left: 10px">{{ __('auto.渠道搜索:') }}</span>
  55. <select class="form-control" name="Channel" value="" style="color: black">
  56. <option value="">{{ __('auto.请选择') }}</option>
  57. @foreach($allChannel as $key=>$val)
  58. <option value="{{$val}}"
  59. @if($val == $Channel) selected @endif>{{$val}}</option>
  60. @endforeach
  61. </select>
  62. <span style="padding-left: 10px">{{ __('auto.咖啡渠道:') }}</span>
  63. <select class="form-control" name="type" value="{{$type}}" style="color: black">
  64. <option value="">{{ __('auto.选择类别') }}</option>
  65. @foreach($type_list as $k=>$v)
  66. <option value="{{$v}}" @if($v==$type) selected @endif>{{$v}}</option>
  67. @endforeach
  68. </select>
  69. <span style="padding-left: 10px">支付渠道:</span>
  70. <select class="form-control" name="payMethod" value="{{$payMethod}}" style="color: black">
  71. <option value="">{{ __('auto.选择类别') }}</option>
  72. @foreach($payMethods as $methodValue => $methodName)
  73. <option value="{{$methodValue}}" @if($methodValue == $payMethod) selected @endif>{{$methodName}}</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&source={{$source}}&chargeMoney={{$chargeMoney}}&payMethod={{$payMethod}}"
  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={{$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 == 9)
  210. <span style="color: #ff9800">{{ __('auto.退款') }}</span>
  211. @elseif($v->pay_status == 0)
  212. <span>{{ __('auto.未支付') }}</span>
  213. @else
  214. <span style="color: red">{{ __('auto.咖啡出错') }}</span>
  215. @endif
  216. </td>
  217. <td>{{$v->GiftsName}}</td>
  218. <td>{{$v->Channel}}</td>
  219. <td>{{$v->created_at}}</td>
  220. <td>{{ dateConvert($v->created_at) }}</td>
  221. <td>
  222. @if (in_array(session('admin')->roles[0]->id,[1,12])&&$v->pay_status != 1)
  223. <button type="button" class="btn-sm btn-primary"
  224. onclick="supplement({{$v->id}})">{{ __('auto.补单') }}
  225. </button>
  226. @endif
  227. @if (in_array(session('admin')->roles[0]->id,[1,12])&&$v->pay_status == 1)
  228. <button type="button" class="btn-sm btn-warning"
  229. onclick="setRefund({{$v->id}})">{{ __('auto.标记退款') }}
  230. </button>
  231. @endif
  232. </td>
  233. <td contentEditable="true"
  234. onblur="remarks(this,{{$v->id}})">{{$v->ar_remarks}}</td>
  235. <td>
  236. {{$v->account}}
  237. </td>
  238. </tr>
  239. @endforeach
  240. </tbody>
  241. </table>
  242. <div class="box-footer clearfix">
  243. {{ __('auto.总共') }}
  244. <b>{{ $list->appends([
  245. 'start_time'=>$start_time,
  246. 'UserID'=>$UserID,
  247. 'end_time'=>$end_time,
  248. 'order'=>$order,
  249. 'type'=>$type,
  250. 'recharge_type'=>$recharge_type,
  251. 'date'=>$date,
  252. 'create_start_time'=>$create_start_time,
  253. 'create_end_time'=>$create_end_time,
  254. 'Channel'=>$Channel,
  255. 'isEmpty'=>$isEmpty,
  256. 'register_start_time' => $register_start_time,
  257. 'register_end_time' => $register_end_time,
  258. 'source' => $source,
  259. 'chargeMoney' => $chargeMoney,
  260. 'payMethod' => $payMethod,
  261. 'amountSort' => $amountSort
  262. ])->total() }}</b>
  263. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  264. {!! $list->links() !!}
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <script>
  273. var params = {
  274. 'start_time' : '{{$start_time}}',
  275. 'UserID':'{{$UserID}}',
  276. 'end_time':'{{$end_time}}',
  277. 'order':'{{$order}}',
  278. 'type':'{{$type}}',
  279. 'recharge_type':'{{$recharge_type}}',
  280. 'date':'{{$date}}',
  281. 'create_start_time':'{{$create_start_time}}',
  282. 'create_end_time':'{{$create_end_time}}',
  283. 'Channel':'{{$Channel}}',
  284. 'isEmpty':'{{$isEmpty}}',
  285. 'register_start_time' : '{{$register_start_time}}',
  286. 'register_end_time' :'{{$register_end_time}}',
  287. 'source' : '{{$source}}',
  288. 'chargeMoney' : '{{$chargeMoney}}',
  289. 'payMethod' : '{{$payMethod}}',
  290. }
  291. function start_times(id) {
  292. getFormat('00', '00', '00');
  293. document.getElementById(id).value = format
  294. }
  295. function end_times(id) {
  296. getFormat('23', '59', '59');
  297. document.getElementById(id).value = format
  298. }
  299. function create_start_times() {
  300. getFormat('00', '00', '00');
  301. document.getElementById("create_start_time").value = format
  302. }
  303. function create_end_times() {
  304. getFormat('23', '59', '59');
  305. document.getElementById("create_end_time").value = format
  306. }
  307. function register_start_timeFunc(){
  308. getFormat('00', '00', '00');
  309. document.getElementById("register_start_time").value = format
  310. }
  311. function register_end_timeFunc(){
  312. getFormat('23', '59', '59');
  313. document.getElementById("register_end_time").value = format
  314. }
  315. function sort_money_func(obj, val) {
  316. if (val == 'asc') {
  317. $(".sort_money svg:eq(1)").children('path').attr('fill', '#707071');
  318. $(obj).children('path').attr('fill', 'red')
  319. } else {
  320. $(obj).children('path').attr('fill', 'red')
  321. $(".sort_money svg:eq(0)").children('path').attr('fill', '#707071');
  322. }
  323. params.amountSort = val
  324. $.ajax({
  325. type: "get",
  326. url: "/admin/recharge/list",
  327. headers: {
  328. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  329. },
  330. data: params,
  331. success: function (msg) {
  332. if (msg) {
  333. $(".main-panel").html(msg)
  334. }
  335. }
  336. })
  337. }
  338. function remarks(obj, RecordID) {
  339. let remark = $(obj).html();
  340. let type = 2
  341. if (remark != ''){
  342. myRequest("/admin/withdrawal/remarks/" + RecordID, "post", {remark,type}, function (res) {
  343. layer.msg(res.msg)
  344. setTimeout(function () {
  345. window.location.reload();
  346. }, 1500)
  347. });
  348. }
  349. }
  350. function supplement(id) {
  351. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  352. myRequest("/admin/recharge/supplement/" + id, "post", {}, function (res) {
  353. layer.msg(res.msg)
  354. setTimeout(function () {
  355. window.location.reload();
  356. }, 1500)
  357. });
  358. });
  359. }
  360. function setRefund(id) {
  361. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  362. myRequest("/admin/recharge/refund/" + id, "post", {}, function (res) {
  363. layer.msg(res.msg)
  364. setTimeout(function () {
  365. window.location.reload();
  366. }, 1500)
  367. });
  368. });
  369. }
  370. $(function () {
  371. cutStr(50);
  372. });
  373. function update(id) {
  374. myConfirm("{{ __('auto.处理操作不可逆,是否继续') }}?", function () {
  375. myRequest("/admin/accusation/edit/" + id, "post", {}, function (res) {
  376. layer.msg(res.msg)
  377. setTimeout(function () {
  378. window.location.reload();
  379. }, 1500)
  380. });
  381. });
  382. }
  383. function del(id) {
  384. myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?", function () {
  385. myRequest("/admin/accusation/del/" + id, "post", {}, function (res) {
  386. layer.msg(res.msg)
  387. setTimeout(function () {
  388. window.location.reload();
  389. }, 1500)
  390. });
  391. });
  392. }
  393. </script>
  394. @endsection