43 lines
2.0 KiB
PHP
43 lines
2.0 KiB
PHP
@php
|
||
$supplierTemplates = app(\App\Support\SupplierCooperationTemplates::class);
|
||
$supplierValues = $supplierTemplates->values($payload ?? []);
|
||
$supplierPreview = ($mode ?? 'pdf') === 'preview';
|
||
@endphp
|
||
<div class="supplier-contract-body">
|
||
@foreach ($supplierTemplates->blocks($templateKey) as $block)
|
||
@if ($block['type'] === 'signatures')
|
||
<table class="supplier-contract-signatures">
|
||
<tr>
|
||
@foreach (['a' => '甲方', 'b' => '乙方'] as $party => $label)
|
||
<td>
|
||
<p>{{ $label }}:{!! $supplierTemplates->text('[[party_' . $party . ']]', $supplierValues, $supplierPreview) !!}</p>
|
||
<p>授权代表:{!! $supplierTemplates->text('[[party_' . $party . '_signer]]', $supplierValues, $supplierPreview) !!}</p>
|
||
<p>签字/盖章:</p>
|
||
<div class="supplier-contract-seal-space"></div>
|
||
<p>合同签订日期:{!! $supplierTemplates->text('[[signature_date]]', $supplierValues, $supplierPreview) !!}</p>
|
||
</td>
|
||
@endforeach
|
||
</tr>
|
||
</table>
|
||
@elseif ($block['type'] === 'table')
|
||
<table class="supplier-contract-table">
|
||
<tbody>
|
||
@foreach ($block['rows'] as $row)
|
||
<tr>
|
||
@foreach ($row as $cell)
|
||
<td style="width:{{ $cell['width'] }}%" @if(($cell['colspan'] ?? 1) > 1) colspan="{{ $cell['colspan'] }}" @endif @if(($cell['rowspan'] ?? 1) > 1) rowspan="{{ $cell['rowspan'] }}" @endif>
|
||
@foreach ($cell['paragraphs'] as $paragraph)
|
||
@include('business.partials.supplier-contract-paragraph', ['block' => $paragraph])
|
||
@endforeach
|
||
</td>
|
||
@endforeach
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
@else
|
||
@include('business.partials.supplier-contract-paragraph')
|
||
@endif
|
||
@endforeach
|
||
</div>
|