WanderingMystic
Hero
You should be able to cast a cantrip using war magic because that is using the attack action and allows you to replace an attack with a cantrip. I still don't think the extra attack from bard that allows you to replace an attack with a cantrip should stack with war magic.I don't think so. You can't use the Magic Action when you action surge or with the extra Haste action. So looks like you're limited to 12 (if you can replace both attacks with cantrips, I'm not sure on that part).
Assuming that it does work however you would need the following
Fighter lvl 7
Bard lvl 6
Sorcerer lvl 2
Warlock lvl 2 Agonizing Blast, Pact of the Blade, +1
Warcaster: for casting in melee range
At this point you can attack with Eldritch blast with agonizing blast (3 beams) and then a wizard cantrip every round while also being able to use sorcery points to quicken Eldritch blast to cast as a bonus action. If you action surge that give you a 3rd Eldritch blast and a 2nd wizard cantrip. As far as haste goes I would rule that since the bards ability to swap out a cantrip is part of the extra attack action and haste only lets you make one attack I would let you swap it out for a wizard spell but not Eldritch blast
That is 3 wizard cantrips and 3 Eldritch blast (for 12 beams). All of this is at level 17 you have only gotten 3 feats and one of those needs to be warcaster so I'm guessing that you will have an int 16, cha 20