krgm.so-manager-dev.com/resources/views/admin/personal/edit.blade.php
你的名字 4137794126
All checks were successful
Deploy main / deploy (push) Successful in 22s
【本人確認手動処理】本人確認チェックOK/本人確認チェックNG ボダン実装
2025-09-29 15:47:02 +09:00

215 lines
9.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('title', '本人確認手動処理 編集')
@section('content')
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-lg-6">
<h1 class="m-0 text-dark">編集</h1>
</div>
<div class="col-lg-6">
<ol class="breadcrumb float-sm-right text-sm">
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
<li class="breadcrumb-item"><a href="{{ route('personal') }}">本人確認手動処理</a></li>
<li class="breadcrumb-item active">編集</li>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="container-fluid">
<form method="POST" action="{{ route('personal_edit', ['seq' => $user->user_seq]) }}" enctype="multipart/form-data">
@csrf
<div class="card mb-3">
<div class="card-body pb-2">
{{-- 上段本人確認写真1本人確認写真2 --}}
<div class="row align-items-start mb-3">
<div class="col-md-6 text-center mb-3 mb-md-0">
<div class="label-head">本人確認写真ファイル名1</div>
<div class="photo-box mx-auto">
@if($user->photo_filename1)
<img src="{{ asset('storage/photo/'.$user->photo_filename1) }}" alt="" class="img-fluid h-100 w-auto">
@endif
</div>
</div>
<div class="col-md-6 text-center">
<div class="label-head">本人確認写真ファイル名2</div>
<div class="photo-box mx-auto">
@if($user->photo_filename2)
<img src="{{ asset('storage/photo/'.$user->photo_filename2) }}" alt="" class="img-fluid h-100 w-auto">
@endif
</div>
</div>
</div>
{{-- 利用者ID利用者分類ID --}}
<div class="row align-items-start mb-3">
{{-- 利用者ID --}}
<div class="col-md-4 text-center mb-3 mb-md-0">
<div class="label-head">利用者ID</div>
<div class="id-board d-flex flex-column justify-content-center align-items-center">
<div class="id-caption">利用者ID</div>
<div class="id-value">{{ $user->user_id }}</div>
</div>
</div>
{{-- 利用者分類ID --}}
<div class="col-md-8">
<div class="label-head mb-1">利用者分類ID</div>
<div class="category-wrap">
@foreach($usertypes as $type)
<label class="cat-item">
<input type="radio"
name="user_categoryid"
value="{{ $type->user_categoryid }}"
{{ (string)$user->user_categoryid === (string)$type->user_categoryid ? 'checked' : '' }}>
{{ $type->usertype_subject1 }}
@if($type->usertype_subject2)/{{ $type->usertype_subject2 }}@endif
@if($type->usertype_subject3)/{{ $type->usertype_subject3 }}@endif
</label>
@endforeach
</div>
</div>
</div>
{{-- 情報テーブル:見た目を目標画像に寄せる(左セル薄ベージュ、罫線、行間) --}}
<div class="table-responsive mb-2">
<table class="table table-bordered table-sm info-table">
<tbody>
<tr>
<th>利用者名</th><td class="w-25">{{ $user->user_name }}</td>
<th>フリガナ</th><td class="w-25">{{ $user->user_phonetic }}</td>
<th>携帯電話番号</th><td class="w-25">{{ $user->user_mobile }}</td>
</tr>
<tr>
<th>自宅電話番号</th><td>{{ $user->user_homephone }}</td>
<th>生年月日</th><td>{{ $user->user_birthdate }}</td>
<th>メールアドレス</th><td>{{ $user->user_primemail }}</td>
</tr>
<tr>
<th>契約予定駐輪場名</th>
<td colspan="5">{{ $user->user_park_number }}</td>
</tr>
{{-- 居住所 --}}
<tr>
<th rowspan="2" class="align-middle">居住所</th>
<th class="sub">郵便番号</th><td><input type="text" name="user_regident_zip" value="{{ $user->user_regident_zip }}" class="form-control form-control-sm"></td>
<th class="sub">都道府県</th><td><input type="text" name="user_regident_pre" value="{{ $user->user_regident_pre }}" class="form-control form-control-sm"></td>
<td></td>
</tr>
<tr>
<th class="sub">市区群</th><td><input type="text" name="user_regident_city" value="{{ $user->user_regident_city }}" class="form-control form-control-sm"></td>
<th class="sub">住所</th><td colspan="2"><input type="text" name="user_regident_add" value="{{ $user->user_regident_add }}" class="form-control form-control-sm"></td>
</tr>
{{-- 関連住所 --}}
<tr>
<th rowspan="2" class="align-middle">関連住所</th>
<th class="sub">郵便番号</th><td><input type="text" name="user_relate_zip" value="{{ $user->user_relate_zip }}" class="form-control form-control-sm"></td>
<th class="sub">都道府県</th><td><input type="text" name="user_relate_pre" value="{{ $user->user_relate_pre }}" class="form-control form-control-sm"></td>
<td></td>
</tr>
<tr>
<th class="sub">市区群</th><td><input type="text" name="user_relate_city" value="{{ $user->user_relate_city }}" class="form-control form-control-sm"></td>
<th class="sub">住所</th><td colspan="2"><input type="text" name="user_relate_add" value="{{ $user->user_relate_add }}" class="form-control form-control-sm"></td>
</tr>
<tr>
<th>学校</th><td>{{ $user->user_school }}</td>
<th>卒業予定</th><td>{{ $user->user_graduate }}</td>
<th>区民</th><td>{{ $user->ward_residents }}</td>
</tr>
<tr>
<th>備考</th>
<td colspan="5"><textarea name="user_remarks" class="form-control form-control-sm" rows="3">{{ $user->user_remarks }}</textarea></td>
</tr>
<tr>
<th>本人確認書類</th>
<td colspan="5"><input type="text" name="user_idcard" value="{{ $user->user_idcard }}" class="form-control form-control-sm"></td>
</tr>
</tbody>
</table>
</div>
{{-- 注意文&アクション --}}
<div class="mb-3">
本人確認書類写真と登録情報を比較して問題なければ、「本人確認チェックOK」ボタンを押下してください。<br>
問題がある場合は「備考」にNG理由を記載のうえ、「本人確認チェックNG」ボタンを押下してください。
</div>
<div class="row">
<div class="col-md-6 mb-2 mb-md-0">
<button type="submit" name="check" value="ok" class="btn btn-success btn-block register" onclick="setCheckValue('ok')">
本人確認チェックOK
</button>
</div>
<div class="col-md-6">
<button type="submit" name="check" value="ng" class="btn btn-danger btn-block register" onclick="setCheckValue('ng')">
本人確認チェックNG
</button>
</div>
</div>
{{-- 隐藏字段备份check值 --}}
{{-- check値のバックアップ用隠しフィールド --}}
<input type="hidden" name="check_backup" id="checkBackup" value="">
</div>
</div>
</form>
</div>
</section>
{{-- check値が隠しフィールドに保存されることを確保 --}}
<script>
// ボタンクリック時にcheck値を隠しフィールドに保存
function setCheckValue(value) {
document.getElementById('checkBackup').value = value;
console.log('Check value set to backup:', value);
}
</script>
{{-- 専用スタイル(目標画像の見た目に寄せる) --}}
<style>
.label-head{font-weight:600; margin-bottom:.25rem;}
.photo-box{width:220px;height:160px;border:1px solid #ddd;background:#fff;overflow:hidden}
.id-board{width:100%;height:160px;border:1px solid #ddd;background:#f1f3f5}
.id-caption{font-size:.9rem;color:#6c757d;margin-bottom:.25rem}
.id-value{font-size:1.25rem;font-weight:700;letter-spacing:.5px}
/* 利用者分類IDを2段組みで縦に長いときも見やすく */
.category-wrap{
max-height: 260px;
overflow:auto;
padding:.5rem .75rem;
border:1px solid #e5e5e5;
background:#fff;
column-count:2;
column-gap: 2rem;
}
@media (max-width: 768px){ .category-wrap{column-count:1;} }
.cat-item{break-inside: avoid; display:block; margin:.25rem 0; white-space:nowrap;}
.cat-item input{margin-right:.35rem;}
/* テーブル見た目を目標画像に合わせる */
.info-table th{
background:#fbf4e8; /* 薄いベージュ */
width: 12rem;
white-space: nowrap;
}
.info-table th.sub{background:#fffaf2;color:#555;font-weight:500;width:8rem;}
.info-table td{background:#fff;}
/* 郵便番号入力フィールドの幅調整 */
input[name="user_regident_zip"], input[name="user_relate_zip"] { width: 120px !important; }
</style>
@endsection