style: минимальная высота строк в таблицах вкладки «Ценообразование»
Заголовки/футеры py-2 -> py-1, тело обеих таблиц (Buy/Sale) py-1.5 -> py-0.5. Элементы управления под таблицами (инпуты, кнопки) не тронуты. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7263dd4572
commit
497aee1e71
+38
-38
@@ -222,15 +222,15 @@
|
||||
<table class="w-full text-sm border-collapse">
|
||||
<thead class="bg-gray-50 text-gray-700">
|
||||
<tr>
|
||||
{{if eq .IndicatorMode "accessible"}}<th class="px-2 py-2 border-b" title="Качество цены"><span class="sr-only">Качество цены</span></th>{{end}}
|
||||
<th class="px-2 py-2 text-left border-b whitespace-nowrap">PN вендора</th>
|
||||
<th class="px-2 py-2 text-left border-b">Описание</th>
|
||||
<th class="px-2 py-2 text-left border-b">LOT</th>
|
||||
<th class="px-2 py-2 text-right border-b">Кол-во</th>
|
||||
<th class="px-2 py-2 text-right border-b">Estimate</th>
|
||||
<th class="px-2 py-2 text-right border-b stock-price-col">Склад</th>
|
||||
<th class="px-2 py-2 text-right border-b">Конкуренты</th>
|
||||
<th class="px-2 py-2 text-right border-b">Ручная цена</th>
|
||||
{{if eq .IndicatorMode "accessible"}}<th class="px-2 py-1 border-b" title="Качество цены"><span class="sr-only">Качество цены</span></th>{{end}}
|
||||
<th class="px-2 py-1 text-left border-b whitespace-nowrap">PN вендора</th>
|
||||
<th class="px-2 py-1 text-left border-b">Описание</th>
|
||||
<th class="px-2 py-1 text-left border-b">LOT</th>
|
||||
<th class="px-2 py-1 text-right border-b">Кол-во</th>
|
||||
<th class="px-2 py-1 text-right border-b">Estimate</th>
|
||||
<th class="px-2 py-1 text-right border-b stock-price-col">Склад</th>
|
||||
<th class="px-2 py-1 text-right border-b">Конкуренты</th>
|
||||
<th class="px-2 py-1 text-right border-b">Ручная цена</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="pricing-body-buy">
|
||||
@@ -238,11 +238,11 @@
|
||||
</tbody>
|
||||
<tfoot id="pricing-foot-buy" class="hidden bg-gray-50 font-semibold">
|
||||
<tr>
|
||||
<td colspan="{{if eq .IndicatorMode "accessible"}}5{{else}}4{{end}}" class="px-2 py-2 text-right">Итого:</td>
|
||||
<td class="px-2 py-2 text-right" id="pricing-total-buy-estimate">—</td>
|
||||
<td class="px-2 py-2 text-right stock-price-col" id="pricing-total-buy-warehouse">—</td>
|
||||
<td class="px-2 py-2 text-right" id="pricing-total-buy-competitor">—</td>
|
||||
<td class="px-2 py-2 text-right font-bold" id="pricing-total-buy-vendor">—</td>
|
||||
<td colspan="{{if eq .IndicatorMode "accessible"}}5{{else}}4{{end}}" class="px-2 py-1 text-right">Итого:</td>
|
||||
<td class="px-2 py-1 text-right" id="pricing-total-buy-estimate">—</td>
|
||||
<td class="px-2 py-1 text-right stock-price-col" id="pricing-total-buy-warehouse">—</td>
|
||||
<td class="px-2 py-1 text-right" id="pricing-total-buy-competitor">—</td>
|
||||
<td class="px-2 py-1 text-right font-bold" id="pricing-total-buy-vendor">—</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -271,13 +271,13 @@
|
||||
<table class="w-full text-sm border-collapse">
|
||||
<thead class="bg-gray-50 text-gray-700">
|
||||
<tr>
|
||||
{{if eq .IndicatorMode "accessible"}}<th class="px-2 py-2 border-b" title="Качество цены"><span class="sr-only">Качество цены</span></th>{{end}}
|
||||
<th class="px-2 py-2 text-left border-b whitespace-nowrap">PN вендора</th>
|
||||
<th class="px-2 py-2 text-left border-b">Описание</th>
|
||||
<th class="px-2 py-2 text-left border-b">LOT</th>
|
||||
<th class="px-2 py-2 text-right border-b">Кол-во</th>
|
||||
<th class="px-2 py-2 text-right border-b w-20">Накидка, %</th>
|
||||
<th class="px-2 py-2 text-right border-b">Цена</th>
|
||||
{{if eq .IndicatorMode "accessible"}}<th class="px-2 py-1 border-b" title="Качество цены"><span class="sr-only">Качество цены</span></th>{{end}}
|
||||
<th class="px-2 py-1 text-left border-b whitespace-nowrap">PN вендора</th>
|
||||
<th class="px-2 py-1 text-left border-b">Описание</th>
|
||||
<th class="px-2 py-1 text-left border-b">LOT</th>
|
||||
<th class="px-2 py-1 text-right border-b">Кол-во</th>
|
||||
<th class="px-2 py-1 text-right border-b w-20">Накидка, %</th>
|
||||
<th class="px-2 py-1 text-right border-b">Цена</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="pricing-body-sale">
|
||||
@@ -285,8 +285,8 @@
|
||||
</tbody>
|
||||
<tfoot id="pricing-foot-sale" class="hidden bg-gray-50 font-semibold">
|
||||
<tr>
|
||||
<td colspan="{{if eq .IndicatorMode "accessible"}}6{{else}}5{{end}}" class="px-2 py-2 text-right">Итого:</td>
|
||||
<td class="px-2 py-2 text-right font-bold" id="pricing-total-sale-price">—</td>
|
||||
<td colspan="{{if eq .IndicatorMode "accessible"}}6{{else}}5{{end}}" class="px-2 py-1 text-right">Итого:</td>
|
||||
<td class="px-2 py-1 text-right font-bold" id="pricing-total-sale-price">—</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -4559,7 +4559,7 @@ async function renderPricingTab() {
|
||||
// amber world-fallback cell tint is replaced by a text marker.
|
||||
const ACCESSIBLE_MODE = window.QF_INDICATOR_MODE === 'accessible';
|
||||
const meterCell = (q, bt) => ACCESSIBLE_MODE
|
||||
? `<td class="pricing-quality-meter px-2 py-1.5 align-middle ${bt || ''}">${qualityMeterHtml(q)}</td>`
|
||||
? `<td class="pricing-quality-meter px-2 py-0.5 align-middle ${bt || ''}">${qualityMeterHtml(q)}</td>`
|
||||
: '';
|
||||
|
||||
// ─── Build shared row data (unit prices for display, totals for math) ────
|
||||
@@ -4722,18 +4722,18 @@ async function renderPricingTab() {
|
||||
const borderTop = r.groupStart ? 'border-t border-gray-200' : '';
|
||||
const pnDescHtml = r.groupStart ? (() => {
|
||||
const rs = r.groupSize > 1 ? ` rowspan="${r.groupSize}"` : '';
|
||||
return `<td${rs} class="px-2 py-1.5 font-mono text-xs border-t border-gray-200 align-top whitespace-nowrap ${r.vendorPN == null ? 'text-gray-400' : ''}">${r.vendorPN != null ? escapeHtml(r.vendorPN) : '—'}</td>
|
||||
<td${rs} class="px-2 py-1.5 text-xs text-gray-500 truncate max-w-xs border-t border-gray-200 align-top">${escapeHtml(r.desc)}</td>`;
|
||||
return `<td${rs} class="px-2 py-0.5 font-mono text-xs border-t border-gray-200 align-top whitespace-nowrap ${r.vendorPN == null ? 'text-gray-400' : ''}">${r.vendorPN != null ? escapeHtml(r.vendorPN) : '—'}</td>
|
||||
<td${rs} class="px-2 py-0.5 text-xs text-gray-500 truncate max-w-xs border-t border-gray-200 align-top">${escapeHtml(r.desc)}</td>`;
|
||||
})() : '';
|
||||
tr.innerHTML = `
|
||||
${meterCell(r.priceQuality, borderTop)}
|
||||
${pnDescHtml}
|
||||
<td class="px-2 py-1.5 text-xs ${borderTop}">${r.lotCell}</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs ${borderTop}">${r.qty}</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs ${borderTop} ${worldCls(r.estWorld)}">${r.estUnit > 0 ? formatCurrency(r.estUnit) : '—'}${worldMark(r.estWorld)}</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs stock-price-col ${borderTop} ${worldCls(r.whWorld)}">${r.warehouseUnit != null ? formatCurrency(r.warehouseUnit) : '—'}${worldMark(r.whWorld)}</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs ${borderTop} ${worldCls(r.compWorld)}">${r.competitorUnit != null ? formatCurrency(r.competitorUnit) : '—'}${worldMark(r.compWorld)}</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs pricing-vendor-price-buy ${borderTop} ${r.vendorOrigUnit == null ? 'text-gray-400' : ''}">${r.vendorOrigUnit != null ? formatCurrency(r.vendorOrigUnit) : '—'}</td>
|
||||
<td class="px-2 py-0.5 text-xs ${borderTop}">${r.lotCell}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs ${borderTop}">${r.qty}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs ${borderTop} ${worldCls(r.estWorld)}">${r.estUnit > 0 ? formatCurrency(r.estUnit) : '—'}${worldMark(r.estWorld)}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs stock-price-col ${borderTop} ${worldCls(r.whWorld)}">${r.warehouseUnit != null ? formatCurrency(r.warehouseUnit) : '—'}${worldMark(r.whWorld)}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs ${borderTop} ${worldCls(r.compWorld)}">${r.competitorUnit != null ? formatCurrency(r.competitorUnit) : '—'}${worldMark(r.compWorld)}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs pricing-vendor-price-buy ${borderTop} ${r.vendorOrigUnit == null ? 'text-gray-400' : ''}">${r.vendorOrigUnit != null ? formatCurrency(r.vendorOrigUnit) : '—'}</td>
|
||||
`;
|
||||
tbodyBuy.appendChild(tr);
|
||||
});
|
||||
@@ -4775,20 +4775,20 @@ async function renderPricingTab() {
|
||||
const borderTop = r.groupStart ? 'border-t border-gray-200' : '';
|
||||
const pnDescHtml = r.groupStart ? (() => {
|
||||
const rs = r.groupSize > 1 ? ` rowspan="${r.groupSize}"` : '';
|
||||
return `<td${rs} class="px-2 py-1.5 font-mono text-xs border-t border-gray-200 align-top whitespace-nowrap ${r.vendorPN == null ? 'text-gray-400' : ''}">${r.vendorPN != null ? escapeHtml(r.vendorPN) : '—'}</td>
|
||||
<td${rs} class="px-2 py-1.5 text-xs text-gray-500 truncate max-w-xs border-t border-gray-200 align-top">${escapeHtml(r.desc)}</td>`;
|
||||
return `<td${rs} class="px-2 py-0.5 font-mono text-xs border-t border-gray-200 align-top whitespace-nowrap ${r.vendorPN == null ? 'text-gray-400' : ''}">${r.vendorPN != null ? escapeHtml(r.vendorPN) : '—'}</td>
|
||||
<td${rs} class="px-2 py-0.5 text-xs text-gray-500 truncate max-w-xs border-t border-gray-200 align-top">${escapeHtml(r.desc)}</td>`;
|
||||
})() : '';
|
||||
tr.innerHTML = `
|
||||
${meterCell(r.priceQuality, borderTop)}
|
||||
${pnDescHtml}
|
||||
<td class="px-2 py-1.5 text-xs ${borderTop}">${r.lotCell}</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs ${borderTop}">${r.qty}</td>
|
||||
<td class="px-2 py-1.5 text-right ${borderTop}">
|
||||
<td class="px-2 py-0.5 text-xs ${borderTop}">${r.lotCell}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs ${borderTop}">${r.qty}</td>
|
||||
<td class="px-2 py-0.5 text-right ${borderTop}">
|
||||
<input type="text" inputmode="decimal" class="pricing-row-markup w-16 px-1 py-0.5 border rounded text-right text-xs"
|
||||
value="${formatMarkupInput(markupPct)}"
|
||||
placeholder="0" oninput="onSaleRowMarkupInput(this)">
|
||||
</td>
|
||||
<td class="px-2 py-1.5 text-right text-xs pricing-sale-price ${borderTop} ${worldCls(r.estWorld)}">—${worldMark(r.estWorld)}</td>
|
||||
<td class="px-2 py-0.5 text-right text-xs pricing-sale-price ${borderTop} ${worldCls(r.estWorld)}">—${worldMark(r.estWorld)}</td>
|
||||
`;
|
||||
tbodySale.appendChild(tr);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user