c
This commit is contained in:
@@ -1,17 +1,55 @@
|
||||
<?php
|
||||
|
||||
return _get_order_list();
|
||||
|
||||
// helpers
|
||||
function _get_order_list() {
|
||||
$main_items = [
|
||||
'detail_new',
|
||||
];
|
||||
use Hura8\Components\Order\AdminController\AOrderController;
|
||||
use Hura8\Components\Order\Controller\OrderStatus;
|
||||
use Hura8\System\Paging;
|
||||
|
||||
$menu_list = [];
|
||||
foreach ($main_items as $item) {
|
||||
$menu_list[$item] = include_once __DIR__."/".$item.".php";
|
||||
}
|
||||
$numPerPage = 30;
|
||||
|
||||
return $menu_list;
|
||||
}
|
||||
$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);
|
||||
|
||||
debug_var($item_list);
|
||||
|
||||
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 ,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user