chenrj-PC\chenrj 8 년 전
부모
커밋
51eba9f52a

+ 12 - 7
VisualInspection/js/statistics/change_work.js

@@ -13,10 +13,11 @@ $(function(){
     });
 
     // 当前月份初始化
-    $("#sel_month").val(getM()-1);
-
-    $("#month_name").html( $("#sel_month").find("option:selected").text());
-
+    // $("#sel_month").val(getM()-1);
+    // $("#month_name").html( $("#sel_month").find("option:selected").text());
+    // 时间初始化
+    $("#start-time").val( new Date().getFullYear()+'-'+ (getM()-1) +"-25");
+    $("#end-time").val( new Date().getFullYear()+'-'+ (getM()) +"-25");
 
     // 收费站中心选择
     $("#fs_station").change(function(){
@@ -44,7 +45,7 @@ $(function(){
 
     // 查询
     $("#searchBtn").click(function(){        
-        $("#month_name").html( $("#sel_month").find("option:selected").text()  )
+        // $("#month_name").html( $("#sel_month").find("option:selected").text()  )
         getFsWorkInfo();
     })
     // end
@@ -56,9 +57,13 @@ $(function(){
  */
 function getFsWorkInfo(){
 
+    // var param = {
+    //     "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
+    //     "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+    // }
     var param = {
-        "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
-        "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+        "start_time": GV("#start-time")+" 23:00:00" ,
+        "end_time": GV("#end-time")+" 23:00:00"
     }
     
     if(GV("#fs_employee")!=''){

+ 11 - 6
VisualInspection/js/statistics/common_work.js

@@ -13,10 +13,11 @@ $(function(){
     });
 
     // 当前月份初始化
-    $("#sel_month").val(getM()-1);
-
-    $("#month_name").html( $("#sel_month").find("option:selected").text());
+    // $("#sel_month").val(getM()-1);
 
+    // $("#month_name").html( $("#sel_month").find("option:selected").text());
+     $("#start-time").val( new Date().getFullYear()+'-'+ (getM()-1) +"-25");
+     $("#end-time").val( new Date().getFullYear()+'-'+ (getM()) +"-25");
 
     // 收费站中心选择
     $("#fs_station").change(function(){
@@ -44,7 +45,7 @@ $(function(){
 
     // 查询
     $("#searchBtn").click(function(){        
-        $("#month_name").html( $("#sel_month").find("option:selected").text()  )
+        // $("#month_name").html( $("#sel_month").find("option:selected").text()  )
         getFsWorkInfo();
     })
     // end
@@ -56,9 +57,13 @@ $(function(){
  */
 function getFsWorkInfo(){
 
+    // var param = {
+    //     "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
+    //     "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+    // }
     var param = {
-        "start_time": "2017-"+(GV("#sel_month")-1)+"-25 23:00:00" ,
-        "end_time": "2017-"+GV("#sel_month")+"-25 23:00:00"
+        "start_time": GV("#start-time")+" 23:00:00" ,
+        "end_time": GV("#end-time")+" 23:00:00"
     }
     
     if(GV("#fs_employee")!=''){

+ 33 - 15
VisualInspection/view/statistics/change_work.html

@@ -5,9 +5,9 @@
     <div class="row">
         <form  class="form-horizontal">
             <div class="form-group">
-                <label for="exampleInputAccount1" class="col-sm-1">月份</label>
-                <div class="col-sm-2">
-                    <select class="form-control" id="sel_month">
+                <label for="exampleInputAccount1" class="col-sm-1">日期</label>
+                <!--<div class="col-sm-2">-->
+                    <!--<select class="form-control" id="sel_month">
                         <option value="1">一月</option>
                         <option value="2">二月</option>
                         <option value="3">三月</option>
@@ -20,8 +20,17 @@
                         <option value="10">十月</option>
                         <option value="11">十一月</option>
                         <option value="12">十二月</option>
-                    </select>
+                    </select>-->
+                <!--</div>-->
+
+                <div class="col-sm-1">
+                    <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
+                </div>
+                <div class="col-sm-1">
+                    <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
+
+
                 <label for="exampleInputAccount1" class="col-sm-1">部门</label>
                 <div class="col-sm-2">
                     <select class="form-control" id="center_manage">
@@ -50,25 +59,22 @@
 
 
 
-    <div class="table-title"><span id="month_name"></span><span>机动人员出勤统计</span></div>
+    <div class="table-title"><span id="month_name"></span><span>机动人员出勤统计</span></div>
 
     <div class="row">
           
               <div class="table-head" ><table  width="100%" min-height="190px" align="center" >
                   <thead>
                     <tr>
-                        <th rowspan="2" width="80px">序号</th>
-                        <th rowspan="2" width="120px">站名</th>
-                        <th rowspan="2" width="120px">姓名</th>
-                        <th rowspan="2" width="120px">岗位</th>
-                        <th width="120px" colspan="3">月份出勤统计(上月26 ~ 本月25)</th>
-                        <th  rowspan="2"  min-width="120px">合计</th>
-                        <th  rowspan="2" >备注</th>
-                    </tr>
-                    <tr> 
+                        <th  width="80px">序号</th>
+                        <th width="120px">站名</th>
+                        <th  width="120px">姓名</th>
+                        <th  width="120px">岗位</th>
                         <th>夜</th>
                         <th>早</th>
                         <th>中</th>
+                        <th  min-width="120px">合计</th>
+                        <th   >备注</th>
                     </tr>
                   </thead>
                   <tbody class="table-tbody" style="background:white" align="center" height="500px">
@@ -81,6 +87,18 @@
 </div>
 <script>
     $(document).ready(function() {
-
+        // 仅选择日期 开始 ,结束时间
+        $("#start-time,#end-time").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
     });
 </script>

+ 14 - 11
VisualInspection/view/statistics/common_work.html

@@ -5,8 +5,8 @@
     <div class="row">
         <form  class="form-horizontal">
             <div class="form-group">
-                <label for="exampleInputAccount1" class="col-sm-1">月份</label>
-                <div class="col-sm-2">
+                <label for="exampleInputAccount1" class="col-sm-1">日期</label>
+                <!--<div class="col-sm-2">
                     <select class="form-control" id="sel_month">
                         <option value="1">一月</option>
                         <option value="2">二月</option>
@@ -21,6 +21,12 @@
                         <option value="11">十一月</option>
                         <option value="12">十二月</option>
                     </select>
+                </div>-->
+                <div class="col-sm-1">
+                    <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
+                </div>
+                <div class="col-sm-1">
+                    <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
                 <label for="exampleInputAccount1" class="col-sm-1">部门</label>
                 <div class="col-sm-2">
@@ -57,18 +63,15 @@
               <div class="table-head" ><table  width="100%" min-height="190px" align="center" >
                   <thead>
                     <tr>
-                        <th rowspan="2" width="80px">序号</th>
-                        <th rowspan="2" width="120px">站名</th>
-                        <th rowspan="2" width="120px">姓名</th>
-                        <th rowspan="2" width="120px">岗位</th>
-                        <th width="120px" colspan="3">月份出勤统计(上月26 ~ 本月25)</th>
-                        <th  rowspan="2"  min-width="120px">合计</th>
-                        <th  rowspan="2" >备注</th>
-                    </tr>
-                    <tr> 
+                        <th  width="80px">序号</th>
+                        <th  width="160px">站名</th>
+                        <th  width="160px">姓名</th>
+                        <th  width="160px">岗位</th>
                         <th>夜</th>
                         <th>早</th>
                         <th>中</th>
+                        <th  min-width="160px">合计</th>
+                        <th  >备注</th>
                     </tr>
                   </thead>
                   <tbody class="table-tbody" style="background:white" align="center" height="500px">