In wafer fabrication, production quality is a key performance index and is subject to machine condition deterioration. This paper studies a parallel-machine scheduling problem that can typically be found in the photolithography process. To solve the problem, a lexicographic optimization approach is proposed where the total quality loss is firstly minimized and the second objective is to minimize total tardiness. An optional maintenance activity is also considered to restore the machine condition to a certain level. Optimality properties are discussed, based on which an exact scheduling algorithm is developed. Experimental analyses derived from real data demonstrate the effectiveness of the proposed algorithm and support some managerial insights.