So obviously one way to prevent this would be to hit the black market in it and make it available to adults only from authorised retailers, this would reduce the black market and lead to less dealers as the money would not be in it for them.
I live near a port. About one third of the cigarettes and loose tobacco consumed here is smuggled. Punters buy the smuggled stuff because it's much cheaper due to the tax on tobacco in the shops. As you say, legalising weed would reduce the income for dealers but it would certainly not eliminate them. The law enforcement problem would just move from the police to the tax authorities at HMRC.
Believe me, the only solution is to bring back the death sentence for anybody caught with a spliff.