goodsInformation.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="list">
  3. <!-- 商品相关 -->
  4. <view class="abount" style="margin-top: 20rpx">
  5. <view class="u-flex u-row-between" style="margin-bottom: 40rpx">
  6. <view class="name">{{ i18n.Commodityamount }}</view>
  7. <view class="money"> ¥{{ specificationsPrice }} </view>
  8. </view>
  9. <view class="u-flex u-row-between" v-if="containname">
  10. <view class="name">{{ i18n.Grosscommodityweight }}</view>
  11. <view class="money">{{ goodsWeight }}kg</view>
  12. </view>
  13. <!-- <view class="back u-flex" v-if="containname">
  14. <image
  15. src="../../../static/images/warning.png"
  16. style="width: 32rpx; height: 32rpx"
  17. mode=""
  18. ></image>
  19. <text style="margin-left: 12rpx; font-size: 24rpx"
  20. >{{ i18n.buy }}{{ countGoodsInformation.max_weight }}kg{{
  21. i18n.price
  22. }}¥{{ countGoodsInformation.unit_fee }}{{
  23. i18n.morefavorable
  24. }}</text
  25. >
  26. </view> -->
  27. <view
  28. class="u-flex u-row-between"
  29. style="margin-bottom: 40rpx; margin-top: 20rpx"
  30. >
  31. <view class="name">{{ i18n.Costperkilogram }}</view>
  32. <view class="money">{{
  33. containname ? countGoodsInformation.unit_price : i18n.shippingmethod
  34. }}</view>
  35. </view>
  36. <view class="u-flex u-row-between">
  37. <view class="name">{{ i18n.freight }}</view>
  38. <!-- 基础运费乘以公斤数,得出订单运费,最外层Number().toFixed(2)的作用,保留小数点后两位 -->
  39. <view class="money">{{
  40. containname
  41. ? Number(countGoodsInformation.sum).toFixed(2)
  42. : i18n.shippingmethod
  43. }}</view>
  44. </view>
  45. <view class="zong u-flex u-row-right" v-if="false">
  46. <view class="">
  47. <text class="small">{{ i18n.subtotal }}</text>
  48. <text class="mon">¥</text>
  49. <text class="mon" style="font-size: 40rpx">{{
  50. specificationsPrice
  51. }}</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. props: {
  60. goodinfo: {
  61. typeof: Object,
  62. default: () => {
  63. return {};
  64. },
  65. },
  66. sku_info: {
  67. typeof: Object,
  68. default: () => {
  69. return {};
  70. },
  71. },
  72. //货柜名称,用来判断是否已经选择货柜,显示选择货柜之后的内容
  73. containname: {
  74. typeof: String,
  75. default: "",
  76. },
  77. //商品价格
  78. goodsPrice: {
  79. typeof: String,
  80. default: "",
  81. },
  82. //选完货柜之后的商品信息
  83. countGoodsInformation: {
  84. typeof: Object,
  85. default: () => {
  86. return {};
  87. },
  88. },
  89. //商品数量
  90. goodsValue: {
  91. typeof: Number,
  92. default: 0,
  93. },
  94. //商品重量
  95. goodsWeight: {
  96. typeof: Number,
  97. default: 0,
  98. },
  99. specificationsPrice: {
  100. typeof: Number,
  101. default: 0,
  102. },
  103. },
  104. computed: {
  105. i18n() {
  106. return this.$t("index");
  107. },
  108. },
  109. };
  110. </script>
  111. <style scoped lang="scss">
  112. .list {
  113. //商品相关
  114. .abount {
  115. padding: 28rpx 24rpx;
  116. box-sizing: border-box;
  117. background: #ffffff;
  118. border-radius: 16rpx;
  119. width: 702rpx;
  120. .zong {
  121. width: 654rpx;
  122. padding: 22rpx 0 0 0;
  123. border-top: 2rpx solid rgba(151, 151, 151, 0.1);
  124. margin-top: 32rpx;
  125. .small {
  126. font-family: PingFangTC, PingFangTC;
  127. font-weight: 400;
  128. font-size: 24rpx;
  129. color: #444444;
  130. line-height: 34rpx;
  131. text-align: left;
  132. font-style: normal;
  133. }
  134. .mon {
  135. font-family: HarmonyOS_Sans_Medium;
  136. font-size: 28rpx;
  137. color: #f83224;
  138. line-height: 38rpx;
  139. text-align: left;
  140. font-style: normal;
  141. margin-left: 12rpx;
  142. font-weight: bold;
  143. }
  144. }
  145. .back {
  146. background: rgba(244, 244, 244, 1);
  147. padding: 22rpx 16rpx;
  148. box-sizing: border-box;
  149. margin-top: 10rpx;
  150. // margin-bottom: 20rpx;
  151. }
  152. .name {
  153. font-family: PingFangSC, PingFang SC;
  154. font-weight: 400;
  155. font-size: 28rpx;
  156. color: #333333;
  157. line-height: 40rpx;
  158. text-align: left;
  159. font-style: normal;
  160. }
  161. .money {
  162. font-family: HarmonyOS_Sans_Medium;
  163. font-size: 28rpx;
  164. color: #222222;
  165. line-height: 38rpx;
  166. text-align: left;
  167. font-style: normal;
  168. font-weight: 600;
  169. }
  170. }
  171. }
  172. </style>