...
|
...
|
@@ -57,11 +57,10 @@ class Excel extends Backend |
|
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
|
|
|
|
$list = $this->model
|
|
|
->with(['recipecon', 'material'])
|
|
|
->with(['recipecon', 'material','material_con'])
|
|
|
->where($where)
|
|
|
->order($sort, $order)
|
|
|
->paginate($limit);
|
|
|
|
|
|
foreach ($list as $row) {
|
|
|
|
|
|
$row->getRelation('recipecon')->visible(['title']);
|
...
|
...
|
@@ -69,7 +68,7 @@ class Excel extends Backend |
|
|
}
|
|
|
|
|
|
$result = array("total" => $list->total(), "rows" => $list->items());
|
|
|
|
|
|
// dump(json($result));exit;
|
|
|
return json($result);
|
|
|
}
|
|
|
return $this->view->fetch();
|
...
|
...
|
@@ -83,6 +82,7 @@ class Excel extends Backend |
|
|
{
|
|
|
if ($this->request->isPost()) {
|
|
|
$params = $this->request->post("row/a");
|
|
|
|
|
|
if ($params) {
|
|
|
$params = $this->preExcludeFields($params);
|
|
|
|
...
|
...
|
|