turnoverBom.vue 5.9 KB

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