@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>

    <!--左侧菜单栏-->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    @if($user->thumb == ' '||$user->thumb==null)
                        <img src="{{asset('img/arr.jpg')}}" class="img-circle" alt="User Image">
                    @else
                        <img src="{{asset($user->thumb)}}" class="img-circle" alt="User Image">
                    @endif                </div>
                <div class="pull-left info">
                    <p>{{ $role->display_name }}</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!-- search form -->
            <form action="{{ url('/search/') }}" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="search" class="form-control" placeholder="Search...">
              <span class="input-group-btn">
                <button type="submit"   id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
                <li class="header">菜单栏</li>
                <li class="treeview">
                    <a href="{{ url('/') }}">
                        <i class="fa fa-home"></i>
                        <span>信息汇总</span>
                    </a>
                </li>
                <li class="treeview active">
                    <a href="#">
                        <i class="fa fa-files-o"></i>
                        <span>项目申请</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li class="active"><a href="{{ url('/table') }}"><i class="fa  fa-file-text-o"></i>受理案件
                                <i class="fa fa-angle-left pull-right"></i></a>
                            <ul class="treeview-menu">
                                <li><a href="{{ url('/table/1') }}"><i class="fa fa-circle-o"></i>安置单(货币化安置)</a></li>
                                <li><a href="{{ url('/table/2') }}"><i class="fa fa-circle-o"></i>违章建筑自行拆除费用申领表</a></li>
                                <li><a href="{{ url('/table/3') }}"><i class="fa fa-circle-o"></i>残疾人房征补贴审批确认单</a></li>
                                <li><a href="{{ url('/table/4') }}"><i class="fa fa-circle-o"></i>房屋征收提前搬迁奖励单</a></li>
                                <li><a href="{{ url('/table/5') }}"><i class="fa fa-circle-o"></i>逾期过渡安置补助费发放单</a></li>
                                <li class="active"><a href="{{ url('/table/6') }}"><i class="fa fa-circle-o"></i>房屋征收安置补贴单</a></li>
                                <li><a href="{{ url('/table/7') }}"><i class="fa fa-circle-o"></i>核算单（货币化安置）</a></li>
                                <li><a href="{{ url('/table/8') }}"><i class="fa fa-circle-o"></i>核算单（产权调换）</a></li>
                                <li><a href="{{ url('/table/9') }}"><i class="fa fa-circle-o"></i>核算单（货币补偿）</a></li>
                            </ul>
                        </li>
                        <li><a href="{{ url('/on_table') }}"><i class="fa fa-circle-o"></i>待办案件</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="{{ url('/search/show') }}">
                        <i class="fa  fa-search"></i>
                        <span>案件追踪</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-cogs"></i>
                        <span>系统设置</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="{{ url('/user_list') }}">
                                <i class="fa fa-circle-o"></i>
                                <span>用户管理</span></a>
                        </li>
                        <li><a href="{{ url('/job') }}">
                                <i class="fa fa-circle-o"></i>
                                <span>职位管理</span>
                            </a>
                        </li>
                        <li><a href="{{ url('/project') }}">
                                <i class="fa fa-circle-o"></i>
                                <span>项目管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>
    <!-- =============================================== -->
    <!-- 内容 -->
    <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 style="margin: 0px;" name="num" value="{{ $table->num }}" 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>
                                    </tr>
                                    <tr>
                                        <td>被征收户姓名</td>
                                        <td><input name="bzc_name" value="{{ $table->bzc_name }}" class="form-control" type="text" placeholder=""></td>
                                        <td>被征收房屋住址</td>
                                        <td colspan="2"><input name="bzc_addr" value="{{ $table->bzc_addr }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>联系电话</td>
                                        <td><input name="bzc_tel" value="{{ $table->bzc_tel }}" class="form-control" type="text" placeholder=""></td>
                                        <td>被征收人身份证号</td>
                                        <td><input name="bzc_cardid" value="{{ $table->bzc_cardid }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>临时安置费</td>
                                        <td colspan="3"><input name="anzhi" value="{{ $table->anzhi }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>搬迁费</td>
                                        <td colspan="3"><input name="banqian" value="{{ $table->banqian }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>低保补贴</td>
                                        <td colspan="3"><input name="dibu" value="{{ $table->dibu }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>其他</td>
                                        <td colspan="3"><input name="other" value="{{ $table->other }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>补贴总金额</td>
                                        <td colspan="3">￥：<input name="totalj" value="{{ $table->totalj }}" class="form-control" type="text" placeholder="">（元）</td>
                                    </tr>
                                    <tr>
                                        <td>约定</td>
                                        <td colspan="3">1.待回迁楼建成交钥匙时，征收当事人根据双方实际逾期月数，据实结算安置过渡补助费差价。
                                            <br><input name="yueding" value="{{ $table->yueding }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">征收人<textarea name="zc" style="width: 80%;height: 100px;">{{ $table->zc }}</textarea></td>
                                        <td colspan="2">被征收人<input name="bzc" value="{{ $table->bzc }}" class="form-control" type="text" placeholder=""></td>
                                        <td>代理人<input name="daili" value="daili" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">签约时间：<input name="table_time" value="{{ $table->table_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-4"></div>
                                    <div class="col-sm-4"></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