修改店铺订单查询

This commit is contained in:
luofei 2024-06-06 17:32:18 +08:00
parent ba122381af
commit 228830c7bf
4 changed files with 24 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
public function setSearch(): array public function setSearch(): array
{ {
return [ return [
'=' => ['order_id', 'pay_type', 'status', 'staff_id', 'shipping_type'], '=' => ['order_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id'],
]; ];
} }
@ -59,6 +59,13 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
->when(!empty($this->request->adminInfo['store_id']), function ($query) { ->when(!empty($this->request->adminInfo['store_id']), function ($query) {
$query->where('store_id', '=', $this->request->adminInfo['store_id']); $query->where('store_id', '=', $this->request->adminInfo['store_id']);
}) })
->when(!empty($this->params['status']), function ($query) {
if (is_array($this->params['status'])) {
$query->whereIn('status', $this->params['status']);
} else {
$query->where('status', $this->params['status']);
}
})
->field(['id', 'store_id', 'staff_id', 'order_id', 'pay_price', 'pay_time', 'pay_type', 'status', 'uid']) ->field(['id', 'store_id', 'staff_id', 'order_id', 'pay_price', 'pay_time', 'pay_type', 'status', 'uid'])
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc']) ->order(['id' => 'desc'])

View File

@ -94,6 +94,13 @@ class SystemStoreLogic extends BaseLogic
'city' => $params['city_code'], 'city' => $params['city_code'],
'area' => $params['area_code'], 'area' => $params['area_code'],
'street' => $params['street_code'], 'street' => $params['street_code'],
'address' => $params['address'] ?? '',
'oblong_image' => $params['oblong_image'] ?? '',
'valid_range' => $params['valid_range'] ?? 0,
'day_time' => $params['day_time'] ?? 0,
'is_store' => $params['is_store'] ?? 0,
'is_send' => $params['is_send'] ?? 0,
'default_delivery' => $params['default_delivery'] ?? 2,
]); ]);
$res=SystemStoreStaff::where('store_id', $params['id'])->where('is_admin', 1)->where('account', $params['phone'])->find(); $res=SystemStoreStaff::where('store_id', $params['id'])->where('is_admin', 1)->where('account', $params['phone'])->find();
if($params['password']!=''&&$res){ if($params['password']!=''&&$res){

View File

@ -68,6 +68,14 @@ class ConfigController extends BaseAdminController
return $this->data($result); return $this->data($result);
} }
public function saveStore()
{
$params = $this->request->post();
$params['id'] = $this->request->adminInfo['store_id'];
SystemStoreLogic::edit($params);
return $this->success('操作成功', [], 1, 1);
}
#[ #[
ApiDoc\Title('省列表'), ApiDoc\Title('省列表'),
ApiDoc\url('/store/config/province'), ApiDoc\url('/store/config/province'),

View File

@ -30,7 +30,7 @@ class StoreOrderController extends BaseAdminController
ApiDoc\Author('中国队长'), ApiDoc\Author('中国队长'),
ApiDoc\Query(name: 'order_id', type: 'string', require: false, desc: '订单编号'), ApiDoc\Query(name: 'order_id', type: 'string', require: false, desc: '订单编号'),
ApiDoc\Query(name: 'staff_id', type: 'int', require: false, desc: '店员id'), ApiDoc\Query(name: 'staff_id', type: 'int', require: false, desc: '店员id'),
ApiDoc\Query(name: 'staff_id', type: 'int', require: false, desc: '店员id'), ApiDoc\Query(name: 'delivery_phone', type: 'int', require: false, desc: '配送员手机号'),
ApiDoc\Query(name: 'shipping_type', type: 'int', require: false, desc: '订单配送方式1配送订单2核销订单3收银台订单'), ApiDoc\Query(name: 'shipping_type', type: 'int', require: false, desc: '订单配送方式1配送订单2核销订单3收银台订单'),
ApiDoc\Query(name: 'start_time', type: 'string', require: false, desc: '开始时间'), ApiDoc\Query(name: 'start_time', type: 'string', require: false, desc: '开始时间'),
ApiDoc\Query(name: 'end_time', type: 'string', require: false, desc: '结束时间'), ApiDoc\Query(name: 'end_time', type: 'string', require: false, desc: '结束时间'),