|
|
@ -751,8 +751,26 @@ |
|
|
|
var bomNoData = []; |
|
|
|
var selections = $("#bootstrap-table").bootstrapTable("getSelections"); |
|
|
|
if(selections.length === 0){ |
|
|
|
$.modal.alertWarning("请至少选择一条bom信息"); |
|
|
|
return; |
|
|
|
// $.modal.alertWarning("请至少选择一条bom信息"); |
|
|
|
// return; |
|
|
|
$.modal.confirm("确定导出所有bom吗?", function() { |
|
|
|
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; |
|
|
|
var params = $("#bootstrap-table").bootstrapTable('getOptions'); |
|
|
|
var dataParam = $("#" + currentId).serializeArray(); |
|
|
|
dataParam.push({ "name": "orderByColumn", "value": params.sortName }); |
|
|
|
dataParam.push({ "name": "isAsc", "value": params.sortOrder }); |
|
|
|
$.modal.loading("正在导出数据,请稍后..."); |
|
|
|
$.post(prefix + '/exportAll', dataParam, function(result) { |
|
|
|
if (result.code == web_status.SUCCESS) { |
|
|
|
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; |
|
|
|
} else if (result.code == web_status.WARNING) { |
|
|
|
$.modal.alertWarning(result.msg) |
|
|
|
} else { |
|
|
|
$.modal.alertError(result.msg); |
|
|
|
} |
|
|
|
$.modal.closeLoading(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
$.modal.confirm("确定导出选中的所有" + table.options.modalName + "吗?", function () { |
|
|
|
//·拼接单号 |
|
|
@ -760,7 +778,7 @@ |
|
|
|
bomNoData.push(selections[i].bomNo); |
|
|
|
} |
|
|
|
var bomNos = JSON.stringify(bomNoData); |
|
|
|
console.log(bomNos); |
|
|
|
// console.log(bomNos); |
|
|
|
$.modal.loading("正在导出数据,请稍后..."); |
|
|
|
var config = { |
|
|
|
url: prefix + '/export', |
|
|
|