123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404 |
- @extends('layouts.admin')
- @section('content')
- {{--修改表格--}}
- @include('admin.table.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" id="print">
- {{--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 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>
- <?php $i = 1; $k = 1; $h = 0?>
- @if(is_array($table->jsons)||is_object($table->jsons))
- @foreach($table->jsons as $value)
- <tr>
- <td width="10%">拆迁补偿总金额:</td>
- <td colspan="5"><input disabled id="total_money_2" class="form-control" type="text" placeholder="">( 元 )</td>
- <td colspan="2"><input value="{{ $value->total_money }}" id="total_money_1" name="total_money" class="form-control <?php echo 'next'.$h++ ?> total_money_1" type="text" placeholder="小写" onchange="NoToChinese(this.value,this)" >(元)</td>
- </tr>
- <tr>
- <td rowspan="4" colspan="2">货币化安置</td>
- <td>房屋类别</td>
- <td>购买存量房面积(㎡)</td>
- <td>购买存量房单价(元/㎡)</td>
- <td>购买存量房价格(元)</td>
- <td>应退差额(元)</td>
- <td>应交差额(元)</td>
- </tr>
- <tr>
- <td rowspan="2">住宅</td>
- <td><input name="home_area" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $value->home_area }}" onchange="get_product(home_area,money_home_dprice,money_home_price)">
- </td>
- <td><input name="money_home_dprice" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{$value->money_home_dprice}}" onchange="get_product(home_area,money_home_dprice,money_home_price)">
- </td>
- <td><input name="money_home_price" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{$value->money_home_price}}" onclick="get_product(home_area,money_home_dprice,money_home_price)">
- </td>
- <td rowspan="3"><input name="money_home_tchae" id="money_home_tchae" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $value->money_home_tchae }}" onclick="jian(money_home_price,money_home_price2,money_bus_price,total_money)">
- </td>
- <td rowspan="3"><input name="money_home_jchae" id="money_home_jchae" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $value->money_home_jchae }}" onclick="jian(money_home_price,money_home_price2,money_bus_price,total_money)">
- </td>
- </tr>
- <tr>
- <td><input name="home_area2" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $value->home_area2 }}" onchange="get_product(home_area2,money_home_dprice2,money_home_price2)">
- </td>
- <td><input name="money_home_dprice2" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $value->money_home_dprice2 }}" onchange="get_product(home_area2,money_home_dprice2,money_home_price2)">
- </td>
- <td><input name="money_home_price2" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $value->money_home_price2 }}" onclick="get_product(home_area2,money_home_dprice2,money_home_price2)">
- </td>
- </tr>
- <tr>
- <td>商业</td>
- <td><input name="money_bus_area" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $value->money_bus_area }}" onchange="get_product(money_bus_area,money_bus_dprice,money_bus_price)">
- </td>
- <td><input name="money_bus_dprice" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $value->money_bus_dprice }}" onchange="get_product(money_bus_area,money_bus_dprice,money_bus_price)">
- </td>
- <td><input name="money_bus_price" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $value->money_bus_price }}" onclick="get_product(money_bus_area,money_bus_dprice,money_bus_price)">
- </td>
- </tr>
- <tr>
- <td>购买房屋位置</td>
- <td colspan="7"><input name="home_addr" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $value->home_addr }}">
- </td>
- </tr>
- @endforeach
- @else
- <tr>
- <td width="10%">拆迁补偿总金额:</td>
- <td colspan="5"><input disabled id="total_money_2" class="form-control" type="text" placeholder="">( 元 )</td>
- <td colspan="2"><input value="{{ $table->total_money }}" id="total_money_1" name="total_money" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="小写" onchange="NoToChinese(this.value,this)" >(元)</td>
- </tr>
- <tr>
- <td rowspan="4" colspan="2">货币化安置</td>
- <td>房屋类别</td>
- <td>购买存量房面积(㎡)</td>
- <td>购买存量房单价(元/㎡)</td>
- <td>购买存量房价格(元)</td>
- <td>应退差额(元)</td>
- <td>应交差额(元)</td>
- </tr>
- <tr>
- <td rowspan="2">住宅</td>
- <td><input name="home_area" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $table->home_area }}" onchange="get_product(home_area,money_home_dprice,money_home_price)">
- </td>
- <td><input name="money_home_dprice" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{$table->money_home_dprice}}" onchange="get_product(home_area,money_home_dprice,money_home_price)">
- </td>
- <td><input name="money_home_price" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{$table->money_home_price}}" onclick="get_product(home_area,money_home_dprice,money_home_price)">
- </td>
- <td rowspan="3"><input name="money_home_tchae" id="money_home_tchae" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $table->money_home_tchae }}" onclick="jian(money_home_price,money_home_price2,money_bus_price,total_money)">
- </td>
- <td rowspan="3"><input name="money_home_jchae" id="money_home_jchae" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $table->money_home_jchae }}" onclick="jian(money_home_price,money_home_price2,money_bus_price,total_money)">
- </td>
- </tr>
- <tr>
- <td><input name="home_area2" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $table->home_area2 }}" onchange="get_product(home_area2,money_home_dprice2,money_home_price2)">
- </td>
- <td><input name="money_home_dprice2" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $table->money_home_dprice2 }}" onchange="get_product(home_area2,money_home_dprice2,money_home_price2)">
- </td>
- <td><input name="money_home_price2" class="form-control <?php echo 'next'.$h++ ?>" type="text" value="{{ $table->money_home_price2 }}" onclick="get_product(home_area2,money_home_dprice2,money_home_price2)">
- </td>
- </tr>
- <tr>
- <td>商业</td>
- <td><input name="money_bus_area" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $table->money_bus_area }}" onchange="get_product(money_bus_area,money_bus_dprice,money_bus_price)">
- </td>
- <td><input name="money_bus_dprice" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $table->money_bus_dprice }}" onchange="get_product(money_bus_area,money_bus_dprice,money_bus_price)">
- </td>
- <td><input name="money_bus_price" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $table->money_bus_price }}" onclick="get_product(money_bus_area,money_bus_dprice,money_bus_price)">
- </td>
- </tr>
- <tr>
- <td>购买房屋位置</td>
- <td colspan="7"><input name="home_addr" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="" value="{{ $table->home_addr }}">
- </td>
- </tr>
- @endif
- <tr >
- <td rowspan="2" colspan="2" style="height: 90px;">征收实施单位(章)</td>
- <td>被征收人(签字)</td>
- <td colspan="2"> </td>
- <td>代理人(签字)</td>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td>签约时间</td>
- <td colspan="5"><input readonly id="table_time" name="table_time" class="form-control" type="hidden" placeholder=""></td>
- </tr>
- </tbody>
- </table>
- <div class="row">
- <div class="col-sm-4">核算(签字):<input name="hesuan" style="border: none #ffffff;border-bottom: #777777 solid 1px;" type="text" placeholder=""></div>
- <div class="col-sm-4">初审(签字):<input disabled style="border: none #ffffff;border-bottom: #777777 solid 1px;" ></div>
- <div class="col-sm-4">监审(签字):<input disabled style="border: none #ffffff;border-bottom: #777777 solid 1px;" ></div>
- </div><br><div class="row">
- <div class="col-sm-4">复核(签字):<input name="fuhe" style="border: none #ffffff;border-bottom: #777777 solid 1px;" type="text" value="{{ $table->fuhe }}" placeholder=""></div>
- <div class="col-sm-4">初审(签字):<input style="border: none #ffffff;border-bottom: #777777 solid 1px;" ></div>
- <div class="col-sm-4">监审(签字):<input style="border: none #ffffff;border-bottom: #777777 solid 1px;" ></div>
- </div><br>
- <div class="row">
- <div class="col-sm-8">提交说明 : <label id="sub_description">{{ $table->sub_description }}</label></div>
- </div>
- </div>
- </div>
- </div>
- {{--model--}}
- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title" id="myModalLabel">提交说明</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <textarea class="form-control" id="model_des" name="sub_description" placeholder="输入您的内容..."></textarea>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
- <button id="sub" type="submit" class="btn btn-primary" onclick="javascript:this.form.action='{{ url('/table/sub/'.$table_id) }}'">提交</button>
- </div>
- </div>
- </div>
- </div>
- {{--end model--}}
- <script type="text/javascript">
- $("#table_time").datetimepicker({
- language: 'zh',
- format: 'yyyy年mm月dd日',
- minView:'month'
- }).on('changeDate',function(){
- $(".datetimepicker").hide();
- });
- $(function(){
- $('.total_money_1').each(function () {
- NoToChinese(this.value,this)
- });
- // var num =$('#total_money_1').val();
- // var AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
- // var BB = new Array("", "拾", "佰", "仟", "萬", "億", "点", "");
- // var a = ("" + num).replace(/(^0*)/g, "").split("."), k = 0, re = "";
- // for (var i = a[0].length - 1; i >= 0; i--) {
- // switch (k) {
- // case 0: re = BB[7] + re; break;
- // case 4: if (!new RegExp("0{4}\\d{" + (a[0].length - i - 1) + "}$").test(a[0]))
- // re = BB[4] + re; break;
- // case 8: re = BB[5] + re; BB[7] = BB[5]; k = 0; break;
- // }
- // if (k % 4 == 2 && a[0].charAt(i + 2) != 0 && a[0].charAt(i + 1) == 0) re = AA[0] + re;
- // if (a[0].charAt(i) != 0) re = AA[a[0].charAt(i)] + BB[k % 4] + re; k++;
- // }
- //
- // if (a.length > 1) //加上小数部分(如果有小数部分)
- // {
- // re += BB[6];
- // for (var i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
- // }
- //
- // $('#total_money_2').val(re);
- });
- function jian(I,P,Q,total){
- var result;
- if ($(I).val() == ''){$(I).val(0);}
- if ($(P).val() == ''){$(P).val(0);}
- if ($(Q).val() == ''){$(Q).val(0);}
- if ($(total).val() == ''){$(total).val(0);}
- result = parseFloat($(total).val()) - ( parseFloat($(I).val())+parseFloat($(P).val())+parseFloat($(Q).val()) );
- result = Math.round(result);
- if(result >= 0){
- $('#money_home_tchae').val(result);
- $('#money_home_jchae').val('');
- }else{
- $('#money_home_tchae').val('');
- $('#money_home_jchae').val(result*(-1));
- }
- }
- function get_product(left,right,product){
- var result = (left.value*right.value);
- product.value = result.toFixed(0);
- }
- function NoToChinese(num,add) {
- if (!/^\d*(\.\d*)?$/.test(num)) { alert("Number is wrong!"); return "Number is wrong!"; }
- var AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
- var BB = new Array("", "拾", "佰", "仟", "萬", "億", "点", "");
- var a = ("" + num).replace(/(^0*)/g, "").split("."), k = 0, re = "";
- for (var i = a[0].length - 1; i >= 0; i--) {
- switch (k) {
- case 0: re = BB[7] + re; break;
- case 4: if (!new RegExp("0{4}\\d{" + (a[0].length - i - 1) + "}$").test(a[0]))
- re = BB[4] + re; break;
- case 8: re = BB[5] + re; BB[7] = BB[5]; k = 0; break;
- }
- if (k % 4 == 2 && a[0].charAt(i + 2) != 0 && a[0].charAt(i + 1) == 0) re = AA[0] + re;
- if (a[0].charAt(i) != 0) re = AA[a[0].charAt(i)] + BB[k % 4] + re; k++;
- }
- if (a.length > 1) //加上小数部分(如果有小数部分)
- {
- re += BB[6];
- for (var i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
- }
- $(add).parent().parent().children('td').children('input').eq(0).val(re);
- // $('#total_money_2').val(re);
- }
- var jsons = [];
- function getdata(){
- for (var j = 0; j <{{ count($table->jsons)}}; j++) {
- var json = {};
- $(".next" + j).each(function () {
- json[this.name] = this.value;
- });
- jsons.push(json);
- }
- console.log(jsons);
- return jsons;
- }
- $('form').submit(function(){
- jsons = getdata();
- var temp = JSON.stringify(jsons);
- $('#json').val(temp);
- console.log(temp);
- return true;
- });
- function printed(printpage)
- {
- $('#bottom_button').hide();
- var headstr = "<html><head><title></title></head><body>";
- var footstr = "</body>";
- var newstr = document.all.item(printpage).innerHTML;
- var oldstr = document.body.innerHTML;
- document.body.innerHTML = headstr+newstr+footstr;
- window.print();
- document.body.innerHTML = oldstr;
- $('#bottom_button').show();
- return false;
- }
- </script>
- <div class="row" id="bottom_button">
- <div class="col-sm-8"></div>
- <div class="col-sm-4">
- @if($table->status == null || $table->status<3)
- @if($user->role == 0 && $table->status == 0)
- <button id="sub" type="submit" onclick="javascript:this.form.action='{{ url('/table/save/'.$table_id.'/update') }}'" class="btn btn-success">
- 保存</button>
- @endif
- @if($user->role == $table->status)
- @if($table->status == 0)
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">提交</button>
- @else
- <button id="sub" type="submit" onclick="javascript:this.form.action='{{ url('/table/sub/'.$table_id) }}'" class="btn btn-primary">
- 提交</button>
- <a href="{{ url('/back/?table_type_id='.$table_type_id.'&table_id='.$table_id) }}" class="btn btn-danger">驳回</a>
- @endif
- @endif
- <a href="{{ url('/on_table') }}" class="btn btn-info">返回</a>
- <a href="{{ url('/print/'.$table_id) }}" target="_blank" class="btn btn-success">打印</a>
- @else
- <a href="{{ url('/') }}" class="btn btn-info">返回</a>
- <a href="{{ url('/print/'.$table_id) }}" target="_blank" class="btn btn-success">打印</a>
- @endif
- </div>
- </div>
- </form>
- </div>
- <!-- /.box-body -->
- </div>
- <!-- /.box -->
- </section>
- <!-- /.content -->
- </div>
- <!-- /.content-wrapper -->
- @endsection
|