diff --git a/web/templates/index.html b/web/templates/index.html index 0aa4c10..edd3589 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -211,7 +211,7 @@ Описание Кол-во Estimate - Цена вендора + Цена проектная Склад Конк. @@ -3789,7 +3789,7 @@ function applyPricingCustomPrice(customPrice) { const totalVendorEl = document.getElementById('pricing-total-vendor'); if (customPrice > 0 && estimateTotal > 0) { - // Proportionally redistribute custom price → Цена вендора cells + // Proportionally redistribute custom price → Цена проектная cells let assigned = 0; rows.forEach((tr, i) => { const est = parseFloat(tr.dataset.est) || 0; @@ -3850,18 +3850,22 @@ function exportPricingCSV() { return /[,"\n]/.test(s) ? `"${s}"` : s; }; - const headers = ['Цена вендора']; + const headers = ['Lot', 'P/N вендора', 'Описание', 'Кол-во', 'Цена проектная']; const lines = [headers.map(csvEscape).join(',')]; rows.forEach(tr => { const cells = tr.querySelectorAll('td'); + const lot = cells[0] ? cells[0].textContent.trim() : ''; + const vendorPN = cells[1] ? cells[1].textContent.trim() : ''; + const description = cells[2] ? cells[2].textContent.trim() : ''; + const qty = cells[3] ? cells[3].textContent.trim() : ''; const vendorPrice = cells[5] ? cells[5].textContent.trim() : ''; - lines.push([vendorPrice].map(csvEscape).join(',')); + lines.push([lot, vendorPN, description, qty, vendorPrice].map(csvEscape).join(',')); }); // Totals row const vendorTotal = document.getElementById('pricing-total-vendor').textContent.trim(); - lines.push(['Итого: ' + vendorTotal].map(csvEscape).join(',')); + lines.push(['', '', '', 'Итого:', vendorTotal].map(csvEscape).join(',')); const blob = new Blob(['\uFEFF' + lines.join('\r\n')], {type: 'text/csv;charset=utf-8;'}); const url = URL.createObjectURL(blob);