turnoverBom.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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="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' }" v-if='!isDetails'>
  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 class="item ww20" v-if='isDetails'>
  55. {{ it.quantity }}
  56. </view>
  57. </view>
  58. </u-list>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. props: {
  67. list: {
  68. type: Array,
  69. default: () => []
  70. },
  71. wordItem: {
  72. type: Object,
  73. default: () => {}
  74. },
  75. pattern: {
  76. type: String,
  77. default: ''
  78. },
  79. isDetails: {
  80. type: Boolean,
  81. default: false
  82. }
  83. },
  84. watch: {
  85. list: {
  86. immediate: true,
  87. deep: true,
  88. handler(newVal) {
  89. this.newList = newVal
  90. }
  91. }
  92. },
  93. data() {
  94. return {
  95. recycleQuantity: '',
  96. newList: []
  97. }
  98. },
  99. methods: {
  100. quantInt(index, idx, it) {
  101. if (it.quantity >= 1) {
  102. this.$set(this.newList[index].extInfo.positionList[idx], 'workOrderCode', this.wordItem.code)
  103. this.$set(this.newList[index].extInfo.positionList[idx], 'categoryCode', this.wordItem.productCode)
  104. } else {
  105. this.$set(this.newList[index].extInfo.positionList[idx], 'workOrderCode', '')
  106. this.$set(this.newList[index].extInfo.positionList[idx], 'categoryCode', '')
  107. this.$set(this.newList[index].extInfo.positionList[idx], 'quantity', 0)
  108. }
  109. },
  110. handleScan(index) {
  111. this.$emit('handleScan', index, 'turnover')
  112. },
  113. getDelete(index) {
  114. this.list.splice(index, 1)
  115. },
  116. scrolltolower() {}
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .title_box {
  122. margin-top: 20rpx;
  123. .name {
  124. font-size: 28rpx;
  125. font-style: normal;
  126. font-weight: 400;
  127. color: $theme-color;
  128. padding-left: 20rpx;
  129. position: relative;
  130. &:before {
  131. position: absolute;
  132. content: '';
  133. left: 0rpx;
  134. top: 0rpx;
  135. bottom: 0rpx;
  136. width: 4rpx;
  137. height: 28rpx;
  138. background: $theme-color;
  139. margin: auto;
  140. }
  141. }
  142. .left {
  143. width: 40rpx;
  144. }
  145. .btn_box {
  146. padding: 0 18rpx;
  147. height: 60rpx;
  148. background: $theme-color;
  149. font-size: 26rpx;
  150. font-style: normal;
  151. font-weight: 400;
  152. font-size: 24rpx;
  153. color: #fff;
  154. border-radius: 4rpx;
  155. .scan {
  156. width: 34rpx;
  157. height: 34rpx;
  158. margin-right: 12rpx;
  159. }
  160. }
  161. }
  162. .content_table {
  163. margin-top: 8rpx;
  164. width: 100%;
  165. border: 2rpx solid $border-color;
  166. .item {
  167. display: flex;
  168. border-bottom: 2rpx solid $border-color;
  169. .lable {
  170. width: 132rpx;
  171. text-align: center;
  172. background-color: #F7F9FA;
  173. font-size: 26rpx;
  174. border-right: 2rpx solid $border-color;
  175. flex-shrink: 0;
  176. }
  177. .ww80 {
  178. width: 80rpx;
  179. }
  180. .ww50 {
  181. width: 50%;
  182. }
  183. .content {
  184. width: 518rpx;
  185. min-height: 64rpx;
  186. font-size: 28rpx;
  187. line-height: 28rpx;
  188. font-style: normal;
  189. font-weight: 400;
  190. padding: 2rpx 8rpx;
  191. box-sizing: border-box;
  192. word-wrap: break-word;
  193. flex-grow: 1 !important;
  194. font-size: 24rpx;
  195. }
  196. &:last-child {
  197. border-bottom: none;
  198. }
  199. }
  200. }
  201. .content_table2 {
  202. width: 100%;
  203. .row {
  204. width: 100%;
  205. .item {
  206. color: #404446;
  207. font-size: 28rpx;
  208. padding-left: 12rpx;
  209. }
  210. .color157 {
  211. color: $theme-color;
  212. }
  213. .ww20 {
  214. width: 20%;
  215. }
  216. .ww35 {
  217. width: 35%;
  218. }
  219. .ww10 {
  220. width: 10%;
  221. }
  222. }
  223. .head {
  224. height: 64rpx;
  225. background: #F7F9FA;
  226. border-top: 2rpx solid #E3E5E5;
  227. border-left: 2rpx solid #E3E5E5;
  228. .item {
  229. height: 64rpx;
  230. line-height: 64rpx;
  231. border-right: 2rpx solid #E3E5E5;
  232. box-sizing: border-box;
  233. }
  234. }
  235. .tr {
  236. border-top: 2rpx solid #E3E5E5;
  237. border-left: 2rpx solid #E3E5E5;
  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>