|
@@ -348,21 +348,46 @@ var ServiceProduceTask = {
|
|
|
},
|
|
|
|
|
|
getProjectScheduleCompletion:function(){
|
|
|
- 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;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ 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;
|
|
|
},
|
|
|
|