turnoverBom.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">周转车</view>
  5. </view>
  6. <view v-for="(item, index) in newList" :key='index'>
  7. <view class="title_box rx-bc" v-if='!isDetails'>
  8. <view class="left rx-ss" @click="getDelete(index)">
  9. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
  10. </view>
  11. </view>
  12. <view class="content_table">
  13. <view class="item rx-sc">
  14. <view class="rx ww50 ">
  15. <view class="lable ww80 rx-cc ">编号</view>
  16. <view class="content rx-sc">
  17. <view>{{item.code}}</view>
  18. </view>
  19. </view>
  20. <view class="rx ww50">
  21. <view class="lable rx-cc ww80">名称</view>
  22. <view class="content rx-sc">
  23. <view>{{item.name}}</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="content_table2">
  29. <view class="head row rx-sc">
  30. <view class="item ww10">货位</view>
  31. <view class="item ww25">工单编号</view>
  32. <view class="item ww25">产品编码</view>
  33. <view class="item ww20">数量PCS</view>
  34. <view class="item ww20">投料PCS</view>
  35. </view>
  36. <view class="table">
  37. <u-list @scrolltolower="scrolltolower" class="z_list">
  38. <view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
  39. <view class="item ww10">{{it.code}}</view>
  40. <view class="item ww25" :class="{'color157': it.workOrderCode === wordItem.code}">
  41. {{ it.workOrderCode }}
  42. </view>
  43. <view class="item ww25" :class="{'color157': it.categoryCode === wordItem.productCode}">
  44. {{it.categoryCode}}
  45. </view>
  46. <view class="item ww20 ">
  47. <text>{{it.quantity}} </text>
  48. </view>
  49. <view class="item ww20">
  50. <input :class="['uni-input', wordItem.code == it.workOrderCode && it.quantity > 0 ? 'content_num' : ''] " v-model="it.feedNum"
  51. type="digit" :disabled="it.quantity <= 0"
  52. @blur="Number(it.feedNum) > Number(it.quantity) ? it.feedNum = Number(it.quantity) : ''"></input>
  53. </view>
  54. </view>
  55. </u-list>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. props: {
  64. list: {
  65. type: Array,
  66. default: () => []
  67. },
  68. wordItem: {
  69. type: Object,
  70. default: () => {}
  71. },
  72. pattern: {
  73. type: String,
  74. default: ''
  75. },
  76. isDetails: {
  77. type: Boolean,
  78. default: false
  79. }
  80. },
  81. watch: {
  82. list: {
  83. immediate: true,
  84. handler(newVal) {
  85. newVal.forEach(f => {
  86. if (f.extInfo && f.extInfo.positionList && f.extInfo.positionList.length) {
  87. f.extInfo.positionList.forEach(oo => {
  88. if (this.wordItem.code == oo.workOrderCode && this.wordItem.productCode ==
  89. oo.categoryCode && Number(oo.quantity) > 1 && this.isDetails != true) {
  90. this.$set(oo, 'feedNum', oo.quantity)
  91. }
  92. })
  93. }
  94. })
  95. this.newList = newVal
  96. }
  97. }
  98. },
  99. data() {
  100. return {
  101. newList: [],
  102. totalCount: 0,
  103. }
  104. },
  105. methods: {
  106. getDelete(index) {
  107. this.list.splice(index, 1)
  108. },
  109. scrolltolower() {}
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .title_box {
  115. margin-top: 20rpx;
  116. .name {
  117. font-size: 28rpx;
  118. font-style: normal;
  119. font-weight: 400;
  120. color: $theme-color;
  121. padding-left: 20rpx;
  122. position: relative;
  123. &:before {
  124. position: absolute;
  125. content: '';
  126. left: 0rpx;
  127. top: 0rpx;
  128. bottom: 0rpx;
  129. width: 4rpx;
  130. height: 28rpx;
  131. background: $theme-color;
  132. margin: auto;
  133. }
  134. }
  135. .left {
  136. width: 40rpx;
  137. }
  138. .btn_box {
  139. padding: 0 18rpx;
  140. height: 60rpx;
  141. background: $theme-color;
  142. font-size: 26rpx;
  143. font-style: normal;
  144. font-weight: 400;
  145. font-size: 24rpx;
  146. color: #fff;
  147. border-radius: 4rpx;
  148. .scan {
  149. width: 34rpx;
  150. height: 34rpx;
  151. margin-right: 12rpx;
  152. }
  153. }
  154. }
  155. .content_table {
  156. margin-top: 8rpx;
  157. width: 100%;
  158. border: 2rpx solid $border-color;
  159. .item {
  160. display: flex;
  161. border-bottom: 2rpx solid $border-color;
  162. .lable {
  163. width: 132rpx;
  164. text-align: center;
  165. background-color: #F7F9FA;
  166. font-size: 26rpx;
  167. border-right: 2rpx solid $border-color;
  168. flex-shrink: 0;
  169. }
  170. .ww80 {
  171. width: 80rpx;
  172. }
  173. .ww50 {
  174. width: 50%;
  175. }
  176. .content {
  177. width: 518rpx;
  178. min-height: 64rpx;
  179. font-size: 28rpx;
  180. line-height: 28rpx;
  181. font-style: normal;
  182. font-weight: 400;
  183. padding: 2rpx 8rpx;
  184. box-sizing: border-box;
  185. word-wrap: break-word;
  186. flex-grow: 1 !important;
  187. font-size: 24rpx;
  188. }
  189. &:last-child {
  190. border-bottom: none;
  191. }
  192. }
  193. }
  194. .content_table2 {
  195. width: 100%;
  196. .row {
  197. width: 100%;
  198. .item {
  199. color: #404446;
  200. font-size: 28rpx;
  201. padding-left: 12rpx;
  202. padding-right: 6rpx;
  203. }
  204. .color157 {
  205. color: $theme-color;
  206. }
  207. .ww20 {
  208. width: 20%;
  209. }
  210. .ww25 {
  211. width: 25%;
  212. }
  213. .ww35 {
  214. width: 35%;
  215. }
  216. .ww10 {
  217. width: 10%;
  218. }
  219. }
  220. .head {
  221. height: 64rpx;
  222. background: #F7F9FA;
  223. border-top: 2rpx solid #E3E5E5;
  224. border-left: 2rpx solid #E3E5E5;
  225. box-sizing: border-box;
  226. .item {
  227. height: 64rpx;
  228. line-height: 64rpx;
  229. border-right: 2rpx solid #E3E5E5;
  230. box-sizing: border-box;
  231. font-size: 24rpx;
  232. }
  233. }
  234. .tr {
  235. border-top: 2rpx solid #E3E5E5;
  236. border-left: 2rpx solid #E3E5E5;
  237. box-sizing: border-box;
  238. .item {
  239. font-size: 24rpx;
  240. min-height: 64rpx;
  241. display: flex;
  242. align-items: center;
  243. border-right: 2rpx solid #E3E5E5;
  244. box-sizing: border-box;
  245. white-space: normal;
  246. word-break: break-all;
  247. }
  248. &:last-child {
  249. border-bottom: 2rpx solid #E3E5E5;
  250. }
  251. }
  252. }
  253. .content_num {
  254. display: flex;
  255. align-items: center;
  256. padding: 0 4rpx;
  257. /deep/ .uni-input-input {
  258. border: 2rpx solid #F0F8F2;
  259. background: #F0F8F2;
  260. color: $theme-color;
  261. }
  262. }
  263. .z_list {
  264. max-height: 500rpx;
  265. }
  266. </style>