|
@@ -4,22 +4,22 @@
|
|
|
<div class="order-detail-card-item" v-for="(item, index) in productInfoTotalItems" :key="index">
|
|
|
<div v-if="item.key === 'pure_amount'">
|
|
|
{{ item.label }}:{{ orderData[item.key] ? '¥' + formatNumber(orderData[item.key]) : '-' }}
|
|
|
- <span class="red-chong" v-if="isHaveRed">(红冲过)</span>
|
|
|
+ <span class="red-chong" v-if="setRedPunchDisplay('合同金额')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'final_price_total'">
|
|
|
{{ item.label }}:¥{{ orderData[item.key] || '-' }}
|
|
|
- <span class="red-chong" v-if="isHaveRed">(红冲过)</span>
|
|
|
+ <span class="red-chong" v-if="setRedPunchDisplay('合同金额')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'original_price_total'">
|
|
|
{{ item.label }}:<span :class="{'no_open_root': orderData[item.key] === '无法计算'}">{{ orderData[item.key] || '-' }}</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'commission'">
|
|
|
{{ item.label }}:¥{{ formatNumber(orderData[item.key]) || '0.00' }}
|
|
|
- <span class="red-chong" v-if="isHaveRed">(红冲过)</span>
|
|
|
+ <span class="red-chong" v-if="setRedPunchDisplay('销售费用')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'rate_total'">
|
|
|
{{ item.label }}:<span :class="{'red-chong': orderData[item.key] === '无法计算'}">{{ orderData[item.key] || '-' }}</span>
|
|
|
- <span class="red-chong" v-if="isHaveRed">(红冲过)</span>
|
|
|
+ <span class="red-chong" v-if="setRedPunchDisplay('折扣率')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'zero_type'">
|
|
|
<span v-if="shouldRenderItem(item)">
|
|
@@ -66,11 +66,6 @@ export default {
|
|
|
...mapState({
|
|
|
orderDetail: state => state.order.orderDetail,
|
|
|
}),
|
|
|
- isHaveRed () {
|
|
|
- if (!this.orderDetail?.productData) return false
|
|
|
- const redArr = this.orderDetail?.productData.map(item => !!item.isRed)
|
|
|
- return redArr.includes(true)
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
async init(val) {
|
|
@@ -118,6 +113,17 @@ export default {
|
|
|
this.productData = productData;
|
|
|
this.setTotalAmounts(this.productData);
|
|
|
},
|
|
|
+ // 设置红冲标识显示字段
|
|
|
+ setRedPunchDisplay(product) {
|
|
|
+ const { isUpCommission, isUpEnt, isUpCash } = this.orderDetail?.redPunchData || {};
|
|
|
+ const RETURN_BOOL = {
|
|
|
+ '合同金额': isUpCash,
|
|
|
+ '销售费用': isUpCommission,
|
|
|
+ '签约主体': isUpEnt,
|
|
|
+ '折扣率': isUpCash
|
|
|
+ }
|
|
|
+ return RETURN_BOOL[product] || false;
|
|
|
+ },
|
|
|
parseProductFilter(product) {
|
|
|
let parsedFilter = {};
|
|
|
if (typeof product.filter === 'string') {
|