Your itinerary in China for the Dunhuang to Lijiang part is going to be quite indirect and will take some time/connections even by plane, I hope you realize that. As to your specific questions:
1) Don't think anything is flying directly KMG-LPQ. Logical connection options would be:
(a) KMG-VTE by Laos Airlines. This is a morning flight so you'd have time to catch a domestic Laos Airlines flight to Luang Prabang after that. Makes sense if you decide to skip a stay in Vientiane.
(b) KMG-VTE by either China Eastern Airlines. Due to timing and arrival in early evening, you'd have to spend the night in Vientiane and then fly the domestic the next day to LPQ. Or extend stay another day in Vientiane.
(c) KMG-CNX by China Eastern then CNX-LPQ nonstop by Lao Aviation. Due to timing of the flights, would have to stay the night in Chiang Mai. This avoids connecting in VTE entirely.
(d) KMG-BKK by China Eastern or Thai. BKK-LPQ by Lao Airlines or Bangkok Airways. Also avoids Vientiane. Likely this will be more expensive than the options above, and adds the layer of hassle involved with dealing with a large and busy airport.
2) IME, Vientiane is of lesser importance than anywhere else you mentioned in Laos or Vietnam. It's OK for a day or so if you can fit it in, but with only 2 weeks to presumably get from Kunming to departure from HCMC, it's iffy. Perhaps make the decision on flight cost differentials.
3) LPQ-HAN nonstop you have two choices: Lao Airlines and Vietnam Airlines. Both are fine, go with timing/cost.
4) Hanoi-Hue (or Danang) and Hue (or Danang) to HCMC, Vietnam Airlines domestic is the primary and IMO best option. There is a new LCC player, Vietjet Air but I don't know much about them. Pacific Airlines also on some routes. BTW, if your intent is to see Hue and Hoi An, then you should fly from Hanoi into one (probably Hue) then overland train or bus Hue to Hoi An via Danang, then fly Danang-HCMC.
5) Time allotments: Luang Prabang, 3 full days. Hanoi, 2 full days. Halong Bay out of Hanoi, 2 days including transport to/from Bay and overnight on a boat. Hue, 2 days. Hoi An, 3 days. HCMC and nearby, 2-3 days. As you can see, that's a full two weeks not including the time eaten up by intercity transport or Vientiane. If you can't manage another 4-5 days added to your 2 weeks, you might want to cut something. If Luang Prabang is not a priority for you, it does make sense to focus the entire two weeks in Vietnam. I never advocate anybody try to do north, central, and south vietnam in less than 3 weeks, and that's without Laos in there. With this wish list, you will be rushing despite your stated desire not to.
And you don't mention time of year of your visit. That might impact the recommendations.