turnoverBom.vue 6.4 KB

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