|
@@ -3,8 +3,11 @@
|
|
|
@section('content')
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="px-3">
|
|
<div class="px-3">
|
|
|
- <div class="col-xxl-6 offset-xxl-2">
|
|
|
|
|
- <form action="{{ route('order.store') }}" method="post">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <form class="row" action="{{ route('order.store') }}" method="post">
|
|
|
|
|
+ <div class="col-xxl-6">
|
|
|
|
|
+ <h4>Общая информация об объекте</h4>
|
|
|
|
|
+
|
|
|
@csrf
|
|
@csrf
|
|
|
|
|
|
|
|
@if(isset($order))
|
|
@if(isset($order))
|
|
@@ -37,9 +40,19 @@
|
|
|
|
|
|
|
|
@include('partials.input', ['name' => 'tg_group_link', 'title' => 'Ссылка на группу в ТГ', 'value' => $order->tg_group_link ?? old('tg_group_link')])
|
|
@include('partials.input', ['name' => 'tg_group_link', 'title' => 'Ссылка на группу в ТГ', 'value' => $order->tg_group_link ?? old('tg_group_link')])
|
|
|
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-xxl-6">
|
|
|
|
|
+ <h4>МАФ</h4>
|
|
|
|
|
+
|
|
|
|
|
+ @include('partials.input', ['name' => 'search_maf', 'title' => 'Поиск МАФ', 'value' => '', 'placeholder' => 'Артикул или номер номенклатуры', 'datalist' => []])
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-12 text-end">
|
|
|
@include('partials.submit')
|
|
@include('partials.submit')
|
|
|
- </form>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@if($errors->any())
|
|
@if($errors->any())
|
|
@@ -50,11 +63,26 @@
|
|
|
|
|
|
|
|
@push('scripts')
|
|
@push('scripts')
|
|
|
<script type="module">
|
|
<script type="module">
|
|
|
|
|
+ $('#search_maf').on('keyup', function () {
|
|
|
|
|
+ // search products on backend
|
|
|
|
|
+ $.get('{{ route('product.search') }}?s=' + $(this).val(),
|
|
|
|
|
+ function (data) {
|
|
|
|
|
+ $('#dl-search_maf').children().remove();
|
|
|
|
|
+ $.each(data, function (id, name) {
|
|
|
|
|
+ $('#dl-search_maf').append('<option value=\'' + name + '\'>' + id + '</option>');
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$('#district_id').on('change', function () {
|
|
$('#district_id').on('change', function () {
|
|
|
// load areas of selected district
|
|
// load areas of selected district
|
|
|
console.log($(this).val());
|
|
console.log($(this).val());
|
|
|
|
|
|
|
|
- $.get('{{ route('area.ajax-get-areas-by-district') }}/'+$(this).val(),
|
|
|
|
|
|
|
+ $.get('{{ route('area.ajax-get-areas-by-district') }}/' + $(this).val(),
|
|
|
function (data) {
|
|
function (data) {
|
|
|
$('#area_id').children().remove();
|
|
$('#area_id').children().remove();
|
|
|
$.each(data, function (id, name) {
|
|
$.each(data, function (id, name) {
|