You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.9 KiB
65 lines
2.9 KiB
@extends("admin.layouts.layout")
|
|
|
|
@section("content")
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="mb-3">
|
|
<a class="btn btn-primary" href="{{ url($urlPrefix . '/create') }}">
|
|
@lang("icons.action_create") @lang('actions.create'){{ $modelName }}
|
|
</a>
|
|
@if(request()->project_id)
|
|
<a class="btn btn-light" href="{{ url($urlPrefix) }}">
|
|
查看全部项目
|
|
</a>
|
|
@endif
|
|
</div>
|
|
|
|
<table class="table table-bordered" id="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>项目名称</th>
|
|
<th>日期</th>
|
|
<th>节假日倍率</th>
|
|
<th>备注</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php($currentProjectId = null)
|
|
@foreach ($data as $row)
|
|
@if($currentProjectId !== $row->project_id)
|
|
@php($currentProjectId = $row->project_id)
|
|
<tr class="table-active">
|
|
<td colspan="6">
|
|
<strong>项目:</strong>{{ optional($row->project)->name ?: '未设置项目' }}
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
<tr data-id="{{ $row->id }}">
|
|
<td>{{ $row->id }}</td>
|
|
<td>{{ optional($row->project)->name }}</td>
|
|
<td>{{ $row->date }}</td>
|
|
<td>{{ $row->price_ratio }}</td>
|
|
<td>{{ $row->remark }}</td>
|
|
<td>
|
|
<a class="btn btn-sm btn-primary"
|
|
href="{{ url("{$urlPrefix}/edit?id={$row['id']}") }}">@lang("icons.action_edit") @lang("actions.edit")</a>
|
|
<a class="btn btn-sm btn-danger btn-delete" data-id="{{ $row['id'] }}"
|
|
href="javascript:;">@lang("icons.action_delete") @lang("actions.delete")</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@include("public._pages")
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@include("public._delete")
|
|
@endsection
|