修改门店预订单查询
This commit is contained in:
parent
f485c956df
commit
5d73af5719
@ -12,6 +12,7 @@ use app\common\model\system_store\SystemStore;
|
||||
use app\common\lists\ListsExcelInterface;
|
||||
use app\common\model\beforehand_order_cart_info\BeforehandOrderCartInfo;
|
||||
use app\common\model\store_order\StoreOrder;
|
||||
use app\common\model\system_store\SystemStoreStaff;
|
||||
use app\common\model\warehouse_order\WarehouseOrder;
|
||||
use app\common\model\warehouse_product\WarehouseProduct;
|
||||
|
||||
@ -33,7 +34,7 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['store_id', 'paid', 'status', 'order_type', 'admin_id'],
|
||||
'=' => ['store_id', 'paid', 'status', 'order_type', 'admin_id', 'store_staff_id'],
|
||||
'%like' => ['order_id','order_sn'],
|
||||
'%like%' => ['mark'],
|
||||
'between_time' => 'create_time'
|
||||
@ -81,8 +82,9 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
$oid=WarehouseOrder::where('financial_pm',0)->where('code','like','%'.$order_ck)->column('id');
|
||||
$this->searchWhere[] = ['outbound_id','in',$oid];
|
||||
}
|
||||
$file=['id','uid', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file','other_data', 'audit_status'];
|
||||
return BeforehandOrder::where($this->searchWhere)
|
||||
$file=['id','uid', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file','other_data', 'audit_status', 'store_staff_id'];
|
||||
$query = BeforehandOrder::where($this->searchWhere);
|
||||
return $query
|
||||
->field($file)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
@ -94,6 +96,9 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
} else {
|
||||
$item->admin_name = '';
|
||||
}
|
||||
if ($item->store_staff_id) {
|
||||
$item->admin_name = SystemStoreStaff::where(['id' => $item->store_staff_id])->value('staff_name');
|
||||
}
|
||||
if ($item->order_type == 1) {
|
||||
$item->order_type_name = '铺货订单';
|
||||
} elseif ($item->order_type == 2) {
|
||||
|
@ -112,6 +112,7 @@ class BeforehandOrderLogic extends BaseLogic
|
||||
$order = BeforehandOrder::create([
|
||||
'order_id' => getNewOrderId('YG'),
|
||||
'admin_id' => $params['admin_id'] ?? 0,
|
||||
'store_staff_id' => $params['store_staff_id'] ?? 0,
|
||||
'store_id' => $params['store_id'] ?? 0,
|
||||
'uid' => $uid,
|
||||
'total_num' => $total_num,
|
||||
|
@ -39,7 +39,7 @@ class BeforehandOrderController extends BaseAdminController
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$params['store_id'] = $this->request->adminInfo['store_id'] ?? 0;
|
||||
$params['admin_id'] = $this->request->adminInfo['admin_id'] ?? 0;
|
||||
$params['store_staff_id'] = $this->request->adminInfo['admin_id'] ?? 0;
|
||||
$this->request->setGet($params);
|
||||
return $this->dataLists(new BeforehandOrderLists());
|
||||
}
|
||||
@ -63,7 +63,7 @@ class BeforehandOrderController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$params['store_staff_id'] = $this->adminId;
|
||||
$params['store_id'] = $this->request->adminInfo['store_id'] ?? 0;
|
||||
$other_data = [
|
||||
'nickname' => $params['nickname'] ?? '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user