链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.9 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Controllers\v3;
  3. use App\Admin\Repositories\v3\OrderReport;
  4. use Dcat\Admin\Form;
  5. use Dcat\Admin\Grid;
  6. use Dcat\Admin\Show;
  7. use Dcat\Admin\Controllers\AdminController;
  8. use Dcat\Admin\Layout\Content;
  9. use Dcat\Admin\Form\Row;
  10. use Dcat\Admin\Grid\Column;
  11. use App\Models\v3\Market as marketModel;
  12. use App\Models\ImsCjdcOrder as OrderModel;
  13. use Illuminate\Support\Facades\DB;
  14. use App\Admin\Extensions\OrderReportPage;
  15. use Dcat\Admin\Widgets\Lazy;
  16. class OrderReportController extends AdminController
  17. {
  18. /**
  19. * Make a grid builder.
  20. *
  21. * @return Grid
  22. */
  23. protected function grid()
  24. {
  25. $marketId = request()->get('market_id');
  26. return Grid::make(new OrderReport(), function (Grid $grid) {
  27. });
  28. }
  29. public function index(Content $content)
  30. {
  31. $marketId = request()->input('market_id');
  32. $startTime = request()->input('start_time');
  33. $endTime = request()->input('end_time');
  34. // 实例化表单类并传递自定义参数
  35. $order = OrderReportPage::make(['market_id' => $marketId,'start_time'=>$startTime,'endTime'=>$endTime]);
  36. return $content->header("统计")
  37. ->breadcrumb(['text' => '统计', 'url' => 'index'])
  38. ->body(Lazy::make($order));
  39. }
  40. /**
  41. * Make a show builder.
  42. *
  43. * @param mixed $id
  44. *
  45. * @return Show
  46. */
  47. protected function detail($id)
  48. {
  49. return Show::make($id, new OrderModel(), function (Show $show) {
  50. $show->id;
  51. $show->market_id;
  52. $show->name;
  53. $show->mm_user_id;
  54. });
  55. }
  56. /**
  57. * Make a form builder.
  58. *
  59. * @return Form
  60. */
  61. protected function form()
  62. {
  63. return Form::make(new OrderModel(), function (Form $form) {
  64. $form->display('id');
  65. $form->text('market_id');
  66. $form->text('name');
  67. $form->text('mm_user_id');
  68. });
  69. }
  70. }