diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 6e3eea78..eb11aa99 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -122,6 +122,11 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline- 'accounts' => $accounts ?? collect(), ]) + {{-- 품의서 전용 폼 --}} + @include('approvals.partials._purchase-request-form', [ + 'initialData' => [], + ]) + {{-- 액션 버튼 --}}
+ + diff --git a/resources/views/approvals/partials/_purchase-request-show.blade.php b/resources/views/approvals/partials/_purchase-request-show.blade.php new file mode 100644 index 00000000..8ef22eef --- /dev/null +++ b/resources/views/approvals/partials/_purchase-request-show.blade.php @@ -0,0 +1,101 @@ +{{-- + 품의서 읽기전용 렌더링 + Props: + $content (array) - approvals.content JSON +--}} +
+ {{-- 구매 목적 --}} + @if(!empty($content['purpose'])) +
+ 구매 목적 +
{{ $content['purpose'] }}
+
+ @endif + + {{-- 기본 정보 --}} +
+
+ 작성일자 +
{{ $content['write_date'] ?? '-' }}
+
+
+ 희망 납기일 +
{{ $content['desired_date'] ?? '-' }}
+
+
+ 요청부서 +
{{ $content['department'] ?? '-' }}
+
+
+ 요청자 +
{{ $content['writer_name'] ?? '-' }}
+
+
+ + {{-- 내역 테이블 --}} + @if(!empty($content['items'])) +
+ + + + + + + + + + + + + @foreach($content['items'] as $item) + + + + + + + + + @endforeach + + + + + + + + +
품명수량단가금액업체명비고
{{ $item['description'] ?? '' }}{{ $item['quantity'] ?? '' }}{{ number_format($item['unit_price'] ?? 0) }}{{ number_format($item['amount'] ?? 0) }}{{ $item['vendor'] ?? '' }}{{ $item['remark'] ?? '' }}
합계{{ number_format($content['total_amount'] ?? 0) }}
+
+ @endif + + {{-- 첨부서류 --}} + @if(!empty($content['attachment_memo'])) +
+ 첨부서류 +
{{ $content['attachment_memo'] }}
+
+ @endif + + {{-- 첨부파일 --}} + @if(!empty($approval->attachments)) +
+ 첨부파일 +
+ @foreach($approval->attachments as $file) +
+ + + + + {{ $file['name'] ?? '파일' }} + + + {{ isset($file['size']) ? number_format($file['size'] / 1024, 1) . 'KB' : '' }} + +
+ @endforeach +
+
+ @endif +
diff --git a/resources/views/approvals/show.blade.php b/resources/views/approvals/show.blade.php index faa59274..f84730c5 100644 --- a/resources/views/approvals/show.blade.php +++ b/resources/views/approvals/show.blade.php @@ -80,7 +80,9 @@ class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded-lg transition

{{ $approval->title }}

- @if(!empty($approval->content) && $approval->form?->code === 'expense') + @if(!empty($approval->content) && $approval->form?->code === 'purchase_request') + @include('approvals.partials._purchase-request-show', ['content' => $approval->content]) + @elseif(!empty($approval->content) && $approval->form?->code === 'expense') @include('approvals.partials._expense-show', ['content' => $approval->content]) @elseif(!empty($approval->content) && $approval->form?->code === 'employment_cert') @include('approvals.partials._certificate-show', ['content' => $approval->content])