It's okay to do cardio on the same days that you lift, but I think you have to go about it in a certain way. Some people have great results even if they do cardio and lifting back-to-back, while some people like to do weights and cardio separate. It all depends on the person and what works for them.
If you're worried about hampering your gains, you could try doing your cardio in the morning, and do your weights later on in the day. Maybe separate the two by about 6 hours or so. And make sure your nutrition is appropriate. The more you do, the more food you need because you're expending more energy. So make sure you're on top of that. Just make sure to have rest days where you don't do anything too strenuous, to give your body enough rest.
But like I said, it depends on the person. There are so many different opinions on this topic! Just try different things and see what you like best..
Good luck man!