diff --git a/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue b/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue index 72b26e0..55a5930 100644 --- a/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue +++ b/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue @@ -22,76 +22,83 @@ 基本信息 - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - -
- APP - 移动应用 -
-
- -
- H5 - 手机网页 -
-
- -
- 小程序 - 微信小程序 -
-
- -
- PC - 电脑网页 -
-
-
-
-
- - - - - 微信 - - - 支付宝 - - - 银行卡 - - + +
{{ form.comments }}
@@ -138,6 +145,7 @@ @@ -146,6 +154,7 @@ @@ -165,28 +174,26 @@ - + {{ form.bankName }} + + + + + - - - + {{ form.bankAccount }} + + + + + + + + {{ form.bankCard }} - - - @@ -225,16 +232,16 @@ - - - - - + + + + + + + + + + @@ -313,6 +320,7 @@ auditTime: undefined, rejectReason: '', platform: '', + comments: '', tenantId: undefined, createTime: undefined, updateTime: undefined diff --git a/src/views/shop/shopDealerWithdraw/index.vue b/src/views/shop/shopDealerWithdraw/index.vue index 5a485d2..548e9bc 100644 --- a/src/views/shop/shopDealerWithdraw/index.vue +++ b/src/views/shop/shopDealerWithdraw/index.vue @@ -27,12 +27,7 @@ 已打款 @@ -77,7 +70,6 @@ import { message, Modal } from 'ant-design-vue'; import { ExclamationCircleOutlined, - EyeOutlined, CheckOutlined, CloseOutlined, DollarOutlined, @@ -93,7 +85,12 @@ import Search from './components/search.vue'; import {getPageTitle} from '@/utils/common'; import ShopDealerWithdrawEdit from './components/shopDealerWithdrawEdit.vue'; - import { pageShopDealerWithdraw, removeShopDealerWithdraw, removeBatchShopDealerWithdraw } from '@/api/shop/shopDealerWithdraw'; + import { + pageShopDealerWithdraw, + removeShopDealerWithdraw, + removeBatchShopDealerWithdraw, + updateShopDealerWithdraw + } from '@/api/shop/shopDealerWithdraw'; import type { ShopDealerWithdraw, ShopDealerWithdrawParam } from '@/api/shop/shopDealerWithdraw/model'; // 表格实例 @@ -228,18 +225,23 @@ // width: 100, // customRender: ({ text }) => text || '-' // }, + { + title: '备注', + dataIndex: 'comments', + key: 'comments', + }, { title: '驳回原因', dataIndex: 'rejectReason', key: 'rejectReason', align: 'center', }, - { - title: '来源客户端', - dataIndex: 'platform', - key: 'platform', - align: 'center', - }, + // { + // title: '来源客户端', + // dataIndex: 'platform', + // key: 'platform', + // align: 'center', + // }, { title: '创建时间', dataIndex: 'createTime', @@ -266,53 +268,11 @@ tableRef?.value?.reload({ where: where }); }; - /* 查看详情 */ - const viewDetail = (row: ShopDealerWithdraw) => { - Modal.info({ - title: '提现申请详情', - width: 600, - content: createVNode('div', { style: 'max-height: 400px; overflow-y: auto;' }, [ - createVNode('div', { class: 'detail-item' }, [ - createVNode('strong', null, '申请信息'), - createVNode('p', null, `申请ID: ${row.id || '-'}`), - createVNode('p', null, `用户ID: ${row.userId || '-'}`), - createVNode('p', null, `提现金额: ¥${parseFloat(row.money || '0').toFixed(2)}`), - createVNode('p', null, `来源平台: ${row.platform || '-'}`), - ]), - createVNode('div', { class: 'detail-item', style: 'margin-top: 16px;' }, [ - createVNode('strong', null, '收款信息'), - createVNode('p', null, `打款方式: ${row.payType === 10 ? '微信' : row.payType === 20 ? '支付宝' : row.payType === 30 ? '银行卡' : '未知'}`), - ...(row.payType === 20 ? [ - createVNode('p', null, `支付宝姓名: ${row.alipayName || '-'}`), - createVNode('p', null, `支付宝账号: ${row.alipayAccount || '-'}`) - ] : []), - ...(row.payType === 30 ? [ - createVNode('p', null, `开户行: ${row.bankName || '-'}`), - createVNode('p', null, `开户名: ${row.bankAccount || '-'}`), - createVNode('p', null, `银行卡号: ${row.bankCard || '-'}`) - ] : []) - ]), - createVNode('div', { class: 'detail-item', style: 'margin-top: 16px;' }, [ - createVNode('strong', null, '审核信息'), - createVNode('p', null, `申请状态: ${row.applyStatus === 10 ? '待审核' : row.applyStatus === 20 ? '审核通过' : row.applyStatus === 30 ? '已驳回' : row.applyStatus === 40 ? '已打款' : '未知'}`), - createVNode('p', null, `审核时间: ${row.auditTime ? toDateString(new Date(row.auditTime), 'yyyy-MM-dd HH:mm:ss') : '-'}`), - createVNode('p', null, `驳回原因: ${row.rejectReason || '-'}`), - ]), - createVNode('div', { class: 'detail-item', style: 'margin-top: 16px;' }, [ - createVNode('strong', null, '其他信息'), - createVNode('p', null, `创建时间: ${row.createTime ? toDateString(row.createTime, 'yyyy-MM-dd HH:mm:ss') : '-'}`), - createVNode('p', null, `更新时间: ${row.updateTime ? toDateString(row.updateTime, 'yyyy-MM-dd HH:mm:ss') : '-'}`), - ]) - ]), - okText: '关闭' - }); - }; - /* 审核通过 */ const approveWithdraw = (row: ShopDealerWithdraw) => { Modal.confirm({ title: '审核通过确认', - content: `确定要通过用户 ${row.userId} 的提现申请吗?提现金额:¥${parseFloat(row.money || '0').toFixed(2)}`, + content: `已核对信息进行核对,正确无误!`, icon: createVNode(CheckOutlined), okText: '确认通过', okType: 'primary', @@ -322,6 +282,10 @@ // 这里需要调用审核通过的API setTimeout(() => { hide(); + updateShopDealerWithdraw({ + id: row.id, + applyStatus: 20 + }); message.success('审核通过成功'); reload(); }, 1000); @@ -369,7 +333,7 @@ const confirmPayment = (row: ShopDealerWithdraw) => { Modal.confirm({ title: '确认打款', - content: `确定已向用户 ${row.userId} 打款 ¥${parseFloat(row.money || '0').toFixed(2)} 吗?此操作不可撤销。`, + content: `确定已向用户${row.bankAccount}完成打款?此操作不可撤销`, icon: createVNode(DollarOutlined), okText: '确认打款', okType: 'primary', @@ -377,6 +341,10 @@ onOk: () => { const hide = message.loading('正在确认打款...', 0); setTimeout(() => { + updateShopDealerWithdraw({ + id: row.id, + applyStatus: 40 + }) hide(); message.success('打款确认成功'); reload(); @@ -399,7 +367,7 @@ /* 删除单个 */ const remove = (row: ShopDealerWithdraw) => { const hide = message.loading('请求中..', 0); - removeShopDealerWithdraw(row.shopDealerWithdrawId) + removeShopDealerWithdraw(row.id) .then((msg) => { hide(); message.success(msg); @@ -424,7 +392,7 @@ maskClosable: true, onOk: () => { const hide = message.loading('请求中..', 0); - removeBatchShopDealerWithdraw(selection.value.map((d) => d.shopDealerWithdrawId)) + removeBatchShopDealerWithdraw(selection.value.map((d) => d.id)) .then((msg) => { hide(); message.success(msg);