Browse Source

修复:禁用和离职的骑手还可选择配送

master
lanzu_qinsheng 5 years ago
parent
commit
b5c856e970
  1. 3
      app/Admin/Forms/SelectHorseman.php
  2. 3
      app/Models/v3/LanzuEmployees.php

3
app/Admin/Forms/SelectHorseman.php

@ -2,6 +2,7 @@
namespace App\Admin\Forms; namespace App\Admin\Forms;
use App\Admin\Common\Auth;
use App\Models\ImsCjdcOrderMain; use App\Models\ImsCjdcOrderMain;
use App\Models\LanzuServiceHorseman; use App\Models\LanzuServiceHorseman;
use App\Models\v3\LanzuEmployees; use App\Models\v3\LanzuEmployees;
@ -41,7 +42,7 @@ class SelectHorseman extends Form
public function form() public function form()
{ {
$this->select('horseman_id','配送员') $this->select('horseman_id','配送员')
->options(LanzuEmployees::getHorseman())
->options(LanzuEmployees::getHorseman(Auth::getMarket()))
->required(); ->required();
$this->hidden('order_id'); $this->hidden('order_id');

3
app/Models/v3/LanzuEmployees.php

@ -75,9 +75,10 @@ class LanzuEmployees extends Model
if ($marketId){ if ($marketId){
$rows = self::where('market_id',$marketId) $rows = self::where('market_id',$marketId)
->where('position','REGEXP','"29"') ->where('position','REGEXP','"29"')
->where('status',1)
->get(); ->get();
}else{ }else{
$rows = self::where('position','REGEXP','"29"')->get();
$rows = self::where('position','REGEXP','"29"')->where('status',1)->get();
} }
$item = []; $item = [];
if ($rows){ if ($rows){

Loading…
Cancel
Save