feat(StoreFinanceFlowLists): 添加了财务类型和财务方式的搜索条件
This commit is contained in:
parent
6478f0f86e
commit
149afec11f
@ -32,7 +32,7 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['store_id', 'user_id', 'create_time', 'staff_id'],
|
||||
'=' => ['store_id', 'user_id', 'create_time', 'staff_id','financial_type','financial_pm','order_id'],
|
||||
'between_time' => 'create_time',
|
||||
'%pipe_like%' => ['keyword' => 'order_sn'],
|
||||
];
|
||||
@ -53,12 +53,15 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
||||
$field = [
|
||||
'id', 'order_id', 'order_sn', 'create_time', 'other_uid', 'user_id', 'store_id', 'staff_id', 'financial_type', 'financial_pm', 'pay_type', 'type', 'number', 'status'
|
||||
];
|
||||
$this->searchWhere[] = ['financial_type', '=', 1];
|
||||
$this->searchWhere[] = ['financial_pm', '=', 1];
|
||||
if($this->request->get('order_id')){
|
||||
$order=['financial_pm'=>'desc'];
|
||||
}else{
|
||||
$order=['id'=>'desc'];
|
||||
}
|
||||
$data = StoreFinanceFlow::where($this->searchWhere)
|
||||
->field($field)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->order($order)
|
||||
->select()->each(function ($item) {
|
||||
if ($item['user_id'] <= 0) {
|
||||
$item['nickname'] = '游客';
|
||||
|
Loading…
x
Reference in New Issue
Block a user