@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 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>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>被征收户姓名</td>
                                        <td colspan="2"><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 colspan="2"><input name="bzc_tel" value="{{ $table->bzc_tel }}" class="form-control" type="text" placeholder=""></td>
                                        <td>被征收人身份证号</td>
                                        <td colspan="2"><input name="bzc_cardid" value="{{ $table->bzc_cardid }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>产权性质</td>
                                        <td colspan="2"><input name="chanquan" value="{{ $table->chanquan }}" class="form-control" type="text" placeholder=""></td>
                                        <td>用 途</td>
                                        <td colspan="2"><input name="used" value="{{ $table->used }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>证件名称</td>
                                        <td>建设用地通知书（批准书）</td>
                                        <td>建设用地规划许可证</td>
                                        <td>建设工程规划许可证</td>
                                        <td>国有土地使用证</td>
                                        <td>房屋所有权证</td>
                                    </tr>
                                    <tr>
                                        <td>证号</td>
                                        <td><input name="tongzhi_id" value="{{ $table->tongzhi_id }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="yongdi_id" value="{{ $table->yongdi_id }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="gongchen_id" value="{{ $table->gongchen_id }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="shiyong_id" value="{{ $table->shiyong_id }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="suoyou_id" value="{{ $table->suoyou_id }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">被征收房屋面积</td>
                                        <td>可置换住宅面积（㎡）</td>
                                        <td>可置换商业面积（㎡）</td>
                                        <td colspan="2">房务补偿额（元）</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">住宅有证面积：</td>
                                        <td><input name="bzc_area" value="{{ $table->bzc_area }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data2" value="{{ $table->data2 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data3" value="{{ $table->data3 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data4" value="{{ $table->data4 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">无证面积：</td>
                                        <td><input name="data5" value="{{ $table->data5 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data6" value="{{ $table->data6 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data7" value="{{ $table->data7 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data8" value="{{ $table->data8 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">其中住改非：</td>
                                        <td><input name="data9" value="{{ $table->data9 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data10" value="{{ $table->data10 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data11" value="{{ $table->data11 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data12" value="{{ $table->data12 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">商业有证面积：</td>
                                        <td><input name="data13" value="{{ $table->data13 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data14" value="{{ $table->data14 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data15" value="{{ $table->data15 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data16" value="{{ $table->data16 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><input name="data_other" value="{{ $table->data_other }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data17" value="{{ $table->data17 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data18" value="{{ $table->data18 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data19" value="{{ $table->data19 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data20" value="{{ $table->data20 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">小 计：</td>
                                        <td><input name="data21" value="{{ $table->data21 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data22" value="{{ $table->data22 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data23" value="{{ $table->data23 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data24" value="{{ $table->data24 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">装修补偿额：<input name="data25" value="{{ $table->data25 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">庭院补偿额：<input name="data26" value="{{ $table->data26 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">停产停业损失补偿额：<input name="data27" value="{{ $table->data27 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td rowspan="5">构筑物及其他补偿金</td>
                                        <td colspan="2"><input name="data28" value="{{ $table->data28 }}" class="form-control" type="text" placeholder=""></td>
                                        <td colspan="2"><input name="data29" value="{{ $table->data29 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data30" value="{{ $table->data30 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><input name="data31" value="{{ $table->data31 }}" class="form-control" type="text" placeholder=""></td>
                                        <td colspan="2"><input name="data32" value="{{ $table->data32 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data33" value="{{ $table->data33 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><input name="data34" value="{{ $table->data34 }}" class="form-control" type="text" placeholder=""></td>
                                        <td colspan="2"><input name="data35" value="{{ $table->data35 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data36" value="{{ $table->data36 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><input name="data37" value="{{ $table->data37 }}" class="form-control" type="text" placeholder=""></td>
                                        <td colspan="2"><input name="data38" value="{{ $table->data38 }}" class="form-control" type="text" placeholder=""></td>
                                        <td><input name="data39" value="{{ $table->data39 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr><tr>
                                        <td colspan="2"><input name="data40" value="{{ $table->data40 }}" class="form-control" type="text" placeholder=""></td>
                                        <td colspan="2"><input name="data41" value="{{ $table->data41 }}" class="form-control" type="text" placeholder=""></td>
                                        <td>小 计：<input name="data42" value="{{ $table->data42 }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td>拆迁补偿总金额</td>
                                        <td colspan="5">￥<input name="data43" value="{{ $table->data43 }}" class="form-control" type="text" placeholder="">（元）</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2" colspan="2">征收人<br><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 colspan="2">代理人<input name="daili" value="{{ $table->daili }}" class="form-control" type="text" placeholder=""></td>
                                    </tr>
                                    <tr>
                                        <td colspan="4">签约时间：<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-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