GGican 8 years ago
parent
commit
8731c8e4ec

+ 6 - 6
resources/views/admin/table/table_five.blade.php

xqd xqd xqd xqd
@@ -109,7 +109,7 @@
                                         </td>
                                         <td><input name="yuqi_mothe1" class="form-control" type="text" placeholder=""></td>
                                         <td><input name="buzu1" class="form-control" type="text" placeholder=""></td>
-                                        <td><input name="total1" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe1,buzu1,this)"></td>
+                                        <td><input name="total1" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe1,buzu1,this)" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td><input name="yuqi_time2" class="form-control" type="hidden" placeholder="">
@@ -117,7 +117,7 @@
                                         <td><input readonly id="yuqi_time2_2" class="form-control form_datetime" type="text"></td>
                                         <td><input name="yuqi_mothe2" class="form-control" type="text" placeholder=""></td>
                                         <td><input name="buzu2" class="form-control" type="text" placeholder=""></td>
-                                        <td><input name="total2" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe2,buzu2,this)"></td>
+                                        <td><input name="total2" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe2,buzu2,this)" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td><input name="yuqi_time3" class="form-control" type="hidden" placeholder="">
@@ -125,7 +125,7 @@
                                         <td><input readonly id="yuqi_time3_2" class="form-control form_datetime" type="text"></td>
                                         <td><input name="yuqi_mothe3" class="form-control" type="text" placeholder=""></td>
                                         <td><input name="buzu3" class="form-control" type="text" placeholder=""></td>
-                                        <td><input name="total3" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe3,buzu3,this)"></td>
+                                        <td><input name="total3" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe3,buzu3,this)" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td><input name="yuqi_time4" class="form-control" type="hidden" placeholder="">
@@ -133,12 +133,12 @@
                                         <td><input readonly id="yuqi_time4_2" class="form-control form_datetime" type="text"></td>
                                         <td><input name="yuqi_mothe4" class="form-control" type="text" placeholder=""></td>
                                         <td><input name="buzu4" class="form-control" type="text" placeholder=""></td>
-                                        <td><input name="total4" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe4,buzu4,this)"></td>
+                                        <td><input name="total4" class="form-control" type="text" placeholder="" onfocus="get_product(yuqi_mothe4,buzu4,this)" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td>逾期补偿金额</td>
-                                        <td colspan="3"><input id="yuqij1" class="form-control" type="text" placeholder="大写"></td>
-                                        <td><input name="yuqij" class="form-control" type="text" placeholder="小写"  onfocus="add(total1,total2,total3,total4,yuqij)">(元)</td>
+                                        <td colspan="3"><input id="yuqij1" class="form-control" type="text" placeholder="大写">(元)</td>
+                                        <td><input name="yuqij" class="form-control" type="text" placeholder="小写"  onfocus="add(total1,total2,total3,total4,yuqij)"></td>
                                     </tr>
                                     <tr>
                                         <td>约定</td>

+ 3 - 3
resources/views/admin/table/table_four.blade.php

xqd
@@ -99,15 +99,15 @@
                                     <tr>
                                         <td rowspan="3">奖励类别</td>
                                         <td>全额奖励</td>
-                                        <td colspan="3"><input name="quanj" class="form-control" type="text" placeholder="">(元)</td>
+                                        <td colspan="3"><input name="quanj" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>差额奖励金</td>
-                                        <td colspan="3"><input name="chaj" class="form-control" type="text" placeholder="">(元)</td>
+                                        <td colspan="3"><input name="chaj" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>同住奖励金</td>
-                                        <td colspan="3"><input name="tongj" class="form-control" type="text" placeholder="">(元)</td>
+                                        <td colspan="3"><input name="tongj" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>奖励总金额</td>

+ 1 - 1
resources/views/admin/table/table_one.blade.php

xqd
@@ -142,7 +142,7 @@
                                 </tr>
                                 <tr>
                                     <td>商业</td>
-                                    <td><input name="money_bus_area" class="form-control" type="text" placeholder=""></td>
+                                    <td><input name="money_bus_area" class="form-control" type="text" placeholder=""  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="" 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=""></td>
                                 </tr>

+ 41 - 15
resources/views/admin/table/table_six.blade.php

xqd xqd xqd xqd
@@ -73,14 +73,14 @@
                             <div class="col-sm-2">项目名称:</div>
                             <div class="col-sm-7">
                                 <select class="form-control" name="project_name">
-                                    <option>必填项</option>
+                                    <option>请选择项目</option>
                                     @foreach($project as $data)
                                         <option value="{{ $data->project_name }}">{{ $data->project_name }}</option>
                                     @endforeach
                                 </select>                            </div>
                             <div class="col-sm-1">编号:</div>
                             <div class="col-sm-2">
-                                <input style="margin: 0px;" name="num" class="form-control" type="text" placeholder="必填项(数字)">
+                                <input style="margin: 0px;" name="num" class="form-control" type="text" placeholder=" ">
                             </div><br><br>
                         </div>
                         <div class="row">
