Browse Source

Merge branch 'develop' of ssh://120.24.33.109:11022/hyzjshwo/mp_lanzu_cat into develop

master
liangyuyan 5 years ago
parent
commit
82c1aae568
  1. 23
      app/Admin/Controllers/ImsCjdcOrderMainController.php
  2. 8
      app/Admin/Extensions/CheckRow.php

23
app/Admin/Controllers/ImsCjdcOrderMainController.php

@ -11,10 +11,6 @@ use App\Admin\Extensions\OrderPrint;
use App\Admin\Extensions\OrderRefund;
use App\Admin\Extensions\OrderStateHandle;
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\Grid;
use Dcat\Admin\Layout\Content;
@ -64,24 +60,23 @@ class ImsCjdcOrderMainController extends AdminController
$state = $actions->row->state;
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) {
$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) {
$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) {
$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) {
$filter->equal('id');
$filter->equal('order_num');
});
$grid->disableViewButton();

8
app/Admin/Extensions/CheckRow.php

@ -1,13 +1,11 @@
<?php
namespace App\Admin\Extensions;
use App\Admin\Forms\CouponTieForm;
use App\Admin\Forms\SelectHorseman;
use App\Models\ImsCjdcOrderMain;
use App\Models\StoreAccount;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Widgets\Modal;
use Illuminate\Http\Request;
class CheckRow extends RowAction
{
@ -30,7 +28,7 @@ class CheckRow extends RowAction
$form = SelectHorseman::make(['order_id'=>$this->order_id,'current_page'=>$this->currentPage]);
return Modal::make()
->lg()
->title($this->title)
->title('选择配送员')
->body($form)
->button($this->title);

Loading…
Cancel
Save