Compare commits
No commits in common. "607bba164f5c4a1b42620f441afc2f8ebead2c55" and "408c7a13f3eb190378101416728c5bcd26df1ea0" have entirely different histories.
607bba164f
...
408c7a13f3
|
|
@ -205,26 +205,9 @@ function departmentDynamicOption(targetTagName, code, defaultOptionName='') {
|
||||||
$(targetTagName).empty();
|
$(targetTagName).empty();
|
||||||
let option = '';
|
let option = '';
|
||||||
organConfigList.forEach(function (organConfig) {
|
organConfigList.forEach(function (organConfig) {
|
||||||
if (organConfig.parentOrgan != null && organConfig.organType !== 'OGC002' && organConfig.parentOrgan === code) {
|
if (organConfig.parentOrgan != null && organConfig.organType != 'OGC002' && organConfig.parentOrgan == code) {
|
||||||
option += '<option value="' + organConfig.organCd + '">' + organConfig.organNm + '</option>';
|
option += '<option value="' + organConfig.organCd + '">' + organConfig.organNm + '</option>';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(targetTagName).append('<option value="">' + defaultOptionName + '선택</option>' + option);
|
$(targetTagName).append('<option value="">' + defaultOptionName + '선택</option>' + option);
|
||||||
}
|
}
|
||||||
|
|
||||||
function dateTimeCalc(startDateTime, endDateTime) {
|
|
||||||
if (startDateTime !== '' &&endDateTime !== '' && startDateTime !== undefined && endDateTime !== undefined) {
|
|
||||||
const startDate = new Date(startDateTime);
|
|
||||||
const endDate = new Date(endDateTime);
|
|
||||||
|
|
||||||
let diffTime = endDate.getTime() - startDate.getTime();
|
|
||||||
|
|
||||||
const day = Math.floor(diffTime / (1000* 60 * 60 * 24));
|
|
||||||
const hour = Math.floor((diffTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
|
||||||
const minute = Math.floor((diffTime % (1000 * 60 * 60)) / (1000 * 60));
|
|
||||||
|
|
||||||
return day + '일' + hour + '시간' + minute + '분';
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
@ -459,3 +459,20 @@ function getToday() {
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
var year = date.getFullYear();
|
var year = date.getFullYear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dateTimeCalc(startDateTime, endDateTime) {
|
||||||
|
if (startDateTime != '' &&endDateTime != '' && startDateTime != undefined && endDateTime != undefined) {
|
||||||
|
const startDate = new Date(startDateTime);
|
||||||
|
const endDate = new Date(endDateTime);
|
||||||
|
|
||||||
|
let diffTime = endDate.getTime() - startDate.getTime();
|
||||||
|
|
||||||
|
const day = Math.floor(diffTime / (1000* 60 * 60 * 24));
|
||||||
|
const hour = Math.floor((diffTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||||
|
const minute = Math.floor((diffTime % (1000 * 60 * 60)) / (1000 * 60));
|
||||||
|
|
||||||
|
return day + '일' + hour + '시간' + minute + '분';
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue