In order to reduce greenhouse gas emissions from road transportation and create a low-carbon and energy-saving society, it will become a trend to use electric logistics vehicles to complete urban logistics tasks in the logistics transportation industry. Compared with traditional fuel vehicles, electric logistics vehicles have many advantages such as low pollution and low energy consumption, which are highly concerned by the government, enterprises and consumers. The model of this paper is established based on the Location-Routing Problem and the time window constraint and the electric logistics vehicle power supply problem are considered in this integer planning model. To solve the above problems, an improved WOA is proposed in this paper, which variable neighborhood search operators are added in the original WOA to avoid falling into local optimum. WOA-VNS makes the search more efficient and gets more accurate solutions in reasonable time. By comparing the initial and final solutions of the randomized case, through the algorithm, the total transportation distance is shortened by about 33.9%, the construction cost of the charging pile is reduced by 61.5% and penalty costs can be avoided. It shows the effectiveness of the model establishment and the efficiency of the solution method.