feat: 延期弹窗显示套餐订购时间、到期时间与沉默期截止时间
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 3m54s
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 3m54s
This commit is contained in:
@@ -51,6 +51,24 @@
|
|||||||
>刷新资格</ElButton
|
>刷新资格</ElButton
|
||||||
></ElFormItem
|
></ElFormItem
|
||||||
>
|
>
|
||||||
|
<ElFormItem v-if="eligibility" label="订购时间">{{
|
||||||
|
eligibility.purchased_at ? formatDateTime(eligibility.purchased_at) : '-'
|
||||||
|
}}</ElFormItem>
|
||||||
|
<ElFormItem v-if="eligibility" label="到期时间">{{
|
||||||
|
eligibility.expires_at
|
||||||
|
? formatDateTime(eligibility.expires_at)
|
||||||
|
: '未生效(实名激活后开始计算)'
|
||||||
|
}}</ElFormItem>
|
||||||
|
<ElFormItem v-if="eligibility" label="沉默期截止"
|
||||||
|
><span class="silence-deadline">{{
|
||||||
|
eligibility.silence_deadline_at
|
||||||
|
? formatDateTime(eligibility.silence_deadline_at)
|
||||||
|
: eligibility.original_deadline || '-'
|
||||||
|
}}</span
|
||||||
|
><span v-if="eligibility.overdue_days" class="silence-overdue"
|
||||||
|
>(已过期 {{ eligibility.overdue_days }} 天)</span
|
||||||
|
></ElFormItem
|
||||||
|
>
|
||||||
<ElFormItem v-if="eligibility" label="延期资格"
|
<ElFormItem v-if="eligibility" label="延期资格"
|
||||||
><span
|
><span
|
||||||
>{{
|
>{{
|
||||||
@@ -245,9 +263,10 @@
|
|||||||
const emit = defineEmits<{ close: []; changed: [] }>()
|
const emit = defineEmits<{ close: []; changed: [] }>()
|
||||||
// 展示套餐名称(及资产),不展示内部套餐记录 ID;调用方未传名称时才退回显示 ID
|
// 展示套餐名称(及资产),不展示内部套餐记录 ID;调用方未传名称时才退回显示 ID
|
||||||
const packageLabel = computed(() => {
|
const packageLabel = computed(() => {
|
||||||
const name = props.packageName?.trim()
|
const name = eligibility.value?.package_name?.trim() || props.packageName?.trim()
|
||||||
|
const asset = eligibility.value?.asset_identifier || props.assetIdentifier
|
||||||
if (!name) return props.usageId ? `套餐记录 ${props.usageId}` : '-'
|
if (!name) return props.usageId ? `套餐记录 ${props.usageId}` : '-'
|
||||||
return props.assetIdentifier ? `${name}(${props.assetIdentifier})` : name
|
return asset ? `${name}(${asset})` : name
|
||||||
})
|
})
|
||||||
const { hasAuth } = useAuth(),
|
const { hasAuth } = useAuth(),
|
||||||
user = useUserStore()
|
user = useUserStore()
|
||||||
@@ -710,4 +729,9 @@
|
|||||||
color: var(--el-color-warning);
|
color: var(--el-color-warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.silence-overdue {
|
||||||
|
margin-left: 4px;
|
||||||
|
color: var(--el-color-danger);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -122,6 +122,18 @@ export interface SilenceExtensionResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SilenceEligibilityResponse {
|
export interface SilenceEligibilityResponse {
|
||||||
|
/** 套餐名称 */
|
||||||
|
package_name?: string
|
||||||
|
/** 资产标识 */
|
||||||
|
asset_identifier?: string
|
||||||
|
/** 套餐订购时间(购买支付成功时间) */
|
||||||
|
purchased_at?: string
|
||||||
|
/** 套餐生效时间(未实名激活时为空) */
|
||||||
|
activated_at?: string
|
||||||
|
/** 套餐到期时间(未实名激活时为空) */
|
||||||
|
expires_at?: string
|
||||||
|
/** 沉默期截止时间 */
|
||||||
|
silence_deadline_at?: string
|
||||||
/** 能否办理付费延期 */
|
/** 能否办理付费延期 */
|
||||||
can_extend?: boolean
|
can_extend?: boolean
|
||||||
/** 已累计延期天数 */
|
/** 已累计延期天数 */
|
||||||
|
|||||||
Reference in New Issue
Block a user