Commit 07115ad0 authored by 莫坚培's avatar 莫坚培

fix: 业务数据时间都加一

parent 846655cd
......@@ -4795,7 +4795,8 @@ function renderDatePicker(elem, format, addtime, index, prop, elemIndex, tabType
function changeAddTime(format, addTime) {
let types = ['month', 'year', 'yyyy', 'yyyy-MM'] // 年、月结束时间不需要加一天
// let types = ['month', 'year', 'yyyy', 'yyyy-MM'] // 年、月结束时间不需要加一天
let types = [] // 都加一
let value = ''
if (types.includes(format)) {
value = new Date(addTime).getTime()
......@@ -4808,6 +4809,10 @@ function changeAddTime(format, addTime) {
value = dayjs(new Date(addTime)).add(1, 'hour').valueOf()
} else if (format === 'yyyy-MM-dd') {
value = dayjs(new Date(addTime)).add(1, 'day').valueOf()
} else if (format === 'yyyy-MM') {
value = dayjs(new Date(addTime)).add(1, 'month').valueOf()
} else if (format === 'yyyy') {
value = dayjs(new Date(addTime)).add(1, 'year').valueOf()
}
return value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment