parcel_detail_particulars.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="parcel_detail_particulars">
  3. <uni-collapse>
  4. <uni-collapse-item>
  5. <template v-slot:title>
  6. <view class="particulars__head">
  7. <image src="../../../static/shop/order_icon.png"></image>
  8. <view class="">
  9. <trans :_t="props.mapOptions.title" />
  10. </view>
  11. </view>
  12. </template>
  13. <template v-slot:default>
  14. <view class="particulars__list">
  15. <view
  16. :style="{
  17. color: item.fontColor ? item.fontColor : '#000'
  18. }"
  19. class="particulars__item"
  20. v-for="(item, i) in props.mapOptions.mapField"
  21. :key="i"
  22. >
  23. <view class="particulars__item-label"><trans :_t="item.label" /></view>
  24. <view
  25. class="particulars__item-right"
  26. :style="i == 0 ? {
  27. fontSize: '42rpx',
  28. fontWeight: 600,
  29. color: '#000'
  30. } : {}"
  31. >
  32. <template v-if="item.key != 'first_price' && item.key != 'continue_price'">
  33. <text style="margin-right:2px;" v-if="item.symbol">{{ item.symbol }}</text>
  34. <text v-if="!item.unit">{{ symbol.symbol }}</text>
  35. <text>{{ props.datas && props.datas[item.key] ? props.datas[item.key] : '0.00' }}</text>
  36. <text style="margin-left:4rpx;" v-if="item.unit">{{ item.unit }}</text>
  37. </template>
  38. <template v-else-if="item.key == 'first_price'">
  39. <text>{{ symbol.symbol }}</text>
  40. <text>{{ props.datas && props.datas[item.key] ? props.datas[item.key] : '0.00' }}</text>
  41. <text>/</text>
  42. <text>500</text>
  43. <text style="margin-left:4rpx;" v-if="item.unit">{{ item.unit }}</text>
  44. </template>
  45. <template v-else-if="item.key == 'continue_price'">
  46. <text>{{ symbol.symbol }}</text>
  47. <text>{{ props.datas && props.datas[item.key] ? props.datas[item.key] : '0.00' }}</text>
  48. <text>/</text>
  49. <text>{{ props.datas && props.datas.act_weight && (props.datas.act_weight - 500) > 0 ? props.datas.act_weight - 500 : 0 }}</text>
  50. <text style="margin-left:4rpx;" v-if="item.unit">{{ item.unit }}</text>
  51. </template>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. </uni-collapse-item>
  57. </uni-collapse>
  58. </view>
  59. </template>
  60. <script setup>
  61. import { computed } from "vue";
  62. import { useSystemStore } from "@/store";
  63. const props = defineProps({
  64. mapOptions: {
  65. type: Object,
  66. default() {
  67. return null
  68. }
  69. },
  70. datas: {
  71. type: Object,
  72. default() {
  73. return null
  74. }
  75. }
  76. })
  77. const useSystem = useSystemStore();
  78. const symbol = computed(() => useSystem.getSymbol);
  79. </script>
  80. <style scoped lang="less">
  81. .parcel_detail_particulars {
  82. width: 100%;
  83. .particulars__head {
  84. display: flex;
  85. flex-direction: row;
  86. align-items: center;
  87. padding: 10rpx 0 20rpx;
  88. font-size: 30rpx;
  89. font-weight: 600;
  90. color: #000;
  91. image {
  92. width: 40rpx;
  93. height: 40rpx;
  94. }
  95. }
  96. .particulars__item {
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. margin-bottom: 4px;
  101. font-size: 28rpx;
  102. color: #000;
  103. // font-weight: 500;
  104. }
  105. .particulars__item:first-child {
  106. .particulars__item-label {
  107. color: #555;
  108. margin: 8px 0 10px 0;
  109. font-size: 32rpx;
  110. }
  111. }
  112. .particulars__item-right {
  113. display: flex;
  114. align-items: center;
  115. }
  116. }
  117. </style>