workhour.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 20*30":150,
  21. "物料B 20*35":250,
  22. "物料C 20*35":200,
  23. "物料D 20*35":400,
  24. };
  25. },
  26. // 获取物料的标准工时和实际工时
  27. getStandAndRealByMaterial:function(){
  28. const 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. $.each(list, function(index,item){
  37. item.label = item.productName;
  38. item.label1 = "标准工时";
  39. item.sum1 = item.standHour;
  40. item.label2 = "实际工时";
  41. item.sum2 = item.realHour;
  42. });
  43. return list;
  44. },
  45. // 获取当日物料的标准工时和实际工时
  46. getDayStandAndRealByMaterial:function(){
  47. const list = [];
  48. list.push({productName:"产品A",standHour:15,realHour:20});
  49. list.push({productName:"产品B",standHour:14,realHour:10});
  50. list.push({productName:"产品C",standHour:18,realHour:17});
  51. list.push({productName:"产品D",standHour:16,realHour:19});
  52. list.push({productName:"产品E",standHour:13,realHour:12});
  53. list.push({productName:"产品F",standHour:12,realHour:12});
  54. list.push({productName:"产品G",standHour:17,realHour:20});
  55. $.each(list, function(index,item){
  56. item.label = item.productName;
  57. item.label1 = "标准工时";
  58. item.sum1 = item.standHour;
  59. item.label2 = "实际工时";
  60. item.sum2 = item.realHour;
  61. });
  62. return list;
  63. }
  64. }