@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%;
            }
            .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%;
            }
            .font>li>a{
                font-size: 12px;
            }
        </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" style="text-align: right">项目名称：</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"  style="text-align: right">编号：</div>
                        <div class="col-sm-2">
                            <input name="num" style="margin: 0px;" class="form-control" type="text" placeholder="必填项" value="{{ $table->num }}">
                        </div><br><br>
                    </div>
                    <div class="row">
                        <div class="col-sm-12">
                                @if(count($errors)>0)
                                    <div class="callout callout-danger">
                                        @if(is_object($errors))
                                            @foreach($errors->all() as $error)
                                                <p>{{ $error }}</p>
                                            @endforeach
                                        @else
                                            <p>{{ $errors }}</p>
                                        @endif
                                    </div>
                                @endif
                            <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>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td colspan="2" width="20%">被征收人姓名：</td>
                                    <td colspan="2" ><input name="bzc_name" class="form-control" type="text" placeholder="" value="{{ $table->bzc_name }}"></td>
                                    <td colspan="2" width="20%" >被征收房屋地址</td>
                                    <td colspan="2" ><input name="bzc_addr" class="form-control" type="text" placeholder="" value="{{ $table->bzc_addr }}"></td>
                                </tr>
                                <tr>
                                    <td colspan="2" width="20%">联系电话：</td>
                                    <td colspan="2" ><input name="bzc_tel" class="form-control" type="text" placeholder="" value="{{ $table->bzc_tel }}"></td>
                                    <td colspan="2" width="20%" >被征收人身份证号码：</td>
                                    <td colspan="2" ><input name="bzc_cardid" class="form-control" type="text" placeholder="" value="{{ $table->bzc_cardid }}"></td>
                                </tr>
                                <tr>
                                    <td colspan="2" width="20%">产权性质：</td>
                                    <td colspan="2" ><input name="property" class="form-control" type="text" placeholder="" value="{{ $table->property }}"></td>
                                    <td colspan="2" width="20%" >用途：</td>
                                    <td colspan="2" ><input name="used" class="form-control" type="text" placeholder="" value="{{ $table->used }}"></td>
                                </tr>
                                <tr>
                                    <td width="10%">拆迁补偿总金额：</td>
                                    <td colspan="7">￥ <input name="total_money" class="form-control" type="text" placeholder="" value="{{ $table->total_money }}" >（ 元 ）</td>
                                </tr>
                                <tr>
                                    <td rowspan="3" colspan="2">货币化安置</td>
                                    <td>房屋类别</td>
                                    <td>购买存量房面积（㎡）</td>
                                    <td>购买存量房单价（元/㎡）</td>
                                    <td>购买存量房价格（元）</td>
                                    <td>应交差额（元）</td>
                                    <td>应退差额</td>
                                </tr>
                                <tr>
                                    <td>住宅</td>
                                    <td><input name="home_area" class="form-control" type="text" placeholder="" value="{{ $table->home_area }}"></td>
                                    <td><input name="money_home_dprice" class="form-control" type="text" placeholder="" value="{{$table->money_home_dprice}}"></td>
                                    <td><input name="money_home_price" class="form-control" type="text" placeholder="" value="{{$table->money_home_price}}"></td>
                                    <td><input name="money_home_jchae" class="form-control" type="text" placeholder="" value="{{ $table->money_home_jchae }}"></td>
                                    <td><input name="money_home_tchae" class="form-control" type="text" placeholder="" value="{{ $table->money_home_tchae }}"></td>
                                </tr>
                                <tr>
                                    <td>商业</td>
                                    <td><input name="money_bus_area" class="form-control" type="text" placeholder="" value="{{ $table->money_bus_area }}"></td>
                                    <td><input name="money_bus_dprice" class="form-control" type="text" placeholder="" value="{{ $table->money_bus_dprice }}"></td>
                                    <td><input name="money_bus_price" class="form-control" type="text" placeholder="" value="{{ $table->money_bus_price }}"></td>
                                    <td><input name="money_bus_jchae" class="form-control" type="text" placeholder="" value="{{ $table->money_bus_jchae }}"></td>
                                    <td><input name="money_bus_tchae" class="form-control" type="text" placeholder="" value="{{ $table->money_bus_tchae }}"></td>
                                </tr>
                                <tr>
                                    <td>购买房屋位置</td>
                                    <td colspan="7"><input name="home_addr" class="form-control" type="text" placeholder="" value="{{ $table->home_addr }}"></td>
                                </tr>
                                <tr style="height: 5em">
                                    <td rowspan="2" colspan="2" >征收实施单位<input name="data1" value="{{ $table->data1 }}" class="form-control" type="text"></td>
                                    <td colspan="4"> 购房人：<input name="data2" value="{{ $table->data2 }}" class="form-control" type="text"></td>
                                    <td colspan="2">代理人：<input name="data3" value="{{ $table->data3 }}" class="form-control" type="text"></td>
                                </tr>
                                <tr>
                                    <td colspan="6">签约时间：<input name="table_time" class="form-control" type="text" placeholder="" value="{{ $table->table_time }}"></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 class="row">
                                <div class="col-sm-8"></div>
                                <div class="col-sm-4">
                                    @if($table->judge > 6)
                                        <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>
                    </div>
                </div>
    </form>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->

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