This commit is contained in:
parent
39b2f21e4d
commit
464755b870
@ -99,7 +99,10 @@
|
||||
<select name="price_ptypeid" class="form-control form-control-lg">
|
||||
<option value="">{{ __('駐輪分類名') }}</option>
|
||||
@foreach($ptypes as $key => $item)
|
||||
<option value="{{ $key }}" @if($key == $price_ptypeid) selected @endif>{{ $item }}</option>
|
||||
<option value="{{ $key }}"
|
||||
@if(isset($price_ptypeid) && $key == $price_ptypeid) selected @endif>
|
||||
{{ $item }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@ -130,22 +133,24 @@
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 駐輪料金(税込) -->
|
||||
<div class="form-group row">
|
||||
<label class="col-3 col-form-label required">{{ __('駐輪料金(税込)') }}</label>
|
||||
<div class="col-9">
|
||||
<div class="col-3">
|
||||
<label class="required">{{ __('駐輪料金(税込)') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="text" value="{{ $price }}" name="price"
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{{-- 下部ボタン --}}
|
||||
@if($isEdit)
|
||||
{{-- 編集画面 --}}
|
||||
<button type="submit" class="btn btn-lg btn-success">{{ __('登録') }}</button>
|
||||
<button type="submit" class="btn btn-lg btn-success mr-2">{{ __('登録') }}</button>
|
||||
|
||||
<form method="POST" action="{{ route('prices_delete', ['id' => $price_parkplaceid]) }}" class="d-inline">
|
||||
@csrf
|
||||
@ -156,5 +161,6 @@
|
||||
{{-- 新規画面 --}}
|
||||
<button type="submit" class="btn btn-lg btn-success">{{ __('登録') }}</button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
@ -2,6 +2,7 @@
|
||||
@section('title', '[東京都|〇〇駐輪場] 駐輪場所、料金マスタ')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ▼ コンテンツヘッダー(パンくず) --}}
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
@ -22,7 +23,8 @@
|
||||
{{-- ▼ メインコンテンツ --}}
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
{{-- 並び替え用 hidden --}}
|
||||
|
||||
{{-- ▼ 並び替え用 hidden --}}
|
||||
<form action="{{ route('prices') }}" method="POST" id="list-form">
|
||||
@csrf
|
||||
<input type="hidden" name="sort" value="{{ $sort ?? '' }}">
|
||||
@ -33,19 +35,29 @@
|
||||
<div class="container-fluid mb20">
|
||||
<button type="button" class="btn btn-sm btn-default mr10"
|
||||
onclick="location.href='{{ route('price_add') }}'">新規</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_delete" name="delete" id="delete"
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-default mr10"
|
||||
form="form_delete" name="delete" id="delete"
|
||||
onclick="return confirm('選択した項目を削除しますか?');">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv"
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-default mr10"
|
||||
name="export_csv" id="export_csv"
|
||||
action="{{ route('prices_export') }}">CSV出力</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv"
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-default mr10"
|
||||
name="import_csv" id="import_csv"
|
||||
action="{{ route('prices_import') }}">インポート</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default mr10"
|
||||
onclick="location.href='{{ route('prices_export') }}'">エクスポート</button>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
{{-- ▼ ページネーション --}}
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-end mb-3">
|
||||
{{ $list->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ▼ フラッシュメッセージ --}}
|
||||
<div class="form col-lg-12">
|
||||
@ -72,24 +84,25 @@
|
||||
{{-- ▼ 一覧(市区マスタ準拠:1枚テーブル/先頭が「チェック+編集」統合列) --}}
|
||||
<form action="{{ route('prices_delete') }}" method="post" id="form_delete">
|
||||
@csrf
|
||||
|
||||
<!-- ▼ ここから単一テーブル構成 ----------------------------------------- -->
|
||||
<div class="col-lg-12 mb20">
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('prices_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集 用の1列 --}}
|
||||
<th style="width:140px;" class="text-left">
|
||||
<th style="width:140px; border-left:1px solid #dcdcdc;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
|
||||
{{-- ▼ ソート対象列 --}}
|
||||
<th class="sorting {{ ($sort=='price_parkplaceid') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="price_parkplaceid">
|
||||
<th class="sorting {{ ($sort=='price_parkplaceid') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="price_parkplaceid">
|
||||
<span>駐輪場所ID</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='park_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="park_id">
|
||||
<th class="sorting {{ ($sort=='park_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="park_id">
|
||||
<span>駐輪場ID</span>
|
||||
</th>
|
||||
|
||||
@ -100,13 +113,16 @@
|
||||
<th><span>駐輪料金(税込)</span></th>
|
||||
|
||||
{{-- ▼ ソート対象列 --}}
|
||||
<th class="sorting {{ ($sort=='psection_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="psection_id">
|
||||
<th class="sorting {{ ($sort=='psection_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="psection_id">
|
||||
<span>車種区分ID</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='price_ptypeid') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="price_ptypeid">
|
||||
<th class="sorting {{ ($sort=='price_ptypeid') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="price_ptypeid">
|
||||
<span>駐輪分類</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='pplace_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="pplace_id">
|
||||
<th class="sorting {{ ($sort=='pplace_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="pplace_id">
|
||||
<span>駐車車室ID</span>
|
||||
</th>
|
||||
</tr>
|
||||
@ -116,10 +132,11 @@
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
{{-- ★ 同じセル内に チェック + 編集ボタン --}}
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<td class="align-middle" style="background-color:#faebd7; border-left:1px solid #dcdcdc;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->price_parkplaceid }}">
|
||||
<a href="{{ route('price_edit', ['id' => $item->price_parkplaceid]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
<a href="{{ route('price_edit', ['id' => $item->price_parkplaceid]) }}"
|
||||
class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -137,13 +154,11 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ▲ 単一テーブル構成ここまで ----------------------------------------- -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user