Application of the Wigner-function formulation to mesoscopic systems in presence of the electron- phonon interaction