details.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
  4. color="#000" @clickLeft="back">
  5. </uni-nav-bar>
  6. <view class="list_box">
  7. <u-list @scrolltolower="scrolltolower">
  8. <view class="card_box" v-for="(objData,index) in list" :key='index'>
  9. <view class="rx-bc title_card">
  10. <view>{{index + 1}}</view>
  11. <view>报工时间: {{objData.createTime}}</view>
  12. </view>
  13. <workOrderBom :item='objData' v-if='objData' :isDetails='true'></workOrderBom>
  14. <deviceBom v-if='objData.equipmentList.length != 0' :list='objData.equipmentList'></deviceBom>
  15. <modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'>
  16. </modelBom>
  17. <qualityStat :normalQuality='objData.normalQuality' v-if='objData && taskType == 3'></qualityStat>
  18. <sampleBom :item='objData.quality' v-if='objData.quality && taskType == 2'
  19. :workReportInfo='objData.workReportInfo' :isDetails='true'></sampleBom>
  20. <jobBom :item='objData' v-if="objData.notFormedList" :palletList='objData.palletList'
  21. :notFormed='objData.notFormedList' :isDetails='true'></jobBom>
  22. <palletBom v-if="objData.palletList.length != 0" :palletList='objData.palletList' :isDetails='true'>
  23. </palletBom>
  24. <!-- <revolvingDiskBom v-if="objData.revolvingDiskList.length > 0"
  25. :revolvingDiskList="objData.revolvingDiskList"></revolvingDiskBom> -->
  26. <oneJobBom v-if='objData.instanceList && objData.instanceList.length != 0'
  27. :list='objData.instanceList' :item='objData' :isDetails='true'> </oneJobBom>
  28. <byProductBom v-if='objData.productRecycleList.length != 0 ' :list='objData.productRecycleList'
  29. :isDetails='true'>
  30. </byProductBom>
  31. <turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
  32. pattern='job' :isDetails='true'>
  33. </turnoverBom>
  34. <aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList'
  35. :remainingTime='0' :isType='true'></aridRegion>
  36. </view>
  37. <view v-if='list.length == 0'>
  38. <view style='margin-top: 20vh;'>
  39. <u-empty iconSize='150' textSize='32' text='暂无报工详情'>
  40. </u-empty>
  41. </view>
  42. </view>
  43. </u-list>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. listWorkReport,
  50. } from '@/api/pda/workOrder.js'
  51. import workOrderBom from '../../feeding/components/workOrderBom.vue'
  52. import deviceBom from '../../feeding/components/deviceBom.vue'
  53. import modelBom from '../../feeding/components/modelBom.vue'
  54. import jobBom from '../../jobBooking/components/jobBom.vue'
  55. import oneJobBom from '../../jobBooking/components/oneJobBom.vue'
  56. import byProductBom from '../../jobBooking/components/byProductBom'
  57. import turnoverBom from '../../jobBooking/components/turnoverBom.vue'
  58. import aridRegion from '../../feeding/components/aridRegion.vue'
  59. import paramBom from '../../feeding/components/paramBom.vue'
  60. import qualityStat from '../../sample/components/qualityStat.vue'
  61. import sampleBom from '../../sample/components/sampleBom.vue'
  62. import palletBom from '../../feeding/components/palletBom.vue'
  63. import revolvingDiskBom from '../../feeding/components/revolvingDiskBom.vue'
  64. export default {
  65. components: {
  66. workOrderBom,
  67. deviceBom,
  68. modelBom,
  69. jobBom,
  70. oneJobBom,
  71. byProductBom,
  72. turnoverBom,
  73. aridRegion,
  74. paramBom,
  75. qualityStat,
  76. sampleBom,
  77. palletBom,
  78. revolvingDiskBom
  79. },
  80. data() {
  81. return {
  82. workOrderId: null,
  83. taskId: null,
  84. list: [],
  85. taskType: 1
  86. }
  87. },
  88. onLoad(options) {
  89. this.title = options.taskName ? options.taskName + '-报工详情' : '报工详情'
  90. this.workOrderId = options.id
  91. this.taskId = options.taskId
  92. this.taskType = options.taskType
  93. this.getList()
  94. },
  95. methods: {
  96. getList() {
  97. let param = {
  98. workOrderId: this.workOrderId,
  99. taskId: this.taskId
  100. }
  101. listWorkReport(param).then(res => {
  102. this.list = res
  103. })
  104. },
  105. scrolltolower() {}
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .content-box {
  111. height: 100vh;
  112. overflow: hidden;
  113. display: flex;
  114. flex-direction: column;
  115. }
  116. .list_box {
  117. flex: 1;
  118. overflow: hidden;
  119. padding: 4rpx 0;
  120. .u-list {
  121. height: 100% !important;
  122. }
  123. .card_box {
  124. padding: 16rpx;
  125. }
  126. }
  127. .bottom-wrapper {
  128. .btn_box {
  129. width: 750rpx;
  130. height: 88rpx;
  131. line-height: 88rpx;
  132. background: $theme-color;
  133. text-align: center;
  134. font-size: 36rpx;
  135. font-style: normal;
  136. font-weight: 400;
  137. color: #fff;
  138. }
  139. }
  140. .operate_box {
  141. padding: 10rpx 160rpx;
  142. /deep/ .u-button {
  143. width: 160rpx;
  144. }
  145. }
  146. .title_card {
  147. height: 70rpx;
  148. width: 100%;
  149. background: #157A2C;
  150. font-size: 30rpx;
  151. color: #fff;
  152. line-height: 70rpx;
  153. padding: 0 22rpx;
  154. box-sizing: border-box;
  155. }
  156. </style>