赫艾前端
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.

191 lines
5.0 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <div style="text-align: center">
  4. <h1>混炼待入库看板</h1>
  5. </div>
  6. <div class="board2">
  7. <!-- @mouseenter.native="mouseEnter"-->
  8. <!-- @mouseleave.native="mouseLeave"-->
  9. <el-table
  10. cell-style="cc"
  11. :height="height"
  12. :data="tableData"
  13. ref="wt_table"
  14. border
  15. :row-class-name="tableRowClassName"
  16. style="width: 100%;">
  17. <el-table-column
  18. prop="transNo"
  19. header-align="center"
  20. align="left"
  21. min-width="95"
  22. style="font-size: 20px"
  23. label="入库通知单号">
  24. </el-table-column>
  25. <el-table-column
  26. prop="orderNo"
  27. header-align="center"
  28. align="left"
  29. min-width="95"
  30. style="font-size: 20px"
  31. label="生产订单号">
  32. </el-table-column>
  33. <el-table-column
  34. prop="site"
  35. header-align="center"
  36. align="left"
  37. min-width="40"
  38. style="font-size: 20px"
  39. label="工厂">
  40. </el-table-column>
  41. <el-table-column
  42. prop="transDate"
  43. header-align="center"
  44. align="left"
  45. min-width="80"
  46. label="报工日期">
  47. </el-table-column>
  48. <el-table-column
  49. prop="partNo"
  50. header-align="center"
  51. align="left"
  52. min-width="100"
  53. label="产品编号">
  54. </el-table-column>
  55. <el-table-column
  56. prop="partDesc"
  57. header-align="center"
  58. align="left"
  59. min-width="130"
  60. label="产品名称">
  61. </el-table-column>
  62. <el-table-column
  63. prop="qty"
  64. header-align="center"
  65. align="right"
  66. min-width="60"
  67. label="未入库数量">
  68. </el-table-column>
  69. <el-table-column
  70. prop="needReceiveFlag"
  71. header-align="center"
  72. align="left"
  73. min-width="60"
  74. label="检验通过">
  75. <template slot-scope="scope">
  76. {{scope.row.needReceiveFlag=='Y'?'是':'否'}}
  77. </template>
  78. </el-table-column>
  79. </el-table>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. let rollstop = ''
  85. let rolltimer = ''// 自动滚动的定时任务
  86. let refresher = '' //数据刷新定时器
  87. import {
  88. transFerBoardForHunlian,
  89. } from '@/api/board.js'
  90. export default {
  91. name: 'transFerBoardForHunlian',
  92. data () {
  93. return {
  94. pageIndex: 1,
  95. totalPage: 1,
  96. height: 200,
  97. tableData: [],
  98. // 默认的刷新,滚动时间,滚动间距
  99. // refreshTime: 5,
  100. // rollTime: 5,
  101. // rollPx: 1,
  102. }
  103. },
  104. mounted () {
  105. this.$nextTick(() => {
  106. this.height = window.innerHeight - 80
  107. })
  108. // this.autoRoll()
  109. },
  110. methods: {
  111. tableRowClassName ({row, rowIndex}) {
  112. },
  113. search () {
  114. let inData= {number:this.pageIndex};
  115. transFerBoardForHunlian(inData).then(({data}) => {
  116. this.tableData = data.rows;
  117. this.totalPage= data.maxPage;
  118. if(this.pageIndex+1>data.maxPage){
  119. this.pageIndex=1
  120. }else {
  121. this.pageIndex=this.pageIndex+1
  122. }
  123. })
  124. },
  125. // 鼠标进入
  126. // mouseEnter (time) {
  127. // // 鼠标进入停止滚动和切换的定时任务
  128. // this.autoRoll(true)
  129. // },
  130. // 鼠标离开
  131. // mouseLeave () {
  132. // // 开启
  133. // this.autoRoll()
  134. // },
  135. // 设置自动滚动
  136. // autoRoll (stop) {
  137. // if (stop) {
  138. // clearInterval(rolltimer)
  139. // return
  140. // }
  141. // // 拿到表格挂载后的真实DOM
  142. // const table = this.$refs.wt_table
  143. // // 拿到表格中承载数据的div元素
  144. // const divData = table.bodyWrapper
  145. // // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果
  146. // rolltimer = setInterval(() => {
  147. // // 元素自增距离顶部像素
  148. // divData.scrollTop = this.decimalUtil.add(Number(divData.scrollTop), Number(this.rollPx))
  149. // // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)
  150. // if (divData.clientHeight + divData.scrollTop +1>= divData.scrollHeight) {
  151. // // 重置table距离顶部距离
  152. // divData.scrollTop = 0
  153. // }
  154. // }, this.rollTime * 10)
  155. // },
  156. refreshTable () {
  157. refresher = setInterval(() => {
  158. this.search()
  159. }, 30000)
  160. }
  161. },
  162. created () {
  163. this.search()
  164. this.refreshTable()
  165. }
  166. }
  167. </script>
  168. <style >
  169. .board2 .el-table .cell {
  170. line-height: 13px;
  171. font-size: 12px;
  172. height: 13px;
  173. padding: 0px;
  174. }
  175. .board2 .el-table .success-row {
  176. background: #1bb61b;
  177. }
  178. .board2 .el-table .false-row {
  179. /*background: #cbcb14;*/
  180. background: #db1212;
  181. }
  182. .board2 .el-table .yellow-row{
  183. background: #ffff00;
  184. }
  185. </style>