采购单优化

This commit is contained in:
liu
2026-08-12 14:38:20 +08:00
parent ce1f36b5b4
commit dadfdc1511
30 changed files with 1059 additions and 1441 deletions
+23 -13
View File
@@ -26,34 +26,44 @@
<th>序号</th>
<th>分类</th>
<th>品名</th>
<th>规格/包规</th>
<th>供应商</th>
<th>包规</th>
<th>单位</th>
<th>成本</th>
<th>单价</th>
<th>数量</th>
<th>实际称重</th>
<th>金额</th>
<th>供应商</th>
@foreach ($storeNames as $storeName)
<th>{{ $storeName }}(数量)</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($items as $item)
<tr>
<td>{{ $item->sort }}</td>
<td>{{ $categoryNames[$item->product_id] ?? '' }}</td>
<td>{{ $item->product_name }}</td>
<td>{{ $item->product_spec }}</td>
<td class="text-right">{{ $item->price }}</td>
<td class="text-right">{{ $item->quantity }}</td>
<td class="text-right">{{ $item->weight }}</td>
<td class="text-right">{{ $item->amount }}</td>
<td>{{ $supplierNames[$item->supplier_id] ?? '' }}</td>
<td>{{ $item['sort'] }}</td>
<td>{{ $categoryNames[$item['product_id']] ?? '' }}</td>
<td>{{ $item['product_name'] }}</td>
<td>{{ $supplierNames[$item['supplier_id']] ?? '' }}</td>
<td>{{ $item['product_spec'] }}</td>
<td>{{ $item['unit'] }}</td>
<td class="text-right">{{ $item['cost_price'] }}</td>
<td class="text-right">{{ $item['unit_cost'] }}</td>
<td class="text-right">{{ $item['quantity'] }}</td>
<td class="text-right">{{ $item['weight'] }}</td>
<td class="text-right">{{ $item['amount'] }}</td>
@foreach ($storeNames as $storeId => $storeName)
<td class="text-right">{{ $item['store_quantities'][$storeId] ?? 0 }}</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="7" class="text-right">合计金额</td>
<td colspan="10" class="text-right">合计金额</td>
<td class="text-right">¥{{ $items->sum('amount') }}</td>
<td></td>
<td colspan="{{ count($storeNames) }}"></td>
</tr>
</tfoot>
</table>