| xqd
@@ -14,35 +14,36 @@ class HomeController extends Controller
|
|
|
{
|
|
|
public function index(Content $content)
|
|
|
{
|
|
|
-// dd(\Admin::user()->isRole('financial_staff'));
|
|
|
if (\Admin::user()->isRole('financial_staff')){
|
|
|
return redirect('admin/refund_applications');
|
|
|
}
|
|
|
+ $start_time = date('Y-m-d 00:00:00',time());
|
|
|
+ $end_time = date('Y-m-d 00:00:00',strtotime('+1 days',time()));
|
|
|
return $content
|
|
|
->title('欢迎进入后台管理系统')
|
|
|
->description('后台数据中心')
|
|
|
->row('<h1 text-align="center">订单概况</h1>')
|
|
|
- ->row(function (Row $row) {
|
|
|
+ ->row(function (Row $row) use ($end_time,$start_time){
|
|
|
// 产品类型(1.电话咨询 2.图文咨询 3.门诊预约 4.疫苗接种预约 5.儿保预约 6.服务包 7.充值)
|
|
|
- $row->column(3, function (Column $column) {
|
|
|
- $column->append(infoBox('新增电话咨询订单', 'dropbox', '/admin/consulting_orders?product_type=1', 'green', Sta::getOrderCount(1)));
|
|
|
+ $row->column(3, function (Column $column) use ($end_time,$start_time){
|
|
|
+ $column->append(infoBox('新增电话咨询订单', 'dropbox', '/admin/consulting_orders?product_type=1&created_at[start]='.$start_time.'&created_at[end]='.$end_time.'', 'green', Sta::getOrderCount(1)));
|
|
|
});
|
|
|
- $row->column(3, function (Column $column) {
|
|
|
- $column->append(\App\Admin\Controllers\infoBox('新增图文咨询订单', 'dropbox', '/admin/consulting_orders?product_type=2', 'green', Sta::getOrderCount(2)));
|
|
|
+ $row->column(3, function (Column $column) use ($end_time,$start_time) {
|
|
|
+ $column->append(\App\Admin\Controllers\infoBox('新增图文咨询订单', 'dropbox', '/admin/consulting_orders?product_type=2&created_at[start]='.$start_time.'&created_at[end]='.$end_time.'', 'green', Sta::getOrderCount(2)));
|
|
|
});
|
|
|
|
|
|
- $row->column(3, function (Column $column) {
|
|
|
- $column->append(infoBox('新增门诊预约订单', 'user-plus', '/admin/booking_order?product_type=3', 'green',Sta::getOrderCount(3)));
|
|
|
+ $row->column(3, function (Column $column) use ($end_time,$start_time) {
|
|
|
+ $column->append(infoBox('新增门诊预约订单', 'user-plus', '/admin/booking_order?product_type=3&created_at[start]='.$start_time.'&created_at[end]='.$end_time.'', 'green',Sta::getOrderCount(3)));
|
|
|
});
|
|
|
|
|
|
- $row->column(3, function (Column $column) {
|
|
|
- $column->append(\App\Admin\Controllers\infoBox('新增计免预约订单', 'user-plus', '/admin/booking_order?product_type=4', 'green', Sta::getOrderCount(4)));
|
|
|
+ $row->column(3, function (Column $column) use ($end_time,$start_time) {
|
|
|
+ $column->append(\App\Admin\Controllers\infoBox('新增计免预约订单', 'user-plus', '/admin/booking_order?product_type=4&created_at[start]='.$start_time.'&created_at[end]='.$end_time.'', 'green', Sta::getOrderCount(4)));
|
|
|
});
|
|
|
})
|
|
|
- ->row(function (Row $row) {
|
|
|
+ ->row(function (Row $row) use ($end_time,$start_time) {
|
|
|
//产品类型(1.电话咨询 2.图文咨询 3.门诊预约 4.疫苗接种预约 5.儿保预约 6.服务包 7.充值)
|
|
|
- $row->column(3, function (Column $column) {
|
|
|
- $column->append(\App\Admin\Controllers\infoBox('新增儿保订单', 'dropbox', '/admin/booking_order?product_type=5', 'green', Sta::getOrderCount(5)));
|
|
|
+ $row->column(3, function (Column $column) use ($end_time,$start_time) {
|
|
|
+ $column->append(\App\Admin\Controllers\infoBox('新增儿保订单', 'dropbox', '/admin/booking_order?product_type=5&created_at[start]='.$start_time.'&created_at[end]='.$end_time.'', 'green', Sta::getOrderCount(5)));
|
|
|
});
|
|
|
$row->column(3, function (Column $column) {
|
|
|
$column->append(\App\Admin\Controllers\infoBox('历史总订单', 'dropbox', 'javascript:void(0)', 'green', Sta::getOrderCount(0)));
|