feat: support indefinite borrow period for long-term asset allocation
This commit is contained in:
@ -46,6 +46,9 @@
|
||||
<el-tag type="success" size="small">实际</el-tag>
|
||||
{{ row.return_time || '-' }}
|
||||
</div>
|
||||
<div v-else-if="!row.expected_return_time">
|
||||
<el-tag type="primary" size="small">无限期</el-tag>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tag type="info" size="small">预计</el-tag>
|
||||
{{ formatExpectedTime(row.expected_return_time).text }}
|
||||
@ -163,7 +166,7 @@ const handlePage = (val: number) => {
|
||||
|
||||
// ★ 新增:格式化预计归还时间及倒计时逻辑
|
||||
const formatExpectedTime = (timeStr: string) => {
|
||||
if (!timeStr) return { text: '-', diffText: '', cssClass: '' }
|
||||
if (!timeStr) return { text: '无限期', diffText: '', cssClass: '' }
|
||||
|
||||
// 后端返回的可能是 YYYY-MM-DD HH:mm:ss,我们只取日期部分比较
|
||||
const expected = dayjs(timeStr).startOf('day')
|
||||
|
||||
Reference in New Issue
Block a user