We discuss connections between certain classes of supersymmetric quiver gauge theories and integrable lattice models from the point of view of topological quantum field theories (TQFTs). The relevant classes include 4d $\mathcal{N} = 1$ theories known as brane box and brane tilling models, 3d $\mathcal{N} = 2$ and 2d $\mathcal{N} = (2,2)$ theories obtained from them by compactification, and 2d $\mathcal{N} = (0,2)$ theories closely related to these theories. We argue that their supersymmetric indices carry structures of TQFTs equipped with line operators, and as a consequence, are equal to the partition functions of lattice models. The integrability of these models follows from the existence of extra dimension in the TQFTs, which emerges after the theories are embedded in M-theory. The Yang-Baxter equation expresses the invariance of supersymmetric indices under Seiberg duality and its lower-dimensional analogs.