fixed 编辑入股任务回显
This commit is contained in:
parent
d54aa707aa
commit
16423d0185
@ -19,6 +19,7 @@ use app\adminapi\lists\BaseAdminDataLists;
|
|||||||
use app\common\model\task_template\TaskTemplate;
|
use app\common\model\task_template\TaskTemplate;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\model\task_scheduling\TaskScheduling;
|
use app\common\model\task_scheduling\TaskScheduling;
|
||||||
|
use app\common\model\user\User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务模板列表
|
* 任务模板列表
|
||||||
@ -59,6 +60,16 @@ class TaskTemplateLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
|
->append(['task_admin_name'])
|
||||||
|
->withAttr("task_admin_name", function ($value,$data) {
|
||||||
|
if ($data['type'] == 35) {
|
||||||
|
$extend = json_decode($data['extend'], true);
|
||||||
|
$userName = User::where('id', $extend['shareholder']['user_id'])->value('nickname');
|
||||||
|
return $userName;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ namespace app\adminapi\lists\user;
|
|||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\enum\user\UserTerminalEnum;
|
use app\common\enum\user\UserTerminalEnum;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
|
use app\common\model\Company;
|
||||||
use app\common\model\contract\Contract;
|
use app\common\model\contract\Contract;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -37,7 +38,7 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface
|
|||||||
*/
|
*/
|
||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
$allowSearch = ['keyword', 'channel', 'create_time_start', 'create_time_end'];
|
$allowSearch = ['keyword', 'channel', 'create_time_start', 'create_time_end', 'company_id'];
|
||||||
return array_intersect(array_keys($this->params), $allowSearch);
|
return array_intersect(array_keys($this->params), $allowSearch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +70,11 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface
|
|||||||
}
|
}
|
||||||
$field = "id,id contract,sn,nickname,sex,avatar,account,mobile,channel,create_time,admin_id,company_id,street,street as street_name,is_contract";
|
$field = "id,id contract,sn,nickname,sex,avatar,account,mobile,channel,create_time,admin_id,company_id,street,street as street_name,is_contract";
|
||||||
$lists = User::withSearch($this->setSearch(), $this->params)
|
$lists = User::withSearch($this->setSearch(), $this->params)
|
||||||
->with(['company'])
|
|
||||||
->where($where)
|
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
|
||||||
->field($field)
|
->field($field)
|
||||||
|
->where($where)
|
||||||
|
->with(['company'])
|
||||||
->order('id desc')
|
->order('id desc')
|
||||||
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user