Revert "业绩明细:新增「种菜订单」筛选(全部/只看种菜/排除种菜),页面统计与导出同步生效"
This reverts commit 9ba90667b148aa8da62fdf7d7dd20ed5cf12b03a.
This commit is contained in:
parent
9ba90667b1
commit
74b2d3a086
@ -634,11 +634,8 @@ class Pages extends Controller
|
||||
$storeFilter = $this->receiptOrderMatchFilterValues(request('store_name'));
|
||||
[$statusFilter, $remarkFilter] = $this->receiptOrderMatchStatusFilters(request('match_status'), request('remark'));
|
||||
$orderNo = trim((string) request('online_order_no', ''));
|
||||
// 种菜订单:'' 全部 / 'yes' 只看种菜 / 'no' 排除种菜(种菜订单在订单侧算了商品金额、账单侧几乎没收款)
|
||||
$planting = trim((string) request('planting', ''));
|
||||
$planting = in_array($planting, ['yes', 'no'], true) ? $planting : '';
|
||||
|
||||
$applyFilters = static function ($query) use ($platformFilter, $storeFilter, $orderNo, $statusFilter, $remarkFilter, $planting): void {
|
||||
$applyFilters = static function ($query) use ($platformFilter, $storeFilter, $orderNo, $statusFilter, $remarkFilter): void {
|
||||
if ($platformFilter !== []) {
|
||||
$query->whereIn('platform', $platformFilter);
|
||||
}
|
||||
@ -655,11 +652,6 @@ class Pages extends Controller
|
||||
if ($remarkFilter !== []) {
|
||||
$query->whereIn('remark', $remarkFilter);
|
||||
}
|
||||
if ($planting === 'yes') {
|
||||
$query->whereNotNull('planting_amount');
|
||||
} elseif ($planting === 'no') {
|
||||
$query->whereNull('planting_amount');
|
||||
}
|
||||
};
|
||||
|
||||
// 镜像表本身就是「一个店铺 + 一个订单号 + 一个商品金额」的行口径,直接统计即可。
|
||||
@ -840,9 +832,6 @@ class Pages extends Controller
|
||||
'store_name' => $this->receiptOrderMatchFilterValues(request('store_name')),
|
||||
'match_status' => $statusValues,
|
||||
'remark' => $remarkValues,
|
||||
'planting' => in_array(trim((string) request('planting', '')), ['yes', 'no'], true)
|
||||
? trim((string) request('planting', ''))
|
||||
: '',
|
||||
];
|
||||
$orderNo = trim((string) request('online_order_no', ''));
|
||||
|
||||
@ -874,16 +863,6 @@ class Pages extends Controller
|
||||
if ($key === $column || $values === []) {
|
||||
continue;
|
||||
}
|
||||
// 种菜订单不是列,是「种菜金额是否为空」的伪筛选
|
||||
if ($key === 'planting') {
|
||||
if ($values === 'yes') {
|
||||
$query->whereNotNull('planting_amount');
|
||||
} elseif ($values === 'no') {
|
||||
$query->whereNull('planting_amount');
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
$query->whereIn($key, $values);
|
||||
}
|
||||
if ($orderNo !== '') {
|
||||
@ -1002,12 +981,6 @@ class Pages extends Controller
|
||||
if ($remarkValues !== []) {
|
||||
$query->whereIn('remark', $remarkValues);
|
||||
}
|
||||
$planting = trim((string) $request->query('planting', ''));
|
||||
if ($planting === 'yes') {
|
||||
$query->whereNotNull('planting_amount');
|
||||
} elseif ($planting === 'no') {
|
||||
$query->whereNull('planting_amount');
|
||||
}
|
||||
|
||||
$selected = array_values(array_intersect(
|
||||
array_filter(explode(',', (string) $request->query('columns', ''))),
|
||||
|
||||
@ -1442,14 +1442,6 @@
|
||||
</label>
|
||||
@endforeach
|
||||
<div class="installation-filter-actions">
|
||||
<label class="installation-filter-field">
|
||||
<span>种菜订单:</span>
|
||||
<select name="planting" aria-label="种菜订单筛选">
|
||||
<option value="" @selected(request('planting') === null || request('planting') === '')>全部</option>
|
||||
<option value="yes" @selected(request('planting') === 'yes')>只看种菜</option>
|
||||
<option value="no" @selected(request('planting') === 'no')>排除种菜</option>
|
||||
</select>
|
||||
</label>
|
||||
<button type="submit" class="biz-btn biz-btn-primary">查询</button>
|
||||
<a href="{{ request()->url() }}" class="biz-btn biz-btn-ghost">清除</a>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user