CarLoadingController.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?php
  2. namespace app\modules\alliance\controllers\agentStaff;
  3. use app\modules\alliance\behaviors\AgentFrontDriver;
  4. use app\modules\alliance\controllers\BaseController;
  5. use app\modules\alliance\models\agentStaff\CarLoadingForm;
  6. use yii\helpers\ArrayHelper;
  7. class CarLoadingController extends BaseController
  8. {
  9. public $agentFrontDriverId;//司机ID
  10. public $agentFrontId;//仓库ID
  11. public function behaviors()
  12. {
  13. $merge = [
  14. 'store' => [
  15. 'class' => AgentFrontDriver::class,
  16. ]
  17. ];
  18. return ArrayHelper::merge($merge, parent::behaviors());
  19. }
  20. //装车任务-在途配送页面
  21. public function actionCarLoadingTaskList() {
  22. $form = new CarLoadingForm();
  23. $form->attributes = get_params();
  24. $form->admin_id = $this->agentFrontId;
  25. $form->driver_id = $this->agentFrontDriverId;
  26. return $this->asJson($form->carLoadingTaskList());
  27. }
  28. //装车信息确认
  29. public function actionDriverLineConfirmInfo() {
  30. $form = new CarLoadingForm();
  31. $form->attributes = get_params();
  32. $form->admin_id = $this->agentFrontId;
  33. $form->driver_id = $this->agentFrontDriverId;
  34. return $this->asJson($form->driverLineConfirmInfo());
  35. }
  36. //点击装车
  37. public function actionDriverLineStart() {
  38. $form = new CarLoadingForm();
  39. $form->attributes = post_params();
  40. $form->admin_id = $this->agentFrontId;
  41. $form->driver_id = $this->agentFrontDriverId;
  42. return $this->asJson($form->driverLineStart());
  43. }
  44. //获取待送达列表
  45. public function actionGetDriverLineOrderList() {
  46. $form = new CarLoadingForm();
  47. $form->attributes = get_params();
  48. $form->admin_id = $this->agentFrontId;
  49. $form->driver_id = $this->agentFrontDriverId;
  50. return $this->asJson($form->getDriverLineOrderList());
  51. }
  52. //获取团点坐标以及线路
  53. public function actionGetDriverToMd() {
  54. $form = new CarLoadingForm();
  55. $form->attributes = get_params();
  56. $form->admin_id = $this->agentFrontId;
  57. $form->driver_id = $this->agentFrontDriverId;
  58. return $this->asJson($form->getDriverToMd());
  59. }
  60. //排序
  61. public function actionSetLineOrderSort() {
  62. $form = new CarLoadingForm();
  63. $form->attributes = post_params();
  64. $form->admin_id = $this->agentFrontId;
  65. $form->driver_id = $this->agentFrontDriverId;
  66. return $this->asJson($form->setLineOrderSort());
  67. }
  68. //线路配送详情
  69. public function actionGetLineOrderInfo() {
  70. $form = new CarLoadingForm();
  71. $form->attributes = get_params();
  72. $form->admin_id = $this->agentFrontId;
  73. $form->driver_id = $this->agentFrontDriverId;
  74. return $this->asJson($form->getLineOrderInfo());
  75. }
  76. //线路配送详情明细
  77. public function actionGetLineOrderDetail() {
  78. $form = new CarLoadingForm();
  79. $form->attributes = get_params();
  80. $form->admin_id = $this->agentFrontId;
  81. $form->driver_id = $this->agentFrontDriverId;
  82. return $this->asJson($form->getLineOrderDetail());
  83. }
  84. //线路团点配送详情明细(按照团线商品区分 不做团线tab)
  85. public function actionGetLineMdDetail() {
  86. $form = new CarLoadingForm();
  87. $form->attributes = get_params();
  88. $form->admin_id = $this->agentFrontId;
  89. $form->driver_id = $this->agentFrontDriverId;
  90. return $this->asJson($form->getLineMdDetail());
  91. }
  92. //去配送
  93. public function actionGoDeliveryOrder() {
  94. $form = new CarLoadingForm();
  95. $form->attributes = post_params();
  96. $form->admin_id = $this->agentFrontId;
  97. $form->driver_id = $this->agentFrontDriverId;
  98. return $this->asJson($form->goDeliveryOrder());
  99. }
  100. //已完成运单
  101. public function actionFinishOrderList() {
  102. $form = new CarLoadingForm();
  103. $form->attributes = get_params();
  104. $form->admin_id = $this->agentFrontId;
  105. $form->driver_id = $this->agentFrontDriverId;
  106. return $this->asJson($form->finishOrderList());
  107. }
  108. //已完成运单详情
  109. public function actionFinishOrderDetail() {
  110. $form = new CarLoadingForm();
  111. $form->attributes = get_params();
  112. $form->admin_id = $this->agentFrontId;
  113. $form->driver_id = $this->agentFrontDriverId;
  114. return $this->asJson($form->finishOrderDetail());
  115. }
  116. //商品查询
  117. public function actionSearchGoods() {
  118. $form = new CarLoadingForm();
  119. $form->attributes = get_params();
  120. $form->admin_id = $this->agentFrontId;
  121. $form->driver_id = $this->agentFrontDriverId;
  122. return $this->asJson($form->searchGoods());
  123. }
  124. //退货取回
  125. public function actionGoodsRefundList() {
  126. $form = new CarLoadingForm();
  127. $form->attributes = get_params();
  128. $form->admin_id = $this->agentFrontId;
  129. $form->driver_id = $this->agentFrontDriverId;
  130. return $this->asJson($form->goodsRefundList());
  131. }
  132. //退货详情
  133. public function actionGoodsRefundDetail() {
  134. $form = new CarLoadingForm();
  135. $form->attributes = get_params();
  136. $form->admin_id = $this->agentFrontId;
  137. $form->driver_id = $this->agentFrontDriverId;
  138. return $this->asJson($form->refundDetail());
  139. }
  140. //退货确认
  141. public function actionGoodsRefundConfirm() {
  142. $form = new CarLoadingForm();
  143. $form->attributes = post_params();
  144. $form->admin_id = $this->agentFrontId;
  145. $form->driver_id = $this->agentFrontDriverId;
  146. return $this->asJson($form->refundConfirm());
  147. }
  148. //装车历史记录
  149. public function actionCarLoadingLog() {
  150. $form = new CarLoadingForm();
  151. $form->attributes = post_params();
  152. $form->admin_id = $this->agentFrontId;
  153. $form->driver_id = $this->agentFrontDriverId;
  154. return $this->asJson($form->carLoadingLog());
  155. }
  156. }