This commit is contained in:
@@ -33,8 +33,6 @@
|
||||
:pageSize="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:marginTop="10"
|
||||
:actions="getActions"
|
||||
:actionsWidth="140"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
@@ -50,7 +48,7 @@
|
||||
<script setup lang="ts">
|
||||
import { h, onMounted, reactive, ref, computed } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage, ElTag } from 'element-plus'
|
||||
import { ElButton, ElMessage, ElTag } from 'element-plus'
|
||||
import { AssetService, PackageManageService, ShopService } from '@/api/modules'
|
||||
import type {
|
||||
ExpiringAssetItem,
|
||||
@@ -187,8 +185,7 @@
|
||||
{ label: '店铺', prop: 'shop_name' },
|
||||
{ label: '当前套餐', prop: 'package_name' },
|
||||
{ label: '预计最终到期', prop: 'estimated_final_expires_at' },
|
||||
{ label: '剩余天数', prop: 'days_until_final_expiry' },
|
||||
{ label: '临期等级', prop: 'expiry_level_name' }
|
||||
{ label: '剩余天数', prop: 'days_until_final_expiry' }
|
||||
]
|
||||
|
||||
const getExpiryClass = (level?: string | null) => {
|
||||
@@ -244,7 +241,16 @@
|
||||
label: '资产标识',
|
||||
minWidth: 180,
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: ExpiringAssetItem) => row.identifier || '-'
|
||||
formatter: (row: ExpiringAssetItem) =>
|
||||
h(
|
||||
ElButton,
|
||||
{
|
||||
type: 'primary',
|
||||
link: true,
|
||||
onClick: () => goToAsset(row)
|
||||
},
|
||||
() => row.identifier || '-'
|
||||
)
|
||||
},
|
||||
{
|
||||
prop: 'shop_name',
|
||||
@@ -279,12 +285,6 @@
|
||||
h(ElTag, { type: getExpiryTagType(row.expiry_level), size: 'small' }, () =>
|
||||
row.days_until_final_expiry == null ? '-' : `${row.days_until_final_expiry}天`
|
||||
)
|
||||
},
|
||||
{
|
||||
prop: 'expiry_level_name',
|
||||
label: '临期等级',
|
||||
width: 120,
|
||||
formatter: (row: ExpiringAssetItem) => row.expiry_level_name || '-'
|
||||
}
|
||||
])
|
||||
|
||||
@@ -371,10 +371,6 @@
|
||||
})
|
||||
}
|
||||
|
||||
const getActions = (row: ExpiringAssetItem) => [
|
||||
{ label: '查看资产', type: 'primary' as const, handler: () => goToAsset(row) }
|
||||
]
|
||||
|
||||
onMounted(() => {
|
||||
const assetType = route.query.asset_type
|
||||
if (assetType === 'card' || assetType === 'iot_card' || assetType === 'device') {
|
||||
|
||||
@@ -54,7 +54,24 @@
|
||||
>
|
||||
<span class="package-option">{{ pkg.package_name }}</span>
|
||||
</ElOption>
|
||||
<template #empty>
|
||||
<div class="package-empty">
|
||||
{{
|
||||
packageLoading
|
||||
? '正在加载套餐...'
|
||||
: form.series_id
|
||||
? '该套餐系列下暂无可用套餐'
|
||||
: '请先选择套餐系列'
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
</ElSelect>
|
||||
<div
|
||||
v-if="form.series_id && !packageLoading && packageOptions.length === 0"
|
||||
class="package-empty-tip"
|
||||
>
|
||||
该套餐系列下暂无可用套餐
|
||||
</div>
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem label="支付方式" prop="payment_method">
|
||||
@@ -547,6 +564,19 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.package-empty {
|
||||
padding: 8px 0;
|
||||
color: var(--el-color-danger);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.package-empty-tip {
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
color: var(--el-color-danger);
|
||||
}
|
||||
|
||||
.create-form {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem v-if="requiresTargetId" label="目标 ID" prop="target_id">
|
||||
<ElFormItem v-if="requiresTargetId" :label="targetLabel" prop="target_id">
|
||||
<ElSelect
|
||||
v-model="form.target_id"
|
||||
filterable
|
||||
@@ -284,6 +284,9 @@
|
||||
const targetPlaceholder = computed(() =>
|
||||
form.operation_type === 'assign_shop' ? '请选择启用的目标店铺' : '请选择启用的套餐系列'
|
||||
)
|
||||
const targetLabel = computed(() =>
|
||||
form.operation_type === 'assign_shop' ? '选择店铺' : '选择套餐系列'
|
||||
)
|
||||
const createDrawerBusy = computed(() => submitting.value || fileUploading.value)
|
||||
|
||||
const getOperationLabel = (operationType: DeviceImportTaskOperationType) => {
|
||||
|
||||
Reference in New Issue
Block a user