优化采购单

This commit is contained in:
liu
2026-08-13 10:53:11 +08:00
parent 79e3ed4a8a
commit 099e92b1ff
9 changed files with 221 additions and 133 deletions
+2 -3
View File
@@ -16,8 +16,7 @@ use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
/**
* 采购单导出(C2 全品类按分类 sort 排序 / C3 仅蔬果分类)
* 数据源为订货明细按商品聚合(无独立采购明细表),每门店一列显示数量
* 采购单导出
*/
class PurchaseOrderExport implements FromCollection, WithHeadings, WithMapping, WithStyles
{
@@ -135,7 +134,7 @@ class PurchaseOrderExport implements FromCollection, WithHeadings, WithMapping,
return array_merge(
['序号', '分类', '品名', '供应商', '包规', '单位', '成本', '单价', '数量', '实际称重', '金额'],
array_map(static fn (string $name): string => $name . '(数量)', array_values($this->storeNames)),
array_values($this->storeNames),
);
}