|
@@ -10,7 +10,18 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<ListPage :column="listPageData.tableColumn" :tableApi="listPageData.tableApi" :isSelect="listPageData.isSelect"
|
|
|
- :scopeBtns="listPageData.scopeBtns" :searchBtns="listPageData.searchBtns" ref="userTableRef" :isScope="false"/>
|
|
|
+ :scopeBtns="listPageData.scopeBtns" :searchBtns="listPageData.searchBtns" ref="userTableRef" :isScope="false" >
|
|
|
+ <template #footerLeft>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="card-title">总金额: {{ totalMoney }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="card-title">可提现金额: {{ balanceMoney }}</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </ListPage>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -18,6 +29,7 @@
|
|
|
import { ref } from 'vue';
|
|
|
import ListPage from '@/views/components/ListPage/index.vue';
|
|
|
import { list, walletTotal } from "@/api/finance/wallet.js";
|
|
|
+import { provide,inject } from 'vue'
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const userTableRef = ref();
|
|
|
const listPageData = reactive({
|
|
@@ -99,10 +111,36 @@ const listPageData = reactive({
|
|
|
},
|
|
|
],
|
|
|
tableApi: list,//接口地址
|
|
|
- isSelect: false,//是否勾选
|
|
|
- scopeBtns: []
|
|
|
+ isSelect: true,//是否勾选
|
|
|
+ scopeBtns: [],
|
|
|
+
|
|
|
})
|
|
|
|
|
|
+const selectList = ref([]);
|
|
|
+
|
|
|
+//总金额
|
|
|
+const totalMoney = computed(() => {
|
|
|
+ let total = 0;
|
|
|
+ selectList.value.forEach((item) => {
|
|
|
+ total += Number(item.totalAmount);
|
|
|
+ });
|
|
|
+ return total;
|
|
|
+});
|
|
|
+//可提现金额
|
|
|
+const balanceMoney = computed(() => {
|
|
|
+ let total = 0;
|
|
|
+ selectList.value.forEach((item) => {
|
|
|
+ total += Number(item.balance);
|
|
|
+ });
|
|
|
+ return total;
|
|
|
+});
|
|
|
+const selectChange = (rows) => {
|
|
|
+console.log("TCL: selectChange -> rows", rows)
|
|
|
+selectList.value = rows;
|
|
|
+}
|
|
|
+
|
|
|
+provide('selectChange',selectChange)
|
|
|
+
|
|
|
const cardList = [
|
|
|
{
|
|
|
name: '总金额',
|