Files
EasySoft-ZenTaoPMS/module/project/js/bug.ui.js
T

20 lines
501 B
JavaScript

$(document).off('click', '.batch-btn').on('click', '.batch-btn', function()
{
const dtable = zui.DTable.query($(this).target);
const checkedList = dtable.$.getChecks();
if(!checkedList.length) return;
const url = $(this).data('url');
const form = new FormData();
checkedList.forEach((id) => form.append('bugIdList[]', id));
if($(this).hasClass('ajax-btn'))
{
$.ajaxSubmit({url, data:form});
}
else
{
postAndLoadPage(url, form);
}
});