|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
namespace App\Admin\Forms; |
|
|
|
|
|
|
|
use App\Admin\Common\Auth; |
|
|
|
use App\Models\ImsCjdcOrderMain; |
|
|
|
use App\Models\LanzuServiceHorseman; |
|
|
|
use App\Models\v3\LanzuEmployees; |
|
|
|
@ -26,8 +27,9 @@ class SelectHorseman extends Form |
|
|
|
$hid = request()->input('horseman_id'); |
|
|
|
|
|
|
|
$oid = request()->input('order_id'); |
|
|
|
$current_page = request()->get('current_page'); |
|
|
|
$result = ImsCjdcOrderMain::where('id',$oid)->update(['shipping_type'=>1,'horseman_id'=>$hid,'updated_at'=>time()]); |
|
|
|
$current_page = request()->input('current_page'); |
|
|
|
$horseman = LanzuEmployees::getName($hid);//骑手名称
|
|
|
|
$result = ImsCjdcOrderMain::where('id',$oid)->update(['shipping_type'=>1,'horseman_id'=>$hid,'shipping_name'=>$horseman,'updated_at'=>time()]); |
|
|
|
if ($result){ |
|
|
|
return $this->success('操作成功',"order?page={$current_page}"); |
|
|
|
}else{ |
|
|
|
@ -41,12 +43,12 @@ class SelectHorseman extends Form |
|
|
|
public function form() |
|
|
|
{ |
|
|
|
$this->select('horseman_id','配送员') |
|
|
|
->options(LanzuEmployees::getHorseman()) |
|
|
|
->options(LanzuEmployees::getHorseman(Auth::getMarket())) |
|
|
|
->required(); |
|
|
|
|
|
|
|
$this->text('order_id'); |
|
|
|
$this->text('current_page'); |
|
|
|
$this->hidden('order_id'); |
|
|
|
$this->hidden('current_page'); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |