정산이력 월 검색 기간 활성화 수정

This commit is contained in:
kimre
2022-07-15 20:41:35 +09:00
parent aa84f4e3d5
commit c323de8bb9

View File

@@ -381,18 +381,22 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
let initStartDate = new Date(); let initStartDate = new Date();
let initEndDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4) initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4)
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2)
if (type == 'start') { if (type == 'start') {
this.disabledSDate = {to: initStartDate, from: new Date()}; this.disabledSDate = {to: initStartDate, from: new Date()};
if (this.startDate !== initStartDate) { if (this.startDate !== initStartDate) {
this.disabledEDate = {to: this.startDate, from: new Date()}; this.disabledEDate = {to: this.startDate, from: initEndDate};
} }
} else if (type == 'end') { } else if (type == 'end') {
this.disabledEDate = {to: initStartDate, from: new Date()}; this.disabledEDate = {to: initStartDate, from: initEndDate};
if (this.endDate !== new Date()) { if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate}; this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: new Date()}; this.disabledSDate = {to: initStartDate, from: initEndDate};
} }
} }
} }
@@ -483,7 +487,7 @@ export default {
}, },
initSetEndDate() { initSetEndDate() {
let initEndDate = new Date(); let initEndDate = new Date();
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 1); initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2);
this.endDate = initEndDate; this.endDate = initEndDate;
// console.log(moment(this.endDate).format('YYYY-MM-DD')); // console.log(moment(this.endDate).format('YYYY-MM-DD'));
}, },