This commit is contained in:
parent
05410da29e
commit
ba32addfdb
|
|
@ -102,12 +102,6 @@ class ProductRepo
|
|||
});
|
||||
}
|
||||
|
||||
if (isset($data['model'])) {
|
||||
$builder->whereHas('skus', function ($query) use ($data) {
|
||||
$query->where('sku', 'like', "%{$data['sku']}%");
|
||||
});
|
||||
}
|
||||
|
||||
if (isset($data['name'])) {
|
||||
$builder->whereHas('description', function ($query) use ($data) {
|
||||
$query->where('name', 'like', "%{$data['name']}%");
|
||||
|
|
|
|||
|
|
@ -26,6 +26,11 @@
|
|||
<input type="text" v-model="filter.sku" class="form-control" placeholder="sku">
|
||||
</div>
|
||||
|
||||
<div class="col-xxl-20 col-xl-3 col-lg-4 col-md-4 d-flex align-items-center mb-3">
|
||||
<label class="filter-title">{{ __('product.model') }}</label>
|
||||
<input type="text" v-model="filter.model" class="form-control" placeholder="model">
|
||||
</div>
|
||||
|
||||
<div class="col-xxl-20 col-xl-3 col-lg-4 col-md-4 d-flex align-items-center mb-3">
|
||||
<label class="filter-title">{{ __('product.category') }}</label>
|
||||
<select v-model="filter.category_id" class="form-control">
|
||||
|
|
@ -147,6 +152,7 @@
|
|||
name: bk.getQueryString('name'),
|
||||
category_id: bk.getQueryString('category_id'),
|
||||
sku: bk.getQueryString('sku'),
|
||||
model: bk.getQueryString('model'),
|
||||
active: bk.getQueryString('active'),
|
||||
},
|
||||
selected: [],
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ return [
|
|||
'price' => 'Price',
|
||||
'brand' => 'Brand',
|
||||
'category' => 'Category',
|
||||
'model' => 'Model',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ return [
|
|||
'price' => '价格',
|
||||
'brand' => '品牌',
|
||||
'category' => '分类',
|
||||
'model' => '型号'
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue