Преглед изворни кода

Merge remote-tracking branch 'origin/master'

rshinesun пре 8 година
родитељ
комит
cb1dacb5e5

+ 4 - 2
app/Http/Controllers/Admin/TableController.php

xqd xqd xqd
@@ -41,9 +41,9 @@ class TableController extends CommonController
     {
         $user = session('user');
         if ($user->role == 0) {
-            $data = Tablelist::where('status', '=', '0')->where('user_id', '=', $user['id'])->orderby('id', 'asc')->paginate(10);
+            $data = Tablelist::where('status', '=', '0')->where('user_id', '=', $user['id'])->orderby('id', 'asc')->paginate(20);
         } else {
-            $data = Tablelist::where('status', '=', $user->role)->orderby('id', 'asc')->paginate(10);
+            $data = Tablelist::where('status', '=', $user->role)->orderby('id', 'asc')->paginate(20);
         }
         return view('admin.table.on_table', compact('data'));
     }
@@ -93,6 +93,7 @@ class TableController extends CommonController
 
         $child_table_data = $request->all();
         $child_table_data['status'] = '0';
+        $child_table_data['user_id'] = $user->id;
         $data['status'] = '0';
         $data['user_id'] = $user->id;
         $data['table_id'] = $table_type_id;
@@ -687,6 +688,7 @@ class TableController extends CommonController
         if ($table_type_id == 1) {
             $table = Table_one::find($child_table_id);
             $table['judge'] = $user->role;
+            $table['jsons'] = json_decode($table->json);
             return view('admin.edit_table.table_one', compact('table_id', 'table','table_type_id'));
         }
         if ($table_type_id == 2) {

BIN
public/img/bohai_top.png


+ 13 - 9
resources/views/admin/edit_table/table_eight.blade.php

xqd xqd xqd xqd xqd xqd xqd
@@ -235,6 +235,7 @@
                                         <td><input name="data39_13" value="{{ $table->data39_13 }}"  class="form-control" type="text" placeholder="" onclick="sum(data39_13)"></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 colspan="2">拆迁补偿总金额 (<?php echo $i++ ?>)</td>
@@ -256,7 +257,7 @@
                                             <td><input name="data50" value="{{ $value->data50 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                             <td><input name="data51" value="{{ $value->data51 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                             <td><input name="data51_1" value="{{ $value->data51_1 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
-                                            <td colspan="2"><textarea name="data51_2" class="form-control next" type="text" placeholder="">{{ $table->data51_2 }}</textarea></td>
+                                            <td colspan="2"><textarea name="data51_2" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="">{{ $table->data51_2 }}</textarea></td>
                                             <td><input name="data52" value="{{ $value->data52 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                         </tr>
                                         <tr>
@@ -265,7 +266,7 @@
                                             <td><input name="data54" value="{{ $value->data54 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                             <td><input name="data55" value="{{ $value->data55 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                             <td><input name="data55_1" value="{{ $value->data55_1 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
-                                            <td colspan="2"><textarea name="data55_2" class="form-control next" type="text" placeholder="">{{ $table->data55_2 }}</textarea></td>
+                                            <td colspan="2"><textarea name="data55_2" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="">{{ $table->data55_2 }}</textarea></td>
                                             <td><input name="data56" value="{{ $value->data56 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                         </tr>
                                         <tr>
@@ -277,28 +278,28 @@
                                         </tr>
                                         <tr>
                                             <td rowspan="2">住宅</td>
-                                            <td><textarea name="data57_2" class="form-control next" type="text" placeholder="">{{ $value->data57_2 }}</textarea></td>
+                                            <td><textarea name="data57_2" class="form-control  <?php echo 'next'.$h ?>" type="text" placeholder="">{{ $value->data57_2 }}</textarea></td>
                                             <td ><input name="data57" value="{{ $value->data57 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                             <td rowspan="2"><input name="data58" value="{{ $value->data58 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="" onclick="add_money(data52,data57,data57_1,this)"></td>
                                             <td colspan="2"  rowspan="3"><input id="data59" name="data59" value="{{ $value->data59 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="" onclick="jian(data43,data58,data62)"></td>
                                             <td colspan="2"  rowspan="3"><input id="data60" name="data60" value="{{ $value->data60 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="" onclick="jian(data43,data58,data62)"></td>
                                         </tr>
                                         <tr>
-                                            <td ><textarea name="data57_3" class="form-control next" type="text" >{{ $value->data57_3 }}</textarea></td>
+                                            <td ><textarea name="data57_3" class="form-control <?php echo 'next'.$h ?>" type="text" >{{ $value->data57_3 }}</textarea></td>
                                             <td><input name="data57_1" value="{{ $value->data57_1 }}" class="form-control <?php echo 'next'.$h ?>" type="text" ></td>
                                         </tr>
                                         <tr>
                                             <td rowspan="2">商业</td>
-                                            <td  ><textarea name="data61_2" class="form-control next" type="text" placeholder="">{{ $value->data61_2 }}</textarea></td>
+                                            <td  ><textarea name="data61_2" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="">{{ $value->data61_2 }}</textarea></td>
                                             <td  ><input name="data61" value="{{ $value->data61 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder=""></td>
                                             <td rowspan="2"><input name="data62" value="{{ $value->data62 }}" class="form-control <?php echo 'next'.$h ?>" type="text" placeholder="" onclick="add_money(data56,data61,data61_1,this)"></td>
                                         </tr>
                                         <tr>
-                                            <td ><textarea name="data61_3" class="form-control next" type="text" > {{ $value->data61_3 }}</textarea></td>
+                                            <td ><textarea name="data61_3" class="form-control <?php echo 'next'.$h ?>" type="text" > {{ $value->data61_3 }}</textarea></td>
                                             <td ><input name="data61_1" value="{{ $value->data61_1 }}" class="form-control <?php echo 'next'.$h ?>" type="text" ></td>
-                                            <td colspan="2"><a id="nextid" onclick="nextPage()"></a></td>
+                                            <td colspan="2"><a id="nextid" onclick="nextPage(0)"></a></td>
                                             <td colspan="2">
-                                                <textarea name="data61_4" class="form-control next" type="text">{{ $value->data61_4 }}</textarea>
+                                                <textarea name="data61_4" class="form-control <?php echo 'next'.$h ?>" type="text">{{ $value->data61_4 }}</textarea>
                                                 <input type="hidden" name="json" id="json">
                                                 <input type="hidden" name="hours" id="hours">
                                             </td>
@@ -308,6 +309,7 @@
                                             <td colspan="8"><input name="data63" value="{{ $value->data63 }}" class="form-control <?php echo 'next'.$h++ ?>" type="text" placeholder="       小区      楼号     单元      层数      室" ></td>
                                         </tr>
                                         @endforeach
+                                    @endif
                                     <tr>
                                         <td rowspan="2" colspan="2" style="height:120px;">征收实施单位(章)<br></td>
                                         <td>被征收人(签字)</td>
@@ -400,7 +402,7 @@
                 }).on('changeDate',function(){
                     $(".datetimepicker").hide();
                 });
-                function nextPage(){
+                function nextPage(num){
                     var json = [];
                     var chae = $('#data59').val();
                     //差额不够时隐藏下一页
@@ -422,6 +424,8 @@
 
                     console.log(jsons);
 
+                    if(num == 0) alert('已转下一页刷新,请继续填写表单');
+
                     return jsons;
                 }
                 var jsons = [];

+ 128 - 49
resources/views/admin/edit_table/table_one.blade.php

xqd xqd
@@ -88,55 +88,112 @@
                                     <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="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" type="text" placeholder="小写" onchange="NoToChinese(this.value)" >(元)</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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" type="text" placeholder="" value="{{ $table->home_addr }}">
-                                    </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++ ?>" type="text" placeholder="小写" onchange="NoToChinese(this.value)" >(元)</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)" >(元)</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>
@@ -264,6 +321,28 @@
 
                             $('#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();

+ 76 - 3
resources/views/admin/print/table_1_eight.blade.php

xqd xqd xqd xqd
@@ -217,6 +217,7 @@
 			<td width="90" align="center">{{ $table->data39_13 }}</td>
 		</tr>
 		<?php $i = 1; $k = 1; $h = 0?>
+		@if(is_array($table->jsons)||is_object($table->jsons))
 		@foreach($table->jsons as $value)
 	<tr height="30">
 			<td width="90" align="center" colspan="3">拆迁补偿总金额</td>
@@ -239,7 +240,7 @@
 			<td width="90" align="center">{{ $value->data50 }}</td>
 			<td width="90" align="center">{{ $value->data51 }}</td>
 			<td width="90" align="center">{{ $value->data51_1 }}</td>
-			<td  align="center" colspan="6">{{ $table->data51_2 }}</td>
+			<td  align="center" colspan="6">{{ $value->data51_2 }}</td>
 			<td width="90" align="center">{{ $value->data52 }}</td>
 		</tr>
 		<tr height="30">
@@ -248,7 +249,7 @@
 			<td width="90" align="center">{{ $value->data54 }}</td>
 			<td width="90" align="center">{{ $value->data55 }}</td>
 			<td width="90" align="center">{{ $value->data55_1 }}</td>
-			<td  align="center" colspan="6">{{ $table->data55_2 }}</td>
+			<td  align="center" colspan="6">{{ $value->data55_2 }}</td>
 			<td width="90" align="center">{{ $value->data56 }}</td>
 		</tr>
         <tr height="30">
@@ -282,13 +283,85 @@
 			<td colspan="4" align="center">{{ $value->data61_3 }}</td>
 			<td width="90" align="center">{{ $value->data61_1 }}</td>
 			<td  align="center" colspan="2">转下页</td>
-			<td  align="center" colspan="2">{{ $table->data61_4 }}</td>
+			<td  align="center" colspan="2">{{ $value->data61_4 }}</td>
 		</tr>
 		 <tr height="30">
 			<td colspan="3" align="center">调换房屋位置</td>
 			<td  align="center" colspan="10">{{ $value->data63 }}</td>
 		</tr>
 		@endforeach
+			@else
+			<tr height="30">
+				<td width="90" align="center" colspan="3">拆迁补偿总金额</td>
+				<td  align="center" colspan="7"></td>
+				<td  align="center" colspan="2">{{ $table->data43 }}</td>
+				<td width="90" align="center">元</td>
+			</tr>
+			<tr height="30">
+				<td width="90" align="center" rowspan="8">产权调换差价计算</td>
+				<td width="90" align="center">房屋类别</td>
+				<td width="90" align="center">可调换面积㎡</td>
+				<td width="90" align="center">实际可调换面积㎡</td>
+				<td width="90" align="center">大于可调换面积㎡</td>
+				<td width="90" align="center">小于可调换面积㎡</td>
+				<td  align="center" colspan="7">可调换面积价格核算(元)</td>
+			</tr>
+			<tr height="30">
+				<td width="90" align="center">住宅</td>
+				<td width="90" align="center">{{ $table->home_area }}</td>
+				<td width="90" align="center">{{ $table->data50 }}</td>
+				<td width="90" align="center">{{ $table->data51 }}</td>
+				<td width="90" align="center">{{ $table->data51_1 }}</td>
+				<td  align="center" colspan="6">{{ $table->data51_2 }}</td>
+				<td width="90" align="center">{{ $table->data52 }}</td>
+			</tr>
+			<tr height="30">
+				<td width="90" align="center">商业</td>
+				<td width="90" align="center">{{ $table->data53 }}</td>
+				<td width="90" align="center">{{ $table->data54 }}</td>
+				<td width="90" align="center">{{ $table->data55 }}</td>
+				<td width="90" align="center">{{ $table->data55_1 }}</td>
+				<td  align="center" colspan="6">{{ $table->data55_2 }}</td>
+				<td width="90" align="center">{{ $table->data56 }}</td>
+			</tr>
+			<tr height="30">
+				<td width="90" align="center">房屋类别</td>
+				<td  align="center" colspan="5">大于可调换面积价格核算(元)</td>
+				<td  align="center" colspan="2">调换房屋价格(元)</td>
+				<td  align="center" colspan="2">应退差额(元)</td>
+				<td  align="center" colspan="2">应缴差额(元)</td>
+			</tr>
+			<tr height="30">
+				<td width="90" align="center" rowspan="2">住宅</td>
+				<td colspan="4" align="center">{{ $table->data57_2 }}</td>
+				<td width="90" align="center">{{ $table->data57 }}</td>
+				<td width="90" align="center" rowspan="2">{{ $table->data58 }}</td>
+				<td width="90" align="center" rowspan="2">元</td>
+				<td width="90" align="center" rowspan="3" colspan="2">{{ $table->data59 }}</td>
+				<td width="90" align="center" rowspan="3" colspan="2">{{ $table->data60 }}</td>
+			</tr>
+			<tr height="30">
+				<td colspan="4" align="center">{{ $table->data57_3 }}</td>
+				<td width="90" align="center">{{ $table->data57_1 }}</td>
+			</tr>
+			<tr height="30">
+				<td width="90" align="center" rowspan="2">商业</td>
+				<td colspan="4" align="center">{{ $table->data61_2 }}</td>
+				<td width="90" align="center">{{ $table->data61 }}</td>
+				<td width="90" align="center" rowspan="2">{{ $table->data62 }}</td>
+				<td width="90" align="center" rowspan="2">元</td>
+			</tr>
+			<tr height="30">
+				<td colspan="4" align="center">{{ $table->data61_3 }}</td>
+				<td width="90" align="center">{{ $table->data61_1 }}</td>
+				<td  align="center" colspan="2">转下页</td>
+				<td  align="center" colspan="2">{{ $table->data61_4 }}</td>
+			</tr>
+			<tr height="30">
+				<td colspan="3" align="center">调换房屋位置</td>
+				<td  align="center" colspan="10">{{ $table->data63 }}</td>
+			</tr>
+		@endif
 		<tr height="30">
 			<td  align="center" rowspan="2" colspan="2">征收实施单位(章)</td>
 			<td  align="center" colspan="3">被征收人(签字)</td>

+ 81 - 38
resources/views/admin/print/table_4_one.blade.php

xqd
@@ -64,44 +64,87 @@
 			<td width="140" align="center">用途</td>
 			<td colspan="3" align="center">{{ $table->used }}</td>
 		</tr>
-		<tr >
-			<td width="140" align="center">拆迁补偿总金额</td>
-			<td  align="center" width="140" colspan="3">大写</td>
-			<td width="140" align="center" colspan="2">{{ $table->total_money }}</td>
-			<td width="140" align="center">元</td>
-		</tr>
-		<tr >
-			<td width="140" align="center" rowspan="4">货币化安置</td>
-			<td  align="center" width="140">房屋类别</td>
-			<td width="140" align="center">购买存量房面积(㎡)</td>
-			<td width="140" align="center">购买存量房单价(元/㎡)</td>
-			<td width="140" align="center">购买存量房价格(元)</td>
-			<td width="140" align="center">应退差额(元)</td>
-			<td width="140" align="center">应缴差额 (元)</td>
-		</tr>
-		<tr >
-			<td width="140" rowspan="2" align="center">住宅</td>
-			<td  align="center" width="140" >{{ $table->home_area }}</td>
-			<td  align="center" width="140" >{{$table->money_home_dprice}}</td>
-			<td  align="center" width="140" >{{$table->money_home_price}}</td>
-			<td  align="center" width="140" rowspan="3">{{ $table->money_home_tchae }}</td>
-			<td  align="center" width="140" rowspan="3" >{{ $table->money_home_jchae }}</td>
-		</tr>
-		<tr >
-			<td  align="center" width="140" >{{ $table->home_area2 }}</td>
-			<td  align="center" width="140" >{{ $table->money_home_dprice2 }}</td>
-			<td  align="center" width="140" >{{ $table->money_home_price2 }}</td>
-		</tr>
-		<tr >
-			<td width="140" align="center" >商业</td>
-			<td  align="center" width="140" >{{ $table->money_bus_area }}</td>
-			<td  align="center" width="140" >{{ $table->money_bus_dprice }}</td>
-			<td  align="center" width="140" >{{ $table->money_bus_price }}</td>
-		</tr>
-		<tr >
-		    <td width="140" align="center" >购买房屋位置</td>
-			<td width="140" align="center" colspan="6">{{ $table->home_addr }}</td>
-		</tr>
+		@if(is_array($table->jsons) || is_object($table->jsons))
+			@foreach($table->jsons as $value)
+				<tr >
+					<td width="140" align="center">拆迁补偿总金额</td>
+					<td  align="center" width="140" colspan="3">大写</td>
+					<td width="140" align="center" colspan="2">{{ $value->total_money }}</td>
+					<td width="140" align="center">元</td>
+				</tr>
+				<tr >
+					<td width="140" align="center" rowspan="4">货币化安置</td>
+					<td  align="center" width="140">房屋类别</td>
+					<td width="140" align="center">购买存量房面积(㎡)</td>
+					<td width="140" align="center">购买存量房单价(元/㎡)</td>
+					<td width="140" align="center">购买存量房价格(元)</td>
+					<td width="140" align="center">应退差额(元)</td>
+					<td width="140" align="center">应缴差额 (元)</td>
+				</tr>
+				<tr >
+					<td width="140" rowspan="2" align="center">住宅</td>
+					<td  align="center" width="140" >{{ $value->home_area }}</td>
+					<td  align="center" width="140" >{{$value->money_home_dprice}}</td>
+					<td  align="center" width="140" >{{$value->money_home_price}}</td>
+					<td  align="center" width="140" rowspan="3">{{ $value->money_home_tchae }}</td>
+					<td  align="center" width="140" rowspan="3" >{{ $value->money_home_jchae }}</td>
+				</tr>
+				<tr >
+					<td  align="center" width="140" >{{ $value->home_area2 }}</td>
+					<td  align="center" width="140" >{{ $value->money_home_dprice2 }}</td>
+					<td  align="center" width="140" >{{ $value->money_home_price2 }}</td>
+				</tr>
+				<tr >
+					<td width="140" align="center" >商业</td>
+					<td  align="center" width="140" >{{ $value->money_bus_area }}</td>
+					<td  align="center" width="140" >{{ $value->money_bus_dprice }}</td>
+					<td  align="center" width="140" >{{ $value->money_bus_price }}</td>
+				</tr>
+				<tr >
+					<td width="140" align="center" >购买房屋位置</td>
+					<td width="140" align="center" colspan="6">{{ $value->home_addr }}</td>
+				</tr>
+			@endforeach
+			@else
+				<tr >
+					<td width="140" align="center">拆迁补偿总金额</td>
+					<td  align="center" width="140" colspan="3">大写</td>
+					<td width="140" align="center" colspan="2">{{ $table->total_money }}</td>
+					<td width="140" align="center">元</td>
+				</tr>
+				<tr >
+					<td width="140" align="center" rowspan="4">货币化安置</td>
+					<td  align="center" width="140">房屋类别</td>
+					<td width="140" align="center">购买存量房面积(㎡)</td>
+					<td width="140" align="center">购买存量房单价(元/㎡)</td>
+					<td width="140" align="center">购买存量房价格(元)</td>
+					<td width="140" align="center">应退差额(元)</td>
+					<td width="140" align="center">应缴差额 (元)</td>
+				</tr>
+				<tr >
+					<td width="140" rowspan="2" align="center">住宅</td>
+					<td  align="center" width="140" >{{ $table->home_area }}</td>
+					<td  align="center" width="140" >{{$table->money_home_dprice}}</td>
+					<td  align="center" width="140" >{{$table->money_home_price}}</td>
+					<td  align="center" width="140" rowspan="3">{{ $table->money_home_tchae }}</td>
+					<td  align="center" width="140" rowspan="3" >{{ $table->money_home_jchae }}</td>
+				</tr>
+				<tr >
+					<td  align="center" width="140" >{{ $table->home_area2 }}</td>
+					<td  align="center" width="140" >{{ $table->money_home_dprice2 }}</td>
+					<td  align="center" width="140" >{{ $table->money_home_price2 }}</td>
+				</tr>
+				<tr >
+					<td width="140" align="center" >商业</td>
+					<td  align="center" width="140" >{{ $table->money_bus_area }}</td>
+					<td  align="center" width="140" >{{ $table->money_bus_dprice }}</td>
+					<td  align="center" width="140" >{{ $table->money_bus_price }}</td>
+				</tr>
+				<tr >
+					<td width="140" align="center" >购买房屋位置</td>
+					<td width="140" align="center" colspan="6">{{ $table->home_addr }}</td>
+				</tr>
+		@endif
 		<tr >
 			<td width="140" align="center" rowspan="2" >征收实施单位(章)</td>
 			<td width="140" align="center" >被征收人(签字)</td>

+ 12 - 11
resources/views/admin/table/table_eight.blade.php

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -94,7 +94,7 @@
                                         <td rowspan="2">可置换住宅面积(㎡)</td>
                                         <td rowspan="2">可置换商业面积(㎡)</td>
                                         <td rowspan="2" >单价(元/㎡)</td>
-                                        <td  colspan="3" rowspan="2" >房补偿额(元)</td>
+                                        <td  colspan="3" rowspan="2" >房补偿额(元)</td>
                                     </tr>
                                     <tr>
                                         <td></td>
@@ -156,19 +156,19 @@
                                     <tr>
                                         <td>装修补偿额</td>
                                         <td colspan="5"><textarea name="data26_1" class="form-control"></textarea></td>
-                                        <td  colspan="3"><input name="data26" class="form-control" type="text" placeholder="小写" value="0" onchange="NoToChinese(this.value,data261)"></td>
+                                        <td  colspan="3"><input name="data26" class="form-control" type="text" placeholder="小写" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td>庭院补偿额</td>
                                         <td>总面积</td>
                                         <td><input name="all_area" class="form-control" type="text" placeholder=""></td>
                                         <td colspan="3"><textarea name="data25_1" class="form-control"></textarea></td>
-                                        <td colspan="3"><input name="data25" class="form-control" type="text" placeholder="小写" value="0" onchange="NoToChinese(this.value,data251)"></td>
+                                        <td colspan="3"><input name="data25" class="form-control" type="text" placeholder="小写" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td>停产停业损失补偿额</td>
                                         <td colspan="5"><textarea name="data27_1" class="form-control"></textarea></td>
-                                        <td  colspan="3"><input name="data27" class="form-control" type="text" placeholder="小写" value="0" onchange="NoToChinese(this.value,data271)"></td>
+                                        <td  colspan="3"><input name="data27" class="form-control" type="text" placeholder="小写" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td rowspan="6">构筑物及其他补偿金</td>
@@ -292,7 +292,7 @@
                                     <tr>
                                         <td ><textarea name="data61_3" class="form-control next" type="text" ></textarea></td>
                                         <td ><input name="data61_1" class="form-control next" type="text" ></td>
-                                        <td colspan="2"><a id="nextid" onclick="nextPage()">转下页</a></td>
+                                        <td colspan="2"><a id="nextid" onclick="nextPage(0)">转下页</a></td>
                                         <td colspan="2">
                                             <textarea name="data61_4" class="form-control next" type="text"></textarea>
                                             <input type="hidden" name="json" id="json">
@@ -380,7 +380,7 @@
                         var jsons = []; // 所有的回迁房数据
                         var hours = 0;  // 回迁房套数
 
-                        function nextPage(){
+                        function nextPage(num){
                             var json = {};
                             var chae = $('#data59').val();
                             //差额不够时隐藏下一页
@@ -395,17 +395,18 @@
 
                             //赋值下一页的总金额
                             $('#data43').val(chae);
+                            NoToChinese(chae);
 
                             jsons.push(json);
                             console.log(jsons);
                             hours += 1;
                             $('#hours').val(hours);
-                            alert('已转下一页刷新,请继续填写表单');
+                            if(num == 0) alert('已转下一页刷新,请继续填写表单');
                             return jsons;
                         }
 
                         $('form').submit(function(){
-                            var jsons  = nextPage();
+                            var jsons  = nextPage(1);
                             var temp = JSON.stringify(jsons);
 
                             $('#json').val(temp);
@@ -485,7 +486,7 @@
                                 document.getElementById('nextid').style.display = "inline";
                             }
                         }
-                        function NoToChinese(num,to) {
+                        function NoToChinese(num) {
                             if (!/^\d*(\.\d*)?$/.test(num)) { alert("Number is wrong!"); return "Number is wrong!"; }
                             var AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
                             var BB = new Array("", "拾", "佰", "仟", "萬", "億", "点", "");
@@ -507,7 +508,7 @@
                                 for (var i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
                             }
 
-                            $(to).val(re);
+                            $('#data431').val(re);
                         }
                         function get_change(one,two,three,four,five,add){
                             if ($(one).val() == ''){$(one).val(0);}
@@ -544,7 +545,7 @@
                             $('#data431').val(re);
                         }
                         function printed(printpage){
-                            $('#bottom_button').hide();
+                            $('#bottom_butdata431ton').hide();
                             var headstr = "<html><head><title></title></head><body>";
                             var footstr = "</body>";
                             var newstr = document.all.item(printpage).innerHTML;

+ 6 - 5
resources/views/admin/table/table_one.blade.php

xqd xqd xqd xqd
@@ -83,7 +83,7 @@
                                     <td colspan="5">
                                         <input disabled id="total_money1" class="form-control" type="text" placeholder="大写">
                                     </td>
-                                    <td colspan="2"><input name="total_money" class="form-control next" type="text" placeholder="小写" onchange="NoToChinese(this.value)" >(元)</td>
+                                    <td colspan="2"><input id="total_money" name="total_money" class="form-control next" type="text" placeholder="小写" onchange="NoToChinese(this.value)" >(元)</td>
                                 </tr>
                                 <tr>
                                     <td rowspan="4" colspan="2">货币化安置</td>
@@ -121,7 +121,7 @@
                                     </td>
                                     <td><input name="money_bus_price" value="0" class="form-control next" type="text" placeholder=""></td>
 
-                                    <td><a id="nextid" onclick="nextPage()">转下页</a></td>
+                                    <td><a id="nextid" onclick="nextPage(0)">转下页</a></td>
                                     <td><input name="other" value=" " class="form-control next" type="text" placeholder="">
                                         <input type="hidden" name="json" id="json">
                                         <input type="hidden" name="hours" id="hours">
@@ -271,7 +271,7 @@
 
                 var jsons = []; // 所有的回迁房数据
                 var hours = 0;  // 回迁房套数
-                function nextPage(){
+                function nextPage(num){ //num阻止alert()弹窗
                     var json = {};
                     var chae = $('#money_home_tchae').val();
                     //差额不够时隐藏下一页
@@ -286,17 +286,18 @@
 
                     //赋值下一页的总金额
                     $('#total_money').val(chae);
+                    NoToChinese(chae);
 
                     jsons.push(json);
                     console.log(jsons);
                     hours += 1;
                     $('#hours').val(hours);
-                    alert('已转下一页刷新,请继续填写表单');
+                    if(num == 0) alert('已转下一页刷新,请继续填写表单');
                     return jsons;
                 }
 
                 $('form').submit(function(){
-                    var jsons  = nextPage();
+                    var jsons  = nextPage(1);
                     var temp = JSON.stringify(jsons);
 
                     $('#json').val(temp);