turnoverBom.vue 5.7 KB

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