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

View File

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

View File

@@ -108,9 +108,8 @@ import customGrid from '@/components/CustomGrid';
import moment from 'moment'; import moment from 'moment';
import InsertChrgModal from '../components/InsertChrgModal'; import InsertChrgModal from '../components/InsertChrgModal';
import chrgDetailPop from '../components/ChrgDetailPop.vue'; import chrgDetailPop from '../components/ChrgDetailPop.vue';
import commonModal from "@/components/modal/commonModal"; import commonModal from "../components/commonModal";
import custMgtApi from '../service/custMgtApi'; import custMgtApi from '../service/custMgtApi';
import { set } from 'vue';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
@@ -293,13 +292,8 @@ export default {
} }
if (this.startDate > this.endDate) { if (this.startDate > this.endDate) {
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) { selectedEndDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
@@ -321,10 +315,10 @@ export default {
} }
} else if (type == 'end') { } else if (type == 'end') {
this.disabledEDate = {to: initStartDate, from: initEndDate}; this.disabledEDate = {to: this.startDate, from: initEndDate};
if (this.endDate !== initEndDate) { if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate}; this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: initEndDate}; this.disabledSDate = {to: initStartDate, from: this.endDate};
} }
} }
} }