esop.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=0.5">
  6. <title>E-SOP看板</title>
  7. <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
  8. <link href="/css/dashboard.css" rel="stylesheet" />
  9. <script type="text/javascript" src="/js/service.js"></script>
  10. <script type="text/javascript" src="/js/session.js"></script>
  11. <script type="text/javascript" src="/js/getService.js"></script>
  12. <script type="text/javascript" src="/js/service/method-get-service.js"></script>
  13. <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
  14. <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
  15. </head>
  16. <body id="container" class="container-fluid">
  17. <div class="row no-padding head-bar" style="height:81px">
  18. <div class="col-lg-1 col-md-1">
  19. </div>
  20. <div class="col-lg-4 col-md-4 page-title">
  21. E-SOP看板
  22. </div>
  23. <!-- <div class="col-lg-3 col-md-3 block-padding">
  24. <button type="button" class="btn btn-warning"
  25. onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
  26. <button type="button" class="btn btn-warning"
  27. onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
  28. <button type="button" class="btn btn-warning"
  29. onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
  30. <button type="button" class="btn btn-warning"
  31. onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
  32. </div> -->
  33. <div class="col-lg-4 col-md-4">
  34. </div>
  35. </div>
  36. <div class="my-container" id="div-main">
  37. <div class="row block-padding">
  38. <div class="col-lg-4 col-md-4">
  39. <h2>任务</h2>
  40. <div style="height: 200px;">
  41. <div class="row">
  42. <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">订单号</div>
  43. <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">物料号</div>
  44. <div class="col-lg-2 col-md-2 center no-padding" style="width: 35%;">物料名称</div>
  45. <div class="col-lg-2 col-md-2 center no-padding" style="width: 20%;">规格</div>
  46. <div class="col-lg-2 col-md-2 center no-padding" style="width: 11%;">数量</div>
  47. </div>
  48. <div class="row" v-for="task in taskList2" style="margin-bottom: 2px;">
  49. <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">{{task.orderSheetCode}}</div>
  50. <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">{{task.materialCode}}</div>
  51. <div class="col-lg-2 col-md-2 center no-padding" style="width: 35%;">{{task.materialName}}</div>
  52. <div class="col-lg-2 col-md-2 center no-padding" style="width: 20%;">{{task.specs}}</div>
  53. <div class="col-lg-2 col-md-2 center no-padding" style="width: 11%;">{{task.qty}}</div>
  54. </div>
  55. </div>
  56. <br/>
  57. <h2>文件</h2>
  58. <div class="row">
  59. <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">文件名</div>
  60. <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">文件类型</div>
  61. <div class="col-lg-1 col-md-2 center no-padding" style="width: 25%;">操作</div>
  62. </div>
  63. <div class="row" v-for="task in taskList" style="margin-bottom: 2px;">
  64. <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">{{task.fileName}}</div>
  65. <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">{{task.fileType}}</div>
  66. <div class="col-lg-1 col-md-2 center no-padding" style="width: 25%;">
  67. <button type="button" class="btn btn-xs btn-warning" @click="showfile(task.fileName,task.fileType)">查看</button>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="col-lg-8 col-md-8" >
  72. <img id="imgInfo" src="/files/imgInfo.jpg" width="100%" height="100%"/>
  73. <iframe id="frameMain" width="98%" border="0" frameborder="0" v-bind:src="filepath" style="background-color:#ffffff"></iframe>
  74. <img id="imgType" src="" width="auto" />
  75. <video id="videoType" src="" controls width="auto" > </video>
  76. <div id="textType" width="auto" ></div>
  77. </div>
  78. </div>
  79. </div>
  80. <!-- jQuery -->
  81. <script src="/lib/jquery.min.js"></script>
  82. <script src="/lib/vue.min.js"></script>
  83. <script src="/lib/echarts/echarts.min.js"></script>
  84. <script src="/lib/echarts/theme/macarons.js"></script>
  85. <script src="/js/service/produce-task.js"></script>
  86. <script type="text/javascript">
  87. $(function () {
  88. hideAll();
  89. $("#imgInfo").show();
  90. })
  91. function hideAll(){
  92. $("#frameMain").hide();
  93. $("#imgType").hide();
  94. $("#videoType").hide();
  95. $("#imgInfo").hide();
  96. }
  97. const taskList = ServiceProduceTask.getEsopFileList();
  98. const taskList2 = ServiceProduceTask.getEsopTaskList();
  99. $("#frameMain").height($(window).height()-110);
  100. $("#imgType").height($(window).height()-110);
  101. $("#videoType").height($(window).height()-110);
  102. var vm = new Vue({
  103. el: '#div-main',
  104. data: {
  105. taskList: taskList,
  106. taskList2: taskList2,
  107. filepath:""
  108. },
  109. methods: {
  110. showfile: function (name,file) {
  111. if(file=='pdf'){
  112. hideAll();
  113. $("#frameMain").show();
  114. this.filepath = "/lib/pdfjs/web/viewer.html?file=/upFiles/"+name;
  115. $("#videoType").attr('src',"");
  116. }else if(file=='jpg' || file=='jpeg' || file=='png'){
  117. hideAll();
  118. $("#imgType").show();
  119. $("#imgType").attr('src',"/upFiles/"+name);
  120. $("#videoType").attr('src',"");
  121. }else if(file=='avi' || file=='mov' || file=='rmvb' || file=='rm' || file=='flv' || file=='mp4' || file=='3gp'){
  122. hideAll();
  123. $("#videoType").show();
  124. $("#videoType").attr('src',"/upFiles/"+name);
  125. }else{
  126. alert("暂时不支持该类型文件的展示");
  127. }
  128. }
  129. },
  130. });
  131. </script>
  132. </body>
  133. </html>