@@ -101,29 +101,30 @@
                                     </tr>
                                     <tr>
                                         <td>联系电话</td>
-                                        <td><input name="bzc_tel" class="form-control" type="text" placeholder=""></td>
+                                        <td><input name="bzc_tel" class="form-control" type="text" placeholder="必填项"></td>
                                         <td>被征收人身份证号</td>
-                                        <td><input name="bzc_cardid" class="form-control" type="text" placeholder=""></td>
+                                        <td><input name="bzc_cardid" class="form-control" type="text" placeholder="必填项(数字)"></td>
                                     </tr>
                                     <tr>
                                         <td>临时安置费</td>
-                                        <td colspan="3"><input name="anzhi" class="form-control" type="text" placeholder=""></td>
+                                        <td colspan="3"><input name="anzhi" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>搬迁费</td>
-                                        <td colspan="3"><input name="banqian" class="form-control" type="text" placeholder=""></td>
+                                        <td colspan="3"><input name="banqian" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>低保补贴</td>
-                                        <td colspan="3"><input name="dibu" class="form-control" type="text" placeholder=""></td>
+                                        <td colspan="3"><input name="dibu" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>其他</td>
-                                        <td colspan="3"><input name="other" class="form-control" type="text" placeholder=""></td>
+                                        <td colspan="3"><input name="other" class="form-control" type="text" placeholder="" value="0">(元)</td>
                                     </tr>
                                     <tr>
                                         <td>补贴总金额</td>
-                                        <td colspan="3">¥:<input name="totalj" class="form-control" type="text" placeholder="">(元)</td>
+                                        <td colspan="2"><input disabled id="totalj1" class="form-control" type="text" placeholder="">(元)</td>
+                                        <td colspan="1"><input name="totalj" class="form-control" type="text" placeholder="" onfocus="add(anzhi,banqian,dibu,other,totalj)"></td>
                                     </tr>
                                     <tr>
                                         <td>约定</td>
@@ -140,11 +141,6 @@
                                     </tr>
                                     </tbody>
                                 </table>
-                                <div class="row">
-                                    <div class="col-sm-4">核算:<input disabled name="hesuan" style="display: inline" class="form-control" type="text" placeholder=""></div>
-                                    <div class="col-sm-4">初审:<input disabled name="chushen" style="display: inline" class="form-control" type="text" placeholder=""></div>
-                                    <div class="col-sm-4">监审:<input disabled name="jianshen" style="display: inline" class="form-control" type="text" placeholder=""></div>
-                                </div>
                                 <div class="row">
                                     <div class="col-sm-4">复核:<input disabled name="fuhe" style="display: inline" class="form-control" type="text" placeholder=""></div>
                                     <div class="col-sm-4"></div>
@@ -195,11 +191,41 @@
                         });
                         $(".form_datetime").datetimepicker({
                             language: 'zh',
-                            format: 'yyyy-mm-dd',
+                            format: 'yyyy年mm月dd日',
                             minView:'month'
                         }).on('changeDate',function(){
                             $(".datetimepicker").hide();
                         });
+
+                        function add(one,two,three,four,add){
+                            var  num = 0;
+                            num = parseInt($(one).val()) + parseInt($(two).val())+ parseInt($(three).val())+ parseInt($(four).val());
+
+                            $(add).val(num + "");
+
+//                            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)];
+                            }
+
+                            $('#totalj1').val(re);
+                        }
                     </script>
                 </div>
                 <!-- /.box-body -->

+ 3 - 3
resources/views/admin/table/table_three.blade.php

xqd xqd xqd
@@ -121,7 +121,7 @@
                                     <tr>
                                         <td rowspan="5">征收补贴核算</td>
                                         <td>残疾人补贴</td>
-                                        <td colspan="5"><input name="canbu" class="form-control" type="text" placeholder=""></td>
+                                        <td colspan="5"><input name="canbu" class="form-control" type="text" placeholder="" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td rowspan="2">临时安置补贴</td>
@@ -129,7 +129,7 @@
                                         <td>单价</td>
                                         <td>月数</td>
                                         <td>50%</td>
-                                        <td rowspan="2"><input name="linshibu" class="form-control" type="text" placeholder=""></td>
+                                        <td rowspan="2"><input name="linshibu" class="form-control" type="text" placeholder="" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td><input name="linshibu_a" class="form-control" type="text" placeholder=""></td>
@@ -139,7 +139,7 @@
                                     </tr>
                                     <tr>
                                         <td>搬迁补贴</td>
-                                        <td colspan="5"><input name="banqianbu" class="form-control" type="text" placeholder=""></td>
+                                        <td colspan="5"><input name="banqianbu" class="form-control" type="text" placeholder="" value="0"></td>
                                     </tr>
                                     <tr>
                                         <td>合计</td>