object-card-storage.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <template v-if="item.storageType === '2'">
  3. <seed-source-card :item="item" :dict="{ pt_seed_instore_type, pt_seed_type, pt_fungus_code_type }" :isInstoreDate="isInstoreDate" :showInOutAmount="showInOutAmount"></seed-source-card>
  4. </template>
  5. <template v-if="item.storageType === '4'">
  6. <fresh-goods-card :item="item" :dict="{ pt_fresh_instore_type }" :isInstoreDate="isInstoreDate" :showInOutAmount="showInOutAmount"></fresh-goods-card>
  7. </template>
  8. <template v-if="item.storageType === '5'">
  9. <medicine-card :item="item" :dict="{ st_medicine_process_type }" :isInstoreDate="isInstoreDate" :showInOutAmount="showInOutAmount"></medicine-card>
  10. </template>
  11. </template>
  12. <script lang="ts" setup>
  13. import SeedSourceCard from '@/plant/models/warehouseCard/seed-source-card.vue';
  14. import FreshGoodsCard from '@/plant/models/warehouseCard/fresh-goods-card.vue';
  15. import MedicineCard from '@/plant/models/warehouseCard/medicine-card.vue';
  16. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  17. const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type, st_medicine_process_type, pt_fresh_instore_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type', 'st_medicine_process_type', 'pt_fresh_instore_type') || {});
  18. const props = defineProps({
  19. item: {
  20. type: Object,
  21. default: () => ({}),
  22. },
  23. isInstoreDate: {
  24. type: Boolean,
  25. default: false,
  26. },
  27. showInOutAmount: {
  28. type: Boolean,
  29. default: true,
  30. },
  31. });
  32. </script>