|
|
@ -46,16 +46,16 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group"> |
|
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:salesShippingInform:add"> |
|
|
|
<i class="fa fa-plus"></i> 添加 |
|
|
|
</a> |
|
|
|
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:salesShippingInform:add">--> |
|
|
|
<!-- <i class="fa fa-plus"></i> 添加--> |
|
|
|
<!-- </a>--> |
|
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:salesShippingInform:edit"> |
|
|
|
<i class="fa fa-edit"></i> 修改 |
|
|
|
</a> |
|
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:salesShippingInform:remove"> |
|
|
|
<i class="fa fa-remove"></i> 删除 |
|
|
|
</a> |
|
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:salesShippingInform:export"> |
|
|
|
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="system:salesShippingInform:export"> |
|
|
|
<i class="fa fa-download"></i> 导出 |
|
|
|
</a> |
|
|
|
</div> |
|
|
@ -254,6 +254,60 @@ |
|
|
|
var url = prefix +'/customerCheckGoodsDetail/' + shippingInformId; |
|
|
|
$.modal.open("详情",url); |
|
|
|
} |
|
|
|
|
|
|
|
// 导出 |
|
|
|
function exportExcel(formId) { |
|
|
|
// $.table.set(); |
|
|
|
var outOrderCodeData = []; |
|
|
|
var selections = $("#bootstrap-table").bootstrapTable("getSelections"); |
|
|
|
if(selections.length === 0){ |
|
|
|
$.modal.confirm("确定导出所有出货通知吗?", 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("确定导出选中的所有出货通知吗?", function () { |
|
|
|
//·拼接单号 |
|
|
|
for(let i=0;i<selections.length;i++){ |
|
|
|
outOrderCodeData.push(selections[i].outOrderCode); |
|
|
|
} |
|
|
|
var outOrderCodes = JSON.stringify(outOrderCodeData); |
|
|
|
// console.log(bomNos); |
|
|
|
$.modal.loading("正在导出数据,请稍后..."); |
|
|
|
var config = { |
|
|
|
url: prefix + '/export', |
|
|
|
type: "post", |
|
|
|
dataType: "json", |
|
|
|
contentType: "application/json;charset=utf-8", |
|
|
|
data: outOrderCodes, |
|
|
|
success: function(result) { |
|
|
|
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; |
|
|
|
$.modal.alertSuccess("导出成功!") |
|
|
|
$.modal.closeLoading(); |
|
|
|
}, |
|
|
|
error: function (result){ |
|
|
|
$.modal.alertError(result.msg); |
|
|
|
} |
|
|
|
}; |
|
|
|
$.ajax(config) |
|
|
|
}); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |