I know bearded dragons generally have a pretty robust appetite and eat daily so I can understand your alarm at his reluctance to eat for the last two weeks.
I would mist him regularly in an effort to prevent dehydration if you aren't already and since he's not eating any veggies. If he is unable to move himself about his habitat and seek his own optimal temperature than I would keep him on the warm side. If he has chosen the middle temp range and placed himself there than I would leave him there. If his legs are extended straight out behind him than I would be really concerned that he is blocked and perhaps ate something or tried to eat something bigger than he should have. He may have a partial obstruction which still allows him to defecate but effects his appetite. You mentioned that his stools are ok but if he hasn't been eating for 2 weeks than I suspect the frequency has at least reduced.
You may be doing this already, but make sure the temperature in his habitat is not too low. Most reptiles become sluggish and reluctant to eat at temperatures below 72 F and if your air conditioner is running and his heat lamp/light/pad is not on than that may be contributing to his inappetance. Remember, most ailments with reptiles are related to their management, so please make sure you examine your methods closely with regards XXXXX XXXXX factors as temperature and humidity.
Finally, is he sluggish and acting depressed and losing weight or is he just acting normally but refusing to eat? If he is depressed and losing weight than I think your next move is a return trip to your vet for a radiograph or x-ray to evaluate his gastrointestinal tract and to look at his skeletal structure, and another round of tube feeding.
Please let me know how he is doing and good luck.