补齐证书齐备、证件折算、移动用证和合同绑定,并带上报销批量发放、付款备注以及个人开发流程升级,便于继续讨论已安排计划的调整规则。 Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
import type { CertificateStatistics } from '@/api/pl/quota-cert'
|
|
import { statusLabel } from '@/views/pl/quota-statistics/labels'
|
|
|
|
export function certListStatus(value?: string | null) {
|
|
return statusLabel(value || '') || '—'
|
|
}
|
|
|
|
export function linkLabel(status?: string | null) {
|
|
return status === 'active' ? '可安排用证' : '停止新增使用'
|
|
}
|
|
|
|
export function scopeStatusLabel(status?: string | null) {
|
|
return status === 'active' ? '有效' : status === 'inactive' ? '停用' : '历史解绑'
|
|
}
|
|
|
|
export function usageTrackingRows(detail: CertificateStatistics) {
|
|
return (detail.usageItems || []).map((item) => {
|
|
const contract = (detail.contracts || []).find((row) => row.id === item.contractId)
|
|
const product = contract?.products?.find((row) => row.contractProductId === item.contractProductId)
|
|
return {
|
|
...item,
|
|
contractNo: contract?.contractNo || '—',
|
|
productModel: product?.model || '—',
|
|
partyName: item.partyName || '—',
|
|
address: item.address || '—'
|
|
}
|
|
})
|
|
}
|