2024-01-20 09:29:38 +07:00
|
|
|
<?php
|
2024-01-26 10:41:49 +07:00
|
|
|
|
|
|
|
|
|
2024-01-31 11:36:25 +07:00
|
|
|
use Hura8\Components\Order\AdminController\AOrderController;
|
|
|
|
|
use Hura8\Components\Order\Controller\OrderStatus;
|
|
|
|
|
use Hura8\System\Paging;
|
2024-01-26 10:41:49 +07:00
|
|
|
|
2024-01-31 11:36:25 +07:00
|
|
|
$numPerPage = 30;
|
2024-01-26 10:41:49 +07:00
|
|
|
|
2024-01-31 11:36:25 +07:00
|
|
|
$conditions = array(
|
|
|
|
|
'orderCode' => getRequest('orderCode', ''),
|
|
|
|
|
'q' => getRequest('q', ''),
|
|
|
|
|
//'coupon' => getRequest('coupon', ''),
|
|
|
|
|
'cus_id' => getRequest('cus_id', ''),
|
|
|
|
|
'province' => getRequest('province', ''),
|
|
|
|
|
//'district' => getRequest('district', ''),
|
|
|
|
|
'folder' => getRequest('folder', ''),
|
|
|
|
|
'view_status' => getRequest('view_status', ''),
|
|
|
|
|
'update_by' => getRequest('update_by', ''),
|
|
|
|
|
//'shipping_status' => getRequest('shipping_status', ''),
|
|
|
|
|
'assign_to' => getRequest('assign_to', ''),
|
|
|
|
|
'from_date' => getRequest('from_date', ''),
|
|
|
|
|
'to_date' => getRequest('to_date', ''),
|
|
|
|
|
//'from_hour' => getRequest('from_hour', ''),
|
|
|
|
|
//'to_hour' => getRequest('to_hour', ''),
|
|
|
|
|
'payment' => getRequest('payment', ''),
|
|
|
|
|
'fullfillment' => getRequest('fullfillment', ''),
|
|
|
|
|
'status' => getRequest('status', ''),
|
|
|
|
|
//'excluded_ids' => getRequest('', ''),
|
|
|
|
|
//'included_ids' => getRequest('', ''),
|
|
|
|
|
'list' => getRequest('list', ''),
|
|
|
|
|
'numPerPage' => $numPerPage,
|
|
|
|
|
'page' => getPageId(),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$objAOrderController = new AOrderController();
|
|
|
|
|
$totalResults = $objAOrderController->getTotal($conditions);
|
|
|
|
|
$item_list = $objAOrderController->getList($conditions);
|
|
|
|
|
|
2024-05-02 09:50:06 +07:00
|
|
|
//debug_var($item_list);
|
2024-01-31 11:36:25 +07:00
|
|
|
|
|
|
|
|
list($page_collection, $tb_page, $total_pages) = Paging::paging_template($totalResults, $numPerPage);
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
"total" => $totalResults,
|
|
|
|
|
"item_list" => $item_list,
|
|
|
|
|
"pagination" => [
|
|
|
|
|
'collection' => $page_collection,
|
|
|
|
|
'html' => $tb_page,
|
|
|
|
|
'total_pages' => $total_pages,
|
|
|
|
|
],
|
|
|
|
|
"order_status_list" => OrderStatus::ORDER_STATUS ,
|
|
|
|
|
"payment_status_list" => OrderStatus::PAYMENT_STATUS,
|
|
|
|
|
"fullfillment_status_list" => OrderStatus::FULFILLMENT_STATUS ,
|
|
|
|
|
];
|