House Democrats on Friday prepared a temporary spending bill that is needed to avert a government shutdown at the end of the month — and that would allow lawmakers to leave Washington to campaign.