President Donald Trump declared victory on Tuesday as an effort to end the longest-ever US government shutdown headed to a final vote and rival Democrats tore themselves apart over the deal.