Not as a simple edit. You apply afresh under the new purpose of stay, and the original work-type residence permit is cancelled. The change must also be reported within 10 days.
Nationwide (all cities)
Not an edit to the old document
Not as a simple edit. An official Q&A from the Hefei public security bureau says that if you finish working but want to keep staying in China, you can apply to switch visa type on another ground such as family reunion or study — but the original work-type residence permit will be cancelled, and you must meet the conditions of the new ground.
Five categories, by purpose of stay
Article 15 of the Regulations divides residence documents into five categories — work, study, journalist, family reunion and private affairs — issued according to the purpose of stay. The NIA service guide asks for documents relating to a change in the purpose of stay when applying for a replacement. In other words, you submit a fresh set of documents for the new ground, rather than amending a field on the old document.
The 10-day change deadline
The change also has a deadline. Article 33 of the Law requires you to apply for a change within 10 days of any change to a registered item, which includes the purpose of stay. Article 34 of the Regulations adds that if a change in the original purpose of stay is not reported within the required time and is still not reported after a public notice, the visa or residence document may be declared void.