Is it illegal for the company to buy foreign exchange with employee salary cards? What terms were specifically violated?

There is no prohibition in this regard. Your behavior is legal and compliant. The bank card is your private property, and the money in it is yours. No one has the right to interfere!

Purchase of foreign exchange refers to the business that domestic residents apply to the bank to purchase foreign exchange within a specified use range. If you are an individual resident of China, when you need foreign currency funds, the bank can provide you with RMB foreign exchange purchase service. Personal foreign exchange purchase business must be handled at designated bank outlets.