On the fan, the three pins are Red = +12V, Black = Ground, Other Colour = Tachometer.
You do not need to use the Tachometer output - it is used on a PC for measuring the fan speed. Ignore it. Just wire up so that the Red fan lead/pin connects to +12V (Battery +) and the Black connects to Ground (battery -)
Personally, I would just cut the Molex connector off the fan leads and solder on some spade sockets that fit the battery.
Note that the charger will give a much higher voltage than 12V (maybe 15V) so you should not run the fan from the charger. It might be OK but more likely will shorten the fan's life.