browse.ui.js 633 B

12345678910111213141516171819202122
  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('auditplanIdList[]', id));
  9. postAndLoadPage(url, form);
  10. });
  11. window.onRenderCell = function(result, {row, col})
  12. {
  13. if(result && col.name == 'checkDate' && row.data.delay)
  14. {
  15. result[0] = {html: '<span class="text-danger">' + row.data.checkDate + '</span>'};
  16. }
  17. return result;
  18. };