2026-02-14 홈페이지 컨텐츠 등록/수정/목록 수정
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,8 @@
|
|||||||
,HCB.HASHTAG
|
,HCB.HASHTAG
|
||||||
,DATE_FORMAT(HCB.REG_DATE, '%Y-%m-%d') as REG_DT
|
,DATE_FORMAT(HCB.REG_DATE, '%Y-%m-%d') as REG_DT
|
||||||
,MM.NAME as REG_NM
|
,MM.NAME as REG_NM
|
||||||
|
,DATE_FORMAT(HCB.EVENT_START_DT, '%Y-%m-%d') as START_DT
|
||||||
|
,DATE_FORMAT(HCB.EVENT_END_DT, '%Y-%m-%d') as END_DT
|
||||||
FROM HP_CATEGORY HC,
|
FROM HP_CATEGORY HC,
|
||||||
HP_CONTENTS_BBS HCB,
|
HP_CONTENTS_BBS HCB,
|
||||||
(SELECT * FROM MU_MEMBER WHERE USE_YN = 'Y') MM
|
(SELECT * FROM MU_MEMBER WHERE USE_YN = 'Y') MM
|
||||||
@@ -86,6 +88,8 @@
|
|||||||
,HAF.FILE_PATH as CONTENT_IMG_PATH
|
,HAF.FILE_PATH as CONTENT_IMG_PATH
|
||||||
,HCB.OLD_CRM_ITEM_ID
|
,HCB.OLD_CRM_ITEM_ID
|
||||||
,HCB.ORD_NO
|
,HCB.ORD_NO
|
||||||
|
,DATE_FORMAT(HCB.EVENT_START_DT, '%Y-%m-%d') as START_DT
|
||||||
|
,DATE_FORMAT(HCB.EVENT_END_DT, '%Y-%m-%d') as END_DT
|
||||||
FROM HP_CONTENTS_BBS AS HCB
|
FROM HP_CONTENTS_BBS AS HCB
|
||||||
LEFT OUTER JOIN HP_ATTACH_FILE HAF ON HAF.ATTACHFILE_ID = HCB.CONTENTS_ATTACHFILE_ID
|
LEFT OUTER JOIN HP_ATTACH_FILE HAF ON HAF.ATTACHFILE_ID = HCB.CONTENTS_ATTACHFILE_ID
|
||||||
LEFT OUTER JOIN HP_ATTACH_FILE HAF2 ON HAF2.ATTACHFILE_ID = HCB.THUMBNAIL_ATTACHFILE_ID
|
LEFT OUTER JOIN HP_ATTACH_FILE HAF2 ON HAF2.ATTACHFILE_ID = HCB.THUMBNAIL_ATTACHFILE_ID
|
||||||
@@ -141,6 +145,8 @@
|
|||||||
,MOD_DATE
|
,MOD_DATE
|
||||||
,OLD_CRM_ITEM_ID
|
,OLD_CRM_ITEM_ID
|
||||||
,ORD_NO
|
,ORD_NO
|
||||||
|
,EVENT_START_DT
|
||||||
|
,EVENT_END_DT
|
||||||
)VALUES(
|
)VALUES(
|
||||||
#{categoryDivCd}
|
#{categoryDivCd}
|
||||||
,#{categoryNo}
|
,#{categoryNo}
|
||||||
@@ -160,6 +166,8 @@
|
|||||||
,(SELECT MAX(ORD_NO) + 1
|
,(SELECT MAX(ORD_NO) + 1
|
||||||
FROM HP_CONTENTS_BBS as TEMP
|
FROM HP_CONTENTS_BBS as TEMP
|
||||||
WHERE CATEGORY_DIV_CD = #{categoryDivCd} AND CATEGORY_NO = #{categoryNo})
|
WHERE CATEGORY_DIV_CD = #{categoryDivCd} AND CATEGORY_NO = #{categoryNo})
|
||||||
|
,NULLIF(#{eventStartDt}, '')
|
||||||
|
,NULLIF(#{eventEndDt}, '')
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -264,6 +272,8 @@
|
|||||||
,CONTENT = #{content}
|
,CONTENT = #{content}
|
||||||
,THUMBNAIL_BOTTOM_TXT = #{thumbnailBottomTxt}
|
,THUMBNAIL_BOTTOM_TXT = #{thumbnailBottomTxt}
|
||||||
,HASHTAG = #{hashtag}
|
,HASHTAG = #{hashtag}
|
||||||
|
,EVENT_START_DT = NULLIF(#{eventStartDt}, '')
|
||||||
|
,EVENT_END_DT = NULLIF(#{eventEndDt}, '')
|
||||||
<if test="@org.springframework.util.StringUtils@hasLength(thumbnailAttachfileId)">
|
<if test="@org.springframework.util.StringUtils@hasLength(thumbnailAttachfileId)">
|
||||||
,THUMBNAIL_ATTACHFILE_ID = #{thumbnailAttachfileId}
|
,THUMBNAIL_ATTACHFILE_ID = #{thumbnailAttachfileId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
4
src/main/resources/static/css/web/datepicker-fix.css
Normal file
4
src/main/resources/static/css/web/datepicker-fix.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/* Fix datepicker z-index issue */
|
||||||
|
.ui-datepicker {
|
||||||
|
z-index: 9999 !important;
|
||||||
|
}
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 로그아웃
|
* 로그아웃
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_logout(){
|
function fn_logout() {
|
||||||
window.location ='/weblogin/logout.do';
|
window.location = '/weblogin/logout.do';
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 로그아웃(session 종료)
|
* 로그아웃(session 종료)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_sessionLogout(){
|
function fn_sessionLogout() {
|
||||||
if(checkMobile()){
|
if (checkMobile()) {
|
||||||
getLoginInfo();
|
getLoginInfo();
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
window.location ='/weblogin/logout.do';
|
window.location = '/weblogin/logout.do';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,23 +28,23 @@ function fn_numberFormat(str) {
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 페이지 이동
|
* 페이지 이동
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_leftFormAction(action){
|
function fn_leftFormAction(action) {
|
||||||
let newForm = $("<form><form/>");
|
let newForm = $("<form><form/>");
|
||||||
newForm.attr("name","submitForm");
|
newForm.attr("name", "submitForm");
|
||||||
newForm.attr("method","POST");
|
newForm.attr("method", "POST");
|
||||||
|
|
||||||
if(-1 != action.indexOf("?")) {
|
if (-1 != action.indexOf("?")) {
|
||||||
let actionArr = action.split('?');
|
let actionArr = action.split('?');
|
||||||
newForm.attr("action",actionArr[0]);
|
newForm.attr("action", actionArr[0]);
|
||||||
|
|
||||||
let paramUrlArr = actionArr[1].split('&');
|
let paramUrlArr = actionArr[1].split('&');
|
||||||
for(let i = 0; i < paramUrlArr.length; i++){
|
for (let i = 0; i < paramUrlArr.length; i++) {
|
||||||
let paramArr = paramUrlArr[i].split('=');
|
let paramArr = paramUrlArr[i].split('=');
|
||||||
newForm.append($('<input/>',{type:'hidden',name:paramArr[0],value:paramArr[1]}));
|
newForm.append($('<input/>', { type: 'hidden', name: paramArr[0], value: paramArr[1] }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newForm.attr("action",action);
|
newForm.attr("action", action);
|
||||||
}
|
}
|
||||||
|
|
||||||
// newForm.append($('<input/>',{type:'hidden',name:"menuCode",value:menuCode}));
|
// newForm.append($('<input/>',{type:'hidden',name:"menuCode",value:menuCode}));
|
||||||
@@ -55,26 +55,26 @@ function fn_leftFormAction(action){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 페이지 이동2
|
* 페이지 이동2
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_leftFormAction2(menuClass, action){
|
function fn_leftFormAction2(menuClass, action) {
|
||||||
let newForm = $("<form><form/>");
|
let newForm = $("<form><form/>");
|
||||||
newForm.attr("name","submitForm");
|
newForm.attr("name", "submitForm");
|
||||||
newForm.attr("method","POST");
|
newForm.attr("method", "POST");
|
||||||
|
|
||||||
if(-1 != action.indexOf("?")) {
|
if (-1 != action.indexOf("?")) {
|
||||||
let actionArr = action.split('?');
|
let actionArr = action.split('?');
|
||||||
newForm.attr("action",actionArr[0]);
|
newForm.attr("action", actionArr[0]);
|
||||||
|
|
||||||
let paramUrlArr = actionArr[1].split('&');
|
let paramUrlArr = actionArr[1].split('&');
|
||||||
for(let i = 0; i < paramUrlArr.length; i++){
|
for (let i = 0; i < paramUrlArr.length; i++) {
|
||||||
let paramArr = paramUrlArr[i].split('=');
|
let paramArr = paramUrlArr[i].split('=');
|
||||||
newForm.append($('<input/>',{type:'hidden',name:paramArr[0],value:paramArr[1]}));
|
newForm.append($('<input/>', { type: 'hidden', name: paramArr[0], value: paramArr[1] }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newForm.attr("action",action);
|
newForm.attr("action", action);
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.append($('<input/>',{type:'hidden',name:"menuClass",value:menuClass}));
|
newForm.append($('<input/>', { type: 'hidden', name: "menuClass", value: menuClass }));
|
||||||
newForm.appendTo('body');
|
newForm.appendTo('body');
|
||||||
newForm.submit();
|
newForm.submit();
|
||||||
}
|
}
|
||||||
@@ -82,24 +82,24 @@ function fn_leftFormAction2(menuClass, action){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 새창 이동 (미리보기)
|
* 새창 이동 (미리보기)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_openPopup(action){
|
function fn_openPopup(action) {
|
||||||
let newForm = $("<form><form/>");
|
let newForm = $("<form><form/>");
|
||||||
newForm.attr("name","submitForm");
|
newForm.attr("name", "submitForm");
|
||||||
newForm.attr("method","POST");
|
newForm.attr("method", "POST");
|
||||||
newForm.attr("target","_blank");
|
newForm.attr("target", "_blank");
|
||||||
|
|
||||||
if(-1 != action.indexOf("?")) {
|
if (-1 != action.indexOf("?")) {
|
||||||
let actionArr = action.split('?');
|
let actionArr = action.split('?');
|
||||||
newForm.attr("action",actionArr[0]);
|
newForm.attr("action", actionArr[0]);
|
||||||
|
|
||||||
let paramUrlArr = actionArr[1].split('&');
|
let paramUrlArr = actionArr[1].split('&');
|
||||||
for(let i = 0; i < paramUrlArr.length; i++){
|
for (let i = 0; i < paramUrlArr.length; i++) {
|
||||||
let paramArr = paramUrlArr[i].split('=');
|
let paramArr = paramUrlArr[i].split('=');
|
||||||
newForm.append($('<input/>',{type:'hidden',name:paramArr[0],value:paramArr[1]}));
|
newForm.append($('<input/>', { type: 'hidden', name: paramArr[0], value: paramArr[1] }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newForm.attr("action",action);
|
newForm.attr("action", action);
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.appendTo('body');
|
newForm.appendTo('body');
|
||||||
@@ -109,29 +109,29 @@ function fn_openPopup(action){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 새창 이동2 (미리보기)
|
* 새창 이동2 (미리보기)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_openPopup2(menuClass, action){
|
function fn_openPopup2(menuClass, action) {
|
||||||
const newWindow = window.open("about:blank", "popup", "width=1600, height=800");
|
const newWindow = window.open("about:blank", "popup", "width=1600, height=800");
|
||||||
|
|
||||||
let newForm = $("<form><form/>");
|
let newForm = $("<form><form/>");
|
||||||
newForm.attr("name","submitForm");
|
newForm.attr("name", "submitForm");
|
||||||
newForm.attr("method","POST");
|
newForm.attr("method", "POST");
|
||||||
newForm.attr("target","popup");
|
newForm.attr("target", "popup");
|
||||||
|
|
||||||
if(-1 != action.indexOf("?")) {
|
if (-1 != action.indexOf("?")) {
|
||||||
let actionArr = action.split('?');
|
let actionArr = action.split('?');
|
||||||
newForm.attr("action",actionArr[0]);
|
newForm.attr("action", actionArr[0]);
|
||||||
|
|
||||||
let paramUrlArr = actionArr[1].split('&');
|
let paramUrlArr = actionArr[1].split('&');
|
||||||
for(let i = 0; i < paramUrlArr.length; i++){
|
for (let i = 0; i < paramUrlArr.length; i++) {
|
||||||
let paramArr = paramUrlArr[i].split('=');
|
let paramArr = paramUrlArr[i].split('=');
|
||||||
newForm.append($('<input/>',{type:'hidden',name:paramArr[0],value:paramArr[1]}));
|
newForm.append($('<input/>', { type: 'hidden', name: paramArr[0], value: paramArr[1] }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newForm.attr("action",action);
|
newForm.attr("action", action);
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.append($('<input/>',{type:'hidden',name:"menuClass",value:menuClass}));
|
newForm.append($('<input/>', { type: 'hidden', name: "menuClass", value: menuClass }));
|
||||||
newForm.appendTo('body');
|
newForm.appendTo('body');
|
||||||
newForm.submit();
|
newForm.submit();
|
||||||
}
|
}
|
||||||
@@ -139,14 +139,14 @@ function fn_openPopup2(menuClass, action){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 뒤로가기
|
* 뒤로가기
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_back(){
|
function fn_back() {
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 새로고침
|
* 새로고침
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_reload(){
|
function fn_reload() {
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,36 +154,36 @@ function fn_reload(){
|
|||||||
* 전화번호 형식 변경
|
* 전화번호 형식 변경
|
||||||
* type:0이면 중간번호 가리기
|
* type:0이면 중간번호 가리기
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_setFormatPhone(num,type){
|
function fn_setFormatPhone(num, type) {
|
||||||
if (!num) return '';
|
if (!num) return '';
|
||||||
num = String(num);
|
num = String(num);
|
||||||
let formatNum = '';
|
let formatNum = '';
|
||||||
|
|
||||||
if(11 == num.length){
|
if (11 == num.length) {
|
||||||
if(0 == type){
|
if (0 == type) {
|
||||||
formatNum = num.replace(/(\d{3})(\d{4})(\d{4})/, '$1-****-$3');
|
formatNum = num.replace(/(\d{3})(\d{4})(\d{4})/, '$1-****-$3');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
formatNum = num.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3');
|
formatNum = num.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(8 == num.length){
|
else if (8 == num.length) {
|
||||||
formatNum = num.replace(/(\d{4})(\d{4})/, '$1-$2');
|
formatNum = num.replace(/(\d{4})(\d{4})/, '$1-$2');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
if(0 == num.indexOf('02')){
|
if (0 == num.indexOf('02')) {
|
||||||
if(0 == type){
|
if (0 == type) {
|
||||||
formatNum = num.replace(/(\d{2})(\d{4})(\d{4})/, '$1-****-$3');
|
formatNum = num.replace(/(\d{2})(\d{4})(\d{4})/, '$1-****-$3');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
formatNum = num.replace(/(\d{2})(\d{4})(\d{4})/, '$1-$2-$3');
|
formatNum = num.replace(/(\d{2})(\d{4})(\d{4})/, '$1-$2-$3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
if(0 == type){
|
if (0 == type) {
|
||||||
formatNum = num.replace(/(\d{3})(\d{3})(\d{4})/, '$1-***-$3');
|
formatNum = num.replace(/(\d{3})(\d{3})(\d{4})/, '$1-***-$3');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
formatNum = num.replace(/(\d{3})(\d{3})(\d{4})/, '$1-$2-$3');
|
formatNum = num.replace(/(\d{3})(\d{3})(\d{4})/, '$1-$2-$3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,14 +195,14 @@ function fn_setFormatPhone(num,type){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 날짜 보이는 영역에 셋팅
|
* 날짜 보이는 영역에 셋팅
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_selectDateTime(paramId, paramValue){
|
function fn_selectDateTime(paramId, paramValue) {
|
||||||
$("#"+paramId).val(paramValue);
|
$("#" + paramId).val(paramValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* datePicker 생성
|
* datePicker 생성
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_datePicker(id){
|
function fn_datePicker(id) {
|
||||||
$(id).datetimepicker({
|
$(id).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'YYYY-MM-DD'
|
format: 'YYYY-MM-DD'
|
||||||
@@ -213,7 +213,7 @@ function fn_datePicker(id){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* datePicker
|
* datePicker
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_searchDatePicker(startId, endId){
|
function fn_searchDatePicker(startId, endId) {
|
||||||
$(startId).datetimepicker({
|
$(startId).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
@@ -235,7 +235,7 @@ function fn_searchDatePicker(startId, endId){
|
|||||||
$(startId).on("dp.change", function (e) {
|
$(startId).on("dp.change", function (e) {
|
||||||
$(endId).data("DateTimePicker").minDate(e.date);
|
$(endId).data("DateTimePicker").minDate(e.date);
|
||||||
|
|
||||||
if($(endId).data("DateTimePicker").date() < e.date){
|
if ($(endId).data("DateTimePicker").date() < e.date) {
|
||||||
$(endId).data("DateTimePicker").date(e.date);
|
$(endId).data("DateTimePicker").date(e.date);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -244,15 +244,15 @@ function fn_searchDatePicker(startId, endId){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* dateTimePicker 생성
|
* dateTimePicker 생성
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_dateTimePicker1(id, value){
|
function fn_dateTimePicker1(id, value) {
|
||||||
if(value){
|
if (value) {
|
||||||
$(id).datetimepicker({
|
$(id).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'HH:mm',
|
format: 'HH:mm',
|
||||||
defaultDate: moment().format('YYYY-MM-DD')+'T'+ value
|
defaultDate: moment().format('YYYY-MM-DD') + 'T' + value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$(id).datetimepicker({
|
$(id).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'HH:mm'
|
format: 'HH:mm'
|
||||||
@@ -263,7 +263,7 @@ function fn_dateTimePicker1(id, value){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* dateTimePicker 생성 (AM, PM 선택)
|
* dateTimePicker 생성 (AM, PM 선택)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_dateTimePicker2(id){
|
function fn_dateTimePicker2(id) {
|
||||||
$(id).datetimepicker({
|
$(id).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'LT'
|
format: 'LT'
|
||||||
@@ -273,7 +273,7 @@ function fn_dateTimePicker2(id){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* dateTimePicker 생성
|
* dateTimePicker 생성
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_dateTimePicker3(id){
|
function fn_dateTimePicker3(id) {
|
||||||
$(id).datetimepicker({
|
$(id).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'YYYY-MM-DD HH:mm'
|
format: 'YYYY-MM-DD HH:mm'
|
||||||
@@ -283,7 +283,7 @@ function fn_dateTimePicker3(id){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* dateTimePicker 생성 (AM, PM 선택)
|
* dateTimePicker 생성 (AM, PM 선택)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_dateMonthPicker(id){
|
function fn_dateMonthPicker(id) {
|
||||||
$(id).datetimepicker({
|
$(id).datetimepicker({
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
format: 'YYYY-MM',
|
format: 'YYYY-MM',
|
||||||
@@ -294,11 +294,11 @@ function fn_dateMonthPicker(id){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* null 확인
|
* null 확인
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_emptyYn(value){
|
function fn_emptyYn(value) {
|
||||||
if( value == "" || value == null || value == undefined || ( value != null && typeof value == "object" && !Object.keys(value).length ) ){
|
if (value == "" || value == null || value == undefined || (value != null && typeof value == "object" && !Object.keys(value).length)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,7 +319,7 @@ function fn_getToDate() {
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_getToYesterday() {
|
function fn_getToYesterday() {
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let newToDate = fn_formatToDate(toDate.getFullYear(), 4) + '-' + fn_formatToDate(toDate.getMonth() + 1, 2) + '-' + fn_formatToDate(toDate.getDate()-1, 2);
|
let newToDate = fn_formatToDate(toDate.getFullYear(), 4) + '-' + fn_formatToDate(toDate.getMonth() + 1, 2) + '-' + fn_formatToDate(toDate.getDate() - 1, 2);
|
||||||
|
|
||||||
return newToDate;
|
return newToDate;
|
||||||
}
|
}
|
||||||
@@ -332,7 +332,7 @@ function fn_formatToDate(day, number) {
|
|||||||
day = day.toString();
|
day = day.toString();
|
||||||
|
|
||||||
if (day.length < number) {
|
if (day.length < number) {
|
||||||
for (i = 0; i < number - day.length; i++){
|
for (i = 0; i < number - day.length; i++) {
|
||||||
temp += '0';
|
temp += '0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -344,10 +344,10 @@ function fn_formatToDate(day, number) {
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 날짜 요일 조회
|
* 날짜 요일 조회
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_getDayName(param){
|
function fn_getDayName(param) {
|
||||||
let paramArray = param.split('-');
|
let paramArray = param.split('-');
|
||||||
let week = new Array('일', '월', '화', '수', '목', '금', '토');
|
let week = new Array('일', '월', '화', '수', '목', '금', '토');
|
||||||
let dt = new Date(parseInt(paramArray[0]), parseInt(paramArray[1])-1, parseInt(paramArray[2]));
|
let dt = new Date(parseInt(paramArray[0]), parseInt(paramArray[1]) - 1, parseInt(paramArray[2]));
|
||||||
let dayName = week[dt.getDay()];
|
let dayName = week[dt.getDay()];
|
||||||
|
|
||||||
return dayName;
|
return dayName;
|
||||||
@@ -367,47 +367,47 @@ function fn_getDayName(param){
|
|||||||
function setFormatDate(type, param) {
|
function setFormatDate(type, param) {
|
||||||
let retureValue = param;
|
let retureValue = param;
|
||||||
|
|
||||||
if("A" == type){
|
if ("A" == type) {
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
retureValue = dateArray[0]+"년 "+dateArray[1]+"월 "+dateArray[2]+"일";
|
retureValue = dateArray[0] + "년 " + dateArray[1] + "월 " + dateArray[2] + "일";
|
||||||
}
|
}
|
||||||
else if("B" == type){
|
else if ("B" == type) {
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
retureValue = dateArray[1]+"월 "+dateArray[2]+"일";
|
retureValue = dateArray[1] + "월 " + dateArray[2] + "일";
|
||||||
}
|
}
|
||||||
else if("C" == type){
|
else if ("C" == type) {
|
||||||
let tempArray = param.split(" ");
|
let tempArray = param.split(" ");
|
||||||
let dateArray1 = tempArray[0].split("-");
|
let dateArray1 = tempArray[0].split("-");
|
||||||
let dateArray2 = tempArray[1];
|
let dateArray2 = tempArray[1];
|
||||||
|
|
||||||
retureValue = dateArray1[0]+"년 "+dateArray1[1]+"월 "+dateArray1[2]+"일 "+dateArray2;
|
retureValue = dateArray1[0] + "년 " + dateArray1[1] + "월 " + dateArray1[2] + "일 " + dateArray2;
|
||||||
}
|
}
|
||||||
else if("D" == type){
|
else if ("D" == type) {
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
retureValue = dateArray[0].substring(2, 4)+"."+dateArray[1]+"."+dateArray[2];
|
retureValue = dateArray[0].substring(2, 4) + "." + dateArray[1] + "." + dateArray[2];
|
||||||
}
|
}
|
||||||
else if("E" == type){
|
else if ("E" == type) {
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
retureValue = dateArray[0].substring(0, 4)+"."+dateArray[1]+"."+dateArray[2];
|
retureValue = dateArray[0].substring(0, 4) + "." + dateArray[1] + "." + dateArray[2];
|
||||||
}
|
}
|
||||||
else if("F" == type){
|
else if ("F" == type) {
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
const week = ['일', '월', '화', '수', '목', '금', '토'];
|
const week = ['일', '월', '화', '수', '목', '금', '토'];
|
||||||
const dayOfWeek = week[new Date(dateArray[0], dateArray[1], dateArray[2]).getDay()];
|
const dayOfWeek = week[new Date(dateArray[0], dateArray[1], dateArray[2]).getDay()];
|
||||||
|
|
||||||
retureValue = dateArray[1]+"/"+dateArray[2]+"("+dayOfWeek+")";
|
retureValue = dateArray[1] + "/" + dateArray[2] + "(" + dayOfWeek + ")";
|
||||||
}
|
}
|
||||||
else if("G" == type){
|
else if ("G" == type) {
|
||||||
// 년.월.일(요일)
|
// 년.월.일(요일)
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
const week = ['일', '월', '화', '수', '목', '금', '토'];
|
const week = ['일', '월', '화', '수', '목', '금', '토'];
|
||||||
const dayOfWeek = week[new Date(dateArray[0], dateArray[1], dateArray[2]).getDay()];
|
const dayOfWeek = week[new Date(dateArray[0], dateArray[1], dateArray[2]).getDay()];
|
||||||
|
|
||||||
retureValue = dateArray[0].substring(0, 4)+"."+dateArray[1]+"."+dateArray[2]+"("+dayOfWeek+")";
|
retureValue = dateArray[0].substring(0, 4) + "." + dateArray[1] + "." + dateArray[2] + "(" + dayOfWeek + ")";
|
||||||
}
|
}
|
||||||
else if("H" == type){
|
else if ("H" == type) {
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
retureValue = dateArray[0].substr(2, 4)+dateArray[1]+dateArray[2];
|
retureValue = dateArray[0].substr(2, 4) + dateArray[1] + dateArray[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
return retureValue;
|
return retureValue;
|
||||||
@@ -416,11 +416,11 @@ function setFormatDate(type, param) {
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 빈값 체크
|
* 빈값 체크
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_emptyCheck(param){
|
function fn_emptyCheck(param) {
|
||||||
if(param === null || param === "" || param === "null" || param === "NULL" || param === undefined || param === "undefined"){
|
if (param === null || param === "" || param === "null" || param === "NULL" || param === undefined || param === "undefined") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -428,13 +428,13 @@ function fn_emptyCheck(param){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 길이 체크
|
* 길이 체크
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_lengthCheck(str, maxLength){
|
function fn_lengthCheck(str, maxLength) {
|
||||||
let strLength = str.length;
|
let strLength = str.length;
|
||||||
|
|
||||||
if(strLength > maxLength){
|
if (strLength > maxLength) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -442,26 +442,26 @@ function fn_lengthCheck(str, maxLength){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 날짜 체크
|
* 날짜 체크
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_dateCheck(value){
|
function fn_dateCheck(value) {
|
||||||
let strLength = value.length;
|
let strLength = value.length;
|
||||||
let cnt = 0;
|
let cnt = 0;
|
||||||
let searchChar = "-"; // 찾으려는 문자
|
let searchChar = "-"; // 찾으려는 문자
|
||||||
let pos = value.indexOf(searchChar); // pos는 0의 값을 가짐
|
let pos = value.indexOf(searchChar); // pos는 0의 값을 가짐
|
||||||
|
|
||||||
if(10 == strLength){
|
if (10 == strLength) {
|
||||||
while(-1 !== pos){
|
while (-1 !== pos) {
|
||||||
cnt++;
|
cnt++;
|
||||||
pos = value.indexOf(searchChar, pos + 1) // 첫 번째 - 이후의 인덱스부터 -를 찾음
|
pos = value.indexOf(searchChar, pos + 1) // 첫 번째 - 이후의 인덱스부터 -를 찾음
|
||||||
}
|
}
|
||||||
|
|
||||||
if(2 == cnt){
|
if (2 == cnt) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// let date = value.split("-");
|
// let date = value.split("-");
|
||||||
@@ -480,26 +480,26 @@ function fn_dateCheck(value){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 날짜 시간 체크
|
* 날짜 시간 체크
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_dateTimeCheck(value){
|
function fn_dateTimeCheck(value) {
|
||||||
let strLength = value.length;
|
let strLength = value.length;
|
||||||
let cnt = 0;
|
let cnt = 0;
|
||||||
let searchChar = "-"; // 찾으려는 문자
|
let searchChar = "-"; // 찾으려는 문자
|
||||||
let pos = value.indexOf(searchChar); // pos는 0의 값을 가짐
|
let pos = value.indexOf(searchChar); // pos는 0의 값을 가짐
|
||||||
|
|
||||||
if(10 == strLength){
|
if (10 == strLength) {
|
||||||
while(-1 !== pos){
|
while (-1 !== pos) {
|
||||||
cnt++;
|
cnt++;
|
||||||
pos = value.indexOf(searchChar, pos + 1) // 첫 번째 - 이후의 인덱스부터 -를 찾음
|
pos = value.indexOf(searchChar, pos + 1) // 첫 번째 - 이후의 인덱스부터 -를 찾음
|
||||||
}
|
}
|
||||||
|
|
||||||
if(2 == cnt){
|
if (2 == cnt) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,71 +519,71 @@ function fn_dateTimeCheck(value){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 첨부파일 최대 용량
|
* 첨부파일 최대 용량
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_maxFileSize(){
|
function fn_maxFileSize() {
|
||||||
return 52428800;
|
return 52428800;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 첨부파일 최대 갯수 : 10
|
* 첨부파일 최대 갯수 : 10
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_maxFileCount(){
|
function fn_maxFileCount() {
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 첨부파일 최대 갯수 : 5
|
* 첨부파일 최대 갯수 : 5
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_maxFileCount2(){
|
function fn_maxFileCount2() {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 약관 페이지 이동
|
* 약관 페이지 이동
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_selectPolicyIntro(param){
|
function fn_selectPolicyIntro(param) {
|
||||||
let pagingParam = '?policyType='+param;
|
let pagingParam = '?policyType=' + param;
|
||||||
|
|
||||||
fn_openPopup("/webpolicy/policyDetailIntro.do"+pagingParam);
|
fn_openPopup("/webpolicy/policyDetailIntro.do" + pagingParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 기본 프로필 사진 처리
|
* 기본 프로필 사진 처리
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_setProfileUrlEmpty(param, widthParam, heightParam, index, className){
|
function fn_setProfileUrlEmpty(param, widthParam, heightParam, index, className) {
|
||||||
if(fn_emptyCheck(param)){
|
if (fn_emptyCheck(param)) {
|
||||||
if(widthParam<heightParam){
|
if (widthParam < heightParam) {
|
||||||
$("."+className+index).attr("src",param);
|
$("." + className + index).attr("src", param);
|
||||||
$("."+className+index).css("width","100%");
|
$("." + className + index).css("width", "100%");
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$("."+className+index).attr("src",param);
|
$("." + className + index).attr("src", param);
|
||||||
$("."+className+index).css("height","100%");
|
$("." + className + index).css("height", "100%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$("."+className+index).attr("src","/image/web/profile-empty.svg");
|
$("." + className + index).attr("src", "/image/web/profile-empty.svg");
|
||||||
$("."+className+index).css("width","100%");
|
$("." + className + index).css("width", "100%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 기본 프로필 사진 처리2
|
* 기본 프로필 사진 처리2
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_setProfileUrlEmpty2(fileUrlParam,widthParam, heightParam){
|
function fn_setProfileUrlEmpty2(fileUrlParam, widthParam, heightParam) {
|
||||||
let object = new Object;
|
let object = new Object;
|
||||||
if(fn_emptyCheck(fileUrlParam)){
|
if (fn_emptyCheck(fileUrlParam)) {
|
||||||
//파일 경로가 있지만 가로가 더 작은 경우
|
//파일 경로가 있지만 가로가 더 작은 경우
|
||||||
if(parseInt(widthParam)<parseInt(heightParam)){
|
if (parseInt(widthParam) < parseInt(heightParam)) {
|
||||||
object.styleValue = 'width:100%;';
|
object.styleValue = 'width:100%;';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
//경로가 있지만 세로가 더 작은 경우
|
//경로가 있지만 세로가 더 작은 경우
|
||||||
object.styleValue = 'height:100%;';
|
object.styleValue = 'height:100%;';
|
||||||
}
|
}
|
||||||
|
|
||||||
object.urlValue = fileUrlParam;
|
object.urlValue = fileUrlParam;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
//파일 경로가 없는경우
|
//파일 경로가 없는경우
|
||||||
object.urlValue = '/image/web/profile-empty.svg';
|
object.urlValue = '/image/web/profile-empty.svg';
|
||||||
object.styleValue = 'width:100%;';
|
object.styleValue = 'width:100%;';
|
||||||
@@ -595,7 +595,7 @@ function fn_setProfileUrlEmpty2(fileUrlParam,widthParam, heightParam){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 기본 프로필 사진 경로만 있을경우
|
* 기본 프로필 사진 경로만 있을경우
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_setProfileUrlSizeNone(fileUrlParam,profileIdParam,_callback){
|
function fn_setProfileUrlSizeNone(fileUrlParam, profileIdParam, _callback) {
|
||||||
let image = new Image();
|
let image = new Image();
|
||||||
image.src = fileUrlParam;
|
image.src = fileUrlParam;
|
||||||
|
|
||||||
@@ -604,31 +604,31 @@ function fn_setProfileUrlSizeNone(fileUrlParam,profileIdParam,_callback){
|
|||||||
|
|
||||||
let object = new Object;
|
let object = new Object;
|
||||||
|
|
||||||
if(!fn_emptyCheck(fileUrlParam)){
|
if (!fn_emptyCheck(fileUrlParam)) {
|
||||||
//파일 경로가 없는경우
|
//파일 경로가 없는경우
|
||||||
object.urlValue = '/image/web/profile-empty.svg';
|
object.urlValue = '/image/web/profile-empty.svg';
|
||||||
object.styleValue = 'width:100%;';
|
object.styleValue = 'width:100%;';
|
||||||
|
|
||||||
$("#"+profileIdParam).attr('src',object.urlValue).attr('style',object.styleValue);
|
$("#" + profileIdParam).attr('src', object.urlValue).attr('style', object.styleValue);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
image.onload = function () {
|
image.onload = function () {
|
||||||
widthParam = image.width;
|
widthParam = image.width;
|
||||||
heightParam = image.height;
|
heightParam = image.height;
|
||||||
//_callback();
|
//_callback();
|
||||||
|
|
||||||
//파일 경로가 있지만 가로가 더 작은 경우
|
//파일 경로가 있지만 가로가 더 작은 경우
|
||||||
if(widthParam<heightParam){
|
if (widthParam < heightParam) {
|
||||||
object.styleValue = 'width:100%;';
|
object.styleValue = 'width:100%;';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
//경로가 있지만 세로가 더 작은 경우
|
//경로가 있지만 세로가 더 작은 경우
|
||||||
object.styleValue = 'height:100%;';
|
object.styleValue = 'height:100%;';
|
||||||
}
|
}
|
||||||
|
|
||||||
object.urlValue = fileUrlParam;
|
object.urlValue = fileUrlParam;
|
||||||
|
|
||||||
$("#"+profileIdParam).attr('src',object.urlValue).attr('style',object.styleValue);
|
$("#" + profileIdParam).attr('src', object.urlValue).attr('style', object.styleValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,29 +638,29 @@ function fn_setProfileUrlSizeNone(fileUrlParam,profileIdParam,_callback){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 디데이 구하기
|
* 디데이 구하기
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_setDday(param){
|
function fn_setDday(param) {
|
||||||
if(fn_emptyCheck(param)){
|
if (fn_emptyCheck(param)) {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
|
|
||||||
let dateArray = param.split("-");
|
let dateArray = param.split("-");
|
||||||
const paramDay = new Date(dateArray[0], dateArray[1]-1, dateArray[2]);
|
const paramDay = new Date(dateArray[0], dateArray[1] - 1, dateArray[2]);
|
||||||
|
|
||||||
if(paramDay>today){
|
if (paramDay > today) {
|
||||||
const gapDay = paramDay.getTime() - today.getTime();
|
const gapDay = paramDay.getTime() - today.getTime();
|
||||||
|
|
||||||
const resultDate = Math.ceil(gapDay / (1000 * 60 * 60 * 24));
|
const resultDate = Math.ceil(gapDay / (1000 * 60 * 60 * 24));
|
||||||
|
|
||||||
return 'D-'+resultDate;
|
return 'D-' + resultDate;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
const gapDay = today.getTime() - paramDay.getTime();
|
const gapDay = today.getTime() - paramDay.getTime();
|
||||||
|
|
||||||
const resultDate = Math.ceil(gapDay / (1000 * 60 * 60 * 24))-1;
|
const resultDate = Math.ceil(gapDay / (1000 * 60 * 60 * 24)) - 1;
|
||||||
|
|
||||||
if(0==resultDate){
|
if (0 == resultDate) {
|
||||||
return 'D-day';
|
return 'D-day';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -670,21 +670,21 @@ function fn_setDday(param){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* selectBox 선택 시 색상
|
* selectBox 선택 시 색상
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_selectColor(param){
|
function fn_selectColor(param) {
|
||||||
let selectValue = $(param).val();
|
let selectValue = $(param).val();
|
||||||
|
|
||||||
if(""!=selectValue){
|
if ("" != selectValue) {
|
||||||
$(param).css("color","#121212");
|
$(param).css("color", "#121212");
|
||||||
}else{
|
} else {
|
||||||
$(param).css("color","#969696");
|
$(param).css("color", "#969696");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 프로필 화면 이동
|
* 프로필 화면 이동
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_userProfileIntro(param){
|
function fn_userProfileIntro(param) {
|
||||||
location.href = "/webuserprofile/selectListUserProfileIntro.do?userName="+param;
|
location.href = "/webuserprofile/selectListUserProfileIntro.do?userName=" + param;
|
||||||
|
|
||||||
//fn_leftFormAction2("", "/webuserprofile/selectListUserProfileIntro.do?userName="+param+"&loginId="+param2);
|
//fn_leftFormAction2("", "/webuserprofile/selectListUserProfileIntro.do?userName="+param+"&loginId="+param2);
|
||||||
}
|
}
|
||||||
@@ -692,92 +692,92 @@ function fn_userProfileIntro(param){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 검색 화면 이동
|
* 검색 화면 이동
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_searchFeedIntro(param,param2){
|
function fn_searchFeedIntro(param, param2) {
|
||||||
fn_leftFormAction2(menuClass, "/websearch/selectListSearchIntro.do?searchText=#"+param+"&searchType="+param2);
|
fn_leftFormAction2(menuClass, "/websearch/selectListSearchIntro.do?searchText=#" + param + "&searchType=" + param2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 전화번호 형식 (가운데 마스킹 처리)
|
* 전화번호 형식 (가운데 마스킹 처리)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_setFormatPhoneNumber(param){
|
function fn_setFormatPhoneNumber(param) {
|
||||||
if(fn_emptyCheck(param)){
|
if (fn_emptyCheck(param)) {
|
||||||
return param
|
return param
|
||||||
.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3')
|
.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3')
|
||||||
.split('-')
|
.split('-')
|
||||||
.reduce((pre, cur, idx) => (idx === 1 ? pre + '****' : pre + cur), '');
|
.reduce((pre, cur, idx) => (idx === 1 ? pre + '****' : pre + cur), '');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function modalCloseEvent(){
|
function modalCloseEvent() {
|
||||||
$(".loading-image-layer").hide();
|
$(".loading-image-layer").hide();
|
||||||
|
|
||||||
let modalCheck = false;
|
let modalCheck = false;
|
||||||
let modalArrLength = modalArr.length;
|
let modalArrLength = modalArr.length;
|
||||||
|
|
||||||
for(let i=0;i<modalArrLength;i++){
|
for (let i = 0; i < modalArrLength; i++) {
|
||||||
let modalName = modalArr[i];
|
let modalName = modalArr[i];
|
||||||
if(location.hash=='#'+modalName){
|
if (location.hash == '#' + modalName) {
|
||||||
modalCheck = true;
|
modalCheck = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(location.hash=='#'+modalArr[modalArr.length-1]){
|
if (location.hash == '#' + modalArr[modalArr.length - 1]) {
|
||||||
modalBackYn = 'N';
|
modalBackYn = 'N';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let modalName = modalArr[modalArr.length-1];
|
let modalName = modalArr[modalArr.length - 1];
|
||||||
|
|
||||||
modalBackYn = 'Y';
|
modalBackYn = 'Y';
|
||||||
|
|
||||||
|
|
||||||
if("commonModal"==modalName && true==modalCheck){
|
if ("commonModal" == modalName && true == modalCheck) {
|
||||||
modalEvent.close();
|
modalEvent.close();
|
||||||
}
|
}
|
||||||
else if("jobPostingApplyPopup"==modalName && true==modalCheck){
|
else if ("jobPostingApplyPopup" == modalName && true == modalCheck) {
|
||||||
$("#jobPostingApplyPopup .modal-header img").click();
|
$("#jobPostingApplyPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("contentPopup"==modalName && true==modalCheck){
|
else if ("contentPopup" == modalName && true == modalCheck) {
|
||||||
$("#contentPopup .modal-header img").click();
|
$("#contentPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("areaPopup"==modalName && true==modalCheck){
|
else if ("areaPopup" == modalName && true == modalCheck) {
|
||||||
$("#areaPopup .modal-header img").click();
|
$("#areaPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("jobPopup"==modalName && true==modalCheck){
|
else if ("jobPopup" == modalName && true == modalCheck) {
|
||||||
$("#jobPopup .modal-header img").click();
|
$("#jobPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("userFeedTagPopup"==modalName && true==modalCheck){
|
else if ("userFeedTagPopup" == modalName && true == modalCheck) {
|
||||||
$("#userFeedTagPopup .modal-header img").click();
|
$("#userFeedTagPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("feedCommentPopup"==modalName && true==modalCheck){
|
else if ("feedCommentPopup" == modalName && true == modalCheck) {
|
||||||
$("#feedCommentPopup .modal-header img").click();
|
$("#feedCommentPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("branchPopup"==modalName && true==modalCheck){
|
else if ("branchPopup" == modalName && true == modalCheck) {
|
||||||
$("#branchPopup .modal-header img").click();
|
$("#branchPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("userTagPopup"==modalName && true==modalCheck){
|
else if ("userTagPopup" == modalName && true == modalCheck) {
|
||||||
$("#userTagPopup .modal-header img").click();
|
$("#userTagPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("feedAndCommentPopup"==modalName && true==modalCheck){
|
else if ("feedAndCommentPopup" == modalName && true == modalCheck) {
|
||||||
$("#feedAndCommentPopup .modal-header img").click();
|
$("#feedAndCommentPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("branchSelectPopup"==modalName && true==modalCheck){
|
else if ("branchSelectPopup" == modalName && true == modalCheck) {
|
||||||
$("#branchSelectPopup .modal-header img").click();
|
$("#branchSelectPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("interestKeywordTagPopup"==modalName && true==modalCheck){
|
else if ("interestKeywordTagPopup" == modalName && true == modalCheck) {
|
||||||
$("#interestKeywordTagPopup .modal-header img").click();
|
$("#interestKeywordTagPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
//hash명이 정의되지않은 이름일시 팝업 전부 닫기
|
//hash명이 정의되지않은 이름일시 팝업 전부 닫기
|
||||||
|
|
||||||
let modalArrLength = modalArr.length;
|
let modalArrLength = modalArr.length;
|
||||||
|
|
||||||
for(let i=0;i<modalArrLength;i++){
|
for (let i = 0; i < modalArrLength; i++) {
|
||||||
fn_modalBackCloseEvent(modalArr[modalArr.length-1]);
|
fn_modalBackCloseEvent(modalArr[modalArr.length - 1]);
|
||||||
}
|
}
|
||||||
modalArr = new Array();
|
modalArr = new Array();
|
||||||
}
|
}
|
||||||
@@ -785,87 +785,87 @@ function modalCloseEvent(){
|
|||||||
|
|
||||||
const scrollPosition = pageYOffset;
|
const scrollPosition = pageYOffset;
|
||||||
|
|
||||||
if(0==modalArr.length){
|
if (0 == modalArr.length) {
|
||||||
//팝업이 다 닫혀있다면 새로고침 켜기
|
//팝업이 다 닫혀있다면 새로고침 켜기
|
||||||
window.scrollTo(0,scrollPosition+1);
|
window.scrollTo(0, scrollPosition + 1);
|
||||||
|
|
||||||
//setRefreshOn();
|
//setRefreshOn();
|
||||||
}else{
|
} else {
|
||||||
//팝업이 한개라도 열려있다면 새로고침 끄기
|
//팝업이 한개라도 열려있다면 새로고침 끄기
|
||||||
//setRefreshOff();
|
//setRefreshOff();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//모달 Array에 있는 이름으로 닫기
|
//모달 Array에 있는 이름으로 닫기
|
||||||
function fn_modalBackCloseEvent(modalNameParam){
|
function fn_modalBackCloseEvent(modalNameParam) {
|
||||||
if("commonModal"==modalNameParam){
|
if ("commonModal" == modalNameParam) {
|
||||||
modalEvent.close();
|
modalEvent.close();
|
||||||
}
|
}
|
||||||
else if("jobPostingApplyPopup"==modalNameParam){
|
else if ("jobPostingApplyPopup" == modalNameParam) {
|
||||||
$("#jobPostingApplyPopup .modal-header img").click();
|
$("#jobPostingApplyPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("contentPopup"==modalNameParam){
|
else if ("contentPopup" == modalNameParam) {
|
||||||
$("#contentPopup .modal-header img").click();
|
$("#contentPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("areaPopup"==modalNameParam){
|
else if ("areaPopup" == modalNameParam) {
|
||||||
$("#areaPopup .modal-header img").click();
|
$("#areaPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("jobPopup"==modalNameParam){
|
else if ("jobPopup" == modalNameParam) {
|
||||||
$("#jobPopup .modal-header img").click();
|
$("#jobPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("userFeedTagPopup"==modalNameParam){
|
else if ("userFeedTagPopup" == modalNameParam) {
|
||||||
$("#userFeedTagPopup .modal-header img").click();
|
$("#userFeedTagPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("feedCommentPopup"==modalNameParam){
|
else if ("feedCommentPopup" == modalNameParam) {
|
||||||
$("#feedCommentPopup .modal-header img").click();
|
$("#feedCommentPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("branchPopup"==modalNameParam){
|
else if ("branchPopup" == modalNameParam) {
|
||||||
$("#branchPopup .modal-header img").click();
|
$("#branchPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("userTagPopup"==modalNameParam){
|
else if ("userTagPopup" == modalNameParam) {
|
||||||
$("#userTagPopup .modal-header img").click();
|
$("#userTagPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("feedAndCommentPopup"==modalNameParam){
|
else if ("feedAndCommentPopup" == modalNameParam) {
|
||||||
$("#feedAndCommentPopup .modal-header img").click();
|
$("#feedAndCommentPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("branchSelectPopup"==modalNameParam){
|
else if ("branchSelectPopup" == modalNameParam) {
|
||||||
$("#branchSelectPopup .modal-header img").click();
|
$("#branchSelectPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
else if("interestKeywordTagPopup"==modalNameParam){
|
else if ("interestKeywordTagPopup" == modalNameParam) {
|
||||||
$("#interestKeywordTagPopup .modal-header img").click();
|
$("#interestKeywordTagPopup .modal-header img").click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkMobile(){
|
function checkMobile() {
|
||||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 30분단위 시간값 셋팅
|
// 30분단위 시간값 셋팅
|
||||||
function fn_setTimeValue(target, defaultTime){
|
function fn_setTimeValue(target, defaultTime) {
|
||||||
let timeHTML = '';
|
let timeHTML = '';
|
||||||
|
|
||||||
for(let i = 0; i <= 23; i++){
|
for (let i = 0; i <= 23; i++) {
|
||||||
let hour = i;
|
let hour = i;
|
||||||
|
|
||||||
if(hour <10) hour = '0' + hour;
|
if (hour < 10) hour = '0' + hour;
|
||||||
|
|
||||||
if(i==0){
|
if (i == 0) {
|
||||||
timeHTML += '<li class="option_list_item first">'+hour+':00</li>';
|
timeHTML += '<li class="option_list_item first">' + hour + ':00</li>';
|
||||||
timeHTML += '<li class="option_list_item">'+hour+':30</li>';
|
timeHTML += '<li class="option_list_item">' + hour + ':30</li>';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
timeHTML += '<li class="option_list_item">'+hour+':00</li>';
|
timeHTML += '<li class="option_list_item">' + hour + ':00</li>';
|
||||||
timeHTML += '<li class="option_list_item">'+hour+':30</li>';
|
timeHTML += '<li class="option_list_item">' + hour + ':30</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$('#'+target).empty().html(timeHTML);
|
$('#' + target).empty().html(timeHTML);
|
||||||
|
|
||||||
$('#'+target).siblings("button").text(defaultTime);
|
$('#' + target).siblings("button").text(defaultTime);
|
||||||
$('#'+target).siblings("input").val(defaultTime);
|
$('#' + target).siblings("input").val(defaultTime);
|
||||||
|
|
||||||
// 옵션 선택 이벤트
|
// 옵션 선택 이벤트
|
||||||
$('#'+target + '>.option_list_item').on('click', function() {
|
$('#' + target + '>.option_list_item').on('click', function () {
|
||||||
let selectedOption = $(this).text();
|
let selectedOption = $(this).text();
|
||||||
$(this).parent().siblings("button").text(selectedOption);
|
$(this).parent().siblings("button").text(selectedOption);
|
||||||
$(this).parent().siblings("input").val(selectedOption);
|
$(this).parent().siblings("input").val(selectedOption);
|
||||||
@@ -875,10 +875,10 @@ function fn_setTimeValue(target, defaultTime){
|
|||||||
|
|
||||||
|
|
||||||
// 공백처리
|
// 공백처리
|
||||||
function fn_formatNull(param){
|
function fn_formatNull(param) {
|
||||||
if(null==param){
|
if (null == param) {
|
||||||
return '';
|
return '';
|
||||||
}else{
|
} else {
|
||||||
return param;
|
return param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ function fn_insertWebEvent() {
|
|||||||
treatmentProcedureIdList.push(item.muTreatmentProcedureId);
|
treatmentProcedureIdList.push(item.muTreatmentProcedureId);
|
||||||
});
|
});
|
||||||
|
|
||||||
//let eventStartDate = $("#eventStartDate").val();
|
let eventStartDt = $("#eventStartDt").val();
|
||||||
//let eventEndDate = $("#eventEndDate").val();
|
let eventEndDt = $("#eventEndDt").val();
|
||||||
let file = $("#file")[0].files[0];
|
let file = $("#file")[0].files[0];
|
||||||
let content_file = $("#content_file")[0].files[0];
|
let content_file = $("#content_file")[0].files[0];
|
||||||
|
|
||||||
@@ -126,6 +126,8 @@ function fn_insertWebEvent() {
|
|||||||
formData.append("treatmentprocedurelist", treatmentProcedureIdList);
|
formData.append("treatmentprocedurelist", treatmentProcedureIdList);
|
||||||
formData.append("oldCrmItemId", $("#oldCrmItemId").val());
|
formData.append("oldCrmItemId", $("#oldCrmItemId").val());
|
||||||
formData.append("ordNo", $("#ordNo").val());
|
formData.append("ordNo", $("#ordNo").val());
|
||||||
|
formData.append("eventStartDt", eventStartDt);
|
||||||
|
formData.append("eventEndDt", eventEndDt);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: encodeURI('/contentsBbs/putContentsBbs.do'),
|
url: encodeURI('/contentsBbs/putContentsBbs.do'),
|
||||||
@@ -225,10 +227,28 @@ function fn_selectListWebTreatmentPetitIntro() {
|
|||||||
* 페이지 init
|
* 페이지 init
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_pageInit() {
|
function fn_pageInit() {
|
||||||
// 날짜 datepicker
|
// 날짜 datepicker (jQuery UI)
|
||||||
fn_searchDatePicker("#eventStartDate", "#eventEndDate");
|
$("#eventStartDt, #eventEndDt").datepicker({
|
||||||
|
dateFormat: 'yy-mm-dd',
|
||||||
|
prevText: '이전 달',
|
||||||
|
nextText: '다음 달',
|
||||||
|
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||||
|
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||||
|
dayNames: ['일', '월', '화', '수', '목', '금', '토'],
|
||||||
|
dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'],
|
||||||
|
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
|
||||||
|
showMonthAfterYear: true,
|
||||||
|
yearSuffix: '년',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 시작일 오늘 날짜 세팅
|
||||||
|
$("#eventStartDt").datepicker("setDate", new Date());
|
||||||
|
|
||||||
|
if (categoryDivCd === '02' || categoryDivCd === '04') {
|
||||||
|
$("#dateSelectionRow").show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* 페이징 관련 변수 */
|
/* 페이징 관련 변수 */
|
||||||
let webTreatmentPetitTotalCount = 0;
|
let webTreatmentPetitTotalCount = 0;
|
||||||
let webTreatmentPetitTotalPages = 0;
|
let webTreatmentPetitTotalPages = 0;
|
||||||
|
|
||||||
/*aggird*/
|
/*aggird*/
|
||||||
let webTreatmentPetitAgGridData = [];
|
let webTreatmentPetitAgGridData = [];
|
||||||
@@ -11,178 +11,178 @@ let delList = [];
|
|||||||
* 검색 날짜 설정
|
* 검색 날짜 설정
|
||||||
//(A:오늘, B:3일, C:7일, D:최근30일, E:최근90일, F:이번달, G:올해, H:지난주, I:지난달)
|
//(A:오늘, B:3일, C:7일, D:최근30일, E:최근90일, F:이번달, G:올해, H:지난주, I:지난달)
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitSetDate(param){
|
function fn_webTreatmentPetitSetDate(param) {
|
||||||
if("A"==param){
|
if ("A" == param) {
|
||||||
// 오늘
|
// 오늘
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchStartDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day;
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
}
|
}
|
||||||
else if("B"==param){
|
else if ("B" == param) {
|
||||||
// 3일
|
// 3일
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
toDate.setDate(toDate.getDate() - 3);
|
toDate.setDate(toDate.getDate() - 3);
|
||||||
year = toDate.getFullYear();
|
year = toDate.getFullYear();
|
||||||
month = toDate.getMonth() + 1;
|
month = toDate.getMonth() + 1;
|
||||||
day = toDate.getDate();
|
day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchStartDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day;
|
||||||
}
|
}
|
||||||
else if("C"==param){
|
else if ("C" == param) {
|
||||||
// 이번주
|
// 이번주
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
toDate.setDate(toDate.getDate() - 7);
|
toDate.setDate(toDate.getDate() - 7);
|
||||||
year = toDate.getFullYear();
|
year = toDate.getFullYear();
|
||||||
month = toDate.getMonth() + 1;
|
month = toDate.getMonth() + 1;
|
||||||
day = toDate.getDate();
|
day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchStartDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day;
|
||||||
}
|
}
|
||||||
else if("D"==param){
|
else if ("D" == param) {
|
||||||
// 최근30일
|
// 최근30일
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
//최근30일
|
//최근30일
|
||||||
toDate.setDate(toDate.getDate() - 30);
|
toDate.setDate(toDate.getDate() - 30);
|
||||||
startYear = toDate.getFullYear();
|
startYear = toDate.getFullYear();
|
||||||
startMonth = toDate.getMonth() + 1;
|
startMonth = toDate.getMonth() + 1;
|
||||||
startDay = toDate.getDate();
|
startDay = toDate.getDate();
|
||||||
|
|
||||||
if(startMonth < 10) startMonth = "0" + startMonth;
|
if (startMonth < 10) startMonth = "0" + startMonth;
|
||||||
if(startDay < 10) startDay = "0" + startDay;
|
if (startDay < 10) startDay = "0" + startDay;
|
||||||
|
|
||||||
webTreatmentPetitSearchStartDate = startYear+'-'+startMonth+'-'+startDay;
|
webTreatmentPetitSearchStartDate = startYear + '-' + startMonth + '-' + startDay;
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if("E"==param){
|
else if ("E" == param) {
|
||||||
// 최근90일
|
// 최근90일
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
toDate.setDate(toDate.getDate() - 90);
|
toDate.setDate(toDate.getDate() - 90);
|
||||||
year = toDate.getFullYear();
|
year = toDate.getFullYear();
|
||||||
month = toDate.getMonth() + 1;
|
month = toDate.getMonth() + 1;
|
||||||
day = toDate.getDate();
|
day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchStartDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchStartDate = year + '-' + month + '-' + day;
|
||||||
}
|
}
|
||||||
else if("F"==param){
|
else if ("F" == param) {
|
||||||
//F:이번달
|
//F:이번달
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
webTreatmentPetitSearchStartDate = year+'-'+month+'-01';
|
webTreatmentPetitSearchStartDate = year + '-' + month + '-01';
|
||||||
}
|
}
|
||||||
else if("G"==param){
|
else if ("G" == param) {
|
||||||
// G:올해
|
// G:올해
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
webTreatmentPetitSearchStartDate = year+'-01-01';
|
webTreatmentPetitSearchStartDate = year + '-01-01';
|
||||||
}
|
}
|
||||||
else if("H"==param){
|
else if ("H" == param) {
|
||||||
// H:지난주, I:지난달
|
// H:지난주, I:지난달
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
webTreatmentPetitSearchStartDate = year+'-01-01';
|
webTreatmentPetitSearchStartDate = year + '-01-01';
|
||||||
}
|
}
|
||||||
else if("I"==param){
|
else if ("I" == param) {
|
||||||
// I:지난달
|
// I:지난달
|
||||||
// 검색 종료일자
|
// 검색 종료일자
|
||||||
let toDate = new Date();
|
let toDate = new Date();
|
||||||
let year = toDate.getFullYear();
|
let year = toDate.getFullYear();
|
||||||
let month = toDate.getMonth() + 1;
|
let month = toDate.getMonth() + 1;
|
||||||
let day = toDate.getDate();
|
let day = toDate.getDate();
|
||||||
|
|
||||||
if(month < 10) month = "0" + month;
|
if (month < 10) month = "0" + month;
|
||||||
if(day < 10) day = "0" + day;
|
if (day < 10) day = "0" + day;
|
||||||
|
|
||||||
webTreatmentPetitSearchEndDate = year+'-'+month+'-'+day;
|
webTreatmentPetitSearchEndDate = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
// 검색 시작일자
|
// 검색 시작일자
|
||||||
webTreatmentPetitSearchStartDate = year+'-01-01';
|
webTreatmentPetitSearchStartDate = year + '-01-01';
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#webTreatmentPetitSearchStartDate").val(webTreatmentPetitSearchStartDate).trigger("change");
|
$("#webTreatmentPetitSearchStartDate").val(webTreatmentPetitSearchStartDate).trigger("change");
|
||||||
@@ -193,14 +193,14 @@ function fn_webTreatmentPetitSetDate(param){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 이벤트 정보 리스트 조회
|
* 이벤트 정보 리스트 조회
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_selectListWebTreatmentPetitJson(){
|
function fn_selectListWebTreatmentPetitJson() {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("menuClass", menuClass);
|
formData.append("menuClass", menuClass);
|
||||||
formData.append("categoryDivCd", categoryDivCd);
|
formData.append("categoryDivCd", categoryDivCd);
|
||||||
formData.append("webTreatmentPetitSearchKeywordParam0", webTreatmentPetitSearchKeywordParam0);
|
formData.append("webTreatmentPetitSearchKeywordParam0", webTreatmentPetitSearchKeywordParam0);
|
||||||
formData.append("webTreatmentPetitSearchKeywordParam1", webTreatmentPetitSearchKeywordParam1);
|
formData.append("webTreatmentPetitSearchKeywordParam1", webTreatmentPetitSearchKeywordParam1);
|
||||||
formData.append("webTreatmentPetitSearchKeywordParam2", webTreatmentPetitSearchKeywordParam2);
|
formData.append("webTreatmentPetitSearchKeywordParam2", webTreatmentPetitSearchKeywordParam2);
|
||||||
formData.append("webTreatmentPetitSearchKeywordParam3", webTreatmentPetitSearchKeywordParam3);
|
formData.append("webTreatmentPetitSearchKeywordParam3", webTreatmentPetitSearchKeywordParam3);
|
||||||
formData.append("webTreatmentPetitSort", webTreatmentPetitSort);
|
formData.append("webTreatmentPetitSort", webTreatmentPetitSort);
|
||||||
formData.append("webTreatmentPetitDir", webTreatmentPetitDir);
|
formData.append("webTreatmentPetitDir", webTreatmentPetitDir);
|
||||||
formData.append("webTreatmentPetitStart", webTreatmentPetitStart);
|
formData.append("webTreatmentPetitStart", webTreatmentPetitStart);
|
||||||
@@ -217,29 +217,29 @@ function fn_selectListWebTreatmentPetitJson(){
|
|||||||
contentType: false,
|
contentType: false,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
async: true,
|
async: true,
|
||||||
success: function(data){
|
success: function (data) {
|
||||||
if('0'==data.msgCode){
|
if ('0' == data.msgCode) {
|
||||||
// 페이징 처리
|
// 페이징 처리
|
||||||
webTreatmentPetitTotalCount = data.totalCount;
|
webTreatmentPetitTotalCount = data.totalCount;
|
||||||
//$("#txt_noticeTotalCount").text(noticeTotalCount);
|
//$("#txt_noticeTotalCount").text(noticeTotalCount);
|
||||||
|
|
||||||
webTreatmentPetitTotalPages = Math.ceil(webTreatmentPetitTotalCount/webTreatmentPetitLimit);
|
webTreatmentPetitTotalPages = Math.ceil(webTreatmentPetitTotalCount / webTreatmentPetitLimit);
|
||||||
|
|
||||||
// 리스트 조회
|
// 리스트 조회
|
||||||
webTreatmentPetitAgGridData = data.rows;
|
webTreatmentPetitAgGridData = data.rows;
|
||||||
webTreatmentPetitGridOptions.api.setRowData(webTreatmentPetitAgGridData);
|
webTreatmentPetitGridOptions.api.setRowData(webTreatmentPetitAgGridData);
|
||||||
|
|
||||||
if(0<data.rows.length){
|
if (0 < data.rows.length) {
|
||||||
//페이징 처리
|
//페이징 처리
|
||||||
window.pagObj = $('#webTreatmentPetitPagination').twbsPagination({
|
window.pagObj = $('#webTreatmentPetitPagination').twbsPagination({
|
||||||
startPage : ((webTreatmentPetitStart/webTreatmentPetitLimit)+1),
|
startPage: ((webTreatmentPetitStart / webTreatmentPetitLimit) + 1),
|
||||||
totalPages : (webTreatmentPetitTotalPages==0)?1:webTreatmentPetitTotalPages,
|
totalPages: (webTreatmentPetitTotalPages == 0) ? 1 : webTreatmentPetitTotalPages,
|
||||||
visiblePages : 10,
|
visiblePages: 10,
|
||||||
initiateStartPageClick: false,
|
initiateStartPageClick: false,
|
||||||
prev : '<img src="/image/web/page_navigation_arrow.svg" alt="prev"/>',
|
prev: '<img src="/image/web/page_navigation_arrow.svg" alt="prev"/>',
|
||||||
next : '<img src="/image/web/page_navigation_arrow.svg" alt="next"/>',
|
next: '<img src="/image/web/page_navigation_arrow.svg" alt="next"/>',
|
||||||
first : '',
|
first: '',
|
||||||
last : '',
|
last: '',
|
||||||
onPageClick: function (treatmentpetit, page) {
|
onPageClick: function (treatmentpetit, page) {
|
||||||
fn_webTreatmentPetitPagination(page);
|
fn_webTreatmentPetitPagination(page);
|
||||||
}
|
}
|
||||||
@@ -247,22 +247,22 @@ function fn_selectListWebTreatmentPetitJson(){
|
|||||||
//console.info(page + ' (from treatmentpetit listening)');
|
//console.info(page + ' (from treatmentpetit listening)');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
modalEvent.danger("조회 오류", data.msgDesc);
|
modalEvent.danger("조회 오류", data.msgDesc);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
modalEvent.danger("조회 오류", "조회 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
modalEvent.danger("조회 오류", "조회 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||||
},
|
},
|
||||||
beforeSend:function(){
|
beforeSend: function () {
|
||||||
// 로딩열기
|
// 로딩열기
|
||||||
webTreatmentPetitGridOptions.api.showLoadingOverlay();
|
webTreatmentPetitGridOptions.api.showLoadingOverlay();
|
||||||
},
|
},
|
||||||
complete:function(){
|
complete: function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -271,8 +271,8 @@ function fn_selectListWebTreatmentPetitJson(){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 검색하기
|
* 검색하기
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitSearch(param){
|
function fn_webTreatmentPetitSearch(param) {
|
||||||
if("A"!=param && "Y"!=selectUseYn){
|
if ("A" != param && "Y" != selectUseYn) {
|
||||||
modalEvent.warning("", "조회 권한이 없습니다.");
|
modalEvent.warning("", "조회 권한이 없습니다.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -280,13 +280,13 @@ function fn_webTreatmentPetitSearch(param){
|
|||||||
fn_webTreatmentPetitPaginReset();
|
fn_webTreatmentPetitPaginReset();
|
||||||
|
|
||||||
webTreatmentPetitSearchKeywordParam0 = $("#webTreatmentPetitSearchKeyword0").val();
|
webTreatmentPetitSearchKeywordParam0 = $("#webTreatmentPetitSearchKeyword0").val();
|
||||||
webTreatmentPetitSearchKeywordParam1 = $("#webTreatmentPetitSearchKeyword1").val();
|
webTreatmentPetitSearchKeywordParam1 = $("#webTreatmentPetitSearchKeyword1").val();
|
||||||
webTreatmentPetitSearchKeywordParam2 = $("#webTreatmentPetitSearchKeyword2").val();
|
webTreatmentPetitSearchKeywordParam2 = $("#webTreatmentPetitSearchKeyword2").val();
|
||||||
webTreatmentPetitSearchKeywordParam3 = $("#webTreatmentPetitSearchKeyword3").val();
|
webTreatmentPetitSearchKeywordParam3 = $("#webTreatmentPetitSearchKeyword3").val();
|
||||||
|
|
||||||
webTreatmentPetitSearchDateType = $("#webTreatmentPetitSearchDateType").val();
|
webTreatmentPetitSearchDateType = $("#webTreatmentPetitSearchDateType").val();
|
||||||
webTreatmentPetitSearchStartDate = $("#webTreatmentPetitSearchStartDate").val();
|
webTreatmentPetitSearchStartDate = $("#webTreatmentPetitSearchStartDate").val();
|
||||||
webTreatmentPetitSearchEndDate = $("#webTreatmentPetitSearchEndDate").val();
|
webTreatmentPetitSearchEndDate = $("#webTreatmentPetitSearchEndDate").val();
|
||||||
|
|
||||||
fn_selectListWebTreatmentPetitJson();
|
fn_selectListWebTreatmentPetitJson();
|
||||||
}
|
}
|
||||||
@@ -295,14 +295,14 @@ function fn_webTreatmentPetitSearch(param){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 초기화하기
|
* 초기화하기
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitReset(){
|
function fn_webTreatmentPetitReset() {
|
||||||
fn_webTreatmentPetitSetDate('D');
|
fn_webTreatmentPetitSetDate('D');
|
||||||
$("#webTreatmentPetitSearchDateType option:eq(0)").prop("selected", true);
|
$("#webTreatmentPetitSearchDateType option:eq(0)").prop("selected", true);
|
||||||
|
|
||||||
$("#webTreatmentPetitSearchKeyword0").val("");
|
$("#webTreatmentPetitSearchKeyword0").val("");
|
||||||
$("#webTreatmentPetitSearchKeyword1").val("");
|
$("#webTreatmentPetitSearchKeyword1").val("");
|
||||||
$("#webTreatmentPetitSearchKeyword2").val("");
|
$("#webTreatmentPetitSearchKeyword2").val("");
|
||||||
$("#webTreatmentPetitSearchKeyword3").val("");
|
$("#webTreatmentPetitSearchKeyword3").val("");
|
||||||
|
|
||||||
fn_webTreatmentPetitSearch();
|
fn_webTreatmentPetitSearch();
|
||||||
}
|
}
|
||||||
@@ -310,8 +310,8 @@ function fn_webTreatmentPetitReset(){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 페이징 처리
|
* 페이징 처리
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitPagination(param){
|
function fn_webTreatmentPetitPagination(param) {
|
||||||
webTreatmentPetitStart = (parseInt(param)-1)*webTreatmentPetitLimit;
|
webTreatmentPetitStart = (parseInt(param) - 1) * webTreatmentPetitLimit;
|
||||||
|
|
||||||
fn_selectListWebTreatmentPetitJson();
|
fn_selectListWebTreatmentPetitJson();
|
||||||
}
|
}
|
||||||
@@ -319,19 +319,19 @@ function fn_webTreatmentPetitPagination(param){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 페이징 리셋
|
* 페이징 리셋
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitPaginReset(){
|
function fn_webTreatmentPetitPaginReset() {
|
||||||
webTreatmentPetitSearchKeywordParam0 = '';
|
webTreatmentPetitSearchKeywordParam0 = '';
|
||||||
webTreatmentPetitSearchKeywordParam1 = '';
|
webTreatmentPetitSearchKeywordParam1 = '';
|
||||||
webTreatmentPetitSearchKeywordParam2 = '';
|
webTreatmentPetitSearchKeywordParam2 = '';
|
||||||
webTreatmentPetitSearchKeywordParam3 = '';
|
webTreatmentPetitSearchKeywordParam3 = '';
|
||||||
|
|
||||||
webTreatmentPetitStart = 0;
|
webTreatmentPetitStart = 0;
|
||||||
webTreatmentPetitLimit = 100;
|
webTreatmentPetitLimit = 100;
|
||||||
webTreatmentPetitTotalCount = 0;
|
webTreatmentPetitTotalCount = 0;
|
||||||
webTreatmentPetitTotalPages = 0;
|
webTreatmentPetitTotalPages = 0;
|
||||||
|
|
||||||
//페이징 초기화
|
//페이징 초기화
|
||||||
if($("#webTreatmentPetitPagination").data("twbs-pagination")){
|
if ($("#webTreatmentPetitPagination").data("twbs-pagination")) {
|
||||||
$("#webTreatmentPetitPagination").twbsPagination("destroy");
|
$("#webTreatmentPetitPagination").twbsPagination("destroy");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,27 +339,27 @@ function fn_webTreatmentPetitPaginReset(){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 이벤트 삭제
|
* 이벤트 삭제
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_deleteWebTreatmentPetit(){
|
function fn_deleteWebTreatmentPetit() {
|
||||||
if("Y"!=deleteUseYn){
|
if ("Y" != deleteUseYn) {
|
||||||
modalEvent.warning("", "삭제 권한이 없습니다.");
|
modalEvent.warning("", "삭제 권한이 없습니다.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!delList){
|
if (!delList) {
|
||||||
modalEvent.warning("", "삭제할 대상을 선택하세요.");
|
modalEvent.warning("", "삭제할 대상을 선택하세요.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
modalEvent.info("삭제", "선택한 이벤트 정보를 삭제하시겠습니까?", function(){
|
modalEvent.info("삭제", "선택한 이벤트 정보를 삭제하시겠습니까?", function () {
|
||||||
/*let formData = new FormData();
|
/*let formData = new FormData();
|
||||||
formData.append("menuClass", menuClass);
|
formData.append("menuClass", menuClass);
|
||||||
formData.append("delList", delList);*/
|
formData.append("delList", delList);*/
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
menuClass: menuClass,
|
menuClass: menuClass,
|
||||||
categoryDivCd: categoryDivCd,
|
categoryDivCd: categoryDivCd,
|
||||||
delList: delList
|
delList: delList
|
||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: encodeURI('/contentsBbs/delContentsBbs.do'),
|
url: encodeURI('/contentsBbs/delContentsBbs.do'),
|
||||||
@@ -368,23 +368,23 @@ function fn_deleteWebTreatmentPetit(){
|
|||||||
contentType: 'application/json; charset=utf-8',
|
contentType: 'application/json; charset=utf-8',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
async: true,
|
async: true,
|
||||||
success: function(data){
|
success: function (data) {
|
||||||
if('0'==data.msgCode){
|
if ('0' == data.msgCode) {
|
||||||
modalEvent.success("삭제 성공", data.msgDesc, function(){
|
modalEvent.success("삭제 성공", data.msgDesc, function () {
|
||||||
fn_webTreatmentPetitOk();
|
fn_webTreatmentPetitOk();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
modalEvent.danger("삭제 오류", data.msgDesc);
|
modalEvent.danger("삭제 오류", data.msgDesc);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
modalEvent.danger("삭제 오류", "삭제 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
modalEvent.danger("삭제 오류", "삭제 중 오류가 발생하였습니다. 잠시후 다시시도하십시오.");
|
||||||
},
|
},
|
||||||
beforeSend:function(){
|
beforeSend: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
complete:function(){
|
complete: function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -394,17 +394,17 @@ function fn_deleteWebTreatmentPetit(){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 검색 엔터 이벤트
|
* 검색 엔터 이벤트
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitEnter(e){
|
function fn_webTreatmentPetitEnter(e) {
|
||||||
if(e.which){
|
if (e.which) {
|
||||||
// 파이어폭스
|
// 파이어폭스
|
||||||
if(13 == e.which) {
|
if (13 == e.which) {
|
||||||
//로그인 액션 스크립트
|
//로그인 액션 스크립트
|
||||||
fn_webTreatmentPetitSearch();
|
fn_webTreatmentPetitSearch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
// 윈도우, 사파리, 크롬
|
// 윈도우, 사파리, 크롬
|
||||||
if(13 == treatmentpetit.keyCode) {
|
if (13 == treatmentpetit.keyCode) {
|
||||||
//로그인 액션 스크립트
|
//로그인 액션 스크립트
|
||||||
fn_webTreatmentPetitSearch();
|
fn_webTreatmentPetitSearch();
|
||||||
}
|
}
|
||||||
@@ -414,50 +414,50 @@ function fn_webTreatmentPetitEnter(e){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 정렬 이벤트
|
* 정렬 이벤트
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_alignTreatmentPetit(param, param2){
|
function fn_alignTreatmentPetit(param, param2) {
|
||||||
let align = "";
|
let align = "";
|
||||||
|
|
||||||
if("A"==param){
|
if ("A" == param) {
|
||||||
align = "오늘";
|
align = "오늘";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('A');
|
fn_webTreatmentPetitSetDate('A');
|
||||||
}
|
}
|
||||||
else if("B"==param){
|
else if ("B" == param) {
|
||||||
align = "최근30일";
|
align = "최근30일";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('D');
|
fn_webTreatmentPetitSetDate('D');
|
||||||
}
|
}
|
||||||
else if("C"==param){
|
else if ("C" == param) {
|
||||||
align = "최근90일";
|
align = "최근90일";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('E');
|
fn_webTreatmentPetitSetDate('E');
|
||||||
}
|
}
|
||||||
else if("D"==param){
|
else if ("D" == param) {
|
||||||
align = "이번주";
|
align = "이번주";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('C');
|
fn_webTreatmentPetitSetDate('C');
|
||||||
}
|
}
|
||||||
else if("E"==param){
|
else if ("E" == param) {
|
||||||
align = "이번달";
|
align = "이번달";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('F');
|
fn_webTreatmentPetitSetDate('F');
|
||||||
}
|
}
|
||||||
else if("F"==param){
|
else if ("F" == param) {
|
||||||
align = "올해";
|
align = "올해";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('G');
|
fn_webTreatmentPetitSetDate('G');
|
||||||
}
|
}
|
||||||
else if("G"==param){
|
else if ("G" == param) {
|
||||||
align = "지난주";
|
align = "지난주";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('H');
|
fn_webTreatmentPetitSetDate('H');
|
||||||
}
|
}
|
||||||
else if("H"==param){
|
else if ("H" == param) {
|
||||||
align = "지난달";
|
align = "지난달";
|
||||||
|
|
||||||
fn_webTreatmentPetitSetDate('I');
|
fn_webTreatmentPetitSetDate('I');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
align = "";
|
align = "";
|
||||||
}
|
}
|
||||||
$("#webTreatmentPetitSearchDateType").val(param);
|
$("#webTreatmentPetitSearchDateType").val(param);
|
||||||
@@ -467,19 +467,19 @@ function fn_alignTreatmentPetit(param, param2){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 완료
|
* 완료
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_webTreatmentPetitOk(){
|
function fn_webTreatmentPetitOk() {
|
||||||
fn_webTreatmentPetitReset();
|
fn_webTreatmentPetitReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 등록 화면으로 이동.
|
* 등록 화면으로 이동.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_insertWebTreatmentPetitIntro(){
|
function fn_insertWebTreatmentPetitIntro() {
|
||||||
if("Y"==insertUseYn){
|
if ("Y" == insertUseYn) {
|
||||||
let pagingParam = "?menuClass="+menuClass;
|
let pagingParam = "?menuClass=" + menuClass;
|
||||||
pagingParam += "&categoryDivCd="+categoryDivCd;
|
pagingParam += "&categoryDivCd=" + categoryDivCd;
|
||||||
fn_leftFormAction("/contentsBbs/moveRegContentsBbs.do"+pagingParam);
|
fn_leftFormAction("/contentsBbs/moveRegContentsBbs.do" + pagingParam);
|
||||||
}else{
|
} else {
|
||||||
modalEvent.warning("", "등록 권한이 없습니다.");
|
modalEvent.warning("", "등록 권한이 없습니다.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -489,14 +489,14 @@ function fn_insertWebTreatmentPetitIntro(){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 수정 화면으로 이동.
|
* 수정 화면으로 이동.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_updateWebTreatmentPetitIntro(postNo, categoryNo){
|
function fn_updateWebTreatmentPetitIntro(postNo, categoryNo) {
|
||||||
if("Y"==updateUseYn){
|
if ("Y" == updateUseYn) {
|
||||||
let pagingParam = "?menuClass="+menuClass;
|
let pagingParam = "?menuClass=" + menuClass;
|
||||||
pagingParam += "&categoryDivCd="+categoryDivCd;
|
pagingParam += "&categoryDivCd=" + categoryDivCd;
|
||||||
pagingParam += "&postNo="+postNo;
|
pagingParam += "&postNo=" + postNo;
|
||||||
pagingParam += "&categoryNo="+categoryNo;
|
pagingParam += "&categoryNo=" + categoryNo;
|
||||||
fn_leftFormAction("/contentsBbs/moveContentsBbs.do"+pagingParam);
|
fn_leftFormAction("/contentsBbs/moveContentsBbs.do" + pagingParam);
|
||||||
}else{
|
} else {
|
||||||
modalEvent.warning("", "수정 권한이 없습니다.");
|
modalEvent.warning("", "수정 권한이 없습니다.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -504,16 +504,32 @@ function fn_updateWebTreatmentPetitIntro(postNo, categoryNo){
|
|||||||
|
|
||||||
|
|
||||||
let webTreatmentPetitColumnDefs = [
|
let webTreatmentPetitColumnDefs = [
|
||||||
{field: "checkbox", headerName:"", minWidth:55, maxWidth:55, headerCheckboxSelection: true, checkboxSelection: true},
|
{ field: "checkbox", headerName: "", minWidth: 55, maxWidth: 55, headerCheckboxSelection: true, checkboxSelection: true },
|
||||||
{field: "rowNum", headerName:"번호", minWidth:60, maxWidth:60,sortable: false, cellStyle:{textAlign: 'center'}},
|
{ field: "rowNum", headerName: "번호", minWidth: 60, maxWidth: 60, sortable: false, cellStyle: { textAlign: 'center' } },
|
||||||
{field: "categoryNm", headerName:"카테고리", minWidth:60},
|
{ field: "categoryNm", headerName: "카테고리", minWidth: 120, maxWidth: 130, cellStyle: { textAlign: 'center' } },
|
||||||
{field: "title", headerName:"제목", minWidth:150, cellStyle:{cursor: 'pointer', color:'#3985EA'}},
|
{ field: "title", headerName: "제목", minWidth: 150, cellStyle: { cursor: 'pointer', color: '#3985EA' } },
|
||||||
{field: "content", headerName:"내용요약", minWidth:150},
|
{ field: "content", headerName: "내용요약", minWidth: 150 },
|
||||||
{field: "hashtag", headerName:"해시태그", minWidth:150},
|
{ field: "hashtag", headerName: "해시태그", minWidth: 150 },
|
||||||
{field: "regDt", headerName:"등록일",minWidth:100, maxWidth:150},
|
{ field: "regDt", headerName: "등록일", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } },
|
||||||
{field: "regNm", headerName:"작성자",minWidth:100, maxWidth:150},
|
{ field: "regNm", headerName: "작성자", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
console.log('Current categoryDivCd:', categoryDivCd);
|
||||||
|
if (categoryDivCd === '02' || categoryDivCd === '04') {
|
||||||
|
webTreatmentPetitColumnDefs = [
|
||||||
|
{ field: "checkbox", headerName: "", minWidth: 55, maxWidth: 55, headerCheckboxSelection: true, checkboxSelection: true },
|
||||||
|
{ field: "rowNum", headerName: "번호", minWidth: 60, maxWidth: 60, sortable: false, cellStyle: { textAlign: 'center' } },
|
||||||
|
{ field: "categoryNm", headerName: "카테고리", minWidth: 120, maxWidth: 130, cellStyle: { textAlign: 'center' } },
|
||||||
|
{ field: "title", headerName: "제목", minWidth: 150, cellStyle: { cursor: 'pointer', color: '#3985EA' } },
|
||||||
|
{ field: "content", headerName: "내용요약", minWidth: 150 },
|
||||||
|
{ field: "startDt", headerName: "시작일", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } },
|
||||||
|
{ field: "endDt", headerName: "종료일", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } },
|
||||||
|
{ field: "hashtag", headerName: "해시태그", minWidth: 150 },
|
||||||
|
{ field: "regDt", headerName: "등록일", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } },
|
||||||
|
{ field: "regNm", headerName: "작성자", minWidth: 100, maxWidth: 120, cellStyle: { textAlign: 'center' } },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// let the grid know which columns and what data to use
|
// let the grid know which columns and what data to use
|
||||||
let webTreatmentPetitGridOptions = {
|
let webTreatmentPetitGridOptions = {
|
||||||
suppressRowTransform: true,
|
suppressRowTransform: true,
|
||||||
@@ -523,63 +539,63 @@ let webTreatmentPetitGridOptions = {
|
|||||||
sortable: true, //정렬 여부
|
sortable: true, //정렬 여부
|
||||||
resizable: true, //리사이즈
|
resizable: true, //리사이즈
|
||||||
editable: true, // 그리드에서 데이터 수정
|
editable: true, // 그리드에서 데이터 수정
|
||||||
cellStyle:{textAlign:'left',fontSize:'14px',padding:'0'},
|
cellStyle: { textAlign: 'left', fontSize: '14px', padding: '0' },
|
||||||
//suppressSizeToFit:true, //자동 맞춤
|
//suppressSizeToFit:true, //자동 맞춤
|
||||||
//enableRowGroup: true, // 그룹 묶음
|
//enableRowGroup: true, // 그룹 묶음
|
||||||
enablePivot: true,
|
enablePivot: true,
|
||||||
enableValue : true
|
enableValue: true
|
||||||
},
|
},
|
||||||
//suppressMultiSort:true, //단일솔트 true가 단일, false가 다중 shift + sort 시
|
//suppressMultiSort:true, //단일솔트 true가 단일, false가 다중 shift + sort 시
|
||||||
headerHeight : 41, // header 높이
|
headerHeight: 41, // header 높이
|
||||||
rowHeight : 41, // row 높이
|
rowHeight: 41, // row 높이
|
||||||
rowData : webTreatmentPetitAgGridData,
|
rowData: webTreatmentPetitAgGridData,
|
||||||
suppressRowClickSelection : true, // 로우 클릭시 체크박스 선택 true no, false yes
|
suppressRowClickSelection: true, // 로우 클릭시 체크박스 선택 true no, false yes
|
||||||
localeText : {
|
localeText: {
|
||||||
noRowsToShow : '조회 결과가 없습니다.'
|
noRowsToShow: '조회 결과가 없습니다.'
|
||||||
}, //데이터 없을 시 나오는 문구
|
}, //데이터 없을 시 나오는 문구
|
||||||
rowSelection : 'multiple', // row 다중 선택
|
rowSelection: 'multiple', // row 다중 선택
|
||||||
debug : false,
|
debug: false,
|
||||||
onCellClicked: function(cell){ //셀 클릭 이벤트\
|
onCellClicked: function (cell) { //셀 클릭 이벤트\
|
||||||
|
|
||||||
/* alert(treatmentpetit.column.colId); */
|
/* alert(treatmentpetit.column.colId); */
|
||||||
if( 'title' == cell.column.colId ){
|
if ('title' == cell.column.colId) {
|
||||||
fn_updateWebTreatmentPetitIntro(cell.data.postNo, cell.data.categoryNo);
|
fn_updateWebTreatmentPetitIntro(cell.data.postNo, cell.data.categoryNo);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSelectionChanged: function(treatmentpetit){ //체크박스 선택
|
onSelectionChanged: function (treatmentpetit) { //체크박스 선택
|
||||||
delList = treatmentpetit.api.getSelectedRows();
|
delList = treatmentpetit.api.getSelectedRows();
|
||||||
console.log(delList);
|
console.log(delList);
|
||||||
/*let selectRows = [];
|
/*let selectRows = [];
|
||||||
selectRows = treatmentpetit.api.getSelectedRows();
|
selectRows = treatmentpetit.api.getSelectedRows();
|
||||||
console.log(selectRows);
|
console.log(selectRows);
|
||||||
webTreatmentPetitSelectId = '';
|
webTreatmentPetitSelectId = '';
|
||||||
for(let i=0; i<selectRows.length; i++){
|
for(let i=0; i<selectRows.length; i++){
|
||||||
webTreatmentPetitSelectId += selectRows[i].muWebTreatmentPetitId + ",";
|
webTreatmentPetitSelectId += selectRows[i].muWebTreatmentPetitId + ",";
|
||||||
}
|
}
|
||||||
webTreatmentPetitSelectId = webTreatmentPetitSelectId.substring(0, webTreatmentPetitSelectId.lastIndexOf(','));*/
|
webTreatmentPetitSelectId = webTreatmentPetitSelectId.substring(0, webTreatmentPetitSelectId.lastIndexOf(','));*/
|
||||||
},
|
},
|
||||||
onSortChanged: function(treatmentpetit){
|
onSortChanged: function (treatmentpetit) {
|
||||||
//정렬
|
//정렬
|
||||||
webTreatmentPetitSort = ''; //기존 정렬 초기화
|
webTreatmentPetitSort = ''; //기존 정렬 초기화
|
||||||
let columnArr = treatmentpetit.columnApi.getColumnState();
|
let columnArr = treatmentpetit.columnApi.getColumnState();
|
||||||
if(0<columnArr.length){
|
if (0 < columnArr.length) {
|
||||||
//sort index 순으로 재정렬
|
//sort index 순으로 재정렬
|
||||||
columnArr.sort(function(a,b){
|
columnArr.sort(function (a, b) {
|
||||||
return a.sortIndex - b.sortIndex;
|
return a.sortIndex - b.sortIndex;
|
||||||
});
|
});
|
||||||
|
|
||||||
let nullCnt = 0;
|
let nullCnt = 0;
|
||||||
for(let i=0; i<columnArr.length; i++){
|
for (let i = 0; i < columnArr.length; i++) {
|
||||||
let gridSortModel = columnArr[i].colId;
|
let gridSortModel = columnArr[i].colId;
|
||||||
let gridSort = columnArr[i].sort;
|
let gridSort = columnArr[i].sort;
|
||||||
|
|
||||||
if(gridSort != null){
|
if (gridSort != null) {
|
||||||
webTreatmentPetitStart = 0;
|
webTreatmentPetitStart = 0;
|
||||||
webTreatmentPetitSort += gridSortModel+' '+ gridSort + ',';
|
webTreatmentPetitSort += gridSortModel + ' ' + gridSort + ',';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
nullCnt++;
|
nullCnt++;
|
||||||
if(nullCnt == columnArr.length){
|
if (nullCnt == columnArr.length) {
|
||||||
webTreatmentPetitSort = '';
|
webTreatmentPetitSort = '';
|
||||||
webTreatmentPetitDir = '';
|
webTreatmentPetitDir = '';
|
||||||
webTreatmentPetitStart = 0;
|
webTreatmentPetitStart = 0;
|
||||||
@@ -587,7 +603,7 @@ let webTreatmentPetitGridOptions = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
webTreatmentPetitSort = webTreatmentPetitSort.substring(0,webTreatmentPetitSort.lastIndexOf( ",")); //맨끝 콤마 지우기
|
webTreatmentPetitSort = webTreatmentPetitSort.substring(0, webTreatmentPetitSort.lastIndexOf(",")); //맨끝 콤마 지우기
|
||||||
|
|
||||||
fn_webTreatmentPetitSearch();
|
fn_webTreatmentPetitSearch();
|
||||||
}
|
}
|
||||||
@@ -606,23 +622,23 @@ new agGrid.Grid(webTreatmentPetitGridDiv, webTreatmentPetitGridOptions);
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 페이지 init
|
* 페이지 init
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_pageInit(){
|
function fn_pageInit() {
|
||||||
// 날짜 datepicker
|
// 날짜 datepicker
|
||||||
fn_searchDatePicker("#divWebTreatmentPetitSearchStartDate", "#divWebTreatmentPetitSearchEndDate");
|
fn_searchDatePicker("#divWebTreatmentPetitSearchStartDate", "#divWebTreatmentPetitSearchEndDate");
|
||||||
|
|
||||||
if(!webTreatmentPetitSearchStartDate&&!webTreatmentPetitSearchEndDate){
|
if (!webTreatmentPetitSearchStartDate && !webTreatmentPetitSearchEndDate) {
|
||||||
// 검색 오늘날짜 셋팅
|
// 검색 오늘날짜 셋팅
|
||||||
fn_webTreatmentPetitSetDate('D');
|
fn_webTreatmentPetitSetDate('D');
|
||||||
}else{
|
} else {
|
||||||
$("#webTreatmentPetitSearchStartDate").val(webTreatmentPetitSearchStartDate).trigger("change");
|
$("#webTreatmentPetitSearchStartDate").val(webTreatmentPetitSearchStartDate).trigger("change");
|
||||||
$("#webTreatmentPetitSearchEndDate").val(webTreatmentPetitSearchEndDate).trigger("change");
|
$("#webTreatmentPetitSearchEndDate").val(webTreatmentPetitSearchEndDate).trigger("change");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 초기 페이징 처리
|
// 초기 페이징 처리
|
||||||
$("#webTreatmentPetitSearchKeyword0").val(webTreatmentPetitSearchKeywordParam0);
|
$("#webTreatmentPetitSearchKeyword0").val(webTreatmentPetitSearchKeywordParam0);
|
||||||
$("#webTreatmentPetitSearchKeyword1").val(webTreatmentPetitSearchKeywordParam1);
|
$("#webTreatmentPetitSearchKeyword1").val(webTreatmentPetitSearchKeywordParam1);
|
||||||
$("#webTreatmentPetitSearchKeyword2").val(webTreatmentPetitSearchKeywordParam2);
|
$("#webTreatmentPetitSearchKeyword2").val(webTreatmentPetitSearchKeywordParam2);
|
||||||
$("#webTreatmentPetitSearchKeyword3").val(webTreatmentPetitSearchKeywordParam3);
|
$("#webTreatmentPetitSearchKeyword3").val(webTreatmentPetitSearchKeywordParam3);
|
||||||
|
|
||||||
fn_webTreatmentPetitSearch("A");
|
fn_webTreatmentPetitSearch("A");
|
||||||
}
|
}
|
||||||
@@ -630,21 +646,21 @@ function fn_pageInit(){
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* 페이지 treatmentpetit
|
* 페이지 treatmentpetit
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_pageTreatmentPetit(){
|
function fn_pageTreatmentPetit() {
|
||||||
// 검색 input
|
// 검색 input
|
||||||
$(document).on('keypress', '#webTreatmentPetitSearchKeyword0', function(e) {
|
$(document).on('keypress', '#webTreatmentPetitSearchKeyword0', function (e) {
|
||||||
fn_webTreatmentPetitEnter(e);
|
fn_webTreatmentPetitEnter(e);
|
||||||
});
|
});
|
||||||
// 검색 input
|
// 검색 input
|
||||||
$(document).on('keypress', '#webTreatmentPetitSearchKeyword1', function(e) {
|
$(document).on('keypress', '#webTreatmentPetitSearchKeyword1', function (e) {
|
||||||
fn_webTreatmentPetitEnter(e);
|
fn_webTreatmentPetitEnter(e);
|
||||||
});
|
});
|
||||||
// 검색 input
|
// 검색 input
|
||||||
$(document).on('keypress', '#webTreatmentPetitSearchKeyword2', function(e) {
|
$(document).on('keypress', '#webTreatmentPetitSearchKeyword2', function (e) {
|
||||||
fn_webTreatmentPetitEnter(e);
|
fn_webTreatmentPetitEnter(e);
|
||||||
});
|
});
|
||||||
// 검색 input
|
// 검색 input
|
||||||
$(document).on('keypress', '#webTreatmentPetitSearchKeyword3', function(e) {
|
$(document).on('keypress', '#webTreatmentPetitSearchKeyword3', function (e) {
|
||||||
fn_webTreatmentPetitEnter(e);
|
fn_webTreatmentPetitEnter(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -667,8 +683,8 @@ function fn_pageTreatmentPetit(){
|
|||||||
const target = $("#webTreatmentPetitSearchDateType").siblings("ul.select_option_list");
|
const target = $("#webTreatmentPetitSearchDateType").siblings("ul.select_option_list");
|
||||||
target.find("li.option_list_item").click(function () {
|
target.find("li.option_list_item").click(function () {
|
||||||
let selectIdArr = $(this).prop("id").split('_');
|
let selectIdArr = $(this).prop("id").split('_');
|
||||||
let selectId = selectIdArr[1];
|
let selectId = selectIdArr[1];
|
||||||
let selectName = $(this).text();
|
let selectName = $(this).text();
|
||||||
|
|
||||||
$(this).parent().siblings("button").text(selectName);
|
$(this).parent().siblings("button").text(selectName);
|
||||||
$(this).parent().siblings("input").val(selectId);
|
$(this).parent().siblings("input").val(selectId);
|
||||||
@@ -677,7 +693,7 @@ function fn_pageTreatmentPetit(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function(){
|
$(function () {
|
||||||
// 페이지 init
|
// 페이지 init
|
||||||
fn_pageInit();
|
fn_pageInit();
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ function fn_selectWebTreatmentPetit() {
|
|||||||
$("#oldCrmItemId").val(data.oldCrmItemId);
|
$("#oldCrmItemId").val(data.oldCrmItemId);
|
||||||
$("#ordNo").val(data.ordNo);
|
$("#ordNo").val(data.ordNo);
|
||||||
|
|
||||||
|
if (data.startDt) $("#eventStartDt").val(data.startDt);
|
||||||
|
if (data.endDt) $("#eventEndDt").val(data.endDt);
|
||||||
|
|
||||||
treatmentList = [];
|
treatmentList = [];
|
||||||
rst.treatmentList.forEach((item, i) => {
|
rst.treatmentList.forEach((item, i) => {
|
||||||
treatmentList.push({
|
treatmentList.push({
|
||||||
@@ -117,8 +120,8 @@ function fn_updateWebTreatmentPetit() {
|
|||||||
treatmentProcedureIdList.push(item.muTreatmentProcedureId);
|
treatmentProcedureIdList.push(item.muTreatmentProcedureId);
|
||||||
});
|
});
|
||||||
|
|
||||||
//let eventStartDate = $("#eventStartDate").val();
|
let eventStartDt = $("#eventStartDt").val();
|
||||||
//let eventEndDate = $("#eventEndDate").val();
|
let eventEndDt = $("#eventEndDt").val();
|
||||||
let file = $("#file")[0].files[0];
|
let file = $("#file")[0].files[0];
|
||||||
let content_file = $("#content_file")[0].files[0];
|
let content_file = $("#content_file")[0].files[0];
|
||||||
|
|
||||||
@@ -143,8 +146,8 @@ function fn_updateWebTreatmentPetit() {
|
|||||||
formData.append("thumbnailBottomTxt", thumbnailBottomTxt);
|
formData.append("thumbnailBottomTxt", thumbnailBottomTxt);
|
||||||
formData.append("treatmentlist", treatmentIdList);
|
formData.append("treatmentlist", treatmentIdList);
|
||||||
formData.append("treatmentprocedurelist", treatmentProcedureIdList);
|
formData.append("treatmentprocedurelist", treatmentProcedureIdList);
|
||||||
//formData.append("eventStartDate", eventStartDate);
|
formData.append("eventStartDt", eventStartDt);
|
||||||
//formData.append("eventEndDate", eventEndDate);
|
formData.append("eventEndDt", eventEndDt);
|
||||||
formData.append("file", file);
|
formData.append("file", file);
|
||||||
formData.append("content_file", content_file);
|
formData.append("content_file", content_file);
|
||||||
formData.append("oldCrmItemId", $("#oldCrmItemId").val());
|
formData.append("oldCrmItemId", $("#oldCrmItemId").val());
|
||||||
@@ -255,9 +258,25 @@ function fn_selectListWebTreatmentPetitIntro() {
|
|||||||
* 페이지 init
|
* 페이지 init
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
function fn_pageInit() {
|
function fn_pageInit() {
|
||||||
// 날짜 datepicker
|
// 날짜 datepicker (jQuery UI)
|
||||||
fn_searchDatePicker("#eventStartDate", "#eventEndDate");
|
$("#eventStartDt, #eventEndDt").datepicker({
|
||||||
|
dateFormat: 'yy-mm-dd',
|
||||||
|
prevText: '이전 달',
|
||||||
|
nextText: '다음 달',
|
||||||
|
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||||
|
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||||
|
dayNames: ['일', '월', '화', '수', '목', '금', '토'],
|
||||||
|
dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'],
|
||||||
|
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
|
||||||
|
showMonthAfterYear: true,
|
||||||
|
yearSuffix: '년',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true
|
||||||
|
});
|
||||||
|
|
||||||
|
if (categoryDivCd === '02' || categoryDivCd === '04') {
|
||||||
|
$("#dateSelectionRow").show();
|
||||||
|
}
|
||||||
|
|
||||||
fn_selectWebTreatmentPetit();
|
fn_selectWebTreatmentPetit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<th:block layout:fragment="layout_css">
|
<th:block layout:fragment="layout_css">
|
||||||
<link rel="stylesheet" href="/css/web/ContentsBbsUpd.css">
|
<link rel="stylesheet" href="/css/web/ContentsBbsUpd.css">
|
||||||
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
||||||
|
<link rel="stylesheet" href="/css/web/datepicker-fix.css">
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block layout:fragment="layout_top_script">
|
<th:block layout:fragment="layout_top_script">
|
||||||
<!-- Pagination usage removed -->
|
<!-- Pagination usage removed -->
|
||||||
@@ -73,6 +74,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Date Selection (Event Only) -->
|
||||||
|
<div class="form-grid-row" id="dateSelectionRow" style="display:none;">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>시작일</label>
|
||||||
|
<input type="text" id="eventStartDt" placeholder="YYYY-MM-DD" readonly />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>종료일</label>
|
||||||
|
<input type="text" id="eventEndDt" placeholder="YYYY-MM-DD" readonly />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Row 4: Procedure Selection (Grid) -->
|
<!-- Row 4: Procedure Selection (Grid) -->
|
||||||
<div class="grid-section">
|
<div class="grid-section">
|
||||||
<div class="grid-header">
|
<div class="grid-header">
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||||
xmlns:th="http://www.thymeleaf.org"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{/web/layout/homeLayout}">
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
||||||
layout:decorate="~{/web/layout/homeLayout}">
|
|
||||||
<th:block layout:fragment="layout_css">
|
<th:block layout:fragment="layout_css">
|
||||||
<link rel="stylesheet" href="/css/web/webTreatmentPetitSelectList.css">
|
<link rel="stylesheet" href="/css/web/webTreatmentPetitSelectList.css">
|
||||||
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
||||||
@@ -10,15 +8,15 @@
|
|||||||
<th:block layout:fragment="layout_top_script">
|
<th:block layout:fragment="layout_top_script">
|
||||||
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
|
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
|
||||||
<script>
|
<script>
|
||||||
let menuClass = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";
|
let menuClass = "[[${param.menuClass}]]" == "" ? "" : "[[${param.menuClass}]]";
|
||||||
let categoryDivCd = "[[${param.categoryDivCd}]]"==""?"":"[[${param.categoryDivCd}]]";
|
let categoryDivCd = "[[${param.categoryDivCd}]]" == "" ? "" : "[[${param.categoryDivCd}]]";
|
||||||
categoryDivCd = "[[${categoryDivCd}]]"==""?"":"[[${categoryDivCd}]]";
|
categoryDivCd = "[[${categoryDivCd}]]" == "" ? "" : "[[${categoryDivCd}]]";
|
||||||
|
|
||||||
let selectUseYn = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
|
let selectUseYn = "[[${selectUseYn}]]" == "" ? "N" : "[[${selectUseYn}]]";
|
||||||
let insertUseYn = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
|
let insertUseYn = "[[${insertUseYn}]]" == "" ? "N" : "[[${insertUseYn}]]";
|
||||||
let updateUseYn = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
|
let updateUseYn = "[[${updateUseYn}]]" == "" ? "N" : "[[${updateUseYn}]]";
|
||||||
let deleteUseYn = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
|
let deleteUseYn = "[[${deleteUseYn}]]" == "" ? "N" : "[[${deleteUseYn}]]";
|
||||||
let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";
|
let downloadUseYn = "[[${downloadUseYn}]]" == "" ? "N" : "[[${downloadUseYn}]]";
|
||||||
|
|
||||||
/* 검색 관련 변수 */
|
/* 검색 관련 변수 */
|
||||||
let webTreatmentPetitSearchKeywordParam0 = "[[${param.webTreatmentPetitSearchKeywordParam0}]]";
|
let webTreatmentPetitSearchKeywordParam0 = "[[${param.webTreatmentPetitSearchKeywordParam0}]]";
|
||||||
@@ -26,14 +24,14 @@
|
|||||||
let webTreatmentPetitSearchKeywordParam2 = "[[${param.webTreatmentPetitSearchKeywordParam2}]]";
|
let webTreatmentPetitSearchKeywordParam2 = "[[${param.webTreatmentPetitSearchKeywordParam2}]]";
|
||||||
let webTreatmentPetitSearchKeywordParam3 = "[[${param.webTreatmentPetitSearchKeywordParam3}]]";
|
let webTreatmentPetitSearchKeywordParam3 = "[[${param.webTreatmentPetitSearchKeywordParam3}]]";
|
||||||
|
|
||||||
let webTreatmentPetitSort = "[[${param.webTreatmentPetitSort}]]";
|
let webTreatmentPetitSort = "[[${param.webTreatmentPetitSort}]]";
|
||||||
let webTreatmentPetitDir = "[[${param.webTreatmentPetitDir}]]";
|
let webTreatmentPetitDir = "[[${param.webTreatmentPetitDir}]]";
|
||||||
let webTreatmentPetitStart = "[[${param.webTreatmentPetitStart}]]"==""?0:"[[${param.webTreatmentPetitStart}]]";
|
let webTreatmentPetitStart = "[[${param.webTreatmentPetitStart}]]" == "" ? 0 : "[[${param.webTreatmentPetitStart}]]";
|
||||||
let webTreatmentPetitLimit = "[[${param.webTreatmentPetitLimit}]]"==""?500:"[[${param.webTreatmentPetitLimit}]]";
|
let webTreatmentPetitLimit = "[[${param.webTreatmentPetitLimit}]]" == "" ? 500 : "[[${param.webTreatmentPetitLimit}]]";
|
||||||
|
|
||||||
let webTreatmentPetitSearchStartDate = "[[${param.webTreatmentPetitSearchStartDate}]]";
|
let webTreatmentPetitSearchStartDate = "[[${param.webTreatmentPetitSearchStartDate}]]";
|
||||||
let webTreatmentPetitSearchEndDate = "[[${param.webTreatmentPetitSearchEndDate}]]";
|
let webTreatmentPetitSearchEndDate = "[[${param.webTreatmentPetitSearchEndDate}]]";
|
||||||
let webTreatmentPetitSearchDateType = "[[${param.webTreatmentPetitSearchDateType}]]"==""?"A":"[[${param.webTreatmentPetitSearchDateType}]]";
|
let webTreatmentPetitSearchDateType = "[[${param.webTreatmentPetitSearchDateType}]]" == "" ? "A" : "[[${param.webTreatmentPetitSearchDateType}]]";
|
||||||
</script>
|
</script>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block layout:fragment="layout_content">
|
<th:block layout:fragment="layout_content">
|
||||||
@@ -47,30 +45,31 @@
|
|||||||
<!-- 이름input -->
|
<!-- 이름input -->
|
||||||
<div class="search_list">
|
<div class="search_list">
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<img src="/image/web/search_G.svg" alt="search"/>
|
<img src="/image/web/search_G.svg" alt="search" />
|
||||||
<input type="text" id="webTreatmentPetitSearchKeyword0" required placeholder="카테고리">
|
<input type="text" id="webTreatmentPetitSearchKeyword0" required placeholder="카테고리">
|
||||||
|
|
||||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<img src="/image/web/search_G.svg" alt="search"/>
|
<img src="/image/web/search_G.svg" alt="search" />
|
||||||
<input type="text" id="webTreatmentPetitSearchKeyword1" required placeholder="제목">
|
<input type="text" id="webTreatmentPetitSearchKeyword1" required placeholder="제목">
|
||||||
|
|
||||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<img src="/image/web/search_G.svg" alt="search"/>
|
<img src="/image/web/search_G.svg" alt="search" />
|
||||||
<input type="text" id="webTreatmentPetitSearchKeyword2" required placeholder="작성자">
|
<input type="text" id="webTreatmentPetitSearchKeyword2" required placeholder="작성자">
|
||||||
|
|
||||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<img src="/image/web/search_G.svg" alt="search"/>
|
<img src="/image/web/search_G.svg" alt="search" />
|
||||||
<input type="text" id="webTreatmentPetitSearchKeyword3" required placeholder="시술">
|
<input type="text" id="webTreatmentPetitSearchKeyword3" required placeholder="시술">
|
||||||
|
|
||||||
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
<div class="search_list"></div><!-- 검색내역 나오는곳 -->
|
||||||
</div>
|
</div>
|
||||||
<button id="btnSearchWebTreatmentPetit" class="search_btn" data-toggle="modal" data-target=".work_closed_modal" style="transition: all 0.2s ease-in-out 0s;">조회</button>
|
<button id="btnSearchWebTreatmentPetit" class="search_btn" data-toggle="modal"
|
||||||
|
data-target=".work_closed_modal" style="transition: all 0.2s ease-in-out 0s;">조회</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right_btn_box">
|
<div class="right_btn_box">
|
||||||
@@ -99,6 +98,7 @@
|
|||||||
</th:block>
|
</th:block>
|
||||||
<th:block layout:fragment="layout_script">
|
<th:block layout:fragment="layout_script">
|
||||||
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
|
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
|
||||||
<script src="/js/web/contentsBbs/ContentsBbsSelectList.js"></script>
|
<script src="/js/web/contentsBbs/ContentsBbsSelectList.js?v=3"></script>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
<th:block layout:fragment="layout_css">
|
<th:block layout:fragment="layout_css">
|
||||||
<link rel="stylesheet" href="/css/web/ContentsBbsUpd.css">
|
<link rel="stylesheet" href="/css/web/ContentsBbsUpd.css">
|
||||||
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
<link rel="stylesheet" href="/css/web/grid.css?v1.1">
|
||||||
|
<link rel="stylesheet" href="/css/web/datepicker-fix.css">
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block layout:fragment="layout_top_script">
|
<th:block layout:fragment="layout_top_script">
|
||||||
<!-- Pagination usage removed -->
|
<!-- Pagination usage removed -->
|
||||||
@@ -76,6 +77,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Date Selection (Event Only) -->
|
||||||
|
<div class="form-grid-row" id="dateSelectionRow" style="display:none;">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>시작일</label>
|
||||||
|
<input type="text" id="eventStartDt" placeholder="YYYY-MM-DD" readonly />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>종료일</label>
|
||||||
|
<input type="text" id="eventEndDt" placeholder="YYYY-MM-DD" readonly />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Row 4: Treatment Grid -->
|
<!-- Row 4: Treatment Grid -->
|
||||||
<div class="grid-section">
|
<div class="grid-section">
|
||||||
<div class="grid-header">
|
<div class="grid-header">
|
||||||
|
|||||||
Reference in New Issue
Block a user