Commit fb5f200cb4e3e0b12ae71a8a8f86357d6512b833
1 parent
5033c063
Refactor: 优化骑手提现审核页表格滚动与固定列样式,补充 rider.withdraw 菜单图标映射。
Showing
2 changed files
with
58 additions
and
18 deletions
src/components/AppMenuTree.vue
| @@ -33,6 +33,7 @@ import { | @@ -33,6 +33,7 @@ import { | ||
| 33 | TrophyOutlined, | 33 | TrophyOutlined, |
| 34 | UnorderedListOutlined, | 34 | UnorderedListOutlined, |
| 35 | UserOutlined, | 35 | UserOutlined, |
| 36 | + WalletOutlined, | ||
| 36 | } from '@ant-design/icons-vue' | 37 | } from '@ant-design/icons-vue' |
| 37 | 38 | ||
| 38 | withDefaults(defineProps<{ menus: MenuNode[] }>(), { | 39 | withDefaults(defineProps<{ menus: MenuNode[] }>(), { |
| @@ -53,11 +54,13 @@ const iconMap: Record<string, Component> = { | @@ -53,11 +54,13 @@ const iconMap: Record<string, Component> = { | ||
| 53 | TrophyOutlined, | 54 | TrophyOutlined, |
| 54 | SettingOutlined, | 55 | SettingOutlined, |
| 55 | MessageOutlined, | 56 | MessageOutlined, |
| 57 | + WalletOutlined, | ||
| 56 | } | 58 | } |
| 57 | 59 | ||
| 58 | const codeIconMap: Record<string, Component> = { | 60 | const codeIconMap: Record<string, Component> = { |
| 59 | 'substation.user': TeamOutlined, | 61 | 'substation.user': TeamOutlined, |
| 60 | 'rider.level': TrophyOutlined, | 62 | 'rider.level': TrophyOutlined, |
| 63 | + 'rider.withdraw': WalletOutlined, | ||
| 61 | 'system.sub_root': SettingOutlined, | 64 | 'system.sub_root': SettingOutlined, |
| 62 | 'system.sub_role': TeamOutlined, | 65 | 'system.sub_role': TeamOutlined, |
| 63 | 'system.sub_role_menu': SettingOutlined, | 66 | 'system.sub_role_menu': SettingOutlined, |
src/views/rider/RiderWithdrawAudit.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <a-card title="骑手提现审核" :bordered="false" class="list-table-card"> | 3 | <a-card title="骑手提现审核" :bordered="false" class="list-table-card"> |
| 4 | - <div class="soft-page-stack"> | 4 | + <div class="soft-page-stack withdraw-audit-stack"> |
| 5 | <div class="soft-note-card"> | 5 | <div class="soft-note-card"> |
| 6 | <strong>审核说明</strong> | 6 | <strong>审核说明</strong> |
| 7 | <p>骑手申请提现时会先冻结可用余额;审核拒绝后解冻,审核通过后进入待打款,标记已打款后扣减冻结金额并写入提现流水。</p> | 7 | <p>骑手申请提现时会先冻结可用余额;审核拒绝后解冻,审核通过后进入待打款,标记已打款后扣减冻结金额并写入提现流水。</p> |
| @@ -26,19 +26,21 @@ | @@ -26,19 +26,21 @@ | ||
| 26 | <a-select-option :value="3">已打款</a-select-option> | 26 | <a-select-option :value="3">已打款</a-select-option> |
| 27 | <a-select-option :value="4">打款失败</a-select-option> | 27 | <a-select-option :value="4">打款失败</a-select-option> |
| 28 | </a-select> | 28 | </a-select> |
| 29 | - <a-date-picker v-model:value="startDate" value-format="YYYY-MM-DD" placeholder="申请开始日期" class="list-filter" @change="handleFilterChange" /> | ||
| 30 | - <a-date-picker v-model:value="endDate" value-format="YYYY-MM-DD" placeholder="申请结束日期" class="list-filter" @change="handleFilterChange" /> | 29 | + <a-date-picker v-model:value="startDate" value-format="YYYY-MM-DD" placeholder="开始日期" class="list-filter" @change="handleFilterChange" /> |
| 30 | + <a-date-picker v-model:value="endDate" value-format="YYYY-MM-DD" placeholder="结束日期" class="list-filter" @change="handleFilterChange" /> | ||
| 31 | <a-input-search v-model:value="keyword" placeholder="搜索提现单号/骑手姓名/手机号" class="list-search" @search="handleKeywordSearch" /> | 31 | <a-input-search v-model:value="keyword" placeholder="搜索提现单号/骑手姓名/手机号" class="list-search" @search="handleKeywordSearch" /> |
| 32 | </div> | 32 | </div> |
| 33 | </div> | 33 | </div> |
| 34 | 34 | ||
| 35 | <a-table | 35 | <a-table |
| 36 | + class="withdraw-table" | ||
| 36 | :dataSource="list" | 37 | :dataSource="list" |
| 37 | :columns="columns" | 38 | :columns="columns" |
| 38 | :loading="loading" | 39 | :loading="loading" |
| 39 | rowKey="id" | 40 | rowKey="id" |
| 40 | :pagination="pagination" | 41 | :pagination="pagination" |
| 41 | - :scroll="{ x: 1500 }" | 42 | + sticky |
| 43 | + :scroll="{ x: tableScrollX, y: 560 }" | ||
| 42 | @change="handleTableChange" | 44 | @change="handleTableChange" |
| 43 | > | 45 | > |
| 44 | <template #bodyCell="{ column, record }"> | 46 | <template #bodyCell="{ column, record }"> |
| @@ -64,8 +66,8 @@ | @@ -64,8 +66,8 @@ | ||
| 64 | <a-space> | 66 | <a-space> |
| 65 | <a @click="openDetail(record)">详情</a> | 67 | <a @click="openDetail(record)">详情</a> |
| 66 | <template v-if="record.status === 0"> | 68 | <template v-if="record.status === 0"> |
| 67 | - <a @click="openAction('approve', record)" style="color:green">通过</a> | ||
| 68 | - <a @click="openAction('reject', record)" style="color:red">拒绝</a> | 69 | + <a @click="openAction('approve', record)" style="color: green">通过</a> |
| 70 | + <a @click="openAction('reject', record)" style="color: red">拒绝</a> | ||
| 69 | </template> | 71 | </template> |
| 70 | <template v-else-if="record.status === 1"> | 72 | <template v-else-if="record.status === 1"> |
| 71 | <a @click="openAction('paid', record)">标记已打款</a> | 73 | <a @click="openAction('paid', record)">标记已打款</a> |
| @@ -151,6 +153,8 @@ const keyword = ref('') | @@ -151,6 +153,8 @@ const keyword = ref('') | ||
| 151 | const actionForm = reactive({ remark: '', transferNo: '' }) | 153 | const actionForm = reactive({ remark: '', transferNo: '' }) |
| 152 | const { isAdmin, managedCityId, cityList, loadCities, getCityName } = useRoleCityList() | 154 | const { isAdmin, managedCityId, cityList, loadCities, getCityName } = useRoleCityList() |
| 153 | 155 | ||
| 156 | +const tableScrollX = computed(() => (isAdmin.value ? 1780 : 1660)) | ||
| 157 | + | ||
| 154 | const statusMap: Record<number, string> = { | 158 | const statusMap: Record<number, string> = { |
| 155 | 0: '待审核', | 159 | 0: '待审核', |
| 156 | 1: '待打款', | 160 | 1: '待打款', |
| @@ -175,19 +179,19 @@ const accountTypeMap: Record<number, string> = { | @@ -175,19 +179,19 @@ const accountTypeMap: Record<number, string> = { | ||
| 175 | 179 | ||
| 176 | const columns = computed(() => { | 180 | const columns = computed(() => { |
| 177 | const base = [ | 181 | const base = [ |
| 178 | - { title: '提现单号', dataIndex: 'withdrawNo', ellipsis: true, width: 180 }, | ||
| 179 | - { title: '骑手', dataIndex: 'riderName', width: 120 }, | ||
| 180 | - { title: '手机号', dataIndex: 'mobile', width: 130 }, | ||
| 181 | - { title: '提现金额', key: 'amount', width: 110 }, | ||
| 182 | - { title: '状态', key: 'status', width: 100 }, | ||
| 183 | - { title: '账户类型', key: 'accountType', width: 100 }, | ||
| 184 | - { title: '收款人', dataIndex: 'accountName', width: 110 }, | 182 | + { title: '提现单号', dataIndex: 'withdrawNo', ellipsis: true, width: 160 }, |
| 183 | + { title: '骑手', dataIndex: 'riderName', width: 100 }, | ||
| 184 | + { title: '手机号', dataIndex: 'mobile', width: 120 }, | ||
| 185 | + { title: '提现金额', key: 'amount', width: 100 }, | ||
| 186 | + { title: '状态', key: 'status', width: 90 }, | ||
| 187 | + { title: '账户类型', key: 'accountType', width: 90 }, | ||
| 188 | + { title: '收款人', dataIndex: 'accountName', width: 100 }, | ||
| 185 | { title: '收款账号', key: 'accountNo', width: 140 }, | 189 | { title: '收款账号', key: 'accountNo', width: 140 }, |
| 186 | - { title: '可用余额', key: 'riderBalance', width: 110 }, | ||
| 187 | - { title: '冻结余额', key: 'riderFrozenBalance', width: 110 }, | ||
| 188 | - { title: '申请时间', key: 'applyTime', width: 160 }, | ||
| 189 | - { title: '审核人', dataIndex: 'auditorName', width: 120 }, | ||
| 190 | - { title: '审核时间', key: 'auditTime', width: 160 }, | 190 | + { title: '可用余额', key: 'riderBalance', width: 100 }, |
| 191 | + { title: '冻结余额', key: 'riderFrozenBalance', width: 100 }, | ||
| 192 | + { title: '申请时间', key: 'applyTime', width: 150 }, | ||
| 193 | + { title: '审核人', dataIndex: 'auditorName', width: 100 }, | ||
| 194 | + { title: '审核时间', key: 'auditTime', width: 150 }, | ||
| 191 | { title: '操作', key: 'action', fixed: 'right', width: 180 }, | 195 | { title: '操作', key: 'action', fixed: 'right', width: 180 }, |
| 192 | ] | 196 | ] |
| 193 | return isAdmin.value ? [{ title: '租户', key: 'cityName', width: 120 }, ...base] : base | 197 | return isAdmin.value ? [{ title: '租户', key: 'cityName', width: 120 }, ...base] : base |
| @@ -322,3 +326,36 @@ onMounted(async () => { | @@ -322,3 +326,36 @@ onMounted(async () => { | ||
| 322 | await loadList() | 326 | await loadList() |
| 323 | }) | 327 | }) |
| 324 | </script> | 328 | </script> |
| 329 | + | ||
| 330 | +<style scoped> | ||
| 331 | +.withdraw-audit-stack, | ||
| 332 | +.withdraw-table { | ||
| 333 | + min-width: 0; | ||
| 334 | +} | ||
| 335 | + | ||
| 336 | +.withdraw-table { | ||
| 337 | + --withdraw-fixed-bg: #fff; | ||
| 338 | + --withdraw-fixed-hover-bg: #e6e2fc; | ||
| 339 | +} | ||
| 340 | + | ||
| 341 | +.withdraw-table :deep(.ant-table-cell-fix-right) { | ||
| 342 | + background: var(--withdraw-fixed-bg) !important; | ||
| 343 | +} | ||
| 344 | + | ||
| 345 | +.withdraw-table :deep(.ant-table-tbody > tr:hover > td.ant-table-cell-fix-right) { | ||
| 346 | + background: var(--withdraw-fixed-hover-bg) !important; | ||
| 347 | +} | ||
| 348 | + | ||
| 349 | +:global(.dark) .withdraw-table { | ||
| 350 | + --withdraw-fixed-bg: rgb(40, 36, 60); | ||
| 351 | + --withdraw-fixed-hover-bg: #302c45; | ||
| 352 | +} | ||
| 353 | + | ||
| 354 | +.withdraw-table :deep(.ant-table-cell-fix-right-first) { | ||
| 355 | + box-shadow: -8px 0 12px -10px rgba(47, 41, 70, 0.45); | ||
| 356 | +} | ||
| 357 | + | ||
| 358 | +.withdraw-table :deep(.ant-space) { | ||
| 359 | + white-space: nowrap; | ||
| 360 | +} | ||
| 361 | +</style> |