Browse Source

Merge branch 'master' of http://139.196.39.194:9021/yuansh/FBS_VIEW

chenc 4 years ago
parent
commit
bc76b8a561
4 changed files with 122 additions and 24 deletions
  1. 14 3
      js/session.js
  2. 61 3
      pages/dashboard/line.html
  3. 39 10
      pages/dashboard/produce.html
  4. 8 8
      pages/dashboard/warehouse.html

+ 14 - 3
js/session.js

@@ -87,7 +87,8 @@ function getQueryVariable(variable){
     return(false);
 }
 
-
+//map型看板滚动 
+//-------------------开始-----------------------
 function beginFun(chartsID,dataMap,autoTime,timeName,grid){
     return function(){autoInitDate(chartsID,dataMap,autoTime,timeName,grid)} 
 }
@@ -109,6 +110,10 @@ function autoInitDate(chartsID,dataMap,autoTime,timeName,grid){
     }
     ChartsService.initCommonBar(chartsID,map,grid);
 
+    if(DataList.length <= initSize){
+        return;
+    }
+
     timeName = setInterval(beginFun2(chartsID,DataList,timeName,grid),autoTime);
     
 }
@@ -159,7 +164,9 @@ function autoInitDateA(chartsID,dataMap,autoTime,timeName,grid){
         map[lsitA[key][0]] = lsitA[key][1];
     }
     ChartsService.initCommonBar(chartsID,map,grid);
-
+    if(DataListA.length <= initSize){
+        return;
+    }
     timeName = setInterval(beginFun2A(chartsID,DataListA,timeName,grid),autoTime);
     
 }
@@ -187,4 +194,8 @@ function autoLoadDateA(chartsID,DataListA,timeName,grid){
         map[lsitA[key][0]] = lsitA[key][1];
     }
     ChartsService.initCommonBar(chartsID,map,grid);
-}
+}
+
+//map型看板滚动 
+//-------------------结束-----------------------
+

+ 61 - 3
pages/dashboard/line.html

@@ -200,6 +200,64 @@
     <script src="/js/service/produce-task.js?_v=1"></script>
     <script src="/js/content/mycharts.js?_v=1"></script>
     <script type="text/javascript">
