master
cody 3 weeks ago
parent fffe54465f
commit 97e375468d

@ -90,6 +90,11 @@ class OrdersController extends CommonController
} }
$this->model = $this->model->where("project_id", $project_id); $this->model = $this->model->where("project_id", $project_id);
// 订单号搜索(精确或模糊)
if ($request->filled('order_no')) {
$this->model = $this->model->where("serial", "like", "%" . trim($request->order_no) . "%");
}
if ($request->keyword) { if ($request->keyword) {
$this->model = $this->model->where(function ($query) use ($request) { $this->model = $this->model->where(function ($query) use ($request) {
$query->where("serial", "like", "%" . $request->keyword . "%") $query->where("serial", "like", "%" . $request->keyword . "%")

@ -46,9 +46,10 @@
@endforeach @endforeach
</select> </select>
<input class="form-control mr-1" type="text" name="order_no" value="{{ request()->order_no }}"
placeholder="订单号" style="width: 140px;">
<input class="form-control" type="text" name="keyword" value="{{ request()->keyword }}" <input class="form-control" type="text" name="keyword" value="{{ request()->keyword }}"
placeholder="订单编号/联系人/联系电话"> placeholder="联系人/联系电话">
@if(\App\Models\CommonModel::checkExport()) @if(\App\Models\CommonModel::checkExport())
<button class="btn btn-primary ml-1" type="button" onclick="doExport(this)">导出</button> <button class="btn btn-primary ml-1" type="button" onclick="doExport(this)">导出</button>
@endif @endif

Loading…
Cancel
Save