weizong song 4 years ago
parent 46398a133a
commit 796d244b6b

@ -39,6 +39,10 @@ class OrdersController extends CommonController
$this->model = $this->model->whereRaw("UNIX_TIMESTAMP(`created_at`) >= " . $start_timestamp . " and UNIX_TIMESTAMP(`created_at`) < " . $end_timestamp);
$this->model = $this->model->where("project_id", $project_id);
if ($request->keyword) {
$this->model = $this->model->where("serial", "like", "%" . $request->keyword . "%");
}
$data = $this->model
->with([
"orderItems",

@ -6,7 +6,7 @@
<div class="card">
<div class="card-body">
<div class="mb-3">
<form class="form-inline">
<form class="form-inline" autocomplete="off">
<select class="form-control mr-1" name="project_id"
onchange="$(this).closest('form').submit()">
@foreach($projects as $pp)
@ -14,11 +14,12 @@
value="{{$pp->id}}" @if($pp->id == $project_id) {{ "selected" }}@endif>{{$pp->name}}</option>
@endforeach
</select>
<select class="form-control" name="month" onchange="$(this).closest('form').submit()">
<select class="form-control mr-1" name="month" onchange="$(this).closest('form').submit()">
@foreach($months as $mm)
<option value="{{$mm}}" @if($mm == $month) {{ "selected" }}@endif>{{$mm}}</option>
@endforeach
</select>
<input class="form-control" type="text" name="keyword" value="{{ request()->keyword }}" placeholder="订单编号关键词">
</form>
</div>
<table class="table table-bordered" id="data-table">

Loading…
Cancel
Save