It'll be rough to find courts. I've been to Beijing multiple, multiple times. Last year, I spent two weeks in the city, and have spent at least two months (cumulative). To tell you the truth, people in China don't give a crap about tennis. It's a ridiculously crowded city, and there's just no space for courts.
I can safely say that it will be almost impossible for you to find a free, public court that's playable. With luck, you will find public courts that you will be able to reserve for a fee, though I'm not sure how much you'll have to pay. I've never really heard of indoor courts.
You will also encounter many problems. Can you speak Chinese? If not, there will be problems with paying for the courts. Not to be racist, but Chinese tennis players generally do not have very good etiquette.
Something you can try to do is to find a local university or college to play at. That, in my opinion, was the best way to play tennis. The courts were in great shape, maintained by the college, the people that played there generally consisted of many teaching pros and college players, and it was part of this whole recreational center that the college had. It was secluded from the busy city, and had some breathing space. To tell you the truth, it was a really enjoyable experience.
Stores won't be that hard to find, but they will be overpriced and won't have a very wide selection.