Kaynağa Gözat

fix(create-order): 修复大会员升级内容显示错误

- 将 'supServicelds' 错别字修正为 'supServiceIds'
- 优化 '升级内容' 字段的显示逻辑
- 修改 bigServiceNames 的生成过程,使用原始的 supServiceIds
- 在 productInfoItems 中添加 supServiceIds 字段

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 1 ay önce
ebeveyn
işleme
3acf7b2362

+ 6 - 4
src/views/create-order/components/order-detail-submodule/SelectOrderDetailCard.vue

@@ -83,7 +83,7 @@
                     <div v-else-if="item.key === 'validity_period'">
                       <span v-html="getValidityPeriodHtml(product, item)"></span>
                     </div>
-                    <div v-else-if="item.key === 'supServicelds'">
+                    <div v-else-if="item.key === 'supServiceIds'">
                       {{ item.label }}:{{ getFilteredValue(product[item.key], item.filter) || '-' }}
                     </div>
                     <div v-else-if="item.key === 'service_starttime'">
@@ -225,7 +225,7 @@ export default {
       productInfoItems: [
         { label: '活动产品', key: 'activityName', span: 1, condition: (product) => product.activityName },
         { 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: '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 !== '-'},
@@ -409,9 +409,10 @@ export default {
               try {
                 const parsedFilter = this.parseProductFilter(product);
                   const serviceIds = parsedFilter.serviceIds || [];
-              const supServiceIds = parsedFilter.supServiceIds || [];
+              const supServiceIdsOrigin = parsedFilter.supServiceIds || [];
+              const supServiceIds = this.buildSupServiceIds(parsedFilter || []);
                   // 等待异步方法完成
-              const bigServiceNames = product.product_type === '大会员' ? await this.buildBigServiceNames(serviceIds, supServiceIds) : '';
+              const bigServiceNames = product.product_type === '大会员' ? await this.buildBigServiceNames(serviceIds, supServiceIdsOrigin) : '';
                 const rate = this.calculateDiscountRate(product);
                 const validityPeriod = this.calculateValidityPeriod(
                 parsedFilter,
@@ -475,6 +476,7 @@ export default {
                   subAccountCount,
                   mainAccountCount,
                   linkedOrder,
+                  supServiceIds,
                     bigServiceNames,
                   final_price: finalPrice,
                 sale_final_price: finalPrice,