turnoverBom.vue 5.6 KB

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