diff --git a/app/Business/KukaPostingBase/KukaPostingBasePageData.php b/app/Business/KukaPostingBase/KukaPostingBasePageData.php index 8ddf67c2..f60e2c6a 100644 --- a/app/Business/KukaPostingBase/KukaPostingBasePageData.php +++ b/app/Business/KukaPostingBase/KukaPostingBasePageData.php @@ -28,7 +28,15 @@ class KukaPostingBasePageData public function build(Request $request, int $companyId): array { $stores = array_values((array) config('kuka_posting.stores', [])); - $fields = array_values((array) config('kuka_posting.fields', [])); + $fieldDefinitions = collect((array) config('kuka_posting.fields', []))->keyBy('name'); + $displayFieldNames = array_values((array) config('kuka_posting.shipment_display_fields', [])); + $fields = $displayFieldNames === [] + ? $fieldDefinitions->values()->all() + : collect($displayFieldNames) + ->map(static fn (string $name): ?array => $fieldDefinitions->get($name)) + ->filter() + ->values() + ->all(); $available = $this->repository->available(); $periods = $available ? $this->repository->periods($companyId) : []; $latest = $available ? $this->repository->latestImport($companyId) : null; diff --git a/config/kuka_posting.php b/config/kuka_posting.php index d5b333ee..a90e17ac 100644 --- a/config/kuka_posting.php +++ b/config/kuka_posting.php @@ -138,6 +138,23 @@ return [ ['name' => 'specification_model', 'source' => '规格型号', 'label' => '规格型号'], ['name' => 'material', 'source' => '材质', 'label' => '材质'], ], + 'shipment_display_fields' => [ + 'online_order_no', + 'order_status', + 'shipping_warehouse', + 'store_name', + 'shipping_date', + 'product_code', + 'style_code', + 'item_number', + 'material_number', + 'model', + 'cost', + 'product_material', + 'shipped_quantity', + 'shipping_amount', + 'posting_label', + ], 'field_widths' => [ 'internal_order_no' => 120, 'marked_labels' => 340, diff --git a/resources/views/business/pages/partials/directory-table.blade.php b/resources/views/business/pages/partials/directory-table.blade.php index 059231d7..e7be83dc 100644 --- a/resources/views/business/pages/partials/directory-table.blade.php +++ b/resources/views/business/pages/partials/directory-table.blade.php @@ -1,5 +1,6 @@ @php $showDirectoryIntro = $showDirectoryIntro ?? true; + $showDirectoryIndex = $showDirectoryIndex ?? true; $enableColumnResize = $enableColumnResize ?? false; $columnWidths = is_array($columnWidths ?? null) ? $columnWidths : []; $directoryRows = $rows ?? collect(); @@ -3302,7 +3303,7 @@