完全vue渲染列表的功能
去掉不必要的js函数定义 修改返回json的方式
This commit is contained in:
@@ -135,7 +135,7 @@ class LogisticsController extends DefaultController
|
||||
$rows['total'] = $model->count();
|
||||
$rows['data'] = $model->get();
|
||||
}
|
||||
return response()->json($rows);
|
||||
return $rows;
|
||||
}
|
||||
|
||||
return $this->render([
|
||||
|
||||
@@ -828,7 +828,7 @@ class OrderController extends WorkflowController
|
||||
$item['text'] = $item['name'];
|
||||
return $item;
|
||||
});
|
||||
return response()->json($items);
|
||||
return $items;
|
||||
}
|
||||
return $this->render([
|
||||
'search' => $search,
|
||||
@@ -918,7 +918,7 @@ class OrderController extends WorkflowController
|
||||
");
|
||||
$rows = $model->get();
|
||||
}
|
||||
return response()->json(['data' => $rows]);
|
||||
return ['data' => $rows];
|
||||
}
|
||||
return $this->render([
|
||||
'search' => $search,
|
||||
|
||||
@@ -70,7 +70,7 @@ class PlanController extends DefaultController
|
||||
}
|
||||
$rows = ProduceService::getPlanDetail($sdate, $edate, $query['warehouse_id'], $query['category_id'], $query['type']);
|
||||
$json = ['data' => $rows, 'status' => true];
|
||||
return response()->json($json);
|
||||
return $json;
|
||||
}
|
||||
|
||||
$header = [
|
||||
@@ -205,7 +205,7 @@ class PlanController extends DefaultController
|
||||
});
|
||||
}
|
||||
$json = ['data' => $rows, 'status' => true];
|
||||
return response()->json($json);
|
||||
return $json;
|
||||
}
|
||||
|
||||
$search['table'] = 'produce_plan';
|
||||
@@ -298,7 +298,7 @@ class PlanController extends DefaultController
|
||||
}
|
||||
$rows = ProduceService::getPlanDetail($sdate, $edate, 0, $query['category_id'], $query['type']);
|
||||
$json = ['columns' => $columns, 'data' => $rows, 'status' => true];
|
||||
return response()->json($json);
|
||||
return $json;
|
||||
}
|
||||
|
||||
$header = [
|
||||
|
||||
@@ -111,7 +111,7 @@ class TypeController extends DefaultController
|
||||
$item['text'] = $item['name'];
|
||||
return $item;
|
||||
});
|
||||
return response()->json($items);
|
||||
return $items;
|
||||
}
|
||||
$query['form_id'] = $query['jqgrid'] == '' ? $query['id'] : $query['jqgrid'];
|
||||
return $this->render([
|
||||
|
||||
@@ -198,7 +198,7 @@ class WidgetController extends DefaultController
|
||||
|
||||
$json['total'] = sizeof($rows);
|
||||
$json['data'] = $rows;
|
||||
return response()->json($json);
|
||||
return $json;
|
||||
}
|
||||
return $this->render();
|
||||
}
|
||||
@@ -225,7 +225,7 @@ class WidgetController extends DefaultController
|
||||
->get();
|
||||
$json['total'] = $rows->count();
|
||||
$json['data'] = $rows;
|
||||
return response()->json($json);
|
||||
return $json;
|
||||
}
|
||||
return $this->render();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user