OrderController.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. namespace admin\controllers;
  3. use biz\order\services\OrderService;
  4. use Yii;
  5. use yii\data\Pagination;
  6. use yii\helpers\Json;
  7. use common\models\xhOrder;
  8. use common\models\xhOrderGoods;
  9. use common\components\util;
  10. use common\components\stringUtil;
  11. use common\components\weixinUtil;
  12. use common\services\xhOrderService;
  13. use common\services\xhGoodsService;
  14. use common\services\xhTMessageService;
  15. use common\services\xhUserService;
  16. use common\services\xhUserAlipayService;
  17. use common\components\page;
  18. use common\components\configDict;
  19. class OrderController extends BaseController
  20. {
  21. public $enableCsrfValidation = false;
  22. public function actionList()
  23. {
  24. $get = Yii::$app->request->get();
  25. //组建where
  26. $status = isset($get['status']) ? $get['status'] : 0;
  27. $search = isset($get['search']) ? $get['search'] : '';
  28. $where = ['merchantId' => $this->merchantId, 'status' => $status];
  29. if (!empty($search)) {
  30. if (stringUtil::isMobieNumber($search)) {
  31. $where['receiveMobile'] = $search;
  32. } else {
  33. $where['id'] = $search;
  34. }
  35. }
  36. $list = OrderService::getOrderList($where);
  37. util::success($list);
  38. }
  39. //发货管理 shish 2019.11.30
  40. public function actionSend()
  41. {
  42. return [
  43. 'orderId' => '201911232278449',
  44. 'price' => '390',
  45. 'progress' => [
  46. [
  47. 'name' => '下单',
  48. 'reach' => 1,
  49. 'time' => '11.20 12:30',
  50. 'show' => ['hint' => '已下单']
  51. ],
  52. [
  53. 'name' => '打单',
  54. 'reach' => 1,
  55. 'time' => '11.20 12:30',
  56. 'show' => ['option' => 1, 'info' => ['收花人信息待写上'], 'hint' => '已确认'],
  57. ],
  58. [
  59. 'name' => '发货',
  60. 'reach' => 1,
  61. 'time' => '11.20 12:30',
  62. 'show' => ['option' => 0, 'info' => ['配送信息待写上'], 'hint' => '已确认'],
  63. ],
  64. [
  65. 'name' => '送达',
  66. 'reach' => 1,
  67. 'time' => '11.20 12:30',
  68. 'show' => ['hint' => '已送达']
  69. ],
  70. [
  71. 'name' => '完成',
  72. 'reach' => 1,
  73. 'time' => '11.20 12:30',
  74. 'show' => ['hint' => '订单已完成']
  75. ],
  76. ]
  77. ];
  78. }
  79. }