Phosphorus content is one of important indicators in the evaluation of water quality. The level of phosphorus in oilfield water systems not only affects the overall water cycle production system, but excessive phosphorus wastewater entering the environment can cause eutrophication of the water body, as can high levels of ammonia and nitrogen, and leading to rapid growth of algae and thus affecting the balance of the aquatic ecosystem. Therefore, the regulation of phosphorus is of great importance. Phosphorus exists in nature mainly in the form of phosphate, which is currently detected by the traditional spectrophotometric method. As this method requires the addition of a large number of chemical reagents, it is not only complex and time consuming, but also produces a waste solution at the end of the test that can easily cause secondary pollution to the environment. Compared to traditional methods, Ion Selective Electrodes (ISEs) are easier to use, more sensitive, less expensive and do not cause secondary contamination. In conventional ion selective electrode detection systems, liquid contact ion selective electrodes consisting of a polymeric ion selective membrane, an internal filling fluid and an internal reference electrode are susceptible to common variables such as pressure and temperature. There are problems with complex maintenance, leakage and signal calibration. In contrast, all-solid ion-selective electrodes that eliminate the internal filling fluid and internal reference have become a hot research topic for such potential-based sensors. In this thesis, the following research was carried out with the aim of developing a phosphate potentiometric sensor with practical detection capabilities:(1) PANI/ITO electrodes were produced by electrodeposition of polyaniline on ITO conductive glass by constant potential deposition and by ultrasonic peeling. Three oxidation states of PANI/ITO electrodes were prepared at different voltages using phosphoric acid as the doping solution. LBPANI/ITO electrode in the fully reduced state, ESPANI/ITO electrode in the semi-oxidized state and PBPANI/ITO electrode in the fully oxidized state. The response sensitivity and stability of the three electrodes were investigated to determine the optimum doping potential; the response performance of the electrodes was tested for different doping times to determine the optimum preparation time. It is shown that the PBPANI/ITO electrode in the fully oxidized state has the optimum stability and response sensitivity at a doping time of 80 s. The electrode showed good linear response in the range of 1.00x10-5 ~ 1.00x10-1 M, with a response sensitivity of 37.30 dec/mV (R2 = 0.9966) and a detection limit of 10-5.6 M. The response time of the electrode to the solution was around 4 s, and it had good acid-base adaptability (pH 4.0 ~ 8.0). The performance of the prepared PBPANI/ITO electrode as a potentiometric phosphate sensor was also investigated in terms of stability (n = 10, RSD 1.76 %) and lifetime (6 weeks at room temperature), and was successfully used for phosphate detection and analysis in oilfield re-injection water, lake water and tap water samples in real environments with satisfactory results. (2) To further prepare a phosphate potential sensor with a high sensitivity response. We pretreated the home-made cobalt electrode with high pressure anodic oxidation in sodium hydroxide solution to produce a uniform cobalt oxide passivation film on the electrode surface. The sensitivity and stability of the response of the electrode at different pretreatment times were investigated to determine the optimum preparation conditions. The results showed that the pretreated cobalt electrode had a good response in the range of 1.00x10-5 ~ 1.00x10-1 M. The response sensitivity was 67.22 mV dec, R2 = 0.9939 and the detection limit was 10-5.5 M. It was much higher than that of the untreated cobalt electrode. This far exceeded that of the untreated polished cobalt electrode (36 ~ 40 mV/dec). The performance of the pretreated cobalt electrode as a potentiometric phosphate sensor was also investigated in terms of lifetime (7 weeks at room temperature), response rate (less 40 s), stability (n = 10, RSD 1.07 %) and acid-base adaptability (pH 4.0 ~ 8.0), and the sensor was successfully used for phosphate in oilfield re-injection water, lake water and tap water samples with satisfactory results.