修改基础管理中的基础内容

This commit is contained in:
meimei
2025-04-18 14:22:17 +08:00
parent b6a947ba0b
commit 0a83799b2d
18 changed files with 98 additions and 47 deletions

View File

@@ -40,7 +40,7 @@ class Firmcustomerorigin extends Backend
public function index()
{
//当前是否为关联查询
$this->relationSearch = false;
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax()) {
@@ -51,14 +51,15 @@ class Firmcustomerorigin extends Backend
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['firm'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->visible(['id','name']);
$row->visible(['firm']);
$row->getRelation('firm')->visible(['name']);
}
$result = array("total" => $list->total(), "rows" => $list->items());