|
@@ -7001,8 +7001,24 @@ define("bootstrap-table-export", ["bootstrap-table","tableexport"], (function (g
|
|
htmlForm.push(sprintf('<select class="form-control" name="field-%s" data-name="%s">%s</select>', vObjCol.field, vObjCol.field, selectHtml));
|
|
htmlForm.push(sprintf('<select class="form-control" name="field-%s" data-name="%s">%s</select>', vObjCol.field, vObjCol.field, selectHtml));
|
|
htmlForm.push('</div>');
|
|
htmlForm.push('</div>');
|
|
}
|
|
}
|
|
|
|
+
|
|
htmlForm.push('<div class="col-sm-6">');
|
|
htmlForm.push('<div class="col-sm-6">');
|
|
- htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
|
|
|
|
|
|
+ if (vObjCol.searchList) {
|
|
|
|
+ if (typeof vObjCol.searchList == 'function') {
|
|
|
|
+ htmlForm.push(vObjCol.searchList.call(this, vObjCol));
|
|
|
|
+ } else {
|
|
|
|
+ var isArray = vObjCol.searchList.constructor === Array;
|
|
|
|
+ var searchList = [];
|
|
|
|
+ searchList.push(sprintf('<option value="">%s</option>', $.fn.bootstrapTable.locales.formatAdvancedChoose()));
|
|
|
|
+ $.each(vObjCol.searchList, function (key, value) {
|
|
|
|
+ searchList.push("<option value='" + (isArray ? value : key) + "'>" + value + "</option>");
|
|
|
|
+ });
|
|
|
|
+ htmlForm.push(sprintf('<select class="form-control" name="%s">%s</select>', vObjCol.field, searchList.join('')));
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
|
|
|
|
+ }
|
|
|
|
+
|
|
htmlForm.push('</div>');
|
|
htmlForm.push('</div>');
|
|
htmlForm.push('</div>');
|
|
htmlForm.push('</div>');
|
|
}
|
|
}
|
|
@@ -7060,6 +7076,9 @@ define("bootstrap-table-export", ["bootstrap-table","tableexport"], (function (g
|
|
},
|
|
},
|
|
formatAdvancedCloseButton: function () {
|
|
formatAdvancedCloseButton: function () {
|
|
return "Close";
|
|
return "Close";
|
|
|
|
+ },
|
|
|
|
+ formatAdvancedChoose: function () {
|
|
|
|
+ return "Choose";
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -7154,7 +7173,10 @@ define("bootstrap-table-export", ["bootstrap-table","tableexport"], (function (g
|
|
$("#avdSearchModalContent_" + this.options.idTable + " select").each(function () {
|
|
$("#avdSearchModalContent_" + this.options.idTable + " select").each(function () {
|
|
var name = $(this).data("name");
|
|
var name = $(this).data("name");
|
|
var sym = $(this).val();
|
|
var sym = $(this).val();
|
|
- var value = $("input[name='" + name + "']").val();
|
|
|
|
|
|
+ var obj = $("[name='" + name + "']");
|
|
|
|
+ if (obj.size() == 0)
|
|
|
|
+ return true;
|
|
|
|
+ var value = obj.size() > 1 ? $("[name='" + name + "']:checked").val() : obj.val();
|
|
if (value == '' && sym.indexOf("NULL") == -1) {
|
|
if (value == '' && sym.indexOf("NULL") == -1) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -7204,9 +7226,14 @@ define('table',['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment',
|
|
method: 'get',
|
|
method: 'get',
|
|
toolbar: "#toolbar",
|
|
toolbar: "#toolbar",
|
|
search: true,
|
|
search: true,
|
|
|
|
+ cache: false,
|
|
advancedSearch: true,
|
|
advancedSearch: true,
|
|
idTable: 'advancedTable',
|
|
idTable: 'advancedTable',
|
|
showExport: true,
|
|
showExport: true,
|
|
|
|
+ exportDataType: "all",
|
|
|
|
+ exportTypes: ['json', 'xml', 'csv', 'txt', 'doc', 'excel'],
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ pageList: [10, 25, 50, 'All'],
|
|
pagination: true,
|
|
pagination: true,
|
|
clickToSelect: true,
|
|
clickToSelect: true,
|
|
showRefresh: false,
|
|
showRefresh: false,
|
|
@@ -7571,6 +7598,7 @@ define('upload',['jquery', 'bootstrap', 'backend', 'config', 'plupload'], functi
|
|
plupload: function (element, onAfterUpload) {
|
|
plupload: function (element, onAfterUpload) {
|
|
element = typeof element == 'undefined' ? Upload.config.classname : element;
|
|
element = typeof element == 'undefined' ? Upload.config.classname : element;
|
|
$(element, Upload.config.container).each(function () {
|
|
$(element, Upload.config.container).each(function () {
|
|
|
|
+ var that = this;
|
|
var id = $(this).prop("id");
|
|
var id = $(this).prop("id");
|
|
var url = $(this).data("url");
|
|
var url = $(this).data("url");
|
|
var maxsize = $(this).data("maxsize");
|
|
var maxsize = $(this).data("maxsize");
|
|
@@ -7579,6 +7607,7 @@ define('upload',['jquery', 'bootstrap', 'backend', 'config', 'plupload'], functi
|
|
var multiple = $(this).data("multiple");
|
|
var multiple = $(this).data("multiple");
|
|
//上传URL
|
|
//上传URL
|
|
url = url ? url : Config.upload.uploadurl;
|
|
url = url ? url : Config.upload.uploadurl;
|
|
|
|
+ url = Backend.api.fixurl(url);
|
|
//最大可上传
|
|
//最大可上传
|
|
maxsize = maxsize ? maxsize : Config.upload.maxsize;
|
|
maxsize = maxsize ? maxsize : Config.upload.maxsize;
|
|
//文件类型
|
|
//文件类型
|
|
@@ -7610,7 +7639,7 @@ define('upload',['jquery', 'bootstrap', 'backend', 'config', 'plupload'], functi
|
|
//这里可以改成其它的表现形式
|
|
//这里可以改成其它的表现形式
|
|
//document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
|
|
//document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
|
|
});
|
|
});
|
|
- $("#" + id).data("bakup-html", $("#" + id).html());
|
|
|
|
|
|
+ $(that).data("bakup-html", $(that).html());
|
|
//添加后立即上传
|
|
//添加后立即上传
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
Upload.list[id].start();
|
|
Upload.list[id].start();
|
|
@@ -7619,11 +7648,11 @@ define('upload',['jquery', 'bootstrap', 'backend', 'config', 'plupload'], functi
|
|
UploadProgress: function (up, file) {
|
|
UploadProgress: function (up, file) {
|
|
//这里可以改成其它的表现形式
|
|
//这里可以改成其它的表现形式
|
|
//document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
|
//document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
|
- $("#" + id).prop("disabled", true).html("<i class='fa fa-upload'></i> 上传" + file.percent + "%");
|
|
|
|
|
|
+ $(that).prop("disabled", true).html("<i class='fa fa-upload'></i> 上传" + file.percent + "%");
|
|
},
|
|
},
|
|
FileUploaded: function (up, file, info) {
|
|
FileUploaded: function (up, file, info) {
|
|
//还原按钮文字及状态
|
|
//还原按钮文字及状态
|
|
- $("#" + id).prop("disabled", false).html($("#" + id).data("bakup-html"));
|
|
|
|
|
|
+ $(that).prop("disabled", false).html($(that).data("bakup-html"));
|
|
//这里可以改成其它的表现形式
|
|
//这里可以改成其它的表现形式
|
|
//document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML += (' [Url]: ' + '<a href="' + url + '" target="_blank">' + url + '</a>');
|
|
//document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML += (' [Url]: ' + '<a href="' + url + '" target="_blank">' + url + '</a>');
|
|
//这里建议不修改
|
|
//这里建议不修改
|
|
@@ -7634,13 +7663,20 @@ define('upload',['jquery', 'bootstrap', 'backend', 'config', 'plupload'], functi
|
|
ret.code = ret.code == 200 ? 1 : ret.code;
|
|
ret.code = ret.code == 200 ? 1 : ret.code;
|
|
var data = ret.hasOwnProperty("data") && ret.data != "" ? ret.data : null;
|
|
var data = ret.hasOwnProperty("data") && ret.data != "" ? ret.data : null;
|
|
var msg = ret.hasOwnProperty("msg") && ret.msg != "" ? ret.msg : "";
|
|
var msg = ret.hasOwnProperty("msg") && ret.msg != "" ? ret.msg : "";
|
|
- $("input[data-plupload-id='" + id + "-text']").val(data.url);
|
|
|
|
- var afterUpload = $("#" + id).data("after-upload");
|
|
|
|
- if (afterUpload && typeof Upload.api.custom[afterUpload] == 'function') {
|
|
|
|
- Upload.api.custom[afterUpload].call(info, id, data);
|
|
|
|
- }
|
|
|
|
- if (typeof onAfterUpload == 'function') {
|
|
|
|
- onAfterUpload.call(info, id, data);
|
|
|
|
|
|
+ if (ret.code === 1) {
|
|
|
|
+ //$("input[data-plupload-id='" + id + "-text']").val(data.url);
|
|
|
|
+ if ($(that).data("input-id")) {
|
|
|
|
+ $("input#" + $(that).data("input-id")).val(data.url);
|
|
|
|
+ }
|
|
|
|
+ var afterUpload = $("#" + id).data("after-upload");
|
|
|
|
+ if (afterUpload && typeof Upload.api.custom[afterUpload] == 'function') {
|
|
|
|
+ Upload.api.custom[afterUpload].call(that, data);
|
|
|
|
+ }
|
|
|
|
+ if (typeof onAfterUpload == 'function') {
|
|
|
|
+ onAfterUpload.call(that, data);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ Toastr.error(msg ? msg : __('Operation failed'));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
Toastr.error(e.message + "(code:-2)");
|
|
Toastr.error(e.message + "(code:-2)");
|
|
@@ -7698,8 +7734,8 @@ define('upload',['jquery', 'bootstrap', 'backend', 'config', 'plupload'], functi
|
|
},
|
|
},
|
|
custom: {
|
|
custom: {
|
|
//自定义上传完成回调
|
|
//自定义上传完成回调
|
|
- afteruploadcallback: function (id, response) {
|
|
|
|
- console.log(this, id, response);
|
|
|
|
|
|
+ afteruploadcallback: function (response) {
|
|
|
|
+ console.log(this, response);
|
|
alert("Custom Callback,Response URL:" + response.url);
|
|
alert("Custom Callback,Response URL:" + response.url);
|
|
},
|
|
},
|
|
},
|
|
},
|