This commit is contained in:
parent
d1ddb474d8
commit
c171a26f42
@ -38,12 +38,18 @@ class ReservationController extends Controller
|
|||||||
'p.park_name',
|
'p.park_name',
|
||||||
'r.price_parkplaceid',
|
'r.price_parkplaceid',
|
||||||
'r.psection_id',
|
'r.psection_id',
|
||||||
|
DB::raw('ps.psection_subject as vehicle_type'),
|
||||||
|
DB::raw('ut.usertype_subject1 as user_category1'),
|
||||||
|
DB::raw('ut.usertype_subject2 as user_category2'),
|
||||||
|
DB::raw('ut.usertype_subject3 as user_category3'),
|
||||||
'r.reserve_date',
|
'r.reserve_date',
|
||||||
'r.reserve_reduction as reduction',
|
'r.reserve_reduction as reduction',
|
||||||
'r.800m_flag as within_800m_flag',
|
DB::raw('r.`800m_flag` as within_800m_flag'),
|
||||||
])
|
])
|
||||||
->leftJoin('user as u', 'r.user_id', '=', 'u.user_id')
|
->leftJoin('user as u', 'r.user_id', '=', 'u.user_id')
|
||||||
->leftJoin('park as p', 'r.park_id', '=', 'p.park_id'); // 追加
|
->leftJoin('park as p', 'r.park_id', '=', 'p.park_id')
|
||||||
|
->leftJoin('psection as ps','r.psection_id','=','ps.psection_id')
|
||||||
|
->leftJoin('usertype as ut','u.user_categoryid','=','ut.user_categoryid');
|
||||||
|
|
||||||
// フィルター条件
|
// フィルター条件
|
||||||
if ($request->filled('park_id')) {
|
if ($request->filled('park_id')) {
|
||||||
@ -52,8 +58,13 @@ class ReservationController extends Controller
|
|||||||
if ($request->filled('user_id')) {
|
if ($request->filled('user_id')) {
|
||||||
$q->where('r.user_id', $request->input('user_id'));
|
$q->where('r.user_id', $request->input('user_id'));
|
||||||
}
|
}
|
||||||
if ($request->filled('user_categoryid')) {
|
// 利用者分類(契約者一覧に合わせ、分類名1の完全一致を優先)
|
||||||
$q->where('r.user_categoryid', $request->input('user_categoryid'));
|
if ($request->filled('user_category1')) {
|
||||||
|
$val = trim(mb_convert_kana($request->input('user_category1'), 'asKV'));
|
||||||
|
$q->where('ut.usertype_subject1', $val);
|
||||||
|
} elseif ($request->filled('user_categoryid')) {
|
||||||
|
// 既存互換:ID指定も残す
|
||||||
|
$q->where('u.user_categoryid', $request->input('user_categoryid'));
|
||||||
}
|
}
|
||||||
if ($request->filled('user_tag_serial')) {
|
if ($request->filled('user_tag_serial')) {
|
||||||
$q->where('u.user_tag_serial', 'like', '%' . $request->input('user_tag_serial') . '%');
|
$q->where('u.user_tag_serial', 'like', '%' . $request->input('user_tag_serial') . '%');
|
||||||
@ -71,7 +82,11 @@ class ReservationController extends Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ($request->filled('user_primemail')) {
|
if ($request->filled('user_primemail')) {
|
||||||
$q->where('u.user_primemail', 'like', '%' . $request->input('user_primemail') . '%');
|
$like = '%' . $request->input('user_primemail') . '%';
|
||||||
|
$q->where(function($w) use ($like){
|
||||||
|
$w->where('u.user_primemail','like',$like)
|
||||||
|
->orWhere('u.user_submail','like',$like);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if ($request->filled('user_workplace')) {
|
if ($request->filled('user_workplace')) {
|
||||||
$q->where('u.user_workplace', 'like', '%' . $request->input('user_workplace') . '%');
|
$q->where('u.user_workplace', 'like', '%' . $request->input('user_workplace') . '%');
|
||||||
@ -80,19 +95,26 @@ class ReservationController extends Controller
|
|||||||
$q->where('u.user_school', 'like', '%' . $request->input('user_school') . '%');
|
$q->where('u.user_school', 'like', '%' . $request->input('user_school') . '%');
|
||||||
}
|
}
|
||||||
|
|
||||||
// ソート
|
// ソート(契約者一覧に合わせて許可する列を拡張)
|
||||||
$sort = $request->input('sort', 'r.reserve_id');
|
$sort = $request->input('sort', 'reserve_id');
|
||||||
$sortType = $request->input('sort_type', 'desc');
|
$sortType = $request->input('sort_type', 'asc');
|
||||||
$allowSorts = ['r.reserve_id', 'r.reserve_date', 'r.reserve_start', 'r.reserve_end'];
|
$allow = [
|
||||||
if (!in_array($sort, $allowSorts)) {
|
'reserve_id' => 'r.reserve_id',
|
||||||
$sort = 'r.reserve_id';
|
'user_id' => 'r.user_id',
|
||||||
}
|
'user_name' => 'u.user_name',
|
||||||
$sortType = ($sortType === 'asc') ? 'asc' : 'desc';
|
'park_id' => 'r.park_id',
|
||||||
|
'price_parkplaceid' => 'r.price_parkplaceid',
|
||||||
|
'psection_id' => 'r.psection_id',
|
||||||
|
'reserve_date' => 'r.reserve_date',
|
||||||
|
];
|
||||||
|
if (!isset($allow[$sort])) $sort = 'reserve_id';
|
||||||
|
$sortType = $sortType === 'desc' ? 'desc' : 'asc';
|
||||||
|
|
||||||
$rows = $q->orderBy($sort, $sortType)->paginate(20)->withQueryString();
|
$rows = $q->orderBy($allow[$sort], $sortType)
|
||||||
|
->paginate(20)->withQueryString();
|
||||||
|
|
||||||
// 駐輪場リスト取得(必要なら)
|
// 駐輪場リスト取得(必要なら)
|
||||||
$parks = DB::table('park')->select('park_id', 'park_name')->get();
|
$parks = DB::table('park')->select('park_id', 'park_name')->orderBy('park_name')->get();
|
||||||
|
|
||||||
return view('admin.reservation.list', compact('rows', 'sort', 'sortType', 'parks'));
|
return view('admin.reservation.list', compact('rows', 'sort', 'sortType', 'parks'));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,32 +14,26 @@ class UpdateCandidateController extends Controller
|
|||||||
public function list(Request $request)
|
public function list(Request $request)
|
||||||
{
|
{
|
||||||
$q = DB::table('regular_contract as rc')
|
$q = DB::table('regular_contract as rc')
|
||||||
|
->leftJoin('user as u','rc.user_id','=','u.user_id')
|
||||||
|
->leftJoin('park as p','rc.park_id','=','p.park_id')
|
||||||
|
->leftJoin('psection as ps','rc.psection_id','=','ps.psection_id')
|
||||||
|
->leftJoin('usertype as ut','u.user_categoryid','=','ut.user_categoryid')
|
||||||
->select([
|
->select([
|
||||||
'rc.contract_id',
|
'rc.contract_id',
|
||||||
'rc.contract_qr_id',
|
|
||||||
'rc.user_id',
|
'rc.user_id',
|
||||||
'rc.user_categoryid',
|
|
||||||
'rc.park_id',
|
'rc.park_id',
|
||||||
'rc.contract_created_at',
|
'rc.contract_created_at',
|
||||||
'rc.contract_periods',
|
'rc.contract_periods',
|
||||||
'rc.contract_periode',
|
'rc.contract_periode',
|
||||||
'rc.tag_qr_flag',
|
'rc.tag_qr_flag',
|
||||||
'rc.contract_flag',
|
|
||||||
'rc.contract_cancel_flag',
|
'rc.contract_cancel_flag',
|
||||||
'rc.contract_payment_day',
|
|
||||||
'rc.contract_money',
|
|
||||||
'rc.billing_amount',
|
|
||||||
'rc.contract_permission',
|
'rc.contract_permission',
|
||||||
'rc.contract_manual',
|
|
||||||
'rc.contract_notice',
|
|
||||||
'p.park_name',
|
|
||||||
'u.user_name',
|
'u.user_name',
|
||||||
'u.user_phonetic',
|
'u.user_phonetic',
|
||||||
'u.user_mobile',
|
'u.user_mobile',
|
||||||
'u.user_homephone',
|
'u.user_homephone',
|
||||||
'u.user_primemail',
|
|
||||||
'u.user_gender',
|
|
||||||
'u.user_birthdate',
|
'u.user_birthdate',
|
||||||
|
'u.user_gender',
|
||||||
'u.user_regident_zip',
|
'u.user_regident_zip',
|
||||||
'u.user_regident_pre',
|
'u.user_regident_pre',
|
||||||
'u.user_regident_city',
|
'u.user_regident_city',
|
||||||
@ -48,57 +42,116 @@ class UpdateCandidateController extends Controller
|
|||||||
'u.user_relate_pre',
|
'u.user_relate_pre',
|
||||||
'u.user_relate_city',
|
'u.user_relate_city',
|
||||||
'u.user_relate_add',
|
'u.user_relate_add',
|
||||||
'u.user_graduate',
|
|
||||||
'u.user_workplace',
|
'u.user_workplace',
|
||||||
'u.user_school',
|
'u.user_school',
|
||||||
|
'u.user_graduate',
|
||||||
|
'u.user_reduction',
|
||||||
'u.user_remarks',
|
'u.user_remarks',
|
||||||
|
'p.park_name',
|
||||||
|
DB::raw('ps.psection_subject as vehicle_type'),
|
||||||
|
DB::raw('ut.usertype_subject1 as user_category1'),
|
||||||
|
DB::raw('ut.usertype_subject2 as user_category2'),
|
||||||
|
DB::raw('ut.usertype_subject3 as user_category3'),
|
||||||
|
DB::raw('rc.contract_seal_issue as seal_issue_count'),
|
||||||
|
DB::raw('rc.user_securitynum as crime_prevention'),
|
||||||
|
DB::raw("CASE rc.enable_months
|
||||||
|
WHEN 1 THEN '月極(1ヶ月)'
|
||||||
|
WHEN 3 THEN '3ヶ月'
|
||||||
|
WHEN 6 THEN '6ヶ月'
|
||||||
|
WHEN 12 THEN '年'
|
||||||
|
ELSE CONCAT(rc.enable_months,'ヶ月') END as ticket_type"),
|
||||||
])
|
])
|
||||||
->leftJoin('park as p', 'rc.park_id', '=', 'p.park_id')
|
->where('rc.contract_cancel_flag',0)
|
||||||
->leftJoin('user as u', 'rc.user_id', '=', 'u.user_id')
|
->where('rc.contract_permission',1)
|
||||||
->whereNull('rc.update_flag'); // 未更新のみ
|
// 追加: 本日以降が有効期限のレコードのみ
|
||||||
|
->whereDate('rc.contract_periode','>=', now()->toDateString());
|
||||||
|
|
||||||
// 対象月による有効期限の絞り込み
|
// 絞り込み
|
||||||
if ($request->filled('target_month')) {
|
if ($request->filled('park_id')) {
|
||||||
$now = now();
|
$q->where('rc.park_id', $request->park_id);
|
||||||
switch ($request->input('target_month')) {
|
}
|
||||||
case 'last':
|
if ($request->filled('user_id')) {
|
||||||
$start = $now->copy()->subMonth()->startOfMonth();
|
$q->where('rc.user_id', trim($request->user_id));
|
||||||
$end = $now->copy()->subMonth()->endOfMonth();
|
}
|
||||||
break;
|
// 分類名1 完全一致
|
||||||
case 'this':
|
if ($request->filled('user_category1')) {
|
||||||
$start = $now->copy()->startOfMonth();
|
$val = trim(mb_convert_kana($request->user_category1,'asKV'));
|
||||||
$end = $now->copy()->endOfMonth();
|
$q->where('ut.usertype_subject1', $val);
|
||||||
break;
|
}
|
||||||
case 'next':
|
// タグシリアル64進 部分一致 (SELECT 不要)
|
||||||
$start = $now->copy()->addMonth()->startOfMonth();
|
if ($request->filled('user_tag_serial_64')) {
|
||||||
$end = $now->copy()->addMonth()->endOfMonth();
|
$q->where('u.user_tag_serial_64','like','%'.$request->user_tag_serial_64.'%');
|
||||||
break;
|
}
|
||||||
case 'after2':
|
// 有効期限:指定日以前
|
||||||
$start = $now->copy()->addMonths(2)->startOfMonth();
|
if ($request->filled('contract_periode')) {
|
||||||
$end = $now->copy()->addMonths(2)->endOfMonth();
|
$raw = str_replace('/','-',$request->contract_periode);
|
||||||
break;
|
try {
|
||||||
default:
|
$target = \Carbon\Carbon::parse($raw)->format('Y-m-d');
|
||||||
$start = null;
|
$q->whereDate('rc.contract_periode','<=',$target);
|
||||||
$end = null;
|
} catch (\Exception $e) {}
|
||||||
}
|
}
|
||||||
if ($start && $end) {
|
if ($request->filled('user_phonetic')) {
|
||||||
$q->whereBetween('rc.contract_periode', [$start->toDateString(), $end->toDateString()]);
|
$q->where('u.user_phonetic','like','%'.$request->user_phonetic.'%');
|
||||||
|
}
|
||||||
|
if ($request->filled('user_mobile')) {
|
||||||
|
$like = '%'.$request->user_mobile.'%';
|
||||||
|
$q->where(function($w) use ($like){
|
||||||
|
$w->where('u.user_mobile','like',$like)
|
||||||
|
->orWhere('u.user_homephone','like',$like);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if ($request->filled('user_primemail')) {
|
||||||
|
$like = '%'.$request->user_primemail.'%';
|
||||||
|
$q->where(function($w) use ($like){
|
||||||
|
$w->where('u.user_primemail','like',$like)
|
||||||
|
->orWhere('u.user_submail','like',$like);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if ($request->filled('user_workplace')) {
|
||||||
|
$q->where('u.user_workplace','like','%'.$request->user_workplace.'%');
|
||||||
|
}
|
||||||
|
if ($request->filled('user_school')) {
|
||||||
|
$q->where('u.user_school','like','%'.$request->user_school.'%');
|
||||||
|
}
|
||||||
|
if ($request->filled('tag_qr_flag') && $request->tag_qr_flag!=='') {
|
||||||
|
$q->where('rc.tag_qr_flag',$request->tag_qr_flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 対象月
|
||||||
|
$target = $request->input('target_month');
|
||||||
|
if (in_array($target,['last','this','next','after2'],true)) {
|
||||||
|
$base = now()->startOfMonth();
|
||||||
|
$offset = ['last'=>-1,'this'=>0,'next'=>1,'after2'=>2][$target];
|
||||||
|
$m = $base->copy()->addMonths($offset);
|
||||||
|
if ($target === 'after2') {
|
||||||
|
// 2か月後「以降」を抽出(該当月の月初以降)
|
||||||
|
$q->whereDate('rc.contract_periode', '>=', $m->toDateString());
|
||||||
|
} else {
|
||||||
|
$q->whereYear('rc.contract_periode',$m->year)
|
||||||
|
->whereMonth('rc.contract_periode',$m->month);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sort = $request->input('sort', 'rc.contract_id');
|
// ソート(regular_contract の表示順に合わせて contract_id の降順を既定に)
|
||||||
$sortType = $request->input('sort_type', 'desc');
|
$sort = $request->input('sort','contract_id');
|
||||||
$allowSorts = ['rc.contract_id'];
|
$sortType = $request->input('sort_type','dac');
|
||||||
if (!in_array($sort, $allowSorts)) {
|
$allow = [
|
||||||
$sort = 'rc.contract_id';
|
'contract_id' => 'rc.contract_id',
|
||||||
}
|
'user_id' => 'rc.user_id',
|
||||||
$sortType = ($sortType === 'asc') ? 'asc' : 'desc';
|
'contract_periode' => 'rc.contract_periode',
|
||||||
|
];
|
||||||
|
if (!isset($allow[$sort])) $sort = 'contract_id';
|
||||||
|
$sortType = $sortType==='desc' ? 'desc' : 'asc';
|
||||||
|
$q->orderBy($allow[$sort], $sortType);
|
||||||
|
|
||||||
$rows = $q->orderBy($sort, $sortType)->paginate(20)->withQueryString();
|
$rows = $q->paginate(20)->appends($request->query());
|
||||||
|
|
||||||
// 駐輪場リスト(プルダウン用)
|
$parks = DB::table('park')
|
||||||
$parks = DB::table('park')->select('park_id', 'park_name')->orderBy('park_name')->get();
|
->select('park_id','park_name')
|
||||||
|
->orderBy('park_name')
|
||||||
|
->get();
|
||||||
|
|
||||||
return view('admin.update_candidate.list', compact('rows', 'sort', 'sortType', 'parks'));
|
return view('admin.update_candidate.list',
|
||||||
|
compact('rows','parks'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
@else
|
@else
|
||||||
<input type="text" name="park_name" value="{{ request('park_name') }}" class="form-control" placeholder="全て">
|
<input type="text" name="park_name" value="{{ request('park_name') }}" class="form-control" >
|
||||||
@endisset
|
@endisset
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -50,28 +50,32 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">利用者ID</label>
|
<label class="col-sm-3 col-form-label">利用者ID</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_id" value="{{ request('user_id') }}" class="form-control" placeholder="123456">
|
<input type="text" name="user_id" value="{{ request('user_id') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">利用者分類</label>
|
<label class="col-sm-3 col-form-label">利用者分類</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_categoryid" value="{{ request('user_categoryid') }}" class="form-control" placeholder="全て">
|
<input type="text" name="user_category1" value="{{ request('user_category1') }}" class="form-control" placeholder="分類名1">
|
||||||
|
{{-- 既存互換: IDパラメータが残る可能性があるため hidden で保持 --}}
|
||||||
|
@if(request()->filled('user_categoryid'))
|
||||||
|
<input type="hidden" name="user_categoryid" value="{{ request('user_categoryid') }}">
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">タグシリアル</label>
|
<label class="col-sm-3 col-form-label">タグシリアル</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_tag_serial" value="{{ request('user_tag_serial') }}" class="form-control" placeholder="キーワード…">
|
<input type="text" name="user_tag_serial" value="{{ request('user_tag_serial') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">タグシリアル64進</label>
|
<label class="col-sm-3 col-form-label">タグシリアル64進</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_tag_serial_64" value="{{ request('user_tag_serial_64') }}" class="form-control" placeholder="キーワード…">
|
<input type="text" name="user_tag_serial_64" value="{{ request('user_tag_serial_64') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -81,35 +85,35 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">フリガナ</label>
|
<label class="col-sm-3 col-form-label">フリガナ</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_phonetic" value="{{ request('user_phonetic') }}" class="form-control" placeholder="123456">
|
<input type="text" name="user_phonetic" value="{{ request('user_phonetic') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">電話番号</label>
|
<label class="col-sm-3 col-form-label">電話番号</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_mobile" value="{{ request('user_mobile') }}" class="form-control" placeholder="123456">
|
<input type="text" name="user_mobile" value="{{ request('user_mobile') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">メールアドレス</label>
|
<label class="col-sm-3 col-form-label">メールアドレス</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_primemail" value="{{ request('user_primemail') }}" class="form-control" placeholder="キーワード…">
|
<input type="text" name="user_primemail" value="{{ request('user_primemail') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">勤務先</label>
|
<label class="col-sm-3 col-form-label">勤務先</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_workplace" value="{{ request('user_workplace') }}" class="form-control" placeholder="キーワード…">
|
<input type="text" name="user_workplace" value="{{ request('user_workplace') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">学校</label>
|
<label class="col-sm-3 col-form-label">学校</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_school" value="{{ request('user_school') }}" class="form-control" placeholder="キーワード…">
|
<input type="text" name="user_school" value="{{ request('user_school') }}" class="form-control" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -122,13 +126,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{-- 一覧テーブル(そのまま) --}}
|
{{-- 一覧テーブル(ソート機能付きヘッダー) --}}
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered table-hover table-sm rv-table text-nowrap">
|
<table class="table table-bordered table-hover table-sm rv-table text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>利用者ID</th>
|
{{-- ソート可能な項目にはリンクを追加 --}}
|
||||||
<th>氏名</th>
|
<th>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'user_id', 'sort_type' => request('sort') === 'user_id' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
|
||||||
|
利用者ID
|
||||||
|
@if(request('sort') === 'user_id' && request('sort_type') === 'asc')
|
||||||
|
↑<span class="text-muted">↓</span>
|
||||||
|
@elseif(request('sort') === 'user_id' && request('sort_type') === 'desc')
|
||||||
|
<span class="text-muted">↑</span>↓
|
||||||
|
@else
|
||||||
|
<span class="text-muted">↑↓</span>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'user_name', 'sort_type' => request('sort') === 'user_name' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
|
||||||
|
氏名
|
||||||
|
@if(request('sort') === 'user_name' && request('sort_type') === 'asc')
|
||||||
|
↑<span class="text-muted">↓</span>
|
||||||
|
@elseif(request('sort') === 'user_name' && request('sort_type') === 'desc')
|
||||||
|
<span class="text-muted">↑</span>↓
|
||||||
|
@else
|
||||||
|
<span class="text-muted">↑↓</span>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
<th>フリガナ</th>
|
<th>フリガナ</th>
|
||||||
<th>居住所:郵便番号</th>
|
<th>居住所:郵便番号</th>
|
||||||
<th>居住所:都道府県</th>
|
<th>居住所:都道府県</th>
|
||||||
@ -149,13 +176,45 @@
|
|||||||
<th>利用者分類1</th>
|
<th>利用者分類1</th>
|
||||||
<th>利用者分類2</th>
|
<th>利用者分類2</th>
|
||||||
<th>利用者分類3</th>
|
<th>利用者分類3</th>
|
||||||
<th>駐輪場ID</th>
|
<th>
|
||||||
<th>駐輪場名</th> <!-- 追加 -->
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'park_id', 'sort_type' => request('sort') === 'park_id' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
|
||||||
<th>駐輪場所ID</th>
|
駐輪場ID
|
||||||
<th>車種区分ID</th>
|
@if(request('sort') === 'park_id' && request('sort_type') === 'asc')
|
||||||
|
↑<span class="text-muted">↓</span>
|
||||||
|
@elseif(request('sort') === 'park_id' && request('sort_type') === 'desc')
|
||||||
|
<span class="text-muted">↑</span>↓
|
||||||
|
@else
|
||||||
|
<span class="text-muted">↑↓</span>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'price_parkplaceid', 'sort_type' => request('sort') === 'price_parkplaceid' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
|
||||||
|
駐輪場所ID
|
||||||
|
@if(request('sort') === 'price_parkplaceid' && request('sort_type') === 'asc')
|
||||||
|
↑<span class="text-muted">↓</span>
|
||||||
|
@elseif(request('sort') === 'price_parkplaceid' && request('sort_type') === 'desc')
|
||||||
|
<span class="text-muted">↑</span>↓
|
||||||
|
@else
|
||||||
|
<span class="text-muted">↑↓</span>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'psection_id', 'sort_type' => request('sort') === 'psection_id' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
|
||||||
|
車種区分ID
|
||||||
|
@if(request('sort') === 'psection_id' && request('sort_type') === 'asc')
|
||||||
|
↑<span class="text-muted">↓</span>
|
||||||
|
@elseif(request('sort') === 'psection_id' && request('sort_type') === 'desc')
|
||||||
|
<span class="text-muted">↑</span>↓
|
||||||
|
@else
|
||||||
|
<span class="text-muted">↑↓</span>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
<th>予約日時</th>
|
<th>予約日時</th>
|
||||||
<th>減免措置</th>
|
<th>減免措置</th>
|
||||||
<th>800M以内フラグ</th>
|
<th>800M以内フラグ</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -179,20 +238,22 @@
|
|||||||
<td>{{ $row->user_school }}</td>
|
<td>{{ $row->user_school }}</td>
|
||||||
<td>{{ $row->user_graduate }}</td>
|
<td>{{ $row->user_graduate }}</td>
|
||||||
<td>{{ $row->user_remarks }}</td>
|
<td>{{ $row->user_remarks }}</td>
|
||||||
<td>{{ data_get($row,'reserve_id', data_get($row,'contract_id','')) }}</td>
|
<td>{{ $row->reserve_id }}</td>
|
||||||
|
<td>{{ $row->user_category1 ?? '' }}</td>
|
||||||
|
<td>{{ $row->user_category2 ?? '' }}</td>
|
||||||
|
<td>{{ $row->user_category3 ?? '' }}</td>
|
||||||
<td>{{ $row->park_id }}</td>
|
<td>{{ $row->park_id }}</td>
|
||||||
<td>{{ $row->park_name }}</td>
|
|
||||||
<td>{{ $row->price_parkplaceid }}</td>
|
<td>{{ $row->price_parkplaceid }}</td>
|
||||||
<td>{{ $row->psection_id }}</td>
|
<td>{{ $row->psection_id }}</td>
|
||||||
<td>{{ $row->reserve_date }}</td>
|
<td>{{ $row->reserve_date }}</td>
|
||||||
<td>{{ data_get($row,'reduction', data_get($row,'reserve_reduction','')) }}</td>
|
<td>{{ $row->reduction ?? '' }}</td>
|
||||||
<td>
|
<td>
|
||||||
@php $f800 = data_get($row,'within_800m_flag', data_get($row,'flag_800m', null)); @endphp
|
@php $f800 = data_get($row,'within_800m_flag', data_get($row,'flag_800m', null)); @endphp
|
||||||
{{ (string)$f800 === '1' ? '800M以内' : '-' }}
|
{{ (string)$f800 === '1' ? '800M以内' : '-' }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="29" class="text-center">データがありません。</td></tr>
|
<tr><td colspan="28" class="text-center">データがありません。</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label">利用者分類</label>
|
<label class="col-sm-3 col-form-label">利用者分類</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="user_categoryid" value="{{ request('user_categoryid') }}" class="form-control">
|
<input type="text" name="user_category1" value="{{ request('user_category1') }}" class="form-control" placeholder="分類名1">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -79,8 +79,13 @@
|
|||||||
<label class="col-sm-3 col-form-label">対象月</label>
|
<label class="col-sm-3 col-form-label">対象月</label>
|
||||||
<div class="col-sm-9 d-flex align-items-center">
|
<div class="col-sm-9 d-flex align-items-center">
|
||||||
@php
|
@php
|
||||||
$target_month = request('target_month', 'this');
|
// 既定選択なし(送信時だけ適用)
|
||||||
|
$target_month = request('target_month');
|
||||||
@endphp
|
@endphp
|
||||||
|
<div class="form-check mr-3">
|
||||||
|
<input class="form-check-input" type="radio" name="target_month" id="none_month" value="" {{ $target_month === null || $target_month === '' ? 'checked' : '' }}>
|
||||||
|
<label class="form-check-label" for="none_month">指定なし</label>
|
||||||
|
</div>
|
||||||
<div class="form-check mr-3">
|
<div class="form-check mr-3">
|
||||||
<input class="form-check-input" type="radio" name="target_month" id="last_month" value="last" {{ $target_month === 'last' ? 'checked' : '' }}>
|
<input class="form-check-input" type="radio" name="target_month" id="last_month" value="last" {{ $target_month === 'last' ? 'checked' : '' }}>
|
||||||
<label class="form-check-label" for="last_month">先月</label>
|
<label class="form-check-label" for="last_month">先月</label>
|
||||||
@ -166,17 +171,7 @@
|
|||||||
<th>利用者ID</th>
|
<th>利用者ID</th>
|
||||||
<th>氏名</th>
|
<th>氏名</th>
|
||||||
<th>フリガナ</th>
|
<th>フリガナ</th>
|
||||||
<th>
|
<th>定期契約ID</th>
|
||||||
<a href="{{ request()->fullUrlWithQuery([
|
|
||||||
'sort' => 'contract_id',
|
|
||||||
'sort_type' => (request('sort') === 'contract_id' && request('sort_type') === 'asc') ? 'desc' : 'asc'
|
|
||||||
]) }}">
|
|
||||||
定期契約ID
|
|
||||||
@if(request('sort') === 'contract_id')
|
|
||||||
@if(request('sort_type') === 'asc') ▲ @else ▼ @endif
|
|
||||||
@endif
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th>タグ・QR</th>
|
<th>タグ・QR</th>
|
||||||
<th>駐輪場</th>
|
<th>駐輪場</th>
|
||||||
<th>車種区分</th>
|
<th>車種区分</th>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user