The self-consistent field theory (SCFT) is applied to the microphase separation of concentrated solutions of weakly charged polyelectrolytes. The generalized Poisson–Boltzmann equation describing the electrostatic interactions at the mean-field level is numerically solved by a full multigrid algorithm, which enables one to solve the SCFT equations of polyelectrolyte systems in real space as efficient as neutral polymer systems. To demonstrate the power of the real-space numerical scheme, we consider a diblock copolyelectrolyte consisting of a charged block and a neutral block in two-dimensional space. The phase diagram in the Flory–Huggins interaction parameterthe composition space is constructed by numerical calculations. The density distribution of polymer segments, the counterions, and the net charge of the ordered structures, namely the lamellar phase and the hexagonal phase, are intensively examined. The effects of the interaction parameter and the degree of ionization are examined carefully. The numerical scheme can be easily extended to 3D calculations, various chain architectures, various charge distribution models, and other statistics chain models such as the worm-like chain model without losing any computational efficiency.