You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

593 lines
34 KiB

12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  6. <script src="~/Content/js/jqprint/jquery.jqprint-0.3.js"></script>
  7. <link href="~/Content/js/jqprint/AoMaKpi.css" rel="stylesheet" />
  8. <style>
  9. #print, #print td, #print tr {
  10. border: 1px solid #d3d3d3;
  11. text-align: center;
  12. }
  13. #print th {
  14. height: 35px;
  15. border: 1px solid #d3d3d3;
  16. font-weight: bold;
  17. font-size: 15px;
  18. text-align: center;
  19. }
  20. #print td {
  21. height: 30px;
  22. font-size: 15px;
  23. text-align: center;
  24. }
  25. </style>
  26. <script>
  27. debugger;
  28. var myDate = new Date;
  29. var year = myDate.getFullYear(); //获取当前年
  30. var mon = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1; //获取当前月
  31. var TimeFrom = year + "-" + mon ;
  32. var TimeArrive = year + "-" + mon ;
  33. $(function () {
  34. $("#TimeFrom").val(TimeFrom);
  35. $("#TimeArrive").val(TimeArrive);
  36. $("#TimeInfo").text(mon+'月');
  37. $("#YearInfo").text(year + '年');
  38. Load(TimeFrom, TimeArrive);
  39. })
  40. function Load(TimeFrom,TimeArrive) {
  41. GetZB(TimeFrom, TimeArrive);
  42. GetYFFJ(TimeFrom, TimeArrive);
  43. GetYLAndPC('L1', 'A', TimeFrom, TimeArrive);
  44. GetYLAndPC('L1', 'B', TimeFrom, TimeArrive);
  45. GetYLAndPC('L2', 'A', TimeFrom, TimeArrive);
  46. GetYLAndPC('L2', 'B', TimeFrom, TimeArrive);
  47. GetYLAndPC('L3', 'A', TimeFrom, TimeArrive);
  48. GetYLAndPC('L3', 'B', TimeFrom, TimeArrive);
  49. GetYLAndPC('L4', 'A', TimeFrom, TimeArrive);
  50. GetYLAndPC('L4', 'B', TimeFrom, TimeArrive);
  51. GetYLAndPC('L5', 'A', TimeFrom, TimeArrive);
  52. GetYLAndPC('L5', 'B', TimeFrom, TimeArrive);
  53. GetYLAndPC('L6', 'A', TimeFrom, TimeArrive);
  54. GetYLAndPC('L6', 'B', TimeFrom, TimeArrive);
  55. var L1AYLTR = $("#L1AYLTR").text() * 1; var L1APCLRK = $("L1APCLRK").text() * 1; var L1ACC = $("L1ACC").text() * 1; var L1ACXL = $("L1ACXL").text() * 1; var L1AHYL = $("L1AHYL").text() * 1; var L1ABZCLDCL = $("L1ABZCLDCL").text() * 1; var L1AYFFJ = $("L1AYFFJ").text() * 1; var L1ZB = $("#L1ZB").text() * 1;
  56. var L2AYLTR = $("#L2AYLTR").text() * 1; var L2APCLRK = $("L2APCLRK").text() * 1; var L2ACC = $("L2ACC").text() * 1; var L2ACXL = $("L2ACXL").text() * 1; var L2AHYL = $("L2AHYL").text() * 1; var L2ABZCLDCL = $("L2ABZCLDCL").text() * 1; var L2AYFFJ = $("L2AYFFJ").text() * 1; var L2ZB = $("#L2ZB").text() * 1;
  57. var L3AYLTR = $("#L3AYLTR").text() * 1; var L3APCLRK = $("L3APCLRK").text() * 1; var L3ACC = $("L3ACC").text() * 1; var L3ACXL = $("L3ACXL").text() * 1; var L3AHYL = $("L3AHYL").text() * 1; var L3ABZCLDCL = $("L3ABZCLDCL").text() * 1; var L3AYFFJ = $("L3AYFFJ").text() * 1; var L3ZB = $("#L3ZB").text() * 1;
  58. var L4AYLTR = $("#L4AYLTR").text() * 1; var L4APCLRK = $("L4APCLRK").text() * 1; var L4ACC = $("L4ACC").text() * 1; var L4ACXL = $("L4ACXL").text() * 1; var L4AHYL = $("L4AHYL").text() * 1; var L4ABZCLDCL = $("L4ABZCLDCL").text() * 1; var L4AYFFJ = $("L4AYFFJ").text() * 1; var L4ZB = $("#L4ZB").text() * 1;
  59. var L5AYLTR = $("#L5AYLTR").text() * 1; var L5APCLRK = $("L5APCLRK").text() * 1; var L5ACC = $("L5ACC").text() * 1; var L5ACXL = $("L5ACXL").text() * 1; var L5AHYL = $("L5AHYL").text() * 1; var L5ABZCLDCL = $("L5ABZCLDCL").text() * 1; var L5AYFFJ = $("L5AYFFJ").text() * 1; var L5ZB = $("#L5ZB").text() * 1;
  60. var L6AYLTR = $("#L6AYLTR").text() * 1; var L6APCLRK = $("L6APCLRK").text() * 1; var L6ACC = $("L6ACC").text() * 1; var L6ACXL = $("L6ACXL").text() * 1; var L6AHYL = $("L6AHYL").text() * 1; var L6ABZCLDCL = $("L6ABZCLDCL").text() * 1; var L6AYFFJ = $("L6AYFFJ").text() * 1; var L6ZB = $("#L6ZB").text() * 1;
  61. var L1BYLTR = $("#L1BYLTR").text() * 1; var L1BPCLRK = $("L1BPCLRK").text() * 1; var L1BCC = $("L1BCC").text() * 1; var L1BCXL = $("L1BCXL").text() * 1; var L1BHYL = $("L1BHYL").text() * 1; var L1BBZCLDCL = $("L1BBZCLDCL").text() * 1; var L1BYFFJ = $("L1BYFFJ").text() * 1;
  62. var L2BYLTR = $("#L2BYLTR").text() * 1; var L2BPCLRK = $("L2BPCLRK").text() * 1; var L2BCC = $("L2BCC").text() * 1; var L2BCXL = $("L2BCXL").text() * 1; var L2BHYL = $("L2BHYL").text() * 1; var L2BBZCLDCL = $("L2BBZCLDCL").text() * 1; var L2BYFFJ = $("L2BYFFJ").text() * 1;
  63. var L3BYLTR = $("#L3BYLTR").text() * 1; var L3BPCLRK = $("L3BPCLRK").text() * 1; var L3BCC = $("L3BCC").text() * 1; var L3BCXL = $("L3BCXL").text() * 1; var L3BHYL = $("L3BHYL").text() * 1; var L3BBZCLDCL = $("L3BBZCLDCL").text() * 1; var L3BYFFJ = $("L3BYFFJ").text() * 1;
  64. var L4BYLTR = $("#L4BYLTR").text() * 1; var L4BPCLRK = $("L4BPCLRK").text() * 1; var L4BCC = $("L4BCC").text() * 1; var L4BCXL = $("L4BCXL").text() * 1; var L4BHYL = $("L4BHYL").text() * 1; var L4BBZCLDCL = $("L4BBZCLDCL").text() * 1; var L4BYFFJ = $("L4BYFFJ").text() * 1;
  65. var L5BYLTR = $("#L5BYLTR").text() * 1; var L5BPCLRK = $("L5BPCLRK").text() * 1; var L5BCC = $("L5BCC").text() * 1; var L5BCXL = $("L5BCXL").text() * 1; var L5BHYL = $("L5BHYL").text() * 1; var L5BBZCLDCL = $("L5BBZCLDCL").text() * 1; var L5BYFFJ = $("L5BYFFJ").text() * 1;
  66. var L6BYLTR = $("#L6BYLTR").text() * 1; var L6BPCLRK = $("L6BPCLRK").text() * 1; var L6BCC = $("L6BCC").text() * 1; var L6BCXL = $("L6BCXL").text() * 1; var L6BHYL = $("L6BHYL").text() * 1; var L6BBZCLDCL = $("L6BBZCLDCL").text() * 1; var L6BYFFJ = $("L6BYFFJ").text() * 1;
  67. //线别产出
  68. $("#L1CC").text((L1ACC + L1BCC) === 0 ? '' : (L1ACC + L1BCC));
  69. $("#L2CC").text((L2ACC + L2BCC) === 0 ? '' : (L2ACC + L2BCC));
  70. $("#L3CC").text((L3ACC + L3BCC) === 0 ? '' : (L3ACC + L3BCC));
  71. $("#L4CC").text((L4ACC + L4BCC) === 0 ? '' : (L4ACC + L4BCC));
  72. $("#L5CC").text((L5ACC + L5BCC) === 0 ? '' : (L5ACC + L5BCC));
  73. $("#L6CC").text((L6ACC + L6BCC) === 0 ? '' : (L6ACC + L6BCC));
  74. var L1CC = $("#L1CC").text() * 1;
  75. var L2CC = $("#L2CC").text() * 1;
  76. var L3CC = $("#L3CC").text() * 1;
  77. var L4CC = $("#L4CC").text() * 1;
  78. var L5CC = $("#L5CC").text() * 1;
  79. var L6CC = $("#L6CC").text() * 1;
  80. //线别成型率
  81. //$("#L1CXL").text(Converts((($("#L1CC").text() * 1 / ($("#L1AYFFJ").text() * 1 + $("#L1BYFFJ").text() * 1 + $("#L1AYLTR").text() * 1 + $("#L1BYLTR").text() * 1)) * 100).toFixed(2)) + '%');
  82. //$("#L2CXL").text(Converts((($("#L2CC").text() * 1 / ($("#L2AYFFJ").text() * 1 + $("#L2BYFFJ").text() * 1 + $("#L2AYLTR").text() * 1 + $("#L2BYLTR").text() * 1)) * 100).toFixed(2)) + '%');
  83. //$("#L3CXL").text(Converts((($("#L3CC").text() * 1 / ($("#L3AYFFJ").text() * 1 + $("#L3BYFFJ").text() * 1 + $("#L3AYLTR").text() * 1 + $("#L3BYLTR").text() * 1)) * 100).toFixed(2)) + '%');
  84. //$("#L4CXL").text(Converts((($("#L4CC").text() * 1 / ($("#L4AYFFJ").text() * 1 + $("#L4BYFFJ").text() * 1 + $("#L4AYLTR").text() * 1 + $("#L4BYLTR").text() * 1)) * 100).toFixed(2)) + '%');
  85. //$("#L5CXL").text(Converts((($("#L5CC").text() * 1 / ($("#L5AYFFJ").text() * 1 + $("#L5BYFFJ").text() * 1 + $("#L5AYLTR").text() * 1 + $("#L5BYLTR").text() * 1)) * 100).toFixed(2)) + '%');
  86. //$("#L6CXL").text(Converts((($("#L6CC").text() * 1 / ($("#L6AYFFJ").text() * 1 + $("#L6BYFFJ").text() * 1 + $("#L6AYLTR").text() * 1 + $("#L6BYLTR").text() * 1)) * 100).toFixed(2)) + '%');
  87. debugger;
  88. var l1Cxl = Converts((L1CC / ($("#L1AYFFJ").text() * 1 + $("#L1BYFFJ").text() * 1 + $("#L1AYLTR").text() * 1 + $("#L1BYLTR").text() * 1))) * 100;
  89. var l1CxlResult = l1Cxl === 0 ? '' : Converts(l1Cxl.toFixed(2)) + '%';
  90. $("#L1CXL").text(l1CxlResult);
  91. var l2Cxl = Converts((L2CC / ($("#L2AYFFJ").text() * 1 + $("#L2BYFFJ").text() * 1 + $("#L2AYLTR").text() * 1 + $("#L2BYLTR").text() * 1))) * 100;
  92. var l2CxlResult = l2Cxl === 0 ? '' : Converts(l2Cxl.toFixed(2)) + '%';
  93. $("#L2CXL").text(l2CxlResult);
  94. var l3Cxl = Converts((L3CC / ($("#L3AYFFJ").text() * 1 + $("#L3BYFFJ").text() * 1 + $("#L3AYLTR").text() * 1 + $("#L3BYLTR").text() * 1))) * 100;
  95. var l3CxlResult = l3Cxl === 0 ? '' : Converts(l3Cxl.toFixed(2)) + '%';
  96. $("#L3CXL").text(l3CxlResult);
  97. var l4Cxl = Converts((L4CC / ($("#L4AYFFJ").text() * 1 + $("#L4BYFFJ").text() * 1 + $("#L4AYLTR").text() * 1 + $("#L4BYLTR").text() * 1))) * 100;
  98. var l4CxlResult = l4Cxl === 0 ? '' : Converts(l4Cxl.toFixed(2)) + '%';
  99. $("#L4CXL").text(l4CxlResult);
  100. var l5Cxl = Converts((L5CC / ($("#L5AYFFJ").text() * 1 + $("#L5BYFFJ").text() * 1 + $("#L5AYLTR").text() * 1 + $("#L5BYLTR").text() * 1))) * 100;
  101. var l5CxlResult = l5Cxl === 0 ? '' : Converts(l5Cxl.toFixed(2)) + '%';
  102. $("#L5CXL").text(l5CxlResult);
  103. var l6Cxl = Converts((L6CC / ($("#L6AYFFJ").text() * 1 + $("#L6BYFFJ").text() * 1 + $("#L6AYLTR").text() * 1 + $("#L6BYLTR").text() * 1))) * 100;
  104. var l6CxlResult = l6Cxl === 0 ? '' : Converts(l6Cxl.toFixed(2)) + '%';
  105. $("#L6CXL").text(l6CxlResult);
  106. //线别还原率
  107. $("#L1HYL").text(Converts(((($("#L1CC").text() * 1 + $("#L1APCLRK").text() * 1 + $("#L1BPCLRK").text() * 1) / ($("#L1AYLTR").text() * 1 + $("#L1BYLTR").text() * 1 + $("#L1AYFFJ").text() * 1 + $("#L1BYFFJ").text() * 1)) * 100).toFixed(2)) + '%');
  108. $("#L2HYL").text(Converts(((($("#L2CC").text() * 1 + $("#L2APCLRK").text() * 1 + $("#L2BPCLRK").text() * 1) / ($("#L2AYLTR").text() * 1 + $("#L2BYLTR").text() * 1 + $("#L2AYFFJ").text() * 1 + $("#L2BYFFJ").text() * 1)) * 100).toFixed(2)) + '%');
  109. $("#L3HYL").text(Converts(((($("#L3CC").text() * 1 + $("#L3APCLRK").text() * 1 + $("#L3BPCLRK").text() * 1) / ($("#L3AYLTR").text() * 1 + $("#L3BYLTR").text() * 1 + $("#L3AYFFJ").text() * 1 + $("#L3BYFFJ").text() * 1)) * 100).toFixed(2)) + '%');
  110. $("#L4HYL").text(Converts(((($("#L4CC").text() * 1 + $("#L4APCLRK").text() * 1 + $("#L4BPCLRK").text() * 1) / ($("#L4AYLTR").text() * 1 + $("#L4BYLTR").text() * 1 + $("#L4AYFFJ").text() * 1 + $("#L4BYFFJ").text() * 1)) * 100).toFixed(2)) + '%');
  111. $("#L5HYL").text(Converts(((($("#L5CC").text() * 1 + $("#L5APCLRK").text() * 1 + $("#L5BPCLRK").text() * 1) / ($("#L5AYLTR").text() * 1 + $("#L5BYLTR").text() * 1 + $("#L5AYFFJ").text() * 1 + $("#L5BYFFJ").text() * 1)) * 100).toFixed(2)) + '%');
  112. $("#L6HYL").text(Converts(((($("#L6CC").text() * 1 + $("#L6APCLRK").text() * 1 + $("#L6BPCLRK").text() * 1) / ($("#L6AYLTR").text() * 1 + $("#L6BYLTR").text() * 1 + $("#L6AYFFJ").text() * 1 + $("#L6BYFFJ").text() * 1)) * 100).toFixed(2)) + '%');
  113. //线别产量达成率
  114. $("#L1BZCLDCL").text(Converts(($("#L1CC").text() * 1 / $("#L1ZB").text() * 1) * 100).toFixed(2) + '%');
  115. $("#L2BZCLDCL").text(Converts(($("#L2CC").text() * 1 / $("#L2ZB").text() * 1) * 100).toFixed(2) + '%');
  116. $("#L3BZCLDCL").text(Converts(($("#L3CC").text() * 1 / $("#L3ZB").text() * 1) * 100).toFixed(2) + '%');
  117. $("#L4BZCLDCL").text(Converts(($("#L4CC").text() * 1 / $("#L4ZB").text() * 1) * 100).toFixed(2) + '%');
  118. $("#L5BZCLDCL").text(Converts(($("#L5CC").text() * 1 / $("#L5ZB").text() * 1) * 100).toFixed(2) + '%');
  119. $("#L6BZCLDCL").text(Converts(($("#L6CC").text() * 1 / $("#L6ZB").text() * 1) * 100).toFixed(2) + '%');
  120. //老厂合计
  121. $("#OldFYLTR").text($("#L1AYLTR").text() * 1 + $("#L1BYLTR").text() * 1 + $("#L2AYLTR").text() * 1 + $("#L2BYLTR").text() * 1 + $("#L3AYLTR").text() * 1 + $("#L3BYLTR").text() * 1);
  122. $("#OldYFFJ").text($("#L1AYFFJ").text() * 1 + $("#L1BYFFJ").text() * 1 + $("#L2AYFFJ").text() * 1 + $("#L2BYFFJ").text() * 1 + $("#L3AYFFJ").text() * 1 + $("#L3BYFFJ").text() * 1);
  123. $("#OldCC").text($("#L1ACC").text() * 1 + $("#L1BCC").text() * 1 + $("#L2ACC").text() * 1 + $("#L2BCC").text() * 1 + $("#L3ACC").text() * 1 + $("#L3BCC").text() * 1);
  124. $("#OldHJCC").text($("#L1CC").text() * 1 + $("#L2CC").text() * 1 + $("#L3CC").text() * 1);
  125. $("#OldPCLRK").text($("#L1APCLRK").text() * 1 + $("#L1BPCLRK").text() * 1 + $("#L2APCLRK").text() * 1 + $("#L2BPCLRK").text() * 1 + $("#L3APCLRK").text() * 1 + $("#L3BPCLRK").text() * 1);
  126. $("#OldZB").text($("#L1ZB").text() * 1 + $("#L2ZB").text() * 1 + $("#L3ZB").text() * 1);
  127. $("#OldCXL").text(Converts(($("#OldCC").text() * 1 / ($("#OldFYLTR").text() * 1 + $("#OldYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  128. $("#OldXBCXL").text(Converts(($("#OldCC").text() * 1 / ($("#OldFYLTR").text() * 1 + $("#OldYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  129. $("#OldHYL").text(Converts(((($("#OldCC").text() * 1 + $("#OldPCLRK").text() * 1) / $("#OldFYLTR").text() * 1)) * 100).toFixed(2) + '%');
  130. $("#OldXBHYL").text(Converts(((($("#OldCC").text() * 1 + $("#OldPCLRK").text() * 1) / $("#OldFYLTR").text() * 1)) * 100).toFixed(2) + '%');
  131. $("#OldBZDCL").text(Converts(((($("#OldCC").text() * 1) / ($("#OldZB").text() * 1)) * 100).toFixed(2)) + '%');
  132. $("#OldCLDBL").text(Converts(((($("#OldCC").text() * 1) / ($("#OldZB").text() * 1)) * 100).toFixed(2)) + '%');
  133. //新厂合计
  134. $("#NewFYLTR").text($("#L4AYLTR").text() * 1 + $("#L4BYLTR").text() * 1 + $("#L5AYLTR").text() * 1 + $("#L5BYLTR").text() * 1 + $("#L6AYLTR").text() * 1 + $("#L6BYLTR").text() * 1);
  135. $("#NewYFFJ").text($("#L4AYFFJ").text() * 1 + $("#L4BYFFJ").text() * 1 + $("#L5AYFFJ").text() * 1 + $("#L5BYFFJ").text() * 1 + $("#L6AYFFJ").text() * 1 + $("#L6BYFFJ").text() * 1);
  136. $("#NewCC").text($("#L4ACC").text() * 1 + $("#L4BCC").text() * 1 + $("#L5ACC").text() * 1 + $("#L5BCC").text() * 1 + $("#L6ACC").text() * 1 + $("#L6BCC").text() * 1);
  137. $("#NewHJCC").text($("#L4CC").text() * 1 + $("#L5CC").text() * 1 + $("#L6CC").text() * 1);
  138. $("#NewPCLRK").text($("#L4APCLRK").text() * 1 + $("#L4BPCLRK").text() * 1 + $("#L5APCLRK").text() * 1 + $("#L5BPCLRK").text() * 1 + $("#L6APCLRK").text() * 1 + $("#L6BPCLRK").text() * 1);
  139. $("#NewZB").text($("#L4ZB").text() * 1 + $("#L5ZB").text() * 1 + $("#L6ZB").text() * 1);
  140. $("#NewCXL").text(Converts(($("#NewCC").text() * 1 / ($("#NewFYLTR").text() * 1 + $("#NewYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  141. $("#NewXBCXL").text(Converts(($("#NewCC").text() * 1 / ($("#NewFYLTR").text() * 1 + $("#NewYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  142. $("#NewHYL").text(Converts(((($("#NewCC").text() * 1 + $("#NewPCLRK").text() * 1) / $("#NewFYLTR").text() * 1)) * 100).toFixed(2) + '%');
  143. $("#NewXBHYL").text(Converts(((($("#NewCC").text() * 1 + $("#NewPCLRK").text() * 1) / $("#NewFYLTR").text() * 1)) * 100).toFixed(2) + '%');
  144. $("#NewBZDCL").text(Converts(((($("#NewCC").text() * 1) / ($("#NewZB").text() * 1)) * 100).toFixed(2)) + '%');
  145. $("#NewCLDBL").text(Converts(((($("#NewCC").text() * 1) / ($("#NewZB").text() * 1)) * 100).toFixed(2)) + '%');
  146. //新老厂合计
  147. debugger;
  148. $("#OldNewFYLTR").text($("#OldFYLTR").text() * 1 + $("#NewFYLTR").text() * 1);
  149. $("#OldNewYFFJ").text($("#OldYFFJ").text() * 1 + $("#NewYFFJ").text() * 1);
  150. $("#OldNewCC").text($("#OldCC").text() * 1 + $("#NewCC").text() * 1);
  151. $("#OldNewHJCC").text($("#OldCC").text() * 1 + $("#NewCC").text() * 1);
  152. $("#OldNewPCLRK").text($("#OldPCLRK").text() * 1 + $("#NewPCLRK").text() * 1);
  153. $("#OldNewZB").text($("#OldZB").text() * 1 + $("#NewZB").text() * 1);
  154. $("#OldNewCXL").text(Converts(($("#OldNewCC").text() * 1 / ($("#OldNewFYLTR").text() * 1 + $("#OldNewYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  155. $("#OldNewXBCXL").text(Converts(($("#OldNewCC").text() * 1 / ($("#OldNewFYLTR").text() * 1 + $("#OldNewYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  156. $("#OldNewHYL").text(Converts((($("#OldNewCC").text() * 1 + $("#OldNewPCLRK").text() * 1) / ($("#OldNewFYLTR").text() * 1 + $("#OldNewYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  157. $("#OldNewXBHYL").text(Converts((($("#OldNewCC").text() * 1 + $("#OldNewPCLRK").text() * 1) / ($("#OldNewFYLTR").text() * 1 + $("#OldNewYFFJ").text() * 1)) * 100).toFixed(2) + '%');
  158. $("#OldNewBZDCL").text(Converts((($("#OldNewCC").text() * 1) / ($("#OldNewZB").text() * 1)) * 100).toFixed(2) + '%');
  159. $("#OldNewCLDBL").text(Converts((($("#OldNewCC").text() * 1) / ($("#OldNewZB").text() * 1)) * 100).toFixed(2) + '%');
  160. }
  161. function Seach() {
  162. debugger;
  163. var TimeFrom = $("#TimeFrom").val();
  164. var TimeArrive = $("#TimeArrive").val();
  165. if (TimeFrom == TimeArrive) {
  166. var timeFromSplit = TimeFrom.split("-");
  167. var TimeInfo = timeFromSplit[0] + '年' + timeFromSplit[1]+'月';
  168. $("#TimeInfo").text(TimeInfo);
  169. $("#YearInfo").text(timeFromSplit[0]+'年');
  170. } else {
  171. var timeFromSplit = TimeFrom.split("-");
  172. var TimeArriveSplit = TimeArrive.split("-");
  173. var TimeInfo = timeFromSplit[0] + '年' + timeFromSplit[1] + '月-' + TimeArriveSplit[0] + '年' + TimeArriveSplit[1] + '月';
  174. $("#TimeInfo").text(TimeInfo);
  175. $("#YearInfo").text(timeFromSplit[0] + '年-' + TimeArriveSplit[0]+'年');
  176. }
  177. Load(TimeFrom, TimeArrive);
  178. }
  179. //获取指标
  180. function GetZB(TimeFrom, TimeArrive) {
  181. $.ajax({
  182. url: "/OMAY/OMAYKPI/GetZB?TimeFrom=" + TimeFrom + "&TimeArrive=" + TimeArrive + "&" + Math.random(),
  183. dataType: "json",
  184. async: false,
  185. success: function (data) {
  186. if (data != null && data.length > 0) {
  187. for (var i = 0; i < data.length; i++) {
  188. debugger;
  189. if (data[i].Team == 'L1') { $("#L1ZB").text(data[i].Metrics); }
  190. if (data[i].Team == 'L2') { $("#L2ZB").text(data[i].Metrics); }
  191. if (data[i].Team == 'L3') { $("#L3ZB").text(data[i].Metrics); }
  192. if (data[i].Team == 'L4') { $("#L4ZB").text(data[i].Metrics); }
  193. if (data[i].Team == 'L5') { $("#L5ZB").text(data[i].Metrics); }
  194. if (data[i].Team == 'L6') { $("#L6ZB").text(data[i].Metrics); }
  195. }
  196. }
  197. }
  198. });
  199. }
  200. //获取研发附加
  201. function GetYFFJ(TimeFrom, TimeArrive) {
  202. $.ajax({
  203. url: "/OMAY/OMAYKPI/GetYFFJ?TimeFrom=" + TimeFrom + "&TimeArrive=" + TimeArrive + "&" + Math.random(),
  204. dataType: "json",
  205. async: false,
  206. success: function (data) {
  207. if (data != null && data.length > 0) {
  208. for (var i = 0; i < data.length; i++) {
  209. if (data[i].Team == 'L1A') { $("#L1AYFFJ").text(data[i].Picking); }
  210. if (data[i].Team == 'L1B') { $("#L1BYFFJ").text(data[i].Picking); }
  211. if (data[i].Team == 'L2A') { $("#L2AYFFJ").text(data[i].Picking); }
  212. if (data[i].Team == 'L2B') { $("#L2BYFFJ").text(data[i].Picking); }
  213. if (data[i].Team == 'L3A') { $("#L3AYFFJ").text(data[i].Picking); }
  214. if (data[i].Team == 'L3B') { $("#L3BYFFJ").text(data[i].Picking); }
  215. if (data[i].Team == 'L4A') { $("#L4AYFFJ").text(data[i].Picking); }
  216. if (data[i].Team == 'L4B') { $("#L4BYFFJ").text(data[i].Picking); }
  217. if (data[i].Team == 'L5A') { $("#L5AYFFJ").text(data[i].Picking); }
  218. if (data[i].Team == 'L5B') { $("#L5BYFFJ").text(data[i].Picking); }
  219. if (data[i].Team == 'L6A') { $("#L6AYFFJ").text(data[i].Picking); }
  220. if (data[i].Team == 'L6B') { $("#L6BYFFJ").text(data[i].Picking); }
  221. }
  222. }
  223. }
  224. });
  225. }
  226. function GetYLAndPC(Type, Group, TimeFrom, TimeArrive) {
  227. var YLTR;
  228. var PCLRK;
  229. var CC;
  230. $.ajax({
  231. url: "/OMAY/OMAYKPI/GetYLAndPC?Type=" + Type + "&Group=" + Group +"&TimeFrom=" + TimeFrom + "&TimeArrive=" + TimeArrive + "&" + Math.random(),
  232. dataType: "json",
  233. async: false,
  234. success: function (data) {
  235. YLTR = data.rows[0].YLTR;
  236. PCLRK = data.rows[0].PCLRK;
  237. }
  238. });
  239. $.ajax({
  240. url: "/OMAY/OMAYKPI/GetCC?Type=" + Type + "&Group=" + Group + "&TimeFrom=" + TimeFrom + "&TimeArrive=" + TimeArrive + "&" + Math.random(),
  241. dataType: "json",
  242. async: false,
  243. success: function (data) {
  244. CC = data.rows[0].CC;
  245. }
  246. });
  247. if (Group == "A") {
  248. $("#" + Type + "AYLTR").text(YLTR);//原材料投入
  249. $("#" + Type + "APCLRK").text(PCLRK);//破碎料入库
  250. $("#" + Type + "ACC").text(CC);//产出
  251. var YFFJ = ($("#" + Type + "AYFFJ").text() !== undefined ? $("#" + Type + "AYFFJ").text() : 0);
  252. var ZB = ($("#" + Type + "ZB").text() !== undefined ? $("#" + Type + "ZB").text() : 0);
  253. $("#" + Type + "ACXL").text(Converts(((CC * 1 / (YLTR * 1 + YFFJ * 1)) * 100).toFixed(2)) + '%');//成型率
  254. $("#" + Type + "AHYL").text(Converts((((CC*1 + PCLRK*1) / (YLTR*1 + YFFJ*1)) * 100).toFixed(2)) + '%');//还原率
  255. $("#" + Type + "ABZCLDCL").text(Converts(((CC * 1 / (ZB*1/2)) * 100).toFixed(2)) + '%');//班组产量达成率
  256. }
  257. else
  258. {
  259. $("#" + Type + "BYLTR").text(YLTR);//原材料投入
  260. $("#" + Type + "BPCLRK").text(PCLRK);//破碎料入库
  261. $("#" + Type + "BCC").text(CC);//产出
  262. var YFFJ = ($("#" + Type + "BYFFJ").text() !== undefined ? $("#" + Type + "BYFFJ").text() : 0);
  263. var ZB = ($("#" + Type + "ZB").text() !== undefined ? $("#" + Type + "ZB").text() : 0);
  264. $("#" + Type + "BCXL").text(Converts(((CC * 1 / (YLTR * 1 + YFFJ * 1)) * 100).toFixed(2)) + '%');//成型率
  265. $("#" + Type + "BHYL").text(Converts((((CC * 1 + PCLRK * 1) / (YLTR * 1 + YFFJ * 1)) * 100).toFixed(2)) + '%');//还原率
  266. $("#" + Type + "BBZCLDCL").text(Converts(((CC * 1 / (ZB * 1/2)) * 100).toFixed(2)) + '%');//班组产量达成率
  267. }
  268. }
  269. function Converts(value) {
  270. if (isNaN(value) || !isFinite(value)) {
  271. return 0;
  272. } else {
  273. return value;
  274. }
  275. }
  276. function btn_print() {
  277. $("#print").jqprint();
  278. };
  279. </script>
  280. <div class="topPanel" style="height:50px;">
  281. <div class="toolbar">
  282. <div class="btn-group">
  283. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  284. <a class="btn btn-default " onclick="btn_print()"><i class="fa fa-print" style="margin-right: 5px; font-size: 13px;"></i>直接打印</a>
  285. </div>
  286. <script>$('.toolbar').authorizeButton()</script>
  287. </div>
  288. <div class="search">
  289. <table>
  290. <tr>
  291. <td style="text-align:right;"><label class="lglabel" for="txt_TimeFrom">&nbsp;&nbsp;&nbsp;日期(从)</label>:</td>
  292. <td>
  293. <div class="input-group">
  294. <input id="TimeFrom" name="Time" type="text" class="form-control required" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM'})" placeholder="日期(从)" />
  295. </div>
  296. </td>
  297. <td style="text-align:right;"><label class="lglabel" for="txt_TimeArrive">&nbsp;&nbsp;&nbsp;日期(到)</label>:</td>
  298. <td>
  299. <div class="input-group">
  300. <input id="TimeArrive" name="Time" type="text" class="form-control required" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" placeholder="日期(到)" />
  301. </div>
  302. </td>
  303. <td>
  304. <span class="input-group-btn">
  305. <button id="btn_search" type="button" class="btn btn-primary" onclick="Seach()"><i class="fa fa-search"></i></button>
  306. </span>
  307. </td>
  308. </tr>
  309. </table>
  310. </div>
  311. </div>
  312. <div id="print">
  313. @*<div style="text-align:center;height:30px;line-height:30px;font-weight: bold; font-size: 20px;"><label id="Year">2023</label>年<label id="Month">09</label>月车间KPI数据</div>*@
  314. <div style="margin-top: 2px; margin-left: 4px; margin-right: 4px;">
  315. <div style="padding-top: 2px; margin-right: 3px;">
  316. <table class="form" style="border-collapse: collapse; " >
  317. <tr>
  318. <th rowspan="2"><label id="YearInfo"></label></th>
  319. <th >单位:T </th>
  320. <th colspan="12">奥美车间KPI数据 </th>
  321. </tr>
  322. <tr>
  323. <th >月份</th>
  324. <th colspan="12"><label id="TimeInfo"></label> </th>
  325. </tr>
  326. <tr>
  327. <th >线别</th>
  328. <th >班组</th>
  329. <th>原料投入</th>
  330. <th >研发附加</th>
  331. <th >产出</th>
  332. <th >线别合计产出</th>
  333. <th >破碎料入库</th>
  334. <th >成型率</th>
  335. <th>线别成型率</th>
  336. <th >还原率</th>
  337. <th >线别还原率</th>
  338. <th >指标</th>
  339. <th >班组产量达成率</th>
  340. <th >产量达成率</th>
  341. </tr>
  342. <tr>
  343. <th rowspan="2" id="L1">L1</th>
  344. <td id="L1A">L1A</td>
  345. <td id="L1AYLTR"></td>
  346. <td id="L1AYFFJ"></td>
  347. <td id="L1ACC"></td>
  348. <td id="L1CC" rowspan="2" ></td>
  349. <td id="L1APCLRK"></td>
  350. <td id="L1ACXL"></td>
  351. <td id="L1CXL" rowspan="2" ></td>
  352. <td id="L1AHYL"></td>
  353. <td id="L1HYL" rowspan="2"></td>
  354. <td id="L1ZB" rowspan="2"></td>
  355. <td id="L1ABZCLDCL"></td>
  356. <td id="L1BZCLDCL" rowspan="2"></td>
  357. </tr>
  358. <tr>
  359. <td id="L1B">L1B</td>
  360. <td id="L1BYLTR"></td>
  361. <td id="L1BYFFJ"></td>
  362. <td id="L1BCC"></td>
  363. <td id="L1BPCLRK"></td>
  364. <td id="L1BCXL"></td>
  365. <td id="L1BHYL"></td>
  366. <td id="L1BBZCLDCL"></td>
  367. </tr>
  368. <tr>
  369. <th rowspan="2" id="L2">L2</th>
  370. <td id="L2A">L2A</td>
  371. <td id="L2AYLTR"></td>
  372. <td id="L2AYFFJ"></td>
  373. <td id="L2ACC"></td>
  374. <td id="L2CC" rowspan="2"></td>
  375. <td id="L2APCLRK"></td>
  376. <td id="L2ACXL"></td>
  377. <td id="L2CXL" rowspan="2"></td>
  378. <td id="L2AHYL"></td>
  379. <td id="L2HYL" rowspan="2"></td>
  380. <td id="L2ZB" rowspan="2"></td>
  381. <td id="L2ABZCLDCL"></td>
  382. <td id="L2BZCLDCL" rowspan="2"></td>
  383. </tr>
  384. <tr>
  385. <td id="L2B">L2B</td>
  386. <td id="L2BYLTR"></td>
  387. <td id="L2BYFFJ"></td>
  388. <td id="L2BCC"></td>
  389. <td id="L2BPCLRK"></td>
  390. <td id="L2BCXL"></td>
  391. <td id="L2BHYL"></td>
  392. <td id="L2BBZCLDCL"></td>
  393. </tr>
  394. <tr>
  395. <th rowspan="2" id="L3">L3</th>
  396. <td id="L3A">L3A</td>
  397. <td id="L3AYLTR"></td>
  398. <td id="L3AYFFJ"></td>
  399. <td id="L3ACC"></td>
  400. <td id="L3CC" rowspan="2"></td>
  401. <td id="L3APCLRK"></td>
  402. <td id="L3ACXL"></td>
  403. <td id="L3CXL" rowspan="2"></td>
  404. <td id="L3AHYL"></td>
  405. <td id="L3HYL" rowspan="2"></td>
  406. <td id="L3ZB" rowspan="2"></td>
  407. <td id="L3ABZCLDCL"></td>
  408. <td id="L3BZCLDCL" rowspan="2"></td>
  409. </tr>
  410. <tr>
  411. <td id="L3B">L3B</td>
  412. <td id="L3BYLTR"></td>
  413. <td id="L3BYFFJ"></td>
  414. <td id="L3BCC"></td>
  415. <td id="L3BPCLRK"></td>
  416. <td id="L3BCXL"></td>
  417. <td id="L3BHYL"></td>
  418. <td id="L3BBZCLDCL"></td>
  419. </tr>
  420. <tr>
  421. <th colspan="2" id="OldFactory">老厂合计</th>
  422. <td id="OldFYLTR"></td>
  423. <td id="OldYFFJ"></td>
  424. <td id="OldCC"></td>
  425. <td id="OldHJCC"></td>
  426. <td id="OldPCLRK"></td>
  427. <td id="OldCXL"></td>
  428. <td id="OldXBCXL"></td>
  429. <td id="OldHYL"></td>
  430. <td id="OldXBHYL"></td>
  431. <td id="OldZB"></td>
  432. <td id="OldBZDCL"></td>
  433. <td id="OldCLDBL"></td>
  434. </tr>
  435. <tr>
  436. <th rowspan="2" id="L4">L4</th>
  437. <td id="L4A">L4A</td>
  438. <td id="L4AYLTR"></td>
  439. <td id="L4AYFFJ"></td>
  440. <td id="L4ACC"></td>
  441. <td id="L4CC" rowspan="2"></td>
  442. <td id="L4APCLRK"></td>
  443. <td id="L4ACXL"></td>
  444. <td id="L4CXL" rowspan="2"></td>
  445. <td id="L4AHYL"></td>
  446. <td id="L4HYL" rowspan="2"></td>
  447. <td id="L4ZB" rowspan="2"></td>
  448. <td id="L4ABZCLDCL"></td>
  449. <td id="L4BZCLDCL" rowspan="2"></td>
  450. </tr>
  451. <tr>
  452. <td id="L4B">L4B</td>
  453. <td id="L4BYLTR"></td>
  454. <td id="L4BYFFJ"></td>
  455. <td id="L4BCC"></td>
  456. <td id="L4BPCLRK"></td>
  457. <td id="L4BCXL"></td>
  458. <td id="L4BHYL"></td>
  459. <td id="L4BBZCLDCL"></td>
  460. </tr>
  461. <tr>
  462. <th rowspan="2" id="L5">L5</th>
  463. <td id="L5A">L5A</td>
  464. <td id="L5AYLTR"></td>
  465. <td id="L5AYFFJ"></td>
  466. <td id="L5ACC"></td>
  467. <td id="L5CC" rowspan="2"></td>
  468. <td id="L5APCLRK"></td>
  469. <td id="L5ACXL"></td>
  470. <td id="L5CXL" rowspan="2"></td>
  471. <td id="L5AHYL"></td>
  472. <td id="L5HYL" rowspan="2"></td>
  473. <td id="L5ZB" rowspan="2"></td>
  474. <td id="L5ABZCLDCL"></td>
  475. <td id="L5BZCLDCL" rowspan="2"></td>
  476. </tr>
  477. <tr>
  478. <td id="L5B">L5B</td>
  479. <td id="L5BYLTR"></td>
  480. <td id="L5BYFFJ"></td>
  481. <td id="L5BCC"></td>
  482. <td id="L5BPCLRK"></td>
  483. <td id="L5BCXL"></td>
  484. <td id="L5BHYL"></td>
  485. <td id="L5BBZCLDCL"></td>
  486. </tr>
  487. <tr>
  488. <th rowspan="2" id="L6">L6</th>
  489. <td id="L6A">L6A</td>
  490. <td id="L6AYLTR"></td>
  491. <td id="L6AYFFJ"></td>
  492. <td id="L6ACC"></td>
  493. <td id="L6CC" rowspan="2"></td>
  494. <td id="L6APCLRK"></td>
  495. <td id="L6ACXL"></td>
  496. <td id="L6CXL" rowspan="2"></td>
  497. <td id="L6AHYL"></td>
  498. <td id="L6HYL" rowspan="2"></td>
  499. <td id="L6ZB" rowspan="2"></td>
  500. <td id="L6ABZCLDCL"></td>
  501. <td id="L6BZCLDCL" rowspan="2"></td>
  502. </tr>
  503. <tr>
  504. <td id="L6B">L6B</td>
  505. <td id="L6BYLTR"></td>
  506. <td id="L6BYFFJ"></td>
  507. <td id="L6BCC"></td>
  508. <td id="L6BPCLRK"></td>
  509. <td id="L6BCXL"></td>
  510. <td id="L6BHYL"></td>
  511. <td id="L6BBZCLDCL"></td>
  512. </tr>
  513. <tr>
  514. <th colspan="2" id="NewFactory">新厂合计</th>
  515. <td id="NewFYLTR"></td>
  516. <td id="NewYFFJ"></td>
  517. <td id="NewCC"></td>
  518. <td id="NewHJCC"></td>
  519. <td id="NewPCLRK"></td>
  520. <td id="NewCXL"></td>
  521. <td id="NewXBCXL"></td>
  522. <td id="NewHYL"></td>
  523. <td id="NewXBHYL"></td>
  524. <td id="NewZB"></td>
  525. <td id="NewBZDCL"></td>
  526. <td id="NewCLDBL"></td>
  527. </tr>
  528. <tr>
  529. <th colspan="2" id="OldNewFactory">新老厂合计</th>
  530. <td id="OldNewFYLTR"></td>
  531. <td id="OldNewYFFJ"></td>
  532. <td id="OldNewCC"></td>
  533. <td id="OldNewHJCC"></td>
  534. <td id="OldNewPCLRK"></td>
  535. <td id="OldNewCXL"></td>
  536. <td id="OldNewXBCXL"></td>
  537. <td id="OldNewHYL"></td>
  538. <td id="OldNewXBHYL"></td>
  539. <td id="OldNewZB"></td>
  540. <td id="OldNewBZDCL"></td>
  541. <td id="OldNewCLDBL"></td>
  542. </tr>
  543. </table>
  544. </div>
  545. </div>
  546. </div>