turnoverBom.vue 5.6 KB

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