From ce0211c7db75f525e9d2199aacb0f7dc93376cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Tue, 8 Apr 2025 08:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bst/account.js | 44 +++ src/api/bst/withdraw.js | 65 ++++ src/api/dashboard/dashboard.js | 13 + src/components/BaseRemoteSelect/index.vue | 32 +- .../Business/Account/AccountRemoteSelect.vue | 61 ++++ src/components/Business/User/UserDialog.vue | 39 +- src/components/CheckDialog/index.vue | 4 +- src/main.js | 3 +- src/utils/enums.js | 23 ++ src/utils/permission.js | 11 +- .../account/components/AccountEditDialog.vue | 173 +++++++++ src/views/bst/account/index.vue | 317 ++++++++++++++++ .../bst/index/components/OrderDailyStat.vue | 237 +++++++++++- src/views/bst/index/components/Stat.vue | 111 +++++- src/views/bst/index/components/TodoList.vue | 7 + src/views/bst/index/index.vue | 14 +- .../withdraw/components/WithdrawAddDialog.vue | 153 ++++++++ .../components/WithdrawVerifyDialog.vue | 171 +++++++++ src/views/bst/withdraw/index.vue | 338 ++++++++++++++++++ 19 files changed, 1729 insertions(+), 87 deletions(-) create mode 100644 src/api/bst/account.js create mode 100644 src/api/bst/withdraw.js create mode 100644 src/components/Business/Account/AccountRemoteSelect.vue create mode 100644 src/views/bst/account/components/AccountEditDialog.vue create mode 100644 src/views/bst/account/index.vue create mode 100644 src/views/bst/withdraw/components/WithdrawAddDialog.vue create mode 100644 src/views/bst/withdraw/components/WithdrawVerifyDialog.vue create mode 100644 src/views/bst/withdraw/index.vue diff --git a/src/api/bst/account.js b/src/api/bst/account.js new file mode 100644 index 0000000..c96a95a --- /dev/null +++ b/src/api/bst/account.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询收款账户列表 +export function listAccount(query) { + return request({ + url: '/bst/account/list', + method: 'get', + params: query + }) +} + +// 查询收款账户详细 +export function getAccount(id) { + return request({ + url: '/bst/account/' + id, + method: 'get' + }) +} + +// 新增收款账户 +export function addAccount(data) { + return request({ + url: '/bst/account', + method: 'post', + data: data + }) +} + +// 修改收款账户 +export function updateAccount(data) { + return request({ + url: '/bst/account', + method: 'put', + data: data + }) +} + +// 删除收款账户 +export function delAccount(id) { + return request({ + url: '/bst/account/' + id, + method: 'delete' + }) +} diff --git a/src/api/bst/withdraw.js b/src/api/bst/withdraw.js new file mode 100644 index 0000000..702f6c8 --- /dev/null +++ b/src/api/bst/withdraw.js @@ -0,0 +1,65 @@ +import request from '@/utils/request' + +// 查询提现列表 +export function listWithdraw(query) { + return request({ + url: '/bst/withdraw/list', + method: 'get', + params: query + }) +} + +// 查询提现详细 +export function getWithdraw(id) { + return request({ + url: '/bst/withdraw/' + id, + method: 'get' + }) +} + +// 新增提现 +export function addWithdraw(data) { + return request({ + url: '/bst/withdraw', + method: 'post', + data: data + }) +} + +// 修改提现 +export function updateWithdraw(data) { + return request({ + url: '/bst/withdraw', + method: 'put', + data: data + }) +} + +// 删除提现 +export function delWithdraw(id) { + return request({ + url: '/bst/withdraw/' + id, + method: 'delete' + }) +} + +// 提现审核 +export function verifyWithdraw(data) { + return request({ + url: '/bst/withdraw/verify', + method: 'put', + data: data + }) +} + +// 查询提现服务费 +export function calcWithdrawAmount(amount, userId) { + return request({ + url: '/bst/withdraw/calcAmount', + method: 'get', + params: { + amount, + userId + } + }) +} diff --git a/src/api/dashboard/dashboard.js b/src/api/dashboard/dashboard.js index 7c76a38..1a93c4e 100644 --- a/src/api/dashboard/dashboard.js +++ b/src/api/dashboard/dashboard.js @@ -12,3 +12,16 @@ export function getStat(query) { params: query }) } + +/** + * 获取每日统计数据 + * @param {Object} query 查询参数 + * @returns {Promise} 返回每日统计数据 + */ +export function getDailyAmount(query) { + return request({ + url: '/dashboard/dailyAmount', + method: 'get', + params: query + }) +} diff --git a/src/components/BaseRemoteSelect/index.vue b/src/components/BaseRemoteSelect/index.vue index 88e55af..e356c72 100644 --- a/src/components/BaseRemoteSelect/index.vue +++ b/src/components/BaseRemoteSelect/index.vue @@ -1,7 +1,7 @@ @@ -65,7 +67,7 @@ export default { // 优先使用API加载数据 if (this.loadApi) { this.loadData(); - } + } // 其次使用初始化选项 else if (!isEmpty(this.initOptions)) { this.options = this.initOptions; @@ -115,11 +117,11 @@ export default { }, // 获取选项 getOptions() { - console.log("getOptions", this.beforeGetOptions()); if (!this.beforeGetOptions()) { return; } this.loading = true; + console.log("getOptions", this.query); Object.assign(this.queryParams, this.query); this.listApi(this.queryParams).then(res => { this.options = res.rows; @@ -140,8 +142,8 @@ export default { justify-content: flex-end; align-items: center; line-height: 1em; - text-align: center; - color: #8492a6; - font-size: 13px; + text-align: center; + color: #8492a6; + font-size: 13px; } - \ No newline at end of file + diff --git a/src/components/Business/Account/AccountRemoteSelect.vue b/src/components/Business/Account/AccountRemoteSelect.vue new file mode 100644 index 0000000..a89fb5e --- /dev/null +++ b/src/components/Business/Account/AccountRemoteSelect.vue @@ -0,0 +1,61 @@ + + + \ No newline at end of file diff --git a/src/components/Business/User/UserDialog.vue b/src/components/Business/User/UserDialog.vue index da3a477..d79af69 100644 --- a/src/components/Business/User/UserDialog.vue +++ b/src/components/Business/User/UserDialog.vue @@ -22,7 +22,7 @@ @keyup.enter.native="handleQuery" /> - + - - - - - - - -