让凭证数组与套餐作废任务进入可联调状态
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m52s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m52s
Constraint: 后端订单套餐作废接口使用 /api/admin/order-package-invalidate-tasks,上传 purpose 只能使用 attachment。 Rejected: 继续提交逗号拼接凭证字符串 | 新提交路径必须使用 string[],历史字符串只做读取归一化。 Confidence: high Scope-risk: broad Directive: 新增订单套餐作废权限时需同时配置菜单 URL 与 order_package_invalidate_task:create/detail 按钮权限。 Tested: bun run build;development 真实后端联调上传、创建、列表、详情通过;复机接口未触发。 Not-tested: 未逐一手工覆盖所有历史凭证数据、全部角色权限组合和所有文件扩展名预览
This commit is contained in:
@@ -231,14 +231,16 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, onMounted, nextTick, h } from 'vue'
|
||||
import { ElMessage, ElMessageBox, ElTag } from 'element-plus'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { PollingConfigService, CarrierService } from '@/api/modules'
|
||||
import type {
|
||||
PollingConfig,
|
||||
PollingConfigQueryParams,
|
||||
CreatePollingConfigRequest,
|
||||
UpdatePollingConfigRequest
|
||||
UpdatePollingConfigRequest,
|
||||
PollingCardCategory,
|
||||
CardCondition
|
||||
} from '@/types/api'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
@@ -262,8 +264,8 @@
|
||||
// 搜索表单
|
||||
const searchForm = reactive({
|
||||
config_name: '',
|
||||
card_category: undefined as string | undefined,
|
||||
card_condition: undefined as string | undefined,
|
||||
card_category: undefined as PollingCardCategory | undefined,
|
||||
card_condition: undefined as CardCondition | undefined,
|
||||
carrier_id: undefined as number | undefined,
|
||||
status: undefined as number | undefined
|
||||
})
|
||||
@@ -530,7 +532,7 @@
|
||||
const { data } = await PollingConfigService.getPollingConfigs(queryParams)
|
||||
tableData.value = data.items
|
||||
pagination.total = data.total
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('加载配置列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -612,7 +614,7 @@
|
||||
nextTick(() => {
|
||||
formRef.value?.clearValidate()
|
||||
})
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('获取配置详情失败')
|
||||
}
|
||||
}
|
||||
@@ -623,7 +625,7 @@
|
||||
await PollingConfigService.updatePollingConfigStatus(row.id, { status: newStatus })
|
||||
ElMessage.success(newStatus === 1 ? '已启用' : '已禁用')
|
||||
await loadData()
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('状态更新失败')
|
||||
}
|
||||
}
|
||||
@@ -677,7 +679,7 @@
|
||||
|
||||
dialogVisible.value = false
|
||||
await loadData()
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log(dialogType.value === 'create' ? '创建失败' : '更新失败')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
v-model:filter="searchForm"
|
||||
:items="searchFormItems"
|
||||
:show-expand="false"
|
||||
label-width="100"
|
||||
label-width="100px"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
/>
|
||||
@@ -63,11 +63,11 @@
|
||||
<div style="display: flex; gap: 8px; align-items: center">
|
||||
<el-progress
|
||||
:percentage="getProgressPercentage(scope.row)"
|
||||
stroke-width="6"
|
||||
:stroke-width="6"
|
||||
:show-text="false"
|
||||
style="flex: 1"
|
||||
/>
|
||||
<span style=" width: 50px;font-size: 12px"
|
||||
<span style="width: 50px; font-size: 12px"
|
||||
>{{ getProgressPercentage(scope.row) }}%</span
|
||||
>
|
||||
</div>
|
||||
@@ -103,7 +103,7 @@
|
||||
label="任务类型"
|
||||
prop="task_type"
|
||||
label-width="80"
|
||||
style=" width: 300px;margin-bottom: 0"
|
||||
style="width: 300px; margin-bottom: 0"
|
||||
>
|
||||
<el-select
|
||||
v-model="batchForm.task_type"
|
||||
@@ -757,28 +757,6 @@
|
||||
batchCardPagination.pageSize = 20
|
||||
}
|
||||
|
||||
// 获取卡状态类型
|
||||
const getCardStatusType = (status: number) => {
|
||||
const typeMap: Record<number, 'success' | 'warning' | 'danger' | 'info'> = {
|
||||
0: 'info',
|
||||
1: 'success',
|
||||
2: 'warning',
|
||||
3: 'danger'
|
||||
}
|
||||
return typeMap[status] || 'info'
|
||||
}
|
||||
|
||||
// 获取卡状态名称
|
||||
const getCardStatusName = (status: number) => {
|
||||
const nameMap: Record<number, string> = {
|
||||
0: '未激活',
|
||||
1: '已激活',
|
||||
2: '停机',
|
||||
3: '异常'
|
||||
}
|
||||
return nameMap[status] || '未知'
|
||||
}
|
||||
|
||||
// 获取卡业务类型文本
|
||||
const getCardCategoryText = (category: string) => {
|
||||
const categoryMap: Record<string, string> = {
|
||||
@@ -790,7 +768,7 @@
|
||||
|
||||
// 条件触发表单
|
||||
const conditionForm = reactive<ConditionManualTriggerRequest>({
|
||||
task_type: '' as TaskType | '',
|
||||
task_type: undefined as unknown as TaskType,
|
||||
limit: 100,
|
||||
card_status: undefined,
|
||||
card_type: undefined,
|
||||
@@ -838,16 +816,6 @@
|
||||
}
|
||||
])
|
||||
|
||||
const getStatusTag = (status: string) => {
|
||||
const typeMap: Record<string, 'info' | 'warning' | 'success' | 'danger'> = {
|
||||
pending: 'info',
|
||||
processing: 'warning',
|
||||
completed: 'success',
|
||||
cancelled: 'danger'
|
||||
}
|
||||
return typeMap[status] || 'info'
|
||||
}
|
||||
|
||||
const getProgressPercentage = (row: ManualTriggerLog) => {
|
||||
if (row.total_count === 0) return 0
|
||||
return Math.round((row.processed_count / row.total_count) * 100)
|
||||
@@ -918,7 +886,7 @@
|
||||
const { data } = await ManualTriggerService.getHistory(queryParams)
|
||||
tableData.value = data.items
|
||||
pagination.total = data.total
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('加载触发历史失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -1046,7 +1014,7 @@
|
||||
ElMessage.success('批量触发成功')
|
||||
batchDialogVisible.value = false
|
||||
await loadData()
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('批量触发失败')
|
||||
}
|
||||
})
|
||||
@@ -1073,7 +1041,7 @@
|
||||
ElMessage.success('条件触发成功')
|
||||
conditionDialogVisible.value = false
|
||||
await loadData()
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('条件触发失败')
|
||||
}
|
||||
})
|
||||
@@ -1092,7 +1060,7 @@
|
||||
ElMessage.success('单卡触发成功')
|
||||
singleDialogVisible.value = false
|
||||
await loadData()
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log('单卡触发失败')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user