Let \({\mathscr {P}\mathscr {O}\mathscr {P}\mathscr {D}}_{n}\) be the semigroup consisting of all orientation-preserving and order-decreasing partial transformations on the finite chain \(X_{n}=\{ 1< \cdots < n \}\) , and let \({\mathscr {P}\mathscr {O}\mathscr {P}\mathscr {D}}(n,r)=\{ \alpha \in {\mathscr {P}\mathscr {O}\mathscr {P}\mathscr {D}}_{n}: |\textrm{im}\, (\alpha )|\le r\}\) for \(1\le r\le n-1\) . We prove that the rank and the idempotent rank of \({\mathscr {P}\mathscr {O}\mathscr {P}\mathscr {D}}(n,r)\) are both equal to \(\sum \limits _{s=r}^{n} \left( {\begin{array}{c}n\\ s\end{array}}\right) \left( {\begin{array}{c}s\\ r\end{array}}\right) +\frac{(2n-r-1)(r-2)}{2} \) for \(1\le r\le n-1\) . Then we conclude that the rank and the idempotent rank of \({\mathscr {P}\mathscr {O}\mathscr {P}\mathscr {D}}_{n}\) are both equal to \(\frac{n^{2}+n+2}{2}\) .