瀏覽代碼

制造 产线

chenc 4 年之前
父節點
當前提交
d80e60ffae
共有 4 個文件被更改,包括 58 次插入28 次删除
  1. 5 1
      js/content/mycharts.js
  2. 15 14
      js/service/person.js
  3. 34 9
      js/service/produce-task.js
  4. 4 4
      pages/dashboard/produce.html

+ 5 - 1
js/content/mycharts.js

@@ -180,7 +180,11 @@ var ChartsService = {
                      //换行显示
                      formatter: function(value) {
                         let result = '' //拼接加\n返回的类目项
-                        let maxLength = 2 //每项显示文字个数
+                        let maxLength = 5 //每项显示文字个数
+                        if(divId==="charts_33"){
+                            maxLength=2
+                        }
+                        
                         let valLength = value.length //X轴类目项的文字个数
                         let rowNumber = Math.ceil(valLength / maxLength) //类目项需要换行的行数
                         if (rowNumber > 1) {

+ 15 - 14
js/service/person.js

@@ -87,21 +87,22 @@ var ServicePerson={
     },
     // 人员月出勤率,考勤人数,总人数
     getMonthAttendance:function(){
-        const list = [];
-        list.push({label:"01",sum1:0,sum2:0});
-        list.push({label:"02",sum1:0,sum2:0});
-        list.push({label:"03",sum1:0,sum2:0});
-        list.push({label:"04",sum1:0,sum2:0});
-        list.push({label:"05",sum1:0,sum2:0});
-        list.push({label:"06",sum1:0,sum2:0});
-        list.push({label:"07",sum1:0,sum2:0});
-        list.push({label:"08",sum1:0,sum2:0});
-        list.push({label:"09",sum1:0,sum2:0});
-        list.push({label:"10",sum1:0,sum2:0});
-        list.push({label:"11",sum1:48,sum2:50});
-        list.push({label:"12",sum1:0,sum2:0});
-        return list;
+        // const list = [];
+        // list.push({label:"01",sum1:0,sum2:0});
+        // list.push({label:"02",sum1:0,sum2:0});
+        // list.push({label:"03",sum1:0,sum2:0});
+        // list.push({label:"04",sum1:0,sum2:0});
+        // list.push({label:"05",sum1:0,sum2:0});
+        // list.push({label:"06",sum1:0,sum2:0});
+        // list.push({label:"07",sum1:0,sum2:0});
+        // list.push({label:"08",sum1:0,sum2:0});
+        // list.push({label:"09",sum1:0,sum2:0});
+        // list.push({label:"10",sum1:0,sum2:0});
+        // list.push({label:"11",sum1:48,sum2:50});
+        // list.push({label:"12",sum1:0,sum2:0});
+        // return list;
         // return MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getAttendance");
+        return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getMonthAttendance");
     },
     // 人员日出勤率,考勤人数,总人数
     getDayAttendance:function(){

+ 34 - 9
js/service/produce-task.js

@@ -348,21 +348,46 @@ var ServiceProduceTask = {
     },
     //项目进度完工百分比
     getProjectScheduleCompletion:function(){
-        var projectScheduleCompletionList=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProjectScheduleCompletion");
+        // var projectScheduleCompletionList=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProjectScheduleCompletion");
+        var projectScheduleCompletionList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getMonthListGroupDefine12");
         projectScheduleCompletionList.forEach(item => {
-            if(!item.numberOfTasks){
-                item.numberOfTasks=0;
-            }
-            if(!item.latestCompletedQuantity){
-                item.latestCompletedQuantity=0;
-            }
-            item.incompleteSum = item.numberOfTasks - item.latestCompletedQuantity;
+            // if(!item.numberOfTasks){
+            //     item.numberOfTasks=0;
+            // }
+            // if(!item.latestCompletedQuantity){
+            //     item.latestCompletedQuantity=0;
+            // }
+            // item.incompleteSum = item.numberOfTasks - item.latestCompletedQuantity;
+            // if (item.incompleteSum < 0)
+            //     item.incompleteSum = 0;
+            // item.completePercent = (item.latestCompletedQuantity / item.numberOfTasks * 100).toFixed(0);
+            // item.incompletePercent = (100 - item.completePercent) + "%";
+            // item.completePercent = item.completePercent + "%";
+        });
+
+
+        projectScheduleCompletionList.forEach(element=>{
+            element.projectName= "项目1",
+            element.orderSheetCode= element.mocode,
+            element.materialCode=element.cinvcode,
+            element.materialName=element.cinvname,
+            element.specs=element.cinvstd,
+            element.planSum=element.qty,
+            element.workHour= element.cinvDefine13,
+            element.completeSum=element.qualifiedinqty,
+            element.manHoursInvested=element.manHoursInvested
+        })
+        
+
+        $.each(projectScheduleCompletionList, function (index, item) {
+            item.incompleteSum = item.planSum - item.completeSum;
             if (item.incompleteSum < 0)
                 item.incompleteSum = 0;
-            item.completePercent = (item.latestCompletedQuantity / item.numberOfTasks * 100).toFixed(0);
+            item.completePercent = (item.completeSum / item.planSum * 100).toFixed(0);
             item.incompletePercent = (100 - item.completePercent) + "%";
             item.completePercent = item.completePercent + "%";
         });
+
         return projectScheduleCompletionList;
     },
     // 获取到现在为止在进行订单或者项目

+ 4 - 4
pages/dashboard/produce.html

@@ -160,10 +160,10 @@
                     <div class="col-lg-12 col-md-12" >
                         <div class="row" v-for="product in projectScheduleCompletionList">
                             <!-- <div class="col-lg-3 col-md-3 center no-padding">{{product.productionOrderNumberName}}</div> -->
-                            <div class="col-lg-3 col-md-3 center no-padding">{{product.projectName}}</div>
-                            <div class="col-lg-2 col-md-2 center no-padding">{{product.numberOfTasks}}</div>
-                            <div class="col-lg-2 col-md-2 center no-padding">{{product.standardWorkingHours}}</div>
-                            <div class="col-lg-2 col-md-2 center no-padding">{{product.manHoursCompleted}}</div>
+                            <div class="col-lg-3 col-md-3 center no-padding">{{product.define12}}</div>
+                            <div class="col-lg-2 col-md-2 center no-padding">{{product.planSum}}</div>
+                            <div class="col-lg-2 col-md-2 center no-padding">{{product.workHour}}</div>
+                            <div class="col-lg-2 col-md-2 center no-padding">{{product.manHoursInvested}}</div>
                             <div class="col-lg-2 col-md-2 center no-padding progress">
                                 <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
                                     aria-valuemin="0" aria-valuemax="100" :style="{width:product.completePercent}">