Origami has shown the potential to approximate three-dimensional curved surfaces by folding through designed crease patterns on flat materials. The Miura-ori tessellation is a widely used pattern in engineering and tiles the plane when partially folded. Based on constrained optimization, this article presents the construction of generalized Miura-ori patterns that can approximate three-dimensional parametric surfaces of varying curvatures while preserving the inherent properties of the standard Miura-ori, including developability, flat foldability, and rigid foldability. An initial configuration is constructed by tiling the target surface with triangulated Miura-like unit cells and used as the initial guess for the optimization. For approximation of a single target surface, a portion of the vertexes on the one side is attached to the target surface; for fitting of two target surfaces, a portion of vertexes on the other side is also attached to the second target surface. The parametric coordinates are adopted as the unknown variables for the vertexes on the target surfaces, while the Cartesian coordinates are the unknowns for the other vertexes. The constructed generalized Miura-ori tessellations can be rigidly folded from the flat state to the target state with a single degree-of-freedom.