Parcourir la source

fix(create-order): 修复折扣率计算相关问题

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe il y a 3 mois
Parent
commit
4bf97ce9bb

+ 2 - 2
src/views/create-order/components/order-detail-submodule/OrderDetailCard.vue

@@ -23,7 +23,7 @@
             <span class="red-chong" v-if="setRedPunchDisplay('销售费用')">(红冲过)</span>
           </div>
           <div v-else-if="item.key === 'rate_total'">
-            {{ item.label }}:{{ orderData[item.key] || '-' }}
+            {{ item.label }}:<span :class="{'red-chong': orderData[item.key] === '无法计算'}">{{ orderData[item.key] || '-' }}</span>
             <span class="red-chong" v-if="setRedPunchDisplay('折扣率')">(红冲过)</span>
           </div>
           <div v-else-if="item.key === 'zero_type'">
@@ -385,7 +385,7 @@ export default {
 
       this.orderData.final_price_total = totalFinalPrice;
       this.orderData.original_price_total = '¥' + totalOriginalPrice;
-      this.orderData.rate_total = rateTotal;
+      this.orderData.rate_total = Number(totalOriginalPrice) ? rateTotal : '无法计算';
     },
 
     flattenLinkOrderList(linkOrderList) {