view.ui.js 547 B

123456789101112131415161718192021
  1. $(document).off('click', '.batch-btn').on('click', '.batch-btn', function()
  2. {
  3. const dtable = zui.DTable.query($(this).target);
  4. const checkedList = dtable.$.getChecks();
  5. if(!checkedList.length) return;
  6. const url = $(this).data('url');
  7. const form = new FormData();
  8. checkedList.forEach((id) => form.append('caseIdList[]', id));
  9. if($(this).hasClass('ajax-btn'))
  10. {
  11. $.ajaxSubmit({url, data:form});
  12. }
  13. else
  14. {
  15. postAndLoadPage(url, form);
  16. }
  17. })
  18. $('.section-list').removeClass('pt-4 px-6');