123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller\order;
-
- use app\common\basics\AdminBase;
- use app\common\model\order\order as OrderModel;
- use app\common\server\JsonServer;
- use app\admin\logic\order\OrderLogic;
- use app\common\model\Client_;
- use app\common\enum\PayEnum;
- use app\common\model\order\OrderLog;
-
-
-
- class Order extends AdminBase
- {
-
-
-
- public function lists()
- {
- $data = OrderLogic::statistics(input());
-
-
- $order_status = OrderModel::getOrderStatus();
-
- $order_status = OrderLogic::getStat($order_status);
- $all = OrderLogic::getAll();
-
- if ($this->request->isAjax()) {
- $data['statistics'] = [
- 'all' => $all,
- 'order_status' => $order_status,
- ];
- return JsonServer::success('', $data);
- }
-
- return view('', [
- 'all' => $all,
- 'statistics' => $data,
- 'order_status' => $order_status,
- 'order_type' => OrderModel::getOrderType(true),
- 'order_source' => Client_::getClient(),
- 'pay_way' => PayEnum::getPayWay(),
- 'delivery_type' => OrderModel::getDeliveryType(true),
- ]);
- }
-
-
-
- public function detail()
- {
-
- $id = $this->request->get('id');
- $detail = OrderLogic::getDetail($id);
- $order_log = OrderLog::getOrderLog($id);
- return view('', [
- 'detail' => $detail,
- 'logs' => $order_log
- ]);
- }
-
-
-
- public function express()
- {
- $id = $this->request->get('id');
- $detail = OrderLogic::getDetail($id);
- $detail['shipping'] = OrderLogic::shippingInfo($detail['id']);
- return view('', [
- 'detail' => $detail
- ]);
- }
-
-
-
-
- public function export()
- {
- $params = $this->request->get();
- $result = OrderLogic::statistics($params, true);
- if(false === $result) {
- return JsonServer::error(OrderLogic::getError() ?: '导出失败');
- }
- return JsonServer::success('', $result);
- }
- }
|