details.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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" v-if='taskType != 5'>
  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. <packingTgBom
  37. v-if='objData.packInfo && objData.packInfo.pickOutInList && objData.packInfo.pickOutInList != 0 && taskType == 4 && clientEnvironmentId == 3 '
  38. :list='objData.packInfo.pickOutInList' :isWarehousing='true' :isDetails="true"></packingTgBom>
  39. <packingBom v-if="objData.packInfo && clientEnvironmentId == 2" :packInfo="objData.packInfo">
  40. </packingBom>
  41. </view>
  42. </u-list>
  43. <u-list @scrolltolower="scrolltolower" v-if='taskType == 5'>
  44. <view class="card_box" v-for="(objData,index) in list" :key='index'>
  45. <view class="rx-bc title_card">
  46. <view>{{index + 1}}</view>
  47. <view>报工时间: {{objData.createTime}}</view>
  48. </view>
  49. <workOrderBom2 :item='objData' v-if='objData' :isDetails='true'></workOrderBom2>
  50. <detailsBom v-if='objData.detailList.length != 0' :detailList='objData.detailList' ></detailsBom>
  51. </view>
  52. </u-list>
  53. <view v-if='list.length == 0'>
  54. <view style='margin-top: 20vh;'>
  55. <u-empty iconSize='150' textSize='32' text='暂无报工详情'>
  56. </u-empty>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import {
  64. listWorkReport,
  65. listApplystorage,
  66. } from '@/api/pda/workOrder.js'
  67. import workOrderBom from '../../feeding/components/workOrderBom.vue'
  68. import deviceBom from '../../feeding/components/deviceBom.vue'
  69. import modelBom from '../../feeding/components/modelBom.vue'
  70. import jobBom from '../../jobBooking/components/jobBom.vue'
  71. import oneJobBom from '../../jobBooking/components/oneJobBom.vue'
  72. import byProductBom from '../../jobBooking/components/byProductBom'
  73. import turnoverBom from '../../jobBooking/components/turnoverBom.vue'
  74. import aridRegion from '../../feeding/components/aridRegion.vue'
  75. import paramBom from '../../feeding/components/paramBom.vue'
  76. import qualityStat from '../../sample/components/qualityStat.vue'
  77. import sampleBom from '../../sample/components/sampleBom.vue'
  78. import palletBom from '../../feeding/components/palletBom.vue'
  79. import revolvingDiskBom from '../../feeding/components/revolvingDiskBom.vue'
  80. import packingTgBom from '../../jobBooking/components/packingTgBom.vue'
  81. import packingBom from '../../jobBooking/components/packingBomDetails.vue'
  82. //
  83. import detailsBom from '../../warehousing/components/detailsBom.vue'
  84. import workOrderBom2 from '../../warehousing/components/workOrderBom.vue'
  85. export default {
  86. components: {
  87. workOrderBom,
  88. deviceBom,
  89. modelBom,
  90. jobBom,
  91. oneJobBom,
  92. byProductBom,
  93. turnoverBom,
  94. aridRegion,
  95. paramBom,
  96. qualityStat,
  97. sampleBom,
  98. palletBom,
  99. revolvingDiskBom,
  100. packingTgBom,
  101. packingBom,
  102. detailsBom,
  103. workOrderBom2
  104. },
  105. data() {
  106. return {
  107. workOrderId: null,
  108. taskId: null,
  109. list: [],
  110. taskType: 1,
  111. clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
  112. .clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
  113. }
  114. },
  115. onLoad(options) {
  116. this.title = options.taskName ? options.taskName + '-报工详情' : '报工详情'
  117. this.workOrderId = options.id
  118. this.taskId = options.taskId
  119. this.taskType = options.taskType
  120. this.getList()
  121. },
  122. methods: {
  123. getList() {
  124. let param = {
  125. workOrderId: this.workOrderId,
  126. taskId: this.taskId
  127. }
  128. let URL = this.taskType == 5 ? listApplystorage : listWorkReport
  129. URL(param).then(res => {
  130. this.list = res
  131. console.log(11, res)
  132. })
  133. },
  134. scrolltolower() {}
  135. }
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. .content-box {
  140. height: 100vh;
  141. overflow: hidden;
  142. display: flex;
  143. flex-direction: column;
  144. }
  145. .list_box {
  146. flex: 1;
  147. overflow: hidden;
  148. padding: 4rpx 0;
  149. .u-list {
  150. height: 100% !important;
  151. }
  152. .card_box {
  153. padding: 16rpx;
  154. }
  155. }
  156. .bottom-wrapper {
  157. .btn_box {
  158. width: 750rpx;
  159. height: 88rpx;
  160. line-height: 88rpx;
  161. background: $theme-color;
  162. text-align: center;
  163. font-size: 36rpx;
  164. font-style: normal;
  165. font-weight: 400;
  166. color: #fff;
  167. }
  168. }
  169. .operate_box {
  170. padding: 10rpx 160rpx;
  171. /deep/ .u-button {
  172. width: 160rpx;
  173. }
  174. }
  175. .title_card {
  176. height: 70rpx;
  177. width: 100%;
  178. background: #157A2C;
  179. font-size: 30rpx;
  180. color: #fff;
  181. line-height: 70rpx;
  182. padding: 0 22rpx;
  183. box-sizing: border-box;
  184. }
  185. </style>