medicine-card.vue 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="d-flex j-sb a-c li-item-head">
  3. <view class="li-left-tag" :class="{ [`bg-instore-${item?.instoreBizInfo?.processType}`]: true }">{{ selectDictLabel(st_medicine_process_type, item?.instoreBizInfo?.processType) }}</view>
  4. <view v-if="isInstoreDate" class="f-s-22 c-#666 mr-24">
  5. {{ getDateRangeFrt(item?.instoreBizInfo?.processingDate, item?.instoreBizInfo?.processingDateEnd) }}
  6. <span>包装</span>
  7. </view>
  8. </view>
  9. <view class="pd-20">
  10. <view class="d-flex flex1">
  11. <view class="flex1">
  12. <span class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.instoreBizInfo?.proName }}</span>
  13. <span v-if="item?.instoreBizInfo?.proLevel" class="f-s-24 c-#666">{{ item?.instoreBizInfo?.proLevel }}</span>
  14. </view>
  15. <view>
  16. <view v-if="item?.examinReport?.length" class="tag-span c-primary bg-#EBF6EE">已检验</view>
  17. <view v-else class="tag-span c-danger bg-#F9ECEA">未检验</view>
  18. </view>
  19. </view>
  20. <view v-if="item?.instoreBizInfo?.proSpecn" class="f-s-24 c-#666">{{ item?.instoreBizInfo?.proSpecn }}</view>
  21. <view class="pd2-4-0 f-s-28">
  22. <span class="c-#666">生产批号:</span>
  23. <span class="c-#333 f-w-500">{{ item?.batchCode || '-' }}</span>
  24. </view>
  25. <view class="pd2-4-0 f-s-28">
  26. <span class="c-#666">执行标准:</span>
  27. <span class="c-#333 f-w-500">{{ item?.instoreBizInfo?.standardName || '-' }}</span>
  28. </view>
  29. <view class="pd2-4-0 f-s-28">
  30. <span class="c-#666">加工工艺:</span>
  31. <span class="c-#333 f-w-500">{{ item?.instoreBizInfo?.ptech || '-' }}</span>
  32. </view>
  33. <view class="pd2-4-0 f-s-28">
  34. <span class="c-#666">入库量:</span>
  35. <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
  36. </view>
  37. <view class="d-flex">
  38. <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
  39. <span class="c-#666">出库量:</span>
  40. <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
  41. </view>
  42. <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
  43. <span class="c-danger">剩余量:</span>
  44. <span class="c-danger f-w-500">{{ item?.restAmount || '0' }}{{ item?.unit }}</span>
  45. </view>
  46. </view>
  47. <slot></slot>
  48. </view>
  49. </template>
  50. <script setup lang="ts" name="MedicineCard">
  51. import { selectDictListClass } from '@/utils/ruoyi';
  52. import { getStorageRoomNames } from '@/utils/common';
  53. // 种源展示卡片
  54. const props = defineProps({
  55. item: {
  56. type: Object,
  57. default: () => ({}),
  58. },
  59. dict: {
  60. type: Object,
  61. default: () => ({}),
  62. },
  63. isInstoreDate: {
  64. type: Boolean,
  65. default: true,
  66. },
  67. });
  68. const { st_medicine_process_type } = toRefs<any>(props.dict);
  69. </script>
  70. <style lang="scss" scoped>
  71. .li-left-tag {
  72. padding: 6rpx 16rpx;
  73. color: #fff;
  74. border-radius: 16rpx 0 16rpx 0;
  75. font-size: 20rpx;
  76. font-weight: 500;
  77. }
  78. .tag-span {
  79. padding: 4rpx 12rpx;
  80. font-size: 20rpx;
  81. border-radius: 18rpx;
  82. }
  83. </style>