parametro de função string
Ola, estou com um problema, tenho uma função com 3 parametros mas quando passa string ela não aceita , alguem poderia me ajudar?
a função é buscacodigoexclusaoitem, quando os valores sao numericos passa beleza, porem quando algum e string não aceita
textoHtml += "<tr id='centerItemslista2'>";
textoHtml += '<td onclick="{BuscaCodigoExclusaoItem('+arrayItems[i].CODI_ORCAM+','+arrayItems[i].DENTE+','+arrayItems[i].COD_TRATAM+')}"><a href="#modalEItemOrcto" role="button" data-toggle="modal" ><i class="icon-trash" rel="tooltip" title="Excluir"></a></td>'
textoHtml += "<td onclick='{realizaOrcamento("+arrayItems[i].sequencial+","+arrayItems[i].VLR_DENTIS+","+arrayItems[i].QTD_PREVIS+","+arrayItems[i].VLR_TRATAM+","+dia1+","+mes1+","+ano1+","+dia2+","+mes2+","+ano2+","+arrayItems[i].DENTI_CRED+")}' ><a href='#modalRealiza' role='button' data-toggle='modal'><i class='icon-retweet' rel='tooltip' title='Realizar'></i></a></td>"
textoHtml += "<td>"+arrayItems[i].DENTE+"</td>";
textoHtml += "<td>"+arrayItems[i].TRATAMENTO.substr(0,30)+"</td>";
textoHtml += "<td>"+arrayItems[i].QTD_PREVIS+"</td>";
if(arrayItems[i].QTD_REALIZ==null){qtd1=0;}else{qtd1=arrayItems[i].QTD_REALIZ;};
textoHtml += "<td>"+qtd1+"</td>";
textoHtml += "<td>"+Number(arrayItems[i].VLR_TRATAM).formatMoney()+"</td>";
textoHtml += "<td>"+arrayItems[i].AUTORIZACA+"</td>";
textoHtml += "<td>"+data1+"</td>";
if(arrayItems[i].DENTI_CRED==null){cdent1=0;}else{cdent1=arrayItems[i].DENTI_CRED;};
textoHtml += "<td>"+cdent1+"</td>";
textoHtml += "<td>"+data2+"</td>";
textoHtml += "</tr>";
if(arrayItems[i].QTD_PREVIS!=null){totalOr=totalOr+(arrayItems[i].VLR_TRATAM*1);}
if(arrayItems[i].QTD_REALIZ!=null){totalRe=totalRe+(arrayItems[i].VLR_TRATAM*1);}
}
$('#gridItemOrctos').html(textoHtml);
document.getElementById('OValorTotal').value=Number(totalOr).formatMoney();
document.getElementById('OValorReal').value=Number(totalRe).formatMoney();
}//***********************************************
function BuscaCodigoExclusaoItem(cod1){
document.getElementById('CCodigoOrcto').value=cod1;
document.getElementById('CCodigoDente').value=cod2;
document.getElementById('CCodigoTratam').value=cod3;
}Discussão (2)
Carregando comentários...