index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="投料单" background-color="#F7F9FA" color="#000"
  4. @clickLeft="back"></uni-nav-bar>
  5. <view class="list_box">
  6. <u-list @scrolltolower="scrolltolower" key="dataList">
  7. <view class="card_box " v-for="(item, index) in dataList" :key="index">
  8. <view class="item_box rx-bc">
  9. <view class="round">{{index + 1}}</view>
  10. <view class="time">投料时间:{{item.createTime}} </view>
  11. </view>
  12. <view v-for="(it,idx) in item.orderInfoList" :key="idx">
  13. <workOrderBom :item='it' :isDetails='true'></workOrderBom>
  14. <deviceBom v-if='it.equipmentList.length != 0' :list='it.equipmentList'></deviceBom>
  15. <modelBom v-if='it.equipmentList.length != 0' :list='it.modelList'>
  16. </modelBom>
  17. <instanceBom v-if='it.instanceList.length != 0' :list='it.instanceList'></instanceBom>
  18. </view>
  19. </view>
  20. </u-list>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import workOrderBom from '../components/workOrderBom.vue'
  26. import deviceBom from '../components/deviceBom.vue'
  27. import modelBom from '../components/modelBom.vue'
  28. import instanceBom from '../components/instanceBom.vue'
  29. import {
  30. feedByOrderIds
  31. } from '@/api/pda/feeding.js'
  32. export default {
  33. components: {
  34. workOrderBom,
  35. deviceBom,
  36. modelBom,
  37. instanceBom
  38. },
  39. data() {
  40. return {
  41. ids: [],
  42. dataList: [],
  43. }
  44. },
  45. onLoad(option) {
  46. this.ids = [option.id]
  47. this.getList()
  48. },
  49. methods: {
  50. async getList() {
  51. const res = await feedByOrderIds(this.ids)
  52. this.dataList = res
  53. },
  54. scrolltolower() {}
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .content-box {
  60. height: 100vh;
  61. overflow: hidden;
  62. display: flex;
  63. flex-direction: column;
  64. }
  65. .item_box {
  66. margin-top: 10rpx;
  67. margin-bottom: 16rpx;
  68. width: 706rpx;
  69. .round {
  70. width: 40rpx;
  71. height: 40rpx;
  72. line-height: 40rpx;
  73. border-radius: 50%;
  74. background: $theme-color;
  75. color: #fff;
  76. text-align: center;
  77. font-size: 20rpx;
  78. }
  79. .time {
  80. color: #000;
  81. font-family: PingFang HK;
  82. font-size: 28rpx;
  83. font-style: normal;
  84. font-weight: 600;
  85. margin-left: 16rpx;
  86. }
  87. }
  88. .list_box {
  89. flex: 1;
  90. overflow: hidden;
  91. padding: 4rpx 0;
  92. .u-list {
  93. height: 100% !important;
  94. }
  95. .card_box {
  96. padding: 16rpx 24rpx;
  97. }
  98. }
  99. </style>