turnoverBom.vue 5.6 KB

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