fix: router, 佣金
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m20s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m20s
This commit is contained in:
@@ -406,6 +406,14 @@
|
|||||||
"orderList": "Order List",
|
"orderList": "Order List",
|
||||||
"orderDetail": "Order Details"
|
"orderDetail": "Order Details"
|
||||||
},
|
},
|
||||||
|
"financialManagement": {
|
||||||
|
"title": "Financial Management",
|
||||||
|
"agentRecharge": "Agent Recharge",
|
||||||
|
"agentRechargeDetail": "Agent Recharge Details",
|
||||||
|
"refundManagement": "Refund Management",
|
||||||
|
"refundDetail": "Refund Details",
|
||||||
|
"agentFundOverview": "Agent Fund Overview"
|
||||||
|
},
|
||||||
"deviceManagement": {
|
"deviceManagement": {
|
||||||
"title": "Device Management",
|
"title": "Device Management",
|
||||||
"devices": "Device Management"
|
"devices": "Device Management"
|
||||||
|
|||||||
@@ -408,13 +408,13 @@
|
|||||||
"agentRecharge": "代理充值",
|
"agentRecharge": "代理充值",
|
||||||
"agentRechargeDetail": "代理充值详情",
|
"agentRechargeDetail": "代理充值详情",
|
||||||
"refundManagement": "退款管理",
|
"refundManagement": "退款管理",
|
||||||
"refundDetail": "退款详情"
|
"refundDetail": "退款详情",
|
||||||
|
"agentFundOverview": "代理商资金概况"
|
||||||
},
|
},
|
||||||
"commission": {
|
"commission": {
|
||||||
"title": "佣金管理",
|
"title": "佣金管理",
|
||||||
"withdrawal": "提现审批",
|
"withdrawal": "提现审批",
|
||||||
"myCommission": "我的佣金",
|
"myCommission": "我的佣金"
|
||||||
"agentCommission": "代理商资金概况"
|
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"title": "设置管理",
|
"title": "设置管理",
|
||||||
|
|||||||
@@ -689,6 +689,17 @@ export const asyncRoutes: AppRouteRecord[] = [
|
|||||||
isHide: true,
|
isHide: true,
|
||||||
keepAlive: false
|
keepAlive: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 代理商资金概况
|
||||||
|
{
|
||||||
|
path: 'agent-fund-overview',
|
||||||
|
name: 'AgentFundOverview',
|
||||||
|
component: RoutesAlias.AgentFundOverviewComponent,
|
||||||
|
meta: {
|
||||||
|
title: 'menus.financialManagement.agentFundOverview',
|
||||||
|
keepAlive: true,
|
||||||
|
roles: ['R_SUPER', 'R_ADMIN']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -790,17 +801,6 @@ export const asyncRoutes: AppRouteRecord[] = [
|
|||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
roles: ['R_AGENT']
|
roles: ['R_AGENT']
|
||||||
}
|
}
|
||||||
},
|
|
||||||
// 代理商资金概况
|
|
||||||
{
|
|
||||||
path: 'agent-fund-overview',
|
|
||||||
name: 'AgentFundOverview',
|
|
||||||
component: RoutesAlias.AgentFundOverviewComponent,
|
|
||||||
meta: {
|
|
||||||
title: 'menus.commission.agentCommission',
|
|
||||||
keepAlive: true,
|
|
||||||
roles: ['R_SUPER', 'R_ADMIN']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -89,13 +89,13 @@ export enum RoutesAlias {
|
|||||||
AgentRechargeDetail = '/finance/agent-recharge/detail', // 代理充值详情
|
AgentRechargeDetail = '/finance/agent-recharge/detail', // 代理充值详情
|
||||||
RefundManagement = '/finance/refund', // 退款管理
|
RefundManagement = '/finance/refund', // 退款管理
|
||||||
RefundDetail = '/finance/refund/detail', // 退款详情
|
RefundDetail = '/finance/refund/detail', // 退款详情
|
||||||
|
AgentFundOverview = '/finance/agent-fund-overview', // 代理商资金概况
|
||||||
|
|
||||||
ExpiringAssets = '/asset-management/expiring-assets', // 临期资产
|
ExpiringAssets = '/asset-management/expiring-assets', // 临期资产
|
||||||
|
|
||||||
// 佣金管理
|
// 佣金管理
|
||||||
WithdrawalApproval = '/commission-management/withdrawal-approval', // 提现审批
|
WithdrawalApproval = '/commission-management/withdrawal-approval', // 提现审批
|
||||||
MyCommission = '/commission-management/my-commission', // 我的佣金
|
MyCommission = '/commission-management/my-commission', // 我的佣金
|
||||||
AgentFundOverview = '/commission/agent-fund-overview', // 代理商资金概况
|
|
||||||
AgentFundOverviewComponent = '/commission-management/agent-fund-overview', // 代理商资金概况组件路径
|
AgentFundOverviewComponent = '/commission-management/agent-fund-overview', // 代理商资金概况组件路径
|
||||||
|
|
||||||
// 设置管理
|
// 设置管理
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
v-permission="'my_commission:add'"
|
v-permission="'my_commission:add'"
|
||||||
>发起提现</ElButton
|
>发起提现</ElButton
|
||||||
>
|
>
|
||||||
|
<span class="available-commission">
|
||||||
|
可提现金额:<strong>{{ formatMoney(summary.available_commission) }}</strong>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</ArtTableHeader>
|
</ArtTableHeader>
|
||||||
|
|
||||||
@@ -400,21 +403,25 @@
|
|||||||
{
|
{
|
||||||
prop: 'iccid',
|
prop: 'iccid',
|
||||||
label: 'ICCID',
|
label: 'ICCID',
|
||||||
|
width: 160,
|
||||||
formatter: (row: ShopCommissionRecordItem) => row.iccid || '-'
|
formatter: (row: ShopCommissionRecordItem) => row.iccid || '-'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'virtual_no',
|
prop: 'virtual_no',
|
||||||
label: '虚拟号',
|
label: '虚拟号',
|
||||||
|
width: 160,
|
||||||
formatter: (row: ShopCommissionRecordItem) => row.virtual_no || '-'
|
formatter: (row: ShopCommissionRecordItem) => row.virtual_no || '-'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'order_no',
|
prop: 'order_no',
|
||||||
label: '订单号',
|
label: '订单号',
|
||||||
|
width: 220,
|
||||||
formatter: (row: ShopCommissionRecordItem) => row.order_no || '-'
|
formatter: (row: ShopCommissionRecordItem) => row.order_no || '-'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'seller_shop_name',
|
prop: 'seller_shop_name',
|
||||||
label: '卖家店铺',
|
label: '卖家店铺',
|
||||||
|
width: 120,
|
||||||
formatter: (row: ShopCommissionRecordItem) => row.seller_shop_name || '-'
|
formatter: (row: ShopCommissionRecordItem) => row.seller_shop_name || '-'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -557,7 +564,6 @@
|
|||||||
|
|
||||||
// 列配置
|
// 列配置
|
||||||
const withdrawalColumnOptions = [
|
const withdrawalColumnOptions = [
|
||||||
{ label: 'ID', prop: 'id' },
|
|
||||||
{ label: '提现单号', prop: 'withdrawal_no' },
|
{ label: '提现单号', prop: 'withdrawal_no' },
|
||||||
{ label: '金额', prop: 'amount' },
|
{ label: '金额', prop: 'amount' },
|
||||||
{ label: '手续费', prop: 'fee' },
|
{ label: '手续费', prop: 'fee' },
|
||||||
@@ -574,11 +580,6 @@
|
|||||||
// 动态列配置
|
// 动态列配置
|
||||||
const { columnChecks: withdrawalColumnChecks, columns: withdrawalColumns } = useCheckedColumns(
|
const { columnChecks: withdrawalColumnChecks, columns: withdrawalColumns } = useCheckedColumns(
|
||||||
() => [
|
() => [
|
||||||
{
|
|
||||||
prop: 'id',
|
|
||||||
label: 'ID',
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'withdrawal_no',
|
prop: 'withdrawal_no',
|
||||||
label: '提现单号',
|
label: '提现单号',
|
||||||
@@ -899,3 +900,24 @@
|
|||||||
getCommissionList()
|
getCommissionList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.available-commission {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 5px 12px;
|
||||||
|
margin-left: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
background: var(--el-color-primary-light-9);
|
||||||
|
border: 1px solid var(--el-color-primary-light-5);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
margin-left: 2px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
:pageSize="pagination.pageSize"
|
:pageSize="pagination.pageSize"
|
||||||
:total="pagination.total"
|
:total="pagination.total"
|
||||||
:marginTop="10"
|
:marginTop="10"
|
||||||
|
:actions="getActions"
|
||||||
|
:inlineActionsCount="1"
|
||||||
|
:actionsWidth="160"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
@@ -83,7 +86,6 @@
|
|||||||
} from '@/types/api/commission'
|
} from '@/types/api/commission'
|
||||||
import type { SearchFormItem } from '@/types'
|
import type { SearchFormItem } from '@/types'
|
||||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||||
import ArtButtonTable from '@/components/core/forms/ArtButtonTable.vue'
|
|
||||||
import { formatDateTime, formatMoney } from '@/utils/business/format'
|
import { formatDateTime, formatMoney } from '@/utils/business/format'
|
||||||
import { WithdrawalStatusMap, WithdrawalMethodMap } from '@/config/constants'
|
import { WithdrawalStatusMap, WithdrawalMethodMap } from '@/config/constants'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
@@ -192,8 +194,7 @@
|
|||||||
{ label: '提现方式', prop: 'withdrawal_method' },
|
{ label: '提现方式', prop: 'withdrawal_method' },
|
||||||
{ label: '状态', prop: 'status' },
|
{ label: '状态', prop: 'status' },
|
||||||
{ label: '申请时间', prop: 'created_at' },
|
{ label: '申请时间', prop: 'created_at' },
|
||||||
{ label: '审批时间', prop: 'processed_at' },
|
{ label: '审批时间', prop: 'processed_at' }
|
||||||
{ label: '操作', prop: 'operation' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const rejectFormRef = ref<FormInstance>()
|
const rejectFormRef = ref<FormInstance>()
|
||||||
@@ -277,30 +278,6 @@
|
|||||||
label: '审批时间',
|
label: '审批时间',
|
||||||
width: 180,
|
width: 180,
|
||||||
formatter: (row: WithdrawalRequestItem) => formatDateTime(row.processed_at)
|
formatter: (row: WithdrawalRequestItem) => formatDateTime(row.processed_at)
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'operation',
|
|
||||||
label: '操作',
|
|
||||||
width: 150,
|
|
||||||
fixed: 'right',
|
|
||||||
formatter: (row: WithdrawalRequestItem) => {
|
|
||||||
// 只有待审核状态才显示操作按钮
|
|
||||||
if (row.status === 1) {
|
|
||||||
return h('div', { style: 'display: flex; gap: 8px;' }, [
|
|
||||||
h(ArtButtonTable, {
|
|
||||||
text: '审批通过',
|
|
||||||
iconColor: '#67C23A',
|
|
||||||
onClick: () => handleApprove(row)
|
|
||||||
}),
|
|
||||||
h(ArtButtonTable, {
|
|
||||||
text: '拒绝',
|
|
||||||
iconColor: '#F56C6C',
|
|
||||||
onClick: () => showRejectDialog(row)
|
|
||||||
})
|
|
||||||
])
|
|
||||||
}
|
|
||||||
return '-'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -443,6 +420,24 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取操作按钮,使用 ArtTable 统一的文字操作样式
|
||||||
|
const getActions = (row: WithdrawalRequestItem) => {
|
||||||
|
if (row.status !== 1) return []
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '审批通过',
|
||||||
|
handler: () => handleApprove(row),
|
||||||
|
type: 'primary' as const
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '拒绝',
|
||||||
|
handler: () => showRejectDialog(row),
|
||||||
|
type: 'danger' as const
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user