任务安排-添加任务时选择任务创建模板,自动填充表单
This commit is contained in:
parent
3b856cd25c
commit
1fc6696e70
@ -115,7 +115,9 @@ class CreateTaskTemplateController extends BaseAdminController
|
||||
|
||||
public function selectList()
|
||||
{
|
||||
$list = CreateTaskTemplateLogic::getList();
|
||||
|
||||
$role = $this->request->param('task_role_id');
|
||||
$list = CreateTaskTemplateLogic::getList($role);
|
||||
return $this->data($list);
|
||||
}
|
||||
|
||||
|
@ -165,10 +165,11 @@ class CreateTaskTemplateLogic extends BaseLogic
|
||||
}
|
||||
}
|
||||
|
||||
public static function getList()
|
||||
public static function getList($role)
|
||||
{
|
||||
return CreateTaskTemplate::field(['id', 'title', 'admin_id', 'task_role_id', 'type', 'stage_day_one', 'money', 'proportion_one', 'stage_day_two', 'proportion_two', 'money_two', 'stage_day_three', 'new_money_three', 'money_longtime', 'types', 'extend', 'recharge', 'content'])
|
||||
->order(['id' => 'desc'])
|
||||
->whereIn('task_role_id', explode(',', $role))
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user