|
|
@@ -1,6 +1,9 @@
|
|
|
<!-- 资金流水-当前记录 -->
|
|
|
<template>
|
|
|
<app-table class="query-capital" :data="dataList" v-model:columns="tableColumns" :loading="loading">
|
|
|
+ <template #headerLeft>
|
|
|
+ <app-filter :options="filterOptons" />
|
|
|
+ </template>
|
|
|
<template #headerRight>
|
|
|
<ul class="query-capital-total">
|
|
|
<li>
|
|
|
@@ -26,8 +29,12 @@ import { formatDate } from '@/filters'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryAmountLog } from '@/services/api/bank'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
+import AppFilter from '@pc/components/base/table-filter/index.vue'
|
|
|
+import { useDataFilter } from '@/hooks/datatable'
|
|
|
+import { getOperateTypeList } from '@/constants/order'
|
|
|
|
|
|
-const { loading, dataList } = useRequest(queryAmountLog)
|
|
|
+const { loading, dataList, run } = useRequest(queryAmountLog)
|
|
|
+const { filterOptons, getQueryParams } = useDataFilter<Model.AmountLogReq>()
|
|
|
|
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ prop: 'accountid', label: '资金账号' },
|
|
|
@@ -36,6 +43,19 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ prop: 'createtime', label: '时间' }
|
|
|
])
|
|
|
|
|
|
+filterOptons.buttonList = [
|
|
|
+ { lable: '查询', className: 'el-button--info', onClick: () => onSearch() },
|
|
|
+]
|
|
|
+
|
|
|
+filterOptons.selectList = [
|
|
|
+ {
|
|
|
+ key: 'OperateType',
|
|
|
+ selectedValue: 101,
|
|
|
+ options: getOperateTypeList(),
|
|
|
+ locked: true,
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
// 手续费汇总
|
|
|
const feeTotal = computed(() => dataList.value.reduce((pre, cur) => {
|
|
|
if (cur.operatetype === 207) {
|
|
|
@@ -44,6 +64,7 @@ const feeTotal = computed(() => dataList.value.reduce((pre, cur) => {
|
|
|
return pre
|
|
|
}, 0))
|
|
|
|
|
|
+
|
|
|
// 盈亏汇总
|
|
|
const plTotal = computed(() => dataList.value.reduce((pre, cur) => {
|
|
|
if (cur.operatetype === 209) {
|
|
|
@@ -51,6 +72,12 @@ const plTotal = computed(() => dataList.value.reduce((pre, cur) => {
|
|
|
}
|
|
|
return pre
|
|
|
}, 0))
|
|
|
+
|
|
|
+const onSearch = (clear = false) => {
|
|
|
+ getQueryParams((qs) => {
|
|
|
+ run(qs)
|
|
|
+ }, clear)
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|