|
<script language="javascript">
function toadd()
{
var obj=window.dialogArguments;
table=obj.getElementById('tlb');
table.style.display="none";
var str=table.innerHTML;
var formSelect=document.getElementsByName("isSelect");
if(formSelect!="null")
{
for(i=0;i<formSelect.length;i++)
{
var guid=formSelect.value;
if(str.indexOf(guid)==-1)
{
var row = table.insertRow(); //创建一行
row.className="yi_hang_9";
var formrow=document.getElementById('istr'+guid)
var cell = row.insertCell();
var cell2 = row.insertCell();
var cell3 = row.insertCell();
var cell4 = row.insertCell();
var cell5 = row.insertCell();
var cell6 = row.insertCell();
var cell7 = row.insertCell();
var cell8 = row.insertCell();
var cell9 = row.insertCell();
var cell10 = row.insertCell();
var cell11 = row.insertCell();
cell.innerHTML=formrow.cells[0].innerHTML;
cell2.innerHTML=formrow.cells[1].innerHTML;
cell3.innerHTML=formrow.cells[2].innerHTML;
cell4.innerHTML=formrow.cells[3].innerHTML;
cell5.innerHTML=formrow.cells[4].innerHTML;
cell6.innerHTML=formrow.cells[5].innerHTML;
cell7.innerHTML=formrow.cells[6].innerHTML;
cell8.innerHTML=formrow.cells[7].innerHTML;
cell9.innerHTML=formrow.cells[8].innerHTML;
cell10.innerHTML=formrow.cells[9].innerHTML;
cell11.innerHTML=formrow.cells[10].innerHTML;
row.appendChild(cell);
row.appendChild(cell2);
row.appendChild(cell3);
row.appendChild(cell4);
row.appendChild(cell5);
row.appendChild(cell6);
row.appendChild(cell7);
row.appendChild(cell8);
row.appendChild(cell9);
row.appendChild(cell10);
row.appendChild(cell11);
}
}
}
else
{
formSelect=document.getElementsByName("CONSUMABLES_GUIDcheckbox");
var flag=false;
for(j=0;j<formSelect.length;j++)
{
if(formSelect[j].checked)
{
flag=true;
break;
}
}
if(!flag)
{
alert("请选择要添加的资产!");
return ;
}
for(i=0;i<formSelect.length;i++)
{
if(formSelect.checked)
{
var guid=formSelect.value;
var row = table.insertRow(); //创建一行
row.className="yi_hang_9";
var formrow=document.getElementById('tr'+guid)
var cell = row.insertCell();
var cell2 = row.insertCell();
var cell3 = row.insertCell();
var cell4 = row.insertCell();
var cell5 = row.insertCell();
var cell6 = row.insertCell();
var cell7 = row.insertCell();
var cell8 = row.insertCell();
var cell9 = row.insertCell();
var cell10 = row.insertCell();
var cell11 = row.insertCell();
cell.innerHTML=formrow.cells[0].innerHTML;
cell2.innerHTML=formrow.cells[1].innerHTML;
cell3.innerHTML=formrow.cells[2].innerHTML;
cell4.innerHTML=formrow.cells[3].innerHTML;
cell5.innerHTML=formrow.cells[4].innerHTML;
cell6.innerHTML=formrow.cells[5].innerHTML;
cell7.innerHTML=formrow.cells[6].innerHTML;
cell8.innerHTML=formrow.cells[7].innerHTML;
cell9.innerHTML=formrow.cells[8].innerHTML;
cell10.innerHTML=formrow.cells[9].innerHTML;
cell11.innerHTML=formrow.cells[10].innerHTML;
row.appendChild(cell);
row.appendChild(cell2);
row.appendChild(cell3);
row.appendChild(cell4);
row.appendChild(cell5);
row.appendChild(cell6);
row.appendChild(cell7);
row.appendChild(cell8);
row.appendChild(cell9);
row.appendChild(cell10);
row.appendChild(cell11);
}
}
}
table.style.display="block";
window.close();
}
</script> |
|