소스검증을 위한 수정 변경

This commit is contained in:
kimre
2022-07-12 12:26:45 +09:00
parent 74511fb587
commit 3d7032432c
40 changed files with 2028 additions and 2120 deletions

View File

@@ -28,10 +28,10 @@
<button class="btn-default" @click="memoTotalModalClose();">닫기</button>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
<common-modal ref="commmonMemoModal"></common-modal>
</div>
</div>
</template>
@@ -39,7 +39,7 @@
import customGrid from "@/components/CustomGrid";
import api from '@/service/api';
import custMgtApi from "../service/custMgtApi.js";
import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
class CustomATagRenderer {
constructor(props) {
@@ -81,6 +81,8 @@ export default {
// 테이블 리스트 데이터
perPageCnt: 10,
userId: '',
seqNo:'',
grid: {
url: '/api/v1/bo/custMgt/allMemoList',
pagePerRows: 10,
@@ -94,13 +96,13 @@ export default {
{ name: 'register', header: '작성자', align: 'center'},
{ name: 'regDt', header: '작성일', align: 'center'},
{ name: 'delete', header: '삭제', align: 'center', renderer: {
type: CustomATagRenderer
,options: {
callback: this.deleteMemo,
}
}
},
{ name: 'seqNo', header: '내용일련번호', align: 'center', hidden: true},
type: CustomATagRenderer
,options: {
callback: this.deleteMemo,
}
}
},
{ name: 'seqNo', header: '내용일련번호', align: 'center', hidden: true},
],
noDataStr: '검색 결과가 없습니다.',
params: {
@@ -145,7 +147,7 @@ export default {
const getP_memo = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP_memo._currentPage,
perPage: this.perPageCnt,
perPage: this.perPageCnt,
params: {
userId : this.userId,
}
@@ -163,8 +165,8 @@ export default {
// 메모 모달팝업 오픈
var dimmed = document.getElementsByClassName('memoTotal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
// 리스트 그리드 오픈
@@ -185,63 +187,71 @@ export default {
},
//메모전체 모달 Close
memoTotalModalClose(){
var dimmed = document.getElementsByClassName('memoTotal');
memoTotalModalClose(){
var dimmed = document.getElementsByClassName('memoTotal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.memberDetail(this.userId);
//this.formReset();
},
toComplete(){
this.row.serviceId = this.adminId;
this.memoTotalModalClose();
this.$parent.memberDetail(this.adminId);
},
deleteMemo: function(props) {
console.log(props);
var param = {};
param.seqNo = props.seqNo;
param.userId = this.userId;
this.deleteMemoConfirm(param);
},
async deleteMemoConfirm(target){
},
toComplete(){
this.row.serviceId = this.adminId;
this.memoTotalModalClose();
this.$parent.memberDetail(this.adminId);
},
deleteMemo: function(props) {
console.log(props);
this.seqNo=props.seqNo;
this.memorow = {}
this.memorow.title = '메모';
this.memorow.msg1 = '삭제 하시겠습니까?';
this.$refs.commmonMemoModal.confirmModalOpenMemo(this.memorow);
},
async deleteMemoConfirm(target){
try {
const response = await custMgtApi.deleteMemo(target);
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
// alert('삭제 성공');
// 그리드 reload
// 리스트 그리드 오픈
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition);
if(window.confirm('삭제 하시겠습니까?')){
try {
const response = await custMgtApi.deleteMemo(target);
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
// alert('삭제 성공');
// 그리드 reload
// 리스트 그리드 오픈
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
}
this.search(isKeep);
} else {
this.memorow.title = '청약고객관리';
this.memorow.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.memorow);
}
} catch (error) {
console.log(error);
this.memorow.title = '청약고객관리';
this.memorow.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.memorow);
}
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
}
this.search(isKeep);
} else {
this.memorow.title = '메모 삭제';
this.memorow.msg1 = '실패 하였습니다.';
this.$refs.commmonMemoModal.alertModalOpen(this.memorow);
}
} catch (error) {
console.log(error);
this.memorow.title = '메모 삭제';
this.memorow.msg1 = '실패 하였습니다.';
this.$refs.commmonMemoModal.alertModalOpen(this.memorow);
}
},
confirmCalbackFnc(props){
console.log(props)
if(props.result){
this.memorow = {}
this.memorow.seqNo = this.seqNo;
this.memorow.userId = this.userId;
this.deleteMemoConfirm(this.memorow);
}
},
}
}