|
@@ -7,10 +7,14 @@
|
|
|
<h3>МАФ</h3>
|
|
<h3>МАФ</h3>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-6 text-end">
|
|
<div class="col-6 text-end">
|
|
|
-{{-- <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addModal">--}}
|
|
|
|
|
-{{-- Добавить--}}
|
|
|
|
|
-{{-- </button>--}}
|
|
|
|
|
-
|
|
|
|
|
|
|
+ @if(hasRole('admin'))
|
|
|
|
|
+ <button type="button" class="btn btn-sm mb-1 btn-primary" data-bs-toggle="modal" data-bs-target="#importModal">
|
|
|
|
|
+ Импорт
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <button type="button" class="btn btn-sm mb-1 btn-primary" data-bs-toggle="modal" data-bs-target="#exportModal">
|
|
|
|
|
+ Экспорт
|
|
|
|
|
+ </button>
|
|
|
|
|
+ @endif
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -26,40 +30,53 @@
|
|
|
@include('partials.pagination', ['items' => $products_sku])
|
|
@include('partials.pagination', ['items' => $products_sku])
|
|
|
|
|
|
|
|
|
|
|
|
|
- <!-- Модальное окно редактирования -->
|
|
|
|
|
-{{-- <div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">--}}
|
|
|
|
|
-{{-- <div class="modal-dialog modal-fullscreen-sm-down modal-lg">--}}
|
|
|
|
|
-{{-- <div class="modal-content">--}}
|
|
|
|
|
-{{-- <div class="modal-header">--}}
|
|
|
|
|
-{{-- <h1 class="modal-title fs-5" id="addModalLabel">Добавить заказ МАФ</h1>--}}
|
|
|
|
|
-{{-- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
-{{-- <div class="modal-body">--}}
|
|
|
|
|
-{{-- <form action="{{ route('product_sku.store') }}" method="post">--}}
|
|
|
|
|
-{{-- @csrf--}}
|
|
|
|
|
-{{-- <div id="select_maf_form">--}}
|
|
|
|
|
-{{-- <input type="text" class="form-control mb-2" placeholder="Поиск номенклатуры" id="search_maf">--}}
|
|
|
|
|
-{{-- <select id="select_maf" class="form-select mb-3" multiple></select>--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
-{{-- <div style="display:none;" id="sku_form">--}}
|
|
|
|
|
-{{-- <a href="#" onclick="$('#sku_form').slideUp(); $('#select_maf_form').slideDown()">назад</a>--}}
|
|
|
|
|
-{{-- <input type="hidden" id="product_id" name="product_id" value="">--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'product_name', 'title' => 'МАФ', 'disabled' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'rfid', 'title' => 'RFID', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'factory_number', 'title' => 'Номер фабрики', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'manufacture_date', 'title' => 'Дата производства', 'type' => 'date', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'service_life', 'title' => 'Срок службы', 'required' => true, 'type' => 'number'])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'certificate_number', 'title' => 'Номер сертификата', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'certificate_date', 'title' => 'Дата сертификата', 'type' => 'date', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'certificate_issuer', 'title' => 'Орган сертификации', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.input', ['name' => 'certificate_type', 'title' => 'Вид сертификации', 'required' => true])--}}
|
|
|
|
|
-{{-- @include('partials.submit', ['name' => 'Добавить'])--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
-{{-- </form>--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
-{{-- </div>--}}
|
|
|
|
|
|
|
+ <!-- Модальное окно импорта-->
|
|
|
|
|
+ <div class="modal fade" id="importModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
|
|
+ <div class="modal-dialog modal-fullscreen-sm-down">
|
|
|
|
|
+ <div class="modal-content">
|
|
|
|
|
+ <div class="modal-header">
|
|
|
|
|
+ <h1 class="modal-title fs-5" id="exampleModalLabel">Выберите файл для импорта</h1>
|
|
|
|
|
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="modal-body">
|
|
|
|
|
+ <form action="{{ route('import.create') }}" method="post" enctype="multipart/form-data">
|
|
|
|
|
+ @csrf
|
|
|
|
|
+ <input type="hidden" name="type" value="mafs">
|
|
|
|
|
+ @include('partials.input', ['title' => 'XLSX файл', 'name' => 'import_file', 'type' => 'file', 'required' => true])
|
|
|
|
|
+ @include('partials.submit', ['name' => 'Импорт'])
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Модальное окно экспорта-->
|
|
|
|
|
+ <div class="modal fade" id="exportModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
|
|
+ <div class="modal-dialog modal-fullscreen-sm-down modal-lg">
|
|
|
|
|
+ <div class="modal-content">
|
|
|
|
|
+ <div class="modal-header">
|
|
|
|
|
+ <h1 class="modal-title fs-5" id="exampleModalLabel">Экспорт</h1>
|
|
|
|
|
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="modal-body">
|
|
|
|
|
+ <form action="{{ route('mafs.export') }}" method="post" enctype="multipart/form-data">
|
|
|
|
|
+ @csrf
|
|
|
|
|
+ <div class="d-none">
|
|
|
|
|
+{{-- @if(request()->s)--}}
|
|
|
|
|
+{{-- @include('partials.input', ['name' => 'filters[s]', 'title' => 'поиск', 'value' => request()->s])--}}
|
|
|
|
|
+{{-- @endif--}}
|
|
|
|
|
+{{-- @if(request()->filters)--}}
|
|
|
|
|
+{{-- @foreach(request()->filters as $filterName => $filterValue)--}}
|
|
|
|
|
+{{-- @include('partials.input', ['name' => 'filters[' . $filterName .']', 'title' => $filterName, 'value' => $filterValue])--}}
|
|
|
|
|
+{{-- @endforeach--}}
|
|
|
|
|
+{{-- @endif--}}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @include('partials.submit', ['name' => 'Экспорт'])
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
@if($errors->count())
|
|
@if($errors->count())
|
|
|
@dump($errors)
|
|
@dump($errors)
|