From d822b7b8570e7448657a1afb0efde2c25f657715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 24 Oct 2025 11:34:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(shop):=20=E6=96=B0=E5=A2=9E=E5=88=86?= =?UTF-8?q?=E9=94=80=E5=95=86=E6=8F=90=E7=8E=B0=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 shopDealerWithdraw 模型中增加用户真实姓名、昵称、手机号、头像字段- 增加微信账号和姓名字段用于微信提现- 添加支付凭证图片和备注字段以支持打款记录 - 修改 auditTime 类型为 any以适配多种时间格式 - 新增 shopDealerWithdraw 页面及组件实现提现申请的增删改查 - 实现提现申请的状态管理(待审核、审核通过、驳回、已打款)- 支持根据不同打款方式(微信、支付宝、银行卡)展示相应信息 - 添加提现记录的导入功能组件 - 实现提现申请的批量删除与状态更新操作 - 增加表格列显示用户信息、收款信息、创建时间等关键数据 - 提供编辑弹窗用于查看和修改提现申请详情 - 引入搜索组件优化提现记录筛选体验 --- .../shop/shopDealerWithdraw/model/index.ts | 18 +- src/views/sdy/shopDealerCapital/index.vue | 6 + .../sdy/shopDealerOrder/components/search.vue | 22 - .../shopDealerWithdraw/components/Import.vue | 83 ++ .../shopDealerWithdraw/components/search.vue | 106 +++ .../components/shopDealerWithdrawEdit.vue | 682 ++++++++++++++ src/views/sdy/shopDealerWithdraw/index.vue | 439 +++++++++ src/views/sdy/user/components/org-select.vue | 39 - src/views/sdy/user/components/search.vue | 42 - src/views/sdy/user/components/status-test.vue | 65 -- src/views/sdy/user/components/user-edit.vue | 312 ------- src/views/sdy/user/components/user-import.vue | 88 -- src/views/sdy/user/index.vue | 603 ------------ .../shopDealerApply/components/search.vue | 86 +- .../components/shopDealerApplyEdit.vue | 364 ++++++-- src/views/shop/shopDealerApply/index.vue | 172 ++-- .../shopDealerOrder/components/Import.vue | 98 +- .../shopDealerOrder/components/search.vue | 312 +++---- .../components/shopDealerOrderEdit.vue | 542 +++++------ src/views/shop/shopDealerOrder/index.vue | 267 +++--- .../components/RefereeTree.vue | 205 ++++ .../shopDealerReferee/components/search.vue | 133 ++- .../components/shopDealerRefereeEdit.vue | 42 +- src/views/shop/shopDealerReferee/index.vue | 223 +++-- .../shop/shopDealerUser/components/search.vue | 387 ++++---- .../components/shopDealerApplyEdit.vue | 407 ++++++++ src/views/shop/shopDealerUser/index.vue | 370 +++++--- .../shopDealerWithdraw/components/Import.vue | 83 ++ .../shopDealerWithdraw/components/search.vue | 130 ++- .../components/shopDealerWithdrawEdit.vue | 880 +++++++++--------- src/views/shop/shopDealerWithdraw/index.vue | 841 ++++++++--------- .../system/userVerify/components/search.vue | 4 - src/views/system/userVerify/index.vue | 3 - 33 files changed, 4475 insertions(+), 3579 deletions(-) create mode 100644 src/views/sdy/shopDealerWithdraw/components/Import.vue create mode 100644 src/views/sdy/shopDealerWithdraw/components/search.vue create mode 100644 src/views/sdy/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue create mode 100644 src/views/sdy/shopDealerWithdraw/index.vue delete mode 100644 src/views/sdy/user/components/org-select.vue delete mode 100644 src/views/sdy/user/components/search.vue delete mode 100644 src/views/sdy/user/components/status-test.vue delete mode 100644 src/views/sdy/user/components/user-edit.vue delete mode 100644 src/views/sdy/user/components/user-import.vue delete mode 100644 src/views/sdy/user/index.vue create mode 100644 src/views/shop/shopDealerReferee/components/RefereeTree.vue create mode 100644 src/views/shop/shopDealerUser/components/shopDealerApplyEdit.vue create mode 100644 src/views/shop/shopDealerWithdraw/components/Import.vue diff --git a/src/api/shop/shopDealerWithdraw/model/index.ts b/src/api/shop/shopDealerWithdraw/model/index.ts index 6a2e492..9b4456c 100644 --- a/src/api/shop/shopDealerWithdraw/model/index.ts +++ b/src/api/shop/shopDealerWithdraw/model/index.ts @@ -8,6 +8,14 @@ export interface ShopDealerWithdraw { id?: number; // 分销商用户ID userId?: number; + // 真实姓名 + realName?: string; + // 昵称 + nickname?: string; + // 手机号码 + phone?: string; + // 头像 + avatar?: string; // 提现金额 money?: string; // 打款方式 (10微信 20支付宝 30银行卡) @@ -16,6 +24,10 @@ export interface ShopDealerWithdraw { alipayName?: string; // 支付宝账号 alipayAccount?: string; + // 微信姓名 + wechatAccount?: string; + // 微信账号 + wechatName?: string; // 开户行名称 bankName?: string; // 银行开户名 @@ -25,11 +37,15 @@ export interface ShopDealerWithdraw { // 申请状态 (10待审核 20审核通过 30驳回 40已打款) applyStatus?: number; // 审核时间 - auditTime?: number; + auditTime?: any; // 驳回原因 rejectReason?: string; // 来源客户端(APP、H5、小程序等) platform?: string; + // 上传支付凭证 + image?: string; + // 备注 + comments?: string; // 租户id tenantId?: number; // 创建时间 diff --git a/src/views/sdy/shopDealerCapital/index.vue b/src/views/sdy/shopDealerCapital/index.vue index ebe174d..737b624 100644 --- a/src/views/sdy/shopDealerCapital/index.vue +++ b/src/views/sdy/shopDealerCapital/index.vue @@ -186,6 +186,12 @@ ellipsis: true, customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd') }, + { + title: '修改时间', + dataIndex: 'updateTime', + key: 'updateTime', + align: 'center', + }, { title: '操作', key: 'action', diff --git a/src/views/sdy/shopDealerOrder/components/search.vue b/src/views/sdy/shopDealerOrder/components/search.vue index 6e636e0..5e7e5b2 100644 --- a/src/views/sdy/shopDealerOrder/components/search.vue +++ b/src/views/sdy/shopDealerOrder/components/search.vue @@ -182,25 +182,3 @@ const openImport = () => { showImport.value = true; }; - - diff --git a/src/views/sdy/shopDealerWithdraw/components/Import.vue b/src/views/sdy/shopDealerWithdraw/components/Import.vue new file mode 100644 index 0000000..d9b9e45 --- /dev/null +++ b/src/views/sdy/shopDealerWithdraw/components/Import.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/sdy/shopDealerWithdraw/components/search.vue b/src/views/sdy/shopDealerWithdraw/components/search.vue new file mode 100644 index 0000000..7d7eb7a --- /dev/null +++ b/src/views/sdy/shopDealerWithdraw/components/search.vue @@ -0,0 +1,106 @@ + + + diff --git a/src/views/sdy/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue b/src/views/sdy/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue new file mode 100644 index 0000000..f8f0076 --- /dev/null +++ b/src/views/sdy/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue @@ -0,0 +1,682 @@ + + + + + + diff --git a/src/views/sdy/shopDealerWithdraw/index.vue b/src/views/sdy/shopDealerWithdraw/index.vue new file mode 100644 index 0000000..9a5a349 --- /dev/null +++ b/src/views/sdy/shopDealerWithdraw/index.vue @@ -0,0 +1,439 @@ + + + + + + + diff --git a/src/views/sdy/user/components/org-select.vue b/src/views/sdy/user/components/org-select.vue deleted file mode 100644 index 587424f..0000000 --- a/src/views/sdy/user/components/org-select.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - diff --git a/src/views/sdy/user/components/search.vue b/src/views/sdy/user/components/search.vue deleted file mode 100644 index 82fea9d..0000000 --- a/src/views/sdy/user/components/search.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - diff --git a/src/views/sdy/user/components/status-test.vue b/src/views/sdy/user/components/status-test.vue deleted file mode 100644 index 714e427..0000000 --- a/src/views/sdy/user/components/status-test.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - diff --git a/src/views/sdy/user/components/user-edit.vue b/src/views/sdy/user/components/user-edit.vue deleted file mode 100644 index 195eb48..0000000 --- a/src/views/sdy/user/components/user-edit.vue +++ /dev/null @@ -1,312 +0,0 @@ - - - - diff --git a/src/views/sdy/user/components/user-import.vue b/src/views/sdy/user/components/user-import.vue deleted file mode 100644 index 2274410..0000000 --- a/src/views/sdy/user/components/user-import.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - diff --git a/src/views/sdy/user/index.vue b/src/views/sdy/user/index.vue deleted file mode 100644 index d2c6379..0000000 --- a/src/views/sdy/user/index.vue +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - - - diff --git a/src/views/shop/shopDealerApply/components/search.vue b/src/views/shop/shopDealerApply/components/search.vue index 3a97655..11d042a 100644 --- a/src/views/shop/shopDealerApply/components/search.vue +++ b/src/views/shop/shopDealerApply/components/search.vue @@ -8,36 +8,24 @@ class="search-form" @finish="handleSearch" > - + - + - - - 需要审核 - 免审核 - - - - 待审核 - 审核通过 - 审核驳回 + 跟进中 + 已签约 + 已取消 - + - - -
- - - - - - - - - - 批量通过 - - - - 导出数据 - - -
diff --git a/src/views/shop/shopDealerOrder/components/Import.vue b/src/views/shop/shopDealerOrder/components/Import.vue index 0b81392..d9b9e45 100644 --- a/src/views/shop/shopDealerOrder/components/Import.vue +++ b/src/views/shop/shopDealerOrder/components/Import.vue @@ -15,65 +15,69 @@ style="padding: 24px 0; margin-bottom: 16px" >

- +

将文件拖到此处,或点击上传

+
+
1、必须按导入模版的格式上传
+
2、导入成功确认结算完成佣金的发放
+
diff --git a/src/views/shop/shopDealerOrder/components/search.vue b/src/views/shop/shopDealerOrder/components/search.vue index 5bd12df..5e7e5b2 100644 --- a/src/views/shop/shopDealerOrder/components/search.vue +++ b/src/views/shop/shopDealerOrder/components/search.vue @@ -1,196 +1,184 @@ - - diff --git a/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue b/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue index e550eca..389b73b 100644 --- a/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue +++ b/src/views/shop/shopDealerOrder/components/shopDealerOrderEdit.vue @@ -5,9 +5,10 @@ :visible="visible" :maskClosable="false" :maxable="maxable" - :title="isUpdate ? '编辑分销订单记录' : '添加分销订单记录'" + :title="isUpdate ? '分销订单' : '分销订单'" :body-style="{ paddingBottom: '28px' }" @update:visible="updateVisible" + :okText="`立即结算`" @ok="save" > - 订单基本信息 + 基本信息 - - + + {{ form.title }} - - + + {{ form.orderNo }} + + + + + {{ parseFloat(form.orderPrice || 0).toFixed(2) }} + + + + + {{ parseFloat(form.degreePrice || 0).toFixed(2) }} + + + + + {{ form.rate }} + + + + + {{ form.price }} + + + + + {{ parseFloat(form.settledPrice || 0).toFixed(2) }} + + + + + {{ parseFloat(form.payPrice || 0).toFixed(2) }} - - - - - - - +
开发调试
+
+
业务员({{ form.userId }}):{{ form.nickname }}
+
一级分销商({{ form.firstUserId }}):{{ form.firstNickname }},一级佣金30%:{{ form.firstMoney }}
+
二级分销商({{ form.secondUserId }}):{{ form.secondNickname }},二级佣金10%:{{ form.secondMoney }}
+
三级分销商({{ form.thirdUserId }}):{{ form.thirdNickname }},三级佣金60%:{{ form.thirdMoney }}
+
- 分销商信息 + 收益计算

- 一级分销商 + 一级佣金30%

- + {{ form.firstUserId }} + + + {{ form.firstNickname }} - - - - + + {{ '30%' }} + + + {{ form.firstMoney }} @@ -97,327 +105,213 @@

- 二级分销商 + 二级佣金10%

- + {{ form.secondUserId }} + + + {{ form.secondNickname }} - - - - + + 10% + + + {{ form.secondMoney }}
-
+

- 三级分销商 + 三级佣金60%

- + {{ form.thirdUserId }} + + + {{ form.thirdNickname }} - - - - + + {{ '60%' }} + + + {{ form.thirdMoney }}
- - - 状态信息 - - - - - - - 有效 - 失效 - - - - - - - 未结算 - 已结算 - - - - - - + {{ form.settleTime }} + \ No newline at end of file diff --git a/src/views/shop/shopDealerReferee/components/search.vue b/src/views/shop/shopDealerReferee/components/search.vue index b41c7a5..b848c3e 100644 --- a/src/views/shop/shopDealerReferee/components/search.vue +++ b/src/views/shop/shopDealerReferee/components/search.vue @@ -1,90 +1,81 @@ + + diff --git a/src/views/shop/shopDealerUser/components/shopDealerApplyEdit.vue b/src/views/shop/shopDealerUser/components/shopDealerApplyEdit.vue new file mode 100644 index 0000000..bad4d1f --- /dev/null +++ b/src/views/shop/shopDealerUser/components/shopDealerApplyEdit.vue @@ -0,0 +1,407 @@ + + + + + + diff --git a/src/views/shop/shopDealerUser/index.vue b/src/views/shop/shopDealerUser/index.vue index 4cb4efa..2b1454a 100644 --- a/src/views/shop/shopDealerUser/index.vue +++ b/src/views/shop/shopDealerUser/index.vue @@ -3,7 +3,7 @@ @@ -61,33 +70,37 @@ import {createVNode, ref} from 'vue'; import {message, Modal} from 'ant-design-vue'; import { ExclamationCircleOutlined, + CheckOutlined, + CloseOutlined, EditOutlined, - EyeOutlined, DeleteOutlined } from '@ant-design/icons-vue'; import type {EleProTable} from 'ele-admin-pro'; -import {toDateString} from 'ele-admin-pro'; import type { DatasourceFunction, ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types'; import Search from './components/search.vue'; import {getPageTitle} from '@/utils/common'; -import ShopDealerUserEdit from './components/shopDealerUserEdit.vue'; -import {pageShopDealerUser, removeShopDealerUser, removeBatchShopDealerUser} from '@/api/shop/shopDealerUser'; -import type {ShopDealerUser, ShopDealerUserParam} from '@/api/shop/shopDealerUser/model'; +import ShopDealerApplyEdit from './components/shopDealerApplyEdit.vue'; +import { + pageShopDealerApply, + removeShopDealerApply, + removeBatchShopDealerApply, + batchApproveShopDealerApply, + updateShopDealerApply +} from '@/api/shop/shopDealerApply'; +import type {ShopDealerApply, ShopDealerApplyParam} from '@/api/shop/shopDealerApply/model'; // 表格实例 const tableRef = ref | null>(null); // 表格选中数据 -const selection = ref([]); +const selection = ref([]); // 当前编辑数据 -const current = ref(null); +const current = ref(null); // 是否显示编辑弹窗 const showEdit = ref(false); -// 是否显示批量移动弹窗 -const showMove = ref(false); // 加载状态 const loading = ref(true); @@ -102,7 +115,9 @@ const datasource: DatasourceFunction = ({ if (filters) { where.status = filters.status; } - return pageShopDealerUser({ + where.type = 4; + where.applyStatus = 20; + return pageShopDealerApply({ ...where, ...orders, page, @@ -113,47 +128,43 @@ const datasource: DatasourceFunction = ({ // 表格列配置 const columns = ref([ { - title: '用户ID', - dataIndex: 'userId', - key: 'userId', + title: 'ID', + dataIndex: 'applyId', + key: 'applyId', align: 'center', width: 80, fixed: 'left' }, { - title: '用户信息', - key: 'userInfo', + title: '申请人信息', + key: 'applicantInfo', align: 'left', - width: 200, fixed: 'left', customRender: ({record}) => { - return `${record.realName || ''} (${record.mobile || ''})`; + return `${record.realName || '-'} (${record.mobile || '-'})`; } }, { - title: '佣金统计', - key: 'commissionStats', + title: '申请方式', + dataIndex: 'applyType', + key: 'applyType', align: 'center', - width: 180, - customRender: ({record}) => { - const available = parseFloat(record.money || '0').toFixed(2); - const frozen = parseFloat(record.freezeMoney || '0').toFixed(2); - const total = parseFloat(record.totalMoney || '0').toFixed(2); - return `可提现: ¥${available} | 冻结: ¥${frozen} | 累计: ¥${total}`; + width: 120, + customRender: ({text}) => { + const typeMap = { + 10: {text: '需审核', color: 'orange'}, + 20: {text: '免审核', color: 'green'} + }; + const type = typeMap[text] || {text: '未知', color: 'default'}; + return {type: 'tag', props: {color: type.color}, children: type.text}; } }, { - title: '团队统计', - key: 'teamStats', + title: '审核状态', + dataIndex: 'applyStatus', + key: 'applyStatus', align: 'center', - width: 150, - customRender: ({record}) => { - const first = record.firstNum || 0; - const second = record.secondNum || 0; - const third = record.thirdNum || 0; - const total = first + second + third; - return `总计: ${total} (${first}/${second}/${third})`; - } + width: 120 }, { title: '推荐人', @@ -163,111 +174,139 @@ const columns = ref([ width: 100, customRender: ({text}) => text ? `ID: ${text}` : '无' }, + // { + // title: '申请时间', + // dataIndex: 'applyTime', + // key: 'applyTime', + // align: 'center', + // width: 120, + // customRender: ({ text }) => text ? toDateString(new Date(text), 'yyyy-MM-dd HH:mm') : '-' + // }, + // { + // title: '审核时间', + // dataIndex: 'auditTime', + // key: 'auditTime', + // align: 'center', + // customRender: ({ text }) => text ? toDateString(new Date(text), 'yyyy-MM-dd HH:mm') : '-' + // }, { - title: '专属二维码', - dataIndex: 'qrcode', - key: 'qrcode', - align: 'center', - width: 120, - customRender: ({text}) => { - return text ? '已生成' : '未生成'; - } - }, - { - title: '状态', - key: 'userStatus', - align: 'center', - width: 100, - customRender: ({record}) => { - if (record.isDelete === 1) { - return {type: 'tag', props: {color: 'red'}, children: '已删除'}; - } - return {type: 'tag', props: {color: 'green'}, children: '正常'}; - } + title: '驳回原因', + dataIndex: 'rejectReason', + key: 'rejectReason', + align: 'left', + ellipsis: true, + customRender: ({text}) => text || '-' }, { title: '创建时间', dataIndex: 'createTime', key: 'createTime', align: 'center', - width: 120, sorter: true, - ellipsis: true, - customRender: ({text}) => text ? toDateString(text, 'yyyy-MM-dd') : '-' + ellipsis: true }, { title: '操作', key: 'action', - width: 220, fixed: 'right', align: 'center', + width: 380, hideInSetting: true } ]); /* 搜索 */ -const reload = (where?: ShopDealerUserParam) => { +const reload = (where?: ShopDealerApplyParam) => { selection.value = []; tableRef?.value?.reload({where: where}); }; +/* 审核通过 */ +const approveApply = (row: ShopDealerApply) => { + Modal.confirm({ + title: '审核通过确认', + content: `确定要通过 ${row.realName} 的经销商申请吗?`, + icon: createVNode(CheckOutlined), + okText: '确认通过', + okType: 'primary', + cancelText: '取消', + onOk: async () => { + const hide = message.loading('正在处理审核...', 0); + try { + await updateShopDealerApply({ + ...row, + applyId: row.applyId, + applyStatus: 20 + }); + hide(); + message.success('审核通过成功'); + reload(); + } catch (error: any) { + hide(); + message.error(error.message || '审核失败,请重试'); + } + } + }); +}; + +/* 审核驳回 */ +const rejectApply = (row: ShopDealerApply) => { + let rejectReason = ''; + Modal.confirm({ + title: '审核驳回', + content: createVNode('div', null, [ + createVNode('p', null, `申请人: ${row.realName} (${row.mobile})`), + createVNode('p', {style: 'margin-top: 12px;'}, '请输入驳回原因:'), + createVNode('textarea', { + placeholder: '请输入驳回原因...', + style: 'width: 100%; height: 80px; margin-top: 8px; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px;', + onInput: (e: any) => { + rejectReason = e.target.value; + } + }) + ]), + icon: createVNode(CloseOutlined), + okText: '确认驳回', + okType: 'danger', + cancelText: '取消', + onOk: async () => { + if (!rejectReason.trim()) { + message.error('请输入驳回原因'); + return Promise.reject(); + } + const hide = message.loading('正在处理审核...', 0); + try { + await updateShopDealerApply({ + ...row, + applyStatus: 30, + rejectReason: rejectReason.trim() + }); + hide(); + message.success('审核驳回成功'); + reload(); + } catch (error: any) { + hide(); + message.error(error.message || '审核失败,请重试'); + } + } + }); +}; + /* 打开编辑弹窗 */ -const openEdit = (row?: ShopDealerUser) => { +const openEdit = (row?: ShopDealerApply) => { current.value = row ?? null; showEdit.value = true; }; -/* 查看详情 */ -const viewDetail = (row: ShopDealerUser) => { - 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, `姓名: ${row.realName || '-'}`), - createVNode('p', null, `手机号: ${row.mobile || '-'}`), - createVNode('p', null, `用户ID: ${row.userId || '-'}`), - createVNode('p', null, `推荐人ID: ${row.refereeId || '无'}`), - ]), - createVNode('div', {class: 'detail-item', style: 'margin-top: 16px;'}, [ - createVNode('strong', null, '佣金信息'), - createVNode('p', null, `可提现佣金: ¥${parseFloat(row.money || '0').toFixed(2)}`), - createVNode('p', null, `冻结佣金: ¥${parseFloat(row.freezeMoney || '0').toFixed(2)}`), - createVNode('p', null, `累计提现: ¥${parseFloat(row.totalMoney || '0').toFixed(2)}`), - ]), - createVNode('div', {class: 'detail-item', style: 'margin-top: 16px;'}, [ - createVNode('strong', null, '团队信息'), - createVNode('p', null, `一级成员: ${row.firstNum || 0} 人`), - createVNode('p', null, `二级成员: ${row.secondNum || 0} 人`), - createVNode('p', null, `三级成员: ${row.thirdNum || 0} 人`), - createVNode('p', null, `团队总数: ${(row.firstNum || 0) + (row.secondNum || 0) + (row.thirdNum || 0)} 人`), - ]), - createVNode('div', {class: 'detail-item', style: 'margin-top: 16px;'}, [ - createVNode('strong', null, '其他信息'), - createVNode('p', null, `专属二维码: ${row.qrcode ? '已生成' : '未生成'}`), - 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 openMove = () => { - showMove.value = true; -}; - /* 删除单个 */ -const remove = (row: ShopDealerUser) => { - if (!row.id) { +const remove = (row: ShopDealerApply) => { + if (!row.applyId) { message.error('删除失败:缺少必要参数'); return; } - const hide = message.loading('正在删除分销商用户...', 0); - removeShopDealerUser(row.id) + const hide = message.loading('正在删除申请记录...', 0); + removeShopDealerApply(row.applyId) .then((msg) => { hide(); message.success(msg || '删除成功'); @@ -286,7 +325,7 @@ const removeBatch = () => { return; } - const validIds = selection.value.filter(d => d.id).map(d => d.id); + const validIds = selection.value.filter(d => d.applyId).map(d => d.applyId); if (!validIds.length) { message.error('选中的数据中没有有效的ID'); return; @@ -294,7 +333,7 @@ const removeBatch = () => { Modal.confirm({ title: '批量删除确认', - content: `确定要删除选中的 ${validIds.length} 条分销商用户记录吗?此操作不可恢复。`, + content: `确定要删除选中的 ${validIds.length} 条申请记录吗?此操作不可恢复。`, icon: createVNode(ExclamationCircleOutlined), maskClosable: true, okText: '确认删除', @@ -302,7 +341,7 @@ const removeBatch = () => { cancelText: '取消', onOk: () => { const hide = message.loading(`正在删除 ${validIds.length} 条记录...`, 0); - removeBatchShopDealerUser(validIds) + removeBatchShopDealerApply(validIds) .then((msg) => { hide(); message.success(msg || `成功删除 ${validIds.length} 条记录`); @@ -317,13 +356,60 @@ const removeBatch = () => { }); }; +/* 批量通过 */ +const batchApprove = () => { + if (!selection.value.length) { + message.error('请至少选择一条数据'); + return; + } + + const pendingApplies = selection.value.filter(item => item.applyStatus === 10); + if (!pendingApplies.length) { + message.error('所选申请中没有待审核的记录'); + return; + } + + Modal.confirm({ + title: '批量通过确认', + content: `确定要通过选中的 ${pendingApplies.length} 个申请吗?`, + icon: createVNode(ExclamationCircleOutlined), + okText: '确认通过', + okType: 'primary', + cancelText: '取消', + onOk: async () => { + const hide = message.loading('正在批量通过...', 0); + try { + const ids = pendingApplies.map(item => item.applyId); + await batchApproveShopDealerApply(ids); + hide(); + message.success(`成功通过 ${pendingApplies.length} 个申请`); + selection.value = []; + reload(); + } catch (error: any) { + hide(); + message.error(error.message || '批量审核失败,请重试'); + } + } + }); +}; + +/* 导出数据 */ +const exportData = () => { + const hide = message.loading('正在导出申请数据...', 0); + // 这里调用导出API + setTimeout(() => { + hide(); + message.success('申请数据导出成功'); + }, 2000); +}; + /* 查询 */ const query = () => { loading.value = true; }; /* 自定义行属性 */ -const customRow = (record: ShopDealerUser) => { +const customRow = (record: ShopDealerApply) => { return { // 行点击事件 onClick: () => { @@ -340,7 +426,7 @@ query(); @@ -384,6 +470,22 @@ export default { } } +.ele-text-success { + color: #52c41a; + + &:hover { + color: #73d13d; + } +} + +.ele-text-warning { + color: #faad14; + + &:hover { + color: #ffc53d; + } +} + .ele-text-danger { color: #ff4d4f; diff --git a/src/views/shop/shopDealerWithdraw/components/Import.vue b/src/views/shop/shopDealerWithdraw/components/Import.vue new file mode 100644 index 0000000..d9b9e45 --- /dev/null +++ b/src/views/shop/shopDealerWithdraw/components/Import.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/shop/shopDealerWithdraw/components/search.vue b/src/views/shop/shopDealerWithdraw/components/search.vue index 82fea9d..7d7eb7a 100644 --- a/src/views/shop/shopDealerWithdraw/components/search.vue +++ b/src/views/shop/shopDealerWithdraw/components/search.vue @@ -1,42 +1,106 @@ - diff --git a/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue b/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue index 72b26e0..f8f0076 100644 --- a/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue +++ b/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue @@ -21,77 +21,10 @@ 基本信息 - - - - - - - - - - - - - - - - - - - -
- APP - 移动应用 -
-
- -
- H5 - 手机网页 -
-
- -
- 小程序 - 微信小程序 -
-
- -
- PC - 电脑网页 -
-
-
-
-
- - - - - 微信 - - - 支付宝 - - - 银行卡 - - + +
{{ form.comments }}
@@ -138,6 +71,7 @@ @@ -146,6 +80,7 @@ @@ -165,28 +100,16 @@ - + {{ form.bankName }} - - - + {{ form.bankAccount }} + + + {{ form.bankCard }} - - -
@@ -197,10 +120,11 @@ - +
- 待审核 + 待审核 等待审核
@@ -218,35 +142,37 @@
- 已打款 + 已打款 已完成打款
+
+ - - + + + + - - - -
diff --git a/src/views/system/userVerify/components/search.vue b/src/views/system/userVerify/components/search.vue index 4194d41..eb24f22 100644 --- a/src/views/system/userVerify/components/search.vue +++ b/src/views/system/userVerify/components/search.vue @@ -7,10 +7,6 @@ - - 个人 - 企业 - -