|
@@ -15,12 +15,12 @@
|
|
|
<span class="red-chong" v-if="setRedPunchDisplay('合同金额')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'final_price_total'">
|
|
|
- {{ item.label }}:{{ orderData[item.key] || '-' }}
|
|
|
+ {{ item.label }}:¥{{ orderData[item.key] || '-' }}
|
|
|
<span class="red-chong" v-if="setRedPunchDisplay('合同金额')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'commission'">
|
|
|
{{ item.label }}:¥{{ formatNumber(orderData[item.key]) || '0.00' }}
|
|
|
- <span class="red-chong" v-if="setRedPunchDisplay('渠道佣金')">(红冲过)</span>
|
|
|
+ <span class="red-chong" v-if="setRedPunchDisplay('销售费用')">(红冲过)</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'rate_total'">
|
|
|
{{ item.label }}:{{ orderData[item.key] || '-' }}
|
|
@@ -41,12 +41,16 @@
|
|
|
:title="setProductTitle(product, index)"
|
|
|
:subtitle="product.auto !== 1 ? '该产品暂不支持系统自动开通权限,请联系运维开通': ''"
|
|
|
>
|
|
|
+ <template #actions>
|
|
|
+ <button @click="openPermissionActivation(product)" class="order-detail-product-actions-btn" v-if="isShowPermission(product)">权限开通</button>
|
|
|
+ </template>
|
|
|
<div class="order-detail-product-content">
|
|
|
<div class="grouped-items">
|
|
|
<div
|
|
|
v-for="(item, index) in productInfoItems"
|
|
|
:key="index"
|
|
|
- :class="`item-span-${item.span}`">
|
|
|
+ :class="`item-span-${item.span}`"
|
|
|
+ >
|
|
|
<div
|
|
|
class="order-detail-card-item"
|
|
|
v-if="shouldRenderItem(item, product)"
|
|
@@ -94,6 +98,28 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <template #activity>
|
|
|
+ <div v-if="product.activity_code" class="order-detail-product-activity">
|
|
|
+ <div class="order-detail-product-activity-title">
|
|
|
+ <span>活动商品:</span>
|
|
|
+ <span>{{ product.activity_code || '买2年大会员送:1年大会员+人脉管理+阳光直采+1000条数据流量包高级字段包+腾讯视频年卡' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="order-detail-product-activity-item">
|
|
|
+ <div class="order-detail-product-activity-item-title">
|
|
|
+ <span>合同金额合计:</span>
|
|
|
+ <span>¥{{ product.final_price }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="order-detail-product-activity-item-title">
|
|
|
+ <span>标准售价合计:</span>
|
|
|
+ <span>¥{{ product.original_price }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="order-detail-product-activity-item-title">
|
|
|
+ <span>折扣率:</span>
|
|
|
+ <span>{{ product.rate }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</ProductCard>
|
|
|
</div>
|
|
|
</InfoCard>
|
|
@@ -104,6 +130,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</InfoCard>
|
|
|
+ <newDetailModel ref="newDetailModel" :data="orderDetail"></newDetailModel>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -113,12 +140,14 @@ import ProductCard from '../../ui/ProductCard.vue';
|
|
|
import { paymentTypeOptions } from '../../data/options.js';
|
|
|
import { div, calcDiscountRate, roundToTwoDecimals } from '@/utils/number/';
|
|
|
import TableCard from '../../ui/TableCard.vue';
|
|
|
+import newDetailModel from '@/views/order/components/new-detailModel.vue';
|
|
|
export default {
|
|
|
name: 'OrderDetailCard',
|
|
|
components: {
|
|
|
InfoCard,
|
|
|
ProductCard,
|
|
|
- TableCard
|
|
|
+ TableCard,
|
|
|
+ newDetailModel
|
|
|
},
|
|
|
props: {
|
|
|
orderDetail: {
|
|
@@ -147,7 +176,7 @@ export default {
|
|
|
{ label: '合同金额合计', key: 'final_price_total' },
|
|
|
{ label: '标准售价合计', key: 'original_price_total'},
|
|
|
{ label: '折扣率', key: 'rate_total' },
|
|
|
- { label: '渠道佣金', key: 'commission'},
|
|
|
+ { label: '销售费用', key: 'commission'},
|
|
|
{ label: '净合同金额合计', key: 'pure_amount'},
|
|
|
{ label: '0元订单类型', key: 'zero_type', condition: () => this.orderData.final_price_total === '0.00' },
|
|
|
],
|
|
@@ -272,12 +301,22 @@ export default {
|
|
|
this.setTotalAmounts(productData);
|
|
|
this.productData = productData;
|
|
|
},
|
|
|
+ // 权限开通
|
|
|
+ openPermissionActivation() {
|
|
|
+ this.$refs.newDetailModel.permissionActivationShow = true;
|
|
|
+ },
|
|
|
+ isShowPermission (product) {
|
|
|
+ const { auto, attribute } = product
|
|
|
+ const { return_status } = this.orderData?.return_status
|
|
|
+ // 仅当该产品类型支持系统自动开通权限,且产品属性为会员服务或资源包,且“回款状态”为“全额回款”才展示,否则不展示;
|
|
|
+ return auto === 1 && (attribute === 1 || attribute === 2) && return_status === 1
|
|
|
+ },
|
|
|
// 设置红冲标识显示字段
|
|
|
setRedPunchDisplay(product) {
|
|
|
const { isUpCommission, isUpEnt, isUpCash } = this.orderDetailInfo?.redPunchData || {};
|
|
|
const RETURN_BOOL = {
|
|
|
'合同金额': isUpCash,
|
|
|
- '渠道佣金': isUpCommission,
|
|
|
+ '销售费用': isUpCommission,
|
|
|
'签约主体': isUpEnt,
|
|
|
'折扣率': isUpCash
|
|
|
}
|
|
@@ -344,7 +383,7 @@ export default {
|
|
|
console.log(totalOriginalPrice, 'totalOriginalPrice')
|
|
|
const rateTotal = div(totalFinalPrice, totalOriginalPrice) ? (div(totalFinalPrice, totalOriginalPrice) * 100).toFixed(2) + '%' : '无法计算';
|
|
|
|
|
|
- this.orderData.final_price_total = '¥' + totalFinalPrice;
|
|
|
+ this.orderData.final_price_total = totalFinalPrice;
|
|
|
this.orderData.original_price_total = '¥' + totalOriginalPrice;
|
|
|
this.orderData.rate_total = rateTotal;
|
|
|
},
|
|
@@ -516,6 +555,16 @@ export default {
|
|
|
align-items: center;
|
|
|
margin-bottom: 6px;
|
|
|
}
|
|
|
+ .order-detail-product-actions-btn {
|
|
|
+ padding: 4px 17px;
|
|
|
+ background: $color_main;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: $white;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: none;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
.grouped-items {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
@@ -558,5 +607,32 @@ export default {
|
|
|
color: #2ABED1;
|
|
|
}
|
|
|
}
|
|
|
+ .order-detail-product-activity {
|
|
|
+ padding: 14px 20px;
|
|
|
+ border: 1px solid $color_main;
|
|
|
+ background: rgba(42, 190, 209, 0.08);
|
|
|
+ border-radius: 8px;
|
|
|
+ &-title {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: $color_main;
|
|
|
+ }
|
|
|
+ &-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ &-item-title {
|
|
|
+ margin-right: 24px;
|
|
|
+ &>span {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #686868;
|
|
|
+ }
|
|
|
+ &>span:last-child {
|
|
|
+ color: #1D1D1D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|