Merge branch '20230508_workState' into develop

This commit is contained in:
2023-06-20 14:06:59 +09:00
23 changed files with 1008 additions and 85 deletions

View File

@@ -17,11 +17,10 @@
<button type="button" class="button grey" @click="searchIdPop">조회</button>
</div>
</td>
</tr>
<tr>
<th>충전월</th>
<td>
<td v-if="joinDiv==1">
<div class="input_box cal" style="width:60%">
<div class="term">
<span class="custom_input icon_date">
@@ -54,8 +53,27 @@
</div>
</div>
</td>
<td v-if="joinDiv==2">
<div class="input_box cal" style="width:60%">
<div class="term">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
:minimumView="sDateDiv"
:maximumView="sDateDiv"
v-model="startDate"
@selected="selectedStartDate(0)"
@closed="closeDate('start')"
:picker-options="startDateOptions"
></vuejs-datepicker>
</span>
</div>
</div>
</td>
</tr>
<tr >
<tr v-if="joinDiv==1">
<th>충전금액</th>
<td>
<div class="input_add">
@@ -91,6 +109,28 @@
</div>
</td>
</tr>
<tr v-if="joinDiv==2">
<th>충전금액</th>
<td>
<div class="input_add">
<input
type="radio"
name="nmineeDivCd"
value="01"
id="popup_radio5"
v-model="nmineeDivCd"
/>
<label for="popup_radio6">선불충전금액 <span style="font-size: 14px;">(다음달 정액 요금에 이월되는 충전금액입니다)</span></label>
<input
class="search-box"
type="number"
placeholder="이월 충전 금액 입력"
v-model="chrgAmtC"
v-bind:disabled ="nmineeDivCd=='02'"
/>
</div>
</td>
</tr>
</tbody>
</table>
<div class="popup-btn2">
@@ -146,6 +186,7 @@ export default {
chrgSeq : '',
userTpCd: '',
userSeq: '',
joinDiv:'1',
row: {},
@@ -154,7 +195,7 @@ export default {
components: {
vuejsDatepicker,
UserListPop,
CommonModal,
CommonModal,
},
mounted(){
// 달력 세팅
@@ -178,7 +219,7 @@ export default {
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.$refs.userListPop.UserListPopClose();
},
formReset() {
Object.assign(this.$data, this.$options.data());
@@ -193,6 +234,14 @@ export default {
this.custSeq = data.custSeq;
this.userTpCd = data.userTpCd;
this.userSeq = data.userSeq;
this.joinDiv = data.joinDiv;
if (data.joinDiv=='01') {
this.joinDiv=1;
}
if (data.joinDiv=='02') {
this.joinDiv=2;
}
this.setPeriodDay(0);
},
search: function (isKeep) {
@@ -233,20 +282,27 @@ export default {
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1)
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) + 100)
if (this.joinDiv==1) {
if (type == 'start') {
// this.disabledSDate = {to: initStartDate, from: new Date()};
if (this.startDate !== initStartDate) {
this.disabledEDate = {to: this.startDate, from: initEndDate};
if (type == 'start') {
this.disabledSDate = {to: initStartDate, from: new Date()};
if (this.startDate !== initStartDate) {
}
} else if (type == 'end') {
this.disabledEDate = {to: this.startDate, from: initEndDate};
}
} else if (type == 'end') {
this.disabledEDate = {to: this.startDate, from: initEndDate};
if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: this.endDate};
if (this.endDate !== initEndDate) {
this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: this.endDate};
}
}
} else {
this.disabledSDate = {to: new Date(), from: new Date()};
if (this.startDate !== initStartDate) {
this.disabledEDate = {to: new Date(), from: new Date()};
}
}
}
},
customFormatter: function (date) {

View File

@@ -54,10 +54,7 @@ export default {
},
methods : {
search: function(isKeep) {
},
setUserInfo (props){
this.$emit('event-data', props)
this.UserListPopClose();

View File

@@ -5,6 +5,7 @@ import AuthModify from '../views/AuthModify'
import BatchList from '../views/BatchList'
import BatchDetail from '../views/BatchDetail'
import NotiList from '../views/NotiList'
import WorkState from '../views/WorkState'
export default [
{
@@ -39,7 +40,7 @@ export default [
meta: { public: false }
},
{
path: '/sysMgt/batchDetail/:batchId',
path: '/sysMgt/batchDetail',
component: BatchDetail,
name: 'batchDetail',
meta: { public: false }
@@ -49,6 +50,12 @@ export default [
component: NotiList,
name: 'notiList',
meta: { public: false }
},
{
path: '/sysMgt/workState',
component: WorkState,
name: 'workState',
meta: { public: false }
}
]

View File

@@ -85,6 +85,14 @@ const notiList = (params) => {
return httpClient.post('/api/v1/bo/sysMgt/notiList', params, { withCredentials: false })
}
const setWorkState = (params) => {
return httpClient.post('/api/v1/bo/sysMgt/setWorkState', params, { withCredentials: false })
}
const svcCheckList = (params) => {
return httpClient.post('/api/v1/bo/sysMgt/svcCheckList', params, { withCredentials: false })
}
export default {
insertAdmin,
@@ -104,5 +112,7 @@ export default {
batchList,
batchDetail,
batchExecuteJob,
notiList
notiList,
setWorkState,
svcCheckList,
}

View File

@@ -9,7 +9,7 @@
<div class="search_wrap">
<div class="group">
<h3>
<label for="right" class="label">배치 ID | {{ this.batchId }} </label>
<label for="right" class="label">배치 ID | {{ this.batchId }} | {{ this.batchNm }} | {{ this.batchType }} </label>
</h3>
</div>
<div class="group">
@@ -57,10 +57,9 @@
<div class="term">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
v-model="strDate"
:language="ko"
:format="customFormatter"
v-model="strDate"
></vuejs-datepicker>
</span>
</div>
@@ -107,7 +106,7 @@ export default {
name: 'batchDetail',
data() {
return {
//paramBatchId : this.$route.params.batchId,
paramBatchId : this.$route.params.batchId,
//날짜 조회
ko: vdp_translation_ko.js,
periodDay: 7,
@@ -120,8 +119,9 @@ export default {
pageType: 'CALC',
batchId : this.$route.params.batchId,
batchNm : this.$route.params.batchNm,
batchId : this.$route.params.props.batchId,
batchNm : this.$route.params.props.batchNm,
batchType: this.$route.params.props.batchType,
//상태조회
sttusCd: '',
@@ -154,6 +154,8 @@ export default {
noDataStr: '검색 결과가 없습니다.',
params: {
batchId : '',
batchType: '',
batchNm: '',
sttusCd: '',
startDt: '',
endDt: '',
@@ -220,6 +222,8 @@ export default {
startDt: moment(this.startDate).format('YYYYMMDD'),
endDt: moment(this.endDate).format('YYYYMMDD'),
batchId: this.batchId,
batchNm: this.batchNm,
batchType: this.batchType,
sttusCd: this.sttusCd
}
this.$refs.table.search(this.grid.params, isKeep);
@@ -291,10 +295,14 @@ export default {
},
async runExecuteJob(){
console.log("this.strDate",this.strDate)
const params = {
strDate : this.strDate,
batchId : this.batchId
strDate : moment(this.strDate).format('YYYY-MM-DD'),
batchId : this.batchId,
batchType : this.batchType,
batchNm : this.batchNm,
}
console.log("params",params)
try {
const response = await sysMgtApi.batchExecuteJob(params);

View File

@@ -7,13 +7,21 @@
</div>
<div class="table">
<custom-grid ref="table" :url="grid.url" :columns="grid.columns"></custom-grid>
<router-link
:to="{
name: 'batchDetail',
params: { batchId : 'BATCH_003'}
}">
</router-link>
</div>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
import batchDetail from './BatchDetail.vue'
class CustomATagRenderer {
constructor(props) {
@@ -62,7 +70,7 @@ export default {
renderer: {
type: CustomATagRenderer,
options: {
callback: this.batchDetail,
callback: this.goBatchDetail,
},
},
},
@@ -77,6 +85,7 @@ export default {
},
components: {
customGrid: customGrid,
batchDetail: batchDetail,
},
created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
@@ -112,9 +121,12 @@ export default {
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
batchDetail(props) {
this.row.batchId = props.batchId;
this.$router.push({ path: `/sysMgt/batchDetail/${props.batchId}`, params: this.row });
goBatchDetail(props) {
// this.row = props
// console.log("props1",props.getters)
// console.log("props2",props)
this.$router.push({ name: "batchDetail", params: {props: props} });
},
sendStoreData: function () {
const getP = this.$refs.table.getPagination();

View File

@@ -0,0 +1,332 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">서비스 점검 설정</h3>
<p class="breadcrumb">서비스 점검 설정</p>
</div>
<div class="search_wrap">
<div class="group">
<div class="input_box cal">
<label for="right" class="label">기간설정</label>
<div class="term">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
v-model="startDate"
@closed="closeDate('start')"
></vuejs-datepicker>
</span>
</div>
</div>
<div style="margin-right: 20px;">
<label for="right" class="label">시작시간</label>
<div class="term">
<span class="custom_input icon_date">
<vue-timepicker v-model="startTime" :minuteInterval="10"></vue-timepicker>
</span>
</div>
</div>
<div style="margin-right: 30px;">
<label for="right" class="label">종료시간</label>
<div class="term">
<span class="custom_input icon_date">
<vue-timepicker v-model="endTime" :minuteInterval="10"></vue-timepicker>
</span>
</div>
</div>
<div>
<input type="radio" v-model="state" name="state" value="USE" id="popup_radio1">
<label for="popup_radio1" style="margin-right: 20px;">사용</label>
<input type="radio" v-model="state" name="state" value="NOTUSE" id="popup_radio2">
<label for="popup_radio2" style="margin-right: 30px;">점검중</label>
</div>
<div>
<button type="button" class="button grey" @click="fnSaveTxt">저장</button>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:columns="grid.columns"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
></custom-grid>
</div>
<!-- <common-modal ref="commonModal" /> -->
<common-modal ref="commonModal"/>
</div>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
import moment from 'moment';
import VueTimepicker from 'vue2-timepicker';
import 'vue2-timepicker/dist/VueTimepicker.css'
import sysMgtApi from '../service/sysMgtApi'
import CommonModal from '../components/commonModal.vue';
export default {
name: 'workState',
data() {
return {
isFocused: false,
//날짜 조회
ko: vdp_translation_ko.js,
periodDay: 7,
sDateDiv: 'day',
startDate: new Date(),
disabledSDate: '',
startDateOptions: {disabledDate: this.disabledStDate},
totalItems: 0,
row: {},
grid: {
url: '/api/v1/bo/sysMgt/svcCheckList',
pagePerRows: 50,
pagination: true,
addCls: 'box_OFvis',
initialRequest: false,
columns: [
{ name: 'ymd', header: '날짜', align: 'center', width: '15%' },
{ name: 'strHd', header: '시작시간', align: 'center', width: '15%' },
{ name: 'endHd', header: '종료시간', align: 'center', width: '15%' },
{ name: 'workState', header: '상태 변경', align: 'center', width: '20%' },
],
noDataStr: '발송 내역이 없습니다.',
params: {
ymd: '',
strHd: '',
endHd: '',
workState: '',
},
startTime : '',
endTime : '',
state: 'use'
},
startTime : '',
endTime : '',
state: 'USE',
startDate2 :'',
startTimeT2: '',
startTimeM2: '',
endTimeT2 : '',
endTimeM2: '',
};
},
components: {
customGrid: customGrid,
vuejsDatepicker,
VueTimepicker,
CommonModal,
},
created() {
this.setPeriodDay(0);
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
page: 1,
perPage: 50,
});
},
mounted() {
let page = 1;
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false;
/*
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
}
*/
this.grid.pagePerRows = 50;
page = 1;
this.search(isKeep);
},
methods: {
fnSaveTxt(){
let params = {
startDate : moment(this.startDate).format('YYYY-MM-DD'),
startTimeT : '',
startTimeM : '',
endTimeT : '',
endTimeM : '',
state : this.state,
}
this.startDate2 = moment(this.startDate).format('YYYY-MM-DD');
this.startTimeT2 = moment(this.startTime, 'HH:mm').format('HH');
this.startTimeM2 = moment(this.startTime, 'HH:mm').format('mm');
this.endTimeT2 = moment(this.endTime, 'HH:mm').format('HH');
this.endTimeM2 = moment(this.endTime, 'HH:mm').format('mm');
if (this.startTime) {
params.startTimeT = moment(this.startTime, 'HH:mm').format('HH');
params.startTimeM = moment(this.startTime, 'HH:mm').format('mm');
}
if (this.endTime) {
params.endTimeT = moment(this.endTime, 'HH:mm').format('HH');
params.endTimeM = moment(this.endTime, 'HH:mm').format('mm');
}
if(params.startTimeT == ''){
this.row.title = '서비스 점검 설정';
this.row.msg1 = '시작시간을 설정해 주세요 ';
this.$refs.commonModal.alertSysModalOpen(this.row);
return false;
}
if(params.startTimeM== ''){
this.row.title = '서비스 점검 설정';
this.row.msg1 = '시작시간을 설정해 주세요 ';
this.$refs.commonModal.alertSysModalOpen(this.row);
return false;
}
if(params.endTimeT== ''){
this.row.title = '서비스 점검 설정';
this.row.msg1 = '종료시간을 설정해 주세요 ';
this.$refs.commonModal.alertSysModalOpen(this.row);
return false;
}
if(params.endTimeM== ''){
this.row.title = '서비스 점검 설정';
this.row.msg1 = '종료시간을 설정해 주세요 ';
this.$refs.commonModal.alertSysModalOpen(this.row);
return false;
}
// 사용 && 점검중 선택
if (this.state == 'NOTUSE') {
this.row.title = '서비스 점검 설정';
this.row.msg1 = '저장 하시겠습니까?';
this.$refs.commonModal.confirmModalOpen(this.row);
}else{
this.setState(params);
}
},
async setState(){
let params = {
startDate : this.startDate2,
startTimeT : this.startTimeT2,
startTimeM : this.startTimeM2,
endTimeT : this.endTimeT2,
endTimeM : this.endTimeM2,
state : this.state,
}
try {
let response = await sysMgtApi.setWorkState(params);
const result = response.data;
if (result != null && result.retCode == "0000"){
// 저장이 완료된 후에 테이블 다시 로드
this.$refs.table.reloadData();
return;
} else {
this.row.title = '서비스 점검 설정';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commonModal.alertSysModalOpen(this.row);
return false;
}
} catch (error) {
this.row.title = '서비스 점검 설정';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commonModal.alertSysModalOpen(this.row);
return false;
}
},
confirmCalbackFnc(props) {
if (props.result) {
this.setState();
}
},
search: function (isKeep) {
this.$refs.table.search(this.grid.params, isKeep);
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params,
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
},
changePerPage: function () {
// 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
this.search(true);
},
sendStoreData: function () {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
},
setPeriodDay(day) {
this.periodDay = day;
this.initSetStartDate();
this.initSetEndDate();
this.closeDate('start');
},
customFormatter: function (date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
}
},
closeDate(type){
if (type != undefined && type != null){
let initStartDate = new Date();
let initEndDate = new Date();
initStartDate.setDate(Number(moment(initStartDate).format('DD'))+365 );
initEndDate.setDate(Number(moment(initEndDate).format('DD')) -1)
this.disabledSDate = {to: initEndDate, from: initStartDate};
if (this.startDate !== initStartDate) {
this.disabledSDate = {to: initEndDate, from: initStartDate};
}
}
},
initSetStartDate() {
let initStartDate = new Date();
initStartDate.setDate(Number(moment(initStartDate).format('DD'))+365 );
this.startDate = initStartDate;
},
initSetEndDate(){
let initEndDate = new Date();
initEndDate.setDate(Number(moment(initEndDate).format('DD')) )
this.startDate = initEndDate;
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
params: this.grid.params,
});
// 라우트 하기전 실행
next();
},
}
};
</script>