pack-card.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view v-if="item" @click="emit('click')">
  3. <view class="d-flex j-sb a-c pr-24">
  4. <view class="f-s-20 f-w-5 item-left-tag" :class="{[`bg-pack-${ item?.refType }`]: true }">{{ selectDictLabel(pt_pack_ref_type, item?.refType) }}</view>
  5. <view class="f-s-22 c-#666">
  6. {{ getDateRangeFrt(item?.packagingDateStart, item?.packagingDateStart) }}
  7. <span>包装</span>
  8. </view>
  9. </view>
  10. <view class="pd-20">
  11. <view class="d-flex a-c">
  12. <view class="flex1 ov-hd">
  13. <span class="f-s-34 c-#333 f-w-5 mr-10">{{ item?.proName || '-' }}</span>
  14. <span class="f-s-24 c-#666">{{ item?.proLevel || '-' }}</span>
  15. </view>
  16. <up-icon v-if="isArrow" name="arrow-right" color="#999" size="24rpx"></up-icon>
  17. </view>
  18. <view class="f-s-24 c-#666">{{ item?.proSpenc }}</view>
  19. <view class="pd-6"></view>
  20. <view class="f-s-28 pd2-4-0">
  21. <span class="c-#666">成品批号:</span>
  22. <span class="c-#333 f-w-5">{{ item?.batchSn }}</span>
  23. </view>
  24. <view class="f-s-28 pd2-4-0">
  25. <span class="c-#666">包装批号:</span>
  26. <span class="c-#333 f-w-5">{{ item?.packSn }}</span>
  27. </view>
  28. <view class="d-flex flex-wrap">
  29. <view class="f-s-28 pd2-4-0 hcol-15">
  30. <span class="c-#666">包装规格:</span>
  31. <span class="c-#333 f-w-5">{{ item?.capacity }}{{ item?.storageUseUnit }}/{{ item?.unit }}</span>
  32. </view>
  33. <view class="f-s-28 pd2-4-0 hcol-15">
  34. <span class="c-#666">包装总总量:</span>
  35. <span class="c-#333 f-w-5">{{ item?.storageUseAmount }}{{ item?.storageUseUnit }}</span>
  36. </view>
  37. <view class="f-s-28 pd2-4-0 hcol-15">
  38. <span class="c-#666">分包数量:</span>
  39. <span class="c-#333 f-w-5">{{ item?.planCount }}{{ item?.unit }}</span>
  40. </view>
  41. <view v-if="item.refType == '1'" class="f-s-28 pd2-4-0 hcol-15">
  42. <span class="c-#666">待关联数量:</span>
  43. <span class="c-#333 f-w-5">{{ item?.planCount - item?.actualCount }}{{ item?.unit }}</span>
  44. </view>
  45. <view v-if="item.refType == '2'" class="f-s-28 pd2-4-0 hcol-15">
  46. <span class="c-#666">待打印数量:</span>
  47. <span class="c-#333 f-w-5">{{ item?.actualCount - item?.printCount }}{{ item?.unit }}</span>
  48. </view>
  49. </view>
  50. <slot></slot>
  51. </view>
  52. </view>
  53. </template>
  54. <script lang="ts" setup>
  55. const props = defineProps({
  56. item: {
  57. type: Object,
  58. default: () => null,
  59. },
  60. dict: {
  61. type: Object,
  62. default: () => null,
  63. },
  64. isArrow: {
  65. type: Boolean,
  66. default: false,
  67. },
  68. });
  69. const { pt_pack_ref_type } = toRefs(props?.dict);
  70. const emit = defineEmits(['click']);
  71. </script>
  72. <style lang="scss" scoped>
  73. .item-left-tag {
  74. padding: 6rpx 18rpx;
  75. border-radius: 0 0 18rpx 0;
  76. color: #fff;
  77. }
  78. .bg-pack-1 {
  79. background-color: #2289E0;
  80. }
  81. .bg-pack-2 {
  82. background-color: #37A954;
  83. }
  84. </style>