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.

132 lines
6.5 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="text" name="order_serial" class="form-control" placeholder="订单编号"
value="{{request('order_serial')}}">
</div>
<div class="form-group mr-2">
<input type="text" name="customer_name" class="form-control" placeholder="客户姓名"
value="{{request('customer_name')}}">
</div>
<div class="form-group mr-2">
<input type="text" name="paramedic_name" class="form-control" placeholder="护工姓名"
value="{{request('paramedic_name')}}">
</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>订单编号</th>
<th>护工姓名</th>
<th>客户姓名</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->serial }}
@else
-
@endif
</td>
<td>
@if($row->paramedic)
{{ $row->paramedic->name }}
@else
-
@endif
</td>
<td>
@if($row->customer)
{{ $row->customer->name }}
@else
-
@endif
</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