The nonlinear Schrödinger equation with dissipation and the moment method