|
|
|
|
@ -32,17 +32,18 @@ |
|
|
|
|
<van-popup |
|
|
|
|
class="edit-address-popup-box" |
|
|
|
|
v-model:show="isEditShow" |
|
|
|
|
get-container="body" |
|
|
|
|
teleport="body" |
|
|
|
|
position="bottom" |
|
|
|
|
:duration="0.2" |
|
|
|
|
> |
|
|
|
|
<van-date-picker |
|
|
|
|
type="year-month" |
|
|
|
|
v-model="currentDate" |
|
|
|
|
title="选择年月" |
|
|
|
|
:min-date="minDate" |
|
|
|
|
:max-date="maxDate" |
|
|
|
|
:columns-type="['year', 'month']" |
|
|
|
|
:formatter="pickerFormatter" |
|
|
|
|
@confirm="onconfirm" |
|
|
|
|
v-model="currentDate" |
|
|
|
|
/> |
|
|
|
|
</van-popup> |
|
|
|
|
</div> |
|
|
|
|
@ -77,7 +78,10 @@ const userInfo = inject('userInfo', ref({})) |
|
|
|
|
const notitle = inject('notitle', ref('')) |
|
|
|
|
const elder = inject('elder', false) |
|
|
|
|
|
|
|
|
|
const currentDate = ref(new Date()) |
|
|
|
|
const currentDate = ref([ |
|
|
|
|
String(new Date().getFullYear()), |
|
|
|
|
String(new Date().getMonth() + 1).padStart(2, '0'), |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
const minDate = computed(() => { |
|
|
|
|
var now = new Date() |
|
|
|
|
@ -245,10 +249,19 @@ function isNoticeFn(val) { |
|
|
|
|
isNoticeShow.value = val |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function onconfirm(picker) { |
|
|
|
|
var year = new Date(picker).getFullYear() |
|
|
|
|
var month = new Date(picker).getMonth() + 1 |
|
|
|
|
function pickerFormatter(type, option) { |
|
|
|
|
if (type === 'year') return { ...option, text: `${option.text}年` } |
|
|
|
|
if (type === 'month') return { ...option, text: `${option.text}月` } |
|
|
|
|
return option |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function onconfirm({ selectedValues }) { |
|
|
|
|
const year = Number(selectedValues[0]) |
|
|
|
|
const month = Number(selectedValues[1]) |
|
|
|
|
startDate.value = new Date(year, month - 1, 1) |
|
|
|
|
pageNum.value = 1 |
|
|
|
|
historylist.value = [] |
|
|
|
|
nolist.value = false |
|
|
|
|
upCallback() |
|
|
|
|
isEditShow.value = false |
|
|
|
|
} |
|
|
|
|
|