|
@@ -50,7 +50,7 @@
|
|
<div v-else-if="item.key === 'validity_period'">
|
|
<div v-else-if="item.key === 'validity_period'">
|
|
<span v-html="getValidityPeriodHtml(product, item)"></span>
|
|
<span v-html="getValidityPeriodHtml(product, item)"></span>
|
|
</div>
|
|
</div>
|
|
- <div v-else-if="item.key === 'supServicelds'">
|
|
|
|
|
|
+ <div v-else-if="item.key === 'supServiceIds'">
|
|
{{ item.label }}:{{ getFilteredValue(product[item.key], item.filter) || '-' }}
|
|
{{ item.label }}:{{ getFilteredValue(product[item.key], item.filter) || '-' }}
|
|
</div>
|
|
</div>
|
|
<div v-else-if="item.key === 'service_starttime'">
|
|
<div v-else-if="item.key === 'service_starttime'">
|
|
@@ -125,7 +125,7 @@ export default {
|
|
productInfoItems: [
|
|
productInfoItems: [
|
|
{ label: '活动产品', key: 'activityName', span: 1, condition: (product) => product.activityName },
|
|
{ label: '活动产品', key: 'activityName', span: 1, condition: (product) => product.activityName },
|
|
{ label: '付费类型', key: 'service_type', filter: 'orderServiceType', span: 3},
|
|
{ label: '付费类型', key: 'service_type', filter: 'orderServiceType', span: 3},
|
|
- { label: '升级内容', key: 'supServicelds', span: 3, condition: (product) => product.supServicelds },
|
|
|
|
|
|
+ { label: '升级内容', key: 'supServiceIds', span: 3, condition: (product) => product.supServiceIds },
|
|
{ label: '产品规格', key: 'productName', span: 3},
|
|
{ label: '产品规格', key: 'productName', span: 3},
|
|
{ label: '服务列表', key: 'bigServiceNames', span: 1, condition: (product) => product.productName && product.productName.includes('自定义') && product.product_code === 'dyh001'},
|
|
{ label: '服务列表', key: 'bigServiceNames', span: 1, condition: (product) => product.productName && product.productName.includes('自定义') && product.product_code === 'dyh001'},
|
|
{ label: '数据条数', key: 'data_count', span: 1, condition: (product) => product.data_count && product.data_count !== '-'},
|
|
{ label: '数据条数', key: 'data_count', span: 1, condition: (product) => product.data_count && product.data_count !== '-'},
|
|
@@ -234,9 +234,10 @@ export default {
|
|
try {
|
|
try {
|
|
const parsedFilter = this.parseProductFilter(product);
|
|
const parsedFilter = this.parseProductFilter(product);
|
|
const serviceIds = parsedFilter.serviceIds || [];
|
|
const serviceIds = parsedFilter.serviceIds || [];
|
|
- const supServiceIds = parsedFilter.supServiceIds || [];
|
|
|
|
|
|
+ const supServiceIdsOrigin = parsedFilter.supServiceIds || [];
|
|
// 等待异步方法完成
|
|
// 等待异步方法完成
|
|
- const bigServiceNames = product.product_type === '大会员' ? await this.buildBigServiceNames(serviceIds, supServiceIds) : '';
|
|
|
|
|
|
+ const supServiceIds = await this.buildSupServiceIds(parsedFilter.supServiceIds || []);
|
|
|
|
+ const bigServiceNames = product.product_type === '大会员' ? await this.buildBigServiceNames(serviceIds, supServiceIdsOrigin) : '';
|
|
const rate = this.calculateDiscountRate(product);
|
|
const rate = this.calculateDiscountRate(product);
|
|
const validityPeriod = this.calculateValidityPeriod(
|
|
const validityPeriod = this.calculateValidityPeriod(
|
|
parsedFilter,
|
|
parsedFilter,
|
|
@@ -300,6 +301,7 @@ export default {
|
|
subAccountCount,
|
|
subAccountCount,
|
|
mainAccountCount,
|
|
mainAccountCount,
|
|
linkedOrder,
|
|
linkedOrder,
|
|
|
|
+ supServiceIds,
|
|
bigServiceNames,
|
|
bigServiceNames,
|
|
final_price: finalPrice,
|
|
final_price: finalPrice,
|
|
sale_final_price: finalPrice,
|
|
sale_final_price: finalPrice,
|
|
@@ -340,6 +342,33 @@ export default {
|
|
divided(a, b) {
|
|
divided(a, b) {
|
|
return div(a, b)
|
|
return div(a, b)
|
|
},
|
|
},
|
|
|
|
+ buildSupServiceIds(supServiceIds) {
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
+ if (!supServiceIds || supServiceIds.length === 0) {
|
|
|
|
+ resolve('');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 避免修改原始数组,创建新的整型数组
|
|
|
|
+ const numericServiceIds = supServiceIds.map(id => parseInt(id));
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ try {
|
|
|
|
+
|
|
|
|
+ const serviceListRef = this.$refs.serviceListRef;
|
|
|
|
+ if (!serviceListRef || typeof serviceListRef.calcAlreadyBuyServiceNamesArr !== 'function') {
|
|
|
|
+ resolve('');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const baseServiceIdsArr = serviceListRef.calcAlreadyBuyServiceNamesArr(numericServiceIds);
|
|
|
|
+ const serviceData = Array.isArray(baseServiceIdsArr) ? baseServiceIdsArr.join('、') : '';
|
|
|
|
+ resolve(serviceData);
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.error('Error calculating service names:', error);
|
|
|
|
+ resolve('');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
buildBigServiceNames(serviceIds, supServiceIds) {
|
|
buildBigServiceNames(serviceIds, supServiceIds) {
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
if (!serviceIds || serviceIds.length === 0) {
|
|
if (!serviceIds || serviceIds.length === 0) {
|