| | |
| | | openDatePicker('endMonth') |
| | | }, 300) |
| | | } else if (datePickerTarget.value === 'endMonth') { |
| | | if (searchForm.value.startMonth && !dayjs(`${str}-01`).isAfter(dayjs(`${searchForm.value.startMonth}-01`))) { |
| | | uni.showToast({ title: '结束月份必须大于开始月份', icon: 'none' }) |
| | | return |
| | | } |
| | | searchForm.value.endMonth = str |
| | | showDatePicker.value = false |
| | | handleQuery() |
| | |
| | | openDatePicker('endDate') |
| | | }, 300) |
| | | } else if (datePickerTarget.value === 'endDate') { |
| | | if (searchForm.value.startDate && !dayjs(str).isAfter(dayjs(searchForm.value.startDate))) { |
| | | uni.showToast({ title: '结束日期必须大于开始日期', icon: 'none' }) |
| | | return |
| | | } |
| | | searchForm.value.endDate = str |
| | | showDatePicker.value = false |
| | | handleQuery() |