Going to visit China for a couple of weeks, does a foreigner have to declare his laptop, that he needs for work and will take back when leaving the country, at the customs?
The Chinese customs has a very broad statement:
Personal articles intended to remain in the territory, valued at RMB2,000 or above, carried by non-Chinese residents. | The exceeding part or amount (subject to reasonable personal use) above the limitation set by the Customs shall be levied duty upon.
Since you intend to remain for only 2 weeks, this will not be applicable to you.
Furthermore, you are allowed to bring 1 laptop to China along with you
Staff of oversea diplomatic agencies, overseas students, visiting scholars, overseas contracted workers, foreign aid personnel who have stayed abroad for 180 days, and seafarers who have stayed abroad for 120 days are permitted to bring one item duty-free. Other travelers are allowed to bring one item duty-free each year.
So as long as you are not buying an additional laptop and taking it out of China, you won't have to pay customs. But since it's China and they have strict regulations you should ask the Customs officers for details or choose the “Goods to Declare Channel” (RED CHANNEL).