This commit is contained in:
parent
2fef4da2b5
commit
5c1b33cedc
@ -31,39 +31,38 @@ class ManagerController extends Controller
|
||||
return view('admin.managers.list', compact('list','sort','sort_type'));
|
||||
}
|
||||
|
||||
/** 新規(GET:画面表示 / POST:登録) */
|
||||
/** 新規登録画面・登録処理 */
|
||||
public function add(Request $request)
|
||||
{
|
||||
if ($request->isMethod('post')) {
|
||||
$data = $this->validated($request);
|
||||
$validated = $this->validated($request);
|
||||
|
||||
Manager::create($validated);
|
||||
|
||||
$manager = Manager::create($data);
|
||||
return redirect()
|
||||
->route('managers_info', ['manager_id' => $manager->manager_id])
|
||||
->route('managers')
|
||||
->with('success', '登録しました。');
|
||||
}
|
||||
|
||||
// 画面に渡す初期値
|
||||
$view = $this->viewVars();
|
||||
return view('admin.managers.add', $view);
|
||||
return view('admin.managers.add', $this->viewVars());
|
||||
}
|
||||
|
||||
/** 編集(GET:画面表示 / POST:更新) */
|
||||
public function edit(Request $request, $manager_id)
|
||||
public function edit(Request $request, $id)
|
||||
{
|
||||
$manager = Manager::findOrFail($manager_id);
|
||||
$manager = Manager::findOrFail($id);
|
||||
|
||||
if ($request->isMethod('post')) {
|
||||
$data = $this->validated($request);
|
||||
$manager->fill($data)->save();
|
||||
$validated = $this->validated($request);
|
||||
|
||||
$manager->update($validated);
|
||||
|
||||
return redirect()
|
||||
->route('managers_info', ['manager_id' => $manager->manager_id])
|
||||
->with('success', '更新しました。');
|
||||
->route('managers')
|
||||
->with('success', '更新されました。');
|
||||
}
|
||||
|
||||
$view = $this->viewVars($manager);
|
||||
return view('admin.managers.edit', $view);
|
||||
return view('admin.managers.edit', $this->viewVars($manager));
|
||||
}
|
||||
|
||||
/** 詳細(閲覧) */
|
||||
@ -78,13 +77,19 @@ class ManagerController extends Controller
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$ids = (array) $request->input('pk', []);
|
||||
if (!$ids) return back()->with('error', '削除対象が選択されていません。');
|
||||
if (!$ids) {
|
||||
return back()->with('error', '削除対象が選択されていません。');
|
||||
}
|
||||
|
||||
DB::transaction(fn() => Manager::whereIn('manager_id', $ids)->delete());
|
||||
|
||||
return back()->with('success', '削除しました。');
|
||||
// 一覧画面へリダイレクト + 成功メッセージ
|
||||
return redirect()
|
||||
->route('managers')
|
||||
->with('success', '削除しました。');
|
||||
}
|
||||
|
||||
|
||||
/** CSV出力 */
|
||||
public function export(): StreamedResponse
|
||||
{
|
||||
@ -167,22 +172,32 @@ class ManagerController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/* ======================== private helpers ======================== */
|
||||
|
||||
/** バリデーション */
|
||||
/** バリデーション + 前処理 */
|
||||
private function validated(Request $request): array
|
||||
{
|
||||
// 電話番号を全角に変換(半角入力があっても自動で全角に揃える)
|
||||
$request->merge([
|
||||
'manager_tel' => mb_convert_kana($request->input('manager_tel'), 'N') // 半角数字→全角数字
|
||||
]);
|
||||
|
||||
// select の未選択 "" を null に補正
|
||||
foreach (['manager_device2'] as $f) {
|
||||
if ($request->input($f) === "") {
|
||||
$request->merge([$f => null]);
|
||||
}
|
||||
}
|
||||
|
||||
return $request->validate([
|
||||
'manager_name' => ['required','string','max:255'],
|
||||
'manager_type' => ['nullable','string','max:255'],
|
||||
'manager_parkid' => ['nullable','integer','exists:park,park_id'], // テーブル名に合わせて
|
||||
'manager_device1' => ['nullable','integer','exists:device,device_id'],
|
||||
'manager_name' => ['required','string','max:32'],
|
||||
'manager_type' => ['required','string','max:10'],
|
||||
'manager_parkid' => ['required','integer','exists:park,park_id'],
|
||||
'manager_device1' => ['required','integer','exists:device,device_id'],
|
||||
'manager_device2' => ['nullable','integer','exists:device,device_id'],
|
||||
'manager_mail' => ['nullable','email','max:255'],
|
||||
'manager_tel' => ['nullable','string','max:255'],
|
||||
'manager_mail' => ['nullable','email','max:128'],
|
||||
'manager_tel' => ['required','regex:/^[0-9]+$/u','max:13'], // 全角数字のみ
|
||||
'manager_alert1' => ['nullable','boolean'],
|
||||
'manager_alert2' => ['nullable','boolean'],
|
||||
'manager_quit_flag' => ['nullable','boolean'],
|
||||
'manager_quit_flag' => ['required','in:0,1'],
|
||||
'manager_quitday' => ['nullable','date'],
|
||||
], [], [
|
||||
'manager_name' => '駐輪場管理者名',
|
||||
@ -199,6 +214,7 @@ class ManagerController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/** 画面に渡す変数を作る(_form.blade.php が個別変数を参照するため) */
|
||||
private function viewVars(?Manager $m = null): array
|
||||
{
|
||||
|
||||
@ -44,6 +44,7 @@ class PaymentController extends Controller
|
||||
'payment_inquiryname' => 'nullable|string|max:255',
|
||||
'payment_inquirytel' => 'nullable|string|max:255',
|
||||
'payment_time' => 'nullable|string|max:255',
|
||||
|
||||
]);
|
||||
|
||||
// 登録データ作成
|
||||
@ -52,7 +53,7 @@ class PaymentController extends Controller
|
||||
|
||||
Payment::create($data);
|
||||
|
||||
return redirect()->route('payments')->with('success', '登録しました');
|
||||
return redirect()->route('payments')->with('success', '登録しました。');
|
||||
}
|
||||
|
||||
return view('admin.payments.add', [
|
||||
@ -80,7 +81,7 @@ class PaymentController extends Controller
|
||||
|
||||
$payment->update($data);
|
||||
|
||||
return redirect()->route('payments')->with('success', '更新しました');
|
||||
return redirect()->route('payments')->with('success', '更新しました。');
|
||||
}
|
||||
|
||||
return view('admin.payments.edit', [
|
||||
@ -108,11 +109,22 @@ class PaymentController extends Controller
|
||||
*/
|
||||
public function delete(Request $request)
|
||||
{
|
||||
if ($request->has('ids')) {
|
||||
Payment::whereIn('payment_id', $request->ids)->delete();
|
||||
return redirect()->route('payments')->with('success', '削除しました');
|
||||
$pk = $request->input('pk', []);
|
||||
|
||||
// 配列に統一
|
||||
$ids = is_array($pk) ? $pk : [$pk];
|
||||
|
||||
// 数字チェック
|
||||
$ids = array_values(array_filter($ids, fn($v) => preg_match('/^\d+$/', (string) $v)));
|
||||
|
||||
if (empty($ids)) {
|
||||
return redirect()->route('payments')->with('error', '削除対象が選択されていません。');
|
||||
}
|
||||
return redirect()->route('payments')->with('error', '削除対象が選択されていません');
|
||||
|
||||
// 削除
|
||||
Payment::whereIn('payment_id', $ids)->delete();
|
||||
|
||||
return redirect()->route('payments')->with('success', '削除しました。');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -16,9 +16,14 @@ class SettlementTransactionController extends Controller
|
||||
*/
|
||||
public function list(Request $request)
|
||||
{
|
||||
// 解除ボタンが押された場合 → 一覧にリダイレクトして検索条件リセット
|
||||
if ($request->input('action') === 'unlink') {
|
||||
return redirect()->route('settlement_transactions');
|
||||
}
|
||||
|
||||
$q = SettlementTransaction::query();
|
||||
|
||||
// --- 絞り込み(必要なら増やせます)
|
||||
// --- 絞り込み
|
||||
$contractId = $request->input('contract_id');
|
||||
$status = trim((string)$request->input('status', ''));
|
||||
$from = $request->input('from'); // 支払日時 from
|
||||
@ -59,6 +64,7 @@ class SettlementTransactionController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新規
|
||||
* ルート: settlement_transactions_add
|
||||
|
||||
@ -68,7 +68,7 @@ class TaxController extends Controller
|
||||
$data['tax_percent'] = number_format((float)$data['tax_percent'], 2, '.', '');
|
||||
\App\Models\Tax::create($data);
|
||||
|
||||
return redirect()->route('tax')->with('success', '登録しました');
|
||||
return redirect()->route('tax')->with('success', '登録しました。');
|
||||
}
|
||||
|
||||
return view('admin.tax.add', [
|
||||
@ -91,7 +91,7 @@ public function edit(int $tax_id, Request $request)
|
||||
$data['tax_percent'] = number_format((float)$data['tax_percent'], 2, '.', '');
|
||||
$tax->update($data);
|
||||
|
||||
return redirect()->route('tax')->with('success', '更新しました');
|
||||
return redirect()->route('tax')->with('success', '更新しました。');
|
||||
}
|
||||
|
||||
return view('admin.tax.edit', [
|
||||
@ -119,166 +119,175 @@ public function info(int $tax_id)
|
||||
*/
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$ids = (array) $request->input('ids', []);
|
||||
|
||||
$pk = $request->input('pk', []);
|
||||
|
||||
// 配列に統一
|
||||
$ids = is_array($pk) ? $pk : [$pk];
|
||||
|
||||
// 数字チェック
|
||||
$ids = array_values(array_filter($ids, fn($v) => preg_match('/^\d+$/', (string) $v)));
|
||||
|
||||
if (empty($ids)) {
|
||||
return redirect()->route('tax')->with('error', '削除対象が選択されていません。');
|
||||
}
|
||||
|
||||
// 削除
|
||||
Tax::whereIn('tax_id', $ids)->delete();
|
||||
|
||||
return redirect()->route('tax')->with('success', '削除しました');
|
||||
return redirect()->route('tax')->with('success', '削除しました。');
|
||||
}
|
||||
|
||||
/**
|
||||
* CSVインポート
|
||||
* カラム想定: tax_percent, tax_day
|
||||
* - 1行目はヘッダ可
|
||||
* - tax_day をキーとして「存在すれば更新 / 無ければ作成」
|
||||
*/
|
||||
public function import(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'file' => ['required', 'file', 'mimetypes:text/plain,text/csv,text/tsv', 'max:2048'],
|
||||
]);
|
||||
|
||||
$path = $request->file('file')->getRealPath();
|
||||
if (!$path || !is_readable($path)) {
|
||||
return redirect()->route('tax')->with('error', 'ファイルを読み込めません。');
|
||||
}
|
||||
|
||||
$created = 0;
|
||||
$updated = 0;
|
||||
$skipped = 0;
|
||||
// /**
|
||||
// * CSVインポート
|
||||
// * カラム想定: tax_percent, tax_day
|
||||
// * - 1行目はヘッダ可
|
||||
// * - tax_day をキーとして「存在すれば更新 / 無ければ作成」
|
||||
// */
|
||||
// public function import(Request $request)
|
||||
// {
|
||||
// $request->validate([
|
||||
// 'file' => ['required', 'file', 'mimetypes:text/plain,text/csv,text/tsv', 'max:2048'],
|
||||
// ]);
|
||||
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
if (($fp = fopen($path, 'r')) !== false) {
|
||||
$line = 0;
|
||||
while (($row = fgetcsv($fp)) !== false) {
|
||||
$line++;
|
||||
// $path = $request->file('file')->getRealPath();
|
||||
// if (!$path || !is_readable($path)) {
|
||||
// return redirect()->route('tax')->with('error', 'ファイルを読み込めません。');
|
||||
// }
|
||||
|
||||
// 空行スキップ
|
||||
if (count($row) === 1 && trim((string) $row[0]) === '') {
|
||||
continue;
|
||||
}
|
||||
// $created = 0;
|
||||
// $updated = 0;
|
||||
// $skipped = 0;
|
||||
|
||||
// ヘッダ行っぽい場合(1行目に 'tax_percent' を含む)
|
||||
if ($line === 1) {
|
||||
$joined = strtolower(implode(',', $row));
|
||||
if (str_contains($joined, 'tax_percent') && str_contains($joined, 'tax_day')) {
|
||||
continue; // ヘッダスキップ
|
||||
}
|
||||
}
|
||||
// DB::beginTransaction();
|
||||
// try {
|
||||
// if (($fp = fopen($path, 'r')) !== false) {
|
||||
// $line = 0;
|
||||
// while (($row = fgetcsv($fp)) !== false) {
|
||||
// $line++;
|
||||
|
||||
// 取り出し(列数が足りない場合スキップ)
|
||||
$percent = $row[0] ?? null;
|
||||
$day = $row[1] ?? null;
|
||||
if ($percent === null || $day === null) {
|
||||
$skipped++;
|
||||
continue;
|
||||
}
|
||||
// // 空行スキップ
|
||||
// if (count($row) === 1 && trim((string) $row[0]) === '') {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// 正規化 & 検証
|
||||
$percent = trim((string) $percent);
|
||||
$percent = rtrim($percent, '%');
|
||||
$percent = preg_replace('/[^\d.]/', '', $percent) ?? '0';
|
||||
$percentF = (float) $percent;
|
||||
if ($percentF < 0) {
|
||||
$skipped++;
|
||||
continue;
|
||||
}
|
||||
$percentF = (float) number_format($percentF, 2, '.', '');
|
||||
// // ヘッダ行っぽい場合(1行目に 'tax_percent' を含む)
|
||||
// if ($line === 1) {
|
||||
// $joined = strtolower(implode(',', $row));
|
||||
// if (str_contains($joined, 'tax_percent') && str_contains($joined, 'tax_day')) {
|
||||
// continue; // ヘッダスキップ
|
||||
// }
|
||||
// }
|
||||
|
||||
$day = date('Y-m-d', strtotime((string) $day));
|
||||
if (!$day) {
|
||||
$skipped++;
|
||||
continue;
|
||||
}
|
||||
// // 取り出し(列数が足りない場合スキップ)
|
||||
// $percent = $row[0] ?? null;
|
||||
// $day = $row[1] ?? null;
|
||||
// if ($percent === null || $day === null) {
|
||||
// $skipped++;
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// upsert: 適用日ユニーク運用
|
||||
$existing = Tax::whereDate('tax_day', $day)->first();
|
||||
$payload = [
|
||||
'tax_percent' => $percentF,
|
||||
'tax_day' => $day,
|
||||
'operator_id' => optional(Auth::user())->ope_id ?? null,
|
||||
];
|
||||
// // 正規化 & 検証
|
||||
// $percent = trim((string) $percent);
|
||||
// $percent = rtrim($percent, '%');
|
||||
// $percent = preg_replace('/[^\d.]/', '', $percent) ?? '0';
|
||||
// $percentF = (float) $percent;
|
||||
// if ($percentF < 0) {
|
||||
// $skipped++;
|
||||
// continue;
|
||||
// }
|
||||
// $percentF = (float) number_format($percentF, 2, '.', '');
|
||||
|
||||
if ($existing) {
|
||||
$existing->update($payload);
|
||||
$updated++;
|
||||
} else {
|
||||
Tax::create($payload);
|
||||
$created++;
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
// $day = date('Y-m-d', strtotime((string) $day));
|
||||
// if (!$day) {
|
||||
// $skipped++;
|
||||
// continue;
|
||||
// }
|
||||
|
||||
DB::commit();
|
||||
return redirect()->route('tax')->with('success', "インポート完了:新規 {$created} 件、更新 {$updated} 件、スキップ {$skipped} 件");
|
||||
} catch (\Throwable $e) {
|
||||
DB::rollBack();
|
||||
return redirect()->route('tax')->with('error', 'インポートに失敗しました:' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
// // upsert: 適用日ユニーク運用
|
||||
// $existing = Tax::whereDate('tax_day', $day)->first();
|
||||
// $payload = [
|
||||
// 'tax_percent' => $percentF,
|
||||
// 'tax_day' => $day,
|
||||
// 'operator_id' => optional(Auth::user())->ope_id ?? null,
|
||||
// ];
|
||||
|
||||
/**
|
||||
* CSVエクスポート:現在の絞り込み/ソート条件を反映
|
||||
*/
|
||||
public function export(Request $request): StreamedResponse
|
||||
{
|
||||
$query = Tax::query();
|
||||
// if ($existing) {
|
||||
// $existing->update($payload);
|
||||
// $updated++;
|
||||
// } else {
|
||||
// Tax::create($payload);
|
||||
// $created++;
|
||||
// }
|
||||
// }
|
||||
// fclose($fp);
|
||||
// }
|
||||
|
||||
$keyword = trim((string) $request->input('kw'));
|
||||
if ($keyword !== '') {
|
||||
$query->where('tax_percent', 'like', "%{$keyword}%");
|
||||
}
|
||||
$from = $request->input('from');
|
||||
$to = $request->input('to');
|
||||
if ($from) {
|
||||
$query->whereDate('tax_day', '>=', $from);
|
||||
}
|
||||
if ($to) {
|
||||
$query->whereDate('tax_day', '<=', $to);
|
||||
}
|
||||
// DB::commit();
|
||||
// return redirect()->route('tax')->with('success', "インポート完了:新規 {$created} 件、更新 {$updated} 件、スキップ {$skipped} 件");
|
||||
// } catch (\Throwable $e) {
|
||||
// DB::rollBack();
|
||||
// return redirect()->route('tax')->with('error', 'インポートに失敗しました:' . $e->getMessage());
|
||||
// }
|
||||
// }
|
||||
|
||||
$sort = $request->input('sort', 'tax_day');
|
||||
$type = strtolower($request->input('sort_type', 'desc'));
|
||||
$allow = ['tax_day', 'tax_percent', 'updated_at', 'created_at', 'tax_id'];
|
||||
if (!in_array($sort, $allow, true)) {
|
||||
$sort = 'tax_day';
|
||||
}
|
||||
if (!in_array($type, ['asc', 'desc'], true)) {
|
||||
$type = 'desc';
|
||||
}
|
||||
$query->orderBy($sort, $type);
|
||||
// /**
|
||||
// * CSVエクスポート:現在の絞り込み/ソート条件を反映
|
||||
// */
|
||||
// public function export(Request $request): StreamedResponse
|
||||
// {
|
||||
// $query = Tax::query();
|
||||
|
||||
$filename = 'tax_' . now()->format('Ymd_His') . '.csv';
|
||||
// $keyword = trim((string) $request->input('kw'));
|
||||
// if ($keyword !== '') {
|
||||
// $query->where('tax_percent', 'like', "%{$keyword}%");
|
||||
// }
|
||||
// $from = $request->input('from');
|
||||
// $to = $request->input('to');
|
||||
// if ($from) {
|
||||
// $query->whereDate('tax_day', '>=', $from);
|
||||
// }
|
||||
// if ($to) {
|
||||
// $query->whereDate('tax_day', '<=', $to);
|
||||
// }
|
||||
|
||||
return response()->streamDownload(function () use ($query) {
|
||||
$out = fopen('php://output', 'w');
|
||||
// Header(設計書の主要カラム)
|
||||
fputcsv($out, ['消費税ID', '消費税率', '適用日', '登録日時', '更新日時', '更新オペレータID']);
|
||||
$query->chunk(500, function ($rows) use ($out) {
|
||||
foreach ($rows as $r) {
|
||||
fputcsv($out, [
|
||||
$r->tax_id,
|
||||
// 画面仕様に合わせたい場合は getDisplayTaxPercentAttribute() に置換可
|
||||
is_numeric($r->tax_percent)
|
||||
? number_format((float) $r->tax_percent, 2, '.', '')
|
||||
: (string) $r->tax_percent,
|
||||
optional($r->tax_day)->format('Y-m-d'),
|
||||
optional($r->created_at)->format('Y-m-d H:i:s'),
|
||||
optional($r->updated_at)->format('Y-m-d H:i:s'),
|
||||
$r->operator_id,
|
||||
]);
|
||||
}
|
||||
});
|
||||
fclose($out);
|
||||
}, $filename, [
|
||||
'Content-Type' => 'text/csv; charset=UTF-8',
|
||||
]);
|
||||
}
|
||||
// $sort = $request->input('sort', 'tax_day');
|
||||
// $type = strtolower($request->input('sort_type', 'desc'));
|
||||
// $allow = ['tax_day', 'tax_percent', 'updated_at', 'created_at', 'tax_id'];
|
||||
// if (!in_array($sort, $allow, true)) {
|
||||
// $sort = 'tax_day';
|
||||
// }
|
||||
// if (!in_array($type, ['asc', 'desc'], true)) {
|
||||
// $type = 'desc';
|
||||
// }
|
||||
// $query->orderBy($sort, $type);
|
||||
|
||||
// $filename = 'tax_' . now()->format('Ymd_His') . '.csv';
|
||||
|
||||
// return response()->streamDownload(function () use ($query) {
|
||||
// $out = fopen('php://output', 'w');
|
||||
// // Header(設計書の主要カラム)
|
||||
// fputcsv($out, ['消費税ID', '消費税率', '適用日', '登録日時', '更新日時', '更新オペレータID']);
|
||||
// $query->chunk(500, function ($rows) use ($out) {
|
||||
// foreach ($rows as $r) {
|
||||
// fputcsv($out, [
|
||||
// $r->tax_id,
|
||||
// // 画面仕様に合わせたい場合は getDisplayTaxPercentAttribute() に置換可
|
||||
// is_numeric($r->tax_percent)
|
||||
// ? number_format((float) $r->tax_percent, 2, '.', '')
|
||||
// : (string) $r->tax_percent,
|
||||
// optional($r->tax_day)->format('Y-m-d'),
|
||||
// optional($r->created_at)->format('Y-m-d H:i:s'),
|
||||
// optional($r->updated_at)->format('Y-m-d H:i:s'),
|
||||
// $r->operator_id,
|
||||
// ]);
|
||||
// }
|
||||
// });
|
||||
// fclose($out);
|
||||
// }, $filename, [
|
||||
// 'Content-Type' => 'text/csv; charset=UTF-8',
|
||||
// ]);
|
||||
// }
|
||||
}
|
||||
|
||||
@ -42,9 +42,14 @@ class Price extends Model
|
||||
|
||||
public static function search($inputs)
|
||||
{
|
||||
$query = self::query();
|
||||
$query = self::query()
|
||||
->select(
|
||||
'price_a.*',
|
||||
\DB::raw("CONCAT_WS('/', usertype.usertype_subject1, usertype.usertype_subject2, usertype.usertype_subject3) as user_category_name")
|
||||
)
|
||||
->leftJoin('usertype', 'price_a.user_categoryid', '=', 'usertype.user_categoryid');
|
||||
|
||||
// 検索条件
|
||||
// ソート対象カラム
|
||||
$allowedSortColumns = [
|
||||
'price_parkplaceid', // 駐車場所ID
|
||||
'park_id', // 駐輪場ID
|
||||
@ -57,7 +62,6 @@ class Price extends Model
|
||||
'pplace_id', // 駐車車室ID
|
||||
];
|
||||
|
||||
// ソート指定
|
||||
$sortColumn = $inputs['sort'] ?? '';
|
||||
$sortType = strtolower($inputs['sort_type'] ?? 'asc');
|
||||
|
||||
@ -68,13 +72,14 @@ class Price extends Model
|
||||
$query->orderBy($sortColumn, $sortType);
|
||||
}
|
||||
|
||||
// データ取得
|
||||
return $inputs['isExport']
|
||||
? $query->get()
|
||||
: $query->paginate(\App\Utils::item_per_page ?? 20);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getByPk($pk)
|
||||
{
|
||||
return self::find($pk);
|
||||
|
||||
@ -24,4 +24,11 @@ class SettlementTransaction extends Model
|
||||
'stamp_flag',
|
||||
'md5_string',
|
||||
];
|
||||
|
||||
// 日付型キャスト
|
||||
protected $casts = [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'pay_date' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
@ -391,6 +391,13 @@ return [
|
||||
'contract_allowable_city_id' => '契約許容市区マスタID',
|
||||
'contract_allowable_city_name' => '許容市区名',
|
||||
'same_district_flag' => '隣接区フラグ',
|
||||
//SWA-67
|
||||
'tax_id' => '消費税ID',
|
||||
'tax_percent' => '消費税率',
|
||||
'tax_day' => '適用日',
|
||||
//SWA-80
|
||||
'payment_companyname' => '事業者名',
|
||||
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
@ -17,67 +17,64 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$isAddPage = request()->routeIs('managers_add'); // 新規ページなら true
|
||||
@endphp
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($isInfo || $isEdit)
|
||||
{{-- 駐車場管理者ID(表示のみ) --}}
|
||||
<div class="row">
|
||||
{{-- 駐車場管理者ID(編集時のみ表示) --}}
|
||||
@if(!empty($manager_id))
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('駐車場管理者ID') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
value="{{ $manager_id }}"
|
||||
class="form-control form-control-lg"
|
||||
class="form-control form-control-lg bg-light"
|
||||
readonly />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- 駐車場管理者名 --}}
|
||||
<div class="form-group col-3">
|
||||
<label @if(!$isInfo) class="required" @endif>{{ __('駐車場管理者名') }}</label>
|
||||
<label class="required">{{ __('駐車場管理者名') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="manager_name"
|
||||
value="{{ old('manager_name', $manager_name) }}"
|
||||
placeholder="{{ __('validation.attributes.manager_name') }}"
|
||||
class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
|
||||
{{-- 種別 --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('種別') }}</label>
|
||||
<label class="required">{{ __('種別') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="manager_type"
|
||||
value="{{ old('manager_type', $manager_type) }}"
|
||||
placeholder="{{ __('validation.attributes.manager_type') }}"
|
||||
class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
|
||||
{{-- 所属駐輪場 --}}
|
||||
<div class="form-group col-3">
|
||||
<label @if(!$isInfo) class="required" @endif>{{ __('駐輪場名') }}</label>
|
||||
<label class="required">{{ __('駐輪場名') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<select class="form-control form-control-lg mb10"
|
||||
name="manager_parkid" @if($isInfo) disabled @endif>
|
||||
<select class="form-control form-control-lg mb10" name="manager_parkid">
|
||||
<option value="">{{ __('validation.attributes.park_name') }}</option>
|
||||
@foreach($parks as $key => $val)
|
||||
<option value="{{ $key }}"
|
||||
@if((string)old('manager_parkid', $manager_parkid) === (string)$key) selected @endif>
|
||||
<option value="{{ $key }}" @if((string)old('manager_parkid', $manager_parkid) === (string)$key) selected @endif>
|
||||
{{ $val }}
|
||||
</option>
|
||||
@endforeach
|
||||
@ -86,15 +83,13 @@
|
||||
|
||||
{{-- 管理デバイス1 --}}
|
||||
<div class="form-group col-3">
|
||||
<label @if(!$isInfo) class="required" @endif>{{ __('管理デバイス1') }}</label>
|
||||
<label class="required">{{ __('管理デバイス1') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<select class="form-control form-control-lg mb10"
|
||||
name="manager_device1" @if($isInfo) disabled @endif>
|
||||
<select class="form-control form-control-lg mb10" name="manager_device1">
|
||||
<option value="">{{ __('validation.attributes.manager_device1') }}</option>
|
||||
@foreach($devices as $key => $val)
|
||||
<option value="{{ $key }}"
|
||||
@if((string)old('manager_device1', $manager_device1) === (string)$key) selected @endif>
|
||||
<option value="{{ $key }}" @if((string)old('manager_device1', $manager_device1) === (string)$key) selected @endif>
|
||||
{{ $val }}
|
||||
</option>
|
||||
@endforeach
|
||||
@ -103,15 +98,13 @@
|
||||
|
||||
{{-- 管理デバイス2 --}}
|
||||
<div class="form-group col-3">
|
||||
<label @if(!$isInfo) class="required" @endif>{{ __('管理デバイス2') }}</label>
|
||||
<label>{{ __('管理デバイス2') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<select class="form-control form-control-lg mb10"
|
||||
name="manager_device2" @if($isInfo) disabled @endif>
|
||||
<select class="form-control form-control-lg mb10" name="manager_device2">
|
||||
<option value="">{{ __('validation.attributes.manager_device2') }}</option>
|
||||
@foreach($devices as $key => $val)
|
||||
<option value="{{ $key }}"
|
||||
@if((string)old('manager_device2', $manager_device2) === (string)$key) selected @endif>
|
||||
<option value="{{ $key }}" @if((string)old('manager_device2', $manager_device2) === (string)$key) selected @endif>
|
||||
{{ $val }}
|
||||
</option>
|
||||
@endforeach
|
||||
@ -123,73 +116,66 @@
|
||||
<label>{{ __('メールアドレス') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="manager_mail"
|
||||
value="{{ old('manager_mail', $manager_mail) }}"
|
||||
class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
value="{{ old('manager_mail', $record->manager_mail ?? '') }}"
|
||||
placeholder="{{ __('validation.attributes.manager_mail') }}"
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
|
||||
{{-- 電話番号 --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('電話番号') }}</label>
|
||||
<label class="required">{{ __('電話番号') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="manager_tel"
|
||||
value="{{ old('manager_tel', $manager_tel) }}"
|
||||
class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
value="{{ old('manager_tel', $record->manager_tel ?? '') }}"
|
||||
placeholder="{{ __('validation.attributes.manager_tel') }}"
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
|
||||
{{-- アラート1送信(checkbox + hidden 0) --}}
|
||||
{{-- アラート1送信 --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('アラート1') }}</label>
|
||||
<label>{{ __('アラート1送信') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group align-items-center">
|
||||
@if(!$isInfo)<input type="hidden" name="manager_alert1" value="0">@endif
|
||||
<input type="checkbox" class="minimal"
|
||||
name="manager_alert1" value="1"
|
||||
{{ old('manager_alert1', $manager_alert1) ? 'checked' : '' }}
|
||||
@if($isInfo) disabled @endif>
|
||||
</div>
|
||||
<input type="text"
|
||||
name="manager_alert1"
|
||||
value="{{ old('manager_alert1', $record->manager_alert1 ?? '') }}"
|
||||
placeholder="{{ __('アラート1送信') }}"
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
|
||||
{{-- アラート2送信(checkbox + hidden 0) --}}
|
||||
{{-- アラート2送信 --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('アラート2') }}</label>
|
||||
<label>{{ __('アラート2送信') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group align-items-center">
|
||||
@if(!$isInfo)<input type="hidden" name="manager_alert2" value="0">@endif
|
||||
<input type="checkbox" class="minimal"
|
||||
name="manager_alert2" value="1"
|
||||
{{ old('manager_alert2', $manager_alert2) ? 'checked' : '' }}
|
||||
@if($isInfo) disabled @endif>
|
||||
</div>
|
||||
<input type="text"
|
||||
name="manager_alert2"
|
||||
value="{{ old('manager_alert2', $record->manager_alert2 ?? '') }}"
|
||||
placeholder="{{ __('アラート2送信') }}"
|
||||
class="form-control form-control-lg" />
|
||||
</div>
|
||||
|
||||
|
||||
{{-- 退職フラグ --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('退職フラグ') }}</label>
|
||||
<label class="required">{{ __('退職フラグ') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="row">
|
||||
<div class="col-2 offset-1 form-check">
|
||||
<input type="radio" class="minimal"
|
||||
name="manager_quit_flag" value="1"
|
||||
{{ (string)old('manager_quit_flag', $manager_quit_flag) === '1' ? 'checked' : '' }}
|
||||
@if($isInfo) disabled @endif>
|
||||
{{ (string)old('manager_quit_flag', $manager_quit_flag) === '1' ? 'checked' : '' }}>
|
||||
<label class="form-check-label">{{ __('退職') }}</label>
|
||||
</div>
|
||||
<div class="col-3 form-check">
|
||||
<input type="radio" class="minimal"
|
||||
name="manager_quit_flag" value="0"
|
||||
{{ (string)old('manager_quit_flag', $manager_quit_flag) === '0' ? 'checked' : '' }}
|
||||
@if($isInfo) disabled @endif>
|
||||
{{ (string)old('manager_quit_flag', $manager_quit_flag) === '0' ? 'checked' : '' }}>
|
||||
<label class="form-check-label">{{ __('退職しない') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -200,27 +186,33 @@
|
||||
<label>{{ __('退職日') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
<input type="date"
|
||||
name="manager_quitday"
|
||||
value="{{ old('manager_quitday', $manager_quitday) }}"
|
||||
class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
value="{{ old('manager_quitday', !empty($manager_quitday) ? \Carbon\Carbon::parse($manager_quitday)->format('Y-m-d') : '') }}"
|
||||
class="form-control form-control-lg"
|
||||
style="text-align: left;" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- 下部ボタン --}}
|
||||
<div class="card-footer bg-white border-0">
|
||||
<div class="d-flex justify-content-start align-items-center">
|
||||
@if($isInfo)
|
||||
<a href="{{ route('managers_add') }}" class="btn btn-lg btn-success mr-2">{{ __('登録') }}</a>
|
||||
<a href="{{ route('managers_edit', ['id' => $manager_id]) }}" class="btn btn-lg btn-danger">{{ __('編集') }}</a>
|
||||
{{-- ▼ 下部ボタン --}}
|
||||
<div class="row mt-4">
|
||||
<!-- <div class="col-md-2"></div> -->
|
||||
<div class="form-group col-md-10 d-flex align-items-center gap-2 justify-content-start">
|
||||
{{-- 登録ボタン --}}
|
||||
@if(!empty($manager_id))
|
||||
<button type="button" id="register_edit" class="btn btn-lg btn-success mr-2">登録</button>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-success mr-2">
|
||||
{{ $isAddPage ? __('登録') : __('保存') }}
|
||||
<button type="button" id="register" class="btn btn-lg btn-success mr-2 register">
|
||||
{{ __('登録') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
{{-- 削除ボタン(編集時のみ表示) --}}
|
||||
@if(!empty($manager_id))
|
||||
<button type="button" id="delete_edit" class="btn btn-lg btn-danger">
|
||||
{{ __('削除') }}
|
||||
</button>
|
||||
<a href="{{ route('managers') }}" class="btn btn-lg btn-secondary">{{ __('戻る') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,54 +1,39 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 駐輪場管理者マスタ')
|
||||
@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 class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-sm-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="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item"><a href="{{ route('managers') }}">駐輪場管理者マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">@foreach ($errors->all() as $e)<li>{{ $e }}</li>@endforeach</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissible">{{ Session::get('success') }}</div>
|
||||
@elseif(Session::has('error'))
|
||||
<div class="alert alert-danger alert-dismissible">{!! Session::get('error') !!}</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card p-3">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{{-- 新規登録フォーム --}}
|
||||
<form method="post" action="{{ route('managers_add') }}">
|
||||
<form id="form_register" action="{{ route('managers_add') }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.managers._form', ['isEdit' => 0, 'isInfo' => 0])
|
||||
|
||||
@include('admin.managers._form', ['isEdit' => false])
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@ -1,21 +1,16 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 駐輪場管理者マスタ')
|
||||
@section('title', '編集')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$mid = $record->manager_id ?? ($manager_id ?? null);
|
||||
@endphp
|
||||
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">編集</h1>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-sm-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="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item"><a href="{{ route('managers') }}">駐輪場管理者マスタ</a></li>
|
||||
<li class="breadcrumb-item active">編集</li>
|
||||
</ol>
|
||||
@ -26,39 +21,25 @@
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">@foreach ($errors->all() as $e)<li>{{ $e }}</li>@endforeach</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissible">{{ Session::get('success') }}</div>
|
||||
@elseif(Session::has('error'))
|
||||
<div class="alert alert-danger alert-dismissible">{!! Session::get('error') !!}</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card p-3">
|
||||
<div class="card">
|
||||
|
||||
{{-- 更新用フォーム --}}
|
||||
<form method="post" action="{{ route('managers_edit', ['id' => $mid]) }}">
|
||||
{{-- 編集フォーム --}}
|
||||
<form id="form_edit" action="{{ route('managers_edit', ['id' => $record->manager_id]) }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.managers._form', ['isEdit' => 1, 'isInfo' => 0])
|
||||
|
||||
@include('admin.managers._form', ['isEdit' => true])
|
||||
</form>
|
||||
{{-- 削除フォーム --}}
|
||||
<form id="form_delete" action="{{ route('managers_delete') }}" method="POST" style="display:none;">
|
||||
@csrf
|
||||
<input type="hidden" name="pk" value="{{ $record->manager_id }}">
|
||||
</form>
|
||||
|
||||
{{-- 削除用フォーム(独立・POST /managers/delete) --}}
|
||||
<form action="{{ route('managers_delete') }}" method="post" id="delete_form" class="d-none">
|
||||
@csrf
|
||||
<input type="hidden" name="pk[]" value="{{ $mid }}">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> {{-- /.card --}}
|
||||
</div> {{-- /.col-lg-12 --}}
|
||||
</div> {{-- /.row --}}
|
||||
</div> {{-- /.container-fluid --}}
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 駐輪場管理者マスタ')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
|
||||
$mid = $record->manager_id ?? ($manager_id ?? null);
|
||||
@endphp
|
||||
|
||||
<!-- Content Header -->
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('managers') }}">駐輪場管理者マスタ</a></li>
|
||||
<li class="breadcrumb-item active">詳細</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">@foreach ($errors->all() as $e)<li>{{ $e }}</li>@endforeach</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissible">{{ Session::get('success') }}</div>
|
||||
@elseif(Session::has('error'))
|
||||
<div class="alert alert-danger alert-dismissible">{!! Session::get('error') !!}</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card p-3">
|
||||
|
||||
{{-- 閲覧用:不必要な外層フォームは置かない --}}
|
||||
@include('admin.managers._form', ['isEdit' => 0, 'isInfo' => 1])
|
||||
|
||||
{{-- 削除用の独立フォーム(ネスト回避) --}}
|
||||
<form action="{{ route('managers_delete') }}" method="post" id="delete_form" class="d-none">
|
||||
@csrf
|
||||
<input type="hidden" name="pk[]" value="{{ $mid }}">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@ -1,7 +1,37 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 駐輪場管理者マスタ')
|
||||
@section('title', '駐輪場管理者マスタ')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.sticky-col {
|
||||
position: sticky;
|
||||
left: 1;
|
||||
background: #faebd7;
|
||||
z-index: 10;
|
||||
border-right: 1px solid #dcdcdc !important;
|
||||
box-shadow: 2px 0 0 #dcdcdc;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
.sticky-col {
|
||||
left: 0 !important;
|
||||
}
|
||||
th.sticky-col, td.sticky-col {
|
||||
border-right: 1px solid #dcdcdc !important;
|
||||
background: #faebd7;
|
||||
}
|
||||
th.sticky-col + th, td.sticky-col + td {
|
||||
border-left: 1px solid #dcdcdc !important;
|
||||
background: #fff;
|
||||
}
|
||||
table th:last-child,
|
||||
table td:last-child {
|
||||
border-right: 1px solid #dcdcdc !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Content Header -->
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
@ -11,8 +41,8 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">駐輪場管理者マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -33,8 +63,9 @@
|
||||
<!-- 操作ボタン -->
|
||||
<div class="container-fluid mb20">
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('managers_add') }}'">新規</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
|
||||
<button type="button" id="delete" class="btn btn-sm btn-default mr10">削除</button>
|
||||
|
||||
<!-- <button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button> -->
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $list->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
@ -58,26 +89,29 @@
|
||||
|
||||
<!-- ▼ 単一テーブル構成 -->
|
||||
<div class="col-lg-12 mb20">
|
||||
<div class="table-responsive">
|
||||
<div class="sample03-wrapper">
|
||||
<form action="{{ route('managers_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table table-bordered dataTable text-nowrap" style="min-width:3000px;">
|
||||
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集ボタン列 --}}
|
||||
<th style="width:140px;" class="text-left">
|
||||
<!-- ヘッダー -->
|
||||
<th class="text-left sticky-col" style="width:120px;">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='manager_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_id" ><span>駐輪場管理者ID</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_name') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_name"><span>駐輪場管理者名</span></th>
|
||||
<th><span>種別</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_parkid') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_parkid"><span>所属駐車場ID</span></th>
|
||||
<th><span>管理デバイス1</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_device1') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_device1"><span>管理デバイス1</span></th>
|
||||
<th><span>管理デバイス2</span></th>
|
||||
<th><span>メール</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_tel') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_tel"><span>電話</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_alert1') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_alert1"><span>アラート1</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_alert2') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_alert2"><span>アラート2</span></th>
|
||||
<th><span>メールアドレス</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_tel') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_tel"><span>電話番号</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_alert1') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_alert1"><span>アラート1送信</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_alert2') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_alert2"><span>アラート2送信</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_quit_flag') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_quit_flag"><span>退職フラグ</span></th>
|
||||
<th><span>退職日</span></th>
|
||||
</tr>
|
||||
@ -86,10 +120,10 @@
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
{{-- チェック+編集ボタン --}}
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<td class="align-middle sticky-col" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->manager_id }}">
|
||||
<a href="{{ route('managers_info', ['id' => $item->manager_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
<a href="{{ route('managers_edit', ['id' => $item->manager_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -106,8 +140,7 @@
|
||||
<td class="sm-item text-left align-middle">{{ $item->getManagerQuitFlagDisplay() }}</td>
|
||||
<td class="sm-item text-left align-middle">
|
||||
@if($item->manager_quitday)
|
||||
<span class="text-muted">
|
||||
<i class="fa fa-clock-o mr-1"></i>
|
||||
<span>
|
||||
{{ mb_substr($item->manager_quitday, 0, 10) }}
|
||||
</span>
|
||||
@endif
|
||||
@ -117,7 +150,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<!-- ▲ 単一テーブル構成ここまで -->
|
||||
</div>
|
||||
@ -133,3 +166,4 @@
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
||||
@ -4,191 +4,243 @@
|
||||
<div class="alert alert-danger alert-dismissible">{{ Session::get('error') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="card p-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{{-- バリデーションエラー(一覧形式) --}}
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- 決済情報ID(編集/参照のみ表示、システム自動採番) --}}
|
||||
@if($isEdit || $isInfo)
|
||||
{{-- 決済情報ID(編集時のみ表示、システム自動採番) --}}
|
||||
@if($isEdit)
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">決済情報ID</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('決済情報ID') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{ $payment->payment_id ?? '' }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- 会社名(必須) --}}
|
||||
{{-- 事業者名(必須) --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">会社名 <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label required">{{ __('事業者名') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_companyname"
|
||||
class="form-control @error('payment_companyname') is-invalid @enderror"
|
||||
class="form-control text-end"
|
||||
value="{{ old('payment_companyname', $payment->payment_companyname ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)〇〇駐輪場運営株式会社"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_companyname')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="事業者名"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 住所 --}}
|
||||
{{-- お問い合わせ先住所(必須) --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">住所</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('お問合せ先住所') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_add"
|
||||
class="form-control @error('payment_add') is-invalid @enderror"
|
||||
value="{{ old('payment_add', $payment->payment_add ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)東京都〇〇区〇〇 1-2-3"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_add')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="お問い合わせ先住所">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 詳細(補足情報) --}}
|
||||
{{-- 払い込み内容(補足情報) --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">詳細</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('払い込み内容') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_detail"
|
||||
class="form-control @error('payment_detail') is-invalid @enderror"
|
||||
value="{{ old('payment_detail', $payment->payment_detail ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)ビル名・階数など"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_detail')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="払い込み内容">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 予備項目1 --}}
|
||||
{{-- フリースペース記載名1 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">予備項目1</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('フリースペース記載名1') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_space1"
|
||||
class="form-control @error('payment_space1') is-invalid @enderror"
|
||||
value="{{ old('payment_space1', $payment->payment_space1 ?? '') }}"
|
||||
maxlength="255"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_space1')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="フリースペース記載名1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 予備項目2 --}}
|
||||
{{-- フリースペース記載名2 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">予備項目2</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('フリースペース記載名2') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_space2"
|
||||
class="form-control @error('payment_space2') is-invalid @enderror"
|
||||
value="{{ old('payment_space2', $payment->payment_space2 ?? '') }}"
|
||||
maxlength="255"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_space2')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="フリースペース記載名2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- タイトル --}}
|
||||
{{-- ご案内タイトル --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">タイトル</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('ご案内タイトル') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_title"
|
||||
class="form-control @error('payment_title') is-invalid @enderror"
|
||||
value="{{ old('payment_title', $payment->payment_title ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)お支払いのご案内"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_title')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
placeholder="ご案内タイトル">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 案内文 --}}
|
||||
{{-- お客様ご案内 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">案内文</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('お客様ご案内') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_guide"
|
||||
class="form-control @error('payment_guide') is-invalid @enderror"
|
||||
value="{{ old('payment_guide', $payment->payment_guide ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)お支払い方法につきましては以下をご確認ください。"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_guide')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="お客様ご案内">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 問い合わせ担当者名 --}}
|
||||
{{-- 問合せ先名称 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">問い合わせ担当</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('問合せ先名称') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_inquiryname"
|
||||
class="form-control @error('payment_inquiryname') is-invalid @enderror"
|
||||
value="{{ old('payment_inquiryname', $payment->payment_inquiryname ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)山田 太郎"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_inquiryname')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="問合せ先名称">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 問い合わせ電話番号 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">問い合わせ電話</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('問い合わせ電話') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_inquirytel"
|
||||
class="form-control @error('payment_inquirytel') is-invalid @enderror"
|
||||
value="{{ old('payment_inquirytel', $payment->payment_inquirytel ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)03-1234-5678"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_inquirytel')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
<small class="text-muted">半角数字・ハイフンで入力してください。</small>
|
||||
placeholder="問い合わせ電話">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 受付時間(例:平日9:00〜17:00) --}}
|
||||
{{-- 電話受付時間 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">受付時間</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('電話受付時間') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="payment_time"
|
||||
class="form-control @error('payment_time') is-invalid @enderror"
|
||||
value="{{ old('payment_time', $payment->payment_time ?? '') }}"
|
||||
maxlength="255"
|
||||
placeholder="例)平日 9:00〜17:00"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('payment_time')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
placeholder="電話受付時間">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- オペレータID(編集/参照のみ表示・自動設定) --}}
|
||||
@if($isEdit || $isInfo)
|
||||
{{-- 更新オペレータID --}}
|
||||
@if($isEdit)
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">更新オペレータID</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('更新オペレータID') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{ $payment->operator_id ?? '' }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- ボタン --}}
|
||||
<div class="text-left mt-2">
|
||||
@if($isInfo)
|
||||
<a href="{{ route('payments_edit', ['id' => $payment->payment_id]) }}" class="btn btn-lg btn-success">編集</a>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-success">登録</button>
|
||||
|
||||
{{-- ▼ 下部ボタン --}}
|
||||
<div class="row mt-4">
|
||||
<div class="form-group col-md-10 d-flex align-items-center gap-2 justify-content-start">
|
||||
{{-- 登録ボタン --}}
|
||||
@if($isEdit)
|
||||
<a href="{{ route('payments_delete', ['id' => $payment->payment_id]) }}"
|
||||
class="btn btn-lg btn-danger ms-2"
|
||||
onclick="return confirm('削除してよろしいですか?')">削除</a>
|
||||
<button type="button" id="register_edit" class="btn btn-lg btn-success mr-2">
|
||||
{{ __('登録') }}
|
||||
</button>
|
||||
@else
|
||||
<button type="button" id="register" class="btn btn-lg btn-success mr-2 register">
|
||||
{{ __('登録') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
{{-- 削除ボタン(編集時のみ表示) --}}
|
||||
@if($isEdit && !empty($payment->payment_id))
|
||||
<button type="button" id="delete_edit" class="btn btn-lg btn-danger">
|
||||
{{ __('削除') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
{{-- /.card-body --}}
|
||||
{{-- /.card --}}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<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('payments') }}">決済情報マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -21,13 +21,9 @@
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form action="{{ route('payments_add') }}" method="POST">
|
||||
<form id="form_register" action="{{ route('payments_add') }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.payments._form', [
|
||||
'payment' => null,
|
||||
'isEdit' => false,
|
||||
'isInfo' => false,
|
||||
])
|
||||
@include('admin.payments._form', ['isEdit' => false])
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '決済情報 編集')
|
||||
@section('title', '編集')
|
||||
|
||||
@section('content')
|
||||
<div class="content-header">
|
||||
@ -21,13 +21,15 @@
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form action="{{ route('payments_edit', ['id' => $payment->payment_id]) }}" method="POST">
|
||||
{{-- 編集フォーム --}}
|
||||
<form id="form_edit" action="{{ route('payments_edit', ['id' => $payment->payment_id]) }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.payments._form', [
|
||||
'payment' => $payment,
|
||||
'isEdit' => true,
|
||||
'isInfo' => false,
|
||||
])
|
||||
@include('admin.payments._form', ['isEdit' => true])
|
||||
</form>
|
||||
|
||||
<form id="form_delete" action="{{ route('payments_delete') }}" method="POST" style="display:none;">
|
||||
@csrf
|
||||
<input type="hidden" name="pk[]" value="{{ $payment->payment_id }}">
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 決済情報マスタ - 詳細')
|
||||
|
||||
@section('content')
|
||||
<!-- Content Header -->
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('payments') }}">決済情報マスタ</a></li>
|
||||
<li class="breadcrumb-item active">詳細</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form>
|
||||
@include('admin.payments._form', [
|
||||
'payment' => $payment,
|
||||
'isEdit' => false,
|
||||
'isInfo' => true,
|
||||
])
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@ -1,5 +1,5 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 決済情報マスタ')
|
||||
@section('title', '決済情報マスタ')
|
||||
|
||||
@section('content')
|
||||
<!-- Content Header -->
|
||||
@ -35,7 +35,7 @@
|
||||
<div class="container-fluid mb20">
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('payments_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $payments->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
@ -63,7 +63,7 @@
|
||||
<form action="{{ route('payments_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
{{-- チェック + 編集 --}}
|
||||
<th style="width:140px;" class="text-left">
|
||||
@ -72,21 +72,31 @@
|
||||
<th class="sorting {{ ($sort=='payment_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_id">
|
||||
<span>決済情報ID</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='payment_companyname') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_companyname">
|
||||
<span>会社名</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='payment_inquirytel') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_inquirytel">
|
||||
<span>問い合わせ電話</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='payment_inquiryname') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_inquiryname">
|
||||
<span>問い合わせ担当</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='payment_time') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_time">
|
||||
<span>受付時間</span>
|
||||
</th>
|
||||
<th><span>登録日時</span></th>
|
||||
<th class="sorting {{ ($sort=='updated_at') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="updated_at">
|
||||
<span>更新日時</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='payment_companyname') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_companyname">
|
||||
<span>事業者名</span>
|
||||
</th>
|
||||
<th><span>お問合せ先住所</span></th>
|
||||
<th><span>払い込み内容</span></th>
|
||||
<th><span>フリースペース記載名1</span></th>
|
||||
<th><span>フリースペース記載名2</span></th>
|
||||
<th><span>ご案内タイトル</span></th>
|
||||
<th><span>お客様ご案内</span></th>
|
||||
<th class="sorting {{ ($sort=='payment_inquiryname') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_inquiryname">
|
||||
<span>問い合わせ担当</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='payment_inquirytel') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_inquirytel">
|
||||
<span>問合せ先TEL</span>
|
||||
</th>
|
||||
|
||||
<th class="sorting {{ ($sort=='payment_time') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="payment_time">
|
||||
<span>電話受付時間</span>
|
||||
</th>
|
||||
<!-- <th><span>更新オペレータID</span></th> -->
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white">
|
||||
@ -99,12 +109,24 @@
|
||||
<a href="{{ route('payments_edit', ['id' => $payment->payment_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_companyname }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_inquirytel }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_inquiryname }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_time }}</td>
|
||||
<td class="sm-item text-right align-middle">{{ $payment->payment_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ optional($payment->created_at)->format('Y-m-d H:i') }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ optional($payment->updated_at)->format('Y-m-d H:i') }}</td>
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_companyname }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_add }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_detail }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_space1 }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_space2 }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_title }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_guide }}</td>
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_inquiryname }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_inquirytel }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $payment->payment_time }}</td>
|
||||
|
||||
<!-- <td class="sm-item text-right align-middle">{{ $payment->operator_id }}</td> -->
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@ -117,27 +139,9 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<form action="{{ route('payments_export') }}" method="GET" id="form_export"></form>
|
||||
|
||||
{{-- 一括削除 & ソートのJS --}}
|
||||
{{-- ソートのJS --}}
|
||||
@push('scripts')
|
||||
<script>
|
||||
// 全選択
|
||||
document.getElementById('checkbox_all')?.addEventListener('change', function(e){
|
||||
document.querySelectorAll('.checkbox').forEach(cb => cb.checked = e.target.checked);
|
||||
});
|
||||
|
||||
// 削除確認
|
||||
document.getElementById('delete')?.addEventListener('click', function(){
|
||||
const anyChecked = Array.from(document.querySelectorAll('.checkbox')).some(cb => cb.checked);
|
||||
if (!anyChecked) {
|
||||
alert('削除対象が選択されていません。');
|
||||
return;
|
||||
}
|
||||
if (confirm('削除してよろしいですか?')) {
|
||||
document.getElementById('form_delete').submit();
|
||||
}
|
||||
});
|
||||
|
||||
// ヘッダクリックでソート
|
||||
document.querySelectorAll('th.sorting').forEach(th => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '駐輪場所、料金マスタ')
|
||||
@section('title', '新規')
|
||||
|
||||
@section('content')
|
||||
<!-- Content Header (Page header) -->
|
||||
@ -7,13 +7,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="m-0 text-dark">新規登録</h1>
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
</div><!-- /.col -->
|
||||
<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('prices') }}">駐輪場所、料金マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
</ol>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
{{-- ▼ コンテンツヘッダー(パンくず) --}}
|
||||
<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>
|
||||
@ -151,65 +152,60 @@
|
||||
|
||||
<!-- ▼ ここから単一テーブル構成 ----------------------------------------- -->
|
||||
<div class="col-lg-12 mb20">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<div class="table-responsive prices-wrap">
|
||||
<table class="table table-bordered dataTable text-nowrap prices-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集 用の1列 --}}
|
||||
<th style="width:140px; border-left:1px solid #dcdcdc;" class="text-left">
|
||||
{{-- 1列目:チェック+編集 --}}
|
||||
<th class="text-left freeze freeze-1" style="border-left:1px solid #dcdcdc;">
|
||||
<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') : '' }}"
|
||||
{{-- 2列目:駐輪場所ID(ソート可) --}}
|
||||
<th class="sorting freeze freeze-2 {{ ($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') : '' }}"
|
||||
|
||||
{{-- 3列目:駐輪場ID(ソート可) --}}
|
||||
<th class="sorting freeze freeze-3 {{ ($sort=='park_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="park_id">
|
||||
<span>駐輪場ID</span>
|
||||
</th>
|
||||
|
||||
{{-- ▼ ソート不要 --}}
|
||||
<th><span>商品名</span></th>
|
||||
{{-- 4列目:商品名(固定ここまで) --}}
|
||||
<th class="freeze freeze-4"><span>商品名</span></th>
|
||||
|
||||
{{-- 以下は通常列 --}}
|
||||
<th><span>期間</span></th>
|
||||
<th><span>利用者分類ID</span></th>
|
||||
<th><span>駐輪料金(税込)</span></th>
|
||||
|
||||
{{-- ▼ ソート対象列 --}}
|
||||
<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">
|
||||
<span>駐輪分類</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='pplace_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
|
||||
sort="pplace_id">
|
||||
<span>駐車車室ID</span>
|
||||
</th>
|
||||
<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"><span>駐輪分類</span></th>
|
||||
<th class="sorting {{ ($sort=='pplace_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="pplace_id"><span>駐車車室ID</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="bg-white">
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
{{-- ★ 同じセル内に チェック + 編集ボタン --}}
|
||||
<td class="align-middle" style="background-color:#faebd7; border-left:1px solid #dcdcdc;">
|
||||
{{-- 1列目:チェック+編集 --}}
|
||||
<td style="background: #faebd7;">
|
||||
<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>
|
||||
|
||||
{{-- データ列 --}}
|
||||
<td class="sm-item text-left align-middle">{{ $item->price_parkplaceid }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->park_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->prine_name }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->price_month }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->user_categoryid }}</td>
|
||||
{{-- 2~4列目(固定) --}}
|
||||
<td class="sm-item text-left align-middle freeze freeze-2">{{ $item->price_parkplaceid }}</td>
|
||||
<td class="sm-item text-left align-middle freeze freeze-3">{{ $parks[$item->park_id] ?? $item->park_id }}</td>
|
||||
<td class="sm-item text-left align-middle freeze freeze-4">{{ $item->prine_name }}</td>
|
||||
|
||||
{{-- 以降は通常列 --}}
|
||||
<td class="sm-item text-left align-middle">{{ $item->price_month }}ヶ月</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->user_category_name }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->price }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->psection_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->price_ptypeid }}</td>
|
||||
@ -219,6 +215,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- ▲ 単一テーブル構成ここまで ----------------------------------------- -->
|
||||
</form>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 決済トランザクション')
|
||||
@section('title', '決済トランザクション')
|
||||
|
||||
@section('content')
|
||||
<div class="content-header">
|
||||
@ -49,9 +49,6 @@
|
||||
<div class="container-fluid">
|
||||
<!-- ツールバー -->
|
||||
<div class="container-fluid mb20">
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('settlement_transactions_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $transactions->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
@ -85,37 +82,26 @@
|
||||
<form action="{{ route('settlement_transactions_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
|
||||
<th class="sorting {{ ($sort=='settlement_transaction_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="settlement_transaction_id"><span>決済トランザクションID</span></th>
|
||||
<th class="sorting {{ ($sort=='contract_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="contract_id"><span>定期契約ID</span></th>
|
||||
<th class="sorting {{ ($sort=='status') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="status"><span>ステータス</span></th>
|
||||
<th><span>決済コード</span></th>
|
||||
<th><span>決済番号</span></th>
|
||||
<th><span>支払いコード</span></th>
|
||||
<th><span>受付番号</span></th>
|
||||
<th class="sorting {{ ($sort=='corp_code') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="corp_code"><span>企業コード</span></th>
|
||||
<th class="sorting {{ ($sort=='mms_date') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="mms_date"><span>MMS日付</span></th>
|
||||
<th class="sorting {{ ($sort=='cvs_code') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="cvs_code"><span>CVSコード</span></th>
|
||||
<th class="sorting {{ ($sort=='mms_date') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="mms_date"><span>MMS予約照会日時</span></th>
|
||||
<th class="sorting {{ ($sort=='cvs_code') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="cvs_code"><span>CVS本部コード</span></th>
|
||||
<th class="sorting {{ ($sort=='shop_code') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="shop_code"><span>店舗コード</span></th>
|
||||
<th class="sorting {{ ($sort=='pay_date') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="pay_date"><span>支払日</span></th>
|
||||
<th class="sorting {{ ($sort=='pay_date') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="pay_date"><span>入金日時</span></th>
|
||||
<th><span>決済金額</span></th>
|
||||
<th><span>スタンプ</span></th>
|
||||
<th><span>MD5文字列</span></th>
|
||||
<th><span>印紙貼付フラグ</span></th>
|
||||
<th><span>MD5ハッシュ値</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white" >
|
||||
@foreach($transactions as $item)
|
||||
<tr>
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->settlement_transaction_id }}">
|
||||
<a href="{{ route('settlement_transactions_edit', ['id' => $item->settlement_transaction_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ $item->settlement_transaction_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->contract_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->status }}</td>
|
||||
@ -140,43 +126,4 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<form action="{{ route('settlement_transactions_export') }}" method="GET" id="form_export"></form>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
// 全選択
|
||||
document.getElementById('checkbox_all')?.addEventListener('change', function(e){
|
||||
document.querySelectorAll('.checkbox').forEach(cb => cb.checked = e.target.checked);
|
||||
});
|
||||
|
||||
// 削除確認
|
||||
document.getElementById('delete')?.addEventListener('click', function(){
|
||||
const anyChecked = Array.from(document.querySelectorAll('.checkbox')).some(cb => cb.checked);
|
||||
if (!anyChecked) {
|
||||
alert('削除対象が選択されていません。');
|
||||
return;
|
||||
}
|
||||
if (confirm('削除してよろしいですか?')) {
|
||||
document.getElementById('form_delete').submit();
|
||||
}
|
||||
});
|
||||
|
||||
// ソート
|
||||
document.querySelectorAll('th.sorting').forEach(th => {
|
||||
th.addEventListener('click', function(){
|
||||
const form = document.getElementById('list-form');
|
||||
const current = "{{ $sort ?? '' }}";
|
||||
const currentType = "{{ $sort_type ?? '' }}";
|
||||
const nextCol = this.getAttribute('sort');
|
||||
let nextType = 'asc';
|
||||
if (current === nextCol) {
|
||||
nextType = (currentType === 'asc') ? 'desc' : 'asc';
|
||||
}
|
||||
form.querySelector('[name=sort]').value = nextCol;
|
||||
form.querySelector('[name=sort_type]').value = nextType;
|
||||
form.submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endsection
|
||||
|
||||
@ -1,61 +1,102 @@
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissible">{{ Session::get('success') }}</div>
|
||||
@elseif(Session::has('error'))
|
||||
<div class="alert alert-danger alert-dismissible">{{ Session::get('error') }}</div>
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card p-4">
|
||||
@if (session('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show">
|
||||
{{ session('error') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- 消費税ID(編集/参照のみ表示、システム自動入力) --}}
|
||||
@if($isEdit || $isInfo)
|
||||
{{-- バリデーションエラー(一覧形式) --}}
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{{-- 消費税ID(編集時のみ表示、システム自動入力) --}}
|
||||
@if($isEdit)
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">消費税ID</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="col-form-label">{{ __('消費税ID') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{ $tax->tax_id ?? '' }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- 消費税率(必須・数値・負数不可) --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">消費税率 <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="number"
|
||||
<div class="col-3 form-group">
|
||||
<label class="required">{{ __('消費税率') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="tax_percent"
|
||||
class="form-control @error('tax_percent') is-invalid @enderror"
|
||||
value="{{ old('tax_percent', isset($tax->tax_percent) ? (is_numeric($tax->tax_percent) ? number_format((float)$tax->tax_percent, 2, '.', '') : $tax->tax_percent) : '') }}"
|
||||
step="0.01" min="0" inputmode="decimal"
|
||||
placeholder="例)10.00"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('tax_percent')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
<small class="text-muted">数値(半角)で入力してください。例:10.00 ※負数不可</small>
|
||||
inputmode="decimal"
|
||||
pattern="^\d+(\.\d{1,2})?$"
|
||||
class="form-control text-end"
|
||||
value="{{ old('tax_percent', is_numeric($tax->tax_percent ?? null) ? rtrim(rtrim($tax->tax_percent, '0'), '.') : '') }}"
|
||||
placeholder="消費税率">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 適用日(必須・日付型) --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">適用日 <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-3 form-group">
|
||||
<label class="required">{{ __('適用日') }}</label>
|
||||
</div>
|
||||
<div class="col-9 form-group">
|
||||
<div class="input-group">
|
||||
<input type="date"
|
||||
name="tax_day"
|
||||
class="form-control @error('tax_day') is-invalid @enderror"
|
||||
value="{{ old('tax_day', optional($tax->tax_day ?? null)->format('Y-m-d')) }}"
|
||||
@if($isInfo) readonly @endif>
|
||||
@error('tax_day')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||
class="form-control text-end"
|
||||
value="{{ old('tax_day', optional($tax->tax_day ?? null)->format('Y-m-d')) }}">
|
||||
</div>
|
||||
</div>
|
||||
{{-- ボタン --}}
|
||||
<div class="text-left mt-2">
|
||||
@if($isInfo)
|
||||
<a href="{{ route('tax_edit', ['id' => $tax->tax_id]) }}" class="btn btn-lg btn-success">編集</a>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-success">登録</button>
|
||||
@if($isEdit)
|
||||
<a href="{{ route('tax_delete', ['id' => $tax->tax_id]) }}"
|
||||
class="btn btn-lg btn-danger ms-2"
|
||||
onclick="return confirm('削除してよろしいですか?')">削除</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
{{-- ▼ 下部ボタン --}}
|
||||
<div class="row mt-4">
|
||||
<div class="form-group col-md-10 d-flex align-items-center gap-2 justify-content-start">
|
||||
{{-- 登録ボタン --}}
|
||||
@if($isEdit)
|
||||
<button type="button" id="register_edit" class="btn btn-lg btn-success mr-2">
|
||||
{{ __('登録') }}
|
||||
</button>
|
||||
@else
|
||||
<button type="button" id="register" class="btn btn-lg btn-success mr-2 register">
|
||||
{{ __('登録') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
{{-- 削除ボタン(編集時のみ表示) --}}
|
||||
@if($isEdit && !empty($tax->tax_id))
|
||||
<button type="button" id="delete_edit" class="btn btn-lg btn-danger">
|
||||
{{ __('削除') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- /.card-body --}}
|
||||
{{-- /.card --}}
|
||||
|
||||
</div>
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">新規登録</h1>
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
</div>
|
||||
<div class="col-sm-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('tax') }}">消費税マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -21,14 +21,12 @@
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form action="{{ route('tax_add') }}" method="POST">
|
||||
<form id="form_register" action="{{ route('tax_add') }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.tax._form', [
|
||||
'tax' => null,
|
||||
'isEdit' => false,
|
||||
'isInfo' => false
|
||||
])
|
||||
@include('admin.tax._form', ['isEdit' => false])
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '消費税 編集')
|
||||
@section('title', '編集')
|
||||
|
||||
@section('content')
|
||||
<div class="content-header">
|
||||
@ -21,14 +21,18 @@
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form action="{{ route('tax_edit', ['id' => $tax->tax_id]) }}" method="POST">
|
||||
{{-- 編集フォーム --}}
|
||||
<form id="form_edit" action="{{ route('tax_edit', ['id' => $tax->tax_id]) }}" method="POST">
|
||||
@csrf
|
||||
@include('admin.tax._form', [
|
||||
'tax' => $tax,
|
||||
'isEdit' => true,
|
||||
'isInfo' => false
|
||||
])
|
||||
@include('admin.tax._form', ['isEdit' => true])
|
||||
</form>
|
||||
|
||||
<form id="form_delete" action="{{ route('tax_delete') }}" method="POST" style="display:none;">
|
||||
@csrf
|
||||
<input type="hidden" name="pk[]" value="{{ $tax->tax_id }}">
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 消費税マスタ - 詳細')
|
||||
|
||||
@section('content')
|
||||
<!-- Content Header -->
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('tax') }}">消費税マスタ</a></li>
|
||||
<li class="breadcrumb-item active">詳細</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<form>
|
||||
@include('admin.tax._form', [
|
||||
'tax' => $tax,
|
||||
'isEdit' => false,
|
||||
'isInfo' => true
|
||||
])
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@ -1,5 +1,5 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', '[東京都|〇〇駐輪場] 消費税マスタ')
|
||||
@section('title', '消費税マスタ')
|
||||
|
||||
@section('content')
|
||||
<!-- Content Header -->
|
||||
@ -34,7 +34,6 @@
|
||||
<div class="container-fluid mb20">
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('tax_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $taxes->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
@ -62,19 +61,19 @@
|
||||
<form action="{{ route('tax_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
{{-- チェック + 編集 --}}
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting4='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="tax_id">
|
||||
<th class="sorting {{ ($sort=='tax_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="tax_id">
|
||||
<span>消費税ID</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='tax_percent') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="tax_percent">
|
||||
<th>
|
||||
<span>消費税率</span>
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='tax_day') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="tax_day">
|
||||
<th>
|
||||
<span>適用日</span>
|
||||
</th>
|
||||
</tr>
|
||||
@ -93,11 +92,12 @@
|
||||
<td class="sm-item text-left align-middle">
|
||||
@php
|
||||
$val = is_numeric($tax->tax_percent)
|
||||
? number_format((float)$tax->tax_percent, 2, '.', '')
|
||||
? rtrim(rtrim($tax->tax_percent, '0'), '.')
|
||||
: (string)$tax->tax_percent;
|
||||
@endphp
|
||||
{{ $val }}%
|
||||
</td>
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ optional($tax->tax_day)->format('Y-m-d') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@ -110,44 +110,4 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<form action="{{ route('tax_export') }}" method="GET" id="form_export"></form>
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
// 全選択
|
||||
document.getElementById('checkbox_all')?.addEventListener('change', function(e){
|
||||
document.querySelectorAll('.checkbox').forEach(cb => cb.checked = e.target.checked);
|
||||
});
|
||||
|
||||
// 削除確認
|
||||
document.getElementById('delete')?.addEventListener('click', function(){
|
||||
const anyChecked = Array.from(document.querySelectorAll('.checkbox')).some(cb => cb.checked);
|
||||
if (!anyChecked) {
|
||||
alert('削除対象が選択されていません。');
|
||||
return;
|
||||
}
|
||||
if (confirm('削除してよろしいですか?')) {
|
||||
document.getElementById('form_delete').submit();
|
||||
}
|
||||
});
|
||||
|
||||
// ヘッダクリックでソート
|
||||
document.querySelectorAll('th.sorting').forEach(th => {
|
||||
th.addEventListener('click', function(){
|
||||
const form = document.getElementById('list-form');
|
||||
const current = "{{ $sort ?? '' }}";
|
||||
const currentType = "{{ $sort_type ?? '' }}";
|
||||
const nextCol = this.getAttribute('sort');
|
||||
let nextType = 'asc';
|
||||
if (current === nextCol) {
|
||||
nextType = (currentType === 'asc') ? 'desc' : 'asc';
|
||||
}
|
||||
form.querySelector('[name=sort]').value = nextCol;
|
||||
form.querySelector('[name=sort_type]').value = nextType;
|
||||
form.submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endsection
|
||||
|
||||
Loading…
Reference in New Issue
Block a user