How can I configure IDM to turn off computer or disconnect from the Internet when download is completed?

IDM has such options, but they work only with Scheduler. You need to add all downloads you need into IDM queue (press "Download Later" in "Download File Info" dialog). Then open "Scheduler" IDM dialog and enable "Turn off computer when done" or "Hang up modem when done" options. Please note that these options do not work for downloads that you start manually.

Configure IDM to hang up mode or turn of computer on download completion