任务安排-添加任务时选择任务创建模板,自动填充表单
This commit is contained in:
parent
7f3b99005c
commit
3b856cd25c
@ -16,6 +16,7 @@ namespace app\adminapi\lists\create_task_template;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\create_task_template\CreateTaskTemplate;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
@ -56,8 +57,12 @@ class CreateTaskTemplateLists extends BaseAdminDataLists implements ListsSearchI
|
||||
{
|
||||
return CreateTaskTemplate::where($this->searchWhere)
|
||||
->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'])
|
||||
->append(['admin_name'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->withAttr('admin_name', function ($value, $data) {
|
||||
return Admin::where('id', $data['admin_id'])->value('name');
|
||||
})
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user