chenlei 1 gadu atpakaļ
vecāks
revīzija
83329a8c9e
2 mainītis faili ar 31 papildinājumiem un 1 dzēšanām
  1. 21 1
      src/pages/order/prePay.vue
  2. 10 0
      src/types/schemas/strategy.d.ts

+ 21 - 1
src/pages/order/prePay.vue

@@ -1,7 +1,7 @@
 <template>
   <ay-container :cusStyle="{ 'padding-bottom': '200rpx' }">
     <ay-skeletons :rowList="data.rowList" :loading="data.firstUnload">
-      <ayb-station type="2" :stationInfo="data.stationInfo" />
+      <ayb-station type="2" :stationInfo="computedStationInfo" />
       <div class="chunk1">
         <div>
           <span class="mr-spacd4">加气量</span>
@@ -154,6 +154,26 @@ const curPay = computed<待支付订单_可选支付方式物流支付实体类>
   }
   return rv
 })
+const computedStationInfo = computed(() => {
+  const stationVo = {
+    platformPrice: 0,
+    tags: [],
+  }
+  // 这个对象肯定有值,站价格相关信息显示创建订单时的快照信息
+  if (data.paysel.stationVo) {
+    stationVo.platformPrice = data.paysel.stationVo.platformPrice
+    if (data.paysel.stationVo.reduceRebateStr) {
+      stationVo.tags.push(data.paysel.stationVo.reduceRebateStr)
+    }
+    if (data.paysel.stationVo.specialRebateStr) {
+      stationVo.tags.push(data.paysel.stationVo.specialRebateStr)
+    }
+  }
+  return {
+    ...data.stationInfo,
+    ...stationVo,
+  }
+})
 
 const methods = {
   switchRebateDetail(type = 0) {

+ 10 - 0
src/types/schemas/strategy.d.ts

@@ -4581,11 +4581,21 @@ interface 待支付订单_可选支付方式物流支付实体类 {
   /** 所属物流支付微信支付金额 */
   wxAmount?: number
 }
+interface 待支付订单_可选支付方式站价格和优惠的快照信息 {
+  /** 平台挂牌价 */
+  platformPrice?: number
+  /** 满减优惠明细文字提示 */
+  reduceRebateStr?: string
+  /** 特价优惠明细文字提示 */
+  specialRebateStr?: string
+}
 interface 待支付订单_可选支付方式获取实体类 {
   /** 物流支付 */
   carrierPay?: 待支付订单_可选支付方式物流支付实体类
   /** 个人支付 */
   personPay?: 待支付订单_可选支付方式个人支付实体类
+  /** 站价格和优惠快照信息 */
+  stationVo?: 待支付订单_可选支付方式站价格和优惠的快照信息
 }
 interface 成丰三方对接对象 {
   /** 组织名称 */