workhour.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * 工时服务
  3. * 冯海夫
  4. * 20201008
  5. */
  6. var ServiceWorkhour={
  7. // 根据物料统计
  8. getByMaterial:function(){
  9. return MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductHoursMonthReport");
  10. // return {
  11. // "物料A 20*30":250,
  12. // "物料B 20*35":250,
  13. // "物料C 20*35":200,
  14. // "物料D 20*35":400,
  15. // };
  16. },
  17. // 当天根据物料统计
  18. getDayByMaterial:function(){
  19. return {
  20. "物料A":150,
  21. "物料B":250,
  22. "物料C":200,
  23. "物料D":400,
  24. };
  25. },
  26. // 获取物料的标准工时和实际工时
  27. getStandAndRealByMaterial:function(){
  28. var list = [];
  29. // list.push({productName:"产品A",standHour:15,realHour:20});
  30. // list.push({productName:"产品B",standHour:14,realHour:10});
  31. // list.push({productName:"产品C",standHour:18,realHour:17});
  32. // list.push({productName:"产品D",standHour:16,realHour:19});
  33. // list.push({productName:"产品E",standHour:13,realHour:12});
  34. // list.push({productName:"产品F",standHour:12,realHour:12});
  35. // list.push({productName:"产品G",standHour:17,realHour:20});
  36. list=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getWorkingHoursContrast");
  37. $.each(list, function(index,item){
  38. item.label = item.product;
  39. item.label1 = "标准工时";
  40. item.sum1 = item.standardWorkingHours;
  41. item.label2 = "实际工时";
  42. item.sum2 = item.manHoursCompleted;
  43. });
  44. return list;
  45. },
  46. // 获取当日物料的标准工时和实际工时
  47. getDayStandAndRealByMaterial:function(){
  48. const list = [];
  49. list.push({productName:"产品A",standHour:15,realHour:20});
  50. list.push({productName:"产品B",standHour:14,realHour:10});
  51. list.push({productName:"产品C",standHour:18,realHour:17});
  52. list.push({productName:"产品D",standHour:16,realHour:19});
  53. list.push({productName:"产品E",standHour:13,realHour:12});
  54. list.push({productName:"产品F",standHour:12,realHour:12});
  55. list.push({productName:"产品G",standHour:17,realHour:20});
  56. $.each(list, function(index,item){
  57. item.label = item.productName;
  58. item.label1 = "标准工时";
  59. item.sum1 = item.standHour;
  60. item.label2 = "实际工时";
  61. item.sum2 = item.realHour;
  62. });
  63. return list;
  64. }
  65. }