Browse Source

Merge branch 'zhangyong/feature-20260113094820-现金重构' into milestone-20251215-多语言二期2

zhangyong/feature-20260113094820-现金重构
ZhangYong 1 month ago
parent
commit
6cdf0f6e18
  1. 9
      src/api/cash/financialAccount.js
  2. 31
      src/views/moneyManage/financialAccount/cashFlow.vue
  3. 95
      src/views/moneyManage/financialAccount/performanceAttribution.vue

9
src/api/cash/financialAccount.js

@ -26,3 +26,12 @@ export const performanceSelect = (data) => {
data
})
}
// 导出业绩归属
export const exportPerformance = (data) => {
return http({
method: 'POST',
url: '/export/exportPerformance',
data
})
}

31
src/views/moneyManage/financialAccount/cashFlow.vue

@ -41,7 +41,7 @@ const queryParams = reactive({
orderCode: '',
statuses: [],
pageNum: 1,
pageSize: 50
pageSize: 20
})
const total = ref(0)
@ -86,8 +86,8 @@ const fetchData = async () => {
fundsDTO:{
jwcode: queryParams.jwcode,
markets: queryParams.markets,
startTime: queryParams.timeRange?.[0] || '',
endTime: queryParams.timeRange?.[1] || '',
startTime: queryParams.timeRange?.[0] ? dayjs(queryParams.timeRange[0]).format('YYYY-MM-DD HH:mm:ss') : '',
endTime: queryParams.timeRange?.[1] ? dayjs(queryParams.timeRange[1]).format('YYYY-MM-DD HH:mm:ss') : '',
payType: queryParams.payType,
orderCode: queryParams.orderCode,
statuses: queryParams.statuses,
@ -119,7 +119,7 @@ const handleSearch = () => {
const handleReset = () => {
queryParams.jwcode = ''
queryParams.markets = []
queryParams.timeRange = []
queryParams.timeRange = null
queryParams.payType = ''
queryParams.orderCode = ''
queryParams.statuses = []
@ -166,8 +166,8 @@ const handleExport = async () => {
fundsDTO:{
jwcode: queryParams.jwcode,
markets: queryParams.markets,
startTime: queryParams.timeRange?.[0] || '',
endTime: queryParams.timeRange?.[1] || '',
startTime: queryParams.timeRange?.[0] ? dayjs(queryParams.timeRange[0]).format('YYYY-MM-DD HH:mm:ss') : '',
endTime: queryParams.timeRange?.[1] ? dayjs(queryParams.timeRange[1]).format('YYYY-MM-DD HH:mm:ss') : '',
payType: queryParams.payType,
orderCode: queryParams.orderCode,
statuses: queryParams.statuses,
@ -290,14 +290,15 @@ onMounted(() => {
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</div>
<!-- 第二行 -->
<div class="search-row">
<div class="search-item">
<span class="label">订单号</span>
<el-input v-model="queryParams.orderCode" placeholder="请输入订单号" clearable />
</div>
</div>
<!-- 第二行 -->
<div class="search-row">
<div class="search-item" style="width: auto;">
<span class="label">付款时间</span>
<el-date-picker
@ -322,26 +323,26 @@ onMounted(() => {
<!-- 表格区域 -->
<el-card class="table-card">
<el-table :data="tableData" v-loading="loading" style="width: 100%; flex: 1;" :header-cell-style="{ background: '#F3FAFE', color: '#333' }">
<el-table :data="tableData" v-loading="loading" style="width: 100%; flex: 1;" :cell-style="{ textAlign: 'center' }" :header-cell-style="{ background: '#F3FAFE', color: '#333',textAlign: 'center' }">
<el-table-column type="index" label="序号" width="60" align="center" fixed="left" />
<el-table-column prop="jwcode" label="精网号" width="120" fixed="left" />
<el-table-column prop="name" label="姓名" width="120" show-overflow-tooltip />
<el-table-column prop="name" label="姓名" width="150" show-overflow-tooltip />
<el-table-column prop="market" label="所属地区" width="120" show-overflow-tooltip />
<el-table-column prop="orderCode" label="系统交易号" width="180" show-overflow-tooltip />
<el-table-column prop="orderCode" label="系统交易号" width="280" show-overflow-tooltip />
<el-table-column prop="paymentAmount" label="付款金额" width="150" align="right">
<!-- <template #default="{ row }">
{{ row.paymentAmount }} {{ row.paymentCurrency }}
</template> -->
</el-table-column>
<el-table-column prop="paymentCurrency" label="付款币种" width="180" show-overflow-tooltip />
<el-table-column prop="paymentCurrency" label="付款币种" width="120" show-overflow-tooltip />
<el-table-column prop="receivedAmount" label="到账金额" width="150" align="right">
<!-- <template #default="{ row }">
{{ row.receivedAmount }} {{ row.receivedCurrency }}
</template> -->
</el-table-column>
<el-table-column prop="receivedCurrency" label="到账币种" width="180" show-overflow-tooltip />
<el-table-column prop="receivedCurrency" label="到账币种" width="120" show-overflow-tooltip />
<el-table-column prop="handlingCharge" label="手续费" width="100" align="right" />
<el-table-column prop="payType" label="支付方式" width="120" align="center" />

95
src/views/moneyManage/financialAccount/performanceAttribution.vue

@ -1,10 +1,15 @@
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, onMounted, toRefs } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import request from '@/util/http.js'
import { storeToRefs } from 'pinia'
import dayjs from 'dayjs'
import { useI18n } from 'vue-i18n'
import { Moneyfunds,refundOnline,performanceSelect } from '@/api/cash/financialAccount.js'
import { refundOnline,performanceSelect,exportPerformance } from '@/api/cash/financialAccount.js'
import {useAdminStore} from '@/store/index.js'
const adminStore = useAdminStore()
const {adminData} = storeToRefs(adminStore)
const { t } = useI18n()
@ -35,13 +40,11 @@ const marketOptions = ref([])
//
const queryParams = reactive({
jwcode: '',
markets: [], //
adminMarket: [], //
timeRange: [], // [startTime, endTime]
payType: '',
orderCode: '',
statuses: [],
customerMarket: [], //
pageNum: 1,
pageSize: 50
pageSize: 20
})
const total = ref(0)
@ -85,12 +88,10 @@ const fetchData = async () => {
pageSize: queryParams.pageSize,
performanceDTO:{
jwcode: queryParams.jwcode,
markets: queryParams.markets,
startTime: queryParams.timeRange?.[0] || '',
endTime: queryParams.timeRange?.[1] || '',
payType: queryParams.payType,
orderCode: queryParams.orderCode,
statuses: queryParams.statuses,
adminMarket: adminData.value.markets.split(',').filter(item => item.trim() !== '') || [],
customerMarket: queryParams.customerMarket,
startTime: queryParams.timeRange?.[0] ? dayjs(queryParams.timeRange[0]).format('YYYY-MM-DD HH:mm:ss') : '',
endTime: queryParams.timeRange?.[1] ? dayjs(queryParams.timeRange[1]).format('YYYY-MM-DD HH:mm:ss') : '',
}
}
@ -118,11 +119,9 @@ const handleSearch = () => {
const handleReset = () => {
queryParams.jwcode = ''
queryParams.markets = []
queryParams.timeRange = []
queryParams.payType = ''
queryParams.orderCode = ''
queryParams.statuses = []
queryParams.adminMarket = []
queryParams.timeRange = null
queryParams.customerMarket = []
handleSearch()
}
@ -165,17 +164,15 @@ const handleExport = async () => {
pageSize: queryParams.pageSize,
performanceDTO:{
jwcode: queryParams.jwcode,
markets: queryParams.markets,
startTime: queryParams.timeRange?.[0] || '',
endTime: queryParams.timeRange?.[1] || '',
payType: queryParams.payType,
orderCode: queryParams.orderCode,
statuses: queryParams.statuses,
adminMarket: queryParams.adminMarket,
startTime: queryParams.timeRange?.[0] ? dayjs(queryParams.timeRange[0]).format('YYYY-MM-DD HH:mm:ss') : '',
endTime: queryParams.timeRange?.[1] ? dayjs(queryParams.timeRange[1]).format('YYYY-MM-DD HH:mm:ss') : '',
customerMarket: queryParams.customerMarket,
}
}
// TODO: URL
const res = await request({ url: '/export/exportCash', data: params })
const res = await exportPerformance(params)
if(res.code == 200){
console.log('导出参数', params)
@ -268,7 +265,7 @@ onMounted(() => {
<span class="label">所属地区</span>
<!-- 下拉多选使用 el-cascader 匹配地区树结构 -->
<el-cascader
v-model="queryParams.markets"
v-model="queryParams.customerMarket"
:options="marketOptions"
:props="{ multiple: true, emitPath: false }"
collapse-tags
@ -278,26 +275,7 @@ onMounted(() => {
style="width: 220px;"
/>
</div>
<div class="search-item">
<span class="label">支付平台</span>
<el-select v-model="queryParams.payType" placeholder="请选择" clearable>
<el-option v-for="item in payPlatformOptions" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="search-item">
<span class="label">状态</span>
<el-select v-model="queryParams.statuses[0]" placeholder="请选择" clearable>
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</div>
<!-- 第二行 -->
<div class="search-row">
<div class="search-item">
<span class="label">订单号</span>
<el-input v-model="queryParams.orderCode" placeholder="请输入订单号" clearable />
</div>
<div class="search-item" style="width: auto;">
<span class="label">付款时间</span>
<el-date-picker
@ -310,6 +288,7 @@ onMounted(() => {
style="width: 350px;"
/>
</div>
<div class="search-btn-group">
<el-button type="primary" @click="handleSearch">{{ t('common.search') }}</el-button>
<el-button type="primary" @click="handleExport">{{ t('common.exportExcel') }}</el-button>
@ -344,30 +323,6 @@ onMounted(() => {
<el-table-column prop="receivedCurrency" label="到账币种" width="180" show-overflow-tooltip />
<el-table-column prop="handlingCharge" label="手续费" width="100" align="right" />
<el-table-column prop="payType" label="支付方式" width="120" align="center" />
<el-table-column prop="payTime" label="付款时间" width="180" align="center" />
<el-table-column prop="status" label="状态" width="100" align="center" fixed="right">
<template #default="{ row }">
<el-tag :type="row.status === 4 ? 'success' : 'warning'" effect="plain">
{{ row.status === 4 ? '已到账' : '已退款' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="100" fixed="right" align="center">
<template #default="{ row }">
<el-button
v-if="row.orderCode.slice(0,4) == 'GOLD'"
type="danger"
link
size="small"
@click="handleRefund(row)"
>
退款
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
@ -468,7 +423,7 @@ onMounted(() => {
}
.search-btn-group {
margin-left: auto; //
margin-left: 2vw;
display: flex;
gap: 10px;
}

Loading…
Cancel
Save