浏览代码

订单详情的审核信息表头展示

ylong 7 月之前
父节点
当前提交
514cd0da13

+ 37 - 6
src/views/marketing/ipMrakup/datalist/index.vue

@@ -12,6 +12,14 @@
                 :columns="columns"
                 :bodyStyle="{ padding: 0 }"
             >
+                <template #orderId="{ row }">
+                    <el-button
+                        type="primary"
+                        link
+                        @click="handleOrderId(row)"
+                        >{{ row.orderId }}</el-button
+                    >
+                </template>
                 <!-- 操作列 -->
                 <template #action="{ row }">
                     <div class="action-buttons">
@@ -29,20 +37,21 @@
         </ele-card>
         <!-- 分享信息弹窗 -->
         <share-info ref="shareRef" />
+        <!-- 订单详情弹窗 -->
+        <order-detail ref="orderDetailRef" />
     </ele-page>
 </template>
 
 <script setup>
     import { ref, reactive } from 'vue';
-    import { ElMessage } from 'element-plus';
     import CommonTable from '@/components/CommonPage/CommonTable.vue';
     import PageSearch from './components/page-search.vue';
     import ShareInfo from './components/share-info.vue';
+    import OrderDetail from '@/views/recycleOrder/components/order-detail.vue';
 
     // 表格实例
     const tableRef = ref(null);
     const searchRef = ref(null);
-    const detailRef = ref(null);
     const shareRef = ref(null);
 
     // 页面配置
@@ -57,14 +66,31 @@
     // 表格列配置
     const columns = ref([
         { label: '用户UID', prop: 'userId' },
-        { label: '订单编号', prop: 'orderId' },
+        {
+            label: '订单编号',
+            prop: 'orderId',
+            align: 'center',
+            slot: 'orderId'
+        },
         { label: '参与时间', prop: 'orderTime', width: 160 },
-        { label: '省份', prop: 'provinceName', formatter: (row) => row.provinceName || '--' },
-        { label: '地区', prop: 'cityName', formatter: (row) => row.cityName || '--' },
+        {
+            label: '省份',
+            prop: 'provinceName',
+            formatter: (row) => row.provinceName || '--'
+        },
+        {
+            label: '地区',
+            prop: 'cityName',
+            formatter: (row) => row.cityName || '--'
+        },
         { label: '订单总本数', prop: 'totalNum' },
         { label: '加价本数', prop: 'upsellNum' },
         { label: '订单总金额', prop: 'expectMoney' },
-        { label: '实际加价金额', prop: 'upsellFinalMoney', formatter: (row) => row.upsellFinalMoney || '--' },
+        {
+            label: '实际加价金额',
+            prop: 'upsellFinalMoney',
+            formatter: (row) => row.upsellFinalMoney || '--'
+        },
         {
             columnKey: 'action',
             label: '操作',
@@ -81,6 +107,11 @@
         tableRef.value?.reload(data);
     };
 
+    const orderDetailRef = ref(null);
+    const handleOrderId = (row) => {
+        orderDetailRef.value?.handleOpen(row);
+    };
+
     // 导出Excel
     const handleExportExcel = () => {
         tableRef.value?.exportData();

+ 0 - 1
src/views/marketing/ipMrakup/rules/index.vue

@@ -66,7 +66,6 @@
           <el-select
             v-model="form.upsellValidScenario"
             multiple
-            collapse-tags
             style="width: 500px"
             placeholder="请选择加价结算场景"
           >

+ 28 - 2
src/views/recycleOrder/detail/order-book-list.vue

@@ -200,7 +200,7 @@
 </template>
 
 <script setup>
-    import { ref, reactive, watch, nextTick, onMounted } from 'vue';
+    import { ref, reactive, watch, nextTick, onMounted, computed } from 'vue';
     import orderModifyDiscount from '@/views/recycle/components/modify-discount.vue';
     import orderBlacklist from '@/views/recycleOrder/detail/order-blacklist.vue';
     import orderRecycleLog from '@/views/recycleOrder/detail/order-recycle-log.vue';
@@ -471,8 +471,13 @@
             label: '审核信息',
             prop: 'auditInfo',
             slot: 'auditInfo',
+            columnKey: 'auditInfo',
             align: 'center',
-            minWidth: 317
+            minWidth: 317,
+            renderHeader: (row) => {
+                let data = auditStats()
+                return `审核信息(总数:${data.total},加价数量${data.upsell},良好:${data.good},一般:${data.normal},极差:${data.bad})`;
+            }
         },
         {
             label: '审核金额',
@@ -594,6 +599,27 @@
         initData();
     };
 
+    const auditStats = function () {
+        const total = dataList.value.length;
+        let upsell = 0,
+            good = 0,
+            normal = 0,
+            bad = 0;
+        dataList.value.forEach((item) => {
+            if (item.isupSell) upsell++;
+            if (item.sts == 1) good++;
+            if (item.sts == 2) normal++;
+            if (item.sts == 3) bad++;
+        });
+        return {
+            total,
+            upsell,
+            good,
+            normal,
+            bad
+        };
+    };
+
     defineExpose({
         handleOtherAuditGood,
         refreshData