LaveyD 6 месяцев назад
Родитель
Сommit
1d80f79885

+ 2 - 2
src/pages/queryReport/OrderStatistic.vue

@@ -614,7 +614,7 @@ export default {
           const keyName = this.finalGroup[index].prop || this.finalGroup[index].value
 
           this.tableData.forEach((el, index) => {
-            if (el[keyName] === '-') {
+            if (el[keyName] === '小计') {
               this.index++
             }
 
@@ -640,7 +640,7 @@ export default {
     },
     totalRowClassName ({ row, rowIndex }) {
       for (let key in row) {
-        if (row[key] === '-') {
+        if (row[key] === '小计') {
           return 'table-total-row table-total-row2'
         }
         if (row[key] === '总计') {

+ 2 - 1
src/pages/queryReport/checkStatistic.vue

@@ -89,7 +89,8 @@
         stripe
         v-loading="loading"
         :data="tableData"
-        :row-class-name="totalRowClassName">
+        :row-class-name="totalRowClassName"
+        :span-method="objectSpanMethod">
         <el-table-column
           prop="otaSourceName"
           label="订单渠道">

+ 2 - 1
src/pages/queryReport/checkerStatistic.vue

@@ -128,7 +128,8 @@
         stripe
         v-loading="loading"
         :data="tableData"
-        :row-class-name="totalRowClassName">
+        :row-class-name="totalRowClassName"
+        :span-method="objectSpanMethod">
         <!-- <el-table-column
           v-for="(item,index) in finalGroup"
           :key="index"

+ 2 - 1
src/pages/queryReport/ghSplitRecordStatistic.vue

@@ -108,7 +108,8 @@
         stripe
         v-loading="loading"
         :data="tableData"
-        :row-class-name="totalRowClassName">
+        :row-class-name="totalRowClassName"
+        :span-method="objectSpanMethod">
         <!-- <el-table-column
           v-for="(item) in finalGroup"
           :key="item.value"

+ 1 - 1
src/pages/queryReport/handOverReport.vue

@@ -33,7 +33,7 @@
                 label="票种"
               >
                 <template slot-scope="scope">
-                  {{ scope.row.ticketTypeName === '-' ? '总计' : scope.row.ticketTypeName }}
+                  {{ scope.row.ticketTypeName === '小计' ? '总计' : scope.row.ticketTypeName }}
                 </template>
               </el-table-column>
               <el-table-column

+ 2 - 1
src/pages/queryReport/osSaleStatistic/CheckStat.vue

@@ -107,7 +107,8 @@
         stripe
         v-loading="loading"
         :data="tableData"
-        :row-class-name="totalRowClassName">
+        :row-class-name="totalRowClassName"
+        :span-method="objectSpanMethod">
         <el-table-column
           v-for="(item) in finalGroup"
           :key="item.value"

+ 2 - 1
src/pages/queryReport/osSaleStatistic/SaleStat.vue

@@ -108,7 +108,8 @@
         stripe
         v-loading="loading"
         :data="tableData"
-        :row-class-name="totalRowClassName">
+        :row-class-name="totalRowClassName"
+        :span-method="objectSpanMethod">
         <el-table-column
           v-for="(item) in finalGroup"
           :key="item.value"

+ 27 - 1
src/pages/queryReport/refundStatistic.vue

@@ -87,7 +87,8 @@
         stripe
         v-loading="loading"
         :data="tableData"
-        :row-class-name="totalRowClassName">
+        :row-class-name="totalRowClassName"
+        :span-method="objectSpanMethod">
         <el-table-column
           prop="otaSourceName"
           label="销售渠道">
@@ -158,6 +159,31 @@ export default {
   },
   methods: {
     totalRowClassName,
+    objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex < this.finalGroup.length) {
+        if (!(this.OrderIndexArr[columnIndex] && this.OrderIndexArr[columnIndex].length)) return
+
+        for (let i = 0; i < this.OrderIndexArr[columnIndex].length; i++) {
+          let element = this.OrderIndexArr[columnIndex][i]
+          for (let j = 0; j < element.length; j++) {
+            let item = element[j]
+            if (rowIndex === item) {
+              if (j === 0) {
+                return {
+                  rowspan: element.length,
+                  colspan: 1
+                }
+              } else if (j !== 0) {
+                return {
+                  rowspan: 0,
+                  colspan: 0
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     getSaleChannelList () {
       getSaleChannelList().then(res => {
         this.otaSourceList = res.data