AssetsCard.vue 2.6 KB

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