123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller\integral;
-
-
- use app\admin\logic\integral\IntegralOrderLogic;
- use app\admin\validate\integral\IntegralOrderValidate;
- use app\common\basics\AdminBase;
- use app\common\enum\IntegralGoodsEnum;
- use app\common\enum\IntegralOrderEnum;
- use app\common\server\JsonServer;
-
- class IntegralOrder extends AdminBase
- {
-
-
- public function lists()
- {
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- return JsonServer::success('', IntegralOrderLogic::lists($get));
- }
-
-
- $order_status = IntegralOrderEnum::getOrderStatus(true);
-
- $type = IntegralGoodsEnum::getTypeDesc(true);
-
- return view('', [
- 'order_status' => $order_status,
- 'type' => $type,
- ]);
- }
-
-
-
- public function detail()
- {
- $id = $this->request->get('id');
- $detail = IntegralOrderLogic::detail($id);
- return view('', [
- 'detail' => $detail,
- ]);
- }
-
-
-
- public function delivery()
- {
- $id = $this->request->get('id');
- $detail = IntegralOrderLogic::deliveryDetail($id);
- $express = IntegralOrderLogic::express();
- return view('', [
- 'detail' => $detail,
- 'express' => $express
- ]);
- }
-
-
-
- public function deliveryHandle()
- {
- if ($this->request->isAjax()) {
- $post = $this->request->post();
- (new IntegralOrderValidate())->goCheck('deliveryHandle', $post);
- $result = IntegralOrderLogic::deliveryHandle($post,$this->adminId);
- if (true !== $result) {
- return JsonServer::error($result);
- }
- return JsonServer::success('发货成功');
- }
- }
-
-
-
- public function express()
- {
- $id = $this->request->get('id');
- $detail = IntegralOrderLogic::detail($id);
- $detail['shipping'] = IntegralOrderLogic::shippingInfo($detail['id']);
- return view('', [
- 'detail' => $detail
- ]);
- }
-
-
-
- public function confirm()
- {
- if ($this->request->isAjax()) {
- $post = $this->request->post();
- (new IntegralOrderValidate())->goCheck('confirm', $post);
- IntegralOrderLogic::confirm($post['id'],$this->adminId);
- return JsonServer::success('确认成功');
- }
- }
-
-
-
- public function cancel()
- {
- if ($this->request->isAjax()) {
- $post = $this->request->post();
- (new IntegralOrderValidate())->goCheck('cancel', $post);
- IntegralOrderLogic::cancel($post['id']);
- return JsonServer::success('取消成功');
- }
- }
-
- }
|