@extends($layout) @section('content') @php $m = $master ?? []; $masterBom = $m['bom'] ?? []; $masterColumns = $m['columns'] ?? []; $masterItems = $m['items'] ?? []; $imageColumns = $m['imageColumns'] ?? []; $fileColumns = $m['fileColumns'] ?? []; $refId = (int)($ref['id'] ?? 0); $typeNames = ['bom'=>'BOM','process'=>'工艺文件','tooling'=>'工具清单']; $typeName = $typeNames[$masterBom['type'] ?? 'bom'] ?? 'BOM'; @endphp
@foreach ($fixedColumns as $key => $label) @endforeach @foreach ($masterColumns as $col) @endforeach @foreach ($refColumns as $col) @endforeach @forelse ($masterItems as $item) @foreach ($fixedColumns as $key => $label) @endforeach @foreach ($masterColumns as $col) @endforeach @foreach ($refColumns as $col) @php $cid = (int)$col['id']; $val = $refValues[(int)$item['id']][$cid] ?? ''; @endphp @endforeach @empty @endforelse
{{ $label }}{{ $col['label'] ?: $col['key'] }} {{ $col['label'] ?: $col['key'] }} ×
{{ $item[$key] ?? '' }} @if (in_array($col['key'], $imageColumns, true)) @php $attach = json_decode((string)($item[$col['key']] ?? ''), true); @endphp @if (is_array($attach)) @foreach ($attach as $a) @endforeach @endif @elseif (in_array($col['key'], $fileColumns, true)) @php $attach = json_decode((string)($item[$col['key']] ?? ''), true); @endphp @if (is_array($attach)) @foreach ($attach as $a) {{ $a['name'] ?? '下载' }}
@endforeach @endif @else {{ $item[$col['key']] ?? '' }} @endif
暂无明细
@once @push('scripts') @endpush @endonce @endsection