<div class="form-group ">
    <div class="col-md-2">
        <label class="sr-only">تصنيف المنتج</label>
    </div>
    <select class="select2 wdt300 productCat productCatId02" data-level="{$level}"  name="productCatId{$level}" id="productCatId{$level}" >
        <option value="-1">اختر تصنيف</option>
        {foreach $catDataReport as $data}
        <option value="{$data.productCatId}">{$data.productCatName}</option>
        {/foreach}
    </select>
</div>
{literal}
<script>
    var levelhere = $('#level').val();
    $('#productCatId' + levelhere).select2();
</script>
{/literal}