index.blade.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="row mb-3">
  4. <div class="col-6">
  5. <h3>МАФ</h3>
  6. </div>
  7. <div class="col-6 text-end">
  8. {{-- <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addModal">--}}
  9. {{-- Добавить--}}
  10. {{-- </button>--}}
  11. </div>
  12. </div>
  13. @include('partials.table', [
  14. 'id' => $id,
  15. 'header' => $header,
  16. 'strings' => $products_sku,
  17. 'routeName' => 'product_sku.show',
  18. ])
  19. <div class="row pt-3 px-3">
  20. <div class="col-12 pagination">
  21. {{ $products_sku->links() }}
  22. </div>
  23. </div>
  24. <!-- Модальное окно редактирования -->
  25. {{-- <div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">--}}
  26. {{-- <div class="modal-dialog modal-fullscreen-sm-down modal-lg">--}}
  27. {{-- <div class="modal-content">--}}
  28. {{-- <div class="modal-header">--}}
  29. {{-- <h1 class="modal-title fs-5" id="addModalLabel">Добавить заказ МАФ</h1>--}}
  30. {{-- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>--}}
  31. {{-- </div>--}}
  32. {{-- <div class="modal-body">--}}
  33. {{-- <form action="{{ route('product_sku.store') }}" method="post">--}}
  34. {{-- @csrf--}}
  35. {{-- <div id="select_maf_form">--}}
  36. {{-- <input type="text" class="form-control mb-2" placeholder="Поиск номенклатуры" id="search_maf">--}}
  37. {{-- <select id="select_maf" class="form-select mb-3" multiple></select>--}}
  38. {{-- </div>--}}
  39. {{-- <div style="display:none;" id="sku_form">--}}
  40. {{-- <a href="#" onclick="$('#sku_form').slideUp(); $('#select_maf_form').slideDown()">назад</a>--}}
  41. {{-- <input type="hidden" id="product_id" name="product_id" value="">--}}
  42. {{-- @include('partials.input', ['name' => 'product_name', 'title' => 'МАФ', 'disabled' => true])--}}
  43. {{-- @include('partials.input', ['name' => 'rfid', 'title' => 'RFID', 'required' => true])--}}
  44. {{-- @include('partials.input', ['name' => 'factory_number', 'title' => 'Номер фабрики', 'required' => true])--}}
  45. {{-- @include('partials.input', ['name' => 'manufacture_date', 'title' => 'Дата производства', 'type' => 'date', 'required' => true])--}}
  46. {{-- @include('partials.input', ['name' => 'service_life', 'title' => 'Срок службы', 'required' => true, 'type' => 'number'])--}}
  47. {{-- @include('partials.input', ['name' => 'certificate_number', 'title' => 'Номер сертификата', 'required' => true])--}}
  48. {{-- @include('partials.input', ['name' => 'certificate_date', 'title' => 'Дата сертификата', 'type' => 'date', 'required' => true])--}}
  49. {{-- @include('partials.input', ['name' => 'certificate_issuer', 'title' => 'Орган сертификации', 'required' => true])--}}
  50. {{-- @include('partials.input', ['name' => 'certificate_type', 'title' => 'Вид сертификации', 'required' => true])--}}
  51. {{-- @include('partials.submit', ['name' => 'Добавить'])--}}
  52. {{-- </div>--}}
  53. {{-- </form>--}}
  54. {{-- </div>--}}
  55. {{-- </div>--}}
  56. {{-- </div>--}}
  57. {{-- </div>--}}
  58. @if($errors->count())
  59. @dump($errors)
  60. @endif
  61. @endsection
  62. @push('scripts')
  63. <script type="module">
  64. $('#select_maf').on('change', function () {
  65. $('#product_id').val($(this).val());
  66. $('#product_name').val($('#select_maf option:selected').text()).slideDown();
  67. $('#select_maf_form').slideUp();
  68. $('#sku_form').slideDown();
  69. });
  70. </script>
  71. @endpush