index.vue 2.9 KB

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