From 6a2c06d1086b7a625005f5a200169d8c0b5579cf Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Sun, 18 Jan 2026 14:16:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/moneyManage/financialAccount/cashFlow.vue | 19 ++++++++----------- .../financialAccount/performanceAttribution.vue | 8 +++----- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/views/moneyManage/financialAccount/cashFlow.vue b/src/views/moneyManage/financialAccount/cashFlow.vue index 9a3e016..fa475e2 100644 --- a/src/views/moneyManage/financialAccount/cashFlow.vue +++ b/src/views/moneyManage/financialAccount/cashFlow.vue @@ -294,12 +294,8 @@ onMounted(() => { 订单号: - - - -
- -
+ +
付款时间: { {{ t('common.reset') }}
-
+ + @@ -327,7 +324,7 @@ onMounted(() => { - + @@ -335,14 +332,14 @@ onMounted(() => { {{ row.paymentAmount }} {{ row.paymentCurrency }} --> - + - + @@ -469,7 +466,7 @@ onMounted(() => { } .search-btn-group { - margin-left: auto; // 靠右对齐 + margin-left: 20px; // 靠右对齐 display: flex; gap: 10px; } diff --git a/src/views/moneyManage/financialAccount/performanceAttribution.vue b/src/views/moneyManage/financialAccount/performanceAttribution.vue index 63a18eb..b98da7b 100644 --- a/src/views/moneyManage/financialAccount/performanceAttribution.vue +++ b/src/views/moneyManage/financialAccount/performanceAttribution.vue @@ -273,7 +273,7 @@ onMounted(() => { collapse-tags-tooltip placeholder="请选择地区" clearable - style="width: 220px;" + style="width: 8vw;" /> @@ -286,16 +286,14 @@ onMounted(() => { start-placeholder="开始时间" end-placeholder="结束时间" :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]" - style="width: 350px;" + style="width: 18vw;" /> -
{{ t('common.search') }} {{ t('common.exportExcel') }} {{ t('common.viewExportList') }} {{ t('common.reset') }} -
@@ -419,7 +417,7 @@ onMounted(() => { } .el-input, .el-select { - width: 200px; + width: 8vw; } } From 8c4a2c60d3cab8fb6b0bbd4802735e1d8e47e36b Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Sun, 18 Jan 2026 16:34:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E7=BA=BF=E4=B8=8A?= =?UTF-8?q?=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moneyManage/financialAccount/cashFlow.vue | 438 +++++++++++++++++---- .../financialAccount/performanceAttribution.vue | 2 +- 2 files changed, 352 insertions(+), 88 deletions(-) diff --git a/src/views/moneyManage/financialAccount/cashFlow.vue b/src/views/moneyManage/financialAccount/cashFlow.vue index fa475e2..a583cad 100644 --- a/src/views/moneyManage/financialAccount/cashFlow.vue +++ b/src/views/moneyManage/financialAccount/cashFlow.vue @@ -4,22 +4,28 @@ import { ElMessage, ElMessageBox } from 'element-plus' import request from '@/util/http.js' import dayjs from 'dayjs' import { useI18n } from 'vue-i18n' -import { Moneyfunds,refundOnline } from '@/api/cash/financialAccount.js' +import { Moneyfunds, refundOnline } from '@/api/cash/financialAccount.js' +import { useAdminStore } from '@/store/index.js' +import { storeToRefs } from 'pinia' +import _ from 'lodash'; + +const adminStore = useAdminStore() +const { adminData } = storeToRefs(adminStore) const { t } = useI18n() const paytypeList = [ - t('cash.payMethods.stripe'), - t('cash.payMethods.paymentAsia'), - t('cash.payMethods.ipay88'), - t('cash.payMethods.bankTransfer'), - t('cash.payMethods.card'), - t('cash.payMethods.cash'), - t('cash.payMethods.check'), - t('cash.payMethods.grabpay'), - t('cash.payMethods.nets'), - t('cash.payMethods.transfer'), - t('cash.payMethods.paypal'), + t('cash.payMethods.stripe'), + t('cash.payMethods.paymentAsia'), + t('cash.payMethods.ipay88'), + t('cash.payMethods.bankTransfer'), + t('cash.payMethods.card'), + t('cash.payMethods.cash'), + t('cash.payMethods.check'), + t('cash.payMethods.grabpay'), + t('cash.payMethods.nets'), + t('cash.payMethods.transfer'), + t('cash.payMethods.paypal'), ] const payPlatformOptions = ref([...paytypeList]) @@ -83,7 +89,7 @@ const fetchData = async () => { const params = { pageNum: queryParams.pageNum, pageSize: queryParams.pageSize, - fundsDTO:{ + fundsDTO: { jwcode: queryParams.jwcode, markets: queryParams.markets, startTime: queryParams.timeRange?.[0] ? dayjs(queryParams.timeRange[0]).format('YYYY-MM-DD HH:mm:ss') : '', @@ -93,7 +99,7 @@ const fetchData = async () => { statuses: queryParams.statuses, } } - + console.log('查询参数:', params) const res = await Moneyfunds(params) if (res.code == 200) { @@ -103,7 +109,7 @@ const fetchData = async () => { } else { ElMessage.error(res.msg || '获取数据失败') loading.value = false - } + } } catch (error) { console.error(error) loading.value = false @@ -137,18 +143,67 @@ const handleCurrentChange = (val) => { } // 退款操作 -const handleRefund = (row) => { - ElMessageBox.confirm(`确定要对订单 ${row.systemTradeNo} 进行退款吗?`, '退款确认', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - - - ElMessage.success('退款申请已提交') - // 刷新列表 - fetchData() - }).catch(() => {}) +const openRefundConfirm = (row) => { + textContent.value = t('common.willRefundOrder') + '?' + refundConfirmDialog.value = true + refundFormData.value = { + ...row, + oldpermanentGold: row.permanentGold,//退款永久金币 + oldfreeGold: row.freeGold,//退款免费金币 + permanentGold: null, + freeGold: null, + } + console.log(row); +} +const openRefundDialog = () => { + refundDialog.value = true + closeConfirmRefund() + +} + +const closeConfirmRefund = () => { + refundConfirmDialog.value = false + textContent.value = '' +} +const refundConfirmDialog = ref(false) +const textContent = ref('') +const refundDialog = ref(false) +const refundFormData = ref({}) + +const handleRefund = async () => { + try { + if (refundFormData.value.refundModel == 1) { + refundFormData.value.permanentGold = refundFormData.value.oldpermanentGold + refundFormData.value.freeGold = refundFormData.value.oldfreeGold + } + let params = { + jwcode: refundFormData.value.jwcode, + name: refundFormData.value.name, + market: refundFormData.value.marketName, + submitterMarket: adminData.value.markets, + remark: refundFormData.value.remark, + originalOrderId: refundFormData.value.id, + refundReason: refundFormData.value.refundReason, + refundModel: refundFormData.value.refundModel, + orderCode: refundFormData.value.orderCode, + submitterId: adminData.value.id, + submitterMarket: adminData.value.markets, + permanentGold: (refundFormData.value.permanentGold) * 100 || 0, + handlingCharge: refundFormData.value.handlingCharge == null ? null : refundFormData.value.handlingCharge * 100, + freeGold: (refundFormData.value.freeGold) * 100 || 0, + } + console.log('这是退款参数:', params); + + const res = await refundOnline(params) + if (res.code == 200) { + refundDialog.value = false + fetchData() + } else { + ElMessage.error(res.msg || '退款失败') + } + } catch (error) { + console.error(error) + } } // ==================== 导出相关逻辑 ==================== @@ -160,10 +215,10 @@ const exportListLoading = ref(false) // 导出Excel const handleExport = async () => { try { - const params = { + const params = { pageNum: queryParams.pageNum, pageSize: queryParams.pageSize, - fundsDTO:{ + fundsDTO: { jwcode: queryParams.jwcode, markets: queryParams.markets, startTime: queryParams.timeRange?.[0] ? dayjs(queryParams.timeRange[0]).format('YYYY-MM-DD HH:mm:ss') : '', @@ -173,15 +228,15 @@ const handleExport = async () => { statuses: queryParams.statuses, } } - + // TODO: 确认导出接口 URL const res = await request({ url: '/export/exportCash', data: params }) - if(res.code == 200){ + if (res.code == 200) { - console.log('导出参数', params) - ElMessage.success(t('elmessage.exportSuccess')) + console.log('导出参数', params) + ElMessage.success(t('elmessage.exportSuccess')) } - + } catch (error) { console.error(error) ElMessage.error('导出失败') @@ -246,7 +301,9 @@ const getTagText = (state) => { default: return t('elmessage.unknownStatus'); } } - +const throttledsubmitRefund = _.throttle(handleRefund, 5000, { + trailing: false +}) onMounted(() => { getMarket() fetchData() @@ -267,16 +324,9 @@ onMounted(() => {
所属地区: - +
支付平台: @@ -295,17 +345,11 @@ onMounted(() => {
-
+
付款时间: - +
{{ t('common.search') }} @@ -314,37 +358,39 @@ onMounted(() => { {{ t('common.reset') }}
- - + + - + - + - + - + - + - + @@ -370,16 +411,9 @@ onMounted(() => {
- +
@@ -414,21 +448,143 @@ onMounted(() => { + +
+
+ +
+
+ {{ textContent }} +
+
+ +
+
+ +
+
+ + +
+
+
+ {{ t('common_add.jwcode') }} + +
+
+ {{ t('common_add.customerName') }} + +
+
+ {{ t('common_add.market') }} + +
+
+ {{ t('common_add.activity') }} + +
+
+ {{ t('common_add.productName') }} + +
+
+
+ {{ t('common_add.permanentGold') + }}: + +
+
+ {{ t('common_add.freeGold') }}: + +
+
+
+ {{ t('common_add.payCurrency') }} + +
+
+ {{ t('common_add.payAmount') }} + +
+
+ {{ t('common_add.payMethod') }} + +
+
+ {{ t('common_add.payTime') }} + +
+
+ {{ t('common_add.transferVoucher') }} + + + + + +
+
+ {{ t('common_add.remark') }} + +
+
+
+
+ {{ t('common_add.refundModel') }} + + {{ t('common_add.refundModelAll') }} + {{ t('common_add.refundModelPart') }} + +
+
+
+ {{ t('common_add.permanentGold') + }}: + +
+
+ {{ t('common_add.freeGold') }}: + +
+
+
+ {{ t('common_add.refundReason') }} + +
+
{{ t('common_add.tip') }}
+
+ {{ t('common.reset') }} + {{ t('common.submit') }} +
+
+
+
diff --git a/src/views/moneyManage/financialAccount/performanceAttribution.vue b/src/views/moneyManage/financialAccount/performanceAttribution.vue index b98da7b..09ddb71 100644 --- a/src/views/moneyManage/financialAccount/performanceAttribution.vue +++ b/src/views/moneyManage/financialAccount/performanceAttribution.vue @@ -2,11 +2,11 @@ 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 { refundOnline,performanceSelect,exportPerformance } from '@/api/cash/financialAccount.js' import {useAdminStore} from '@/store/index.js' +import { storeToRefs } from 'pinia' const adminStore = useAdminStore() const {adminData} = storeToRefs(adminStore)