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