AssetsCard.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="listBox">
  3. <view class="listBox-con">
  4. <view class="listBox-top">
  5. <view class="listBox-name" style="display: flex;">
  6. <view class="round">{{index}}</view>
  7. {{ item.categoryName }}
  8. </view>
  9. </view>
  10. <view class="listBox-bottom">
  11. <view>批次号:{{ item.batchNo }}</view>
  12. <view class="w100">包装编码:{{ item.packageNo }}</view>
  13. <view>包装数量:{{ item.info.packingCountBase }}</view>
  14. <view>包装单位:{{ item.info.packingUnit }}</view>
  15. <view>重量:{{ item.info.weight }}</view>
  16. <view>重量单位:{{ item.info.weightUnit }}</view>
  17. <view>状态:{{ statusInfo[item.status] }}</view>
  18. <view>数量:{{ item[countInfo[item.status]] }}</view>
  19. <view class="w100">仓库:{{ item.info.warehouseName }}</view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. props: {
  27. index: {
  28. type: Number,
  29. default: 0
  30. },
  31. item: {
  32. type: Object,
  33. default: () => ({
  34. info: {}
  35. })
  36. }
  37. },
  38. data() {
  39. return {
  40. statusOption: [{
  41. label: '盘盈',
  42. value: '2',
  43. numKey: 'surplusQuantity'
  44. },
  45. {
  46. label: '丢失',
  47. value: '3',
  48. numKey: 'loseQuantity'
  49. },
  50. {
  51. label: '破损',
  52. value: '4',
  53. numKey: 'wornQuantity'
  54. }
  55. ],
  56. statusInfo: {
  57. 2: '盘盈',
  58. 3: '丢失',
  59. 4: '破损'
  60. },
  61. countInfo: {
  62. 2: 'surplusQuantity',
  63. 3: 'loseQuantity',
  64. 4: 'wornQuantity'
  65. }
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .listBox {
  72. display: flex;
  73. // height: 180rpx;
  74. padding: 20rpx;
  75. border-bottom: 2rpx solid #e5e5e5;
  76. .listBox-sel {
  77. height: 90rpx;
  78. width: 80rpx;
  79. // line-height: 90rpx;
  80. text-align: center;
  81. checkbox {
  82. transform: scale(1.2);
  83. }
  84. }
  85. .listBox-con {
  86. width: 100%;
  87. padding: 0 16px 8px 8px;
  88. .listBox-top {
  89. width: 100%;
  90. display: flex;
  91. align-items: center;
  92. justify-content: space-between;
  93. padding-bottom: 10rpx;
  94. .listBox-name,
  95. .listBox-code {
  96. display: inline-block;
  97. font-size: $uni-font-size-sm;
  98. font-weight: bold;
  99. }
  100. }
  101. .round {
  102. width: 40rpx;
  103. height: 40rpx;
  104. line-height: 40rpx;
  105. border-radius: 50%;
  106. background: $theme-color;
  107. color: #fff;
  108. text-align: center;
  109. font-size: 20rpx;
  110. margin-right: 8px;
  111. }
  112. .listBox-bottom {
  113. width: 100%;
  114. display: flex;
  115. justify-content: space-between;
  116. font-size: $uni-font-size-sm;
  117. flex-wrap: wrap;
  118. >view {
  119. width: 50%;
  120. overflow: hidden;
  121. white-space: nowrap;
  122. text-overflow: ellipsis;
  123. line-height: 24px;
  124. }
  125. .input_view {
  126. display: flex;
  127. align-items: center;
  128. justify-content: center;
  129. .u-input {
  130. height: 36rpx;
  131. padding: 0 !important;
  132. margin-right: 10rpx;
  133. border: 1px solid #ddd;
  134. }
  135. }
  136. .w100 {
  137. width: 100%;
  138. }
  139. }
  140. }
  141. }
  142. .noDate {
  143. height: 100%;
  144. }
  145. </style>