fix: bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 2m9s

This commit is contained in:
sexygoat
2026-04-23 14:59:05 +08:00
parent a9467e8a0c
commit a5e76313cb
28 changed files with 1284 additions and 702 deletions

View File

@@ -562,7 +562,13 @@
import { h } from 'vue'
import { useRouter } from 'vue-router'
import { RoutesAlias } from '@/router/routesAlias'
import { CardService, ShopService, PackageSeriesService, AssetService, CarrierService } from '@/api/modules'
import {
CardService,
ShopService,
PackageSeriesService,
AssetService,
CarrierService
} from '@/api/modules'
import { ElMessage, ElTag, ElIcon, ElMessageBox } from 'element-plus'
import { Loading } from '@element-plus/icons-vue'
import RealnamePolicyDialog from '@/components/device/RealnamePolicyDialog.vue'
@@ -659,6 +665,29 @@
}
}
// 套餐系列搜索相关
const searchSeriesOptions = ref<any[]>([])
// 搜索套餐系列(用于搜索栏)
const handleSearchSeries = async (query: string) => {
try {
const params: any = {
page: 1,
page_size: 20,
status: 1
}
if (query) {
params.series_name = query
}
const res = await PackageSeriesService.getPackageSeries(params)
if (res.code === 0) {
searchSeriesOptions.value = res.data.items || []
}
} catch (error) {
console.error('搜索套餐系列失败:', error)
}
}
// 卡详情弹窗相关
const cardDetailDialogVisible = ref(false)
const cardDetailLoading = ref(false)
@@ -767,6 +796,7 @@
msisdn: string
virtual_no: string
device_virtual_no: string
series_id: undefined | number
is_distributed: undefined | number
is_standalone: undefined | boolean
[key: string]: any
@@ -777,6 +807,7 @@
msisdn: '',
virtual_no: '',
device_virtual_no: '',
series_id: undefined,
is_distributed: undefined,
is_standalone: undefined,
is_replaced: undefined,
@@ -952,6 +983,23 @@
placeholder: '请输入绑定设备虚拟号'
}
},
{
label: '套餐系列',
prop: 'series_id',
type: 'select',
config: {
clearable: true,
filterable: true,
remote: true,
remoteMethod: handleSearchSeries,
placeholder: '请选择或搜索套餐系列'
},
options: () =>
searchSeriesOptions.value.map((s) => ({
label: s.series_name,
value: s.id
}))
},
{
label: '是否已分销',
prop: 'is_distributed',
@@ -974,8 +1022,8 @@
placeholder: '全部'
},
options: () => [
{ label: '是(未绑定设备', value: true },
{ label: '否(已绑定设备', value: false }
{ label: '未绑定设备', value: true },
{ label: '已绑定设备', value: false }
]
},
{
@@ -1016,18 +1064,28 @@
{ label: 'ICCID', prop: 'iccid' },
{ label: 'MSISDN', prop: 'msisdn' },
{ label: '卡虚拟号', prop: 'virtual_no' },
{ label: '绑定设备虚拟号', prop: 'device_virtual_no' },
{ label: '卡业务类型', prop: 'card_category' },
{ label: '运营商', prop: 'carrier_name' },
{ label: '店铺名称', prop: 'shop_name' },
{ label: '套餐系列', prop: 'series_name' },
{ label: '卡业务类型', prop: 'card_category' },
{ label: '状态', prop: 'status' },
{ label: '激活状态', prop: 'activation_status' },
{ label: '激活时间', prop: 'activated_at' },
{ label: '网络状态', prop: 'network_status' },
{ label: '实名状态', prop: 'real_name_status' },
{ label: '实名认证策略', prop: 'realname_policy' },
{ label: '绑定设备虚拟号', prop: 'device_virtual_no' },
{ label: '店铺名称', prop: 'shop_name' },
{ label: '套餐系列', prop: 'series_name' },
{ label: '自然月累计流量(MB)', prop: 'current_month_usage_mb' },
{ label: '本月开始日期', prop: 'current_month_start_date' },
{ label: '上月流量总量(MB)', prop: 'last_month_total_mb' },
{ label: '累计流量(MB)', prop: 'data_usage_mb' },
{ label: '创建时间', prop: 'created_at' }
{ label: '最后流量检查时间', prop: 'last_data_check_at' },
{ label: '最后实名检查时间', prop: 'last_real_name_check_at' },
{ label: '启用轮询', prop: 'enable_polling' },
{ label: '批次号', prop: 'batch_no' },
{ label: '供应商', prop: 'supplier' },
{ label: '创建时间', prop: 'created_at' },
{ label: '更新时间', prop: 'updated_at' }
]
const cardList = ref<StandaloneIotCard[]>([])
@@ -1233,12 +1291,70 @@
return text
}
},
{
prop: 'activated_at',
label: '激活时间',
width: 180,
formatter: (row: StandaloneIotCard) =>
row.activated_at ? formatDateTime(row.activated_at) : '-'
},
{
prop: 'current_month_usage_mb',
label: '自然月累计流量(MB)',
width: 180,
formatter: (row: StandaloneIotCard) => row.current_month_usage_mb?.toLocaleString() || '0'
},
{
prop: 'current_month_start_date',
label: '本月开始日期',
width: 200,
formatter: (row: StandaloneIotCard) =>
row.current_month_start_date ? formatDateTime(row.current_month_start_date) : '-'
},
{
prop: 'last_month_total_mb',
label: '上月流量总量(MB)',
width: 150,
formatter: (row: StandaloneIotCard) => row.last_month_total_mb?.toLocaleString() || '0'
},
{
prop: 'data_usage_mb',
label: '累计流量(MB)',
width: 120,
formatter: (row: StandaloneIotCard) => row.data_usage_mb?.toLocaleString() || '0'
},
{
prop: 'last_data_check_at',
label: '最后流量检查时间',
width: 180,
formatter: (row: StandaloneIotCard) =>
row.last_data_check_at ? formatDateTime(row.last_data_check_at) : '-'
},
{
prop: 'last_real_name_check_at',
label: '最后实名检查时间',
width: 180,
formatter: (row: StandaloneIotCard) =>
row.last_real_name_check_at ? formatDateTime(row.last_real_name_check_at) : '-'
},
{
prop: 'enable_polling',
label: '启用轮询',
width: 100,
formatter: (row: StandaloneIotCard) => (row.enable_polling ? '是' : '否')
},
{
prop: 'batch_no',
label: '批次号',
width: 200,
showOverflowTooltip: true
},
{
prop: 'supplier',
label: '供应商',
width: 150,
formatter: (row: StandaloneIotCard) => row.supplier || '-'
},
{
prop: 'created_at',
label: '创建时间',
@@ -1289,7 +1405,6 @@
}
onMounted(() => {
loadSearchCarrierOptions()
getTableData()
})