Add capability to a role , so user is only able to view his own posts

First of all you need to remove capability edit_others_posts if assigned to vendor role.

Then use the code snippet given below:

function posts_for_current_author($query) {
    global $pagenow;

    if( 'edit.php' != $pagenow || !$query->is_admin )
        return $query;

    if( !current_user_can( 'edit_others_posts' ) ) {
        global $user_ID;
        $query->set('author', $user_ID );
    return $query;
add_filter('pre_get_posts', 'posts_for_current_author');

Above code allows any users with the capability to edit other’s posts to view all posts. Where as users having role Vendor will only see their own posts.

For more customization you can use ‘User Role Editor’ plugin.