index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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. <instanceBom :list='it.bomDetailDTOS'></instanceBom>
  19. <instanceBom :list='it.instanceList'></instanceBom>
  20. </view>
  21. </view>
  22. <u-list-item v-if="dataList.length === 0" style='margin-top: 20vh;'>
  23. <u-empty iconSize='150' textSize='32' text='暂无数据'>
  24. </u-empty>
  25. </u-list-item>
  26. </u-list>
  27. </view>
  28. <view class="bottom-wrapper">
  29. <view class="btn_box" @click="save">一键报工</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import {
  35. tableHeader
  36. } from '../../common.js'
  37. import {
  38. workorderPage
  39. } from '@/api/pda/workOrder.js'
  40. import {
  41. pickDetails
  42. } from '@/api/pda/picking.js'
  43. import instanceBom from './components/instanceBom.vue'
  44. export default {
  45. components: {
  46. instanceBom
  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 pickDetails(this.ids)
  61. this.dataList = res
  62. },
  63. scrolltolower() {
  64. },
  65. tableH(type) {
  66. return tableHeader(type)
  67. },
  68. save() {},
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .content-box {
  74. height: 100vh;
  75. overflow: hidden;
  76. display: flex;
  77. flex-direction: column;
  78. }
  79. .list_box {
  80. flex: 1;
  81. overflow: hidden;
  82. padding: 16rpx 0;
  83. .u-list {
  84. height: 100% !important;
  85. }
  86. }
  87. .bottom-wrapper {
  88. .btn_box {
  89. width: 750rpx;
  90. height: 88rpx;
  91. line-height: 88rpx;
  92. background: $theme-color;
  93. text-align: center;
  94. font-size: 36rpx;
  95. font-style: normal;
  96. font-weight: 400;
  97. color: #fff;
  98. }
  99. }
  100. .card_box {
  101. margin-top: 10rpx;
  102. .word_order {
  103. height: 64rpx;
  104. width: 706rpx;
  105. background: $theme-color;
  106. font-size: 28rpx;
  107. color: #fff;
  108. line-height: 64rpx;
  109. padding-left: 40rpx;
  110. box-sizing: border-box;
  111. }
  112. .content_table {
  113. margin-top: 10rpx;
  114. width: 702rpx;
  115. border: 2rpx solid $border-color;
  116. .item {
  117. display: flex;
  118. border-bottom: 2rpx solid $border-color;
  119. .lable {
  120. width: 132rpx;
  121. text-align: center;
  122. background-color: #F7F9FA;
  123. font-size: 26rpx;
  124. border-right: 2rpx solid $border-color;
  125. flex-shrink: 0;
  126. }
  127. .ww80 {
  128. width: 80rpx;
  129. }
  130. .content {
  131. width: 518rpx;
  132. min-height: 64rpx;
  133. font-size: 28rpx;
  134. line-height: 28rpx;
  135. font-style: normal;
  136. font-weight: 400;
  137. padding: 18rpx 8rpx;
  138. box-sizing: border-box;
  139. word-wrap: break-word;
  140. flex-grow: 1 !important;
  141. }
  142. .content_num {
  143. display: flex;
  144. align-items: center;
  145. padding: 0 4rpx;
  146. /deep/ .uni-input-input {
  147. width: 480rpx;
  148. border: 2rpx solid #F0F8F2;
  149. background: #F0F8F2;
  150. color: $theme-color;
  151. }
  152. .unit {
  153. padding: 0 4rpx;
  154. font-size: 24rpx;
  155. color: #404446;
  156. }
  157. }
  158. .pd4 {
  159. padding: 4rpx 8rpx;
  160. }
  161. &:last-child {
  162. border-bottom: none;
  163. }
  164. }
  165. .ww55 {
  166. width: 55%;
  167. }
  168. .ww45 {
  169. width: 45%;
  170. }
  171. }
  172. }
  173. </style>