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.

120 lines
6.0 KiB

@extends("admin.layouts.layout")
@section("content")
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="mb-3">
<a class="btn btn-primary" href="{{url($urlPrefix . '/create')}}">
@lang("icons.action_create") @lang('actions.create'){{$modelName}}
</a>
</div>
<!-- 搜索表单 -->
<div class="mb-3">
<form method="GET" action="{{url($urlPrefix)}}" class="form-inline">
<div class="form-group mr-2">
<input type="number" name="order_id" class="form-control" placeholder="订单ID"
value="{{request('order_id')}}">
</div>
<div class="form-group mr-2">
<input type="number" name="customer_id" class="form-control" placeholder="客户ID"
value="{{request('customer_id')}}">
</div>
<div class="form-group mr-2">
<input type="number" name="paramedic_id" class="form-control" placeholder="护工ID"
value="{{request('paramedic_id')}}">
</div>
<button type="submit" class="btn btn-info mr-2">搜索</button>
<a href="{{url($urlPrefix)}}" class="btn btn-secondary">重置</a>
</form>
</div>
<table class="table table-bordered" id="data-table">
<thead>
<tr>
<th>ID</th>
<th>订单ID</th>
<th>护工ID</th>
<th>客户ID</th>
<th>护工签名</th>
<th>客户签名</th>
<th>公司签名</th>
<th>文件</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
@foreach ($data as $row)
<tr data-id="{{$row->id}}">
<td>{{ $row->id }}</td>
<td>
@if($row->order)
{{ $row->order_id }}
@else
{{ $row->order_id ?: '-' }}
@endif
</td>
<td>{{ $row->paramedic_id ?: '-' }}</td>
<td>{{ $row->customer_id ?: '-' }}</td>
<td>
@if($row->paramedicSign)
<a href="{{Storage::url($row->paramedicSign->folder . '/' . $row->paramedicSign->name)}}"
target="_blank">查看</a>
@else
-
@endif
</td>
<td>
@if($row->customerSign)
<a href="{{Storage::url($row->customerSign->folder . '/' . $row->customerSign->name)}}"
target="_blank">查看</a>
@else
-
@endif
</td>
<td>
@if($row->companySign)
<a href="{{Storage::url($row->companySign->folder . '/' . $row->companySign->name)}}"
target="_blank">查看</a>
@else
-
@endif
</td>
<td>
@if($row->file)
<a href="{{Storage::url($row->file->folder . '/' . $row->file->name)}}"
target="_blank">下载</a>
@else
-
@endif
</td>
<td>{{ $row->created_at->format('Y-m-d H:i:s') }}</td>
<td>
<a class="btn btn-sm btn-primary"
href="{{url("{$urlPrefix}/edit?id={$row['id']}")}}">@lang("icons.action_edit")
@lang("actions.edit")</a>
<a class="btn btn-sm btn-danger btn-delete" data-id="{{$row['id']}}"
href="javascript:;">@lang("icons.action_delete") @lang("actions.delete")</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@include("public._pages")
</div>
</div>
</div>
</div>
@include("public._delete")
@endsection
@push("footer")
<script>
</script>
@endpush