list.blade.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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.选择支付时间') }}({{ __('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.选择支付时间') }}({{ __('auto.中国') }}):</span>
  92. <input type="datetime-local" step="01" name="start_time_cn" class="form-control" id="start_time_cn"
  93. value="{{$request->start_time_cn}}" onclick="start_times('start_time_cn')"/>&nbsp;&nbsp;
  94. <input type="datetime-local" step="01" name="end_time_cn" class="form-control" id="end_time_cn"
  95. value="{{$request->end_time_cn}}" onclick="end_times('end_time_cn')"/>
  96. <span style="padding-left: 10px;">{{ __('auto.按单价排序:') }}</span>
  97. <input type="radio" name="order" value="1">&nbsp;
  98. </div>
  99. <div class="form-group">
  100. <span style="padding-left: 10px">{{ __('auto.订单创建时间') }}({{ __('auto.当地') }}):</span>
  101. <input type="datetime-local" step="01" name="create_start_time" class="form-control" id="create_start_time"
  102. value="{{$create_start_time}}" onclick="create_start_times()"/>&nbsp;&nbsp;
  103. <input type="datetime-local" step="01" name="create_end_time" class="form-control" id="create_end_time"
  104. value="{{$create_end_time}}" onclick="create_end_times()"/>
  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}}&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.支付完成时间') }}({{ __('auto.当地') }})</th>
  143. <th width="8%">{{ __('auto.支付完成时间') }}({{ __('auto.中国') }})</th>
  144. <th width="10%">
  145. <div class="sort_money">
  146. {{ __('auto.咖啡金额') }}
  147. <svg t="1611284352657" class="icon2" onclick="sort_money_func(this,'asc')"
  148. viewBox="0 0 1024 1024" version="1.1"
  149. xmlns="http://www.w3.org/2000/svg" p-id="4118" width="14">
  150. <path
  151. 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"
  152. p-id="4119" fill="#707072">
  153. </path>
  154. </svg>
  155. <svg t="1611283709864" class="icon1" onclick="sort_money_func(this,'desc')"
  156. viewBox="0 0 1024 1024" version="1.1"
  157. xmlns="http://www.w3.org/2000/svg" p-id="3148" width="14">
  158. <path
  159. 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"
  160. p-id="3149" fill="#707071">
  161. </path>
  162. </svg>
  163. </div>
  164. </th>
  165. <th width="6%">{{ __('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%">{{ __('auto.咖啡来源') }}</th>
  171. <th width="8%">支付渠道</th>
  172. <th width="7%">{{ __('auto.咖啡玩家') }}ID</th>
  173. <th width="8%">{{ __('auto.状态') }}</th>
  174. <th width="8%">{{ __('auto.来源') }}</th>
  175. <th width="7%">{{ __('auto.玩家渠道') }}</th>
  176. <th width="8%">{{ __('auto.订单生成日期') }}({{ __('auto.当地') }})</th>
  177. <th width="8%">{{ __('auto.订单生成日期') }}({{ __('auto.中国') }})</th>
  178. <th width="8%">{{ __('auto.操作') }}</th>
  179. <th width="8%">{{ __('auto.添加备注') }}</th>
  180. <th width="8%">{{ __('auto.操作人') }}</th>
  181. </tr>
  182. </thead>
  183. <tbody>
  184. @if (hidden() != 'service')
  185. <div>
  186. @if (!empty($chargeMoney))
  187. <h4> {{$chargeMoney}} {{ __('auto.档位') }}</h4>
  188. @endif
  189. <h4>{{ __('auto.总金额:') }}{{$totalMoney}} &nbsp;&nbsp; {{$payTotalMoney->count_u ?? 0}}{{ __('auto.人') }}&nbsp;&nbsp;{{$payTotalMoney->count_id ?? 0}}{{ __('auto.笔') }}</h4>
  190. <h4>{{ __('auto.已到账:') }}{{$overMoney}} &nbsp;&nbsp;{{$payOverMoney->count_u ?? 0}}{{ __('auto.人') }}&nbsp;&nbsp;{{$payOverMoney->count_id ?? 0}}{{ __('auto.笔') }}</h4>
  191. @if(!empty($viewAll))
  192. <h4>{{ __('auto.手续费汇总:') }}{{ $totalPaymentFee ?? 0 }}</h4>
  193. @endif
  194. <h4>充值成功人数百分比:{{ $successUserRate ?? 0 }}%</h4>
  195. <h4>充值成功笔数百分比:{{ $successOrderRate ?? 0 }}%</h4>
  196. </div>
  197. @endif
  198. @foreach($list as $k=>$v)
  199. <tr id="hidden_td">
  200. <td class="first_str">{{ $v->id }}</td>
  201. <td>{{ $v->order_sn }}</td>
  202. <td>{{$v->finished_at}}</td>
  203. <td>{{$v->finished_at ? dateConvert($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>{{ dateConvert($v->created_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. 'Channel'=>$Channel,
  275. 'isEmpty'=>$isEmpty,
  276. 'register_start_time' => $register_start_time,
  277. 'register_end_time' => $register_end_time,
  278. 'source' => $source,
  279. 'chargeMoney' => $chargeMoney,
  280. 'payMethod' => $payMethod,
  281. 'amountSort' => $amountSort,
  282. 'operator_admin_id' => $operator_admin_id ?? '',
  283. ])->total() }}</b>
  284. {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  285. {!! $list->links() !!}
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <script>
  294. var params = {
  295. 'start_time' : '{{$start_time}}',
  296. 'UserID':'{{$UserID}}',
  297. 'end_time':'{{$end_time}}',
  298. 'order':'{{$order}}',
  299. 'type':'{{$type}}',
  300. 'recharge_type':'{{$recharge_type}}',
  301. 'date':'{{$date}}',
  302. 'create_start_time':'{{$create_start_time}}',
  303. 'create_end_time':'{{$create_end_time}}',
  304. 'Channel':'{{$Channel}}',
  305. 'isEmpty':'{{$isEmpty}}',
  306. 'register_start_time' : '{{$register_start_time}}',
  307. 'register_end_time' :'{{$register_end_time}}',
  308. 'source' : '{{$source}}',
  309. 'chargeMoney' : '{{$chargeMoney}}',
  310. 'payMethod' : '{{$payMethod}}',
  311. 'operator_admin_id' : '{{ $operator_admin_id ?? '' }}',
  312. }
  313. function start_times(id) {
  314. getFormat('00', '00', '00');
  315. document.getElementById(id).value = format
  316. }
  317. function end_times(id) {
  318. getFormat('23', '59', '59');
  319. document.getElementById(id).value = format
  320. }
  321. function create_start_times() {
  322. getFormat('00', '00', '00');
  323. document.getElementById("create_start_time").value = format
  324. }
  325. function create_end_times() {
  326. getFormat('23', '59', '59');
  327. document.getElementById("create_end_time").value = format
  328. }
  329. function register_start_timeFunc(){
  330. getFormat('00', '00', '00');
  331. document.getElementById("register_start_time").value = format
  332. }
  333. function register_end_timeFunc(){
  334. getFormat('23', '59', '59');
  335. document.getElementById("register_end_time").value = format
  336. }
  337. function sort_money_func(obj, val) {
  338. if (val == 'asc') {
  339. $(".sort_money svg:eq(1)").children('path').attr('fill', '#707071');
  340. $(obj).children('path').attr('fill', 'red')
  341. } else {
  342. $(obj).children('path').attr('fill', 'red')
  343. $(".sort_money svg:eq(0)").children('path').attr('fill', '#707071');
  344. }
  345. params.amountSort = val
  346. $.ajax({
  347. type: "get",
  348. url: "/admin/recharge/list",
  349. headers: {
  350. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  351. },
  352. data: params,
  353. success: function (msg) {
  354. if (msg) {
  355. $(".main-panel").html(msg)
  356. }
  357. }
  358. })
  359. }
  360. function remarks(obj, RecordID) {
  361. let remark = $(obj).html();
  362. let type = 2
  363. if (remark != ''){
  364. myRequest("/admin/withdrawal/remarks/" + RecordID, "post", {remark,type}, function (res) {
  365. layer.msg(res.msg)
  366. setTimeout(function () {
  367. window.location.reload();
  368. }, 1500)
  369. });
  370. }
  371. }
  372. function supplement(id) {
  373. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  374. myRequest("/admin/recharge/supplement/" + id, "post", {}, function (res) {
  375. layer.msg(res.msg)
  376. setTimeout(function () {
  377. window.location.reload();
  378. }, 1500)
  379. });
  380. });
  381. }
  382. function setRefund(id) {
  383. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  384. myRequest("/admin/recharge/refund/" + id, "post", {}, function (res) {
  385. layer.msg(res.msg)
  386. setTimeout(function () {
  387. window.location.reload();
  388. }, 1500)
  389. });
  390. });
  391. }
  392. function mockFbReport(id) {
  393. myConfirm("确认模拟上报 FB 事件吗?", function () {
  394. myRequest("/admin/recharge/fb_report_mock/" + id, "post", {}, function (res) {
  395. layer.msg(res.msg)
  396. });
  397. });
  398. }
  399. $(function () {
  400. cutStr(50);
  401. });
  402. function update(id) {
  403. myConfirm("{{ __('auto.处理操作不可逆,是否继续') }}?", function () {
  404. myRequest("/admin/accusation/edit/" + id, "post", {}, function (res) {
  405. layer.msg(res.msg)
  406. setTimeout(function () {
  407. window.location.reload();
  408. }, 1500)
  409. });
  410. });
  411. }
  412. function del(id) {
  413. myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?", function () {
  414. myRequest("/admin/accusation/del/" + id, "post", {}, function (res) {
  415. layer.msg(res.msg)
  416. setTimeout(function () {
  417. window.location.reload();
  418. }, 1500)
  419. });
  420. });
  421. }
  422. </script>
  423. @endsection