+
+        //当日标准工时与实际工时对比
+        const monthGoodList = ServiceProduct.getDayGood();
+        setTimeout(beA,500);
+        var initSize = 5;    
+        var pageSizeMonthGood = 5;
+        var pageIndexMonthGood = 0;
+        function beA(){
+            var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            ChartsService.initBarWithTwoNumberRate("charts_12", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+            if(monthGoodList.length <= pageIndexMonthGood){
+                return;
+            }
+            setInterval(beginScrollA,10000);
+        }
+        function beginScrollA(){
+            var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            if(monthGoodList.length <= pageIndexMonthGood){
+                pageIndexMonthGood = 0;
+                pageSizeMonthGood = initSize;
+            }
+            ChartsService.initBarWithTwoNumberRate("charts_12", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+        }
+
+        //当日良率
+        const dayStandAndRealList = ServiceWorkhour.getDayStandAndRealByMaterial();
+        setTimeout(beB,600);
+        var pageSizeB = 5;
+        var pageIndexB = 0;
+        function beB(){
+            var lsitDay = dayStandAndRealList.slice(pageIndexB,pageSizeB);
+            pageIndexB = pageSizeB;
+            pageSizeB = pageSizeB + initSize;
+            ChartsService.initBarAndLine("charts_11", lsitDay,
+                        ChartsService.getGridSpanSmall());
+            if(dayStandAndRealList.length <= pageIndexB){
+                return;
+            }
+            setInterval(beginScrollA,10000);
+        }
+        function beginScrollA(){
+            var lsitDay = dayStandAndRealList.slice(pageIndexB,pageSizeB);
+            pageIndexB = pageSizeB;
+            pageSizeB = pageSizeB + initSize;
+            if(dayStandAndRealList.length <= pageIndexB){
+                pageIndexB = 0;
+                pageSizeB = initSize;
+            }
+            ChartsService.initBarAndLine("charts_11", lsitDay, ChartsService.getGridSpanSmall());
+        }
+
+
         var vm = new Vue({
             el: '#div-main',
             data: {
@@ -218,9 +276,9 @@
                     // 关闭定时器
                     clearInterval(this.timer_short);
                     // 刷新报表
-                    ChartsService.initBarAndLine("charts_11", ServiceWorkhour
-                        .getDayStandAndRealByMaterial(), ChartsService.getGridSpanSmall());
-                    ChartsService.initBarWithTwoNumberRate("charts_12", ServiceProduct.getDayGood(), ChartsService.getGridSpanSmall());
+                    // ChartsService.initBarAndLine("charts_11", ServiceWorkhour
+                    //     .getDayStandAndRealByMaterial(), ChartsService.getGridSpanSmall());
+                    // ChartsService.initBarWithTwoNumberRate("charts_12", ServiceProduct.getDayGood(), ChartsService.getGridSpanSmall());
                     ChartsService.initBarWithShade("charts_13", ServiceProduct.getDayExceptionByCategory(), ChartsService.getGridSpanSmall());
 
                     ChartsService.initCommonPanel("charts_21", ServiceProduct.getDayProduceRate());

+ 39 - 10
pages/dashboard/produce.html

@@ -82,7 +82,7 @@
                     <!-- <span style="background-color:#5bc0de">&nbsp;&nbsp;&nbsp;</span> -->
                 </div>
                 <div class="row">
-                    <div class="col-lg-12 col-md-12" style="height: 380px;">
+                    <div class="col-lg-12 col-md-12" style="height: 350px;">
                         <div class="row" v-for="product in mouthProduceTaskList">
                             <div class="col-lg-1 col-md-1 center no-padding">{{product.orderSheetCode}}</div>
                             <div class="col-lg-2 col-md-2 center no-padding">{{product.define12}}</div>
@@ -208,16 +208,45 @@
         // 参数说明:beginFun("图表ID","list形式数据","翻页时间(毫秒)","本页面唯一id(不可重复)")
         // ChartsService.initBarWithShade("charts_24", ServiceProduct.getWeekInByCategory(),
         //                 ChartsService.getGridSpanSmall());
-        var initSize = 3;
-        var pageSize = 3;
+        var initSize = 5;
+        var pageSize = 5;
         var pageIndex = 0;
+        var pageSizeA = 5;
+        var pageIndexA = 0;
         const weekInBycategoryList = ServiceProduct.getWeekInByCategory();
-        setTimeout(beginFun("charts_24",weekInBycategoryList,2000,"charts_24"),500);
+        setTimeout(beginFun("charts_24",weekInBycategoryList,10000,"charts_24"),500);
 
         const monthExceptionByCategory =  ServiceProduct.getMonthExceptionByCategory();
-        setTimeout(beginFun("charts_23",monthExceptionByCategory,2000,"charts_23"),500);
-
+        setTimeout(beginFunA("charts_23",monthExceptionByCategory,10000,"charts_23"),500);
 
+        
+        const monthGoodList =  ServiceProduct.getMonthGood();
+        setTimeout(beA,500);
+        var pageSizeMonthGood = 5;
+        var pageIndexMonthGood = 0;
+        function beA(){
+            var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            ChartsService.initBarWithTwoNumberRate("charts_22", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+            if(monthGoodList.length <= pageIndexMonthGood){
+                return;
+            }
+            setInterval(beginScrollA,10000);
+        }
+        function beginScrollA(){
+            var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            if(monthGoodList.length <= pageIndexMonthGood){
+                pageIndexMonthGood = 0;
+                pageSizeMonthGood = initSize;
+            }
+            ChartsService.initBarWithTwoNumberRate("charts_22", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+        }
+        
 
         var vm = new Vue({
             el: '#div-main',
@@ -243,10 +272,10 @@
 
                     ChartsService.initBarWithTwoNumberRate("charts_21", ServicePerson.getMonthAttendance(),
                         ChartsService.getGridSpanSmall());
-                    ChartsService.initBarWithTwoNumberRate("charts_22", ServiceProduct.getMonthGood(),
-                        ChartsService.getGridSpanSmall());
-                    ChartsService.initBarWithShade("charts_23", ServiceProduct
-                        .getMonthExceptionByCategory(), ChartsService.getGridSpanSmall());
+                    // ChartsService.initBarWithTwoNumberRate("charts_22", ServiceProduct.getMonthGood(),
+                    //     ChartsService.getGridSpanSmall());
+                    // ChartsService.initBarWithShade("charts_23", ServiceProduct
+                    //     .getMonthExceptionByCategory(), ChartsService.getGridSpanSmall());
                     // ChartsService.initBarWithShade("charts_24", ServiceProduct.getWeekInByCategory(),
                     //     ChartsService.getGridSpanSmall());
 

+ 8 - 8
pages/dashboard/warehouse.html

@@ -53,9 +53,9 @@
                         <span class="block-title-important">{{userSum}}</span>
                     </div>
                 </div>
-                <div class="row"  style="height: 20%;min-height: 150px;height: 150px">
+                <div class="row"  style="height: 20%;min-height: 170px;height: 170px">
                     <div class="person-div" v-for="user in userList" style="text-align: center;">
-                        <div style="width:110px;margin-right: 5px;">
+                        <div style="width:110px;margin-right: 5px;margin-top: 10px;">
                             <img height="140" width="110" v-bind:src="'/upPersonnel/warehouse/'+user.fileName" border="0" />
                         </div>
                         <div style="width: 110px; overflow:hidden; word-break:break-all;white-space:nowrap">
@@ -182,7 +182,7 @@
                 <!--发货通知-->
                 <div class="row block-padding">
 
-                    <div class="col-lg-12  col-md-12" style="margin-top: 5px;">
+                    <div class="col-lg-12  col-md-12" style="margin-top:10px;">
                         <span class="block-title-important">发货通知</span>
                         &nbsp;&nbsp;
                         <span class="block-title-important">{{waitingSendProductSum}}</span>
@@ -198,7 +198,7 @@
                     <div style="width: 25%;" class="col-lg-1 col-md-1 center no-padding padding-line">发货数</div>
                     <div style="width: 10%;" class="col-lg-2 col-md-2 center no-padding padding-line">发货日期</div>
                 </div>
-                <div class="row" style="min-height:140px;height:140px">
+                <div class="row" style="min-height:160px;height:160px">
                     <div class="col-lg-12 col-md-12">
                         <div class="row" v-for="product in waitingSendProductList">
                             <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{product.cItemCode}}</div>
@@ -396,7 +396,7 @@
                     </div>
                 </div>
                 <div class="row block-padding">
-                    <div class="col-lg-2 col-md-1 center no-padding">领料日期</div>
+                    <div class="col-lg-2 col-md-2 center no-padding">领料日期</div>
                     <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
                     <div class="col-lg-3 col-md-4 center no-padding">产品名称</div>
                     <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
@@ -407,8 +407,8 @@
                 <div class="row">
                     <div class="col-lg-12 col-md-12"  style="height: 23%;overflow:hidden;min-height:160px;height:160px">
                         <div class="row" v-for="material in applyMaterialList">
-                            <div class="col-lg-2 col-md-1 center no-padding">{{material.ddate}}</div>
-                            <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
+                            <div class="col-lg-2 col-md-2 center no-padding">{{material.ddate}}</div>
+                            <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
                             <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-4 left no-padding">{{material.materialName}}</div>
                             <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
                             <div class="col-lg-2 col-md-2 center no-padding">{{material.applyPerson}}</div>
@@ -688,7 +688,7 @@
                     this.waitingSendProductSumPercent = waitingSendProductSumPercent + '%';
                     this.cacheDataObject.waitingSendProductList = {
                         data: waitingSendProductList,
-                        pagesize: 7,
+                        pagesize: 8,
                         pageindex: 0
                     }
                     this.waitingSendProductList = waitingSendProductList.slice(0, this.cacheDataObject