feat: 产品迭代7月份
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m51s

This commit is contained in:
luo
2026-07-27 16:30:29 +08:00
parent cc6fc9243e
commit f0a2b84e53
75 changed files with 2926 additions and 534 deletions

View File

@@ -83,6 +83,11 @@
formatter: (_, data) =>
data.flow_type_name || (flowType === 'direct' ? '直接换货' : '物流换货')
},
{
label: '提交人',
formatter: (value) => value || '--',
prop: 'submitter_name'
},
{
label: '换货原因',
prop: 'exchange_reason',

View File

@@ -380,7 +380,13 @@
import { h } from 'vue'
import { useRouter } from 'vue-router'
import { ExchangeService, CardService, DeviceService } from '@/api/modules'
import type { ExchangeResponse } from '@/api/modules/exchange'
import type {
CreateExchangeRequest,
ExchangeAssetType,
ExchangeFlowType,
ExchangeQueryParams,
ExchangeResponse
} from '@/api/modules/exchange'
import type { StandaloneIotCard, Device } from '@/types/api'
import { ElMessage, ElTag, ElButton, ElMessageBox, ElSwitch } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
@@ -422,7 +428,7 @@
]
// 搜索表单
const searchForm = reactive({
const searchForm = reactive<ExchangeQueryParams & { created_at_range: string[] }>({
status: undefined,
flow_type: undefined, // 流程类型筛选
old_asset_keyword: '',
@@ -433,7 +439,16 @@
})
// 创建换货单表单
const createForm = reactive({
const createForm = reactive<{
exchange_reason: string
exchange_reason_other: string
old_asset_type: ExchangeAssetType | ''
old_identifier: string
flow_type: ExchangeFlowType
new_identifier: string
migrate_data: boolean
remark: string
}>({
exchange_reason: '',
exchange_reason_other: '',
old_asset_type: '',
@@ -819,7 +834,7 @@
loading.value = true
try {
// 过滤掉空值参数
const params: any = {
const params: ExchangeQueryParams = {
page: pagination.page,
page_size: pagination.page_size
}
@@ -1328,9 +1343,9 @@
? createForm.exchange_reason_other.trim()
: createForm.exchange_reason
const requestData: any = {
const requestData: CreateExchangeRequest = {
exchange_reason: exchangeReason,
old_asset_type: createForm.old_asset_type,
old_asset_type: createForm.old_asset_type as ExchangeAssetType,
old_identifier: createForm.old_identifier,
flow_type: createForm.flow_type,
remark: createForm.remark || undefined
@@ -1351,7 +1366,7 @@
}
ElMessage.error(res.msg || '换货单创建失败')
} catch (error: any) {
} catch (error) {
console.error('创建换货单失败:', error)
} finally {
createLoading.value = false