turnoverBom.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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">
  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="btn_box rx-bc" @click="handleScan(index)" v-if="pattern == 'job'">
  12. <image class="scan" src="@/static/pda/ScanIt.svg"></image>
  13. 更换周转车
  14. </view>
  15. </view>
  16. <view class="content_table">
  17. <view class="item rx-sc">
  18. <view class="rx ww50 ">
  19. <view class="lable ww80 rx-cc ">编号</view>
  20. <view class="content rx-sc">
  21. <view>{{item.code}}</view>
  22. </view>
  23. </view>
  24. <view class="rx ww50">
  25. <view class="lable rx-cc ww80">名称</view>
  26. <view class="content rx-sc">
  27. <view>{{item.name}}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="content_table2">
  33. <view class="head row rx-sc">
  34. <view class="item ww10">货位</view>
  35. <view class="item ww35">工单编号</view>
  36. <view class="item ww35">产品编码</view>
  37. <view class="item ww20">数量(PCS)</view>
  38. </view>
  39. <view class="table">
  40. <u-list @scrolltolower="scrolltolower" class="z_list">
  41. <view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
  42. <view class="item ww10">{{it.code}}</view>
  43. <view class="item ww35" :class="{'color157': it.workOrderCode === wordItem.code}">
  44. {{ it.workOrderCode }}
  45. </view>
  46. <view class="item ww35" :class="{'color157': it.categoryCode === wordItem.productCode}">
  47. {{it.categoryCode}}
  48. </view>
  49. <view class="item ww20 " :class="{'content_num' : pattern == 'job' }">
  50. <input class="uni-input" v-if='it.isFull == 0' @input="quantInt(index, idx, it)"
  51. v-model="it.quantity" type="digit" :disabled="pattern != 'job'"></input>
  52. <text v-else>{{it.quantity}}</text>
  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. },
  77. watch: {
  78. list: {
  79. immediate: true,
  80. deep: true,
  81. handler(newVal) {
  82. this.newList = newVal
  83. }
  84. }
  85. },
  86. data() {
  87. return {
  88. recycleQuantity: '',
  89. newList: []
  90. }
  91. },
  92. methods: {
  93. quantInt(index, idx, it) {
  94. if (it.quantity >= 1) {
  95. this.$set(this.newList[index].extInfo.positionList[idx], 'workOrderCode', this.wordItem.code)
  96. this.$set(this.newList[index].extInfo.positionList[idx], 'categoryCode', this.wordItem.productCode)
  97. } else {
  98. this.$set(this.newList[index].extInfo.positionList[idx], 'workOrderCode', '')
  99. this.$set(this.newList[index].extInfo.positionList[idx], 'categoryCode', '')
  100. this.$set(this.newList[index].extInfo.positionList[idx], 'quantity', 0)
  101. }
  102. },
  103. handleScan(index) {
  104. this.$emit('handleScan', index, 'turnover')
  105. },
  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. }
  203. .color157 {
  204. color: $theme-color;
  205. }
  206. .ww20 {
  207. width: 20%;
  208. }
  209. .ww35 {
  210. width: 35%;
  211. }
  212. .ww10 {
  213. width: 10%;
  214. }
  215. }
  216. .head {
  217. height: 64rpx;
  218. background: #F7F9FA;
  219. border-top: 2rpx solid #E3E5E5;
  220. border-left: 2rpx solid #E3E5E5;
  221. .item {
  222. height: 64rpx;
  223. line-height: 64rpx;
  224. border-right: 2rpx solid #E3E5E5;
  225. box-sizing: border-box;
  226. }
  227. }
  228. .tr {
  229. border-top: 2rpx solid #E3E5E5;
  230. border-left: 2rpx solid #E3E5E5;
  231. .item {
  232. font-size: 24rpx;
  233. min-height: 64rpx;
  234. display: flex;
  235. align-items: center;
  236. border-right: 2rpx solid #E3E5E5;
  237. box-sizing: border-box;
  238. white-space: normal;
  239. word-break: break-all;
  240. }
  241. &:last-child {
  242. border-bottom: 2rpx solid #E3E5E5;
  243. }
  244. }
  245. }
  246. .content_num {
  247. display: flex;
  248. align-items: center;
  249. padding: 0 4rpx;
  250. /deep/ .uni-input-input {
  251. border: 2rpx solid #F0F8F2;
  252. background: #F0F8F2;
  253. color: $theme-color;
  254. }
  255. }
  256. .z_list{
  257. max-height: 500rpx;
  258. }
  259. </style>