|
@@ -244,10 +244,19 @@ var ServiceProduct = {
|
|
// 生产效率
|
|
// 生产效率
|
|
getProduceRate: function () {
|
|
getProduceRate: function () {
|
|
// const rate = 95;
|
|
// const rate = 95;
|
|
- rate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductionEfficiency");
|
|
|
|
|
|
+ // rate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductionEfficiency");
|
|
|
|
+ var listOfData=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getSumDispatchReport");
|
|
|
|
+ var productivityTotal=0
|
|
|
|
+ listOfData.forEach(element => {
|
|
|
|
+ let standardWorkingHoursTotal=element.standardWorkingHoursTotal;//标准工时
|
|
|
|
+ let manHoursCompletedTotal=element.manHoursCompletedTotal;//完成工时
|
|
|
|
+ if(element.projectName==="统计"){
|
|
|
|
+ productivityTotal=((Number(standardWorkingHoursTotal)/Number(manHoursCompletedTotal))*100).toFixed(1)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
return {
|
|
return {
|
|
name: "当月生产效率",
|
|
name: "当月生产效率",
|
|
- value: rate
|
|
|
|
|
|
+ value: productivityTotal
|
|
};
|
|
};
|
|
|
|
|
|
},
|
|
},
|