We study the tradeoff between network utility and network lifetime using a cross-layer optimization approach. The tradeoff model in this paper is based on the framework of layering as optimization decomposition. Our tradeoff model is the first one that incorporates time slots allocation into this framework. By using Lagrangian dual decomposition method, we decompose the tradeoff model into two subproblems: routing problem at network layer and resource allocation problem at medium access control (MAC) layer. The interfaces between the layers are precisely the dual variables. A partially distributed algorithm is proposed to solve the nonlinear, convex, and separable tradeoff model. Numerical simulation results are presented to support our algorithm.