You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
3.3 KiB
60 lines
3.3 KiB
@extends("admin.layouts.layout")
|
|
|
|
@push("header")
|
|
|
|
@endpush
|
|
|
|
@section("content")
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body" style="overflow: auto">
|
|
<div class="mb-3">
|
|
<form class="form-inline">
|
|
<select class="form-control mr-1" name="project_id"
|
|
onchange="$(this).closest('form').submit()">
|
|
@foreach($projects as $pp)
|
|
<option
|
|
value="{{$pp->id}}" @if($pp->id == $project_id) {{ "selected" }}@endif>{{$pp->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
<select class="form-control" name="month" onchange="$(this).closest('form').submit()">
|
|
@foreach($months as $mm)
|
|
<option value="{{$mm}}" @if($mm == $month) {{ "selected" }}@endif>{{$mm}}</option>
|
|
@endforeach
|
|
</select>
|
|
</form>
|
|
</div>
|
|
<table class="table table-bordered mb-0 table-datatable">
|
|
<thead>
|
|
<tr>
|
|
<th class="p-1" style="white-space: nowrap">项目</th>
|
|
<th class="p-1" style="white-space: nowrap">所属周期</th>
|
|
<th class="p-1" style="white-space: nowrap">上月未结算余额</th>
|
|
<th class="p-1" style="white-space: nowrap">本月收款</th>
|
|
<th class="p-1" style="white-space: nowrap">本月退款</th>
|
|
<th class="p-1" style="white-space: nowrap">本月结算</th>
|
|
<th class="p-1" style="white-space: nowrap">本月未结算余额</th>
|
|
<th class="p-1" style="white-space: nowrap">院方结算</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>{{ $project->name }}</td>
|
|
<td>{{ date("Y年m月", strtotime($month)) }}</td>
|
|
<td>{{ $prev_month_balance }}</td>
|
|
<td>{{ $this_month_balances->filter(function($item) { return $item->belongs_type == "App\Models\Recharge"; })->sum("money") }}</td>
|
|
<td>{{ $this_month_balances->filter(function($item) { return $item->belongs_type == "App\Models\Refund"; })->sum("money") }}</td>
|
|
<td>{{ $this_month_balances->filter(function($item) { return $item->belongs_type == "App\Models\OrderItems"; })->sum("money") }}</td>
|
|
<td>{{ $this_month_balance }}</td>
|
|
<td>@if($project->percent_first_party){{ -$this_month_balances->filter(function($item) { return $item->belongs_type == "App\Models\OrderItems"; })->sum("money") * $project->percent_first_party / 100 }}@else{{ "未设置" }}@endif</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|