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.

89 lines
3.9 KiB

2 years ago
@extends("admin.layouts.layout")
@section("content")
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="mb-3">
2 years ago
<form class="form-inline" id="search-form" autocomplete="off">
2 years ago
<a class="btn btn-primary" href="{{url($urlPrefix.'/asksubmit_create?project_id='.$project_id)}}">
2 years ago
@lang("icons.action_create") @lang('actions.create')新建满意度调查
</a>&nbsp;&nbsp;&nbsp;
2 years ago
<button class="btn btn-primary ml-1" type="button" onclick="doExport(this)">导出</button>&nbsp;&nbsp;
2 years ago
<select class="form-control mr-1" name="project_id"
onchange="$(this).closest('form').submit()">
@foreach($projects as $pp)
<option
value="{{$pp->id}}" @if($pp->id == $project_id) {{ "selected" }}@endif>{{$pp->name}}</option>
@endforeach
</select>
</form>
2 years ago
2 years ago
</div>
2 years ago
2 years ago
<table class="table table-bordered" id="data-table">
<thead>
<tr>
<th>
2 years ago
日期
2 years ago
</th>
2 years ago
<th>名字</th>
2 years ago
<th>医院</th>
2 years ago
<th>详情</th>
2 years ago
<th>建议</th>
2 years ago
<th>总分</th>
<th>操作</th>
</tr>
</thead>
<tbody>
@foreach ($data as $row)
<tr data-id="{{$row->id}}">
2 years ago
<td>
2 years ago
{{ $row->date }}
2 years ago
</td>
2 years ago
<td>
2 years ago
@if(!$row->mobile)
2 years ago
{{ $row->admin->name }}
@else
{{ $row->name }}({{ $row->mobile }})
@endif
2 years ago
</td>
2 years ago
<td>{{ $row->project->name }}</td>
2 years ago
<td>
2 years ago
@foreach ($row->content as $item)
2 years ago
{{ $item['ask'] }}{{ $item['score'] }}<br/>
2 years ago
@endforeach
</td>
2 years ago
<td>{{ $row->tip }}</td>
2 years ago
<td>{{ $row->score }}</td>
<td>
2 years ago
<a class="btn btn-sm btn-primary"
href="{{url("{$urlPrefix}/asksubmit_edit?id={$row['id']}")}}">@lang("icons.action_edit") @lang("actions.edit")</a>
2 years ago
<a class="btn btn-sm btn-danger btn-delete" data-id="ask-{{$row['id']}}"
2 years ago
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
@push("footer")
<script>
2 years ago
function doExport(ele) {
2 years ago
var url = window.location.href;
url += window.location.search ? ("&export=1") : ("?export=1");
2 years ago
window.open(url);
}
2 years ago
</script>
@endpush