@extends('layouts.admin')
@section('content')


    {{--修改表格--}}
    <style>
        .table-bordered>tbody>tr>td,.table-bordered>thead:first-child>tr:first-child>th{
            border: 1px solid #585858;
            font-weight: bold;
            text-align: center;
            font-size: 16px;
            overflow:hidden;
            width: 12%;
            padding: 15px 0px 15px 0px;
        }
        .table>tbody>tr>td{
            padding: 15px 0px 15px 0px;
            vertical-align: middle;
        }
        .table>tbody:first-child>tr>td{
            padding: 0px;
        }
        .table>tbody>tr>td>.form-control{
            margin: 15px 0px 15px 0px;
            width: 80%;
        }
    </style>

    <!--左侧菜单栏-->
@include('admin.left-sidebar')
    <!-- 内容 -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                受理案件
                <small> </small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{ url('/')}}"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">项目申请</a></li>
                <li><a href="{{ url('/table') }}">受理案件</a></li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <!-- Default box -->
            <div class="box">
                <div class="box-header">

                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    {{--content--}}
                    <div class="row" style="text-align: center">
                        <h3>海勃湾区残疾人房屋征收补贴审批确认单</h3><br>
                    </div>
                    <form action="" method="post">
                        {{ csrf_field() }}
                    <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-2">项目名称：</div>
                            <div class="col-sm-7">
                                <select name="project_name" class="form-control">
                                    <option value=" "></option>
                                    @foreach($project as $data)
                                        <option value="{{ $data->project_name }}"
                                                @if($table->project_name == $data->project_name) selected @endif
                                        >{{ $data->project_name }}</option>
                                    @endforeach
                                </select>                            </div>
                            <div class="col-sm-1">编号：</div>
                            <div class="col-sm-2">
                                <input name="num" value="{{ $table->num }}" style="margin: 0px;" class="form-control" type="text" placeholder="必填项">
                            </div><br><br>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <table style="border: 1px solid #585858" id="example2" class="table table-bordered">
                                    <tbody>
                                    <tr>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>姓 名</td>
                                        <td><input name="bzc_name" value="{{ $table->bzc_name }}" class="form-control" type="text" placeholder=""></td>
                                        <td>住 址</td>
                                        <td colspan="3"><input name="bzc_addr" value="{{ $table->bzc_addr }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>残疾类别</td>
                                        <td><input name="canji_type" value="{{ $table->canji_type }}" class="form-control" type="text" placeholder=""></td>
                                        <td>等级</td>
                                        <td><input name="level" value="{{ $table->level }}" class="form-control" type="text" placeholder=""></td>
                                        <td>残疾证号</td>
                                        <td><input name="canji_num" value="{{ $table->canji_num }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>常住人口</td>
                                        <td><input name="changzhu" value="{{ $table->changzhu }}" class="form-control" type="text" placeholder=""></td>
                                        <td>残疾人数</td>
                                        <td><input name="canji" value="{{ $table->canji }}" class="form-control" type="text" placeholder=""></td>
                                        <td>联系电话</td>
                                        <td><input name="bzc_tel" value="{{ $table->bzc_tel }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>家庭基本情况</td>
                                        <td colspan="5"><textarea name="home_thing" style="width: 90%;height: 250px;">{{ $table->home_thing }}</textarea></td>
                                    </tr>
                                    <tr>
                                        <td rowspan="4">征收补贴核算</td>
                                        <td>残疾人补贴</td>
                                        <td colspan="4"><input name="canbu" value="{{ $table->canbu }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>临时安置补贴</td>
                                        <td colspan="4"><input name="linshibu" value="{{ $table->linshibu }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>搬迁补贴</td>
                                        <td colspan="4"><input name="banqianbu" value="{{ $table->banqianbu }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>合计</td>
                                        <td colspan="4"><input name="total" value="{{ $table->total }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>发证单位审核意见</td>
                                        <td colspan="2"><textarea name="fazheng"  style="width: 80%;height: 200px;" placeholder="盖章">{{ $table->fazheng }}</textarea>
                                        <br>时 间：<input name="fazheng_time" value="{{ $table->fazheng_time }}" class="form-control" type="text" placeholder=""></td>
                                        <td>征收实施单位审批意见</td>
                                        <td colspan="2"><textarea name="zc" style="width: 80%;height: 200px;" placeholder="盖章">{{ $table->zc }}</textarea>
                                        <br>时 间：<input name="zc_time" value="{{ $table->zc_time }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    </tbody>
                                </table>
                                <div class="row">
                                    <div class="col-sm-4">核算：<input disabled value="{{ $table->hesuan }}" style="display: inline" class="form-control" type="text" placeholder=""></div>
                                    <div class="col-sm-4">初审：<input disabled value="{{ $table->chushen }}" style="display: inline" class="form-control" type="text" placeholder=""></div>
                                    <div class="col-sm-4">监审：<input disabled value="{{ $table->jianshen }}" style="display: inline" class="form-control" type="text" placeholder=""></div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4">复核：<input disabled value="{{ $table->fuhe }}" style="display: inline" class="form-control" type="text" placeholder=""></div>
                                    <div class="col-sm-8">提交说明:<textarea disabled name="sub_description">{{ $table->sub_description }}</textarea></div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-8"></div>
                            <div class="col-sm-4">
                                @if($table->judge > 5)
                                    <button type="submit" onclick="javascript:this.form.action='{{ url('/table/save/'.$table_id.'/update') }}'" class="btn btn-success">
                                        保存</button>
                                    <button type="submit" onclick="javascript:this.form.action='{{ url('/table/sub/'.$table_id) }}'" class="btn btn-primary">
                                        提交</button>
                                    <a href="{{ url('/on_table') }}" class="btn btn-info">返回</a>
                                @endif
                                @if($table->status == null  || $table->status<6)
                                    @if($user->role == 0)
                                        <button type="submit" onclick="javascript:this.form.action='{{ url('/table/save/'.$table_id.'/update') }}'" class="btn btn-success">
                                            保存</button>
                                    @endif
                                    <button type="submit" onclick="javascript:this.form.action='{{ url('/table/sub/'.$table_id) }}'" class="btn btn-primary">
                                        提交</button>
                                    <a href="{{ url('/on_table') }}" class="btn btn-info">返回</a>
                                @else
                                    <a href="{{ url('/') }}" class="btn btn-info">返回</a>
                                @endif
                            </div>
                        </div>
                    </div>
                        </form>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->

        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
@endsection