index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.modelList.length != 0' :list='it.modelList'>
  16. </modelBom>
  17. <instanceBom v-if='it.instanceList.length != 0' :list='it.instanceList'></instanceBom>
  18. <packingBom v-if='it.packingList.length != 0' :list='it.packingList'>></packingBom>
  19. </view>
  20. </view>
  21. </u-list>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import workOrderBom from '../components/workOrderBom.vue'
  27. import deviceBom from '../components/deviceBom.vue'
  28. import modelBom from '../components/modelBom.vue'
  29. import instanceBom from '../components/instanceBom.vue'
  30. import packingBom from '../components/packingBom.vue'
  31. import {
  32. feedByOrderIds
  33. } from '@/api/pda/feeding.js'
  34. export default {
  35. components: {
  36. workOrderBom,
  37. deviceBom,
  38. modelBom,
  39. instanceBom,
  40. packingBom
  41. },
  42. data() {
  43. return {
  44. ids: [],
  45. dataList: [],
  46. }
  47. },
  48. onLoad(option) {
  49. this.ids = [option.id]
  50. this.getList()
  51. },
  52. methods: {
  53. async getList() {
  54. const res = await feedByOrderIds(this.ids)
  55. this.dataList = res
  56. },
  57. scrolltolower() {}
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .content-box {
  63. height: 100vh;
  64. overflow: hidden;
  65. display: flex;
  66. flex-direction: column;
  67. }
  68. .item_box {
  69. margin-top: 10rpx;
  70. margin-bottom: 16rpx;
  71. width: 706rpx;
  72. .round {
  73. width: 40rpx;
  74. height: 40rpx;
  75. line-height: 40rpx;
  76. border-radius: 50%;
  77. background: $theme-color;
  78. color: #fff;
  79. text-align: center;
  80. font-size: 20rpx;
  81. }
  82. .time {
  83. color: #000;
  84. font-family: PingFang HK;
  85. font-size: 28rpx;
  86. font-style: normal;
  87. font-weight: 600;
  88. margin-left: 16rpx;
  89. }
  90. }
  91. .list_box {
  92. flex: 1;
  93. overflow: hidden;
  94. padding: 4rpx 0;
  95. .u-list {
  96. height: 100% !important;
  97. }
  98. .card_box {
  99. padding: 16rpx 24rpx;
  100. }
  101. }
  102. </style>