A Primal-dual Approach for Solving Variational Inequalities with General-form Constraints