list.blade.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  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. <span style="padding-left: 10px">操作人:</span>
  77. <select class="form-control" name="operator_admin_id" style="color: black">
  78. <option value="">{{ __('auto.请选择') }}</option>
  79. <option value="0" @if ((string)($operator_admin_id ?? '') === '0') selected @endif>无操作人</option>
  80. @foreach($operatorOptions ?? [] as $op)
  81. <option value="{{ $op->id }}" @if ((string)($operator_admin_id ?? '') === (string)$op->id) selected @endif>{{ $op->account }}</option>
  82. @endforeach
  83. </select>
  84. </div>
  85. <div class="form-group">
  86. <span style="padding-left: 10px">{{ __('auto.选择支付时间') }}:</span>
  87. <input type="datetime-local" step="01" name="start_time" class="form-control" id="start_time"
  88. value="{{$start_time}}" onclick="start_times('start_time')"/>&nbsp;&nbsp;
  89. <input type="datetime-local" step="01" name="end_time" class="form-control" id="end_time"
  90. value="{{$end_time}}" onclick="end_times('end_time')"/>&nbsp;&nbsp;
  91. <span style="padding-left: 10px;">{{ __('auto.按单价排序:') }}</span>
  92. <input type="radio" name="order" value="1">&nbsp;
  93. </div>
  94. <div class="form-group">
  95. <span style="padding-left: 10px">{{ __('auto.订单创建时间') }}:</span>
  96. <input type="datetime-local" step="01" name="create_start_time" class="form-control" id="create_start_time"
  97. value="{{$create_start_time}}" onclick="create_start_times()"/>&nbsp;&nbsp;
  98. <input type="datetime-local" step="01" name="create_end_time" class="form-control" id="create_end_time"
  99. value="{{$create_end_time}}" onclick="create_end_times()"/>
  100. <span style="padding-left: 10px">更新时间:</span>
  101. <input type="datetime-local" step="01" name="updated_start_time" class="form-control" id="updated_start_time"
  102. value="{{$updated_start_time}}" onclick="start_times('updated_start_time')"/>&nbsp;&nbsp;
  103. <input type="datetime-local" step="01" name="updated_end_time" class="form-control" id="updated_end_time"
  104. value="{{$updated_end_time}}" onclick="end_times('updated_end_time')"/>
  105. <span style="padding-left: 10px">{{ __('auto.用户注册日期:') }}</span>
  106. <input type="datetime-local" step="01" name="register_start_time" class="form-control" id="register_start_time"
  107. value="{{$register_start_time}}" onclick="register_start_timeFunc()"/>&nbsp;&nbsp;
  108. <input type="datetime-local" step="01" name="register_end_time" class="form-control" id="register_end_time"
  109. value="{{$register_end_time}}" onclick="register_end_timeFunc()"/>
  110. <span style="padding-left: 10px">{{ __('auto.咖啡来源:') }}</span>
  111. <select class="form-control" name="source" value="{{$source}}" style="color: black">
  112. <option value="">{{ __('auto.选择类别') }}</option>
  113. @foreach($sourceList as $k=>$v)
  114. <option value="{{$k}}" @if ($source == $k)
  115. selected
  116. @endif>{{$v}}</option>
  117. @endforeach
  118. </select>
  119. <span style="padding-left: 10px">{{ __('auto.咖啡档位筛选:') }}</span>
  120. <select class="form-control" name="chargeMoney" value="" style="color: black">
  121. <option value="">{{ __('auto.选择类别') }}</option>
  122. @foreach($chargeMoneyList as $k=>$v)
  123. <option value="{{$v}}" @if ($chargeMoney == $v)
  124. selected
  125. @endif>{{$v}}</option>
  126. @endforeach
  127. </select>
  128. <input type="hidden" name="isEmpty" value="{{$isEmpty}}">
  129. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  130. <a href="?isEmpty=1"
  131. class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>&nbsp;&nbsp;
  132. <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}}&updated_start_time={{$updated_start_time}}&updated_end_time={{$updated_end_time}}&isEmpty=1&source={{$source}}&chargeMoney={{$chargeMoney}}&payMethod={{$payMethod}}&operator_admin_id={{ urlencode((string)($operator_admin_id ?? '')) }}"
  133. class="btn btn-sm btn-gradient-light btn-icon-text">{{ __('auto.导出') }}</a>
  134. </div>
  135. </div>
  136. </form>
  137. <table class="table table-bordered" id="tables">
  138. <thead>
  139. <tr>
  140. <th width="5%" ondblclick="copyText(1)">ID</th>
  141. <th width="8%" ondblclick="copyText(2)">{{ __('auto.订单号') }}</th>
  142. <th width="8%">{{ __('auto.支付完成时间') }}</th>
  143. <th width="10%">
  144. <div class="sort_money">
  145. {{ __('auto.咖啡金额') }}
  146. <svg t="1611284352657" class="icon2" onclick="sort_money_func(this,'asc')"
  147. viewBox="0 0 1024 1024" version="1.1"
  148. xmlns="http://www.w3.org/2000/svg" p-id="4118" width="14">
  149. <path
  150. 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"
  151. p-id="4119" fill="#707072">
  152. </path>
  153. </svg>
  154. <svg t="1611283709864" class="icon1" onclick="sort_money_func(this,'desc')"
  155. viewBox="0 0 1024 1024" version="1.1"
  156. xmlns="http://www.w3.org/2000/svg" p-id="3148" width="14">
  157. <path
  158. 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"
  159. p-id="3149" fill="#707071">
  160. </path>
  161. </svg>
  162. </div>
  163. </th>
  164. <th width="6%">{{ __('auto.手续费') }}</th>
  165. <th width="8%">{{ __('auto.变化后余额') }}</th>
  166. <th width="8%">{{ __('auto.当前余额') }}</th>
  167. <th width="8%">{{ __('auto.最高分') }}</th>
  168. <th width="8%">{{ __('auto.最多赢分') }}</th>
  169. <th width="8%">{{ __('auto.咖啡来源') }}</th>
  170. <th width="8%">支付渠道</th>
  171. <th width="7%">{{ __('auto.咖啡玩家') }}ID</th>
  172. <th width="8%">{{ __('auto.状态') }}</th>
  173. <th width="8%">{{ __('auto.来源') }}</th>
  174. <th width="7%">{{ __('auto.玩家渠道') }}</th>
  175. <th width="8%">{{ __('auto.订单生成日期') }}</th>
  176. <th width="8%">更新时间</th>
  177. <th width="8%">{{ __('auto.操作') }}</th>
  178. <th width="8%">{{ __('auto.添加备注') }}</th>
  179. <th width="8%">{{ __('auto.操作人') }}</th>
  180. </tr>
  181. </thead>
  182. <tbody>
  183. @if (hidden() != 'service')
  184. <div>
  185. @if (!empty($chargeMoney))
  186. <h4> {{$chargeMoney}} {{ __('auto.档位') }}</h4>
  187. @endif
  188. <h4>{{ __('auto.总金额:') }}{{$totalMoney}} &nbsp;&nbsp; {{$payTotalMoney->count_u ?? 0}}{{ __('auto.人') }}&nbsp;&nbsp;{{$payTotalMoney->count_id ?? 0}}{{ __('auto.笔') }}</h4>
  189. <h4>{{ __('auto.已到账:') }}{{$overMoney}} &nbsp;&nbsp;{{$payOverMoney->count_u ?? 0}}{{ __('auto.人') }}&nbsp;&nbsp;{{$payOverMoney->count_id ?? 0}}{{ __('auto.笔') }}</h4>
  190. <h4>退款金额:{{ $refundMoney ?? 0 }} &nbsp;&nbsp;{{ $refundSummary->count_id ?? 0 }}{{ __('auto.笔') }}</h4>
  191. <h4>退款手续费:{{ $refundFee ?? 0 }}</h4>
  192. @if(!empty($viewAll))
  193. <h4>{{ __('auto.手续费汇总:') }}{{ $totalPaymentFee ?? 0 }}</h4>
  194. @endif
  195. <h4>充值成功人数百分比:{{ $successUserRate ?? 0 }}%</h4>
  196. <h4>充值成功笔数百分比:{{ $successOrderRate ?? 0 }}%</h4>
  197. </div>
  198. @endif
  199. @foreach($list as $k=>$v)
  200. <tr id="hidden_td">
  201. <td class="first_str">{{ $v->id }}</td>
  202. <td>{{ $v->order_sn }}</td>
  203. <td>{{$v->finished_at}}</td>
  204. <td>{{ $v->amount }}</td>
  205. <td>{{ $v->payment_fee ?? 0 }}</td>
  206. <td>{{ $v->after_amount }}</td>
  207. <td>{{ $v->score }}</td>
  208. <td>{{ $v->MaxScore }}</td>
  209. <td>{{ $v->MaxWinScore }}</td>
  210. <td>{{$v->payment_code}}</td>
  211. <td>{{@$payMethods[$v->order_title]??''}}</td>
  212. <td>
  213. <a href="/admin/global/id_find?UserID={{$v->UserID}}">
  214. {{$v->ai_GameID}}
  215. </a>
  216. @if ($v->Phone )
  217. <a target="_blank"
  218. href="https://api.whatsapp.com/send?phone={{$v->Phone}}">what's app</a>
  219. @endif
  220. </td>
  221. <td>
  222. @if ($v->pay_status == 1)
  223. <span style="color: #0b2e13">{{ __('auto.已到账') }}</span>
  224. @elseif($v->pay_status == 9)
  225. <span style="color: #ff9800">{{ __('auto.退款') }}</span>
  226. @elseif($v->pay_status == 0)
  227. <span>{{ __('auto.未支付') }}</span>
  228. @else
  229. <span style="color: red">{{ __('auto.咖啡出错') }}</span>
  230. @endif
  231. </td>
  232. <td>{{$v->GiftsName}}</td>
  233. <td>{{$v->Channel}}</td>
  234. <td>{{$v->created_at}}</td>
  235. <td>{{$v->updated_at}}</td>
  236. <td>
  237. @if (in_array(session('admin')->roles[0]->id,[1,12]) && $v->pay_status != 1 && $v->pay_status != 9)
  238. <button type="button" class="btn-sm btn-primary"
  239. onclick="supplement({{$v->id}})">{{ __('auto.补单') }}
  240. </button>
  241. @endif
  242. @if (in_array(session('admin')->roles[0]->id,[1,12]) && $v->pay_status == 1)
  243. <button type="button" class="btn-sm btn-warning"
  244. onclick="setRefund({{$v->id}})">{{ __('auto.标记退款') }}
  245. </button>
  246. @endif
  247. @if (in_array(session('admin')->roles[0]->id,[1,12]) && $v->pay_status != 1 && $v->pay_status != 9)
  248. <button type="button" class="btn-sm btn-info"
  249. onclick="mockFbReport({{$v->id}})">FB模拟上报
  250. </button>
  251. @endif
  252. </td>
  253. <td contentEditable="true"
  254. onblur="remarks(this,{{$v->id}})">{{$v->ar_remarks}}</td>
  255. <td>
  256. {{$v->account}}
  257. </td>
  258. </tr>
  259. @endforeach
  260. </tbody>
  261. </table>
  262. <div class="box-footer clearfix">
  263. {{ __('auto.总共') }}
  264. <b>{{ $list->appends([
  265. 'start_time'=>$start_time,
  266. 'UserID'=>$UserID,
  267. 'end_time'=>$end_time,
  268. 'order'=>$order,
  269. 'type'=>$type,
  270. 'recharge_type'=>$recharge_type,
  271. 'date'=>$date,
  272. 'create_start_time'=>$create_start_time,
  273. 'create_end_time'=>$create_end_time,
  274. 'updated_start_time'=>$updated_start_time,
  275. 'updated_end_time'=>$updated_end_time,
  276. 'Channel'=>$Channel,
  277. 'isEmpty'=>$isEmpty,
  278. 'register_start_time' => $register_start_time,
  279. 'register_end_time' => $register_end_time,
  280. 'source' => $source,
  281. 'chargeMoney' => $chargeMoney,
  282. 'payMethod' => $payMethod,
  283. 'amountSort' => $amountSort,
  284. 'operator_admin_id' => $operator_admin_id ?? '',
  285. ])->total() }}</b>
  286. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  287. {!! $list->links() !!}
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <script>
  296. var params = {
  297. 'start_time' : '{{$start_time}}',
  298. 'UserID':'{{$UserID}}',
  299. 'end_time':'{{$end_time}}',
  300. 'order':'{{$order}}',
  301. 'type':'{{$type}}',
  302. 'recharge_type':'{{$recharge_type}}',
  303. 'date':'{{$date}}',
  304. 'create_start_time':'{{$create_start_time}}',
  305. 'create_end_time':'{{$create_end_time}}',
  306. 'updated_start_time':'{{$updated_start_time}}',
  307. 'updated_end_time':'{{$updated_end_time}}',
  308. 'Channel':'{{$Channel}}',
  309. 'isEmpty':'{{$isEmpty}}',
  310. 'register_start_time' : '{{$register_start_time}}',
  311. 'register_end_time' :'{{$register_end_time}}',
  312. 'source' : '{{$source}}',
  313. 'chargeMoney' : '{{$chargeMoney}}',
  314. 'payMethod' : '{{$payMethod}}',
  315. 'operator_admin_id' : '{{ $operator_admin_id ?? '' }}',
  316. }
  317. function start_times(id) {
  318. getFormat('00', '00', '00');
  319. document.getElementById(id).value = format
  320. }
  321. function end_times(id) {
  322. getFormat('23', '59', '59');
  323. document.getElementById(id).value = format
  324. }
  325. function create_start_times() {
  326. getFormat('00', '00', '00');
  327. document.getElementById("create_start_time").value = format
  328. }
  329. function create_end_times() {
  330. getFormat('23', '59', '59');
  331. document.getElementById("create_end_time").value = format
  332. }
  333. function register_start_timeFunc(){
  334. getFormat('00', '00', '00');
  335. document.getElementById("register_start_time").value = format
  336. }
  337. function register_end_timeFunc(){
  338. getFormat('23', '59', '59');
  339. document.getElementById("register_end_time").value = format
  340. }
  341. function sort_money_func(obj, val) {
  342. if (val == 'asc') {
  343. $(".sort_money svg:eq(1)").children('path').attr('fill', '#707071');
  344. $(obj).children('path').attr('fill', 'red')
  345. } else {
  346. $(obj).children('path').attr('fill', 'red')
  347. $(".sort_money svg:eq(0)").children('path').attr('fill', '#707071');
  348. }
  349. params.amountSort = val
  350. $.ajax({
  351. type: "get",
  352. url: "/admin/recharge/list",
  353. headers: {
  354. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  355. },
  356. data: params,
  357. success: function (msg) {
  358. if (msg) {
  359. $(".main-panel").html(msg)
  360. }
  361. }
  362. })
  363. }
  364. function remarks(obj, RecordID) {
  365. let remark = $(obj).html();
  366. let type = 2
  367. if (remark != ''){
  368. myRequest("/admin/withdrawal/remarks/" + RecordID, "post", {remark,type}, function (res) {
  369. layer.msg(res.msg)
  370. setTimeout(function () {
  371. window.location.reload();
  372. }, 1500)
  373. });
  374. }
  375. }
  376. function supplement(id) {
  377. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  378. myRequest("/admin/recharge/supplement/" + id, "post", {}, function (res) {
  379. layer.msg(res.msg)
  380. setTimeout(function () {
  381. window.location.reload();
  382. }, 1500)
  383. });
  384. });
  385. }
  386. function setRefund(id) {
  387. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  388. myRequest("/admin/recharge/refund/" + id, "post", {}, function (res) {
  389. layer.msg(res.msg)
  390. setTimeout(function () {
  391. window.location.reload();
  392. }, 1500)
  393. });
  394. });
  395. }
  396. function mockFbReport(id) {
  397. myConfirm("确认模拟上报 FB 事件吗?", function () {
  398. myRequest("/admin/recharge/fb_report_mock/" + id, "post", {}, function (res) {
  399. layer.msg(res.msg)
  400. });
  401. });
  402. }
  403. $(function () {
  404. cutStr(50);
  405. });
  406. function update(id) {
  407. myConfirm("{{ __('auto.处理操作不可逆,是否继续') }}?", function () {
  408. myRequest("/admin/accusation/edit/" + id, "post", {}, function (res) {
  409. layer.msg(res.msg)
  410. setTimeout(function () {
  411. window.location.reload();
  412. }, 1500)
  413. });
  414. });
  415. }
  416. function del(id) {
  417. myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?", function () {
  418. myRequest("/admin/accusation/del/" + id, "post", {}, function (res) {
  419. layer.msg(res.msg)
  420. setTimeout(function () {
  421. window.location.reload();
  422. }, 1500)
  423. });
  424. });
  425. }
  426. </script>
  427. @endsection