parent
d795809fb3
commit
975be7cc91
|
@ -151,9 +151,7 @@ class MarketController extends DefaultController
|
||||||
$model->selectRaw($sql);
|
$model->selectRaw($sql);
|
||||||
$rows = $model->paginate();
|
$rows = $model->paginate();
|
||||||
|
|
||||||
$items = Grid::dataFilters($rows, $header);
|
return Grid::dataFilters($rows, $header);
|
||||||
|
|
||||||
return response()->json($items);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.fee_detail = function(data) {
|
action.fee_detail = function(data) {
|
||||||
viewDialog({
|
viewDialog({
|
||||||
title: '兑现明细',
|
title: '兑现明细',
|
||||||
|
|
|
@ -13,13 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
//action.dialogType = 'layer';
|
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -51,7 +51,6 @@ class ArticleController extends DefaultController
|
||||||
$header['cols'] = $cols;
|
$header['cols'] = $cols;
|
||||||
$header['tabs'] = Article::$tabs;
|
$header['tabs'] = Article::$tabs;
|
||||||
$header['bys'] = Article::$bys;
|
$header['bys'] = Article::$bys;
|
||||||
$header['js'] = Grid::js($header);
|
|
||||||
|
|
||||||
$search = $header['search_form'];
|
$search = $header['search_form'];
|
||||||
$query = $search['query'];
|
$query = $search['query'];
|
||||||
|
|
|
@ -34,7 +34,7 @@ class WidgetController extends DefaultController
|
||||||
|
|
||||||
$json['total'] = sizeof($rows);
|
$json['total'] = sizeof($rows);
|
||||||
$json['data'] = $rows;
|
$json['data'] = $rows;
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
return $this->render();
|
return $this->render();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +1,24 @@
|
||||||
<div id="{{$header['master_table']}}-controller">
|
<div class="vue-list-page" id="{{$header['master_table']}}-controller">
|
||||||
<div class="panel no-border">
|
<div class="panel no-border">
|
||||||
@include('headers')
|
<div class="panel-header">
|
||||||
|
@include('headers2')
|
||||||
|
</div>
|
||||||
<div class='list-jqgrid'>
|
<div class='list-jqgrid'>
|
||||||
<div id="{{$header['master_table']}}-grid" style="width:100%;" class="ag-theme-balham"></div>
|
<div id="{{$header['master_table']}}-grid" style="width:100%;" class="ag-theme-balham"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$header["js"]}}
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Vue.createApp({
|
||||||
(function ($) {
|
setup(props, ctx) {
|
||||||
var header = {{json_encode($header, JSON_UNESCAPED_UNICODE)}};
|
|
||||||
|
|
||||||
var table = '{{$header["master_table"]}}';
|
var table = '{{$header["master_table"]}}';
|
||||||
var config = gdoo.grids[table];
|
|
||||||
var action = config.action;
|
|
||||||
var search = config.search;
|
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
var config = new gdoo.grid(table);
|
||||||
|
|
||||||
// 自定义搜索方法
|
var grid = config.grid;
|
||||||
search.searchInit = function (e) {
|
grid.remoteDataUrl = '{{url()}}';
|
||||||
var self = this;
|
grid.onRowDoubleClicked = function (params) {
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
|
||||||
|
|
||||||
options.remoteDataUrl = '{{url()}}';
|
|
||||||
options.remoteParams = search.advanced.query;
|
|
||||||
options.columnDefs = config.cols;
|
|
||||||
options.onRowDoubleClicked = function (params) {
|
|
||||||
if (params.node.rowPinned) {
|
if (params.node.rowPinned) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -45,22 +30,21 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
new agGrid.Grid(gridDiv, options);
|
var action = config.action;
|
||||||
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 读取数据
|
var setup = config.setup;
|
||||||
options.remoteData({page: 1});
|
|
||||||
|
|
||||||
// 绑定自定义事件
|
Vue.onMounted(function() {
|
||||||
var $gridDiv = $(gridDiv);
|
var gridDiv = document.querySelector("#" + table + "-grid");
|
||||||
$gridDiv.on('click', '[data-toggle="event"]', function () {
|
gridDiv.style.height = getPanelHeight(136);
|
||||||
var data = $(this).data();
|
new agGrid.Grid(gridDiv, grid);
|
||||||
if (data.master_id > 0) {
|
// 初始化数据
|
||||||
action[data.action](data);
|
grid.remoteData({page: 1}, function(res) {
|
||||||
}
|
config.init(res);
|
||||||
});
|
});
|
||||||
config.grid = options;
|
});
|
||||||
|
return setup;
|
||||||
})(jQuery);
|
}
|
||||||
|
}).mount("#{{$header['master_table']}}-controller");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@include('footers')
|
|
|
@ -1,105 +0,0 @@
|
||||||
<style>
|
|
||||||
.vue-list-page .search-inline-form .form-group {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
.vue-list-page .btn-group {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="vue-list-page" id="{{$header['master_table']}}-controller">
|
|
||||||
<div class="panel no-border">
|
|
||||||
@include('headers3')
|
|
||||||
<div class='list-jqgrid'>
|
|
||||||
<div id="{{$header['master_table']}}-grid" style="width:100%;" class="ag-theme-balham"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{$header["js"]}}
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
(function ($) {
|
|
||||||
var header = {{json_encode($header, JSON_UNESCAPED_UNICODE)}};
|
|
||||||
|
|
||||||
var table = '{{$header["master_table"]}}';
|
|
||||||
var config = gdoo.grids[table];
|
|
||||||
var action = config.action;
|
|
||||||
var search = config.search;
|
|
||||||
|
|
||||||
const vueData = {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
header: {},
|
|
||||||
tab_active: '',
|
|
||||||
}
|
|
||||||
},mounted() {
|
|
||||||
abc(this);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
url(url, query) {
|
|
||||||
var me = this;
|
|
||||||
let params = Vue.toRaw(me.header.search_form.params);
|
|
||||||
for (const key in query) {
|
|
||||||
params[key] = query[key];
|
|
||||||
}
|
|
||||||
return app.url(url, params);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vue.createApp(vueData).mount("#{{$header['master_table']}}-controller");
|
|
||||||
|
|
||||||
function abc(vue) {
|
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
|
||||||
|
|
||||||
options.remoteDataUrl = '{{url()}}';
|
|
||||||
options.remoteParams = search.advanced.query;
|
|
||||||
options.columnDefs = config.cols;
|
|
||||||
options.onRowDoubleClicked = function (params) {
|
|
||||||
if (params.node.rowPinned) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (params.data == undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (params.data.master_id > 0) {
|
|
||||||
action.show(params.data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
new agGrid.Grid(gridDiv, options);
|
|
||||||
|
|
||||||
// 读取数据
|
|
||||||
options.remoteData({page: 1});
|
|
||||||
|
|
||||||
options.remoteSuccessed = function(res) {
|
|
||||||
vue.header = res.header;
|
|
||||||
vue.tab_active = vue.header.search_form.params['tab'] ? vue.header.search_form.params['tab'] : vue.header.tabs.items[0].value;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 绑定自定义事件
|
|
||||||
var $gridDiv = $(gridDiv);
|
|
||||||
$gridDiv.on('click', '[data-toggle="event"]', function () {
|
|
||||||
var data = $(this).data();
|
|
||||||
if (data.master_id > 0) {
|
|
||||||
action[data.action](data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
config.grid = options;
|
|
||||||
}
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@include('footers')
|
|
|
@ -57,7 +57,7 @@ class EventController extends DefaultController
|
||||||
$events[] = $row;
|
$events[] = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response()->json($events);
|
return $events;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 客户端显示事件列表
|
// 客户端显示事件列表
|
||||||
|
@ -120,7 +120,7 @@ class EventController extends DefaultController
|
||||||
$repeat = CalendarObjectService::getEventRepeat($master, '1D', 'Y-n-j');
|
$repeat = CalendarObjectService::getEventRepeat($master, '1D', 'Y-n-j');
|
||||||
$items = array_merge($items, $repeat);
|
$items = array_merge($items, $repeat);
|
||||||
}
|
}
|
||||||
return response()->json($items);
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调整事件
|
// 调整事件
|
||||||
|
|
|
@ -92,7 +92,7 @@ class BusinessController extends DefaultController
|
||||||
$row['address'] = str_replace("\n", " ", $row['address']);
|
$row['address'] = str_replace("\n", " ", $row['address']);
|
||||||
$attachments = AttachmentService::show($row['attachment']);
|
$attachments = AttachmentService::show($row['attachment']);
|
||||||
$row['attachments'] = $attachments['main'];
|
$row['attachments'] = $attachments['main'];
|
||||||
return response()->json($row);
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 负责人列表
|
// 负责人列表
|
||||||
|
|
|
@ -142,7 +142,7 @@ class ContactController extends DefaultController
|
||||||
$item['text'] = $item['name'];
|
$item['text'] = $item['name'];
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
return response()->json($items);
|
return $items;
|
||||||
}
|
}
|
||||||
$query['form_id'] = $query['jqgrid'] == '' ? $query['id'] : $query['jqgrid'];
|
$query['form_id'] = $query['jqgrid'] == '' ? $query['id'] : $query['jqgrid'];
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -102,7 +102,7 @@ class CustomerClassController extends DefaultController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rows = $model->get();
|
$rows = $model->get();
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search
|
'search' => $search
|
||||||
|
|
|
@ -278,20 +278,15 @@ class CustomerController extends DefaultController
|
||||||
|
|
||||||
if ($query['suggest']) {
|
if ($query['suggest']) {
|
||||||
$rows = $model->limit(15)->get();
|
$rows = $model->limit(15)->get();
|
||||||
$data = Grid::dataFilters($rows, $header, function($item) {
|
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
$items['data'] = $data;
|
|
||||||
} else {
|
} else {
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
}
|
||||||
|
return Grid::dataFilters($rows, $header, function($item) {
|
||||||
$item['text'] = $item['name'];
|
$item['text'] = $item['name'];
|
||||||
$item['sid'] = 'u'.$item['user_id'];
|
$item['sid'] = 'u'.$item['user_id'];
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return response()->json($items);
|
|
||||||
}
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
'query' => $query,
|
'query' => $query,
|
||||||
|
|
|
@ -139,11 +139,7 @@ class DeliveryAddressController extends DefaultController
|
||||||
$model->select($header['select']);
|
$model->select($header['select']);
|
||||||
|
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
|
return $rows;
|
||||||
if (isset($query['autocomplete'])) {
|
|
||||||
return response()->json($rows->items());
|
|
||||||
}
|
|
||||||
return response()->json($rows);
|
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
|
|
@ -140,7 +140,7 @@ class RegionController extends DefaultController
|
||||||
foreach($rows as $row) {
|
foreach($rows as $row) {
|
||||||
$json[] = $row;
|
$json[] = $row;
|
||||||
}
|
}
|
||||||
return response()->json(['data' => $json]);
|
return ['data' => $json];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search
|
'search' => $search
|
||||||
|
|
|
@ -135,8 +135,7 @@ class TaxController extends AuditController
|
||||||
}
|
}
|
||||||
|
|
||||||
$model->select(['customer_tax.*','customer.code as customer_code', 'customer.name as customer_name']);
|
$model->select(['customer_tax.*','customer.code as customer_code', 'customer.name as customer_name']);
|
||||||
$rows = $model->paginate($query['limit']);
|
return $model->paginate($query['limit']);
|
||||||
return response()->json($rows);
|
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
|
|
@ -97,7 +97,7 @@ class TypeController extends DefaultController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rows = $model->get(['*', 'name as text']);
|
$rows = $model->get(['*', 'name as text']);
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'get' => Request::all()
|
'get' => Request::all()
|
||||||
|
|
|
@ -49,7 +49,7 @@ class WidgetController extends DefaultController
|
||||||
|
|
||||||
$json['total'] = sizeof($rows);
|
$json['total'] = sizeof($rows);
|
||||||
$json['data'] = $rows;
|
$json['data'] = $rows;
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
return $this->render();
|
return $this->render();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.priceEdit = function() {
|
action.priceEdit = function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
var grid = config.grid;
|
var grid = config.grid;
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var grid = new agGridOptions();
|
var grid = new agGridOptions();
|
||||||
|
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
//action.dialogType = 'layer';
|
//action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -12,14 +12,8 @@ var config = gdoo.grids[table];
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
config.cols[0]['hide'] = true;
|
config.cols[0]['hide'] = true;
|
||||||
config.cols[1]['hide'] = true;
|
config.cols[1]['hide'] = true;
|
||||||
config.cols[2]['hide'] = true;
|
config.cols[2]['hide'] = true;
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -95,7 +95,7 @@ class CategoryController extends DefaultController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rows = $model->get(['*', 'name as text']);
|
$rows = $model->get(['*', 'name as text']);
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'get' => Request::all()
|
'get' => Request::all()
|
||||||
|
|
|
@ -177,11 +177,10 @@ class CostController extends AuditController
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows = $model->get();
|
$rows = $model->get();
|
||||||
|
|
||||||
$rows->transform(function($row) {
|
$rows->transform(function($row) {
|
||||||
return $row;
|
return $row;
|
||||||
});
|
});
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -40,11 +40,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -174,10 +174,10 @@ class AttachmentController extends DefaultController
|
||||||
|
|
||||||
$insert_id = DB::table($table)->insertGetId($data);
|
$insert_id = DB::table($table)->insertGetId($data);
|
||||||
$data['id'] = $insert_id;
|
$data['id'] = $insert_id;
|
||||||
return response()->json($data);
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response()->json([]);
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$query = Request::all();
|
$query = Request::all();
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.create = function(data) {
|
action.create = function(data) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var grid = config.grid;
|
var grid = config.grid;
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.create = function(data) {
|
action.create = function(data) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var grid = config.grid;
|
var grid = config.grid;
|
||||||
|
|
|
@ -108,7 +108,7 @@ class ApiController extends Controller
|
||||||
{
|
{
|
||||||
$key = Request::get('key');
|
$key = Request::get('key');
|
||||||
$rows = option($key);
|
$rows = option($key);
|
||||||
return response()->json($rows)->setEncodingOptions(JSON_UNESCAPED_UNICODE);
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,7 +118,7 @@ class ApiController extends Controller
|
||||||
{
|
{
|
||||||
$key = Request::get('key');
|
$key = Request::get('key');
|
||||||
$rows = option($key);
|
$rows = option($key);
|
||||||
return response()->json($rows)->setEncodingOptions(JSON_UNESCAPED_UNICODE);
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -156,6 +156,6 @@ class ApiController extends Controller
|
||||||
->get()->toArray();
|
->get()->toArray();
|
||||||
|
|
||||||
$rows = array_merge($title, $rows);
|
$rows = array_merge($title, $rows);
|
||||||
return response()->json($rows);
|
return $rows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ class AttachmentController extends DefaultController
|
||||||
{
|
{
|
||||||
$id = Request::get('id');
|
$id = Request::get('id');
|
||||||
$rows = AttachmentService::get($id);
|
$rows = AttachmentService::get($id);
|
||||||
return response()->json($rows);
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -141,7 +141,7 @@ class AttachmentController extends DefaultController
|
||||||
{
|
{
|
||||||
$key = Request::get('key');
|
$key = Request::get('key');
|
||||||
$rows = AttachmentService::draft($key);
|
$rows = AttachmentService::draft($key);
|
||||||
return response()->json($rows);
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,10 +50,10 @@ class IndexController extends DefaultController
|
||||||
if ($key) {
|
if ($key) {
|
||||||
$badge = ModuleService::badges($key);
|
$badge = ModuleService::badges($key);
|
||||||
if ($badge) {
|
if ($badge) {
|
||||||
return response()->json($badge());
|
return $badge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response()->json(['total' => 0, 'data' => []]);
|
return ['total' => 0, 'data' => []];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取全部待办数量
|
// 获取全部待办数量
|
||||||
|
@ -64,6 +64,6 @@ class IndexController extends DefaultController
|
||||||
foreach($badges as $key => $badge) {
|
foreach($badges as $key => $badge) {
|
||||||
$json[$key] = $badge();
|
$json[$key] = $badge();
|
||||||
}
|
}
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -419,7 +419,7 @@ class FieldController extends DefaultController
|
||||||
public function getEnumsAction()
|
public function getEnumsAction()
|
||||||
{
|
{
|
||||||
$enums = Option::where('parent_id', 0)->orderBy('sort', 'asc')->orderBy('id', 'asc')->get();
|
$enums = Option::where('parent_id', 0)->orderBy('sort', 'asc')->orderBy('id', 'asc')->get();
|
||||||
return response()->json($enums);
|
return $enums;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteAction()
|
public function deleteAction()
|
||||||
|
|
|
@ -2002,7 +2002,6 @@ class Form
|
||||||
if ($row['w'] == 1) {
|
if ($row['w'] == 1) {
|
||||||
$_field_data = Hook::fire($table.'.onFieldFilter', ['table' => $table, 'master' => $master, 'field' => $field, 'values' => $values]);
|
$_field_data = Hook::fire($table.'.onFieldFilter', ['table' => $table, 'master' => $master, 'field' => $field, 'values' => $values]);
|
||||||
extract($_field_data);
|
extract($_field_data);
|
||||||
}
|
|
||||||
|
|
||||||
if ($field['data_format']) {
|
if ($field['data_format']) {
|
||||||
switch ($field['data_format']) {
|
switch ($field['data_format']) {
|
||||||
|
@ -2052,6 +2051,8 @@ class Form
|
||||||
}
|
}
|
||||||
$values[$key] = $value;
|
$values[$key] = $value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ use Gdoo\Model\Models\Step;
|
||||||
use Gdoo\Model\Models\StepLog;
|
use Gdoo\Model\Models\StepLog;
|
||||||
use Gdoo\Model\Services\ModelService;
|
use Gdoo\Model\Services\ModelService;
|
||||||
use Gdoo\Model\Services\ModuleService;
|
use Gdoo\Model\Services\ModuleService;
|
||||||
|
use Gdoo\User\Services\UserAssetService;
|
||||||
|
|
||||||
class Grid
|
class Grid
|
||||||
{
|
{
|
||||||
|
@ -99,6 +100,7 @@ class Grid
|
||||||
|
|
||||||
$_header = $header;
|
$_header = $header;
|
||||||
unset($_header['columns']);
|
unset($_header['columns']);
|
||||||
|
unset($_header['cols']);
|
||||||
unset($_header['dialogs']);
|
unset($_header['dialogs']);
|
||||||
unset($_header['join']);
|
unset($_header['join']);
|
||||||
unset($_header['js']);
|
unset($_header['js']);
|
||||||
|
@ -106,6 +108,19 @@ class Grid
|
||||||
unset($_header['search']);
|
unset($_header['search']);
|
||||||
unset($_header['select']);
|
unset($_header['select']);
|
||||||
|
|
||||||
|
// 重新组合字段给前端
|
||||||
|
$columns = [];
|
||||||
|
foreach ($header['cols'] as $field => $col) {
|
||||||
|
if ($field == 'action' && empty($col['events'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($col['field'] == 'created_by') {
|
||||||
|
$col['formatter'] = 'created_by';
|
||||||
|
}
|
||||||
|
$columns[] = $col;
|
||||||
|
}
|
||||||
|
$_header['columns'] = $columns;
|
||||||
|
|
||||||
$header['runs'] = $runs;
|
$header['runs'] = $runs;
|
||||||
$header['dialogs'] = $dialogs;
|
$header['dialogs'] = $dialogs;
|
||||||
$header['regions'] = $regions;
|
$header['regions'] = $regions;
|
||||||
|
@ -886,6 +901,7 @@ class Grid
|
||||||
$res['form_type'] = $bill['form_type'];
|
$res['form_type'] = $bill['form_type'];
|
||||||
|
|
||||||
$res['bill_id'] = $bill['id'];
|
$res['bill_id'] = $bill['id'];
|
||||||
|
$res['bill_uri'] = $bill['uri'];
|
||||||
$res['name'] = $master['name'];
|
$res['name'] = $master['name'];
|
||||||
$res['model_id'] = $master['id'];
|
$res['model_id'] = $master['id'];
|
||||||
$res['is_sort'] = $master['is_sort'];
|
$res['is_sort'] = $master['is_sort'];
|
||||||
|
@ -893,6 +909,9 @@ class Grid
|
||||||
$res['sort'] = $sort;
|
$res['sort'] = $sort;
|
||||||
$res['order'] = $order;
|
$res['order'] = $order;
|
||||||
|
|
||||||
|
// 获取当前权限
|
||||||
|
$res['access'] = UserAssetService::getNowRoleAssets();
|
||||||
|
|
||||||
// 是否开启简单搜索框
|
// 是否开启简单搜索框
|
||||||
$res['simple_search_form'] = 1;
|
$res['simple_search_form'] = 1;
|
||||||
$res['exist_sub_table'] = $exist_sub_table;
|
$res['exist_sub_table'] = $exist_sub_table;
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'dialog';
|
action.dialogType = 'dialog';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.view = function(data) {
|
action.view = function(data) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var grid = config.grid;
|
var grid = config.grid;
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'dialog';
|
action.dialogType = 'dialog';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
action.field = function(data) {
|
action.field = function(data) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var grid = config.grid;
|
var grid = config.grid;
|
||||||
|
|
|
@ -56,11 +56,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -135,7 +135,7 @@ class LogisticsController extends DefaultController
|
||||||
$rows['total'] = $model->count();
|
$rows['total'] = $model->count();
|
||||||
$rows['data'] = $model->get();
|
$rows['data'] = $model->get();
|
||||||
}
|
}
|
||||||
return response()->json($rows);
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -828,7 +828,7 @@ class OrderController extends WorkflowController
|
||||||
$item['text'] = $item['name'];
|
$item['text'] = $item['name'];
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
return response()->json($items);
|
return $items;
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
@ -918,7 +918,7 @@ class OrderController extends WorkflowController
|
||||||
");
|
");
|
||||||
$rows = $model->get();
|
$rows = $model->get();
|
||||||
}
|
}
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
|
|
@ -70,7 +70,7 @@ class PlanController extends DefaultController
|
||||||
}
|
}
|
||||||
$rows = ProduceService::getPlanDetail($sdate, $edate, $query['warehouse_id'], $query['category_id'], $query['type']);
|
$rows = ProduceService::getPlanDetail($sdate, $edate, $query['warehouse_id'], $query['category_id'], $query['type']);
|
||||||
$json = ['data' => $rows, 'status' => true];
|
$json = ['data' => $rows, 'status' => true];
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
$header = [
|
$header = [
|
||||||
|
@ -205,7 +205,7 @@ class PlanController extends DefaultController
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$json = ['data' => $rows, 'status' => true];
|
$json = ['data' => $rows, 'status' => true];
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
$search['table'] = 'produce_plan';
|
$search['table'] = 'produce_plan';
|
||||||
|
@ -298,7 +298,7 @@ class PlanController extends DefaultController
|
||||||
}
|
}
|
||||||
$rows = ProduceService::getPlanDetail($sdate, $edate, 0, $query['category_id'], $query['type']);
|
$rows = ProduceService::getPlanDetail($sdate, $edate, 0, $query['category_id'], $query['type']);
|
||||||
$json = ['columns' => $columns, 'data' => $rows, 'status' => true];
|
$json = ['columns' => $columns, 'data' => $rows, 'status' => true];
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
$header = [
|
$header = [
|
||||||
|
|
|
@ -111,7 +111,7 @@ class TypeController extends DefaultController
|
||||||
$item['text'] = $item['name'];
|
$item['text'] = $item['name'];
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
return response()->json($items);
|
return $items;
|
||||||
}
|
}
|
||||||
$query['form_id'] = $query['jqgrid'] == '' ? $query['id'] : $query['jqgrid'];
|
$query['form_id'] = $query['jqgrid'] == '' ? $query['id'] : $query['jqgrid'];
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -198,7 +198,7 @@ class WidgetController extends DefaultController
|
||||||
|
|
||||||
$json['total'] = sizeof($rows);
|
$json['total'] = sizeof($rows);
|
||||||
$json['data'] = $rows;
|
$json['data'] = $rows;
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
return $this->render();
|
return $this->render();
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ class WidgetController extends DefaultController
|
||||||
->get();
|
->get();
|
||||||
$json['total'] = $rows->count();
|
$json['total'] = $rows->count();
|
||||||
$json['data'] = $rows;
|
$json['data'] = $rows;
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
return $this->render();
|
return $this->render();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -108,11 +108,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -17,11 +17,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -16,11 +16,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -315,7 +315,7 @@ class MaterialController extends DefaultController
|
||||||
$rows['total'] = $model->count();
|
$rows['total'] = $model->count();
|
||||||
$rows['data'] = $model->get();
|
$rows['data'] = $model->get();
|
||||||
}
|
}
|
||||||
return response()->json($rows);
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -43,11 +43,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -99,7 +99,6 @@ class CategoryController extends DefaultController
|
||||||
['text','product_category.id','ID'],
|
['text','product_category.id','ID'],
|
||||||
]);
|
]);
|
||||||
$query = $search['query'];
|
$query = $search['query'];
|
||||||
|
|
||||||
$type = Request::get('type', 1);
|
$type = Request::get('type', 1);
|
||||||
if (Request::method() == 'POST') {
|
if (Request::method() == 'POST') {
|
||||||
$model = ProductCategory::orderBy('lft', 'asc');
|
$model = ProductCategory::orderBy('lft', 'asc');
|
||||||
|
@ -110,7 +109,7 @@ class CategoryController extends DefaultController
|
||||||
$data[] = $row;
|
$data[] = $row;
|
||||||
}
|
}
|
||||||
$json = ['data' => $data];
|
$json = ['data' => $data];
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render(array(
|
return $this->render(array(
|
||||||
|
|
|
@ -163,17 +163,10 @@ class ProductController extends DefaultController
|
||||||
|
|
||||||
if ($query['suggest']) {
|
if ($query['suggest']) {
|
||||||
$rows = $model->limit(15)->get();
|
$rows = $model->limit(15)->get();
|
||||||
$data = Grid::dataFilters($rows, $header, function($item) {
|
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
$items['data'] = $data;
|
|
||||||
} else {
|
} else {
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return response()->json($items);
|
return Grid::dataFilters($rows, $header);
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
@ -246,17 +239,10 @@ class ProductController extends DefaultController
|
||||||
|
|
||||||
if ($query['suggest']) {
|
if ($query['suggest']) {
|
||||||
$rows = $model->limit(15)->get();
|
$rows = $model->limit(15)->get();
|
||||||
$data = Grid::dataFilters($rows, $header, function($item) {
|
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
$items['data'] = $data;
|
|
||||||
} else {
|
} else {
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return response()->json($items);
|
return Grid::dataFilters($rows, $header);
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
@ -270,7 +256,7 @@ class ProductController extends DefaultController
|
||||||
$rows = $model->get(['*', 'name as text'])->toArray();
|
$rows = $model->get(['*', 'name as text'])->toArray();
|
||||||
$rows = array_nest($rows);
|
$rows = array_nest($rows);
|
||||||
$rows = array_merge($rows);
|
$rows = array_merge($rows);
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ class UnitController extends DefaultController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rows = $model->get(['*', 'name as text']);
|
$rows = $model->get(['*', 'name as text']);
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var grid = new agGridOptions;
|
var grid = new agGridOptions;
|
||||||
|
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
|
|
|
@ -83,11 +83,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var height = getPanelHeight(140);
|
var height = getPanelHeight(140);
|
||||||
var treeOptions = new agGridOptions();
|
var treeOptions = new agGridOptions();
|
||||||
treeOptions.rowSelection = 'single';
|
treeOptions.rowSelection = 'single';
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -45,12 +45,12 @@ class TaskController extends DefaultController
|
||||||
$rows[] = $_task;
|
$rows[] = $_task;
|
||||||
}
|
}
|
||||||
$json['data'] = $rows;
|
$json['data'] = $rows;
|
||||||
return response()->json($json);
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
$tasks = TaskService::data($search);
|
$tasks = TaskService::data($search);
|
||||||
return response()->json(['data' => $tasks]);
|
return ['data' => $tasks];
|
||||||
}
|
}
|
||||||
|
|
||||||
$project = Project::find($query['project_id']);
|
$project = Project::find($query['project_id']);
|
||||||
|
|
|
@ -208,7 +208,7 @@ class MaterialController extends DefaultController
|
||||||
$row['upload_url'] = URL::to('/uploads');
|
$row['upload_url'] = URL::to('/uploads');
|
||||||
|
|
||||||
if (Request::wantsJson()) {
|
if (Request::wantsJson()) {
|
||||||
return response()->json($row);
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -37,11 +37,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -37,11 +37,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -121,8 +121,7 @@ class SupplierController extends DefaultController
|
||||||
}
|
}
|
||||||
|
|
||||||
$model->select($header['select']);
|
$model->select($header['select']);
|
||||||
$rows = $model->paginate($query['limit']);
|
return $model->paginate($query['limit']);
|
||||||
return response()->json($rows);
|
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,13 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
//action.dialogType = 'layer';
|
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -106,10 +106,7 @@ class CategoryController extends DefaultController
|
||||||
$model->select($header['select']);
|
$model->select($header['select']);
|
||||||
|
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
return Grid::dataFilters($rows, $header);
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
return response()->json($items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -106,10 +106,7 @@ class LocationController extends DefaultController
|
||||||
$model->select($header['select']);
|
$model->select($header['select']);
|
||||||
|
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
return Grid::dataFilters($rows, $header);
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
return response()->json($items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
@ -145,10 +142,7 @@ class LocationController extends DefaultController
|
||||||
$model->select($header['select']);
|
$model->select($header['select']);
|
||||||
|
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
return Grid::dataFilters($rows, $header);
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
return response()->json($items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
@ -167,7 +161,7 @@ class LocationController extends DefaultController
|
||||||
->where('warehouse_location.warehouse_id', $warehouse_id)
|
->where('warehouse_location.warehouse_id', $warehouse_id)
|
||||||
->where('warehouse_location.status', 1)
|
->where('warehouse_location.status', 1)
|
||||||
->orderBy('warehouse_location.sort', 'asc');
|
->orderBy('warehouse_location.sort', 'asc');
|
||||||
return response()->json($model->get());
|
return $model->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,10 +106,7 @@ class TypeController extends DefaultController
|
||||||
$model->select($header['select']);
|
$model->select($header['select']);
|
||||||
|
|
||||||
$rows = $model->paginate($query['limit']);
|
$rows = $model->paginate($query['limit']);
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) {
|
return Grid::dataFilters($rows, $header);
|
||||||
return $item;
|
|
||||||
});
|
|
||||||
return response()->json($items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -113,11 +113,10 @@ class WarehouseController extends DefaultController
|
||||||
$locations[$_location['warehouse_id']][] = $_location;
|
$locations[$_location['warehouse_id']][] = $_location;
|
||||||
}
|
}
|
||||||
|
|
||||||
$items = Grid::dataFilters($rows, $header, function($item) use($locations) {
|
return Grid::dataFilters($rows, $header, function($item) use($locations) {
|
||||||
$item['pos'] = (array)$locations[$item['id']];
|
$item['pos'] = (array)$locations[$item['id']];
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
return response()->json($items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render([
|
return $this->render([
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'layer';
|
action.dialogType = 'layer';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
var action = config.action;
|
var action = config.action;
|
||||||
var search = config.search;
|
var search = config.search;
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -202,7 +202,7 @@ class OptionController extends DefaultController
|
||||||
if (Request::method() == 'POST') {
|
if (Request::method() == 'POST') {
|
||||||
$rows = Option::where('parent_id', 0)->orderBy('sort', 'asc')->orderBy('id', 'asc')->get();
|
$rows = Option::where('parent_id', 0)->orderBy('sort', 'asc')->orderBy('id', 'asc')->get();
|
||||||
$rows->prepend(['name' => '全部类别', 'id' => 0, 'parent_id' => 0]);
|
$rows->prepend(['name' => '全部类别', 'id' => 0, 'parent_id' => 0]);
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ class RegionController extends DefaultController
|
||||||
$row['text'] = $row['layer_space'].$row['name'];
|
$row['text'] = $row['layer_space'].$row['name'];
|
||||||
$json[] = $row;
|
$json[] = $row;
|
||||||
}
|
}
|
||||||
return response()->json(['data' => $json]);
|
return ['data' => $json];
|
||||||
}
|
}
|
||||||
return $this->render([
|
return $this->render([
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
@ -122,7 +122,7 @@ class RegionController extends DefaultController
|
||||||
$model = Region::orderBy('id', 'asc');
|
$model = Region::orderBy('id', 'asc');
|
||||||
$rows = $model->get(['*', 'name as text']);
|
$rows = $model->get(['*', 'name as text']);
|
||||||
array_nest($rows);
|
array_nest($rows);
|
||||||
return response()->json(['data' => $rows]);
|
return ['data' => $rows];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
action.dialogType = 'dialog';
|
action.dialogType = 'dialog';
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
|
@ -39,11 +39,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义搜索方法
|
|
||||||
search.searchInit = function (e) {
|
|
||||||
var self = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new agGridOptions();
|
var options = new agGridOptions();
|
||||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||||
gridDiv.style.height = getPanelHeight(48);
|
gridDiv.style.height = getPanelHeight(48);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue