fix: 记录查询筛选改为按名称选择,去掉需要手填内部 ID 的条件
Some checks failed
构建并部署前端到测试环境 / deploy (push) Failing after 4m30s
Some checks failed
构建并部署前端到测试环境 / deploy (push) Failing after 4m30s
- 套餐日流量详单按套餐名称搜索选择,操作人按账号用户名搜索选择 - 去掉套餐使用记录ID、退款单ID 等手填 ID 的筛选与列;从退款详情进入时仍按该退款单过滤
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
>
|
||||
<ElTable v-loading="loading" :data="rows" row-key="id" border empty-text="暂无卡日流量">
|
||||
<ElTableColumn label="日期" prop="date" width="120" />
|
||||
<ElTableColumn label="ICCID / 卡 ID" min-width="190">
|
||||
<template #default="{ row }">{{ row.iccid || row.iot_card_id }}</template>
|
||||
<ElTableColumn label="ICCID" min-width="190">
|
||||
<template #default="{ row }">{{ assetDisplay(row) }}</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="运营商账户" min-width="140" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ nameOrId(row.carrier_name, row.carrier_id) }}</template>
|
||||
@@ -59,6 +59,7 @@
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import {
|
||||
compactQuery,
|
||||
assetDisplay,
|
||||
formatMb,
|
||||
nameOrId,
|
||||
recentDateRange,
|
||||
|
||||
@@ -42,12 +42,6 @@
|
||||
<ElTableColumn v-if="!isFixed" label="套餐" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.package_name || '-' }}</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn
|
||||
v-if="!isFixed"
|
||||
label="套餐使用记录ID"
|
||||
prop="package_usage_id"
|
||||
min-width="130"
|
||||
/>
|
||||
<ElTableColumn label="调整量" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<span :class="row.delta_mb > 0 ? 'delta-deduct' : 'delta-refund'">
|
||||
@@ -105,7 +99,6 @@
|
||||
assetDisplay,
|
||||
formatMb,
|
||||
nameOrId,
|
||||
optionalPositiveInt,
|
||||
recentTimeRange,
|
||||
requireIdentifierForNonPlatform,
|
||||
toTimeQuery
|
||||
@@ -134,8 +127,7 @@
|
||||
const { info: userInfo } = storeToRefs(useUserStore())
|
||||
const emptyFilters = () => ({
|
||||
identifier: '',
|
||||
package_usage_id: '',
|
||||
operator_id: '',
|
||||
operator_id: undefined as number | undefined,
|
||||
direction: '',
|
||||
range: recentTimeRange(7) as [string, string] | null
|
||||
})
|
||||
@@ -151,17 +143,13 @@
|
||||
)
|
||||
}
|
||||
const identifier = filters.identifier.trim()
|
||||
const packageUsageId = optionalPositiveInt(filters.package_usage_id, '套餐使用记录 ID')
|
||||
if (packageUsageId === undefined) {
|
||||
requireIdentifierForNonPlatform(identifier, userInfo.value.user_type)
|
||||
}
|
||||
requireIdentifierForNonPlatform(identifier, userInfo.value.user_type)
|
||||
return TrafficRecordsService.getTrafficAdjustments(
|
||||
compactQuery({
|
||||
...page,
|
||||
...toTimeQuery(filters.range),
|
||||
identifier,
|
||||
package_usage_id: packageUsageId,
|
||||
operator_id: optionalPositiveInt(filters.operator_id, '操作人账号 ID'),
|
||||
operator_id: filters.operator_id || undefined,
|
||||
direction: filters.direction as 'deduct' | 'refund' | ''
|
||||
})
|
||||
)
|
||||
@@ -188,12 +176,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '套餐使用记录ID',
|
||||
prop: 'package_usage_id',
|
||||
type: 'input',
|
||||
config: { clearable: true }
|
||||
label: '操作人',
|
||||
prop: 'operator_id',
|
||||
type: 'business-select',
|
||||
config: { entity: 'account', placeholder: '输入账号用户名搜索' }
|
||||
},
|
||||
{ label: '操作人账号ID', prop: 'operator_id', type: 'input', config: { clearable: true } },
|
||||
{
|
||||
label: '调整方向',
|
||||
prop: 'direction',
|
||||
|
||||
@@ -25,11 +25,8 @@
|
||||
<template #default="{ row }">{{ assetDisplay(row) }}</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="套餐" min-width="200" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{
|
||||
nameOrId(row.package_name, row.package_id, '套餐ID')
|
||||
}}</template>
|
||||
<template #default="{ row }">{{ row.package_name || '-' }}</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="套餐使用记录ID" prop="package_usage_id" min-width="130" />
|
||||
<ElTableColumn label="当日流量" min-width="110">
|
||||
<template #default="{ row }">{{ formatMb(row.daily_usage_mb) }}</template>
|
||||
</ElTableColumn>
|
||||
@@ -58,8 +55,6 @@
|
||||
compactQuery,
|
||||
assetDisplay,
|
||||
formatMb,
|
||||
nameOrId,
|
||||
optionalPositiveInt,
|
||||
recentDateRange,
|
||||
requireIdentifierForNonPlatform,
|
||||
toDateQuery
|
||||
@@ -69,8 +64,7 @@
|
||||
const { info: userInfo } = storeToRefs(useUserStore())
|
||||
const emptyFilters = () => ({
|
||||
identifier: '',
|
||||
package_usage_id: '',
|
||||
package_id: '',
|
||||
package_id: undefined as number | undefined,
|
||||
carrier_id: undefined as number | undefined,
|
||||
range: recentDateRange(7) as [string, string] | null
|
||||
})
|
||||
@@ -79,17 +73,13 @@
|
||||
const { rows, total, loading, error, pagination, load, search, changePage, changeSize } =
|
||||
useRecordList<PackageUsageDailyRecord>((page) => {
|
||||
const identifier = filters.identifier.trim()
|
||||
const packageUsageId = optionalPositiveInt(filters.package_usage_id, '套餐使用记录 ID')
|
||||
if (packageUsageId === undefined) {
|
||||
requireIdentifierForNonPlatform(identifier, userInfo.value.user_type)
|
||||
}
|
||||
requireIdentifierForNonPlatform(identifier, userInfo.value.user_type)
|
||||
return TrafficRecordsService.getPackageUsageDailyRecords(
|
||||
compactQuery({
|
||||
...page,
|
||||
...toDateQuery(filters.range),
|
||||
identifier,
|
||||
package_usage_id: packageUsageId,
|
||||
package_id: optionalPositiveInt(filters.package_id, '套餐 ID'),
|
||||
package_id: filters.package_id || undefined,
|
||||
carrier_id: filters.carrier_id
|
||||
})
|
||||
)
|
||||
@@ -117,12 +107,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '套餐使用记录ID',
|
||||
prop: 'package_usage_id',
|
||||
type: 'input',
|
||||
config: { clearable: true }
|
||||
label: '套餐',
|
||||
prop: 'package_id',
|
||||
type: 'business-select',
|
||||
config: { entity: 'package', placeholder: '输入套餐名称搜索' }
|
||||
},
|
||||
{ label: '套餐ID', prop: 'package_id', type: 'input', config: { clearable: true } },
|
||||
carrierItem.value
|
||||
])
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
compactQuery,
|
||||
assetDisplay,
|
||||
isPlatformAccount,
|
||||
optionalPositiveInt,
|
||||
recentTimeRange,
|
||||
toTimeQuery
|
||||
} from '@/utils/business/trafficRecords'
|
||||
@@ -116,7 +115,6 @@
|
||||
const allowed = computed(() => isPlatformAccount(userInfo.value.user_type))
|
||||
|
||||
const emptyFilters = () => ({
|
||||
refund_id: props.refundId ? String(props.refundId) : '',
|
||||
refund_no: '',
|
||||
identifier: '',
|
||||
step: '',
|
||||
@@ -133,7 +131,8 @@
|
||||
compactQuery({
|
||||
...page,
|
||||
...toTimeQuery(filters.range, true),
|
||||
refund_id: optionalPositiveInt(filters.refund_id, '退款单 ID'),
|
||||
// 从退款详情进入时固定按该退款单筛选,不让用户手填内部 ID
|
||||
refund_id: props.refundId || undefined,
|
||||
refund_no: filters.refund_no.trim(),
|
||||
identifier: filters.identifier.trim(),
|
||||
step: filters.step,
|
||||
@@ -165,7 +164,6 @@
|
||||
clearable: true
|
||||
}
|
||||
},
|
||||
{ label: '退款单ID', prop: 'refund_id', type: 'input', config: { clearable: true } },
|
||||
{ label: '退款单号', prop: 'refund_no', type: 'input', config: { clearable: true } },
|
||||
{
|
||||
label: '资产标识',
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn v-if="!isAsset" label="ICCID / 卡 ID" min-width="190">
|
||||
<template #default="{ row }">{{ row.iccid || row.iot_card_id || '-' }}</template>
|
||||
<ElTableColumn v-if="!isAsset" label="ICCID" min-width="190">
|
||||
<template #default="{ row }">{{ assetDisplay(row) }}</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn v-if="!isAsset" label="运营商账户" min-width="140" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ nameOrId(row.carrier_name, row.carrier_id) }}</template>
|
||||
@@ -156,6 +156,7 @@
|
||||
} from '@/config/constants/trafficRecords'
|
||||
import {
|
||||
compactQuery,
|
||||
assetDisplay,
|
||||
formatMb,
|
||||
nameOrId,
|
||||
optionalBoolean,
|
||||
|
||||
Reference in New Issue
Block a user