lxf 3 mēneši atpakaļ
vecāks
revīzija
60d63149f1
1 mainītis faili ar 82 papildinājumiem un 82 dzēšanām
  1. 82 82
      src/views/salesMange/salesMange/performance/index.vue

+ 82 - 82
src/views/salesMange/salesMange/performance/index.vue

@@ -58,7 +58,7 @@
         </div>
       </div>
 
-      <el-table v-loading="loading" :data="sourceList.data" :summary-method="getSummaries" show-summary max-height="calc(100vh - 300px)">
+      <el-table v-loading="loading" :data="sourceList.data" max-height="calc(100vh - 300px)">
         <el-table-column label="合同编号">
           <el-table-column label="" prop="contractCode" width="160">
             <template #default="{ row }">
@@ -742,87 +742,87 @@ const openDetails = (row) => {
   currentContractId.value = row.contractId;
   openDetailsDialog.value = true;
 };
-const getSummaries = (param) => {
-  let obj = {
-    3: {
-      label: "contractAmount",
-      num: 2,
-    },
-    4: {
-      label: "contractArrival",
-      num: 2,
-    },
-    5: {
-      label: "taxReturnAmount",
-      num: 2,
-    },
-    6: {
-      label: "otherIncome",
-      num: 2,
-    },
-    7: {
-      label: "purchaseAmount",
-      num: 2,
-    },
-    8: {
-      label: "payForGoods",
-      num: 2,
-    },
-    9: {
-      label: "otherExpenses",
-      num: 2,
-    },
-    10: {
-      label: "totalIncome",
-      num: 2,
-    },
-    11: {
-      label: "totalExpenses",
-      num: 2,
-    },
-    12: {
-      label: "grossGrofit",
-      num: 2,
-    },
-    13: {
-      label: "afterSalesAmount",
-      num: 2,
-    },
-    14: {
-      label: "publicAmount",
-      num: 2,
-    },
-    15: {
-      label: "haveOverallAmount",
-      num: 2,
-    },
-    16: {
-      label: "departmentalCommission",
-      num: 2,
-    },
-    17: {
-      label: "personalCommission",
-      num: 2,
-    },
-  };
-  const { columns, data } = param;
-  const sums = [];
-  columns.forEach((column, index) => {
-    if (index === 0) {
-      sums[index] = "合计:";
-    } else {
-      if (obj[index] && obj[index].label) {
-        let list = sourceList.value.data.map((item) => item[obj[index].label]);
-        if (list && list.length > 0) {
-          sums[index] = list.reduce((accumulator, currentValue) => accumulator + currentValue, 0).toFixed(obj[index].num);
-        } else {
-          sums[index] = 0;
-        }
-      }
-    }
-  });
-  return sums;
-};
+// const getSummaries = (param) => {
+//   let obj = {
+//     3: {
+//       label: "contractAmount",
+//       num: 2,
+//     },
+//     4: {
+//       label: "contractArrival",
+//       num: 2,
+//     },
+//     5: {
+//       label: "taxReturnAmount",
+//       num: 2,
+//     },
+//     6: {
+//       label: "otherIncome",
+//       num: 2,
+//     },
+//     7: {
+//       label: "purchaseAmount",
+//       num: 2,
+//     },
+//     8: {
+//       label: "payForGoods",
+//       num: 2,
+//     },
+//     9: {
+//       label: "otherExpenses",
+//       num: 2,
+//     },
+//     10: {
+//       label: "totalIncome",
+//       num: 2,
+//     },
+//     11: {
+//       label: "totalExpenses",
+//       num: 2,
+//     },
+//     12: {
+//       label: "grossGrofit",
+//       num: 2,
+//     },
+//     13: {
+//       label: "afterSalesAmount",
+//       num: 2,
+//     },
+//     14: {
+//       label: "publicAmount",
+//       num: 2,
+//     },
+//     15: {
+//       label: "haveOverallAmount",
+//       num: 2,
+//     },
+//     16: {
+//       label: "departmentalCommission",
+//       num: 2,
+//     },
+//     17: {
+//       label: "personalCommission",
+//       num: 2,
+//     },
+//   };
+//   const { columns, data } = param;
+//   const sums = [];
+//   columns.forEach((column, index) => {
+//     if (index === 0) {
+//       sums[index] = "合计:";
+//     } else {
+//       if (obj[index] && obj[index].label) {
+//         let list = sourceList.value.data.map((item) => item[obj[index].label]);
+//         if (list && list.length > 0) {
+//           sums[index] = list.reduce((accumulator, currentValue) => accumulator + currentValue, 0).toFixed(obj[index].num);
+//         } else {
+//           sums[index] = 0;
+//         }
+//       }
+//     }
+//   });
+//   return sums;
+// };
 </script>
 
 <style lang="scss" scoped>