@ -36,10 +36,10 @@ class OrderAgreementController extends CommonController
$query->where('order_id', $request->order_id);
}
// 按客户名字搜索
if ($request->customer_name) {
// 按客户手机号搜索
if ($request->customer_mobile) {
$query->whereHas('customer', function ($q) use ($request) {
$q->where('name', 'like', '%' . $request->customer_name . '%');
$q->where('mobile', 'like', '%' . $request->customer_mobile . '%');
});
@ -19,8 +19,8 @@
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')}}">
<input type="text" name="customer_mobile" class="form-control" placeholder="客户手机号"
value="{{request('customer_mobile')}}">
<input type="text" name="paramedic_name" class="form-control" placeholder="护工姓名"
@ -37,7 +37,7 @@
<th>ID</th>
<th>订单编号</th>
<th>护工姓名</th>
<th>客户姓名</th>
<th>客户手机号</th>
<th>护工签名</th>
<th>客户签名</th>
<th>公司签名</th>
@ -66,7 +66,7 @@
</td>
<td>
@if($row->customer)
{{ $row->customer->name }}
{{ $row->customer->mobile }}
@else
-
@endif