chenc 4 năm trước cách đây
mục cha
commit
1987c554f9

+ 5 - 1
js/content/mycharts.js

@@ -119,7 +119,7 @@ var ChartsService = {
             series: [{
                 data: yDataList,
                 type: 'bar',
-                showBackground: false,
+                showBackground: true,
                 backgroundStyle: {
                     color: 'rgba(220, 220, 220, 0.8)'
                 },
@@ -488,6 +488,10 @@ var ChartsService = {
                         formatter: '{c}%',//显示百分号
                         position: 'insideRight'
                     },
+                    showBackground: true,
+                backgroundStyle: {
+                    color: 'rgba(220, 220, 220, 0.8)'
+                },
                     data: yDataList
                 }
                 // ,

+ 1 - 0
js/service/material.js

@@ -368,6 +368,7 @@ var ServiceMaterial={
         // });
         // var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheet?type=2");
         var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheetNotEnough");
+        console.log(materialList)
         if(materialList){
             materialList.forEach(element => {
             element.orderSheetCode=element.mocode

+ 8 - 1
js/service/produce-task.js

@@ -19,7 +19,14 @@ var ServiceProduceTask = {
         //     "已完成": 150,
         //     "未完成": 250
         // };
-        return MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getAchievementRate");
+        var map=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getAchievementRate");
+        
+        if(!map||Object.keys(map).length<=0){
+            map={
+                "未完成":100
+            }
+        }
+        return map;
     },
     // 月度生产计划
     getMonthList: function () {

+ 17 - 2
js/service/product.js

@@ -206,7 +206,8 @@ var ServiceProduct = {
         // return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getQualityType");
         // var map=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategory")
         var list=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategoryTwo")
-        if(list){
+        
+        if(list&&list.length>0){
             var remainingQuantity=3-(list.length%3);
             if(remainingQuantity!=3){
                 for(var i=0;i<remainingQuantity;i++){
@@ -214,6 +215,13 @@ var ServiceProduct = {
                     list.push({label: bu,sum1:0,sum2:0})
                 }
             }
+        }else{
+            list=[
+               {label:"分类A",sum1: 0,sum2:100},
+               {label:"分类B",sum1: 0,sum2:100},
+               {label:"分类C",sum1: 0,sum2:100} 
+            
+            ]
         }
         return list;
     },
@@ -229,7 +237,8 @@ var ServiceProduct = {
         //     "分类G": 500
         // };
         var map =MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getQualifiedInQtyWeek");
-        if(map){
+
+        if(map&&Object.keys(map).length>0){
             var remainingQuantity=3-(Object.keys(map).length%3);
             if(remainingQuantity!=3){
                 for(var i=0;i<remainingQuantity;i++){
@@ -238,6 +247,12 @@ var ServiceProduct = {
                     map[bu]="";
                 }
             }
+        }else{
+            map={
+                "分类A": 0,
+                "分类B": 0,
+                "分类C": 0
+            }
         }
         return map;
     },

+ 23 - 3
js/service/workhour.js

@@ -6,7 +6,13 @@
 var ServiceWorkhour={
     // 根据物料统计
     getByMaterial:function(){
-        return MethodGetService.methodGet("/workingStatistics/fbsWorkingStatistics/getByMaterial");
+        var byMaterial=MethodGetService.methodGet("/workingStatistics/fbsWorkingStatistics/getByMaterial");
+        if(!byMaterial){
+            byMaterial={
+                "生产":0
+            }
+        }
+        return byMaterial;
         // return MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductHoursMonthReport");
         // return {
         //     "物料A 20*30":250,
@@ -23,7 +29,15 @@ var ServiceWorkhour={
         //     "物料C":200,
         //     "物料D":400,
         // };
-        return MethodGetService.methodGet("/workingStatistics/fbsWorkingStatistics/getByMaterial?type=1");
+        var map=MethodGetService.methodGet("/workingStatistics/fbsWorkingStatistics/getByMaterial?type=1");
+        if(!map||Object.keys(map).length<=0){
+            map={
+                "生产":0
+            }
+        }
+
+
+        return map;
         // return MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getByMaterial?type=1");
     },
     // 获取物料的标准工时和实际工时
@@ -81,7 +95,7 @@ var ServiceWorkhour={
             item.sum2 = item.manHoursCompleted;
         });
 
-        if(list){
+        if(list&&list.length>0){
             var remainingQuantity=3-(list.length%3);
             if(remainingQuantity!=3){
                 for(var i=0;i<remainingQuantity;i++){
@@ -89,8 +103,14 @@ var ServiceWorkhour={
                     list.push({label:"",label1:"标准工时",sum1:0,label2:"实际工时",sum2:0})
                 }
             }
+        }else{
+            list.push({label:"",label1:"标准工时",sum1:0,label2:"实际工时",sum2:0});
+            list.push({label:"",label1:"标准工时",sum1:0,label2:"实际工时",sum2:0});
+            list.push({label:"",label1:"标准工时",sum1:0,label2:"实际工时",sum2:0});
         }
 
+
+
         return list;
 
     }

+ 2 - 0
pages/dashboard/warehouse.html

@@ -368,6 +368,7 @@
                 </div>
                 <div class="row block-padding">
                     <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
+                    <div class="col-lg-3 col-md-3 center no-padding">产品名称</div>
                     <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
                     <div class="col-lg-3 col-md-3 center no-padding">物料名称</div>
                     <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
@@ -378,6 +379,7 @@
                     <div class="col-lg-12 col-md-12">
                         <div class="row" v-for="material in orderSheetMaterialNotEnoughList">
                             <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
+                            <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-3 left no-padding">{{material.mocinvname}}</div>
                             <div 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-3 left no-padding">{{material.materialName}}</div>
                             <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->