index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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' :currentTaskDiagram='currentTaskDiagram' ></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. currentTaskDiagram: {
  53. isFirstTask: 0
  54. }
  55. }
  56. },
  57. onLoad(option) {
  58. this.ids = [option.id]
  59. this.getList()
  60. },
  61. methods: {
  62. async getList() {
  63. const res = await feedByOrderIds(this.ids)
  64. this.dataList = res
  65. },
  66. scrolltolower() {}
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .content-box {
  72. height: 100vh;
  73. overflow: hidden;
  74. display: flex;
  75. flex-direction: column;
  76. }
  77. .item_box {
  78. margin-top: 10rpx;
  79. margin-bottom: 16rpx;
  80. width: 706rpx;
  81. .round {
  82. width: 40rpx;
  83. height: 40rpx;
  84. line-height: 40rpx;
  85. border-radius: 50%;
  86. background: $theme-color;
  87. color: #fff;
  88. text-align: center;
  89. font-size: 20rpx;
  90. }
  91. .time {
  92. color: #000;
  93. font-family: PingFang HK;
  94. font-size: 28rpx;
  95. font-style: normal;
  96. font-weight: 600;
  97. margin-left: 16rpx;
  98. }
  99. }
  100. .list_box {
  101. flex: 1;
  102. overflow: hidden;
  103. padding: 4rpx 0;
  104. .u-list {
  105. height: 100% !important;
  106. }
  107. .card_box {
  108. padding: 16rpx 24rpx;
  109. }
  110. }
  111. </style>