|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
|
namespace App\Admin\Controllers; |
|
|
namespace App\Admin\Controllers; |
|
|
|
|
|
|
|
|
|
|
|
use App\Admin\Common\Rpc; |
|
|
use App\Admin\Extensions\CheckRow; |
|
|
use App\Admin\Extensions\CheckRow; |
|
|
use App\Admin\Extensions\CouponTieEdit; |
|
|
use App\Admin\Extensions\CouponTieEdit; |
|
|
use App\Admin\Extensions\MyDetailPage; |
|
|
use App\Admin\Extensions\MyDetailPage; |
|
|
@ -42,37 +43,37 @@ class ImsCjdcOrderMainController extends AdminController |
|
|
$grid->paginate(10);//每页展示数据10条
|
|
|
$grid->paginate(10);//每页展示数据10条
|
|
|
//$grid->id;
|
|
|
//$grid->id;
|
|
|
//$grid->user_id('用户信息');
|
|
|
//$grid->user_id('用户信息');
|
|
|
$grid->column('nick_name','用户信息'); |
|
|
|
|
|
|
|
|
$grid->column('nick_name', '用户信息'); |
|
|
$grid->order_num; |
|
|
$grid->order_num; |
|
|
|
|
|
|
|
|
$grid->state('订单状态') |
|
|
$grid->state('订单状态') |
|
|
->using(config('order.state')) |
|
|
->using(config('order.state')) |
|
|
->label([1=>'dark',2=>'danger',3=>'indigo',4=>'success']); |
|
|
|
|
|
|
|
|
->label([1 => 'dark', 2 => 'danger', 3 => 'indigo', 4 => 'success']); |
|
|
$grid->money; |
|
|
$grid->money; |
|
|
$grid->column('market.name','所属市场'); |
|
|
|
|
|
$grid->pay_time('支付时间')->display(function (){ |
|
|
|
|
|
|
|
|
$grid->column('market.name', '所属市场'); |
|
|
|
|
|
$grid->pay_time('支付时间')->display(function () { |
|
|
return date('Y-m-d H:i:s'); |
|
|
return date('Y-m-d H:i:s'); |
|
|
}); |
|
|
}); |
|
|
$grid->created_at('下单时间')->display(function (){ |
|
|
|
|
|
|
|
|
$grid->created_at('下单时间')->display(function () { |
|
|
return date('Y-m-d H:i:s'); |
|
|
return date('Y-m-d H:i:s'); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
$grid->actions(function (Grid\Displayers\Actions $actions) use ($grid){ |
|
|
|
|
|
|
|
|
$grid->actions(function (Grid\Displayers\Actions $actions) use ($grid) { |
|
|
|
|
|
|
|
|
$state = $actions->row->state; |
|
|
$state = $actions->row->state; |
|
|
if ($state==2){ |
|
|
|
|
|
$actions->append(new OrderStateHandle('接单',3)); |
|
|
|
|
|
}elseif ($state==311){ |
|
|
|
|
|
$actions->append(new OrderStateHandle('完成',4)); |
|
|
|
|
|
|
|
|
if ($state == 2) { |
|
|
|
|
|
$actions->append(new OrderStateHandle('接单', 3)); |
|
|
|
|
|
} elseif ($state == 311) { |
|
|
|
|
|
$actions->append(new OrderStateHandle('完成', 4)); |
|
|
$actions->append(new OrderPrint('打印')); |
|
|
$actions->append(new OrderPrint('打印')); |
|
|
}elseif ($state==3){ |
|
|
|
|
|
|
|
|
} elseif ($state == 3) { |
|
|
$actions->append(new OrderPrint('打印')); |
|
|
$actions->append(new OrderPrint('打印')); |
|
|
$actions->append(new CheckRow($actions->row->id,$grid->model()->getCurrentPage(),'自送')); |
|
|
|
|
|
}elseif ($state==8){ |
|
|
|
|
|
$actions->append(new OrderStateHandle('同意退款',9)); |
|
|
|
|
|
$actions->append(new OrderRefund($actions->row->id,$grid->model()->getCurrentPage(),'拒绝退款')); |
|
|
|
|
|
|
|
|
$actions->append(new CheckRow($actions->row->id, $grid->model()->getCurrentPage(), '自送')); |
|
|
|
|
|
} elseif ($state == 8) { |
|
|
|
|
|
$actions->append(new OrderStateHandle('同意退款', 9)); |
|
|
|
|
|
$actions->append(new OrderRefund($actions->row->id, $grid->model()->getCurrentPage(), '拒绝退款')); |
|
|
} |
|
|
} |
|
|
$actions->append(new OrderDetail($actions->row->id,$grid->model()->getCurrentPage(),'详情')); |
|
|
|
|
|
|
|
|
$actions->append(new OrderDetail($actions->row->id, $grid->model()->getCurrentPage(), '详情')); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -140,16 +141,28 @@ class ImsCjdcOrderMainController extends AdminController |
|
|
$oid = request()->get('order_id'); |
|
|
$oid = request()->get('order_id'); |
|
|
$page = request()->get('page'); |
|
|
$page = request()->get('page'); |
|
|
// 实例化表单类并传递自定义参数
|
|
|
// 实例化表单类并传递自定义参数
|
|
|
$detail = MyDetailPage::make(['order_id'=>$oid]); |
|
|
|
|
|
|
|
|
$detail = MyDetailPage::make(['order_id' => $oid]); |
|
|
return $content->header('订单详情') |
|
|
return $content->header('订单详情') |
|
|
->breadcrumb( |
|
|
->breadcrumb( |
|
|
['text'=>'列表','url'=>"order?page={$page}"], |
|
|
|
|
|
|
|
|
['text' => '列表', 'url' => "order?page={$page}"], |
|
|
['text' => '详情', 'url' => 'detail'], |
|
|
['text' => '详情', 'url' => 'detail'], |
|
|
) |
|
|
) |
|
|
->body(Lazy::make($detail)); |
|
|
->body(Lazy::make($detail)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function orderGoodsRefund() |
|
|
|
|
|
{ |
|
|
|
|
|
return 0; |
|
|
|
|
|
$uid = request()->get('user_id'); |
|
|
|
|
|
$note = request()->get('note'); |
|
|
|
|
|
$global_order_id = request()->get('global_order_id'); |
|
|
|
|
|
$order_child_id = request()->get('order_child_id'); |
|
|
|
|
|
$order_goods_id = request()->get('order_goods_id'); |
|
|
|
|
|
$result = Rpc::onlineSingleRefund($uid, $note, $global_order_id, $order_child_id, $order_goods_id); |
|
|
|
|
|
dd($result); |
|
|
|
|
|
return json_encode($result['result']); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |