wuguojie 10 месяцев назад
Родитель
Сommit
50fc2cf77c

+ 8 - 0
src/http/moudules/task.js

@@ -327,6 +327,14 @@ export const findPageAccountPro = (data) => {
   })
 }
 
+export const querySum = (data) => {
+  return axios({
+    url: '/sysUserAccount/querySum',
+    method: 'post',
+    data
+  })
+}
+
 // 证件识别
 export const imgAI = (data) => {
   return axios({

+ 33 - 2
src/views/Core/KtCommonTable.vue

@@ -431,6 +431,15 @@
         </template>
       </el-table-column>
 
+      <template slot="append">
+          <div class="summation">
+              <span class="label">合计:</span>
+              <span class="info">
+                  总收益金额:{{ summation.documentary }} 可提现总金额:{{ summation.sumAmountWithdrawal }} 已提现总金额:{{ summation.sumAmountAccount }} 支付中总金额:{{ summation.sumAmountPayment }}
+              </span>
+          </div>
+      </template>
+
     </el-table>
     <!--分页栏-->
     <!-- 底部分页 -->
@@ -528,7 +537,9 @@
 <script>
 import KtButton from "@/views/Core/KtButton";
 import BigNumber from "bignumber.js";
-import ProductCostForm from '@/components/Form/ProductCostForm.vue';//表单组件
+import ProductCostForm from '@/components/Form/ProductCostForm.vue';
+import {bool} from "mockjs/src/mock/random/basic";
+//表单组件
 export default {
   name: "KtCommonTable",
   components: {
@@ -764,6 +775,11 @@ export default {
         return []
       }
     },
+      showSummation: {
+        type: Boolean,
+          default: false
+      }, // 是否展示自定义合计
+      summation: {}, // 合计需要展示的数据
     showSummaryFieldList: Array, //自定义合计列配置
     keyName: String, //主键字段名
     columns: Array, // 表格列配置
@@ -1028,7 +1044,8 @@ export default {
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "合计"; // 假设第一列显示文本'合计'
-          return;
+            return;
+
         }
         if (this.showSummaryFieldList) {
           // 如果当前列名不在需要计算的列名数组中,直接返回空值或其他标记
@@ -1412,6 +1429,20 @@ export default {
 }
 </style>
 <style lang="scss" scoped>
+.summation{
+  display: flex;
+  line-height: 40px;
+  align-content: center;
+  justify-content: space-between;
+  .label{
+    width: 100px;
+    text-align: center;
+  }
+  .info{
+    width: calc(100% - 100px);
+    text-align: center;
+  }
+}
 .tableSelectedCountClass{
   color: #606266;
   font-size: 14px;

+ 12 - 1
src/views/FinancialManagement/AcountWithdrawal/AcountBalance.vue

@@ -33,7 +33,7 @@
           </el-row>
         </el-form>
       </div>
-      <kt-common-table :showBatchDelete="false" :showSysUserAccountCardList="true" :showBatchPrint="false"
+      <kt-common-table :showBatchDelete="false" keyName="id" :isNotFixed="true" :showSysUserAccountCardList="false" :summation = 'summationData' :showSummation="true"
         :showOperation="true" :data="pageResult" :columns="columns" @findPage="queryBalance" :isshowpagination="true"
         button2Name="提现" button3Name="绑卡" button2Background="#409eff" button3Background="#409eff"
         @handleButton2="withdrawButton" @handleButton3="withdrawButton2" @handleBreak="handleBreak"
@@ -109,6 +109,7 @@
 import KtCommonTable from "@/views/Core/KtCommonTable.vue";
 import tree from "@/components/ztree.vue"; // 机构树组件
 import { withdraw } from "../../../http/moudules/dept";
+import {querySum} from "../../../http/moudules/task";
 export default {
   components: {
     KtCommonTable,
@@ -116,6 +117,7 @@ export default {
   },
   data() {
     return {
+        summationData: {}, // 合计
       // 轨迹
       dialogVisibleLine: false,
       timeLine: [],
@@ -284,6 +286,7 @@ export default {
   },
   mounted() {
     this.changeTreeWidth(240); // 初始化树的宽度
+      this.queryCount()
   },
 
   methods: {
@@ -415,6 +418,14 @@ export default {
         this.pageRequest.deptId = "";
       }
     },
+      queryCount() {
+        this.$api.task.querySum({
+            ...this.pageRequest
+        }).then(res => {
+            console.log(123123123, res.data)
+            this.summationData = res.data
+        })
+      },
     queryBalance(data) {
       if (data && data.pageRequest) {
         this.pageRequest.pageNum = data.pageRequest.pageNum;