This commit is contained in:
@@ -63,8 +63,8 @@
|
||||
:currentPage="commissionPagination.page"
|
||||
:pageSize="commissionPagination.pageSize"
|
||||
:total="commissionPagination.total"
|
||||
:marginTop="10"
|
||||
:height="500"
|
||||
:marginTop="0"
|
||||
:height="450"
|
||||
@size-change="handleCommissionSizeChange"
|
||||
@current-change="handleCommissionCurrentChange"
|
||||
>
|
||||
@@ -231,6 +231,45 @@
|
||||
|
||||
<!-- 预充值钱包流水 Tab -->
|
||||
<ElTabPane label="预充值钱包流水" name="mainWallet">
|
||||
<ElForm :model="mainWalletSearchForm" class="main-wallet-filter" label-position="top">
|
||||
<div class="main-wallet-filter__grid">
|
||||
<ElFormItem label="交易类型">
|
||||
<ElSelect
|
||||
v-model="mainWalletSearchForm.transaction_type"
|
||||
clearable
|
||||
placeholder="全部类型"
|
||||
>
|
||||
<ElOption label="充值入账" :value="MainWalletTransactionType.RECHARGE" />
|
||||
<ElOption label="套餐扣款" :value="MainWalletTransactionType.DEDUCT" />
|
||||
<ElOption label="退款" :value="MainWalletTransactionType.REFUND" />
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="交易日期">
|
||||
<ElDatePicker
|
||||
v-model="mainWalletSearchForm.date_range"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
unlink-panels
|
||||
/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="资产标识">
|
||||
<ElInput
|
||||
v-model="mainWalletSearchForm.asset_identifier"
|
||||
clearable
|
||||
maxlength="100"
|
||||
placeholder="请输入ICCID或设备虚拟号"
|
||||
@keyup.enter="handleMainWalletSearch"
|
||||
/>
|
||||
</ElFormItem>
|
||||
<ElFormItem class="main-wallet-filter__actions">
|
||||
<ElButton type="primary" @click="handleMainWalletSearch">搜索</ElButton>
|
||||
<ElButton @click="handleMainWalletReset">重置</ElButton>
|
||||
</ElFormItem>
|
||||
</div>
|
||||
</ElForm>
|
||||
<ArtTable
|
||||
ref="mainWalletTableRef"
|
||||
row-key="id"
|
||||
@@ -384,12 +423,14 @@
|
||||
import { CommissionService } from '@/api/modules'
|
||||
import { ElMessage, ElMessageBox, ElTag } from 'element-plus'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { MainWalletTransactionType } from '@/types/api/commission'
|
||||
import type {
|
||||
ShopFundSummaryItem,
|
||||
ShopCommissionRecordItem,
|
||||
WithdrawalRequestItem,
|
||||
CommissionResolveAction,
|
||||
MainWalletTransactionItem
|
||||
MainWalletTransactionItem,
|
||||
MainWalletTransactionQueryParams
|
||||
} from '@/types/api/commission'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||
@@ -491,6 +532,15 @@
|
||||
pageSize: 20,
|
||||
total: 0
|
||||
})
|
||||
const mainWalletSearchForm = reactive<{
|
||||
transaction_type: MainWalletTransactionType | undefined
|
||||
date_range: [string, string] | [] | null
|
||||
asset_identifier: string
|
||||
}>({
|
||||
transaction_type: undefined,
|
||||
date_range: [],
|
||||
asset_identifier: ''
|
||||
})
|
||||
|
||||
// 列配置
|
||||
const columnOptions = [
|
||||
@@ -713,6 +763,9 @@
|
||||
commissionPagination.page = 1
|
||||
withdrawalPagination.page = 1
|
||||
mainWalletPagination.page = 1
|
||||
mainWalletPagination.total = 0
|
||||
mainWalletRecords.value = []
|
||||
resetMainWalletSearchForm()
|
||||
|
||||
// 加载佣金明细
|
||||
loadCommissionRecords()
|
||||
@@ -841,9 +894,14 @@
|
||||
|
||||
mainWalletLoading.value = true
|
||||
try {
|
||||
const params = {
|
||||
const [startDate, endDate] = mainWalletSearchForm.date_range || []
|
||||
const params: MainWalletTransactionQueryParams = {
|
||||
page: mainWalletPagination.page,
|
||||
page_size: mainWalletPagination.pageSize
|
||||
page_size: mainWalletPagination.pageSize,
|
||||
transaction_type: mainWalletSearchForm.transaction_type,
|
||||
start_date: startDate,
|
||||
end_date: endDate,
|
||||
asset_identifier: mainWalletSearchForm.asset_identifier.trim() || undefined
|
||||
}
|
||||
const res = await CommissionService.getMainWalletTransactions(
|
||||
currentShop.value.shop_id,
|
||||
@@ -872,6 +930,23 @@
|
||||
loadMainWalletRecords()
|
||||
}
|
||||
|
||||
const resetMainWalletSearchForm = () => {
|
||||
mainWalletSearchForm.transaction_type = undefined
|
||||
mainWalletSearchForm.date_range = []
|
||||
mainWalletSearchForm.asset_identifier = ''
|
||||
}
|
||||
|
||||
const handleMainWalletSearch = () => {
|
||||
mainWalletPagination.page = 1
|
||||
loadMainWalletRecords()
|
||||
}
|
||||
|
||||
const handleMainWalletReset = () => {
|
||||
resetMainWalletSearchForm()
|
||||
mainWalletPagination.page = 1
|
||||
loadMainWalletRecords()
|
||||
}
|
||||
|
||||
// 处理佣金修正
|
||||
const handleResolveCommission = (
|
||||
row: ShopCommissionRecordItem,
|
||||
@@ -955,6 +1030,58 @@
|
||||
}
|
||||
}
|
||||
|
||||
.main-wallet-filter {
|
||||
padding: 16px 16px 4px;
|
||||
margin-bottom: 12px;
|
||||
background: var(--el-fill-color-lighter);
|
||||
border: 1px solid var(--el-border-color-lighter);
|
||||
border-radius: 8px;
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
:deep(.el-select),
|
||||
:deep(.el-date-editor),
|
||||
:deep(.el-input) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.main-wallet-filter__grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(140px, 0.8fr) minmax(260px, 1.4fr) minmax(220px, 1fr) auto;
|
||||
gap: 12px 16px;
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
.main-wallet-filter__actions {
|
||||
:deep(.el-form-item__content) {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.main-wallet-filter__grid {
|
||||
grid-template-columns: repeat(2, minmax(220px, 1fr));
|
||||
}
|
||||
|
||||
.main-wallet-filter__actions {
|
||||
:deep(.el-form-item__content) {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.main-wallet-filter__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.asset-identifier-link {
|
||||
color: var(--el-color-primary);
|
||||
text-decoration: underline;
|
||||
|
||||
Reference in New Issue
Block a user