浏览代码

增加能耗日报和月报

wukai 5 月之前
父节点
当前提交
1e2fa47002
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. 1 1
      css/main.css
  2. 11 1
      main.html

+ 1 - 1
css/main.css

@@ -110,7 +110,7 @@
     #imp_item{
         position: absolute;
         width: 160px;
-        height: 350px;
+        height: 450px;
         background: rgba(19, 47, 95, 0.8);
         box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.2);
         border-radius: 2px 2px 2px 2px;

+ 11 - 1
main.html

@@ -35,6 +35,8 @@
     <div itemcode="9"><span>纱线规格</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
     <div itemcode="10"><span>生产绩效日报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
     <div itemcode="11"><span>生产绩效月报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
+    <div itemcode="12"><span>车间能耗日报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
+    <div itemcode="13"><span>车间能耗月报</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>
     <!--			<div itemcode="1"><span>最近7天</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>-->
     <!--			<div itemcode="2"><span>自定义日期</span><img src="image/imp2.png" style="float: right;margin-top: 7px;"></div>-->
 </div>
@@ -2540,6 +2542,8 @@
                     break;
                 case 10:
                 case 11:
+                case 12:
+                case 13:
                     e.stopPropagation();
                     $("#date_select .hourAreaSelect").hide();
                     $("#date_select .hourPointSelect").hide();
@@ -2560,7 +2564,7 @@
             var s2 = $("#datepicker2").val()
             //var devcode = $.trim($("#imp_devcode").val())
             var itemcode = $("#date_select").attr("itemcode");
-            if (s1 == "" || (s2 == ""&&itemcode!=4&&itemcode!=10&&itemcode!=11)) return;
+            if (s1 == "" || (s2 == ""&&itemcode!=4&&itemcode!=10&&itemcode!=11&&itemcode!=12&&itemcode!=13)) return;
             switch (parseInt(itemcode)) {
                 case 1:
                     window.open(SERVER_URL + "/export/production?start="+s1+"&end="+s2);
@@ -2598,6 +2602,12 @@
                 case 11:
                     window.open(SERVER_URL + "/export/productivity-month?date="+s1);
                     break;
+                case 12:
+                    window.open(SERVER_URL + "/export/energy-day?date="+s1);
+                    break;
+                case 13:
+                    window.open(SERVER_URL + "/export/energy-month?date="+s1);
+                    break;
             }
             $("body").trigger('click')
         });