|
|
|
@ -34,7 +34,7 @@ class ImsCjdcOrderMainController extends AdminController |
|
|
|
$grid->paginate(10);//每页展示数据10条
|
|
|
|
//$grid->id;
|
|
|
|
//$grid->user_id('用户信息');
|
|
|
|
$grid->column('user_name','用户信息'); |
|
|
|
$grid->column('nick_name','用户信息'); |
|
|
|
$grid->order_num; |
|
|
|
|
|
|
|
$grid->state('订单状态') |
|
|
|
@ -42,88 +42,36 @@ class ImsCjdcOrderMainController extends AdminController |
|
|
|
->label([1=>'dark',2=>'danger',3=>'indigo',4=>'success']); |
|
|
|
$grid->money; |
|
|
|
$grid->column('market.name','所属市场'); |
|
|
|
$grid->time; |
|
|
|
$grid->pay_time; |
|
|
|
|
|
|
|
$grid->actions(new CheckRow('自送')); |
|
|
|
|
|
|
|
$grid->column('配送方式') |
|
|
|
->if(function ($column){ |
|
|
|
if ($this->state==3){ |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
|
|
|
|
}) |
|
|
|
->display('站内自送') |
|
|
|
->modal('站内自送',function ($modal){ |
|
|
|
return CouponTieForm::make(); |
|
|
|
}) |
|
|
|
->else() |
|
|
|
->display('站内自送'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$grid->pay_time('支付时间')->display(function (){ |
|
|
|
return date('Y-m-d H:i:s'); |
|
|
|
}); |
|
|
|
$grid->created_at('下单时间')->display(function (){ |
|
|
|
return date('Y-m-d H:i:s'); |
|
|
|
}); |
|
|
|
|
|
|
|
$grid->actions(function (Grid\Displayers\Actions $actions) use ($grid){ |
|
|
|
$state = $actions->row->state; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($state==2){ |
|
|
|
$actions->append(new OrderStateHandle('接单',3)); |
|
|
|
$actions->append(new OrderPrint('打印')); |
|
|
|
}elseif ($state==31){ |
|
|
|
}elseif ($state==311){ |
|
|
|
$actions->append(new OrderStateHandle('完成',4)); |
|
|
|
$actions->append(new OrderPrint('打印')); |
|
|
|
}elseif ($state==3){ |
|
|
|
$actions->append(new OrderStateHandle('站内自送',30)); |
|
|
|
$actions->append(new OrderPrint('打印')); |
|
|
|
$actions->append(new CheckRow($actions->row->id,'自送')); |
|
|
|
} |
|
|
|
|
|
|
|
$actions->append(new OrderDetail('详情')); |
|
|
|
|
|
|
|
//$actions->append("<a class='btn btn-xs action-btn btn-danger grid-row-refuse' data-id='{$actions->getKey()}'><i class='fa fa-close' title='拒绝退款'>拒绝</i></a> ");
|
|
|
|
//$actions->append("<a class='btn btn-xs action-btn btn-success grid-row-pass' data-id='{$actions->getKey()}'><i class='fa fa-check' title='同意退款'>同意</i></a>");
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
//$grid->column('详情')->modal('详情',function ()use ($grid){
|
|
|
|
// return view('orderdetail',['id'=>2]);
|
|
|
|
//
|
|
|
|
//});
|
|
|
|
|
|
|
|
$grid->filter(function (Grid\Filter $filter) { |
|
|
|
$filter->equal('id'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$grid->disableViewButton(); |
|
|
|
$grid->disableEditButton(); |
|
|
|
$grid->disableDeleteButton(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|