In today's turbulent and risky world, the importance of risk management in all areas has been cleared. Therefore, supply chain network design must minimize the potential risks of natural disasters, labor strikes, etc. And consume the number of resources in such a way that there are resources for the future. For this purpose, a leagile supply chain is designed to consume the number of resources in an optimal way and responses customers' demands quickly. Also, in this study, designing a supply chain that is resilient to potential risks and risks and has the least detrimental effects on the environment and resources has been studied. For this purpose, a three-objective mathematical model has been developed considering the economic, environmental, and social aspects. This model has been validated by a meta-heuristic algorithm, NSGA-III, for large dimensions. There are also three different types in the product distribution network. In each type, the optimal answers are extracted and compared with each other. A pharmaceutical supply chain in Iran is used as a case study to investigate the applicability of the proposed model and analyze the solution result, and some of the critical parameters of the problem have been analyzed.