fix: update some files
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m44s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m44s
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
total_count: 0,
|
||||
window_days: 15
|
||||
})
|
||||
const searchForm = reactive<ExpiringAssetQueryParams>({
|
||||
const searchForm = reactive<ExpiringAssetQueryParams & { expires_range: string[] }>({
|
||||
asset_type: undefined,
|
||||
keyword: '',
|
||||
shop_id: undefined,
|
||||
@@ -88,7 +88,8 @@
|
||||
days_min: undefined,
|
||||
days_max: undefined,
|
||||
expires_from: undefined,
|
||||
expires_to: undefined
|
||||
expires_to: undefined,
|
||||
expires_range: []
|
||||
})
|
||||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
|
||||
@@ -166,16 +167,17 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预计到期起始',
|
||||
prop: 'expires_from',
|
||||
type: 'date',
|
||||
config: { valueFormat: 'YYYY-MM-DD', clearable: true }
|
||||
},
|
||||
{
|
||||
label: '预计到期结束',
|
||||
prop: 'expires_to',
|
||||
type: 'date',
|
||||
config: { valueFormat: 'YYYY-MM-DD', clearable: true }
|
||||
label: '预计到期起止',
|
||||
prop: 'expires_range',
|
||||
type: 'datetimerange',
|
||||
config: {
|
||||
type: 'datetimerange',
|
||||
rangeSeparator: '至',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ',
|
||||
clearable: true
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
@@ -314,8 +316,9 @@
|
||||
const daysMax = toInteger(searchForm.days_max)
|
||||
if (daysMin !== undefined) params.days_min = daysMin
|
||||
if (daysMax !== undefined) params.days_max = daysMax
|
||||
if (searchForm.expires_from) params.expires_from = searchForm.expires_from
|
||||
if (searchForm.expires_to) params.expires_to = searchForm.expires_to
|
||||
const [expiresFrom, expiresTo] = searchForm.expires_range || []
|
||||
if (expiresFrom) params.expires_from = expiresFrom
|
||||
if (expiresTo) params.expires_to = expiresTo
|
||||
|
||||
const response = await AssetService.getExpiringAssets(params)
|
||||
if (response.code === 0 && response.data) {
|
||||
@@ -347,7 +350,8 @@
|
||||
days_min: undefined,
|
||||
days_max: undefined,
|
||||
expires_from: undefined,
|
||||
expires_to: undefined
|
||||
expires_to: undefined,
|
||||
expires_range: []
|
||||
})
|
||||
pagination.currentPage = 1
|
||||
void loadAssets()
|
||||
|
||||
Reference in New Issue
Block a user