From 443b164348e59070f723026a13f57c0e6233de38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=95=A6C=E6=A2=A6?= <15709267061@163.com> Date: Tue, 10 Jun 2025 14:04:28 +0800 Subject: [PATCH] update --- src/api/merchant.js | 35 +++++ .../AddWithdrawalInformationModal.vue | 134 ++++++++++++++---- .../LookWithdrawalInformationModal.vue | 2 + .../pages/my-wallet/components/Recharge.vue | 2 +- .../pages/my-wallet/components/Reflect.vue | 29 +++- .../my-wallet/moving-account-details.vue | 109 ++++++++------ 6 files changed, 239 insertions(+), 72 deletions(-) diff --git a/src/api/merchant.js b/src/api/merchant.js index 25f69b6..7203e1b 100644 --- a/src/api/merchant.js +++ b/src/api/merchant.js @@ -421,6 +421,41 @@ const merchant = { data: data }); }, + getWithdrawalInfo: async (id) => { + return request({ + url: '/index/business/getWithdrawalInfo', + method: Method.POST, + data: {id} + }); + }, + editWithdrawal: async (data) => { + return request({ + url: '/index/business/editWithdrawal', + method: Method.POST, + data: data + }); + }, + delWithdrawal: async (id) => { + return request({ + url: '/index/business/delWithdrawal', + method: Method.POST, + data: {id} + }); + }, + getBusinessMoneyLog: async (data) => { + return request({ + url: '/index/business/getBusinessMoneyLog', + method: Method.POST, + data: data + }); + }, + getPurpose: async (data) => { + return request({ + url: '/index/business/getPurpose', + method: Method.POST, + data: data + }); + }, } export default merchant; diff --git a/src/pages/merchant/components/AddWithdrawalInformationModal.vue b/src/pages/merchant/components/AddWithdrawalInformationModal.vue index 4379302..b668f16 100644 --- a/src/pages/merchant/components/AddWithdrawalInformationModal.vue +++ b/src/pages/merchant/components/AddWithdrawalInformationModal.vue @@ -1,22 +1,80 @@ @@ -43,25 +124,30 @@ const success = async () => { - - - - + @cancel="visible = false" + :visible="visible"> + + + + - + - + - + - + { - - - + + + - - + + - - + + - - + + diff --git a/src/pages/merchant/components/LookWithdrawalInformationModal.vue b/src/pages/merchant/components/LookWithdrawalInformationModal.vue index f091da7..3277a0f 100644 --- a/src/pages/merchant/components/LookWithdrawalInformationModal.vue +++ b/src/pages/merchant/components/LookWithdrawalInformationModal.vue @@ -25,6 +25,8 @@ watch( money: money, }).then(({data}) => { Object.assign(detail, data); + }).catch(() => { + visible.value = false; }); }, {deep: true} diff --git a/src/pages/merchant/pages/my-wallet/components/Recharge.vue b/src/pages/merchant/pages/my-wallet/components/Recharge.vue index e875060..eac3299 100644 --- a/src/pages/merchant/pages/my-wallet/components/Recharge.vue +++ b/src/pages/merchant/pages/my-wallet/components/Recharge.vue @@ -17,7 +17,7 @@ const form = reactive({ + :precision="2" :min="0.01"> diff --git a/src/pages/merchant/pages/my-wallet/components/Reflect.vue b/src/pages/merchant/pages/my-wallet/components/Reflect.vue index 396b656..0da1b11 100644 --- a/src/pages/merchant/pages/my-wallet/components/Reflect.vue +++ b/src/pages/merchant/pages/my-wallet/components/Reflect.vue @@ -5,6 +5,7 @@ import {onMounted, reactive, ref} from "vue"; import AddWithdrawalInformationModal from "../../../components/AddWithdrawalInformationModal.vue"; import LookWithdrawalInformationModal from "../../../components/LookWithdrawalInformationModal.vue"; import Api from "../../../../../api/index.js"; +import {Message, Modal} from "@arco-design/web-vue"; const {businessInfo} = defineProps({ businessInfo: { @@ -21,6 +22,20 @@ const getData = async () => { withdrawalList.push(...data); } +const deleteAccount = (v) => { + console.log(v) + Modal.warning({ + title: '确定删除吗?', + content: `账号: ${v.account}`, + hideCancel: false, + onOk: async () => { + const {msg} = await Api.merchant.delWithdrawal(v.id); + Message.success(msg); + await getData(); + } + }); +} + onMounted(() => { getData(); }); @@ -47,14 +62,16 @@ onMounted(() => {
{{ v.type_text }}
-
{{ v.mobile }}
+
{{ v.mobile }}
- + + + - + - +
@@ -69,14 +86,14 @@ onMounted(() => {
- 全部提现 + 全部提现
- 立即提现 + 立即提现 diff --git a/src/pages/merchant/pages/my-wallet/moving-account-details.vue b/src/pages/merchant/pages/my-wallet/moving-account-details.vue index ad95c85..565eb12 100644 --- a/src/pages/merchant/pages/my-wallet/moving-account-details.vue +++ b/src/pages/merchant/pages/my-wallet/moving-account-details.vue @@ -7,113 +7,101 @@ import Api from "../../../../api/index.js"; const columns = [ { title: '动账日期', - dataIndex: 'value' + dataIndex: 'createtime1' }, { title: '动账时间', - dataIndex: 'value' + dataIndex: 'createtime2' }, { title: '交易流水号', - dataIndex: 'value' + dataIndex: 'sn' }, { title: '动账渠道', - dataIndex: 'value' + dataIndex: 'platform_name' }, { title: '状态', - dataIndex: 'value' + dataIndex: 'status', + slotName: 'status' }, { title: '动账用途', - dataIndex: 'value' + dataIndex: 'purpose_name' }, { title: '动账金额(元)', - dataIndex: 'value' + dataIndex: 'money' }, { title: '付款人账户', - dataIndex: 'value' + dataIndex: 'account' }, { title: '关联任务ID', - dataIndex: 'value' + dataIndex: 'task_id' }, { title: '子任务ID', - dataIndex: 'value' + dataIndex: 'task_children_id' }, { title: '钱包余额(元) ', - dataIndex: 'value' + dataIndex: 'business_money' }, { title: '任务款余额(元)', - dataIndex: 'value' + dataIndex: 'business_coin' }, { title: '资产合计(元)', - dataIndex: 'value' + dataIndex: 'sum', + slotName: 'sum' }, ]; const FilterConfig = computed(() => [ { - key: 'wd', + key: 'platform', type: 'select', label: '动账渠道', placeholder: '全部', api: async () => ({ data: [ { - name: '选项一', + name: '全部', + id: 0, + }, + { + name: '支付宝', id: 1, }, { - name: '选项二', + name: '/', id: 2, }, - { - name: '选项三', - id: 3, - }, ] }) }, { - key: 'wd', + key: 'purpose', type: 'select', label: '动账用途', placeholder: '全部', - api: async () => ({ - data: [ - { - name: '选项一', - id: 1, - }, - { - name: '选项二', - id: 2, - }, - { - name: '选项三', - id: 3, - }, - ] - }) + api: async () => Api.merchant.getPurpose() }, { - key: 'wd', + key: 'task_id', type: 'input', label: '关联ID', placeholder: '请输入任务ID', }, { - key: 'wd', + key: 'rangeTime', + start: 'start_time', + end: 'end_time', type: 'datetime', label: '动账日期', - placeholder: '全部', }, ]); const vo = reactive({ @@ -127,7 +115,7 @@ const po = reactive({ const {loading, pagination, initFetchData} = useTableQuery({ parameter: po, - api: Api.system.getData, + api: Api.merchant.getBusinessMoneyLog, callback: (data) => { Object.assign(vo, data); console.log(vo); @@ -162,6 +150,13 @@ const {loading, pagination, initFetchData} = useTableQuery({ :loading="loading" class="flex-grow" :columns="columns"> + + @@ -175,4 +170,36 @@ const {loading, pagination, initFetchData} = useTableQuery({ letter-spacing: 0; margin-bottom: 20px; } + +.status { + @apply flex whitespace-nowrap items-center gap-[6px]; + &::before { + content: ''; + @apply block size-[6px] rounded-[50%]; + } +} + +.success { + &::before { + @apply bg-[rgb(var(--green-6))]; + } +} + +.danger { + &::before { + @apply bg-[rgb(var(--red-6))]; + } +} + +.warning { + &::before { + @apply bg-[rgb(var(--orange-6))]; + } +} + +.primary { + &::before { + @apply bg-[rgb(var(--arcoblue-6))]; + } +}