Prechádzať zdrojové kódy

refactor(order): 优化订单详情页面活动产品名称显示

- 将活动产品名称从 activity_code 改为 activityName
- 优化回款计划显示逻辑,增加 payLength 计算属性
- 更新活动产品名称在订单详情卡片中的显示方式

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 2 mesiacov pred
rodič
commit
408d01c368

+ 1 - 1
src/views/create-order/components/order-detail-submodule/OrderDetailCardProductList.vue

@@ -117,7 +117,7 @@ export default {
     return {
       orderDetailInfo: {},
       productInfoItems: [
-        { label: '活动产品', key: 'activity_code', span: 1, condition: (product) => product.activity_code },
+        { 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: 'productName', span: 3},

+ 5 - 2
src/views/create-order/components/order-detail-submodule/PaymentPlan.vue

@@ -4,7 +4,7 @@
       <template #title>
         <span>回款计划</span>
         <span style="font-size: 14px;line-height: 22px;">
-          (共<span class="num-active"> {{ paymentPlanList.length }} </span>条
+          (共<span class="num-active"> {{ payLength }} </span>条
           <span>预计回款</span>
           <span class="num-active"> ¥{{ formatNumber(returnMoneyPlant?.plantMoney || 0) }} </span>
           <span> 实际回款</span>
@@ -36,7 +36,10 @@ export default {
   computed: {
     ...mapState({
       orderDetail: state => state.order.orderDetail
-    })
+    }),
+    payLength () {
+      return this.paymentPlanList.length > 0 ? this.paymentPlanList.length - 1 : 0
+    }
   },
   watch: {
     orderDetail: {

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

@@ -103,10 +103,10 @@
               </div>
             </div>
              <template #activity>
-            <div v-if="product.activity_code" class="order-detail-product-activity">
+            <div v-if="product.activityName" class="order-detail-product-activity">
               <div class="order-detail-product-activity-title">
                 <span>活动商品:</span>
-                <span>{{ product.activity_code || '买2年大会员送:1年大会员+人脉管理+阳光直采+1000条数据流量包高级字段包+腾讯视频年卡' }}</span>
+                <span>{{ product.activityName || '买2年大会员送:1年大会员+人脉管理+阳光直采+1000条数据流量包高级字段包+腾讯视频年卡' }}</span>
               </div>
               <div class="order-detail-product-activity-item">
                 <div class="order-detail-product-activity-item-title">
@@ -231,7 +231,7 @@ export default {
         { label: '0元订单类型', key: 'zero_type', condition: () => this.orderData.final_price_total === '0.00' },
       ],
       productInfoItems: [
-        { label: '活动产品', key: 'activity_code', span: 1, condition: (product) => product.activity_code },
+        { 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: 'productName', span: 3},