admin_chrg 달력 수정

This commit is contained in:
2023-03-29 15:52:51 +09:00
parent 7f826e8bd9
commit 68a0440688
3 changed files with 30 additions and 32 deletions

View File

@@ -286,8 +286,8 @@ export default {
if (type != undefined && type != null) {
let initStartDate = new Date();
let initEndDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) )
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +12)
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1)
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +100)
if (type == 'start') {
this.disabledSDate = {to: initStartDate, from: new Date()};
@@ -295,10 +295,10 @@ export default {
this.disabledEDate = {to: this.startDate, from: initEndDate};
}
} else if (type == 'end') {
this.disabledEDate = {to: initStartDate, from: initEndDate};
this.disabledEDate = {to: this.startDate, from: initEndDate};
if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: initEndDate};
this.disabledSDate = {to: initStartDate, from: this.endDate};
}
}
}
@@ -321,12 +321,12 @@ export default {
},
initSetStartDate() {
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) );
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1);
this.startDate = initStartDate;
},
initSetEndDate() {
let initEndDate = new Date();
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +12);
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +1);
this.endDate = initEndDate;
},
}

View File

@@ -55,7 +55,7 @@
</div>
</td>
</tr>
<tr v-show="bizrAuthYn !== 'Y'">
<tr >
<th>충전금액</th>
<td>
<div class="input_add">
@@ -100,6 +100,7 @@
</div>
</div>
<user-list-pop ref="userListPop" :send-data="childData" @event-data="setChildData" />
<common-modal ref="commonModal"/>
</div>
</template>
@@ -107,6 +108,7 @@
import UserListPop from './UserListPop.vue';
import moment from 'moment';
import custMgtApi from "../service/custMgtApi";
import CommonModal from './commonModal.vue';
export default {
name: 'insertChrgModal',
@@ -134,17 +136,17 @@ export default {
endYear: '',
endMonth: '',
bizrAuthYn: '',
nmineeDivCd: '01',
chrgAmtE: '',
chrgAmtC: '',
userId: '',
custNm: '',
bRegNo: '',
bizrAuthYn : '',
userSttusCd: '',
custSeq : '',
chrgSeq : '',
userTpCd: '',
userSeq: '',
row: {},
@@ -153,6 +155,7 @@ export default {
components: {
vuejsDatepicker,
UserListPop,
CommonModal,
},
mounted(){
// 달력 세팅
@@ -181,10 +184,11 @@ export default {
},
setChildData(data) {
this.userId = data.userId;
this.custNm = this.fromHtmlEntities(data.custNm);
this.bRegNo = data.bregNo;
this.bizrAuthYn = data.bizrAuthYn;
this.custNm = data.custNm;;
this.userSttusCd = data.userSttusCd;
this.custSeq = data.custSeq;
this.userTpCd = data.userTpCd;
this.userSeq = data.userSeq;
},
search: function (isKeep) {
@@ -211,7 +215,7 @@ export default {
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
}
},
selectedEndDate(day) {
if (day != undefined && day != null) {
@@ -222,8 +226,8 @@ export default {
if (type != undefined && type != null) {
let initStartDate = new Date();
let initEndDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) )
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) + 12)
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1)
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) + 100)
if (type == 'start') {
@@ -233,10 +237,10 @@ export default {
}
} else if (type == 'end') {
this.disabledEDate = {to: initStartDate, from: initEndDate};
this.disabledEDate = {to: this.startDate, from: initEndDate};
if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: initEndDate};
this.disabledSDate = {to: initStartDate, from: this.endDate};
}
}
}
@@ -247,7 +251,7 @@ export default {
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
return moment(date).format('YYYY-MM');
}
},
gridParamSet() {
@@ -258,12 +262,12 @@ export default {
},
initSetStartDate() {
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')));
initStartDate.setMonth(Number(moment(initStartDate).format('MM'))-1);
this.startDate = initStartDate;
},
initSetEndDate() {
let initEndDate = new Date();
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +12);
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +1);
this.endDate = initEndDate;
},
saveChrg(){

View File

@@ -108,9 +108,8 @@ import customGrid from '@/components/CustomGrid';
import moment from 'moment';
import InsertChrgModal from '../components/InsertChrgModal';
import chrgDetailPop from '../components/ChrgDetailPop.vue';
import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
import custMgtApi from '../service/custMgtApi';
import { set } from 'vue';
class CustomATagRenderer {
constructor(props) {
@@ -293,13 +292,8 @@ export default {
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
// else if(this.startDate<this.endDate){
// this.row.title = '날짜 선택';
// this.row.msg1 = '조회기간 다시 설정해주세요.';
// this.$refs.commonModal.alertModalOpen(this.row);
}
}
},
selectedEndDate(day) {
if (day != undefined && day != null) {
@@ -321,10 +315,10 @@ export default {
}
} else if (type == 'end') {
this.disabledEDate = {to: initStartDate, from: initEndDate};
this.disabledEDate = {to: this.startDate, from: initEndDate};
if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: initEndDate};
this.disabledSDate = {to: initStartDate, from: this.endDate};
}
}
}