Browse Source

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

fenghaifu 4 years ago
parent
commit
b40f212011
4 changed files with 73 additions and 12 deletions
  1. 59 7
      js/service/product.js
  2. 9 0
      js/service/workhour.js
  3. 4 4
      pages/dashboard/line.html
  4. 1 1
      pages/dashboard/produce.html

+ 59 - 7
js/service/product.js

@@ -67,8 +67,16 @@ var ServiceProduct = {
     // 月成品出货统计,根据成品维度
     getMonthSend: function () {
         // return getService.methodGet("/fbsRdrecord32/fbsRdrecords32/getMonthSend");
-        
-        return getService.methodGet("/fbsDispatchLists/fbsDispatchLists/getProjectDelivery");
+        var map=getService.methodGet("/fbsDispatchLists/fbsDispatchLists/getProjectDelivery")
+        if(map){
+            var remainingQuantity=5-(Object.keys(map).length%5);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                console.log(bu)
+                map[bu]="";
+            }
+        }
+        return map;
 
         // return {
         //     "成品A": 20,
@@ -93,7 +101,16 @@ var ServiceProduct = {
     },
     // 成品库存,物料维度
     getStockList: function () {
-        return getService.methodGet("/fbsInventory/fbsInventory/getAllStockList");
+        var map=getService.methodGet("/fbsInventory/fbsInventory/getAllStockList")
+        if(map){
+            var remainingQuantity=5-(Object.keys(map).length%5);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                console.log(bu)
+                map[bu]="";
+            }
+        }
+        return map;
 
         // return {
         //     "成品A": 800,
@@ -158,7 +175,16 @@ var ServiceProduct = {
         //     sum2: 50
         // });
         // return list;
-        return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getRejectsNumber");
+
+        var list=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getRejectsNumber")
+        if(list){
+            var remainingQuantity=3-(list.length%3);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                list.push({label: bu,sum1:0,sum2:0})
+            }
+        }
+        return list;
     },
     // 月制程异常,根据分类
     getMonthExceptionByCategory: function () {
@@ -172,7 +198,16 @@ var ServiceProduct = {
         //     "分类G": 400
         // };
         // return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getQualityType");
-        return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategory");
+        var map=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategory")
+        if(map){
+            var remainingQuantity=3-(Object.keys(map).length%3);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                console.log(bu)
+                map[bu]="";
+            }
+        }
+        return map;
     },
     // 周成品入库数量,根据分类
     getWeekInByCategory: function () {
@@ -185,7 +220,16 @@ var ServiceProduct = {
         //     "分类F": 400,
         //     "分类G": 500
         // };
-        return MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getQualifiedInQtyWeek");
+        var map =MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getQualifiedInQtyWeek");
+        if(map){
+            var remainingQuantity=3-(Object.keys(map).length%3);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                console.log(bu)
+                map[bu]="";
+            }
+        }
+        return map;
     },
     // 生产效率
     getProduceRate: function () {
@@ -246,7 +290,15 @@ var ServiceProduct = {
         //     sum2: 50
         // });
         // return list;
-        return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getRejectsNumber?type=1");
+        var list=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getRejectsNumber?type=1")
+        if(list){
+            var remainingQuantity=3-(list.length%3);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                list.push({label: bu,sum1:0,sum2:0})
+            }
+        }
+        return list;
     },
     // 日质量异常,根据分类
     getDayExceptionByCategory: function () {

+ 9 - 0
js/service/workhour.js

@@ -71,6 +71,7 @@ var ServiceWorkhour={
         // });
         var list=[];
         list=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getWorkingHoursContrast");
+        
 
         $.each(list, function(index,item){
             item.label = item.product;
@@ -80,6 +81,14 @@ var ServiceWorkhour={
             item.sum2 = item.manHoursCompleted;
         });
 
+        if(list){
+            var remainingQuantity=3-(list.length%3);
+            for(var i=0;i<remainingQuantity;i++){
+                var bu="补"+i
+                list.push({label:"",label1:"标准工时",sum1:0,label2:"实际工时",sum2:0})
+            }
+        }
+
         return list;
 
     }

+ 4 - 4
pages/dashboard/line.html

@@ -216,8 +216,8 @@
         //当日标准工时与实际工时对比
         const monthGoodList = ServiceProduct.getDayGood();
         setTimeout(beA,500);
-        var initSize = 5;    
-        var pageSizeMonthGood = 5;
+        var initSize = 3;    
+        var pageSizeMonthGood = 3;
         var pageIndexMonthGood = 0;
         function beA(){
             var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
@@ -245,7 +245,7 @@
         //当日良率
         const dayStandAndRealList = ServiceWorkhour.getDayStandAndRealByMaterial();
         setTimeout(beB,600);
-        var pageSizeB = 5;
+        var pageSizeB = 3;
         var pageIndexB = 0;
         function beB(){
             var lsitDay = dayStandAndRealList.slice(pageIndexB,pageSizeB);
@@ -342,7 +342,7 @@
                     const dayProduceTaskList = ServiceProduceTask.getDayList();
                     this.cacheDataObject.dayProduceTaskList = {
                         data: dayProduceTaskList,
-                        pagesize: 30,
+                        pagesize: 25,
                         pageindex: 0
                     }
                     this.dayProduceTaskList = dayProduceTaskList.slice(0, this.cacheDataObject

+ 1 - 1
pages/dashboard/produce.html

@@ -226,7 +226,7 @@
         
         const monthGoodList =  ServiceProduct.getMonthGood();
         setTimeout(beA,500);
-        var pageSizeMonthGood = 5;
+        var pageSizeMonthGood = 3;
         var pageIndexMonthGood = 0;
         function beA(){
             var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);