Commit 30a1c57d by 汪伟伟

跳转

parent 29883a18
...@@ -286,7 +286,7 @@ class TaskReceiveController extends AdminController ...@@ -286,7 +286,7 @@ class TaskReceiveController extends AdminController
$no = \App\Models\TasksReceive::query() $no = \App\Models\TasksReceive::query()
->where('id','!=',$this->id) ->where('id','!=',$this->id)
->where('status',0) ->where('status',0)
->orderBy('created_at') ->orderBy('created_at','desc')
->first(); ->first();
if ($no){ if ($no){
$url = '/receives/'.$no->id.'/edit'; $url = '/receives/'.$no->id.'/edit';
...@@ -294,7 +294,7 @@ class TaskReceiveController extends AdminController ...@@ -294,7 +294,7 @@ class TaskReceiveController extends AdminController
$url = '/receives'; $url = '/receives';
} }
// var_dump($url); // var_dump($url);
$form->response()->redirect($url); return $form->response()->success('保存成功')->redirect($url);
} }
}); });
......
...@@ -30,8 +30,8 @@ class TasksApproveController extends AdminController ...@@ -30,8 +30,8 @@ class TasksApproveController extends AdminController
$tab = Tab::make(); $tab = Tab::make();
// $tab->add('选项卡1', view('...')); // $tab->add('选项卡1', view('...'));
$tab->add('未审核', $this->getData(0), true, 'a'); $tab->add('未审核', $this->getData(0), false, 'a');
$tab->add('已审核', $this->getData(1), true, 'b'); $tab->add('已审核', $this->getData(1), false, 'b');
return $tab; return $tab;
......
...@@ -26,6 +26,8 @@ Route::group([ ...@@ -26,6 +26,8 @@ Route::group([
$router->resource('receives', 'TaskReceiveController'); $router->resource('receives', 'TaskReceiveController');
$router->resource('approves', 'TasksApproveController'); $router->resource('approves', 'TasksApproveController');
$router->resource('orders', 'TasksOrderController'); $router->resource('orders', 'TasksOrderController');
......
...@@ -6,6 +6,7 @@ use Dcat\Admin\Traits\HasDateTimeFormatter; ...@@ -6,6 +6,7 @@ use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
class Task extends Model class Task extends Model
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment