Lae/resources/views/admin/transactions.blade.php

90 lines
3.0 KiB
PHP
Raw Permalink Normal View History

2022-11-21 04:50:26 +00:00
@extends('layouts.admin')
@section('title', '交易记录')
@section('content')
<h2>交易记录</h2>
<a href="?type=income">收入</a>
<a href="?type=payout">支出</a>
<a href="?payment=transfer">转账记录</a>
<div class="overflow-auto">
2022-12-08 04:46:10 +00:00
<table class="table table-hover">
2022-11-21 04:50:26 +00:00
<thead>
<tr>
2023-01-16 20:36:43 +00:00
<th scope="col">模块</th>
2022-11-21 04:50:26 +00:00
<th scope="col">支付方式</th>
<th scope="col">说明</th>
<th scope="col">用户 ID</th>
<th scope="col">主机 ID</th>
2023-01-16 20:36:43 +00:00
<th scope="col">金额</th>
2022-11-21 04:50:26 +00:00
<th scope="col">余额</th>
<th scope="col">交易时间</th>
</tr>
</thead>
<tbody>
@foreach ($transactions as $t)
<tr>
2023-01-17 16:09:09 +00:00
<td>
2022-11-21 04:50:26 +00:00
<span class="module_name" module="{{ $t->module_id }}">{{ $t->module_id }}</span>
</td>
<td>
<x-payment :payment="$t->payment"></x-payment>
<br/>
<a href="?payment={{ $t->payment }}">筛选</a>
</td>
<td>
{{ $t->description }}
</td>
<td>
2023-01-17 16:09:09 +00:00
@if ($t->user_id)
<a href="{{ route('admin.users.edit', $t->user_id) }}">{{ $t->user_id }}</a>
<br/>
<a href="?user_id={{ $t->user_id }}">筛选</a>
@endif
2022-11-21 04:50:26 +00:00
</td>
<td>
@if ($t->host_id)
<a href="{{ route('admin.hosts.edit', $t->host_id) }}">{{ $t->host_id }}</a>
<br/>
<a href="?host_id={{ $t->host_id }}">筛选</a>
@endif
</td>
2023-01-16 20:36:43 +00:00
<td>
@if ($t->type === 'payout')
<span class="text-danger">
支出 {{ $t->amount }}
</span>
@elseif($t->type === 'income')
<span class="text-success">
收入 {{ $t->amount }}
</span>
@endif
2022-11-21 04:50:26 +00:00
</td>
<td>
2023-01-17 16:09:09 +00:00
@if ($t->user_id)
用户 {{ $t->user_remain }}
@endif
<br/>
@if ($t->module_id)
模块 {{ $t->module_remain }}
@endif
2022-11-21 04:50:26 +00:00
</td>
<td>
{{ $t->created_at }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ $transactions->links() }}
2023-01-14 14:39:06 +00:00
<x-module-script/>
2022-11-21 04:50:26 +00:00
@endsection