I changed a little bit your code.
It seems that the error is not excluding the clicked element of the slideUp
So i added
$(".parent_click").not(this).next().slideUp()
Also using slideToggle()
will do the work to close or open the current <ul>
To exclude it from the selected elements. The same was made on the $(".sub_click").click()