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

This commit is contained in:
sexygoat
2026-04-25 15:51:24 +08:00
parent 9247001643
commit a770984ef7
4 changed files with 31 additions and 14 deletions

View File

@@ -78,6 +78,7 @@
v-model:filter="cardSearchForm" v-model:filter="cardSearchForm"
:items="cardSearchFormItems" :items="cardSearchFormItems"
label-width="120" label-width="120"
:show-expand="false"
@reset="handleCardSearchReset" @reset="handleCardSearchReset"
@search="handleCardSearch" @search="handleCardSearch"
></ArtSearchBar> ></ArtSearchBar>

View File

@@ -79,6 +79,7 @@
v-model:filter="deviceSearchForm" v-model:filter="deviceSearchForm"
:items="deviceSearchFormItems" :items="deviceSearchFormItems"
label-width="85" label-width="85"
:show-expand="false"
@reset="handleDeviceSearchReset" @reset="handleDeviceSearchReset"
@search="handleDeviceSearch" @search="handleDeviceSearch"
></ArtSearchBar> ></ArtSearchBar>
@@ -218,9 +219,7 @@
import type { import type {
EnterpriseDeviceItem, EnterpriseDeviceItem,
AllocateDevicesResponse, AllocateDevicesResponse,
RecallDevicesResponse, RecallDevicesResponse
AuthorizedDeviceItem,
FailedDeviceItem
} from '@/types/api/enterpriseDevice' } from '@/types/api/enterpriseDevice'
import type { EnterpriseItem } from '@/types/api' import type { EnterpriseItem } from '@/types/api'
import type { Device, DeviceStatus } from '@/types/api/device' import type { Device, DeviceStatus } from '@/types/api/device'
@@ -544,7 +543,10 @@
1: { text: '在线', type: 'success' }, 1: { text: '在线', type: 'success' },
2: { text: '离线', type: 'danger' } 2: { text: '离线', type: 'danger' }
} }
const status = onlineStatusMap[(row as any).online_status ?? 0] || { text: '未知', type: 'info' } const status = onlineStatusMap[(row as any).online_status ?? 0] || {
text: '未知',
type: 'info'
}
return h(ElTag, { type: status.type }, () => status.text) return h(ElTag, { type: status.type }, () => status.text)
} }
}, },
@@ -908,9 +910,9 @@
devicePagination.page = 1 devicePagination.page = 1
devicePagination.pageSize = 20 devicePagination.pageSize = 20
// 预加载下拉选项 // 预加载下拉选项
handleSearchBatchNo('') await handleSearchBatchNo('')
searchShops('') await searchShops('')
searchSeries('') await searchSeries('')
// 加载可用设备列表 // 加载可用设备列表
await getAvailableDevicesList() await getAvailableDevicesList()
// 预选已授权的设备 // 预选已授权的设备
@@ -919,7 +921,7 @@
) )
selectedAvailableDevices.value = preSelectedDevices selectedAvailableDevices.value = preSelectedDevices
// 等待表格渲染完成后,设置已选项 // 等待表格渲染完成后,设置已选项
nextTick(() => { await nextTick(() => {
preSelectedDevices.forEach((device) => { preSelectedDevices.forEach((device) => {
const row = availableDevicesTableRef.value?.tableRef?.getRowByKey(device.id) const row = availableDevicesTableRef.value?.tableRef?.getRowByKey(device.id)
if (row) { if (row) {

View File

@@ -299,7 +299,17 @@
{ label: '店铺名称', prop: 'shop_name' }, { label: '店铺名称', prop: 'shop_name' },
{ label: '订单号', prop: 'order_no' }, { label: '订单号', prop: 'order_no' },
{ label: '资产标识符', prop: 'asset_identifier' }, { label: '资产标识符', prop: 'asset_identifier' },
{ label: '资产类型', prop: 'asset_type' }, {
label: '资产类型',
formatter: (_, data) =>
data.asset_type === 'device'
? '设备'
: data.asset_type === 'card'
? '单卡'
: data.asset_type === 'iot_card'
? 'IoT卡'
: data.asset_type || '-'
},
{ {
label: '申请退款金额', label: '申请退款金额',
formatter: (_, data) => formatCurrency(data.requested_refund_amount) formatter: (_, data) => formatCurrency(data.requested_refund_amount)

View File

@@ -457,12 +457,14 @@
{ {
prop: 'order_no', prop: 'order_no',
label: '订单号', label: '订单号',
width: 220 width: 180,
showOverflowTooltip: true
}, },
{ {
prop: 'asset_identifier', prop: 'asset_identifier',
label: '资产标识符', label: '资产标识符',
width: 180 width: 200,
showOverflowTooltip: true
}, },
{ {
prop: 'asset_type', prop: 'asset_type',
@@ -471,9 +473,11 @@
formatter: (row: Refund) => formatter: (row: Refund) =>
row.asset_type === 'device' row.asset_type === 'device'
? '设备' ? '设备'
: row.asset_type === 'iot_card' : row.asset_type === 'card'
? 'IoT卡' ? '卡'
: row.asset_type || '-' : row.asset_type === 'iot_card'
? 'IoT卡'
: row.asset_type || '-'
}, },
{ {
prop: 'requested_refund_amount', prop: 'requested_refund_amount',