mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 04:11:27 +09:00
admin_chrg 체크시 삭제 수정중
This commit is contained in:
@@ -109,6 +109,7 @@ import moment from 'moment';
|
||||
import InsertChrgModal from '../components/InsertChrgModal';
|
||||
import chrgDetailPop from '../components/ChrgDetailPop.vue';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import custMgtApi from '../service/custMgtApi';
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
@@ -151,7 +152,7 @@ export default {
|
||||
endYear: '',
|
||||
endMonth: '',
|
||||
|
||||
|
||||
row: {},
|
||||
searchType1: '01',
|
||||
chrgSeq : '',
|
||||
useYn: '',
|
||||
@@ -350,10 +351,70 @@ export default {
|
||||
insertChrg () {
|
||||
this.$refs.insertChrgModal.insertChrgOpen();
|
||||
},
|
||||
deleteChrg(){
|
||||
if (this.doValidate()) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?';
|
||||
console.log("row.list", this.row.list)
|
||||
this.$refs.commonModal.confirmModalOpen2(this.row);
|
||||
}
|
||||
},
|
||||
|
||||
async chrgdelete() {
|
||||
try {
|
||||
console.log("this.row",this.row)
|
||||
let respose = await custMgtApi.deleteChrg(this.row);
|
||||
|
||||
const result = respose.data;
|
||||
if (result != null && result.retCode == '0000') {
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
} else {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (error) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
|
||||
alertInsert(props) {
|
||||
this.$refs.commonModal.alertModalOpen(props);
|
||||
},
|
||||
|
||||
doValidate() {
|
||||
//로우데이터 삭제하도록 수정
|
||||
// this.totalItems==1
|
||||
// if (this.totalItems == 0) {
|
||||
// this.row.title = '충전금 관리';
|
||||
// this.row.msg1 = '검색 결과가 없습니다.';
|
||||
// this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// return false;
|
||||
// }
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
console.log("chkList",chkList)
|
||||
// console.log("chkList.length", chkList.length)
|
||||
if (chkList.length == 0) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '삭제대상을 체크를 해주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
console.log("row.chrgSeq",this.row.chrgSeq)
|
||||
const param = chkList.map((row) => ({ chrgSeq: row.chrgSeq }));
|
||||
console.log("param",param)
|
||||
// console.log("chrgSeq",chrgSeq)
|
||||
this.row.list = param;
|
||||
return true;
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
if (props.result) {
|
||||
this.chrgdelete();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user