mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 09:05:16 +09:00
어드민 수정건 수정
This commit is contained in:
188
frontend/src/modules/mntrng/components/commonModal.vue
Normal file
188
frontend/src/modules/mntrng/components/commonModal.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
|
||||
<div class="dimmed alertModal" @click="alertModalCancel();"></div>
|
||||
<div class="popup-wrap alertModal">
|
||||
<!-- 로그인실패: 확인 -->
|
||||
<div class="popup alertModal">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
|
||||
<div class="popup-wrap confirm">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
|
||||
<div class="popup-wrap confirm2">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup confirm2">
|
||||
<div class="pop-head">
|
||||
<h3 class="popup-tit">{{title}}</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>{{ msg1 }}</p>
|
||||
<p v-if="msg2 !== ''">{{ msg2 }}</p>
|
||||
<p v-if="msg3 !== ''">{{ msg3 }}</p>
|
||||
<p v-if="msg4 !== ''">{{ msg4 }}</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
|
||||
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "confirm",
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
title:'',
|
||||
msg1: '',
|
||||
msg2: '',
|
||||
msg3: '',
|
||||
msg4: '',
|
||||
targetFocus: '',
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
alertModalOpen(props){
|
||||
console.log('>>>>>>>>>> alertModalOpen');
|
||||
console.log(props.msg1);
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
alertModalClose(){
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkFocus();
|
||||
},
|
||||
alertModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('alertModal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkFocus();
|
||||
},
|
||||
// 모달 오픈
|
||||
confirmModalOpen(props){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
confirmModalOpen2(props){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
this.title = props.title;
|
||||
this.msg1 = props.msg1;
|
||||
this.msg2 = props.msg2;
|
||||
this.msg3 = props.msg3;
|
||||
this.msg4 = props.msg4;
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel(){
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel2(){
|
||||
var dimmed = document.getElementsByClassName('confirm2');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!--
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style> -->
|
||||
@@ -92,7 +92,8 @@ import customGrid from '@/components/CustomGrid';
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import moment from 'moment';
|
||||
import xlsx from '@/common/excel';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
//import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "../components/commonModal";
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
@@ -203,13 +204,17 @@ export default {
|
||||
// this.setCodeData();
|
||||
// this.getExcelHeader();
|
||||
this.setPeriodDay(0);
|
||||
this.grid.params.searchType1 = 'ALL';
|
||||
this.grid.params.searchType1 = '';
|
||||
},
|
||||
destroyed() {
|
||||
this.grid.params.searchType1 = '';
|
||||
this.grid.params.searchText1 = '';
|
||||
this.grid.params.searchText2 = '';
|
||||
this.grid.params.searchText3 = '';
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.grid.params.searchType1 = 'ALL';
|
||||
this.grid.params.searchType1 = '';
|
||||
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
@@ -240,15 +245,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
this.doValidate();
|
||||
this.grid.params.sentDate = moment(this.startDate).format('YYYYMMDD');
|
||||
this.grid.params.reqChennel = this.grid.params.searchType1;
|
||||
this.grid.params.phone = this.grid.params.searchText1;
|
||||
this.grid.params.callbackNumber = this.grid.params.searchText2;
|
||||
this.grid.params.custNm = this.grid.params.searchText3;
|
||||
console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
if(this.doValidate()){
|
||||
this.grid.params.sentDate = moment(this.startDate).format('YYYYMMDD');
|
||||
this.grid.params.reqChennel = this.grid.params.searchType1;
|
||||
this.grid.params.phone = this.grid.params.searchText1;
|
||||
this.grid.params.callbackNumber = this.grid.params.searchText2;
|
||||
this.grid.params.custNm = this.grid.params.searchText3;
|
||||
console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
}
|
||||
},
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
@@ -324,21 +330,30 @@ export default {
|
||||
if(this.isNull(this.grid.params.searchText1)) {
|
||||
this.row.title = '발송내역';
|
||||
this.row.msg1 = '수신번호를 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._searchText1.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 발신번호 필수입력체크
|
||||
if(this.isNull(this.grid.params.searchText2)) {
|
||||
this.row.title = '발송내역';
|
||||
this.row.msg1 = '수신번호를 입력해 주세요.';
|
||||
this.row.msg1 = '발신번호를 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._searchText2.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
checkFocus(){
|
||||
if(this.row.focusTaget === '1'){
|
||||
this.$refs._searchText1.focus();
|
||||
} else if(this.row.focusTaget === '2'){
|
||||
this.$refs._searchText2.focus();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user