NW's non-stop from DTW gets into PVG at 6:20p. There aren't many PVG-KMG flights a day (more from SHA), and last one from PVG departs 7:25p. I think it's too tight, and if you miss it you will have to stay overnight in Shanghai and likely buy another ticket next day to KMG.