|
@@ -70,25 +70,15 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<template #activity>
|
|
<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 class="activity-product-container product-module" v-if="product._a.show">
|
|
|
|
+ <div class="highlight-text">活动商品:{{ product._a.label }}</div>
|
|
|
|
+ <ContractMoneyTotalDesc
|
|
|
|
+ class="contract-info-container"
|
|
|
|
+ :hasContract="product._a.hasContract"
|
|
|
|
+ :contract="product._a.contract"
|
|
|
|
+ :standard="product._a.standard"
|
|
|
|
+ :rate="product._a.rate"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</ProductCard>
|
|
</ProductCard>
|
|
@@ -105,6 +95,8 @@ import { div, calcDiscountRate, roundToTwoDecimals } from '@/utils/number/';
|
|
import TableCard from '../../ui/TableCard.vue';
|
|
import TableCard from '../../ui/TableCard.vue';
|
|
import newDetailModel from '@/views/order/components/new-detailModel.vue';
|
|
import newDetailModel from '@/views/order/components/new-detailModel.vue';
|
|
import ServiceList from '../product-info-submodule/ServiceList.vue';
|
|
import ServiceList from '../product-info-submodule/ServiceList.vue';
|
|
|
|
+import { showActivityCardRateModule } from "@/views/create-order/hooks/utils"
|
|
|
|
+import ContractMoneyTotalDesc from '@/views/create-order/components/contractMoneyTotalDesc.vue'
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
export default {
|
|
export default {
|
|
name: 'OrderDetailCardProduct',
|
|
name: 'OrderDetailCardProduct',
|
|
@@ -112,7 +104,8 @@ export default {
|
|
ProductCard,
|
|
ProductCard,
|
|
TableCard,
|
|
TableCard,
|
|
newDetailModel,
|
|
newDetailModel,
|
|
- ServiceList
|
|
|
|
|
|
+ ServiceList,
|
|
|
|
+ ContractMoneyTotalDesc
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
// orderDetail: {
|
|
// orderDetail: {
|
|
@@ -134,7 +127,7 @@ export default {
|
|
{ label: '标准售价', key: 'original_price', span: 3},
|
|
{ label: '标准售价', key: 'original_price', span: 3},
|
|
{ label: '折扣率', key: 'rate', span: 3},
|
|
{ label: '折扣率', key: 'rate', span: 3},
|
|
{ label: '子账号数量', key: 'subAccountCount', span: 1, condition: () => this.parsedFilter.buyAccountCount && this.parsedFilter.giftAccountCount },
|
|
{ label: '子账号数量', key: 'subAccountCount', span: 1, condition: () => this.parsedFilter.buyAccountCount && this.parsedFilter.giftAccountCount },
|
|
- { label: '主账号数量', key: 'mainAccountCount', span: 1, condition: (product) => product.product_type === 'VIP订阅' },
|
|
|
|
|
|
+ { label: '主账号数量', key: 'mainAccountCount', span: 1 },
|
|
{ label: '关联订单', key: 'linkedOrder', span: 1},
|
|
{ label: '关联订单', key: 'linkedOrder', span: 1},
|
|
{ label: '开通权益手机号', key: 'phone', span: 3},
|
|
{ label: '开通权益手机号', key: 'phone', span: 3},
|
|
{ label: '服务开始时间', key: 'service_starttime', span: 3},
|
|
{ label: '服务开始时间', key: 'service_starttime', span: 3},
|
|
@@ -201,11 +194,12 @@ export default {
|
|
async init() {
|
|
async init() {
|
|
this.orderData = this.orderDetailInfo?.orderData || {};
|
|
this.orderData = this.orderDetailInfo?.orderData || {};
|
|
let productData = this.orderDetailInfo?.productData || [];
|
|
let productData = this.orderDetailInfo?.productData || [];
|
|
|
|
+ const { _productArr } = this.orderDetailInfo || {}
|
|
|
|
|
|
if (productData.length > 0) {
|
|
if (productData.length > 0) {
|
|
// 使用 Promise.all 来并行处理每个 product 的异步操作
|
|
// 使用 Promise.all 来并行处理每个 product 的异步操作
|
|
productData = await Promise.all(
|
|
productData = await Promise.all(
|
|
- productData.map(async (product) => {
|
|
|
|
|
|
+ productData.map(async (product, index) => {
|
|
try {
|
|
try {
|
|
const parsedFilter = this.parseProductFilter(product);
|
|
const parsedFilter = this.parseProductFilter(product);
|
|
const serviceIds = parsedFilter.serviceIds || [];
|
|
const serviceIds = parsedFilter.serviceIds || [];
|
|
@@ -226,7 +220,8 @@ export default {
|
|
const finalPrice = this.formatNumber(product.final_price);
|
|
const finalPrice = this.formatNumber(product.final_price);
|
|
let originalPrice = this.formatNumber(product.original_price);
|
|
let originalPrice = this.formatNumber(product.original_price);
|
|
this.parsedFilter = parsedFilter;
|
|
this.parsedFilter = parsedFilter;
|
|
- return {
|
|
|
|
|
|
+
|
|
|
|
+ const newProduct = {
|
|
...product,
|
|
...product,
|
|
filter: parsedFilter,
|
|
filter: parsedFilter,
|
|
rate,
|
|
rate,
|
|
@@ -236,8 +231,13 @@ export default {
|
|
linkedOrder,
|
|
linkedOrder,
|
|
bigServiceNames,
|
|
bigServiceNames,
|
|
final_price: finalPrice,
|
|
final_price: finalPrice,
|
|
- original_price: originalPrice
|
|
|
|
|
|
+ original_price: originalPrice,
|
|
|
|
+ ..._productArr[index] || {},
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+ newProduct._a = showActivityCardRateModule(_productArr, newProduct)
|
|
|
|
+
|
|
|
|
+ return newProduct
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('产品信息初始化失败:', error);
|
|
console.error('产品信息初始化失败:', error);
|
|
return product;
|
|
return product;
|
|
@@ -245,7 +245,7 @@ export default {
|
|
})
|
|
})
|
|
);
|
|
);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ console.log('productData', productData)
|
|
this.setTotalAmounts(productData);
|
|
this.setTotalAmounts(productData);
|
|
this.productData = productData;
|
|
this.productData = productData;
|
|
},
|
|
},
|
|
@@ -534,30 +534,24 @@ export default {
|
|
.no_open_root {
|
|
.no_open_root {
|
|
color: $red_light;
|
|
color: $red_light;
|
|
}
|
|
}
|
|
- .order-detail-product-activity {
|
|
|
|
|
|
+ .activity-product-container {
|
|
padding: 14px 20px;
|
|
padding: 14px 20px;
|
|
- border: 1px solid $color_main;
|
|
|
|
- background: rgba(42, 190, 209, 0.08);
|
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
- &-title {
|
|
|
|
- font-size: 14px;
|
|
|
|
- line-height: 22px;
|
|
|
|
- color: $color_main;
|
|
|
|
- }
|
|
|
|
- &-item {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
|
|
+ border: 1px solid $main;
|
|
|
|
+ background-color: rgba($main, 0.08);
|
|
|
|
+ .desc-detail-info-list {
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
}
|
|
- &-item-title {
|
|
|
|
- margin-right: 24px;
|
|
|
|
- &>span {
|
|
|
|
|
|
+ ::v-deep {
|
|
|
|
+ .desc-label {
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
line-height: 22px;
|
|
line-height: 22px;
|
|
color: #686868;
|
|
color: #686868;
|
|
}
|
|
}
|
|
- &>span:last-child {
|
|
|
|
- color: #1D1D1D;
|
|
|
|
|
|
+ .desc-value {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ color: #1D1D1D;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|