Bläddra i källkod

feat: 跳转详情页传入ordercode

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 3 månader sedan
förälder
incheckning
6f3c64cb44

+ 6 - 5
src/views/create-order/components/order-detail-submodule/OrderDetailCard.vue

@@ -34,7 +34,7 @@
                     {{ item.label }}:
                     <TableCard :table-data="product[item.key]" :columns="linkOrderColumns"></TableCard>
                   </div>
-                  <div v-if="item.key === 'final_price' || item.key === 'original_price'">
+                  <div v-else-if="item.key === 'final_price' || item.key === 'original_price'">
                     {{ item.label }}:¥{{ getFilteredValue(product[item.key], item.filter) || '-' }}
                   </div>
                   <div v-else-if="item.key === 'validity_period'">
@@ -100,9 +100,9 @@ export default {
         { label: '合同金额合计', key: 'final_price_total' },
         { label: '标准售价合计', key: 'original_price_total'},
         { label: '折扣率', key: 'rate_total' },
-        { label: '渠道佣金', key: 'product_type'},
-        { label: '净合同金额合计', key: 'product_type'},
-        { label: '0元订单类型', key: 'product_type'}
+        { label: '渠道佣金', key: 'commission'},
+        { label: '净合同金额合计', key: 'pure_amount'},
+        { label: '0元订单类型', key: 'zero_type'}
       ],
       productInfoItems: [
         { label: '活动产品', key: 'activity_code', span: 1 },
@@ -114,7 +114,7 @@ export default {
         { label: '合同金额', key: 'final_price', span: 3},
         { label: '标准售价', key: 'original_price', span: 3},
         { label: '折扣率', key: 'rate', span: 3},
-        { label: '子账号数量', key: 'subAccountCount', span: 1, condition: (product) => product.product_type === 'VIP订阅' },
+        { label: '子账号数量', key: 'subAccountCount', span: 1, condition: (product) => product.product_type === 'VIP订阅' && product.buyAccountCount && product.giftAccountCount },
         { label: '主账号数量', key: 'mainAccountCount', span: 1, condition: (product) => product.product_type === 'VIP订阅' },
         { label: '关联订单', key: 'linkedOrder', span: 1},
         { label: '开通权益手机号', key: 'phone', span: 3},
@@ -203,6 +203,7 @@ export default {
       const totalOriginalPrice = (this.productData.reduce((acc, cur) => acc + Number(cur.original_price), 0)).toFixed(2)
       this.orderData.final_price_total = '¥' + totalFinalPrice
       this.orderData.original_price_total = '¥' + totalOriginalPrice
+      // 计算折扣率总和
       this.orderData.rate_total = (div(totalFinalPrice, totalOriginalPrice) * 100).toFixed(2) + '%'
       this.productData = this.orderDetail?.productData || []
     },

+ 1 - 1
src/views/create-order/order-list.vue

@@ -996,7 +996,7 @@ export default {
     rowClick(row) {
       const sources = JSON.parse(row.filter).source ? JSON.parse(row.filter).source : ''
       const news = this.$router.resolve({
-        path: '/manage_admin/order/detail/' + row.id,
+        path: '/manage_admin/order/detail/' + row.order_code,
         query: {id: row.id, proType: row.product_type, type: sources,otherType:row.orderProducttype}
       })
       window.open(news.href, '_blank')