index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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 cx-sc" v-for="(item, index) in dataList" :key="index">
  8. <view class="content_table">
  9. <view class="item">
  10. <view class="lable rx-cc" style="color:#157A2C ;">领料单号</view>
  11. <view class="content" style="color:#157A2C;">
  12. {{ item.code }}
  13. </view>
  14. </view>
  15. </view>
  16. <view v-for="(it,idx) in item.orderInfoList" :key='idx'>
  17. <view class="word_order ">工单编号:{{it.code}}</view>
  18. <view v-if='it.arr.length == 0' style='margin-top: 10px;'>
  19. <u-empty iconSize='80' textSize='32' text='未领料'>
  20. </u-empty>
  21. </view>
  22. <instanceBom :list='it.arr'></instanceBom>
  23. </view>
  24. </view>
  25. <u-list-item v-if="dataList.length === 0" style='margin-top: 20vh;'>
  26. <u-empty iconSize='150' textSize='32' text='暂无数据'>
  27. </u-empty>
  28. </u-list-item>
  29. </u-list>
  30. </view>
  31. <view class="bottom-wrapper">
  32. <!-- <view class="btn_box" @click="save">一键报工</view> -->
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. tableHeader
  39. } from '../../common.js'
  40. import {
  41. workorderPage
  42. } from '@/api/pda/workOrder.js'
  43. import {
  44. pickDetails
  45. } from '@/api/pda/picking.js'
  46. import instanceBom from './components/instanceBom.vue'
  47. export default {
  48. components: {
  49. instanceBom
  50. },
  51. data() {
  52. return {
  53. ids: [],
  54. dataList: [],
  55. }
  56. },
  57. onLoad(option) {
  58. this.ids = [option.id]
  59. this.getList()
  60. },
  61. methods: {
  62. async getList() {
  63. const res = await pickDetails(this.ids)
  64. let list = res
  65. list.forEach(m => {
  66. if (m.orderInfoList.length > 0) {
  67. m.orderInfoList.forEach(o => {
  68. let _arr = []
  69. _arr = [...o.bomDetailDTOS, ...o.instanceList]
  70. _arr = _arr.sort((a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId)
  71. o['arr'] = _arr
  72. })
  73. }
  74. })
  75. this.dataList = list
  76. },
  77. scrolltolower() {
  78. },
  79. tableH(type) {
  80. return tableHeader(type)
  81. },
  82. save() {},
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .content-box {
  88. height: 100vh;
  89. overflow: hidden;
  90. display: flex;
  91. flex-direction: column;
  92. }
  93. .list_box {
  94. flex: 1;
  95. overflow: hidden;
  96. padding: 16rpx 0;
  97. .u-list {
  98. height: 100% !important;
  99. }
  100. }
  101. .bottom-wrapper {
  102. .btn_box {
  103. width: 750rpx;
  104. height: 88rpx;
  105. line-height: 88rpx;
  106. background: $theme-color;
  107. text-align: center;
  108. font-size: 36rpx;
  109. font-style: normal;
  110. font-weight: 400;
  111. color: #fff;
  112. }
  113. }
  114. .card_box {
  115. margin-top: 10rpx;
  116. .word_order {
  117. height: 64rpx;
  118. width: 706rpx;
  119. background: $theme-color;
  120. font-size: 28rpx;
  121. color: #fff;
  122. line-height: 64rpx;
  123. padding-left: 40rpx;
  124. box-sizing: border-box;
  125. }
  126. .content_table {
  127. margin-top: 10rpx;
  128. width: 702rpx;
  129. border: 2rpx solid $border-color;
  130. .item {
  131. display: flex;
  132. border-bottom: 2rpx solid $border-color;
  133. .lable {
  134. width: 132rpx;
  135. text-align: center;
  136. background-color: #F7F9FA;
  137. font-size: 26rpx;
  138. border-right: 2rpx solid $border-color;
  139. flex-shrink: 0;
  140. }
  141. .ww80 {
  142. width: 80rpx;
  143. }
  144. .content {
  145. width: 518rpx;
  146. min-height: 64rpx;
  147. font-size: 28rpx;
  148. line-height: 28rpx;
  149. font-style: normal;
  150. font-weight: 400;
  151. padding: 18rpx 8rpx;
  152. box-sizing: border-box;
  153. word-wrap: break-word;
  154. flex-grow: 1 !important;
  155. }
  156. .content_num {
  157. display: flex;
  158. align-items: center;
  159. padding: 0 4rpx;
  160. /deep/ .uni-input-input {
  161. width: 480rpx;
  162. border: 2rpx solid #F0F8F2;
  163. background: #F0F8F2;
  164. color: $theme-color;
  165. }
  166. .unit {
  167. padding: 0 4rpx;
  168. font-size: 24rpx;
  169. color: #404446;
  170. }
  171. }
  172. .pd4 {
  173. padding: 4rpx 8rpx;
  174. }
  175. &:last-child {
  176. border-bottom: none;
  177. }
  178. }
  179. .ww55 {
  180. width: 55%;
  181. }
  182. .ww45 {
  183. width: 45%;
  184. }
  185. }
  186. }
  187. </style>