In this paper, we introduce the concept of total quantum integrals in the case of weak crossed Hopf $\pi$-coalgebras and prove the affineness criterion for weak quantum Yetter-Drinfel'd $\pi$-modules, which is a generalization of the total quantum integral introduced by Chen andWang(Filomat 26: 101-118, (2012)).