|
|
|
|
@ -19,9 +19,23 @@
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body" style="overflow: auto">
|
|
|
|
|
<ul class="nav nav-tabs nav-bordered mb-3">
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<a href="{{ url()->current() . '?' . http_build_query(array_merge(request()->query(), ['mode' => 'customer'])) }}"
|
|
|
|
|
class="nav-link @if(($mode ?? 'customer') == 'customer') active @endif">
|
|
|
|
|
客户余额
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<a href="{{ url()->current() . '?' . http_build_query(array_merge(request()->query(), ['mode' => 'order'])) }}"
|
|
|
|
|
class="nav-link @if(($mode ?? 'customer') == 'order') active @endif">
|
|
|
|
|
订单时点余额
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
|
|
<form class="form-inline">
|
|
|
|
|
<input type="hidden" name="mode" value="{{ $mode ?? 'customer' }}">
|
|
|
|
|
<select class="form-control mr-1" name="project_id"
|
|
|
|
|
onchange="$(this).closest('form').submit()">
|
|
|
|
|
@foreach($projects as $pp)
|
|
|
|
|
@ -29,42 +43,79 @@
|
|
|
|
|
value="{{$pp->id}}" @if($pp->id == $project_id) {{ "selected" }}@endif>{{$pp->name}}</option>
|
|
|
|
|
@endforeach
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
{{-- <label class="control-label mr-1">截止</label><input--}}
|
|
|
|
|
{{-- value="{{ date("Y-m-d",$before_datetime) }}" class="form-control" name="before_date"--}}
|
|
|
|
|
{{-- data-plugin="date-picker">--}}
|
|
|
|
|
@if(($mode ?? 'customer') == 'order')
|
|
|
|
|
<label class="control-label mr-1">截止日期</label><input
|
|
|
|
|
value="{{ $before_date }}" class="form-control mr-1" name="before_date"
|
|
|
|
|
data-plugin="date-picker">
|
|
|
|
|
@endif
|
|
|
|
|
<button type="submit" class="btn btn-primary ml-1">查询</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<h5>客户余额表</h5>
|
|
|
|
|
<table class="table table-bordered mb-0 @if(\App\Models\CommonModel::checkExport())table-datatable @endif">
|
|
|
|
|
<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>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach($customers as $item)
|
|
|
|
|
@if(!$item->oneBalance)
|
|
|
|
|
@continue
|
|
|
|
|
@elseif (!($item->oneBalance->balance > 0))
|
|
|
|
|
@continue
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
@if(($mode ?? 'customer') == 'order')
|
|
|
|
|
<h5>订单时点余额表</h5>
|
|
|
|
|
<p class="text-muted mb-2">统计时点:{{ $before_datetime_text }}</p>
|
|
|
|
|
<table class="table table-bordered mb-0 @if(\App\Models\CommonModel::checkExport())table-datatable @endif">
|
|
|
|
|
<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>
|
|
|
|
|
<th class="p-1" style="white-space: nowrap">时点余额</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach($orderBalances as $item)
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="p-1">{{ $loop->iteration }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->serial }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->customer_mobile }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->contact }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->contact_mobile }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->patient_name ?: "无" }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->from_date }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->to_date }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->balance }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
@else
|
|
|
|
|
<h5>客户余额表</h5>
|
|
|
|
|
<p class="text-muted mb-2">统计时点:{{ $before_datetime_text }}</p>
|
|
|
|
|
<table class="table table-bordered mb-0 @if(\App\Models\CommonModel::checkExport())table-datatable @endif">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="p-1">{{ $loop->iteration }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->mobile }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->patients->count() ? $item->patients->last()->name : "无" }}</td>
|
|
|
|
|
<td class="p-1">{{ date("Y-m-d",$before_datetime) }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->balance }}</td>
|
|
|
|
|
<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>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach($customers as $item)
|
|
|
|
|
@if(!$item->oneBalance)
|
|
|
|
|
@continue
|
|
|
|
|
@elseif (!($item->oneBalance->balance > 0))
|
|
|
|
|
@continue
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="p-1">{{ $loop->iteration }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->mobile }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->patients->count() ? $item->patients->last()->name : "无" }}</td>
|
|
|
|
|
<td class="p-1">{{ $before_date }}</td>
|
|
|
|
|
<td class="p-1">{{ $item->balance }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|