|
|
@ -51,11 +51,12 @@
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 搜索
|
|
|
|
// 搜索
|
|
|
|
search: function(form) {
|
|
|
|
search: function(formId) {
|
|
|
|
|
|
|
|
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
|
|
|
var params = $("#bootstrap-table").bootstrapTable('getOptions');
|
|
|
|
var params = $("#bootstrap-table").bootstrapTable('getOptions');
|
|
|
|
params.queryParams = function(params) {
|
|
|
|
params.queryParams = function(params) {
|
|
|
|
var search = {};
|
|
|
|
var search = {};
|
|
|
|
$.each($("#" + form).serializeArray(), function(i, field) {
|
|
|
|
$.each($("#" + currentId).serializeArray(), function(i, field) {
|
|
|
|
search[field.name] = field.value;
|
|
|
|
search[field.name] = field.value;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
search.pageSize = params.limit;
|
|
|
|
search.pageSize = params.limit;
|
|
|
@ -68,9 +69,10 @@
|
|
|
|
$("#bootstrap-table").bootstrapTable('refresh', params);
|
|
|
|
$("#bootstrap-table").bootstrapTable('refresh', params);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 下载
|
|
|
|
// 下载
|
|
|
|
exportExcel: function(form) {
|
|
|
|
exportExcel: function(formId) {
|
|
|
|
|
|
|
|
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
|
|
|
$.modal.loading("正在导出数据,请稍后...");
|
|
|
|
$.modal.loading("正在导出数据,请稍后...");
|
|
|
|
$.post($.table._option.exportUrl, $("#" + form).serializeArray(), function(result) {
|
|
|
|
$.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
|
|
|
|
if (result.code == web_status.SUCCESS) {
|
|
|
|
if (result.code == web_status.SUCCESS) {
|
|
|
|
window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
|
|
|
|
window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -132,9 +134,10 @@
|
|
|
|
$.treeTable._treeTable = treeTable;
|
|
|
|
$.treeTable._treeTable = treeTable;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 条件查询
|
|
|
|
// 条件查询
|
|
|
|
search: function(form) {
|
|
|
|
search: function(formId) {
|
|
|
|
|
|
|
|
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
|
|
|
var params = {};
|
|
|
|
var params = {};
|
|
|
|
$.each($("#" + form).serializeArray(), function(i, field) {
|
|
|
|
$.each($("#" + currentId).serializeArray(), function(i, field) {
|
|
|
|
params[field.name] = field.value;
|
|
|
|
params[field.name] = field.value;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$.treeTable._treeTable.bootstrapTreeTable('refresh', params);
|
|
|
|
$.treeTable._treeTable.bootstrapTreeTable('refresh', params);
|
|
|
|