shish 8 ore fa
parent
commit
eea3de8693

+ 13 - 3
hdApp/src/pagesPurchase/orderItem.vue

@@ -43,11 +43,11 @@
         </view>
       </view>
       <view class="item-price">
-        
-            <view v-if="info.orderPrice == info.actPrice">¥{{ info.orderPrice ? parseFloat(info.orderPrice):0 }}</view>
+            <!-- 列表展示价 = actPrice - 封账退款(nextDayTkPrice),对齐 ghs 订单列表 -->
+            <view v-if="Number(info.orderPrice) == displayActPrice">¥{{ displayActPrice }}</view>
             <view v-else>
               <text style="text-decoration: line-through;color:#847676;">¥{{ info.orderPrice ? parseFloat(info.orderPrice):0 }}</text>
-              <text style="margin-left:10upx;">¥{{ info.actPrice ? parseFloat(info.actPrice):0 }}</text>
+              <text style="margin-left:10upx;">¥{{ displayActPrice }}</text>
             </view>
 
         <text class="iconfont iconxiangyou"></text>
@@ -80,6 +80,16 @@ export default {
     };
   },
   computed: {
+    /**
+     * 列表展示价:actPrice - 封账退款(nextDayTkPrice)
+     * 封账退款不改 actPrice,扣减后与详情最终金额一致
+     */
+    displayActPrice() {
+      const act = Number(this.info.actPrice) || 0
+      const next = Number(this.info.nextDayTkPrice) || 0
+      const pay = act - next
+      return parseFloat((pay > 0 ? pay : 0).toFixed(2))
+    },
     getStatusName () {
       let statusName = "";
 

+ 18 - 0
hdApp/src/pagesPurchase/purDetails.vue

@@ -264,6 +264,15 @@
             <div class="tui-title">实际金额</div>
             <div class="detail-price_box" style="font-size: 28upx;">¥{{ detailInfo.realPrice ? parseFloat(detailInfo.realPrice) : 0}}</div>
           </tui-list-cell>
+          <!-- 封账后退款不改 realPrice;最终金额 = 实际金额 - 封账后退款 -->
+          <tui-list-cell v-if="Number(detailInfo.nextDayTkPrice) > 0" class="line-cell" :hover="false">
+            <div class="tui-title">封账后退款</div>
+            <div class="detail-price_box" style="font-size: 28upx;">-¥{{ parseFloat(detailInfo.nextDayTkPrice) }}</div>
+          </tui-list-cell>
+          <tui-list-cell v-if="Number(detailInfo.nextDayTkPrice) > 0" class="line-cell" :hover="false">
+            <div class="tui-title">最终金额</div>
+            <div class="detail-price_box" style="font-size: 28upx;">¥{{ finalPriceAfterSealRefund }}</div>
+          </tui-list-cell>
         </div>
       </view>
 
@@ -411,6 +420,15 @@ export default {
       const day = Number(this.detailInfo.tkPrice) || 0
       const next = Number(this.detailInfo.nextDayTkPrice) || 0
       return parseFloat((day + next).toFixed(2))
+    },
+    /**
+     * 最终金额:实际金额 realPrice - 封账后退款 nextDayTkPrice
+     */
+    finalPriceAfterSealRefund() {
+      const real = Number(this.detailInfo.realPrice) || 0
+      const seal = Number(this.detailInfo.nextDayTkPrice) || 0
+      const final = real - seal
+      return parseFloat((final > 0 ? final : 0).toFixed(2))
     }
   },
 	watch: {