點(diǎn)晴ERP-動(dòng)態(tài)JS給送貨單查看添加合計(jì)行
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
:點(diǎn)晴ERP-動(dòng)態(tài)JS給送貨單查看添加合計(jì)行 var weight_num=document.getElementById("num").value; var total_contract_order_quantity=0; var total_finished_order_quantity=0; var total_pre_quantity=0; var total_consignment_quantity=0; for(no_w=1;no_w<=weight_num;no_w++){ total_contract_order_quantity=document.getElementById('contract_order_quantity'+no_w).value-(-total_contract_order_quantity) total_finished_order_quantity=document.getElementById('finished_order_quantity'+no_w).value-(-total_finished_order_quantity) total_pre_quantity=document.getElementById('pre_quantity'+no_w).value-(-total_pre_quantity) total_consignment_quantity=document.getElementById('consignment_quantity'+no_w).value-(-total_consignment_quantity) } var table = document.getElementById('dgoie'); // 獲取單元格數(shù)量 var cellCount = table.rows[0].cells.length; // 創(chuàng)建新行并設(shè)置高度 var newRow = table.insertRow(-1); // -1 表示在表的底部插入 newRow.style.height = '26px'; // 為新行創(chuàng)建單元格并填充數(shù)據(jù)(如果需要) for (var i = 0; i < cellCount; i++) { var newCell = newRow.insertCell(i); newCell.style.textAlign = 'center'; if(i==7){ newCell.innerHTML=total_contract_order_quantity; } else if(i==8){ newCell.innerHTML=total_finished_order_quantity; } else if(i==10){ newCell.innerHTML=total_pre_quantity; } else if(i==11){ newCell.innerHTML=total_consignment_quantity; } else{ newCell.innerHTML = ''; // 根據(jù)需要填充內(nèi)容
}
} 該文章在 2024/5/16 18:46:56 編輯過(guò) |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |