|
|
@ -11,10 +11,6 @@ use App\Admin\Extensions\OrderPrint; |
|
|
use App\Admin\Extensions\OrderRefund; |
|
|
use App\Admin\Extensions\OrderRefund; |
|
|
use App\Admin\Extensions\OrderStateHandle; |
|
|
use App\Admin\Extensions\OrderStateHandle; |
|
|
use App\Admin\Repositories\ImsCjdcOrderMain; |
|
|
use App\Admin\Repositories\ImsCjdcOrderMain; |
|
|
use App\Models\ImsCjdcMarket; |
|
|
|
|
|
use App\Models\LanzuMarket; |
|
|
|
|
|
use App\Models\LanzuMpInfo; |
|
|
|
|
|
use Dcat\Admin\Admin; |
|
|
|
|
|
use Dcat\Admin\Form; |
|
|
use Dcat\Admin\Form; |
|
|
use Dcat\Admin\Grid; |
|
|
use Dcat\Admin\Grid; |
|
|
use Dcat\Admin\Layout\Content; |
|
|
use Dcat\Admin\Layout\Content; |
|
|
@ -64,24 +60,23 @@ class ImsCjdcOrderMainController extends AdminController |
|
|
|
|
|
|
|
|
$state = $actions->row->state; |
|
|
$state = $actions->row->state; |
|
|
if ($state == 2) { |
|
|
if ($state == 2) { |
|
|
$actions->append(new OrderStateHandle('接单', 3)); |
|
|
|
|
|
|
|
|
$actions->append(new OrderStateHandle('<div type="button" style="width:140px" class="btn btn-outline-danger">接单</div>', 3)); |
|
|
} elseif ($state == 311) { |
|
|
} elseif ($state == 311) { |
|
|
$actions->append(new OrderStateHandle('完成', 4)); |
|
|
|
|
|
$actions->append(new OrderPrint('打印')); |
|
|
|
|
|
|
|
|
$actions->append(new OrderStateHandle('<div type="button" style="width:140px" class="btn btn-outline-warning">完成</div>', 4)); |
|
|
|
|
|
$actions->append(new OrderPrint('<div type="button" style="width:140px" class="btn btn-outline-dark">打印</div>')); |
|
|
} elseif ($state == 3) { |
|
|
} elseif ($state == 3) { |
|
|
$actions->append(new OrderPrint('打印')); |
|
|
|
|
|
$actions->append(new CheckRow($actions->row->id, $grid->model()->getCurrentPage(), '自送')); |
|
|
|
|
|
|
|
|
$actions->append(new OrderPrint('<div type="button" style="width:140px" class="btn btn-outline-dark">打印</div>')); |
|
|
|
|
|
$actions->append(new CheckRow($actions->row->id, $grid->model()->getCurrentPage(), '<div type="button" style="width:140px" class="btn btn-outline-info">自送</div>')); |
|
|
} elseif ($state == 8) { |
|
|
} elseif ($state == 8) { |
|
|
$actions->append(new OrderStateHandle('同意退款', 9)); |
|
|
|
|
|
$actions->append(new OrderRefund($actions->row->id, $grid->model()->getCurrentPage(), '拒绝退款')); |
|
|
|
|
|
|
|
|
$actions->append(new OrderStateHandle('<div type="button" style="width:140px" class="btn btn-outline-secondary">同意退款</div>', 9)); |
|
|
|
|
|
$actions->append(new OrderRefund($actions->row->id, $grid->model()->getCurrentPage(), '<div type="button" style="width:140px" class="btn btn-outline-secondary">拒绝退款</div>')); |
|
|
} |
|
|
} |
|
|
$actions->append(new OrderDetail($actions->row->id, $grid->model()->getCurrentPage(), '详情')); |
|
|
|
|
|
|
|
|
$actions->append(new OrderDetail($actions->row->id, $grid->model()->getCurrentPage(), '<div type="button" style="width:140px" class="btn btn-outline-primary">详情</div>')); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$grid->filter(function (Grid\Filter $filter) { |
|
|
$grid->filter(function (Grid\Filter $filter) { |
|
|
$filter->equal('id'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$filter->equal('order_num'); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
$grid->disableViewButton(); |
|
|
$grid->disableViewButton(); |
|
|
|