엑셀 업로드 파일용량 확인
@08ca5447bae3768290a20d07653ea17b6a2022c3
--- src/main/java/itn/com/cmm/filter/XssFilter.java
+++ src/main/java/itn/com/cmm/filter/XssFilter.java
... | ... | @@ -1,48 +1,48 @@ |
| 1 |
-/* |
|
| 2 |
- * Copyright 2008-2009 MOPAS(Ministry of Public Administration and Security). |
|
| 3 |
- * |
|
| 4 |
- * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 |
- * you may not use this file except in compliance with the License. |
|
| 6 |
- * You may obtain a copy of the License at |
|
| 7 |
- * |
|
| 8 |
- * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 9 |
- * |
|
| 10 |
- * Unless required by applicable law or agreed to in writing, software |
|
| 11 |
- * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 12 |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 13 |
- * See the License for the specific language governing permissions and |
|
| 14 |
- * limitations under the License. |
|
| 15 |
- */ |
|
| 16 |
-package itn.com.cmm.filter; |
|
| 17 |
- |
|
| 18 |
-import java.io.IOException; |
|
| 19 |
- |
|
| 20 |
-import javax.servlet.Filter; |
|
| 21 |
-import javax.servlet.FilterChain; |
|
| 22 |
-import javax.servlet.FilterConfig; |
|
| 23 |
-import javax.servlet.ServletContext; |
|
| 24 |
-import javax.servlet.ServletException; |
|
| 25 |
-import javax.servlet.ServletRequest; |
|
| 26 |
-import javax.servlet.ServletResponse; |
|
| 27 |
-import javax.servlet.http.HttpServletRequest; |
|
| 28 |
- |
|
| 29 |
-public class XssFilter implements Filter{
|
|
| 30 |
- |
|
| 31 |
- @SuppressWarnings("unused")
|
|
| 32 |
- private FilterConfig config; |
|
| 33 |
- |
|
| 34 |
- public void doFilter(ServletRequest request, ServletResponse response, |
|
| 35 |
- FilterChain chain) throws IOException, ServletException {
|
|
| 36 |
- ServletContext context = config.getServletContext(); |
|
| 37 |
- chain.doFilter(new XssFilterRequestWrapper((HttpServletRequest)request), response); |
|
| 38 |
- //chain.doFilter(new XssFilterRequestWrapper((HttpServletRequest)request , response , context ), response); |
|
| 39 |
- } |
|
| 40 |
- |
|
| 41 |
- public void init(FilterConfig config) throws ServletException {
|
|
| 42 |
- this.config = config; |
|
| 43 |
- } |
|
| 44 |
- |
|
| 45 |
- public void destroy() {
|
|
| 46 |
- this.config = null; |
|
| 47 |
- } |
|
| 48 |
-} |
|
| 1 |
+/* |
|
| 2 |
+ * Copyright 2008-2009 MOPAS(Ministry of Public Administration and Security). |
|
| 3 |
+ * |
|
| 4 |
+ * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 |
+ * you may not use this file except in compliance with the License. |
|
| 6 |
+ * You may obtain a copy of the License at |
|
| 7 |
+ * |
|
| 8 |
+ * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 9 |
+ * |
|
| 10 |
+ * Unless required by applicable law or agreed to in writing, software |
|
| 11 |
+ * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 12 |
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 13 |
+ * See the License for the specific language governing permissions and |
|
| 14 |
+ * limitations under the License. |
|
| 15 |
+ */ |
|
| 16 |
+package itn.com.cmm.filter; |
|
| 17 |
+ |
|
| 18 |
+import java.io.IOException; |
|
| 19 |
+ |
|
| 20 |
+import javax.servlet.Filter; |
|
| 21 |
+import javax.servlet.FilterChain; |
|
| 22 |
+import javax.servlet.FilterConfig; |
|
| 23 |
+import javax.servlet.ServletContext; |
|
| 24 |
+import javax.servlet.ServletException; |
|
| 25 |
+import javax.servlet.ServletRequest; |
|
| 26 |
+import javax.servlet.ServletResponse; |
|
| 27 |
+import javax.servlet.http.HttpServletRequest; |
|
| 28 |
+ |
|
| 29 |
+public class XssFilter implements Filter{
|
|
| 30 |
+ |
|
| 31 |
+ @SuppressWarnings("unused")
|
|
| 32 |
+ private FilterConfig config; |
|
| 33 |
+ |
|
| 34 |
+ public void doFilter(ServletRequest request, ServletResponse response, |
|
| 35 |
+ FilterChain chain) throws IOException, ServletException {
|
|
| 36 |
+ ServletContext context = config.getServletContext(); |
|
| 37 |
+ chain.doFilter(new XssFilterRequestWrapper((HttpServletRequest)request), response); |
|
| 38 |
+ //chain.doFilter(new XssFilterRequestWrapper((HttpServletRequest)request , response , context ), response); |
|
| 39 |
+ } |
|
| 40 |
+ |
|
| 41 |
+ public void init(FilterConfig config) throws ServletException {
|
|
| 42 |
+ this.config = config; |
|
| 43 |
+ } |
|
| 44 |
+ |
|
| 45 |
+ public void destroy() {
|
|
| 46 |
+ this.config = null; |
|
| 47 |
+ } |
|
| 48 |
+} |
--- src/main/java/itn/let/mjo/addr/service/AddrGroupService.java
+++ src/main/java/itn/let/mjo/addr/service/AddrGroupService.java
... | ... | @@ -1,54 +1,54 @@ |
| 1 |
-package itn.let.mjo.addr.service; |
|
| 2 |
- |
|
| 3 |
-import java.util.List; |
|
| 4 |
- |
|
| 5 |
-import itn.let.mail.service.StatusResponse; |
|
| 6 |
- |
|
| 7 |
-/** |
|
| 8 |
- * 주소록 관리를 위한 서비스 인터페이스 클래스 |
|
| 9 |
- * @author ITN |
|
| 10 |
- * @since 2021.04.08 |
|
| 11 |
- * @version 1.0 |
|
| 12 |
- * @see |
|
| 13 |
- * |
|
| 14 |
- * <pre> |
|
| 15 |
- * << 개정이력(Modification Information) >> |
|
| 16 |
- * 수정일 수정자 수정내용 |
|
| 17 |
- * ------- -------- --------------------------- |
|
| 18 |
- * 2021.04.08 ITN 최초 생성 |
|
| 19 |
- * </pre> |
|
| 20 |
- */ |
|
| 21 |
-public interface AddrGroupService {
|
|
| 22 |
- |
|
| 23 |
- public List<AddrGroupVO> selectAddrGroupList(AddrGroupVO addrGroupVO) throws Exception; |
|
| 24 |
- |
|
| 25 |
- public AddrGroupVO selectAddrGroupDetail(AddrGroupVO addrGroupVO) throws Exception; |
|
| 26 |
- |
|
| 27 |
- // 주소록 그룹 카운트 조회(전체) |
|
| 28 |
- public AddrGroupVO selectAddrGroupTotCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 29 |
- |
|
| 30 |
- // 주소록 그룹 카운트 조회(그룹미지정) |
|
| 31 |
- public AddrGroupVO selectAddrGroupNogrpCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 32 |
- |
|
| 33 |
- // 주소록 그룹 카운트 조회(자주보내는 번호) |
|
| 34 |
- public AddrGroupVO selectAddrGroupBookmarkCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 35 |
- |
|
| 36 |
- public String insertAddrGroup(AddrGroupVO addrGroupVO) throws Exception; |
|
| 37 |
- |
|
| 38 |
- public int updateAddrGroup(AddrGroupVO addrGroupVO) throws Exception; |
|
| 39 |
- |
|
| 40 |
- public int deleteAddrGroup(AddrGroupVO addrGroupVO) throws Exception; |
|
| 41 |
- |
|
| 42 |
- public int deleteAddrGroupByAdmin(AddrGroupVO addrGroupVO) throws Exception; |
|
| 43 |
- |
|
| 44 |
- public int deleteAddrGroupByAdminAll(AddrGroupVO addrGroupVO) throws Exception; |
|
| 45 |
- |
|
| 46 |
- public int selectDuplAddrGroupCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 47 |
- |
|
| 48 |
- public int selectMaxOrderNumber(AddrGroupVO addrGroupVO) throws Exception; |
|
| 49 |
- |
|
| 50 |
- public void mergeAddrGroupAjax(AddrGroupVO addrGroupVO, AddrVO addrVO) throws Exception; |
|
| 51 |
- |
|
| 52 |
- public void copyAddrGroupAjax(AddrGroupVO addrGroupVO, AddrVO addrVO) throws Exception; |
|
| 53 |
- |
|
| 54 |
-} |
|
| 1 |
+package itn.let.mjo.addr.service; |
|
| 2 |
+ |
|
| 3 |
+import java.util.List; |
|
| 4 |
+ |
|
| 5 |
+import itn.let.mail.service.StatusResponse; |
|
| 6 |
+ |
|
| 7 |
+/** |
|
| 8 |
+ * 주소록 관리를 위한 서비스 인터페이스 클래스 |
|
| 9 |
+ * @author ITN |
|
| 10 |
+ * @since 2021.04.08 |
|
| 11 |
+ * @version 1.0 |
|
| 12 |
+ * @see |
|
| 13 |
+ * |
|
| 14 |
+ * <pre> |
|
| 15 |
+ * << 개정이력(Modification Information) >> |
|
| 16 |
+ * 수정일 수정자 수정내용 |
|
| 17 |
+ * ------- -------- --------------------------- |
|
| 18 |
+ * 2021.04.08 ITN 최초 생성 |
|
| 19 |
+ * </pre> |
|
| 20 |
+ */ |
|
| 21 |
+public interface AddrGroupService {
|
|
| 22 |
+ |
|
| 23 |
+ public List<AddrGroupVO> selectAddrGroupList(AddrGroupVO addrGroupVO) throws Exception; |
|
| 24 |
+ |
|
| 25 |
+ public AddrGroupVO selectAddrGroupDetail(AddrGroupVO addrGroupVO) throws Exception; |
|
| 26 |
+ |
|
| 27 |
+ // 주소록 그룹 카운트 조회(전체) |
|
| 28 |
+ public AddrGroupVO selectAddrGroupTotCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 29 |
+ |
|
| 30 |
+ // 주소록 그룹 카운트 조회(그룹미지정) |
|
| 31 |
+ public AddrGroupVO selectAddrGroupNogrpCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 32 |
+ |
|
| 33 |
+ // 주소록 그룹 카운트 조회(자주보내는 번호) |
|
| 34 |
+ public AddrGroupVO selectAddrGroupBookmarkCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 35 |
+ |
|
| 36 |
+ public String insertAddrGroup(AddrGroupVO addrGroupVO) throws Exception; |
|
| 37 |
+ |
|
| 38 |
+ public int updateAddrGroup(AddrGroupVO addrGroupVO) throws Exception; |
|
| 39 |
+ |
|
| 40 |
+ public int deleteAddrGroup(AddrGroupVO addrGroupVO) throws Exception; |
|
| 41 |
+ |
|
| 42 |
+ public int deleteAddrGroupByAdmin(AddrGroupVO addrGroupVO) throws Exception; |
|
| 43 |
+ |
|
| 44 |
+ public int deleteAddrGroupByAdminAll(AddrGroupVO addrGroupVO) throws Exception; |
|
| 45 |
+ |
|
| 46 |
+ public int selectDuplAddrGroupCnt(AddrGroupVO addrGroupVO) throws Exception; |
|
| 47 |
+ |
|
| 48 |
+ public int selectMaxOrderNumber(AddrGroupVO addrGroupVO) throws Exception; |
|
| 49 |
+ |
|
| 50 |
+ public void mergeAddrGroupAjax(AddrGroupVO addrGroupVO, AddrVO addrVO) throws Exception; |
|
| 51 |
+ |
|
| 52 |
+ public void copyAddrGroupAjax(AddrGroupVO addrGroupVO, AddrVO addrVO) throws Exception; |
|
| 53 |
+ |
|
| 54 |
+} |
--- src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java
+++ src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java
... | ... | @@ -1,357 +1,357 @@ |
| 1 |
-package itn.let.mjo.pay.service.impl; |
|
| 2 |
- |
|
| 3 |
-import java.util.List; |
|
| 4 |
- |
|
| 5 |
-import org.springframework.stereotype.Repository; |
|
| 6 |
- |
|
| 7 |
-import egovframework.rte.psl.dataaccess.EgovAbstractDAO; |
|
| 8 |
-import itn.let.mjo.pay.service.MjonPayVO; |
|
| 9 |
-import itn.let.mjo.pay.service.MjonVaMsgLogVO; |
|
| 10 |
-import itn.let.mjo.pay.service.RefundVO; |
|
| 11 |
-import itn.let.mjo.pay.service.StVcVO; |
|
| 12 |
-@Repository("mjonPayDAO")
|
|
| 13 |
-public class MjonPayDAO extends EgovAbstractDAO {
|
|
| 14 |
- |
|
| 15 |
- @SuppressWarnings("unchecked")
|
|
| 16 |
- public List<MjonPayVO> selectPayList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 17 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPayList", mjonPayVO);
|
|
| 18 |
- } |
|
| 19 |
- |
|
| 20 |
- @SuppressWarnings("unchecked")
|
|
| 21 |
- public List<MjonPayVO> selectCashList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 22 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectCashList", mjonPayVO);
|
|
| 23 |
- } |
|
| 24 |
- |
|
| 25 |
- @SuppressWarnings("unchecked")
|
|
| 26 |
- public List<MjonPayVO> selectCashRemainList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 27 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectCashRemainList", mjonPayVO);
|
|
| 28 |
- } |
|
| 29 |
- |
|
| 30 |
- @SuppressWarnings("unchecked")
|
|
| 31 |
- public List<MjonPayVO> selectCashRemainNewList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 32 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectCashRemainNewList", mjonPayVO);
|
|
| 33 |
- } |
|
| 34 |
- |
|
| 35 |
- public int selectCashRemainNewCnt(MjonPayVO mjonPayVO) throws Exception{
|
|
| 36 |
- return (int) select("mjonPayDAO.selectCashRemainNewCnt", mjonPayVO);
|
|
| 37 |
- } |
|
| 38 |
- |
|
| 39 |
- |
|
| 40 |
- @SuppressWarnings("unchecked")
|
|
| 41 |
- public List<MjonPayVO> selectMemberCashList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 42 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectMemberCashList", mjonPayVO);
|
|
| 43 |
- } |
|
| 44 |
- |
|
| 45 |
- public MjonPayVO selectCashVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 46 |
- return (MjonPayVO)select("mjonPayDAO.selectCashVO", mjonPayVO);
|
|
| 47 |
- } |
|
| 48 |
- |
|
| 49 |
- public void insertCash(MjonPayVO mjonPayVO) throws Exception{
|
|
| 50 |
- |
|
| 51 |
- try {
|
|
| 52 |
- |
|
| 53 |
- insert("mjonPayDAO.insertCash", mjonPayVO);
|
|
| 54 |
- |
|
| 55 |
- } catch (Exception e) {
|
|
| 56 |
- |
|
| 57 |
- e.printStackTrace(); |
|
| 58 |
- } |
|
| 59 |
- |
|
| 60 |
- |
|
| 61 |
- } |
|
| 62 |
- |
|
| 63 |
- public void updateCash(MjonPayVO mjonPayVO) throws Exception{
|
|
| 64 |
- update("mjonPayDAO.updateCash", mjonPayVO);
|
|
| 65 |
- } |
|
| 66 |
- |
|
| 67 |
- public void deleteCash(MjonPayVO mjonPayVO) throws Exception{
|
|
| 68 |
- update("mjonPayDAO.deleteCash", mjonPayVO);
|
|
| 69 |
- } |
|
| 70 |
- |
|
| 71 |
- public void insertMjPg(MjonPayVO mjonPayVO) throws Exception{
|
|
| 72 |
- insert("mjonPayDAO.insertMjPg", mjonPayVO);
|
|
| 73 |
- } |
|
| 74 |
- |
|
| 75 |
- public void insertMjTax(MjonPayVO mjonPayVO) throws Exception {
|
|
| 76 |
- insert("mjonPayDAO.insertMjTax", mjonPayVO);
|
|
| 77 |
- } |
|
| 78 |
- |
|
| 79 |
- public void updateMemberCash(MjonPayVO mjonPayVO) throws Exception {
|
|
| 80 |
- insert("mjonPayDAO.updateMemberCash", mjonPayVO);
|
|
| 81 |
- } |
|
| 82 |
- |
|
| 83 |
- public void updateMemberPoint(MjonPayVO mjonPayVO) throws Exception {
|
|
| 84 |
- insert("mjonPayDAO.updateMemberPoint", mjonPayVO);
|
|
| 85 |
- } |
|
| 86 |
- |
|
| 87 |
- public void insertPoint(MjonPayVO mjonPayVO) throws Exception {
|
|
| 88 |
- insert("mjonPayDAO.insertPoint", mjonPayVO);
|
|
| 89 |
- |
|
| 90 |
- } |
|
| 91 |
- |
|
| 92 |
- public MjonPayVO selectPayVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 93 |
- return (MjonPayVO)select("mjonPayDAO.selectPayVO", mjonPayVO);
|
|
| 94 |
- } |
|
| 95 |
- |
|
| 96 |
- @SuppressWarnings("unchecked")
|
|
| 97 |
- public List<MjonPayVO> selectPointList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 98 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPointList", mjonPayVO);
|
|
| 99 |
- } |
|
| 100 |
- |
|
| 101 |
- // 가상계좌(세틀뱅크) 입금내역 조회 by pk |
|
| 102 |
- public StVcVO selectVacsByPk(StVcVO stVcVO) throws Exception{
|
|
| 103 |
- return (StVcVO)select("mjonPayDAO.selectVacsByPk", stVcVO);
|
|
| 104 |
- } |
|
| 105 |
- |
|
| 106 |
- // 가상계좌(세틀뱅크) 회원ID 조회 by 입금자명 |
|
| 107 |
- public StVcVO selectMberIdByIacctNm(StVcVO stVcVO) throws Exception{
|
|
| 108 |
- return (StVcVO)select("mjonPayDAO.selectMberIdByIacctNm", stVcVO);
|
|
| 109 |
- } |
|
| 110 |
- |
|
| 111 |
- // 가상계좌(세틀뱅크) 충전내역 요청여부 by 가상계좌입금정보 |
|
| 112 |
- public StVcVO selectVaChargeByVc(StVcVO stVcVO) throws Exception{
|
|
| 113 |
- return (StVcVO)select("mjonPayDAO.selectVaChargeByVc", stVcVO);
|
|
| 114 |
- } |
|
| 115 |
- |
|
| 116 |
- // 가상계좌(세틀뱅크) 입금 자동충전 충전내역 등록 |
|
| 117 |
- public void insertVaCharge(StVcVO stVcVO) throws Exception{
|
|
| 118 |
- insert("mjonPayDAO.insertVaCharge", stVcVO);
|
|
| 119 |
- } |
|
| 120 |
- |
|
| 121 |
- // 가상계좌(세틀뱅크) 입금 자동충전 충전내역 수정 |
|
| 122 |
- public void updateVaCharge(StVcVO stVcVO) throws Exception{
|
|
| 123 |
- update("mjonPayDAO.updateVaCharge", stVcVO);
|
|
| 124 |
- } |
|
| 125 |
- |
|
| 126 |
- public MjonPayVO selectPointVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 127 |
- return (MjonPayVO)select("mjonPayDAO.selectPointVO", mjonPayVO);
|
|
| 128 |
- } |
|
| 129 |
- |
|
| 130 |
- public void deletePoint(MjonPayVO mjonPayVO) throws Exception{
|
|
| 131 |
- update("mjonPayDAO.deletePoint", mjonPayVO);
|
|
| 132 |
- } |
|
| 133 |
- |
|
| 134 |
- @SuppressWarnings("unchecked")
|
|
| 135 |
- public List<MjonPayVO> selectUsedCashTotCnt(MjonPayVO mjonPayVO) throws Exception{
|
|
| 136 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectUsedCashTotCnt", mjonPayVO);
|
|
| 137 |
- } |
|
| 138 |
- |
|
| 139 |
- //전용계좌 문자발송 로그 기록 입력 |
|
| 140 |
- public int insertVaMsgLogInfo(MjonVaMsgLogVO mjonVaMsgLogVO) throws Exception{
|
|
| 141 |
- return update("mjonPayDAO.insertVaMsgLogInfo", mjonVaMsgLogVO);
|
|
| 142 |
- } |
|
| 143 |
- |
|
| 144 |
- //일일 전용계좌 문자발성 건수 불러오기 |
|
| 145 |
- public MjonVaMsgLogVO selectMyAcctSendCnt(MjonVaMsgLogVO mjonVaMsgLogVO) throws Exception {
|
|
| 146 |
- return (MjonVaMsgLogVO) select("mjonPayDAO.selectMyAcctSendCnt", mjonVaMsgLogVO);
|
|
| 147 |
- } |
|
| 148 |
- |
|
| 149 |
- // 모바일(KG 모빌리언스) 인서트 |
|
| 150 |
- public void insertKgm(MjonPayVO mjonPayVO) throws Exception{
|
|
| 151 |
- insert("mjonPayDAO.insertKgm", mjonPayVO);
|
|
| 152 |
- } |
|
| 153 |
- |
|
| 154 |
- // 모바일(KG 모빌리언스) VO |
|
| 155 |
- public MjonPayVO selectKgmVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 156 |
- return (MjonPayVO)select("mjonPayDAO.selectKgmVO", mjonPayVO);
|
|
| 157 |
- } |
|
| 158 |
- |
|
| 159 |
- public void insertPointUse(MjonPayVO mjonPayVO) throws Exception {
|
|
| 160 |
- insert("mjonPayDAO.insertPointUse", mjonPayVO);
|
|
| 161 |
- |
|
| 162 |
- } |
|
| 163 |
- |
|
| 164 |
- @SuppressWarnings("unchecked")
|
|
| 165 |
- public List<MjonPayVO> selectPointUseList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 166 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPointUseList", mjonPayVO);
|
|
| 167 |
- } |
|
| 168 |
- |
|
| 169 |
- @SuppressWarnings("unchecked")
|
|
| 170 |
- public MjonPayVO selectPointUseDetail(MjonPayVO mjonPayVO) throws Exception{
|
|
| 171 |
- return (MjonPayVO)select("mjonPayDAO.selectPointUseDetail", mjonPayVO);
|
|
| 172 |
- } |
|
| 173 |
- |
|
| 174 |
- public void updatePointUse(MjonPayVO mjonPayVO) throws Exception{
|
|
| 175 |
- update("mjonPayDAO.updatePointUse", mjonPayVO);
|
|
| 176 |
- } |
|
| 177 |
- |
|
| 178 |
- public String selectSumPayMoney(String userId) throws Exception{
|
|
| 179 |
- return (String) select("mjonPayDAO.selectSumPayMoney", userId);
|
|
| 180 |
- } |
|
| 181 |
- |
|
| 182 |
- public String selectAgentSumPayMoney(String userId) throws Exception{
|
|
| 183 |
- return (String) select("mjonPayDAO.selectAgentSumPayMoney", userId);
|
|
| 184 |
- } |
|
| 185 |
- |
|
| 186 |
- public String selectSumPoint(String userId) throws Exception{
|
|
| 187 |
- return (String) select("mjonPayDAO.selectSumPoint", userId);
|
|
| 188 |
- } |
|
| 189 |
- |
|
| 190 |
- @SuppressWarnings("unchecked")
|
|
| 191 |
- public List<MjonPayVO> selectPayListForRefund(MjonPayVO mjonPayVO) throws Exception{
|
|
| 192 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPayListForRefund", mjonPayVO);
|
|
| 193 |
- } |
|
| 194 |
- |
|
| 195 |
- public int updateMjonPgStatus(RefundVO refundVO) throws Exception {
|
|
| 196 |
- return update("mjonPayDAO.updateMjonPgStatus", refundVO);
|
|
| 197 |
- } |
|
| 198 |
- |
|
| 199 |
- @SuppressWarnings("unchecked")
|
|
| 200 |
- public List<MjonPayVO> selectPayDayChart(MjonPayVO mjonPayVO) throws Exception{
|
|
| 201 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPayDayChart", mjonPayVO);
|
|
| 202 |
- } |
|
| 203 |
- |
|
| 204 |
- @SuppressWarnings("unchecked")
|
|
| 205 |
- public List<MjonPayVO> selectPayMonthChart(MjonPayVO mjonPayVO) throws Exception{
|
|
| 206 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPayMonthChart", mjonPayVO);
|
|
| 207 |
- } |
|
| 208 |
- |
|
| 209 |
- @SuppressWarnings("unchecked")
|
|
| 210 |
- public List<MjonPayVO> selectPayDayChartDashboard(MjonPayVO mjonPayVO) throws Exception{
|
|
| 211 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPayDayChartDashboard", mjonPayVO);
|
|
| 212 |
- } |
|
| 213 |
- |
|
| 214 |
- @SuppressWarnings("unchecked")
|
|
| 215 |
- public List<MjonPayVO> selectPayMonthChartDashboard(MjonPayVO mjonPayVO) throws Exception{
|
|
| 216 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPayMonthChartDashboard", mjonPayVO);
|
|
| 217 |
- } |
|
| 218 |
- |
|
| 219 |
- public MjonPayVO selectPayYearChart(MjonPayVO mjonPayVO) throws Exception{
|
|
| 220 |
- return (MjonPayVO)select("mjonPayDAO.selectPayYearChart", mjonPayVO);
|
|
| 221 |
- } |
|
| 222 |
- |
|
| 223 |
- public int selectMemerPayCount(String userId) throws Exception{
|
|
| 224 |
- return (int) select("mjonPayDAO.selectMemerPayCount", userId);
|
|
| 225 |
- } |
|
| 226 |
- |
|
| 227 |
- public int selectPayCountByTid(String tid) throws Exception{
|
|
| 228 |
- return (int) select("mjonPayDAO.selectPayCountByTid", tid);
|
|
| 229 |
- } |
|
| 230 |
- |
|
| 231 |
- public MjonPayVO selectPrvMonthUseCash(String mberId) throws Exception{
|
|
| 232 |
- return (MjonPayVO)select("mjonPayDAO.selectPrvMonthUseCash", mberId);
|
|
| 233 |
- } |
|
| 234 |
- |
|
| 235 |
- public int updateMjonPgStatusAfterPay(MjonPayVO mjonPayVO) throws Exception {
|
|
| 236 |
- return update("mjonPayDAO.updateMjonPgStatusAfterPay", mjonPayVO);
|
|
| 237 |
- } |
|
| 238 |
- |
|
| 239 |
- //첫결제 정보 불러오기 |
|
| 240 |
- public MjonPayVO selectFrstPayInfoByUserId(String userId) throws Exception{
|
|
| 241 |
- return (MjonPayVO) select("mjonPayDAO.selectFrstPayInfoByUserId", userId);
|
|
| 242 |
- } |
|
| 243 |
- |
|
| 244 |
- //첫결제 충전 포인트 정보 불러오기 |
|
| 245 |
- public MjonPayVO selectFrstPointInfoByUserId(MjonPayVO mjonPayVO) throws Exception{
|
|
| 246 |
- return (MjonPayVO) select("mjonPayDAO.selectFrstPointInfoByUserId", mjonPayVO);
|
|
| 247 |
- } |
|
| 248 |
- |
|
| 249 |
- public MjonPayVO selectPayInfoByMoid(String moid) throws Exception{
|
|
| 250 |
- return (MjonPayVO) select("mjonPayDAO.selectPayInfoByMoid", moid);
|
|
| 251 |
- } |
|
| 252 |
- |
|
| 253 |
- public String selectOneYearPayCnt(String userId) throws Exception{
|
|
| 254 |
- return (String)select("mjonPayDAO.selectOneYearPayCnt", userId);
|
|
| 255 |
- } |
|
| 256 |
- |
|
| 257 |
- |
|
| 258 |
- public int selectCashPointSendIdCnt(String userId) throws Exception{
|
|
| 259 |
- return (int) select("mjonPayDAO.selectCashPointSendIdCnt", userId);
|
|
| 260 |
- } |
|
| 261 |
- |
|
| 262 |
- public MjonPayVO selectCashPoint(String userId) throws Exception{
|
|
| 263 |
- return (MjonPayVO) select("mjonPayDAO.selectCashPoint", userId);
|
|
| 264 |
- } |
|
| 265 |
- |
|
| 266 |
- public void insertMjCashPointSend(MjonPayVO mjonPayVO) throws Exception{
|
|
| 267 |
- insert("mjonPayDAO.insertMjCashPointSend", mjonPayVO);
|
|
| 268 |
- } |
|
| 269 |
- |
|
| 270 |
- public String selectCashPointUniqId(String mberId) throws Exception{
|
|
| 271 |
- return (String)select("mjonPayDAO.selectCashPointUniqId", mberId);
|
|
| 272 |
- } |
|
| 273 |
- |
|
| 274 |
- @SuppressWarnings("unchecked")
|
|
| 275 |
- public List<MjonPayVO> selectCashPointSendList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 276 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectCashPointSendList", mjonPayVO);
|
|
| 277 |
- } |
|
| 278 |
- |
|
| 279 |
- // 문자 발송단가 할인여부 |
|
| 280 |
- public int selectMsgSalePriceCnt(String userId) throws Exception{
|
|
| 281 |
- return (int) select("mjonPayDAO.selectMsgSalePriceCnt", userId);
|
|
| 282 |
- } |
|
| 283 |
- |
|
| 284 |
- @SuppressWarnings("unchecked")
|
|
| 285 |
- public List<MjonPayVO> selectUsedCashWithKakaoTotCnt(MjonPayVO mjonPayVO) throws Exception{
|
|
| 286 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectUsedCashWithKakaoTotCnt", mjonPayVO);
|
|
| 287 |
- } |
|
| 288 |
- |
|
| 289 |
- @SuppressWarnings("unchecked")
|
|
| 290 |
- public List<MjonPayVO> selectCashInfoList(String userId) throws Exception{
|
|
| 291 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectCashInfoList", userId);
|
|
| 292 |
- } |
|
| 293 |
- |
|
| 294 |
- @SuppressWarnings("unchecked")
|
|
| 295 |
- public List<MjonPayVO> selectPointInfoList(String userId) throws Exception{
|
|
| 296 |
- return (List<MjonPayVO>)list("mjonPayDAO.selectPointInfoList", userId);
|
|
| 297 |
- } |
|
| 298 |
- |
|
| 299 |
- public String selectPointLatestOnePoint(String userId) {
|
|
| 300 |
- |
|
| 301 |
- return (String) select("mjonPayDAO.selectPointLatestOnePoint", userId);
|
|
| 302 |
- |
|
| 303 |
- } |
|
| 304 |
- |
|
| 305 |
- //누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-"로 사용된 금액만 합산) |
|
| 306 |
- public String selectTotalSumCashForAfterPay(String userId) throws Exception{
|
|
| 307 |
- |
|
| 308 |
- String result = ""; |
|
| 309 |
- |
|
| 310 |
- try {
|
|
| 311 |
- |
|
| 312 |
- result = (String) select("mjonPayDAO.selectTotalSumCashForAfterPay", userId);
|
|
| 313 |
- |
|
| 314 |
- } catch (Exception e) {
|
|
| 315 |
- System.out.println("selectTotalSumCashForAfterPay DAO Error!!! " + e);
|
|
| 316 |
- } |
|
| 317 |
- |
|
| 318 |
- return result; |
|
| 319 |
- |
|
| 320 |
- } |
|
| 321 |
- |
|
| 322 |
- |
|
| 323 |
- //누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용) |
|
| 324 |
- public String selectTotalSumPointForAfterPay(String userId) throws Exception{
|
|
| 325 |
- |
|
| 326 |
- String result = ""; |
|
| 327 |
- |
|
| 328 |
- try {
|
|
| 329 |
- |
|
| 330 |
- result = (String) select("mjonPayDAO.selectTotalSumPointForAfterPay", userId);
|
|
| 331 |
- |
|
| 332 |
- } catch (Exception e) {
|
|
| 333 |
- System.out.println("selectTotalSumPointForAfterPay DAO Error!!! " + e);
|
|
| 334 |
- } |
|
| 335 |
- |
|
| 336 |
- return result; |
|
| 337 |
- |
|
| 338 |
- } |
|
| 339 |
- |
|
| 340 |
- //누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액) |
|
| 341 |
- public String selectTotSumPaymentAfterPay(String userId) throws Exception{
|
|
| 342 |
- |
|
| 343 |
- String result = ""; |
|
| 344 |
- |
|
| 345 |
- try {
|
|
| 346 |
- |
|
| 347 |
- result = (String) select("mjonPayDAO.selectTotSumPaymentAfterPay", userId);
|
|
| 348 |
- |
|
| 349 |
- } catch (Exception e) {
|
|
| 350 |
- System.out.println("selectTotSumPaymentAfterPay DAO Error!!! " + e);
|
|
| 351 |
- } |
|
| 352 |
- |
|
| 353 |
- return result; |
|
| 354 |
- |
|
| 355 |
- } |
|
| 356 |
- |
|
| 357 |
-} |
|
| 1 |
+package itn.let.mjo.pay.service.impl; |
|
| 2 |
+ |
|
| 3 |
+import java.util.List; |
|
| 4 |
+ |
|
| 5 |
+import org.springframework.stereotype.Repository; |
|
| 6 |
+ |
|
| 7 |
+import egovframework.rte.psl.dataaccess.EgovAbstractDAO; |
|
| 8 |
+import itn.let.mjo.pay.service.MjonPayVO; |
|
| 9 |
+import itn.let.mjo.pay.service.MjonVaMsgLogVO; |
|
| 10 |
+import itn.let.mjo.pay.service.RefundVO; |
|
| 11 |
+import itn.let.mjo.pay.service.StVcVO; |
|
| 12 |
+@Repository("mjonPayDAO")
|
|
| 13 |
+public class MjonPayDAO extends EgovAbstractDAO {
|
|
| 14 |
+ |
|
| 15 |
+ @SuppressWarnings("unchecked")
|
|
| 16 |
+ public List<MjonPayVO> selectPayList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 17 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPayList", mjonPayVO);
|
|
| 18 |
+ } |
|
| 19 |
+ |
|
| 20 |
+ @SuppressWarnings("unchecked")
|
|
| 21 |
+ public List<MjonPayVO> selectCashList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 22 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectCashList", mjonPayVO);
|
|
| 23 |
+ } |
|
| 24 |
+ |
|
| 25 |
+ @SuppressWarnings("unchecked")
|
|
| 26 |
+ public List<MjonPayVO> selectCashRemainList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 27 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectCashRemainList", mjonPayVO);
|
|
| 28 |
+ } |
|
| 29 |
+ |
|
| 30 |
+ @SuppressWarnings("unchecked")
|
|
| 31 |
+ public List<MjonPayVO> selectCashRemainNewList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 32 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectCashRemainNewList", mjonPayVO);
|
|
| 33 |
+ } |
|
| 34 |
+ |
|
| 35 |
+ public int selectCashRemainNewCnt(MjonPayVO mjonPayVO) throws Exception{
|
|
| 36 |
+ return (int) select("mjonPayDAO.selectCashRemainNewCnt", mjonPayVO);
|
|
| 37 |
+ } |
|
| 38 |
+ |
|
| 39 |
+ |
|
| 40 |
+ @SuppressWarnings("unchecked")
|
|
| 41 |
+ public List<MjonPayVO> selectMemberCashList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 42 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectMemberCashList", mjonPayVO);
|
|
| 43 |
+ } |
|
| 44 |
+ |
|
| 45 |
+ public MjonPayVO selectCashVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 46 |
+ return (MjonPayVO)select("mjonPayDAO.selectCashVO", mjonPayVO);
|
|
| 47 |
+ } |
|
| 48 |
+ |
|
| 49 |
+ public void insertCash(MjonPayVO mjonPayVO) throws Exception{
|
|
| 50 |
+ |
|
| 51 |
+ try {
|
|
| 52 |
+ |
|
| 53 |
+ insert("mjonPayDAO.insertCash", mjonPayVO);
|
|
| 54 |
+ |
|
| 55 |
+ } catch (Exception e) {
|
|
| 56 |
+ |
|
| 57 |
+ e.printStackTrace(); |
|
| 58 |
+ } |
|
| 59 |
+ |
|
| 60 |
+ |
|
| 61 |
+ } |
|
| 62 |
+ |
|
| 63 |
+ public void updateCash(MjonPayVO mjonPayVO) throws Exception{
|
|
| 64 |
+ update("mjonPayDAO.updateCash", mjonPayVO);
|
|
| 65 |
+ } |
|
| 66 |
+ |
|
| 67 |
+ public void deleteCash(MjonPayVO mjonPayVO) throws Exception{
|
|
| 68 |
+ update("mjonPayDAO.deleteCash", mjonPayVO);
|
|
| 69 |
+ } |
|
| 70 |
+ |
|
| 71 |
+ public void insertMjPg(MjonPayVO mjonPayVO) throws Exception{
|
|
| 72 |
+ insert("mjonPayDAO.insertMjPg", mjonPayVO);
|
|
| 73 |
+ } |
|
| 74 |
+ |
|
| 75 |
+ public void insertMjTax(MjonPayVO mjonPayVO) throws Exception {
|
|
| 76 |
+ insert("mjonPayDAO.insertMjTax", mjonPayVO);
|
|
| 77 |
+ } |
|
| 78 |
+ |
|
| 79 |
+ public void updateMemberCash(MjonPayVO mjonPayVO) throws Exception {
|
|
| 80 |
+ insert("mjonPayDAO.updateMemberCash", mjonPayVO);
|
|
| 81 |
+ } |
|
| 82 |
+ |
|
| 83 |
+ public void updateMemberPoint(MjonPayVO mjonPayVO) throws Exception {
|
|
| 84 |
+ insert("mjonPayDAO.updateMemberPoint", mjonPayVO);
|
|
| 85 |
+ } |
|
| 86 |
+ |
|
| 87 |
+ public void insertPoint(MjonPayVO mjonPayVO) throws Exception {
|
|
| 88 |
+ insert("mjonPayDAO.insertPoint", mjonPayVO);
|
|
| 89 |
+ |
|
| 90 |
+ } |
|
| 91 |
+ |
|
| 92 |
+ public MjonPayVO selectPayVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 93 |
+ return (MjonPayVO)select("mjonPayDAO.selectPayVO", mjonPayVO);
|
|
| 94 |
+ } |
|
| 95 |
+ |
|
| 96 |
+ @SuppressWarnings("unchecked")
|
|
| 97 |
+ public List<MjonPayVO> selectPointList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 98 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPointList", mjonPayVO);
|
|
| 99 |
+ } |
|
| 100 |
+ |
|
| 101 |
+ // 가상계좌(세틀뱅크) 입금내역 조회 by pk |
|
| 102 |
+ public StVcVO selectVacsByPk(StVcVO stVcVO) throws Exception{
|
|
| 103 |
+ return (StVcVO)select("mjonPayDAO.selectVacsByPk", stVcVO);
|
|
| 104 |
+ } |
|
| 105 |
+ |
|
| 106 |
+ // 가상계좌(세틀뱅크) 회원ID 조회 by 입금자명 |
|
| 107 |
+ public StVcVO selectMberIdByIacctNm(StVcVO stVcVO) throws Exception{
|
|
| 108 |
+ return (StVcVO)select("mjonPayDAO.selectMberIdByIacctNm", stVcVO);
|
|
| 109 |
+ } |
|
| 110 |
+ |
|
| 111 |
+ // 가상계좌(세틀뱅크) 충전내역 요청여부 by 가상계좌입금정보 |
|
| 112 |
+ public StVcVO selectVaChargeByVc(StVcVO stVcVO) throws Exception{
|
|
| 113 |
+ return (StVcVO)select("mjonPayDAO.selectVaChargeByVc", stVcVO);
|
|
| 114 |
+ } |
|
| 115 |
+ |
|
| 116 |
+ // 가상계좌(세틀뱅크) 입금 자동충전 충전내역 등록 |
|
| 117 |
+ public void insertVaCharge(StVcVO stVcVO) throws Exception{
|
|
| 118 |
+ insert("mjonPayDAO.insertVaCharge", stVcVO);
|
|
| 119 |
+ } |
|
| 120 |
+ |
|
| 121 |
+ // 가상계좌(세틀뱅크) 입금 자동충전 충전내역 수정 |
|
| 122 |
+ public void updateVaCharge(StVcVO stVcVO) throws Exception{
|
|
| 123 |
+ update("mjonPayDAO.updateVaCharge", stVcVO);
|
|
| 124 |
+ } |
|
| 125 |
+ |
|
| 126 |
+ public MjonPayVO selectPointVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 127 |
+ return (MjonPayVO)select("mjonPayDAO.selectPointVO", mjonPayVO);
|
|
| 128 |
+ } |
|
| 129 |
+ |
|
| 130 |
+ public void deletePoint(MjonPayVO mjonPayVO) throws Exception{
|
|
| 131 |
+ update("mjonPayDAO.deletePoint", mjonPayVO);
|
|
| 132 |
+ } |
|
| 133 |
+ |
|
| 134 |
+ @SuppressWarnings("unchecked")
|
|
| 135 |
+ public List<MjonPayVO> selectUsedCashTotCnt(MjonPayVO mjonPayVO) throws Exception{
|
|
| 136 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectUsedCashTotCnt", mjonPayVO);
|
|
| 137 |
+ } |
|
| 138 |
+ |
|
| 139 |
+ //전용계좌 문자발송 로그 기록 입력 |
|
| 140 |
+ public int insertVaMsgLogInfo(MjonVaMsgLogVO mjonVaMsgLogVO) throws Exception{
|
|
| 141 |
+ return update("mjonPayDAO.insertVaMsgLogInfo", mjonVaMsgLogVO);
|
|
| 142 |
+ } |
|
| 143 |
+ |
|
| 144 |
+ //일일 전용계좌 문자발성 건수 불러오기 |
|
| 145 |
+ public MjonVaMsgLogVO selectMyAcctSendCnt(MjonVaMsgLogVO mjonVaMsgLogVO) throws Exception {
|
|
| 146 |
+ return (MjonVaMsgLogVO) select("mjonPayDAO.selectMyAcctSendCnt", mjonVaMsgLogVO);
|
|
| 147 |
+ } |
|
| 148 |
+ |
|
| 149 |
+ // 모바일(KG 모빌리언스) 인서트 |
|
| 150 |
+ public void insertKgm(MjonPayVO mjonPayVO) throws Exception{
|
|
| 151 |
+ insert("mjonPayDAO.insertKgm", mjonPayVO);
|
|
| 152 |
+ } |
|
| 153 |
+ |
|
| 154 |
+ // 모바일(KG 모빌리언스) VO |
|
| 155 |
+ public MjonPayVO selectKgmVO(MjonPayVO mjonPayVO) throws Exception{
|
|
| 156 |
+ return (MjonPayVO)select("mjonPayDAO.selectKgmVO", mjonPayVO);
|
|
| 157 |
+ } |
|
| 158 |
+ |
|
| 159 |
+ public void insertPointUse(MjonPayVO mjonPayVO) throws Exception {
|
|
| 160 |
+ insert("mjonPayDAO.insertPointUse", mjonPayVO);
|
|
| 161 |
+ |
|
| 162 |
+ } |
|
| 163 |
+ |
|
| 164 |
+ @SuppressWarnings("unchecked")
|
|
| 165 |
+ public List<MjonPayVO> selectPointUseList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 166 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPointUseList", mjonPayVO);
|
|
| 167 |
+ } |
|
| 168 |
+ |
|
| 169 |
+ @SuppressWarnings("unchecked")
|
|
| 170 |
+ public MjonPayVO selectPointUseDetail(MjonPayVO mjonPayVO) throws Exception{
|
|
| 171 |
+ return (MjonPayVO)select("mjonPayDAO.selectPointUseDetail", mjonPayVO);
|
|
| 172 |
+ } |
|
| 173 |
+ |
|
| 174 |
+ public void updatePointUse(MjonPayVO mjonPayVO) throws Exception{
|
|
| 175 |
+ update("mjonPayDAO.updatePointUse", mjonPayVO);
|
|
| 176 |
+ } |
|
| 177 |
+ |
|
| 178 |
+ public String selectSumPayMoney(String userId) throws Exception{
|
|
| 179 |
+ return (String) select("mjonPayDAO.selectSumPayMoney", userId);
|
|
| 180 |
+ } |
|
| 181 |
+ |
|
| 182 |
+ public String selectAgentSumPayMoney(String userId) throws Exception{
|
|
| 183 |
+ return (String) select("mjonPayDAO.selectAgentSumPayMoney", userId);
|
|
| 184 |
+ } |
|
| 185 |
+ |
|
| 186 |
+ public String selectSumPoint(String userId) throws Exception{
|
|
| 187 |
+ return (String) select("mjonPayDAO.selectSumPoint", userId);
|
|
| 188 |
+ } |
|
| 189 |
+ |
|
| 190 |
+ @SuppressWarnings("unchecked")
|
|
| 191 |
+ public List<MjonPayVO> selectPayListForRefund(MjonPayVO mjonPayVO) throws Exception{
|
|
| 192 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPayListForRefund", mjonPayVO);
|
|
| 193 |
+ } |
|
| 194 |
+ |
|
| 195 |
+ public int updateMjonPgStatus(RefundVO refundVO) throws Exception {
|
|
| 196 |
+ return update("mjonPayDAO.updateMjonPgStatus", refundVO);
|
|
| 197 |
+ } |
|
| 198 |
+ |
|
| 199 |
+ @SuppressWarnings("unchecked")
|
|
| 200 |
+ public List<MjonPayVO> selectPayDayChart(MjonPayVO mjonPayVO) throws Exception{
|
|
| 201 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPayDayChart", mjonPayVO);
|
|
| 202 |
+ } |
|
| 203 |
+ |
|
| 204 |
+ @SuppressWarnings("unchecked")
|
|
| 205 |
+ public List<MjonPayVO> selectPayMonthChart(MjonPayVO mjonPayVO) throws Exception{
|
|
| 206 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPayMonthChart", mjonPayVO);
|
|
| 207 |
+ } |
|
| 208 |
+ |
|
| 209 |
+ @SuppressWarnings("unchecked")
|
|
| 210 |
+ public List<MjonPayVO> selectPayDayChartDashboard(MjonPayVO mjonPayVO) throws Exception{
|
|
| 211 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPayDayChartDashboard", mjonPayVO);
|
|
| 212 |
+ } |
|
| 213 |
+ |
|
| 214 |
+ @SuppressWarnings("unchecked")
|
|
| 215 |
+ public List<MjonPayVO> selectPayMonthChartDashboard(MjonPayVO mjonPayVO) throws Exception{
|
|
| 216 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPayMonthChartDashboard", mjonPayVO);
|
|
| 217 |
+ } |
|
| 218 |
+ |
|
| 219 |
+ public MjonPayVO selectPayYearChart(MjonPayVO mjonPayVO) throws Exception{
|
|
| 220 |
+ return (MjonPayVO)select("mjonPayDAO.selectPayYearChart", mjonPayVO);
|
|
| 221 |
+ } |
|
| 222 |
+ |
|
| 223 |
+ public int selectMemerPayCount(String userId) throws Exception{
|
|
| 224 |
+ return (int) select("mjonPayDAO.selectMemerPayCount", userId);
|
|
| 225 |
+ } |
|
| 226 |
+ |
|
| 227 |
+ public int selectPayCountByTid(String tid) throws Exception{
|
|
| 228 |
+ return (int) select("mjonPayDAO.selectPayCountByTid", tid);
|
|
| 229 |
+ } |
|
| 230 |
+ |
|
| 231 |
+ public MjonPayVO selectPrvMonthUseCash(String mberId) throws Exception{
|
|
| 232 |
+ return (MjonPayVO)select("mjonPayDAO.selectPrvMonthUseCash", mberId);
|
|
| 233 |
+ } |
|
| 234 |
+ |
|
| 235 |
+ public int updateMjonPgStatusAfterPay(MjonPayVO mjonPayVO) throws Exception {
|
|
| 236 |
+ return update("mjonPayDAO.updateMjonPgStatusAfterPay", mjonPayVO);
|
|
| 237 |
+ } |
|
| 238 |
+ |
|
| 239 |
+ //첫결제 정보 불러오기 |
|
| 240 |
+ public MjonPayVO selectFrstPayInfoByUserId(String userId) throws Exception{
|
|
| 241 |
+ return (MjonPayVO) select("mjonPayDAO.selectFrstPayInfoByUserId", userId);
|
|
| 242 |
+ } |
|
| 243 |
+ |
|
| 244 |
+ //첫결제 충전 포인트 정보 불러오기 |
|
| 245 |
+ public MjonPayVO selectFrstPointInfoByUserId(MjonPayVO mjonPayVO) throws Exception{
|
|
| 246 |
+ return (MjonPayVO) select("mjonPayDAO.selectFrstPointInfoByUserId", mjonPayVO);
|
|
| 247 |
+ } |
|
| 248 |
+ |
|
| 249 |
+ public MjonPayVO selectPayInfoByMoid(String moid) throws Exception{
|
|
| 250 |
+ return (MjonPayVO) select("mjonPayDAO.selectPayInfoByMoid", moid);
|
|
| 251 |
+ } |
|
| 252 |
+ |
|
| 253 |
+ public String selectOneYearPayCnt(String userId) throws Exception{
|
|
| 254 |
+ return (String)select("mjonPayDAO.selectOneYearPayCnt", userId);
|
|
| 255 |
+ } |
|
| 256 |
+ |
|
| 257 |
+ |
|
| 258 |
+ public int selectCashPointSendIdCnt(String userId) throws Exception{
|
|
| 259 |
+ return (int) select("mjonPayDAO.selectCashPointSendIdCnt", userId);
|
|
| 260 |
+ } |
|
| 261 |
+ |
|
| 262 |
+ public MjonPayVO selectCashPoint(String userId) throws Exception{
|
|
| 263 |
+ return (MjonPayVO) select("mjonPayDAO.selectCashPoint", userId);
|
|
| 264 |
+ } |
|
| 265 |
+ |
|
| 266 |
+ public void insertMjCashPointSend(MjonPayVO mjonPayVO) throws Exception{
|
|
| 267 |
+ insert("mjonPayDAO.insertMjCashPointSend", mjonPayVO);
|
|
| 268 |
+ } |
|
| 269 |
+ |
|
| 270 |
+ public String selectCashPointUniqId(String mberId) throws Exception{
|
|
| 271 |
+ return (String)select("mjonPayDAO.selectCashPointUniqId", mberId);
|
|
| 272 |
+ } |
|
| 273 |
+ |
|
| 274 |
+ @SuppressWarnings("unchecked")
|
|
| 275 |
+ public List<MjonPayVO> selectCashPointSendList(MjonPayVO mjonPayVO) throws Exception{
|
|
| 276 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectCashPointSendList", mjonPayVO);
|
|
| 277 |
+ } |
|
| 278 |
+ |
|
| 279 |
+ // 문자 발송단가 할인여부 |
|
| 280 |
+ public int selectMsgSalePriceCnt(String userId) throws Exception{
|
|
| 281 |
+ return (int) select("mjonPayDAO.selectMsgSalePriceCnt", userId);
|
|
| 282 |
+ } |
|
| 283 |
+ |
|
| 284 |
+ @SuppressWarnings("unchecked")
|
|
| 285 |
+ public List<MjonPayVO> selectUsedCashWithKakaoTotCnt(MjonPayVO mjonPayVO) throws Exception{
|
|
| 286 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectUsedCashWithKakaoTotCnt", mjonPayVO);
|
|
| 287 |
+ } |
|
| 288 |
+ |
|
| 289 |
+ @SuppressWarnings("unchecked")
|
|
| 290 |
+ public List<MjonPayVO> selectCashInfoList(String userId) throws Exception{
|
|
| 291 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectCashInfoList", userId);
|
|
| 292 |
+ } |
|
| 293 |
+ |
|
| 294 |
+ @SuppressWarnings("unchecked")
|
|
| 295 |
+ public List<MjonPayVO> selectPointInfoList(String userId) throws Exception{
|
|
| 296 |
+ return (List<MjonPayVO>)list("mjonPayDAO.selectPointInfoList", userId);
|
|
| 297 |
+ } |
|
| 298 |
+ |
|
| 299 |
+ public String selectPointLatestOnePoint(String userId) {
|
|
| 300 |
+ |
|
| 301 |
+ return (String) select("mjonPayDAO.selectPointLatestOnePoint", userId);
|
|
| 302 |
+ |
|
| 303 |
+ } |
|
| 304 |
+ |
|
| 305 |
+ //누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-"로 사용된 금액만 합산) |
|
| 306 |
+ public String selectTotalSumCashForAfterPay(String userId) throws Exception{
|
|
| 307 |
+ |
|
| 308 |
+ String result = ""; |
|
| 309 |
+ |
|
| 310 |
+ try {
|
|
| 311 |
+ |
|
| 312 |
+ result = (String) select("mjonPayDAO.selectTotalSumCashForAfterPay", userId);
|
|
| 313 |
+ |
|
| 314 |
+ } catch (Exception e) {
|
|
| 315 |
+ System.out.println("selectTotalSumCashForAfterPay DAO Error!!! " + e);
|
|
| 316 |
+ } |
|
| 317 |
+ |
|
| 318 |
+ return result; |
|
| 319 |
+ |
|
| 320 |
+ } |
|
| 321 |
+ |
|
| 322 |
+ |
|
| 323 |
+ //누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용) |
|
| 324 |
+ public String selectTotalSumPointForAfterPay(String userId) throws Exception{
|
|
| 325 |
+ |
|
| 326 |
+ String result = ""; |
|
| 327 |
+ |
|
| 328 |
+ try {
|
|
| 329 |
+ |
|
| 330 |
+ result = (String) select("mjonPayDAO.selectTotalSumPointForAfterPay", userId);
|
|
| 331 |
+ |
|
| 332 |
+ } catch (Exception e) {
|
|
| 333 |
+ System.out.println("selectTotalSumPointForAfterPay DAO Error!!! " + e);
|
|
| 334 |
+ } |
|
| 335 |
+ |
|
| 336 |
+ return result; |
|
| 337 |
+ |
|
| 338 |
+ } |
|
| 339 |
+ |
|
| 340 |
+ //누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액) |
|
| 341 |
+ public String selectTotSumPaymentAfterPay(String userId) throws Exception{
|
|
| 342 |
+ |
|
| 343 |
+ String result = ""; |
|
| 344 |
+ |
|
| 345 |
+ try {
|
|
| 346 |
+ |
|
| 347 |
+ result = (String) select("mjonPayDAO.selectTotSumPaymentAfterPay", userId);
|
|
| 348 |
+ |
|
| 349 |
+ } catch (Exception e) {
|
|
| 350 |
+ System.out.println("selectTotSumPaymentAfterPay DAO Error!!! " + e);
|
|
| 351 |
+ } |
|
| 352 |
+ |
|
| 353 |
+ return result; |
|
| 354 |
+ |
|
| 355 |
+ } |
|
| 356 |
+ |
|
| 357 |
+} |
--- src/main/resources/egovframework/spring/com/context-security.xml
+++ src/main/resources/egovframework/spring/com/context-security.xml
... | ... | @@ -1,94 +1,94 @@ |
| 1 |
-<?xml version="1.0" encoding="UTF-8"?> |
|
| 2 |
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
| 3 |
- xmlns:egov-security="http://www.egovframe.go.kr/schema/egov-security" |
|
| 4 |
- xmlns:security="http://www.springframework.org/schema/security" |
|
| 5 |
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd |
|
| 6 |
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd |
|
| 7 |
- http://www.egovframe.go.kr/schema/egov-security http://www.egovframe.go.kr/schema/egov-security/egov-security-3.7.xsd"> |
|
| 8 |
- |
|
| 9 |
- <security:http pattern="/css/**" security="none"/> |
|
| 10 |
- <security:http pattern="/html/**" security="none"/> |
|
| 11 |
- <security:http pattern="/images/**" security="none"/> |
|
| 12 |
- <security:http pattern="/js/**" security="none"/> |
|
| 13 |
- <security:http pattern="/resource/**" security="none"/> |
|
| 14 |
- <security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/> |
|
| 15 |
- |
|
| 16 |
- <egov-security:config id="securityConfig" |
|
| 17 |
- loginUrl="/uat/uia/actionMain.do" |
|
| 18 |
- logoutSuccessUrl="/uat/uia/actionMain.do" |
|
| 19 |
- loginFailureUrl="/uat/uia/actionSecurityLogin.do?login_error=1" |
|
| 20 |
- accessDeniedUrl="/sec/ram/accessDenied.do" |
|
| 21 |
- |
|
| 22 |
- dataSource="egov.dataSource" |
|
| 23 |
- |
|
| 24 |
- jdbcUsersByUsernameQuery="SELECT USER_ID, ESNTL_ID AS PASSWORD, 1 ENABLED, USER_NM, USER_ZIP, |
|
| 25 |
- USER_ADRES, USER_EMAIL, USER_SE, '-' ORGNZT_ID, ESNTL_ID, MBTLNUM AS MOBLPHONNO, |
|
| 26 |
- '-' ORGNZT_NM, AUTHOR_CODE AS AUTHORITY, DEPT |
|
| 27 |
- FROM COMVNUSERMASTER A |
|
| 28 |
- INNER JOIN LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID |
|
| 29 |
- WHERE CONCAT(USER_SE, USER_ID) = ?" |
|
| 30 |
- |
|
| 31 |
- jdbcAuthoritiesByUsernameQuery="SELECT A.SCRTY_DTRMN_TRGET_ID USER_ID, A.AUTHOR_CODE AUTHORITY |
|
| 32 |
- FROM LETTNEMPLYRSCRTYESTBS A, COMVNUSERMASTER B |
|
| 33 |
- WHERE A.SCRTY_DTRMN_TRGET_ID = B.ESNTL_ID AND B.USER_ID = ?" |
|
| 34 |
- |
|
| 35 |
- jdbcMapClass="itn.let.uat.uia.service.impl.EgovSessionMapping" |
|
| 36 |
- |
|
| 37 |
- requestMatcherType="regex" |
|
| 38 |
- hash="plaintext" |
|
| 39 |
- hashBase64="false" |
|
| 40 |
- |
|
| 41 |
- concurrentMaxSessons="999" |
|
| 42 |
- concurrentExpiredUrl="/" |
|
| 43 |
- |
|
| 44 |
- defaultTargetUrl="/uat/uia/actionMain.do" |
|
| 45 |
- |
|
| 46 |
- /> |
|
| 47 |
- |
|
| 48 |
-<!--원 소스 --> |
|
| 49 |
-<!-- defaultTargetUrl="/uat/uia/actionMain.do" --> |
|
| 50 |
- |
|
| 51 |
- <!-- sqlHierarchicalRoles=" |
|
| 52 |
- SELECT a.CHLDRN_ROLE child, a.PARNTS_ROLE parent |
|
| 53 |
- FROM LETTNROLES_HIERARCHY a LEFT JOIN LETTNROLES_HIERARCHY b on (a.CHLDRN_ROLE = b.PARNTS_ROLE)" --> |
|
| 54 |
- |
|
| 55 |
- <egov-security:secured-object-config id="securedObjectConfig" |
|
| 56 |
- roleHierarchyString=" |
|
| 57 |
- ROLE_ADMIN > ROLE_USER_MEMBER |
|
| 58 |
- ROLE_USER_MEMBER > ROLE_ANONYMOUS" |
|
| 59 |
- |
|
| 60 |
- sqlRolesAndUrl=" |
|
| 61 |
- SELECT a.ROLE_PTTRN url, b.AUTHOR_CODE authority |
|
| 62 |
- FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 63 |
- WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'url' |
|
| 64 |
- ORDER BY a.ROLE_SORT" |
|
| 65 |
- |
|
| 66 |
- sqlRolesAndMethod=" |
|
| 67 |
- SELECT a.ROLE_PTTRN method, b.AUTHOR_CODE authority |
|
| 68 |
- FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 69 |
- WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'method' |
|
| 70 |
- ORDER BY a.ROLE_SORT" |
|
| 71 |
- |
|
| 72 |
- sqlRolesAndPointcut=" |
|
| 73 |
- SELECT a.ROLE_PTTRN pointcut, b.AUTHOR_CODE authority |
|
| 74 |
- FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 75 |
- WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'pointcut' |
|
| 76 |
- ORDER BY a.ROLE_SORT" |
|
| 77 |
- |
|
| 78 |
- sqlRegexMatchedRequestMapping=" |
|
| 79 |
- SELECT a.resource_pattern uri, b.authority authority |
|
| 80 |
- FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 81 |
- WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'regex' |
|
| 82 |
- ORDER BY a.ROLE_SORT" |
|
| 83 |
- |
|
| 84 |
- /> |
|
| 85 |
- |
|
| 86 |
- <egov-security:initializer id="initializer" supportMethod="true" supportPointcut="false" /> |
|
| 87 |
- |
|
| 88 |
- <!-- URL에 세미콜론(semicolon)허용 여부(기본값/false) --> |
|
| 89 |
- <bean id="egovStrictHttpFirewall" class="org.springframework.security.web.firewall.StrictHttpFirewall"> |
|
| 90 |
- <property name="allowSemicolon" value="true"/> |
|
| 91 |
- </bean> |
|
| 92 |
- <security:http-firewall ref="egovStrictHttpFirewall"/> |
|
| 93 |
- |
|
| 94 |
-</beans> |
|
| 1 |
+<?xml version="1.0" encoding="UTF-8"?> |
|
| 2 |
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
| 3 |
+ xmlns:egov-security="http://www.egovframe.go.kr/schema/egov-security" |
|
| 4 |
+ xmlns:security="http://www.springframework.org/schema/security" |
|
| 5 |
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd |
|
| 6 |
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd |
|
| 7 |
+ http://www.egovframe.go.kr/schema/egov-security http://www.egovframe.go.kr/schema/egov-security/egov-security-3.7.xsd"> |
|
| 8 |
+ |
|
| 9 |
+ <security:http pattern="/css/**" security="none"/> |
|
| 10 |
+ <security:http pattern="/html/**" security="none"/> |
|
| 11 |
+ <security:http pattern="/images/**" security="none"/> |
|
| 12 |
+ <security:http pattern="/js/**" security="none"/> |
|
| 13 |
+ <security:http pattern="/resource/**" security="none"/> |
|
| 14 |
+ <security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/> |
|
| 15 |
+ |
|
| 16 |
+ <egov-security:config id="securityConfig" |
|
| 17 |
+ loginUrl="/uat/uia/actionMain.do" |
|
| 18 |
+ logoutSuccessUrl="/uat/uia/actionMain.do" |
|
| 19 |
+ loginFailureUrl="/uat/uia/actionSecurityLogin.do?login_error=1" |
|
| 20 |
+ accessDeniedUrl="/sec/ram/accessDenied.do" |
|
| 21 |
+ |
|
| 22 |
+ dataSource="egov.dataSource" |
|
| 23 |
+ |
|
| 24 |
+ jdbcUsersByUsernameQuery="SELECT USER_ID, ESNTL_ID AS PASSWORD, 1 ENABLED, USER_NM, USER_ZIP, |
|
| 25 |
+ USER_ADRES, USER_EMAIL, USER_SE, '-' ORGNZT_ID, ESNTL_ID, MBTLNUM AS MOBLPHONNO, |
|
| 26 |
+ '-' ORGNZT_NM, AUTHOR_CODE AS AUTHORITY, DEPT |
|
| 27 |
+ FROM COMVNUSERMASTER A |
|
| 28 |
+ INNER JOIN LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID |
|
| 29 |
+ WHERE CONCAT(USER_SE, USER_ID) = ?" |
|
| 30 |
+ |
|
| 31 |
+ jdbcAuthoritiesByUsernameQuery="SELECT A.SCRTY_DTRMN_TRGET_ID USER_ID, A.AUTHOR_CODE AUTHORITY |
|
| 32 |
+ FROM LETTNEMPLYRSCRTYESTBS A, COMVNUSERMASTER B |
|
| 33 |
+ WHERE A.SCRTY_DTRMN_TRGET_ID = B.ESNTL_ID AND B.USER_ID = ?" |
|
| 34 |
+ |
|
| 35 |
+ jdbcMapClass="itn.let.uat.uia.service.impl.EgovSessionMapping" |
|
| 36 |
+ |
|
| 37 |
+ requestMatcherType="regex" |
|
| 38 |
+ hash="plaintext" |
|
| 39 |
+ hashBase64="false" |
|
| 40 |
+ |
|
| 41 |
+ concurrentMaxSessons="999" |
|
| 42 |
+ concurrentExpiredUrl="/" |
|
| 43 |
+ |
|
| 44 |
+ defaultTargetUrl="/uat/uia/actionMain.do" |
|
| 45 |
+ |
|
| 46 |
+ /> |
|
| 47 |
+ |
|
| 48 |
+<!--원 소스 --> |
|
| 49 |
+<!-- defaultTargetUrl="/uat/uia/actionMain.do" --> |
|
| 50 |
+ |
|
| 51 |
+ <!-- sqlHierarchicalRoles=" |
|
| 52 |
+ SELECT a.CHLDRN_ROLE child, a.PARNTS_ROLE parent |
|
| 53 |
+ FROM LETTNROLES_HIERARCHY a LEFT JOIN LETTNROLES_HIERARCHY b on (a.CHLDRN_ROLE = b.PARNTS_ROLE)" --> |
|
| 54 |
+ |
|
| 55 |
+ <egov-security:secured-object-config id="securedObjectConfig" |
|
| 56 |
+ roleHierarchyString=" |
|
| 57 |
+ ROLE_ADMIN > ROLE_USER_MEMBER |
|
| 58 |
+ ROLE_USER_MEMBER > ROLE_ANONYMOUS" |
|
| 59 |
+ |
|
| 60 |
+ sqlRolesAndUrl=" |
|
| 61 |
+ SELECT a.ROLE_PTTRN url, b.AUTHOR_CODE authority |
|
| 62 |
+ FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 63 |
+ WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'url' |
|
| 64 |
+ ORDER BY a.ROLE_SORT" |
|
| 65 |
+ |
|
| 66 |
+ sqlRolesAndMethod=" |
|
| 67 |
+ SELECT a.ROLE_PTTRN method, b.AUTHOR_CODE authority |
|
| 68 |
+ FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 69 |
+ WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'method' |
|
| 70 |
+ ORDER BY a.ROLE_SORT" |
|
| 71 |
+ |
|
| 72 |
+ sqlRolesAndPointcut=" |
|
| 73 |
+ SELECT a.ROLE_PTTRN pointcut, b.AUTHOR_CODE authority |
|
| 74 |
+ FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 75 |
+ WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'pointcut' |
|
| 76 |
+ ORDER BY a.ROLE_SORT" |
|
| 77 |
+ |
|
| 78 |
+ sqlRegexMatchedRequestMapping=" |
|
| 79 |
+ SELECT a.resource_pattern uri, b.authority authority |
|
| 80 |
+ FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b |
|
| 81 |
+ WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'regex' |
|
| 82 |
+ ORDER BY a.ROLE_SORT" |
|
| 83 |
+ |
|
| 84 |
+ /> |
|
| 85 |
+ |
|
| 86 |
+ <egov-security:initializer id="initializer" supportMethod="true" supportPointcut="false" /> |
|
| 87 |
+ |
|
| 88 |
+ <!-- URL에 세미콜론(semicolon)허용 여부(기본값/false) --> |
|
| 89 |
+ <bean id="egovStrictHttpFirewall" class="org.springframework.security.web.firewall.StrictHttpFirewall"> |
|
| 90 |
+ <property name="allowSemicolon" value="true"/> |
|
| 91 |
+ </bean> |
|
| 92 |
+ <security:http-firewall ref="egovStrictHttpFirewall"/> |
|
| 93 |
+ |
|
| 94 |
+</beans> |
--- src/main/webapp/WEB-INF/jsp/cop/bbs/EgovNoticeRegist.jsp
+++ src/main/webapp/WEB-INF/jsp/cop/bbs/EgovNoticeRegist.jsp
... | ... | @@ -1,483 +1,483 @@ |
| 1 |
-<%-- |
|
| 2 |
- Class Name : EgovNoticeRegist.jsp |
|
| 3 |
- Description : 게시물 생성 화면 |
|
| 4 |
- Modification Information |
|
| 5 |
- |
|
| 6 |
- 수정일 수정자 수정내용 |
|
| 7 |
- ------- -------- --------------------------- |
|
| 8 |
- 2009.03.24 이삼섭 최초 생성 |
|
| 9 |
- 2011.08.31 JJY 경량환경 버전 생성 |
|
| 10 |
- |
|
| 11 |
- author : 공통서비스 개발팀 이삼섭 |
|
| 12 |
- since : 2009.03.24 |
|
| 13 |
---%> |
|
| 14 |
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
|
| 15 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 16 |
-<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 17 |
-<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> |
|
| 18 |
-<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> |
|
| 19 |
-<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> |
|
| 20 |
-<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%> |
|
| 21 |
-<%@ taglib prefix="ckeditor" uri="http://ckeditor.com"%> |
|
| 22 |
-<!DOCTYPE html> |
|
| 23 |
-<html> |
|
| 24 |
-<head> |
|
| 25 |
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
| 26 |
-<meta http-equiv="content-language" content="ko"> |
|
| 27 |
-<script type="text/javascript" src="<c:url value='/js/EgovBBSMng.js' />"></script> |
|
| 28 |
-<script type="text/javascript" src="<c:url value='/js/EgovMultiFileItn.js'/>"></script> <!-- 파일첨부, 썸네일이미지 있으면 미리보기 --> |
|
| 29 |
-<%-- <script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script> --%> |
|
| 30 |
-<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js'/>"></script> |
|
| 31 |
-<script type="text/javascript" src="<c:url value="/validator.do"/>"></script> |
|
| 32 |
-<validator:javascript formName="board" staticJavascript="false" xhtml="true" cdata="false" /> |
|
| 33 |
-<script type="text/javascript"> |
|
| 34 |
-$( document ).ready(function() {
|
|
| 35 |
-}); |
|
| 36 |
- |
|
| 37 |
-function goList() {
|
|
| 38 |
- document.searchForm.submit(); |
|
| 39 |
-} |
|
| 40 |
- |
|
| 41 |
-function fn_egov_regist_notice() {
|
|
| 42 |
- CKEDITOR.instances.nttCn.updateElement(); |
|
| 43 |
- if (!validateBoard(document.board)) |
|
| 44 |
- return; |
|
| 45 |
- |
|
| 46 |
- //금지어 확인 |
|
| 47 |
- /* var prohibitCheck = false; |
|
| 48 |
- var form = document.board ; |
|
| 49 |
- form.checkProhibitCn.value = form.nttSj.value + form.nttCn.value ; |
|
| 50 |
- var data = new FormData(form); |
|
| 51 |
- $.ajax({
|
|
| 52 |
- type: "POST", |
|
| 53 |
- url: "/uss/ion/cnf/prohiCheckAjax.do", |
|
| 54 |
- async:false, |
|
| 55 |
- data: data, |
|
| 56 |
- dataType:'json', |
|
| 57 |
- processData: false, |
|
| 58 |
- contentType: false, |
|
| 59 |
- cache: false, |
|
| 60 |
- timeout: 600000, |
|
| 61 |
- success: function (returnData, status) {
|
|
| 62 |
- if(status == 'success'){
|
|
| 63 |
- if(returnData.result == 'fail'){
|
|
| 64 |
- }else if(returnData.result == 'auth_fail'){
|
|
| 65 |
- }else if(returnData.result =='success'){
|
|
| 66 |
- if(null != returnData.prohibitVO.prohibitCn){
|
|
| 67 |
- alert( returnData.prohibitVO.prohibitCn + " 단어는 금지어로 등록되어 있는 단어입니다." ); |
|
| 68 |
- prohibitCheck = true; |
|
| 69 |
- } |
|
| 70 |
- } |
|
| 71 |
- }else{
|
|
| 72 |
- //alert("등록에 실패하였습니다.");
|
|
| 73 |
- } |
|
| 74 |
- }, |
|
| 75 |
- error: function (e) {
|
|
| 76 |
- //alert("등록에 실패하였습니다.");
|
|
| 77 |
- } |
|
| 78 |
- }); |
|
| 79 |
- |
|
| 80 |
- if(prohibitCheck){
|
|
| 81 |
- return; |
|
| 82 |
- } */ |
|
| 83 |
- |
|
| 84 |
- <c:if test="${bdMstr.bbsId == 'BBSMSTR_000000000731' }">
|
|
| 85 |
- {
|
|
| 86 |
- if($('#ntceBgndeYYYMMDD').val() == ''){
|
|
| 87 |
- alert(" 시작일은 필수입니다.");
|
|
| 88 |
- return; |
|
| 89 |
- } |
|
| 90 |
- if($('#ntceEnddeYYYMMDD').val() == ''){
|
|
| 91 |
- alert(" 종료일은 필수입니다.");
|
|
| 92 |
- return; |
|
| 93 |
- } |
|
| 94 |
- |
|
| 95 |
- var iChkBeginDe = Number(($('#ntceBgndeYYYMMDD').val()+$('#ntceBgndeHH').val()+$('#ntceBgndeMM').val()).replaceAll("-","") );
|
|
| 96 |
- var iChkEndDe = Number(($('#ntceEnddeYYYMMDD').val()+$('#ntceEnddeHH').val()+$('#ntceEnddeMM').val()).replaceAll("-","") );
|
|
| 97 |
- |
|
| 98 |
- if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
|
|
| 99 |
- alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
|
|
| 100 |
- return; |
|
| 101 |
- } |
|
| 102 |
- $('#ntceBgnde').val(iChkBeginDe) ;
|
|
| 103 |
- $('#ntceEndde').val(iChkEndDe) ;
|
|
| 104 |
- } |
|
| 105 |
- </c:if> |
|
| 106 |
- |
|
| 107 |
- if (confirm('<spring:message code="common.regist.msg" />')) {
|
|
| 108 |
- goSave(); |
|
| 109 |
- } |
|
| 110 |
-} |
|
| 111 |
- |
|
| 112 |
-function goList() {
|
|
| 113 |
- document.searchForm.action = "<c:url value='/cop/bbs/selectBoardList.do'/>"; |
|
| 114 |
- document.searchForm.submit(); |
|
| 115 |
-} |
|
| 116 |
- |
|
| 117 |
-function fn_egov_regist_preview() {
|
|
| 118 |
- var PCC_window = window.open('', 'PCCV3Window', 'width=850, height=570, resizable=1, scrollbars=yes, status=0, titlebar=0, toolbar=0, left=350, top=50' );
|
|
| 119 |
- |
|
| 120 |
- var previewImgs = ""; |
|
| 121 |
- var i = 0; |
|
| 122 |
- |
|
| 123 |
- $("#DIV_IMG_VIEW").find("img").each(function() {
|
|
| 124 |
- previewImgs += $(this).get(0).src + "^"; |
|
| 125 |
- i++; |
|
| 126 |
- }); |
|
| 127 |
- |
|
| 128 |
- document.board.previewImgs.value = previewImgs; |
|
| 129 |
- document.board.action = "<c:url value='/cop/bbs/bbsPreview.do'/>"; |
|
| 130 |
- document.board.target = "PCCV3Window"; |
|
| 131 |
- document.board.submit(); |
|
| 132 |
-} |
|
| 133 |
-</script> |
|
| 134 |
-<title><c:out value='${bdMstr.bbsNm}' /> - 글 등록</title>
|
|
| 135 |
-<style> |
|
| 136 |
-.uploaded_obj{width: 100%;}
|
|
| 137 |
-</style> |
|
| 138 |
-</head> |
|
| 139 |
-<body> |
|
| 140 |
- <form:form commandName="searchForm" name="searchForm" method="get" action=""> |
|
| 141 |
- <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>" />
|
|
| 142 |
- <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>" />
|
|
| 143 |
- <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>" />
|
|
| 144 |
- <input name="bbsId" type="hidden" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
| 145 |
- </form:form> |
|
| 146 |
- |
|
| 147 |
- <form:form commandName="board" name="board" method="post" enctype="multipart/form-data"> |
|
| 148 |
- <input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>" />
|
|
| 149 |
- <input type="hidden" name="searchCnd" value="<c:out value='${searchVO.searchCnd}'/>" />
|
|
| 150 |
- <input type="hidden" name="searchWrd" value="<c:out value='${searchVO.searchWrd}'/>" />
|
|
| 151 |
- <input type="hidden" name="bbsId" value="<c:out value='${bdMstr.bbsId}'/>" />
|
|
| 152 |
- <input type="hidden" name="previewImgs" value="" /> |
|
| 153 |
- <input type="hidden" name="checkProhibitCn" value="" /> |
|
| 154 |
- <input type="hidden" name="siteId" value="<c:out value='${bdMstr.siteId}'/>" />
|
|
| 155 |
- <input type="hidden" name="pageType" id="pageType" value="insert" /> |
|
| 156 |
- |
|
| 157 |
- <input id="ntceBgnde" name="ntceBgnde" type="hidden" value=""> |
|
| 158 |
- <input id="ntceEndde" name="ntceEndde" type="hidden" value=""> |
|
| 159 |
- |
|
| 160 |
- <!-- 드래그앤 드롭 파라미터 --> |
|
| 161 |
- <input type="hidden" name="limitcount" value="${bdMstr.posblAtchFileNumber}" />
|
|
| 162 |
- <div class="contWrap"> |
|
| 163 |
- <div class="pageTitle"> |
|
| 164 |
- <div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div> |
|
| 165 |
- <h2 class="titType1 c_222222 fwBold"><c:out value='${bdMstr.bbsNm}' />- 글 등록 (${bdMstr.menuNm})</h2>
|
|
| 166 |
- <p class="tType6 c_999999">게시판 글을 생성/수정 할 수 있습니다.</p> |
|
| 167 |
- </div> |
|
| 168 |
- <div class="pageCont"> |
|
| 169 |
- <table class="tbType2"> |
|
| 170 |
- <colgroup> |
|
| 171 |
- <col style="width: 20%"> |
|
| 172 |
- <col style="width: 80%"> |
|
| 173 |
- </colgroup> |
|
| 174 |
- <tbody> |
|
| 175 |
- <c:if test="${Transfer}">
|
|
| 176 |
- <tr> |
|
| 177 |
- <th> |
|
| 178 |
- <label for="secretAt">임시수정</label> |
|
| 179 |
- </th> |
|
| 180 |
- <td> |
|
| 181 |
- 등록일 : |
|
| 182 |
- <input style="width: 10%;" id="frstRegisterPnttm" name="frstRegisterPnttm" title="제목" type="text" value="${board.frstRegisterPnttm}">
|
|
| 183 |
- 2000-01-05 (형식) |
|
| 184 |
- <br> |
|
| 185 |
- 총 |
|
| 186 |
- <input style="width: 10%;" id="inqireCo" name="inqireCo" title="제목" type="text" value="${board.inqireCo}">
|
|
| 187 |
- 123 (형식) |
|
| 188 |
- <br> |
|
| 189 |
- 등록자 : |
|
| 190 |
- <input style="width: 10%;" id="ntcrNm" name="ntcrNm" title="제목" type="text" value="${board.ntcrNm}">
|
|
| 191 |
- 아무개 (형식) |
|
| 192 |
- </td> |
|
| 193 |
- </tr> |
|
| 194 |
- </c:if> |
|
| 195 |
- <tr> |
|
| 196 |
- <th><span class="reqArea"> |
|
| 197 |
- <span class="reqArea">${bdMstr.bbsTyCode eq 'BBST07' ? "항목" : bdMstr.menuNo eq '9510000' ? "질문" : "제목"}</span>
|
|
| 198 |
- </span> |
|
| 199 |
- <c:out value="${msgNttSj}" />
|
|
| 200 |
- </th> |
|
| 201 |
- <td colspan="3"> |
|
| 202 |
- <form:input path="nttSj" title="${msgNttSj}" />
|
|
| 203 |
- <form:errors path="nttSj" /> |
|
| 204 |
- </td> |
|
| 205 |
- </tr> |
|
| 206 |
- <tr> |
|
| 207 |
- <th><span class="reqArea"> |
|
| 208 |
- ${brdMstrVO.menuNo eq '9510000' ? "답변" : "내용"}
|
|
| 209 |
- </span></th> |
|
| 210 |
- <td colspan="3"> |
|
| 211 |
- <form:textarea path="nttCn" class="textarea" cols="500" rows="20" /> |
|
| 212 |
- <ckeditor:replace replace="nttCn" basePath="${pageContext.request.contextPath}/html/egovframework/com/cmm/utl/ckeditor/" />
|
|
| 213 |
- <form:errors path="nttCn" /> |
|
| 214 |
- </td> |
|
| 215 |
- </tr> |
|
| 216 |
- <c:if test="${'BBSMSTR_000000000731' eq bdMstr.bbsId }"><!-- 이벤트 게시판 -->
|
|
| 217 |
- <tr> |
|
| 218 |
- <th><span class="reqArea">기간</span></th> |
|
| 219 |
- <td colspan="3"> |
|
| 220 |
- <input type="hidden" name="cal_url" id="cal_url" value="/sym/cmm/EgovNormalCalPopup.do"> |
|
| 221 |
- <input style="width:auto;" type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 222 |
- <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceBgndeYYYMMDD);"> |
|
| 223 |
- <input type="button" class="calBtn"> |
|
| 224 |
- </a> |
|
| 225 |
- <select id="ntceBgndeHH" name="ntceBgndeHH" class="date_format"> |
|
| 226 |
- <c:forEach var="result" items="${ntceBgndeHH}" varStatus="status">
|
|
| 227 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 228 |
- </c:forEach> |
|
| 229 |
- </select>시 |
|
| 230 |
- <select id="ntceBgndeMM" name="ntceBgndeMM" class="date_format"> |
|
| 231 |
- <c:forEach var="result" items="${ntceBgndeMM}" varStatus="status">
|
|
| 232 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 233 |
- </c:forEach> |
|
| 234 |
- </select>분 |
|
| 235 |
- ~ |
|
| 236 |
- <input style="width:auto;" type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 237 |
- <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceEnddeYYYMMDD);"> |
|
| 238 |
- <input type="button" class="calBtn"> |
|
| 239 |
- </a> |
|
| 240 |
- <select id="ntceEnddeHH" name="ntceEnddeHH" class="date_format"> |
|
| 241 |
- <c:forEach var="result" items="${ntceEnddeHH}" varStatus="status">
|
|
| 242 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 243 |
- </c:forEach> |
|
| 244 |
- </select>시 |
|
| 245 |
- <select id="ntceEnddeMM" name="ntceEnddeMM" class="date_format"> |
|
| 246 |
- <c:forEach var="result" items="${ntceEnddeMM}" varStatus="status">
|
|
| 247 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 248 |
- </c:forEach> |
|
| 249 |
- </select>분 |
|
| 250 |
- </td> |
|
| 251 |
- </tr> |
|
| 252 |
- </c:if> |
|
| 253 |
- |
|
| 254 |
- <c:if test="${'BBST07' eq bdMstr.bbsTyCode }"><!-- 사전정보공표 -->
|
|
| 255 |
- <tr> |
|
| 256 |
- <th><span class="reqArea">주기</span></th> |
|
| 257 |
- <td colspan="3"> |
|
| 258 |
- <input id="pubPeriod" name="pubPeriod" type="text" value=""> |
|
| 259 |
- </td> |
|
| 260 |
- </tr> |
|
| 261 |
- |
|
| 262 |
- <tr> |
|
| 263 |
- <th><span class="reqArea">시기</span></th> |
|
| 264 |
- <td colspan="3"> |
|
| 265 |
- <input id="pubTime" name="pubTime" type="text" value=""> |
|
| 266 |
- </td> |
|
| 267 |
- </tr> |
|
| 268 |
- |
|
| 269 |
- <tr> |
|
| 270 |
- <th><span class="reqArea">방법(링크)</span></th> |
|
| 271 |
- <td colspan="3"> |
|
| 272 |
- <input id="pubLink" name="pubLink" type="text" value=""> |
|
| 273 |
- </td> |
|
| 274 |
- </tr> |
|
| 275 |
- |
|
| 276 |
- <tr> |
|
| 277 |
- <th><span class="reqArea">담당부서</span></th> |
|
| 278 |
- <td colspan="3"> |
|
| 279 |
- <input id="pubLoc" name="pubLoc" type="text" value=""> |
|
| 280 |
- </td> |
|
| 281 |
- </tr> |
|
| 282 |
- |
|
| 283 |
- </c:if> |
|
| 284 |
- |
|
| 285 |
- <c:if test="${bdMstr.fileAtchPosblAt == 'Y'}">
|
|
| 286 |
- <tr> |
|
| 287 |
- <th>파일 첨부</th> |
|
| 288 |
- <td class="upload_area"> |
|
| 289 |
- <div class="file_upload_box no_img_box fileWrap"> |
|
| 290 |
- <table> |
|
| 291 |
- <colgroup> |
|
| 292 |
- <col style="width: 60%"> |
|
| 293 |
- <col style="width: 10%"> |
|
| 294 |
- <col style="width: 20%"> |
|
| 295 |
- <col style="width: 10%"> |
|
| 296 |
- </colgroup> |
|
| 297 |
- <thead> |
|
| 298 |
- <tr> |
|
| 299 |
- <th>파일명</th> |
|
| 300 |
- <th>크기</th> |
|
| 301 |
- <th>등록일시</th> |
|
| 302 |
- <th>삭제</th> |
|
| 303 |
- </tr> |
|
| 304 |
- </thead> |
|
| 305 |
- </table> |
|
| 306 |
- </div> |
|
| 307 |
- <div class="fileWrap fileAfter file_list_div"> |
|
| 308 |
- <table> |
|
| 309 |
- <colgroup> |
|
| 310 |
- <col style="width: 60%"> |
|
| 311 |
- <col style="width: 10%"> |
|
| 312 |
- <col style="width: 20%"> |
|
| 313 |
- <col style="width: 10%"> |
|
| 314 |
- </colgroup> |
|
| 315 |
- <thead> |
|
| 316 |
- <tr> |
|
| 317 |
- <th>파일명</th> |
|
| 318 |
- <th>크기</th> |
|
| 319 |
- <th>등록일시</th> |
|
| 320 |
- <th>삭제</th> |
|
| 321 |
- </tr> |
|
| 322 |
- </thead> |
|
| 323 |
- <tbody id="tbody_fiielist"> |
|
| 324 |
- <c:forEach var="fileList" items="${fileList}" varStatus="status">
|
|
| 325 |
- <tr class="item_${fileList.fmsImageFile}_${fileList.fileSn} uploaded_obj">
|
|
| 326 |
- <input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
|
|
| 327 |
- <td class="file_name"> |
|
| 328 |
- <img src="/direct/img/upload_hwp_img.png" alt="" /> |
|
| 329 |
- <span class="file_name_text">${fileList.orignlFileNm}</span>
|
|
| 330 |
- </td> |
|
| 331 |
- <td> |
|
| 332 |
- <span class="file_size_text" value="<c:out value="${fileList.fileSize}"/>"></span>
|
|
| 333 |
- |
|
| 334 |
- </td> |
|
| 335 |
- <td> |
|
| 336 |
- <c:out value="${fileList.regdt}"/>
|
|
| 337 |
- </td> |
|
| 338 |
- <td> |
|
| 339 |
- <input type="button" class="delBtn" onclick="delAtchFile('${fileList.fmsImageFile}', '${fileList.fileSn}'); return false;">
|
|
| 340 |
- </td> |
|
| 341 |
- </tr> |
|
| 342 |
- </c:forEach> |
|
| 343 |
- </tbody> |
|
| 344 |
- </table> |
|
| 345 |
- </div> |
|
| 346 |
- <div class="fileInfo file_list_div"> |
|
| 347 |
- <ul class="inline"> |
|
| 348 |
- <li> |
|
| 349 |
- <p>최대 <span class="c_e40000 fwBold limitcount_li">${bdMstr.posblAtchFileNumber}</span>개 | <span class="c_e40000 fwBold upload_number">50MB</span>제한</p>
|
|
| 350 |
- </li> |
|
| 351 |
- <li> |
|
| 352 |
- <p><span class="c_456ded fwBold totalfileCount">1</span>개 | <span class="c_456ded fwBold totalfileSize">72.01KB</span></p> |
|
| 353 |
- </li> |
|
| 354 |
- </ul> |
|
| 355 |
- </div> |
|
| 356 |
- <div class="uploadBtm"> |
|
| 357 |
- <input type="file" id="file_temp" name="file_temp" class="uploadFile"> |
|
| 358 |
- </div> |
|
| 359 |
- </td> |
|
| 360 |
- </tr> |
|
| 361 |
- </c:if> |
|
| 362 |
- <c:if test="${!empty fmsFileList[0].fmsId }">
|
|
| 363 |
- <tr> |
|
| 364 |
- <th class="td_title1"><span class="star_t"></span>첨부이미지 링크</th> |
|
| 365 |
- <td colspan="3"> |
|
| 366 |
- <c:forEach var="result" items="${fmsFileList}" varStatus="status">
|
|
| 367 |
- <c:if test="${result.fileExtsn eq 'jpg' ||
|
|
| 368 |
- result.fileExtsn eq 'jpeg' || |
|
| 369 |
- result.fileExtsn eq 'png' || |
|
| 370 |
- result.fileExtsn eq 'bmp' || |
|
| 371 |
- result.fileExtsn eq 'gif' || |
|
| 372 |
- result.fileExtsn eq 'img' }"> |
|
| 373 |
- <span class="item_${result.fmsImageFile}_${result.fileSn}">
|
|
| 374 |
- <a href='${result.fmsLink}' target="_blank">${result.fmsLink}</a>
|
|
| 375 |
- (${result.orignlFileNm})
|
|
| 376 |
- </br> |
|
| 377 |
- </span> |
|
| 378 |
- </c:if> |
|
| 379 |
- </c:forEach> |
|
| 380 |
- </td> |
|
| 381 |
- </tr> |
|
| 382 |
- <tr> |
|
| 383 |
- <th class="td_title1"><span class="star_t"></span>첨부다운로드 링크</th> |
|
| 384 |
- <td colspan="3"> |
|
| 385 |
- <c:forEach var="result" items="${fmsFileList}" varStatus="status">
|
|
| 386 |
- <span class="item_${result.fmsImageFile}_${result.fileSn}">
|
|
| 387 |
- <a href='${result.fmsDownLink}'>${result.fmsDownLink}</a>
|
|
| 388 |
- <c:if test="${listExist}">(</c:if>
|
|
| 389 |
- ${result.orignlFileNm}
|
|
| 390 |
- <c:if test="${listExist}">)</c:if>
|
|
| 391 |
- </br> |
|
| 392 |
- </span> |
|
| 393 |
- </c:forEach> |
|
| 394 |
- </td> |
|
| 395 |
- </tr> |
|
| 396 |
- |
|
| 397 |
- |
|
| 398 |
- <tr> |
|
| 399 |
- <th class="td_title1"><span class="star_t"></span>최종수정일</th> |
|
| 400 |
- <td colspan="3"> |
|
| 401 |
- ${fmsFileList[0].moddt }
|
|
| 402 |
- </td> |
|
| 403 |
- </tr> |
|
| 404 |
- <tr> |
|
| 405 |
- <th class="td_title1"><span class="star_t"></span>작성자</th> |
|
| 406 |
- <td colspan="3"> |
|
| 407 |
- ${fmsFileList[0].registerId }
|
|
| 408 |
- </td> |
|
| 409 |
- </tr> |
|
| 410 |
- </c:if> |
|
| 411 |
- |
|
| 412 |
- <!-- 공지 여부 --> |
|
| 413 |
- <c:choose> |
|
| 414 |
- <c:when test="${bdMstr.noticeYn == 'Y'}">
|
|
| 415 |
- <c:set var="title">공지여부/공지기간 </c:set> |
|
| 416 |
- <tr> |
|
| 417 |
- <th> |
|
| 418 |
- <label for="noticeAtTitle">${title}</label>
|
|
| 419 |
- </th> |
|
| 420 |
- <td> |
|
| 421 |
- <input type="checkbox" name="noticeAt" id="noticeAt" value="Y"> |
|
| 422 |
- <span style="padding-left: 10px;">/</span> |
|
| 423 |
- |
|
| 424 |
- <input type="hidden" name="cal_url" id="cal_url" value="/sym/cmm/EgovNormalCalPopup.do"> |
|
| 425 |
- <input style="width:auto;margin-left: 10px;" type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 426 |
- <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceBgndeYYYMMDD);"> |
|
| 427 |
- <input type="button" class="calBtn"> |
|
| 428 |
- </a> |
|
| 429 |
- <select id="ntceBgndeHH" name="ntceBgndeHH" class="date_format"> |
|
| 430 |
- <c:forEach var="result" items="${ntceBgndeHH}" varStatus="status">
|
|
| 431 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 432 |
- </c:forEach> |
|
| 433 |
- </select>시 |
|
| 434 |
- <select id="ntceBgndeMM" name="ntceBgndeMM" class="date_format"> |
|
| 435 |
- <c:forEach var="result" items="${ntceBgndeMM}" varStatus="status">
|
|
| 436 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 437 |
- </c:forEach> |
|
| 438 |
- </select>분 |
|
| 439 |
- ~ |
|
| 440 |
- <input style="width:auto;" type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 441 |
- <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceEnddeYYYMMDD);"> |
|
| 442 |
- <input type="button" class="calBtn"> |
|
| 443 |
- </a> |
|
| 444 |
- <select id="ntceEnddeHH" name="ntceEnddeHH" class="date_format"> |
|
| 445 |
- <c:forEach var="result" items="${ntceEnddeHH}" varStatus="status">
|
|
| 446 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 447 |
- </c:forEach> |
|
| 448 |
- </select>시 |
|
| 449 |
- <select id="ntceEnddeMM" name="ntceEnddeMM" class="date_format"> |
|
| 450 |
- <c:forEach var="result" items="${ntceEnddeMM}" varStatus="status">
|
|
| 451 |
- <option value="${result.code}">${result.codeNm}</option>
|
|
| 452 |
- </c:forEach> |
|
| 453 |
- </select>분 |
|
| 454 |
- </td> |
|
| 455 |
- </tr> |
|
| 456 |
- </c:when> |
|
| 457 |
- <c:otherwise> |
|
| 458 |
- <form:hidden path="noticeAt" value="N" /> |
|
| 459 |
- </c:otherwise> |
|
| 460 |
- </c:choose> |
|
| 461 |
- <!-- 공지 여부 --> |
|
| 462 |
- |
|
| 463 |
- </tbody> |
|
| 464 |
- </table> |
|
| 465 |
- <div class="btnWrap"> |
|
| 466 |
- <input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;"> |
|
| 467 |
- <input type="button" class="btnType1 bg_888888" value="미리보기" onclick="fn_egov_regist_preview(); return false;"> |
|
| 468 |
- <c:if test="${!empty fmsFileList[0].fmsId }">
|
|
| 469 |
- <input type="button" class="btnType1" value="삭 제" onclick="fn_fmsfile_delete(); return false;"> |
|
| 470 |
- <input type="button" class="btnType1" value="수 정" onclick="goSave('fmsFile_U'); return false;">
|
|
| 471 |
- </c:if> |
|
| 472 |
- <c:if test="${empty fmsFileList[0].fmsId }">
|
|
| 473 |
- <input type="button" class="btnType1" value="저 장" onclick="fn_egov_regist_notice(); return false;"> |
|
| 474 |
- </c:if> |
|
| 475 |
- </div> |
|
| 476 |
- </div> |
|
| 477 |
- </div> |
|
| 478 |
-</form:form> |
|
| 479 |
- |
|
| 480 |
- <!-- //content 끝 --> |
|
| 481 |
-</body> |
|
| 482 |
-</html> |
|
| 483 |
- |
|
| 1 |
+<%-- |
|
| 2 |
+ Class Name : EgovNoticeRegist.jsp |
|
| 3 |
+ Description : 게시물 생성 화면 |
|
| 4 |
+ Modification Information |
|
| 5 |
+ |
|
| 6 |
+ 수정일 수정자 수정내용 |
|
| 7 |
+ ------- -------- --------------------------- |
|
| 8 |
+ 2009.03.24 이삼섭 최초 생성 |
|
| 9 |
+ 2011.08.31 JJY 경량환경 버전 생성 |
|
| 10 |
+ |
|
| 11 |
+ author : 공통서비스 개발팀 이삼섭 |
|
| 12 |
+ since : 2009.03.24 |
|
| 13 |
+--%> |
|
| 14 |
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
|
| 15 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 16 |
+<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 17 |
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> |
|
| 18 |
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> |
|
| 19 |
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> |
|
| 20 |
+<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%> |
|
| 21 |
+<%@ taglib prefix="ckeditor" uri="http://ckeditor.com"%> |
|
| 22 |
+<!DOCTYPE html> |
|
| 23 |
+<html> |
|
| 24 |
+<head> |
|
| 25 |
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
| 26 |
+<meta http-equiv="content-language" content="ko"> |
|
| 27 |
+<script type="text/javascript" src="<c:url value='/js/EgovBBSMng.js' />"></script> |
|
| 28 |
+<script type="text/javascript" src="<c:url value='/js/EgovMultiFileItn.js'/>"></script> <!-- 파일첨부, 썸네일이미지 있으면 미리보기 --> |
|
| 29 |
+<%-- <script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script> --%> |
|
| 30 |
+<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js'/>"></script> |
|
| 31 |
+<script type="text/javascript" src="<c:url value="/validator.do"/>"></script> |
|
| 32 |
+<validator:javascript formName="board" staticJavascript="false" xhtml="true" cdata="false" /> |
|
| 33 |
+<script type="text/javascript"> |
|
| 34 |
+$( document ).ready(function() {
|
|
| 35 |
+}); |
|
| 36 |
+ |
|
| 37 |
+function goList() {
|
|
| 38 |
+ document.searchForm.submit(); |
|
| 39 |
+} |
|
| 40 |
+ |
|
| 41 |
+function fn_egov_regist_notice() {
|
|
| 42 |
+ CKEDITOR.instances.nttCn.updateElement(); |
|
| 43 |
+ if (!validateBoard(document.board)) |
|
| 44 |
+ return; |
|
| 45 |
+ |
|
| 46 |
+ //금지어 확인 |
|
| 47 |
+ /* var prohibitCheck = false; |
|
| 48 |
+ var form = document.board ; |
|
| 49 |
+ form.checkProhibitCn.value = form.nttSj.value + form.nttCn.value ; |
|
| 50 |
+ var data = new FormData(form); |
|
| 51 |
+ $.ajax({
|
|
| 52 |
+ type: "POST", |
|
| 53 |
+ url: "/uss/ion/cnf/prohiCheckAjax.do", |
|
| 54 |
+ async:false, |
|
| 55 |
+ data: data, |
|
| 56 |
+ dataType:'json', |
|
| 57 |
+ processData: false, |
|
| 58 |
+ contentType: false, |
|
| 59 |
+ cache: false, |
|
| 60 |
+ timeout: 600000, |
|
| 61 |
+ success: function (returnData, status) {
|
|
| 62 |
+ if(status == 'success'){
|
|
| 63 |
+ if(returnData.result == 'fail'){
|
|
| 64 |
+ }else if(returnData.result == 'auth_fail'){
|
|
| 65 |
+ }else if(returnData.result =='success'){
|
|
| 66 |
+ if(null != returnData.prohibitVO.prohibitCn){
|
|
| 67 |
+ alert( returnData.prohibitVO.prohibitCn + " 단어는 금지어로 등록되어 있는 단어입니다." ); |
|
| 68 |
+ prohibitCheck = true; |
|
| 69 |
+ } |
|
| 70 |
+ } |
|
| 71 |
+ }else{
|
|
| 72 |
+ //alert("등록에 실패하였습니다.");
|
|
| 73 |
+ } |
|
| 74 |
+ }, |
|
| 75 |
+ error: function (e) {
|
|
| 76 |
+ //alert("등록에 실패하였습니다.");
|
|
| 77 |
+ } |
|
| 78 |
+ }); |
|
| 79 |
+ |
|
| 80 |
+ if(prohibitCheck){
|
|
| 81 |
+ return; |
|
| 82 |
+ } */ |
|
| 83 |
+ |
|
| 84 |
+ <c:if test="${bdMstr.bbsId == 'BBSMSTR_000000000731' }">
|
|
| 85 |
+ {
|
|
| 86 |
+ if($('#ntceBgndeYYYMMDD').val() == ''){
|
|
| 87 |
+ alert(" 시작일은 필수입니다.");
|
|
| 88 |
+ return; |
|
| 89 |
+ } |
|
| 90 |
+ if($('#ntceEnddeYYYMMDD').val() == ''){
|
|
| 91 |
+ alert(" 종료일은 필수입니다.");
|
|
| 92 |
+ return; |
|
| 93 |
+ } |
|
| 94 |
+ |
|
| 95 |
+ var iChkBeginDe = Number(($('#ntceBgndeYYYMMDD').val()+$('#ntceBgndeHH').val()+$('#ntceBgndeMM').val()).replaceAll("-","") );
|
|
| 96 |
+ var iChkEndDe = Number(($('#ntceEnddeYYYMMDD').val()+$('#ntceEnddeHH').val()+$('#ntceEnddeMM').val()).replaceAll("-","") );
|
|
| 97 |
+ |
|
| 98 |
+ if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
|
|
| 99 |
+ alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
|
|
| 100 |
+ return; |
|
| 101 |
+ } |
|
| 102 |
+ $('#ntceBgnde').val(iChkBeginDe) ;
|
|
| 103 |
+ $('#ntceEndde').val(iChkEndDe) ;
|
|
| 104 |
+ } |
|
| 105 |
+ </c:if> |
|
| 106 |
+ |
|
| 107 |
+ if (confirm('<spring:message code="common.regist.msg" />')) {
|
|
| 108 |
+ goSave(); |
|
| 109 |
+ } |
|
| 110 |
+} |
|
| 111 |
+ |
|
| 112 |
+function goList() {
|
|
| 113 |
+ document.searchForm.action = "<c:url value='/cop/bbs/selectBoardList.do'/>"; |
|
| 114 |
+ document.searchForm.submit(); |
|
| 115 |
+} |
|
| 116 |
+ |
|
| 117 |
+function fn_egov_regist_preview() {
|
|
| 118 |
+ var PCC_window = window.open('', 'PCCV3Window', 'width=850, height=570, resizable=1, scrollbars=yes, status=0, titlebar=0, toolbar=0, left=350, top=50' );
|
|
| 119 |
+ |
|
| 120 |
+ var previewImgs = ""; |
|
| 121 |
+ var i = 0; |
|
| 122 |
+ |
|
| 123 |
+ $("#DIV_IMG_VIEW").find("img").each(function() {
|
|
| 124 |
+ previewImgs += $(this).get(0).src + "^"; |
|
| 125 |
+ i++; |
|
| 126 |
+ }); |
|
| 127 |
+ |
|
| 128 |
+ document.board.previewImgs.value = previewImgs; |
|
| 129 |
+ document.board.action = "<c:url value='/cop/bbs/bbsPreview.do'/>"; |
|
| 130 |
+ document.board.target = "PCCV3Window"; |
|
| 131 |
+ document.board.submit(); |
|
| 132 |
+} |
|
| 133 |
+</script> |
|
| 134 |
+<title><c:out value='${bdMstr.bbsNm}' /> - 글 등록</title>
|
|
| 135 |
+<style> |
|
| 136 |
+.uploaded_obj{width: 100%;}
|
|
| 137 |
+</style> |
|
| 138 |
+</head> |
|
| 139 |
+<body> |
|
| 140 |
+ <form:form commandName="searchForm" name="searchForm" method="get" action=""> |
|
| 141 |
+ <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>" />
|
|
| 142 |
+ <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>" />
|
|
| 143 |
+ <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>" />
|
|
| 144 |
+ <input name="bbsId" type="hidden" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
| 145 |
+ </form:form> |
|
| 146 |
+ |
|
| 147 |
+ <form:form commandName="board" name="board" method="post" enctype="multipart/form-data"> |
|
| 148 |
+ <input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>" />
|
|
| 149 |
+ <input type="hidden" name="searchCnd" value="<c:out value='${searchVO.searchCnd}'/>" />
|
|
| 150 |
+ <input type="hidden" name="searchWrd" value="<c:out value='${searchVO.searchWrd}'/>" />
|
|
| 151 |
+ <input type="hidden" name="bbsId" value="<c:out value='${bdMstr.bbsId}'/>" />
|
|
| 152 |
+ <input type="hidden" name="previewImgs" value="" /> |
|
| 153 |
+ <input type="hidden" name="checkProhibitCn" value="" /> |
|
| 154 |
+ <input type="hidden" name="siteId" value="<c:out value='${bdMstr.siteId}'/>" />
|
|
| 155 |
+ <input type="hidden" name="pageType" id="pageType" value="insert" /> |
|
| 156 |
+ |
|
| 157 |
+ <input id="ntceBgnde" name="ntceBgnde" type="hidden" value=""> |
|
| 158 |
+ <input id="ntceEndde" name="ntceEndde" type="hidden" value=""> |
|
| 159 |
+ |
|
| 160 |
+ <!-- 드래그앤 드롭 파라미터 --> |
|
| 161 |
+ <input type="hidden" name="limitcount" value="${bdMstr.posblAtchFileNumber}" />
|
|
| 162 |
+ <div class="contWrap"> |
|
| 163 |
+ <div class="pageTitle"> |
|
| 164 |
+ <div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div> |
|
| 165 |
+ <h2 class="titType1 c_222222 fwBold"><c:out value='${bdMstr.bbsNm}' />- 글 등록 (${bdMstr.menuNm})</h2>
|
|
| 166 |
+ <p class="tType6 c_999999">게시판 글을 생성/수정 할 수 있습니다.</p> |
|
| 167 |
+ </div> |
|
| 168 |
+ <div class="pageCont"> |
|
| 169 |
+ <table class="tbType2"> |
|
| 170 |
+ <colgroup> |
|
| 171 |
+ <col style="width: 20%"> |
|
| 172 |
+ <col style="width: 80%"> |
|
| 173 |
+ </colgroup> |
|
| 174 |
+ <tbody> |
|
| 175 |
+ <c:if test="${Transfer}">
|
|
| 176 |
+ <tr> |
|
| 177 |
+ <th> |
|
| 178 |
+ <label for="secretAt">임시수정</label> |
|
| 179 |
+ </th> |
|
| 180 |
+ <td> |
|
| 181 |
+ 등록일 : |
|
| 182 |
+ <input style="width: 10%;" id="frstRegisterPnttm" name="frstRegisterPnttm" title="제목" type="text" value="${board.frstRegisterPnttm}">
|
|
| 183 |
+ 2000-01-05 (형식) |
|
| 184 |
+ <br> |
|
| 185 |
+ 총 |
|
| 186 |
+ <input style="width: 10%;" id="inqireCo" name="inqireCo" title="제목" type="text" value="${board.inqireCo}">
|
|
| 187 |
+ 123 (형식) |
|
| 188 |
+ <br> |
|
| 189 |
+ 등록자 : |
|
| 190 |
+ <input style="width: 10%;" id="ntcrNm" name="ntcrNm" title="제목" type="text" value="${board.ntcrNm}">
|
|
| 191 |
+ 아무개 (형식) |
|
| 192 |
+ </td> |
|
| 193 |
+ </tr> |
|
| 194 |
+ </c:if> |
|
| 195 |
+ <tr> |
|
| 196 |
+ <th><span class="reqArea"> |
|
| 197 |
+ <span class="reqArea">${bdMstr.bbsTyCode eq 'BBST07' ? "항목" : bdMstr.menuNo eq '9510000' ? "질문" : "제목"}</span>
|
|
| 198 |
+ </span> |
|
| 199 |
+ <c:out value="${msgNttSj}" />
|
|
| 200 |
+ </th> |
|
| 201 |
+ <td colspan="3"> |
|
| 202 |
+ <form:input path="nttSj" title="${msgNttSj}" />
|
|
| 203 |
+ <form:errors path="nttSj" /> |
|
| 204 |
+ </td> |
|
| 205 |
+ </tr> |
|
| 206 |
+ <tr> |
|
| 207 |
+ <th><span class="reqArea"> |
|
| 208 |
+ ${brdMstrVO.menuNo eq '9510000' ? "답변" : "내용"}
|
|
| 209 |
+ </span></th> |
|
| 210 |
+ <td colspan="3"> |
|
| 211 |
+ <form:textarea path="nttCn" class="textarea" cols="500" rows="20" /> |
|
| 212 |
+ <ckeditor:replace replace="nttCn" basePath="${pageContext.request.contextPath}/html/egovframework/com/cmm/utl/ckeditor/" />
|
|
| 213 |
+ <form:errors path="nttCn" /> |
|
| 214 |
+ </td> |
|
| 215 |
+ </tr> |
|
| 216 |
+ <c:if test="${'BBSMSTR_000000000731' eq bdMstr.bbsId }"><!-- 이벤트 게시판 -->
|
|
| 217 |
+ <tr> |
|
| 218 |
+ <th><span class="reqArea">기간</span></th> |
|
| 219 |
+ <td colspan="3"> |
|
| 220 |
+ <input type="hidden" name="cal_url" id="cal_url" value="/sym/cmm/EgovNormalCalPopup.do"> |
|
| 221 |
+ <input style="width:auto;" type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 222 |
+ <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceBgndeYYYMMDD);"> |
|
| 223 |
+ <input type="button" class="calBtn"> |
|
| 224 |
+ </a> |
|
| 225 |
+ <select id="ntceBgndeHH" name="ntceBgndeHH" class="date_format"> |
|
| 226 |
+ <c:forEach var="result" items="${ntceBgndeHH}" varStatus="status">
|
|
| 227 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 228 |
+ </c:forEach> |
|
| 229 |
+ </select>시 |
|
| 230 |
+ <select id="ntceBgndeMM" name="ntceBgndeMM" class="date_format"> |
|
| 231 |
+ <c:forEach var="result" items="${ntceBgndeMM}" varStatus="status">
|
|
| 232 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 233 |
+ </c:forEach> |
|
| 234 |
+ </select>분 |
|
| 235 |
+ ~ |
|
| 236 |
+ <input style="width:auto;" type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 237 |
+ <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceEnddeYYYMMDD);"> |
|
| 238 |
+ <input type="button" class="calBtn"> |
|
| 239 |
+ </a> |
|
| 240 |
+ <select id="ntceEnddeHH" name="ntceEnddeHH" class="date_format"> |
|
| 241 |
+ <c:forEach var="result" items="${ntceEnddeHH}" varStatus="status">
|
|
| 242 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 243 |
+ </c:forEach> |
|
| 244 |
+ </select>시 |
|
| 245 |
+ <select id="ntceEnddeMM" name="ntceEnddeMM" class="date_format"> |
|
| 246 |
+ <c:forEach var="result" items="${ntceEnddeMM}" varStatus="status">
|
|
| 247 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 248 |
+ </c:forEach> |
|
| 249 |
+ </select>분 |
|
| 250 |
+ </td> |
|
| 251 |
+ </tr> |
|
| 252 |
+ </c:if> |
|
| 253 |
+ |
|
| 254 |
+ <c:if test="${'BBST07' eq bdMstr.bbsTyCode }"><!-- 사전정보공표 -->
|
|
| 255 |
+ <tr> |
|
| 256 |
+ <th><span class="reqArea">주기</span></th> |
|
| 257 |
+ <td colspan="3"> |
|
| 258 |
+ <input id="pubPeriod" name="pubPeriod" type="text" value=""> |
|
| 259 |
+ </td> |
|
| 260 |
+ </tr> |
|
| 261 |
+ |
|
| 262 |
+ <tr> |
|
| 263 |
+ <th><span class="reqArea">시기</span></th> |
|
| 264 |
+ <td colspan="3"> |
|
| 265 |
+ <input id="pubTime" name="pubTime" type="text" value=""> |
|
| 266 |
+ </td> |
|
| 267 |
+ </tr> |
|
| 268 |
+ |
|
| 269 |
+ <tr> |
|
| 270 |
+ <th><span class="reqArea">방법(링크)</span></th> |
|
| 271 |
+ <td colspan="3"> |
|
| 272 |
+ <input id="pubLink" name="pubLink" type="text" value=""> |
|
| 273 |
+ </td> |
|
| 274 |
+ </tr> |
|
| 275 |
+ |
|
| 276 |
+ <tr> |
|
| 277 |
+ <th><span class="reqArea">담당부서</span></th> |
|
| 278 |
+ <td colspan="3"> |
|
| 279 |
+ <input id="pubLoc" name="pubLoc" type="text" value=""> |
|
| 280 |
+ </td> |
|
| 281 |
+ </tr> |
|
| 282 |
+ |
|
| 283 |
+ </c:if> |
|
| 284 |
+ |
|
| 285 |
+ <c:if test="${bdMstr.fileAtchPosblAt == 'Y'}">
|
|
| 286 |
+ <tr> |
|
| 287 |
+ <th>파일 첨부</th> |
|
| 288 |
+ <td class="upload_area"> |
|
| 289 |
+ <div class="file_upload_box no_img_box fileWrap"> |
|
| 290 |
+ <table> |
|
| 291 |
+ <colgroup> |
|
| 292 |
+ <col style="width: 60%"> |
|
| 293 |
+ <col style="width: 10%"> |
|
| 294 |
+ <col style="width: 20%"> |
|
| 295 |
+ <col style="width: 10%"> |
|
| 296 |
+ </colgroup> |
|
| 297 |
+ <thead> |
|
| 298 |
+ <tr> |
|
| 299 |
+ <th>파일명</th> |
|
| 300 |
+ <th>크기</th> |
|
| 301 |
+ <th>등록일시</th> |
|
| 302 |
+ <th>삭제</th> |
|
| 303 |
+ </tr> |
|
| 304 |
+ </thead> |
|
| 305 |
+ </table> |
|
| 306 |
+ </div> |
|
| 307 |
+ <div class="fileWrap fileAfter file_list_div"> |
|
| 308 |
+ <table> |
|
| 309 |
+ <colgroup> |
|
| 310 |
+ <col style="width: 60%"> |
|
| 311 |
+ <col style="width: 10%"> |
|
| 312 |
+ <col style="width: 20%"> |
|
| 313 |
+ <col style="width: 10%"> |
|
| 314 |
+ </colgroup> |
|
| 315 |
+ <thead> |
|
| 316 |
+ <tr> |
|
| 317 |
+ <th>파일명</th> |
|
| 318 |
+ <th>크기</th> |
|
| 319 |
+ <th>등록일시</th> |
|
| 320 |
+ <th>삭제</th> |
|
| 321 |
+ </tr> |
|
| 322 |
+ </thead> |
|
| 323 |
+ <tbody id="tbody_fiielist"> |
|
| 324 |
+ <c:forEach var="fileList" items="${fileList}" varStatus="status">
|
|
| 325 |
+ <tr class="item_${fileList.fmsImageFile}_${fileList.fileSn} uploaded_obj">
|
|
| 326 |
+ <input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
|
|
| 327 |
+ <td class="file_name"> |
|
| 328 |
+ <img src="/direct/img/upload_hwp_img.png" alt="" /> |
|
| 329 |
+ <span class="file_name_text">${fileList.orignlFileNm}</span>
|
|
| 330 |
+ </td> |
|
| 331 |
+ <td> |
|
| 332 |
+ <span class="file_size_text" value="<c:out value="${fileList.fileSize}"/>"></span>
|
|
| 333 |
+ |
|
| 334 |
+ </td> |
|
| 335 |
+ <td> |
|
| 336 |
+ <c:out value="${fileList.regdt}"/>
|
|
| 337 |
+ </td> |
|
| 338 |
+ <td> |
|
| 339 |
+ <input type="button" class="delBtn" onclick="delAtchFile('${fileList.fmsImageFile}', '${fileList.fileSn}'); return false;">
|
|
| 340 |
+ </td> |
|
| 341 |
+ </tr> |
|
| 342 |
+ </c:forEach> |
|
| 343 |
+ </tbody> |
|
| 344 |
+ </table> |
|
| 345 |
+ </div> |
|
| 346 |
+ <div class="fileInfo file_list_div"> |
|
| 347 |
+ <ul class="inline"> |
|
| 348 |
+ <li> |
|
| 349 |
+ <p>최대 <span class="c_e40000 fwBold limitcount_li">${bdMstr.posblAtchFileNumber}</span>개 | <span class="c_e40000 fwBold upload_number">50MB</span>제한</p>
|
|
| 350 |
+ </li> |
|
| 351 |
+ <li> |
|
| 352 |
+ <p><span class="c_456ded fwBold totalfileCount">1</span>개 | <span class="c_456ded fwBold totalfileSize">72.01KB</span></p> |
|
| 353 |
+ </li> |
|
| 354 |
+ </ul> |
|
| 355 |
+ </div> |
|
| 356 |
+ <div class="uploadBtm"> |
|
| 357 |
+ <input type="file" id="file_temp" name="file_temp" class="uploadFile"> |
|
| 358 |
+ </div> |
|
| 359 |
+ </td> |
|
| 360 |
+ </tr> |
|
| 361 |
+ </c:if> |
|
| 362 |
+ <c:if test="${!empty fmsFileList[0].fmsId }">
|
|
| 363 |
+ <tr> |
|
| 364 |
+ <th class="td_title1"><span class="star_t"></span>첨부이미지 링크</th> |
|
| 365 |
+ <td colspan="3"> |
|
| 366 |
+ <c:forEach var="result" items="${fmsFileList}" varStatus="status">
|
|
| 367 |
+ <c:if test="${result.fileExtsn eq 'jpg' ||
|
|
| 368 |
+ result.fileExtsn eq 'jpeg' || |
|
| 369 |
+ result.fileExtsn eq 'png' || |
|
| 370 |
+ result.fileExtsn eq 'bmp' || |
|
| 371 |
+ result.fileExtsn eq 'gif' || |
|
| 372 |
+ result.fileExtsn eq 'img' }"> |
|
| 373 |
+ <span class="item_${result.fmsImageFile}_${result.fileSn}">
|
|
| 374 |
+ <a href='${result.fmsLink}' target="_blank">${result.fmsLink}</a>
|
|
| 375 |
+ (${result.orignlFileNm})
|
|
| 376 |
+ </br> |
|
| 377 |
+ </span> |
|
| 378 |
+ </c:if> |
|
| 379 |
+ </c:forEach> |
|
| 380 |
+ </td> |
|
| 381 |
+ </tr> |
|
| 382 |
+ <tr> |
|
| 383 |
+ <th class="td_title1"><span class="star_t"></span>첨부다운로드 링크</th> |
|
| 384 |
+ <td colspan="3"> |
|
| 385 |
+ <c:forEach var="result" items="${fmsFileList}" varStatus="status">
|
|
| 386 |
+ <span class="item_${result.fmsImageFile}_${result.fileSn}">
|
|
| 387 |
+ <a href='${result.fmsDownLink}'>${result.fmsDownLink}</a>
|
|
| 388 |
+ <c:if test="${listExist}">(</c:if>
|
|
| 389 |
+ ${result.orignlFileNm}
|
|
| 390 |
+ <c:if test="${listExist}">)</c:if>
|
|
| 391 |
+ </br> |
|
| 392 |
+ </span> |
|
| 393 |
+ </c:forEach> |
|
| 394 |
+ </td> |
|
| 395 |
+ </tr> |
|
| 396 |
+ |
|
| 397 |
+ |
|
| 398 |
+ <tr> |
|
| 399 |
+ <th class="td_title1"><span class="star_t"></span>최종수정일</th> |
|
| 400 |
+ <td colspan="3"> |
|
| 401 |
+ ${fmsFileList[0].moddt }
|
|
| 402 |
+ </td> |
|
| 403 |
+ </tr> |
|
| 404 |
+ <tr> |
|
| 405 |
+ <th class="td_title1"><span class="star_t"></span>작성자</th> |
|
| 406 |
+ <td colspan="3"> |
|
| 407 |
+ ${fmsFileList[0].registerId }
|
|
| 408 |
+ </td> |
|
| 409 |
+ </tr> |
|
| 410 |
+ </c:if> |
|
| 411 |
+ |
|
| 412 |
+ <!-- 공지 여부 --> |
|
| 413 |
+ <c:choose> |
|
| 414 |
+ <c:when test="${bdMstr.noticeYn == 'Y'}">
|
|
| 415 |
+ <c:set var="title">공지여부/공지기간 </c:set> |
|
| 416 |
+ <tr> |
|
| 417 |
+ <th> |
|
| 418 |
+ <label for="noticeAtTitle">${title}</label>
|
|
| 419 |
+ </th> |
|
| 420 |
+ <td> |
|
| 421 |
+ <input type="checkbox" name="noticeAt" id="noticeAt" value="Y"> |
|
| 422 |
+ <span style="padding-left: 10px;">/</span> |
|
| 423 |
+ |
|
| 424 |
+ <input type="hidden" name="cal_url" id="cal_url" value="/sym/cmm/EgovNormalCalPopup.do"> |
|
| 425 |
+ <input style="width:auto;margin-left: 10px;" type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 426 |
+ <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceBgndeYYYMMDD);"> |
|
| 427 |
+ <input type="button" class="calBtn"> |
|
| 428 |
+ </a> |
|
| 429 |
+ <select id="ntceBgndeHH" name="ntceBgndeHH" class="date_format"> |
|
| 430 |
+ <c:forEach var="result" items="${ntceBgndeHH}" varStatus="status">
|
|
| 431 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 432 |
+ </c:forEach> |
|
| 433 |
+ </select>시 |
|
| 434 |
+ <select id="ntceBgndeMM" name="ntceBgndeMM" class="date_format"> |
|
| 435 |
+ <c:forEach var="result" items="${ntceBgndeMM}" varStatus="status">
|
|
| 436 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 437 |
+ </c:forEach> |
|
| 438 |
+ </select>분 |
|
| 439 |
+ ~ |
|
| 440 |
+ <input style="width:auto;" type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="4" maxlength="4" readonly=""> |
|
| 441 |
+ <a href="#" onclick="javascript:fn_egov_NormalCalendar(document.forms.board, document.forms.board.ntceEnddeYYYMMDD);"> |
|
| 442 |
+ <input type="button" class="calBtn"> |
|
| 443 |
+ </a> |
|
| 444 |
+ <select id="ntceEnddeHH" name="ntceEnddeHH" class="date_format"> |
|
| 445 |
+ <c:forEach var="result" items="${ntceEnddeHH}" varStatus="status">
|
|
| 446 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 447 |
+ </c:forEach> |
|
| 448 |
+ </select>시 |
|
| 449 |
+ <select id="ntceEnddeMM" name="ntceEnddeMM" class="date_format"> |
|
| 450 |
+ <c:forEach var="result" items="${ntceEnddeMM}" varStatus="status">
|
|
| 451 |
+ <option value="${result.code}">${result.codeNm}</option>
|
|
| 452 |
+ </c:forEach> |
|
| 453 |
+ </select>분 |
|
| 454 |
+ </td> |
|
| 455 |
+ </tr> |
|
| 456 |
+ </c:when> |
|
| 457 |
+ <c:otherwise> |
|
| 458 |
+ <form:hidden path="noticeAt" value="N" /> |
|
| 459 |
+ </c:otherwise> |
|
| 460 |
+ </c:choose> |
|
| 461 |
+ <!-- 공지 여부 --> |
|
| 462 |
+ |
|
| 463 |
+ </tbody> |
|
| 464 |
+ </table> |
|
| 465 |
+ <div class="btnWrap"> |
|
| 466 |
+ <input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;"> |
|
| 467 |
+ <input type="button" class="btnType1 bg_888888" value="미리보기" onclick="fn_egov_regist_preview(); return false;"> |
|
| 468 |
+ <c:if test="${!empty fmsFileList[0].fmsId }">
|
|
| 469 |
+ <input type="button" class="btnType1" value="삭 제" onclick="fn_fmsfile_delete(); return false;"> |
|
| 470 |
+ <input type="button" class="btnType1" value="수 정" onclick="goSave('fmsFile_U'); return false;">
|
|
| 471 |
+ </c:if> |
|
| 472 |
+ <c:if test="${empty fmsFileList[0].fmsId }">
|
|
| 473 |
+ <input type="button" class="btnType1" value="저 장" onclick="fn_egov_regist_notice(); return false;"> |
|
| 474 |
+ </c:if> |
|
| 475 |
+ </div> |
|
| 476 |
+ </div> |
|
| 477 |
+ </div> |
|
| 478 |
+</form:form> |
|
| 479 |
+ |
|
| 480 |
+ <!-- //content 끝 --> |
|
| 481 |
+</body> |
|
| 482 |
+</html> |
|
| 483 |
+ |
--- src/main/webapp/WEB-INF/jsp/layout/popLayout.jsp
+++ src/main/webapp/WEB-INF/jsp/layout/popLayout.jsp
... | ... | @@ -1,26 +1,26 @@ |
| 1 |
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
|
| 2 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
-<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %> |
|
| 4 |
- |
|
| 5 |
-<%@ taglib prefix="compress" uri="http://htmlcompressor.googlecode.com/taglib/compressor"%> |
|
| 6 |
- |
|
| 7 |
-<!DOCTYPE html> |
|
| 8 |
-<html lang="kr"> |
|
| 9 |
-<head> |
|
| 10 |
- <meta charset="UTF-8"> |
|
| 11 |
- <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|
| 12 |
- <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> --> |
|
| 13 |
- <link rel="stylesheet" href="/publish/testcss/css/reset.css"> |
|
| 14 |
- <link rel="stylesheet" href="/publish/testcss/css/font.css"> |
|
| 15 |
- <link rel="stylesheet" href="/publish/testcss/css/sample.css"> |
|
| 16 |
- <link rel="stylesheet" href="/pb/css/popup.css"> |
|
| 17 |
- <script src="/publish/js/jquery-3.5.0.js"></script> |
|
| 18 |
- <script src="/publish/js/common.js"></script> |
|
| 19 |
-</head> |
|
| 20 |
-<script type="text/javascript" src="<c:url value='/js/EgovCmmUtl.js'/>" ></script> |
|
| 21 |
-<script src="/js/ncms_common.js"></script> |
|
| 22 |
-<decorator:head /> |
|
| 23 |
-<!-- body 시작 --> |
|
| 24 |
-<decorator:body /> |
|
| 25 |
-<!-- body 끝 --> |
|
| 1 |
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
|
| 2 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
+<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %> |
|
| 4 |
+ |
|
| 5 |
+<%@ taglib prefix="compress" uri="http://htmlcompressor.googlecode.com/taglib/compressor"%> |
|
| 6 |
+ |
|
| 7 |
+<!DOCTYPE html> |
|
| 8 |
+<html lang="kr"> |
|
| 9 |
+<head> |
|
| 10 |
+ <meta charset="UTF-8"> |
|
| 11 |
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|
| 12 |
+ <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> --> |
|
| 13 |
+ <link rel="stylesheet" href="/publish/testcss/css/reset.css"> |
|
| 14 |
+ <link rel="stylesheet" href="/publish/testcss/css/font.css"> |
|
| 15 |
+ <link rel="stylesheet" href="/publish/testcss/css/sample.css"> |
|
| 16 |
+ <link rel="stylesheet" href="/pb/css/popup.css"> |
|
| 17 |
+ <script src="/publish/js/jquery-3.5.0.js"></script> |
|
| 18 |
+ <script src="/publish/js/common.js"></script> |
|
| 19 |
+</head> |
|
| 20 |
+<script type="text/javascript" src="<c:url value='/js/EgovCmmUtl.js'/>" ></script> |
|
| 21 |
+<script src="/js/ncms_common.js"></script> |
|
| 22 |
+<decorator:head /> |
|
| 23 |
+<!-- body 시작 --> |
|
| 24 |
+<decorator:body /> |
|
| 25 |
+<!-- body 끝 --> |
|
| 26 | 26 |
</html>(No newline at end of file) |
--- src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp
... | ... | @@ -317,6 +317,13 @@ |
| 317 | 317 |
fn_errorPopClean(); // 에러 popup 초기화 |
| 318 | 318 |
fn_rowCntInit(); |
| 319 | 319 |
if (file) {
|
| 320 |
+ // 파일 크기 체크 (20MB) |
|
| 321 |
+ const maxSize = 20 * 1024 * 1024; // 20MB in bytes |
|
| 322 |
+ if (file.size > maxSize) {
|
|
| 323 |
+ alert('파일 크기는 20MB를 초과할 수 없습니다.');
|
|
| 324 |
+ return; |
|
| 325 |
+ } |
|
| 326 |
+ |
|
| 320 | 327 |
fn_loadAddActive(); |
| 321 | 328 |
var reader = new FileReader(); |
| 322 | 329 |
var extension = file.name.split('.').pop().toLowerCase();
|
... | ... | @@ -506,7 +513,7 @@ |
| 506 | 513 |
<!-- 엑셀입력 --> |
| 507 | 514 |
<div class="popCont current pop_more_cont" id="popCont_1"> |
| 508 | 515 |
<div class="titBox"> |
| 509 |
- <p>- 주소록은 한 번에 최대 30만건까지 등록(EXCEL파일, 최대용량 3MB) 가능합니다. </p> |
|
| 516 |
+ <p>- 주소록은 한 번에 최대 30만건까지 등록(EXCEL파일, 최대용량 20MB) 가능합니다. </p> |
|
| 510 | 517 |
<p>- 엑셀 파일에 비밀번호 설정, 제한된 보기, 수식 등이 설정되어 있는 경우 업로드가 불가합니다.</p> |
| 511 | 518 |
<p>- 구분선(|), 역슬래시(\, ₩), 큰따옴표(") 등 발송불가 특수문자는 저장되지 않습니다.</p>
|
| 512 | 519 |
<p>- 이름 200byte, [*1*]~[*4*] 200byte, 메모 250byte까지 입력 가능합니다.</p> |
--- src/main/webapp/WEB-INF/jsp/web/cop/bbs/EgovNoticePhotoInqire.jsp
+++ src/main/webapp/WEB-INF/jsp/web/cop/bbs/EgovNoticePhotoInqire.jsp
... | ... | @@ -1,302 +1,302 @@ |
| 1 |
-<%-- |
|
| 2 |
- Class Name : EgovNoticeInqire.jsp |
|
| 3 |
- Description : (사용자)게시물 조회 화면 |
|
| 4 |
- Modification Information |
|
| 5 |
- |
|
| 6 |
- 수정일 수정자 수정내용 |
|
| 7 |
- ---------- -------- --------------------------- |
|
| 8 |
- 2009.03.23 이삼섭 최초 생성 |
|
| 9 |
- 2009.06.26 한성곤 2단계 기능 추가 (댓글관리, 만족도조사) |
|
| 10 |
- 2011.08.31 JJY 경량환경 버전 생성 |
|
| 11 |
- 2013.05.23 이기하 상세보기 오류수정 |
|
| 12 |
- |
|
| 13 |
- author : 공통서비스 개발팀 이삼섭 |
|
| 14 |
- since : 2009.03.23 |
|
| 15 |
---%> |
|
| 16 |
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
|
| 17 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 18 |
-<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 19 |
-<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> |
|
| 20 |
-<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> |
|
| 21 |
-<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> |
|
| 22 |
-<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%> |
|
| 23 |
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
|
| 24 |
-<%pageContext.setAttribute("crlf", "\r\n"); %>
|
|
| 25 |
-<head> |
|
| 26 |
-<script src="/publish/js/content.js"></script> |
|
| 27 |
-<script type="text/javascript"> |
|
| 28 |
-$(document).ready(function(){
|
|
| 29 |
-}); |
|
| 30 |
- |
|
| 31 |
- |
|
| 32 |
-var listPage = $(location).attr('href').split($(location).attr('host'))[1].split('Detail.do')[0]+'List.do'+'?bbsId=${brdMstrVO.bbsId}' ;
|
|
| 33 |
-var detailPage = $(location).attr('href').split($(location).attr('host'))[1].split('?')[0] ;
|
|
| 34 |
- function fn_egov_select_noticeList(pageNo) {
|
|
| 35 |
- /* document.searchForm.action = listPage ; |
|
| 36 |
- document.searchForm.submit(); */ |
|
| 37 |
- //nttId가 쿼리스트링으로 넘어가는 이유로 인한 listForm 사용. |
|
| 38 |
- document.listFullForm.action = listPage ; |
|
| 39 |
- document.listFullForm.submit(); |
|
| 40 |
- } |
|
| 41 |
- |
|
| 42 |
- function fn_egov_select_detail(bbsId , nttId) { //이전/다음글 상세
|
|
| 43 |
- if(listPage.indexOf("contentBbsList.do") > 0){ //컨텐츠 bbs 페이지경우
|
|
| 44 |
- location.href=detailPage+"?bbsId="+bbsId + "&nttId="+nttId+"&menuNo="+$('#menuNo').val() ;
|
|
| 45 |
- return |
|
| 46 |
- } |
|
| 47 |
- |
|
| 48 |
- //location.href=detailPage+"?bbsId="+bbsId + "&nttId="+nttId ; |
|
| 49 |
- |
|
| 50 |
- document.listFullForm.bbsId.value = bbsId; |
|
| 51 |
- document.listFullForm.nttId.value = nttId; |
|
| 52 |
- document.listFullForm.seCmmnCdId.value = bbsId; |
|
| 53 |
- document.listFullForm.method = "get"; |
|
| 54 |
- document.listFullForm.action = detailPage; |
|
| 55 |
- document.listFullForm.submit(); |
|
| 56 |
- } |
|
| 57 |
- |
|
| 58 |
- function fn_egov_delete_notice() {
|
|
| 59 |
- if (confirm('<spring:message code="common.delete.msg" />')) {
|
|
| 60 |
- document.searchForm.action = "<c:url value='/web/cop/bbs/deleteBoardArticle.do'/>"; |
|
| 61 |
- document.searchForm.submit(); |
|
| 62 |
- } |
|
| 63 |
- } |
|
| 64 |
- |
|
| 65 |
- function fn_egov_moveUpdt_notice(){
|
|
| 66 |
- document.searchForm.action = "<c:url value='/web/cop/bbs/forUpdateBoardArticle.do'/>"; |
|
| 67 |
- document.searchForm.method = "get"; |
|
| 68 |
- document.searchForm.submit(); |
|
| 69 |
- } |
|
| 70 |
-</script> |
|
| 71 |
- |
|
| 72 |
-<!-- 댓글 작성 스크립트 --> |
|
| 73 |
-<c:if test="${brdMstrVO.addYn == 'Y'}">
|
|
| 74 |
- <script type="text/javascript" src="<c:url value="/validator.do"/>"></script> |
|
| 75 |
- <validator:javascript formName="articleComment" staticJavascript="false" xhtml="true" cdata="false" /> |
|
| 76 |
- <script type="text/javascript"> |
|
| 77 |
-// 댓글 등록 |
|
| 78 |
-function fn_egov_insert_commentList() {
|
|
| 79 |
- var form = document.getElementById("articleCommentVO");
|
|
| 80 |
- if (!validateArticleComment(form)){
|
|
| 81 |
- return; |
|
| 82 |
- } |
|
| 83 |
- if (confirm('<spring:message code="common.regist.msg" />')) {
|
|
| 84 |
- form.submit(); |
|
| 85 |
- } |
|
| 86 |
-} |
|
| 87 |
- |
|
| 88 |
-// 댓글 수정 |
|
| 89 |
-function fn_egov_updt_commentList() {
|
|
| 90 |
- var form = document.getElementById("articleCommentVO");
|
|
| 91 |
- if (!validateArticleComment(form)){
|
|
| 92 |
- return; |
|
| 93 |
- } |
|
| 94 |
- |
|
| 95 |
- if (confirm('<spring:message code="common.update.msg" />')) {
|
|
| 96 |
- form.modified.value = "true"; |
|
| 97 |
- form.action = "<c:url value='/${siteId}/web/cop/cmt/updateArticleComment.do'/>";
|
|
| 98 |
- form.submit(); |
|
| 99 |
- } |
|
| 100 |
-} |
|
| 101 |
- |
|
| 102 |
-// 댓글 수정 화면 |
|
| 103 |
-function fn_egov_selectCommentForupdt(commentNo) {
|
|
| 104 |
- var form = document.getElementById("articleCommentVO");
|
|
| 105 |
- //form.subPageIndex.value = pageNo; |
|
| 106 |
- form.commentNo.value = commentNo; |
|
| 107 |
- form.action = "<c:url value='/web/cop/bbsWeb/selectBoardArticle.do'/>"; |
|
| 108 |
- form.submit(); |
|
| 109 |
-} |
|
| 110 |
- |
|
| 111 |
-// 댓글 삭제 |
|
| 112 |
-function fn_egov_deleteCommentList(commentNo) {
|
|
| 113 |
- var form = document.getElementById("articleCommentVO");
|
|
| 114 |
- if (confirm('<spring:message code="common.delete.msg" />')) {
|
|
| 115 |
- form.modified.value = "true"; |
|
| 116 |
- form.commentNo.value = commentNo; |
|
| 117 |
- form.action = "<c:url value='/${siteId}/web/cop/cmt/deleteArticleComment.do'/>";
|
|
| 118 |
- form.submit(); |
|
| 119 |
- } |
|
| 120 |
-} |
|
| 121 |
- |
|
| 122 |
-/* 댓글페이징 */ |
|
| 123 |
-function fn_egov_select_commentList(pageNo) {
|
|
| 124 |
- var form = document.getElementById("articleCommentVO");
|
|
| 125 |
- // form.subPageIndex.value = pageNo; |
|
| 126 |
- form.commentNo.value = ''; |
|
| 127 |
- form.action = "<c:url value='/${siteId}/web/cop/bbsWeb/selectBoardArticle.do'/>";
|
|
| 128 |
- form.submit(); |
|
| 129 |
-} |
|
| 130 |
-</script> |
|
| 131 |
-</c:if> |
|
| 132 |
-<style type="text/css"> |
|
| 133 |
-.view_wrap .view_cont {padding-bottom:0;border-bottom:0 none;}
|
|
| 134 |
-</style> |
|
| 135 |
-</head> |
|
| 136 |
-<body> |
|
| 137 |
-<!-- contents 영역 --> |
|
| 138 |
- <form:form commandName="searchForm" name="searchForm" method="get" action="<c:url value='/web/cop/bbsWeb/selectBoardList.do'/>"> |
|
| 139 |
- <input type="hidden" name="seCmmnCdId" value="${searchVO.seCmmnCdId}">
|
|
| 140 |
- <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
| 141 |
- <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
| 142 |
- <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
| 143 |
- <input name="bbsId" type="hidden" value="<c:out value='${result.bbsId}'/>" />
|
|
| 144 |
- <input name="nttId" type="hidden" value="<c:out value='${result.nttId}'/>" />
|
|
| 145 |
- <input type="hidden" id= "ntcrNm" name="ntcrNm" value=""/> |
|
| 146 |
- <input type="hidden" id= "menuNo" name="menuNo" value="<c:out value='${masterVO.menuNo}'/>" />
|
|
| 147 |
- </form:form> |
|
| 148 |
- <form:form commandName="listForm" name="listForm" method="get" action="<c:url value='/web/cop/bbsWeb/selectBoardList.do'/>"> |
|
| 149 |
- <input type="hidden" name="seCmmnCdId" value="${searchVO.seCmmnCdId}">
|
|
| 150 |
- <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
| 151 |
- <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
| 152 |
- <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
| 153 |
- <input name="bbsId" type="hidden" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
| 154 |
- </form:form> |
|
| 155 |
- <form:form commandName="listFullForm" name="listFullForm" method="get" action="<c:url value='/web/cop/bbsWeb/selectBoardList.do'/>"> |
|
| 156 |
- <input name="bbsId" type="hidden" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
| 157 |
- <input name="nttId" type="hidden" value="<c:out value='${searchVO.nttId}'/>" />
|
|
| 158 |
- <input type="hidden" name="seCmmnCdId" value="${searchVO.seCmmnCdId}">
|
|
| 159 |
- <input type="hidden" name="frstRegisterId" value="${searchVO.frstRegisterId}"/>
|
|
| 160 |
- <input type="hidden" name="viewsYn" value=""> |
|
| 161 |
- <input type="hidden" name="menuNo" value=""> |
|
| 162 |
- <input type="hidden" name="searchBgnDe" value="${searchVO.searchBgnDe}">
|
|
| 163 |
- <input type="hidden" name="searchEndDe" value="${searchVO.searchEndDe}">
|
|
| 164 |
- <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
| 165 |
- <input type="hidden" name="searchSortCnd" value="${searchVO.searchSortCnd}" />
|
|
| 166 |
- <input type="hidden" name="searchSortOrd" value="${searchVO.searchSortOrd}" />
|
|
| 167 |
- <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
| 168 |
- <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
| 169 |
- <input type="hidden" name="pageUnit" value="${searchVO.pageUnit}" />
|
|
| 170 |
- </form:form> |
|
| 171 |
- <div class="inner"> |
|
| 172 |
- <!-- send top --> |
|
| 173 |
- <div class="send_top"> |
|
| 174 |
- <!-- tab button --> |
|
| 175 |
- <ul class="tabType4"> |
|
| 176 |
- <li class="tab"><button type="button" onclick="TabType5(this,'1');location.href='/web/cop/bbs/NoticeList.do'">공지사항</button></li> |
|
| 177 |
- <li class="tab"><button type="button" onclick="TabType5(this,'2');location.href='/web/cop/bbs/TermsList.do'">이용약관</button></li> |
|
| 178 |
- <li class="tab"><button type="button" onclick="TabType5(this,'3');location.href='/web/cop/bbs/FaqList.do'">자주하는 질문</button></li> |
|
| 179 |
- <li class="tab"><button type="button" onclick="TabType5(this,'4');location.href='/web/cop/bbs/QnaList.do'">1:1 문의</button></li> |
|
| 180 |
- <li class="tab"><button type="button" onclick="TabType5(this,'5');location.href='/web/cop/bbs/SuggestList.do'">불편신고</button></li> |
|
| 181 |
- <li class="tab active"><button type="button" onclick="TabType5(this,'6');location.href='/web/cop/bbs/EventList.do'">이벤트</button></li> |
|
| 182 |
- </ul><!--// tab button --> |
|
| 183 |
- <!-- 고객센터 - 상세페이지 --> |
|
| 184 |
- <div class="serv_content current" id="tab5_1"> |
|
| 185 |
- <div class="heading"> |
|
| 186 |
- <h2>${brdMstrVO.bbsNm}</h2>
|
|
| 187 |
- </div> |
|
| 188 |
- <div class="list_cont" id="listTab_1"> |
|
| 189 |
- <div class="view_wrap"> |
|
| 190 |
- <div class="view_head"> |
|
| 191 |
- <div class="title"><p><c:out value="${result.nttSj}" /></p></div>
|
|
| 192 |
- <ul class="ext_info"> |
|
| 193 |
- <li><i></i><c:out value="${result.frstRegisterPnttm}" /></li>
|
|
| 194 |
- <li><i></i>운영자<%-- <c:out value="${result.frstRegisterNm}" /> --%></li>
|
|
| 195 |
- </ul> |
|
| 196 |
- </div> |
|
| 197 |
- <div class="view_cont"> |
|
| 198 |
- <div class="cont_in"> |
|
| 199 |
- <%-- <div class="img_cont"> |
|
| 200 |
- <c:if test="${not empty fileList}">
|
|
| 201 |
- <c:forEach var="result" items="${fileList}" varStatus="status">
|
|
| 202 |
- <img src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${result.atchFileId}"/>&fileSn=<c:out value="${result.fileSn}"/>' alt="<c:out value='${nttSj}' />_<c:out value='${status.index+1}' />">
|
|
| 203 |
- </c:forEach> |
|
| 204 |
- </c:if> |
|
| 205 |
- </div> --%> |
|
| 206 |
- <c:out value="${result.nttCn}" escapeXml="false" />
|
|
| 207 |
- </div> |
|
| 208 |
- <%-- <div class="attachedFile2"> |
|
| 209 |
- |
|
| 210 |
- <c:if test="${result.atchFileCnt > 0}">
|
|
| 211 |
- <ul class="attach"> |
|
| 212 |
- <li><c:import url="/cmm/fms/selectBBSFileInfsMjon.do" charEncoding="utf-8"> |
|
| 213 |
- <c:param name="param_atchFileId" value="${result.atchFileId}" />
|
|
| 214 |
- </c:import> |
|
| 215 |
- </li> |
|
| 216 |
- </ul> |
|
| 217 |
- </c:if> |
|
| 218 |
- |
|
| 219 |
- |
|
| 220 |
- <!-- <div class="attachedFile_in"> |
|
| 221 |
- <a href="#none"><i></i>2021년 인증서 교체작업 서비스 이용 제한 안내.pdf</a> |
|
| 222 |
- </div> |
|
| 223 |
- <div class="attachedFile_in"> |
|
| 224 |
- <a href="#none"><i></i>2021년 인증서 교체작업 서비스 이용 제한 안내.hwp</a> |
|
| 225 |
- </div> --> |
|
| 226 |
- </div> --%> |
|
| 227 |
- </div> |
|
| 228 |
- <c:if test="${resultCnt > 0 and resultList[0].commentCn != ''}">
|
|
| 229 |
- <div class="view_answer"> |
|
| 230 |
- <div class="view_asnwer_head"> |
|
| 231 |
- <ul class="ext_info"> |
|
| 232 |
- <li><i></i><c:out value="${resultList[0].frstRegisterPnttm}" /></li>
|
|
| 233 |
- <li><i></i><c:out value="${resultList[0].frstRegisterNm}" /></li>
|
|
| 234 |
- </ul> |
|
| 235 |
- </div> |
|
| 236 |
- <div class="view_asnwer_body"> |
|
| 237 |
- <div class="answer_title"><i></i></div> |
|
| 238 |
- <div class="answer_cont"> |
|
| 239 |
- <c:out value="${resultList[0].commentCn}" />
|
|
| 240 |
- </div> |
|
| 241 |
- </div> |
|
| 242 |
- </div> |
|
| 243 |
- </c:if> |
|
| 244 |
- </div> |
|
| 245 |
- |
|
| 246 |
- <div class="view_btnWrap"> |
|
| 247 |
- <c:if test="${'9997200' eq brdMstrVO.menuNo && empty answerList && 'T' ne result.secretAt}">
|
|
| 248 |
- <button type="button" class="btnType btnType1" onclick="javascript:fn_egov_moveUpdt_notice(); return false;">수정</button> |
|
| 249 |
- <button type="button" class="btnType btnType2" onclick="javascript:fn_egov_delete_notice('1'); return false;">삭제</button>
|
|
| 250 |
- </c:if> |
|
| 251 |
- <button type="button" class="btnType" onclick="javascript:fn_egov_select_noticeList(); return false;">목록</button> |
|
| 252 |
- </div> |
|
| 253 |
- <ul class="list_prev-next"> |
|
| 254 |
- <li class="list_prev"> |
|
| 255 |
- <div><span>이전글<i></i></span></div> |
|
| 256 |
- <div> |
|
| 257 |
- <c:choose> |
|
| 258 |
- <c:when test="${empty prevNttIdNSj}">
|
|
| 259 |
- 이전글이 없습니다. |
|
| 260 |
- </c:when> |
|
| 261 |
- <c:otherwise> |
|
| 262 |
- <c:set var="prevNttId" value="${fn:split(prevNttIdNSj, '|')[0]}" />
|
|
| 263 |
- <c:set var="prevNttSj" value="${fn:split(prevNttIdNSj, '|')[1]}" />
|
|
| 264 |
- <c:set var="prevNttDate" value="${fn:split(prevNttIdNSj, '|')[2]}" />
|
|
| 265 |
- <a href="#" onclick="fn_egov_select_detail('<c:out value='${result.bbsId}'/>' , '<c:out value='${prevNttId}'/>'); return false;" title="현재창 이전글이동">
|
|
| 266 |
- <c:out value="${prevNttSj}" />
|
|
| 267 |
- </a> |
|
| 268 |
- <span class="nb_date"><c:out value="${prevNttDate}" /></span>
|
|
| 269 |
- </c:otherwise> |
|
| 270 |
- </c:choose> |
|
| 271 |
- <!-- <a href="#none">[공지] 세금계산서 발행 안내</a> --> |
|
| 272 |
- </div> |
|
| 273 |
- </li> |
|
| 274 |
- <li class="list_next"> |
|
| 275 |
- <div><span>다음글<i></i></span></div> |
|
| 276 |
- <div> |
|
| 277 |
- <c:choose> |
|
| 278 |
- <c:when test="${empty nextNttIdNSj}">
|
|
| 279 |
- 다음글이 없습니다. |
|
| 280 |
- </c:when> |
|
| 281 |
- <c:otherwise> |
|
| 282 |
- <c:set var="nextNttId" value="${fn:split(nextNttIdNSj, '|')[0]}" />
|
|
| 283 |
- <c:set var="nextNttSj" value="${fn:split(nextNttIdNSj, '|')[1]}" />
|
|
| 284 |
- <c:set var="nextNttDate" value="${fn:split(nextNttIdNSj, '|')[2]}" />
|
|
| 285 |
- <a href="#" onclick="fn_egov_select_detail('<c:out value='${result.bbsId}'/>' , '<c:out value='${nextNttId}'/>'); return false;" title="현재창 다음글이동">
|
|
| 286 |
- <c:out value="${nextNttSj}" />
|
|
| 287 |
- </a> |
|
| 288 |
- <span class="nb_date"><c:out value="${nextNttDate}" /></span>
|
|
| 289 |
- </c:otherwise> |
|
| 290 |
- </c:choose> |
|
| 291 |
- <!-- <a href="#none">[공지] 문자온 6월 30일 정식 서비스 오픈 안내</a> --> |
|
| 292 |
- <div> |
|
| 293 |
- </li> |
|
| 294 |
- </ul> |
|
| 295 |
- </div> |
|
| 296 |
- </div> |
|
| 297 |
- </div><!-- 고객센터 - 상세페이지 --> |
|
| 298 |
- |
|
| 299 |
- </div><!--// send top --> |
|
| 300 |
- |
|
| 301 |
-</body> |
|
| 302 |
- |
|
| 1 |
+<%-- |
|
| 2 |
+ Class Name : EgovNoticeInqire.jsp |
|
| 3 |
+ Description : (사용자)게시물 조회 화면 |
|
| 4 |
+ Modification Information |
|
| 5 |
+ |
|
| 6 |
+ 수정일 수정자 수정내용 |
|
| 7 |
+ ---------- -------- --------------------------- |
|
| 8 |
+ 2009.03.23 이삼섭 최초 생성 |
|
| 9 |
+ 2009.06.26 한성곤 2단계 기능 추가 (댓글관리, 만족도조사) |
|
| 10 |
+ 2011.08.31 JJY 경량환경 버전 생성 |
|
| 11 |
+ 2013.05.23 이기하 상세보기 오류수정 |
|
| 12 |
+ |
|
| 13 |
+ author : 공통서비스 개발팀 이삼섭 |
|
| 14 |
+ since : 2009.03.23 |
|
| 15 |
+--%> |
|
| 16 |
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
|
| 17 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 18 |
+<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 19 |
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> |
|
| 20 |
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> |
|
| 21 |
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> |
|
| 22 |
+<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%> |
|
| 23 |
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
|
| 24 |
+<%pageContext.setAttribute("crlf", "\r\n"); %>
|
|
| 25 |
+<head> |
|
| 26 |
+<script src="/publish/js/content.js"></script> |
|
| 27 |
+<script type="text/javascript"> |
|
| 28 |
+$(document).ready(function(){
|
|
| 29 |
+}); |
|
| 30 |
+ |
|
| 31 |
+ |
|
| 32 |
+var listPage = $(location).attr('href').split($(location).attr('host'))[1].split('Detail.do')[0]+'List.do'+'?bbsId=${brdMstrVO.bbsId}' ;
|
|
| 33 |
+var detailPage = $(location).attr('href').split($(location).attr('host'))[1].split('?')[0] ;
|
|
| 34 |
+ function fn_egov_select_noticeList(pageNo) {
|
|
| 35 |
+ /* document.searchForm.action = listPage ; |
|
| 36 |
+ document.searchForm.submit(); */ |
|
| 37 |
+ //nttId가 쿼리스트링으로 넘어가는 이유로 인한 listForm 사용. |
|
| 38 |
+ document.listFullForm.action = listPage ; |
|
| 39 |
+ document.listFullForm.submit(); |
|
| 40 |
+ } |
|
| 41 |
+ |
|
| 42 |
+ function fn_egov_select_detail(bbsId , nttId) { //이전/다음글 상세
|
|
| 43 |
+ if(listPage.indexOf("contentBbsList.do") > 0){ //컨텐츠 bbs 페이지경우
|
|
| 44 |
+ location.href=detailPage+"?bbsId="+bbsId + "&nttId="+nttId+"&menuNo="+$('#menuNo').val() ;
|
|
| 45 |
+ return |
|
| 46 |
+ } |
|
| 47 |
+ |
|
| 48 |
+ //location.href=detailPage+"?bbsId="+bbsId + "&nttId="+nttId ; |
|
| 49 |
+ |
|
| 50 |
+ document.listFullForm.bbsId.value = bbsId; |
|
| 51 |
+ document.listFullForm.nttId.value = nttId; |
|
| 52 |
+ document.listFullForm.seCmmnCdId.value = bbsId; |
|
| 53 |
+ document.listFullForm.method = "get"; |
|
| 54 |
+ document.listFullForm.action = detailPage; |
|
| 55 |
+ document.listFullForm.submit(); |
|
| 56 |
+ } |
|
| 57 |
+ |
|
| 58 |
+ function fn_egov_delete_notice() {
|
|
| 59 |
+ if (confirm('<spring:message code="common.delete.msg" />')) {
|
|
| 60 |
+ document.searchForm.action = "<c:url value='/web/cop/bbs/deleteBoardArticle.do'/>"; |
|
| 61 |
+ document.searchForm.submit(); |
|
| 62 |
+ } |
|
| 63 |
+ } |
|
| 64 |
+ |
|
| 65 |
+ function fn_egov_moveUpdt_notice(){
|
|
| 66 |
+ document.searchForm.action = "<c:url value='/web/cop/bbs/forUpdateBoardArticle.do'/>"; |
|
| 67 |
+ document.searchForm.method = "get"; |
|
| 68 |
+ document.searchForm.submit(); |
|
| 69 |
+ } |
|
| 70 |
+</script> |
|
| 71 |
+ |
|
| 72 |
+<!-- 댓글 작성 스크립트 --> |
|
| 73 |
+<c:if test="${brdMstrVO.addYn == 'Y'}">
|
|
| 74 |
+ <script type="text/javascript" src="<c:url value="/validator.do"/>"></script> |
|
| 75 |
+ <validator:javascript formName="articleComment" staticJavascript="false" xhtml="true" cdata="false" /> |
|
| 76 |
+ <script type="text/javascript"> |
|
| 77 |
+// 댓글 등록 |
|
| 78 |
+function fn_egov_insert_commentList() {
|
|
| 79 |
+ var form = document.getElementById("articleCommentVO");
|
|
| 80 |
+ if (!validateArticleComment(form)){
|
|
| 81 |
+ return; |
|
| 82 |
+ } |
|
| 83 |
+ if (confirm('<spring:message code="common.regist.msg" />')) {
|
|
| 84 |
+ form.submit(); |
|
| 85 |
+ } |
|
| 86 |
+} |
|
| 87 |
+ |
|
| 88 |
+// 댓글 수정 |
|
| 89 |
+function fn_egov_updt_commentList() {
|
|
| 90 |
+ var form = document.getElementById("articleCommentVO");
|
|
| 91 |
+ if (!validateArticleComment(form)){
|
|
| 92 |
+ return; |
|
| 93 |
+ } |
|
| 94 |
+ |
|
| 95 |
+ if (confirm('<spring:message code="common.update.msg" />')) {
|
|
| 96 |
+ form.modified.value = "true"; |
|
| 97 |
+ form.action = "<c:url value='/${siteId}/web/cop/cmt/updateArticleComment.do'/>";
|
|
| 98 |
+ form.submit(); |
|
| 99 |
+ } |
|
| 100 |
+} |
|
| 101 |
+ |
|
| 102 |
+// 댓글 수정 화면 |
|
| 103 |
+function fn_egov_selectCommentForupdt(commentNo) {
|
|
| 104 |
+ var form = document.getElementById("articleCommentVO");
|
|
| 105 |
+ //form.subPageIndex.value = pageNo; |
|
| 106 |
+ form.commentNo.value = commentNo; |
|
| 107 |
+ form.action = "<c:url value='/web/cop/bbsWeb/selectBoardArticle.do'/>"; |
|
| 108 |
+ form.submit(); |
|
| 109 |
+} |
|
| 110 |
+ |
|
| 111 |
+// 댓글 삭제 |
|
| 112 |
+function fn_egov_deleteCommentList(commentNo) {
|
|
| 113 |
+ var form = document.getElementById("articleCommentVO");
|
|
| 114 |
+ if (confirm('<spring:message code="common.delete.msg" />')) {
|
|
| 115 |
+ form.modified.value = "true"; |
|
| 116 |
+ form.commentNo.value = commentNo; |
|
| 117 |
+ form.action = "<c:url value='/${siteId}/web/cop/cmt/deleteArticleComment.do'/>";
|
|
| 118 |
+ form.submit(); |
|
| 119 |
+ } |
|
| 120 |
+} |
|
| 121 |
+ |
|
| 122 |
+/* 댓글페이징 */ |
|
| 123 |
+function fn_egov_select_commentList(pageNo) {
|
|
| 124 |
+ var form = document.getElementById("articleCommentVO");
|
|
| 125 |
+ // form.subPageIndex.value = pageNo; |
|
| 126 |
+ form.commentNo.value = ''; |
|
| 127 |
+ form.action = "<c:url value='/${siteId}/web/cop/bbsWeb/selectBoardArticle.do'/>";
|
|
| 128 |
+ form.submit(); |
|
| 129 |
+} |
|
| 130 |
+</script> |
|
| 131 |
+</c:if> |
|
| 132 |
+<style type="text/css"> |
|
| 133 |
+.view_wrap .view_cont {padding-bottom:0;border-bottom:0 none;}
|
|
| 134 |
+</style> |
|
| 135 |
+</head> |
|
| 136 |
+<body> |
|
| 137 |
+<!-- contents 영역 --> |
|
| 138 |
+ <form:form commandName="searchForm" name="searchForm" method="get" action="<c:url value='/web/cop/bbsWeb/selectBoardList.do'/>"> |
|
| 139 |
+ <input type="hidden" name="seCmmnCdId" value="${searchVO.seCmmnCdId}">
|
|
| 140 |
+ <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
| 141 |
+ <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
| 142 |
+ <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
| 143 |
+ <input name="bbsId" type="hidden" value="<c:out value='${result.bbsId}'/>" />
|
|
| 144 |
+ <input name="nttId" type="hidden" value="<c:out value='${result.nttId}'/>" />
|
|
| 145 |
+ <input type="hidden" id= "ntcrNm" name="ntcrNm" value=""/> |
|
| 146 |
+ <input type="hidden" id= "menuNo" name="menuNo" value="<c:out value='${masterVO.menuNo}'/>" />
|
|
| 147 |
+ </form:form> |
|
| 148 |
+ <form:form commandName="listForm" name="listForm" method="get" action="<c:url value='/web/cop/bbsWeb/selectBoardList.do'/>"> |
|
| 149 |
+ <input type="hidden" name="seCmmnCdId" value="${searchVO.seCmmnCdId}">
|
|
| 150 |
+ <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
| 151 |
+ <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
| 152 |
+ <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
| 153 |
+ <input name="bbsId" type="hidden" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
| 154 |
+ </form:form> |
|
| 155 |
+ <form:form commandName="listFullForm" name="listFullForm" method="get" action="<c:url value='/web/cop/bbsWeb/selectBoardList.do'/>"> |
|
| 156 |
+ <input name="bbsId" type="hidden" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
| 157 |
+ <input name="nttId" type="hidden" value="<c:out value='${searchVO.nttId}'/>" />
|
|
| 158 |
+ <input type="hidden" name="seCmmnCdId" value="${searchVO.seCmmnCdId}">
|
|
| 159 |
+ <input type="hidden" name="frstRegisterId" value="${searchVO.frstRegisterId}"/>
|
|
| 160 |
+ <input type="hidden" name="viewsYn" value=""> |
|
| 161 |
+ <input type="hidden" name="menuNo" value=""> |
|
| 162 |
+ <input type="hidden" name="searchBgnDe" value="${searchVO.searchBgnDe}">
|
|
| 163 |
+ <input type="hidden" name="searchEndDe" value="${searchVO.searchEndDe}">
|
|
| 164 |
+ <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
| 165 |
+ <input type="hidden" name="searchSortCnd" value="${searchVO.searchSortCnd}" />
|
|
| 166 |
+ <input type="hidden" name="searchSortOrd" value="${searchVO.searchSortOrd}" />
|
|
| 167 |
+ <input name="searchCnd" type="hidden" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
| 168 |
+ <input name="searchWrd" type="hidden" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
| 169 |
+ <input type="hidden" name="pageUnit" value="${searchVO.pageUnit}" />
|
|
| 170 |
+ </form:form> |
|
| 171 |
+ <div class="inner"> |
|
| 172 |
+ <!-- send top --> |
|
| 173 |
+ <div class="send_top"> |
|
| 174 |
+ <!-- tab button --> |
|
| 175 |
+ <ul class="tabType4"> |
|
| 176 |
+ <li class="tab"><button type="button" onclick="TabType5(this,'1');location.href='/web/cop/bbs/NoticeList.do'">공지사항</button></li> |
|
| 177 |
+ <li class="tab"><button type="button" onclick="TabType5(this,'2');location.href='/web/cop/bbs/TermsList.do'">이용약관</button></li> |
|
| 178 |
+ <li class="tab"><button type="button" onclick="TabType5(this,'3');location.href='/web/cop/bbs/FaqList.do'">자주하는 질문</button></li> |
|
| 179 |
+ <li class="tab"><button type="button" onclick="TabType5(this,'4');location.href='/web/cop/bbs/QnaList.do'">1:1 문의</button></li> |
|
| 180 |
+ <li class="tab"><button type="button" onclick="TabType5(this,'5');location.href='/web/cop/bbs/SuggestList.do'">불편신고</button></li> |
|
| 181 |
+ <li class="tab active"><button type="button" onclick="TabType5(this,'6');location.href='/web/cop/bbs/EventList.do'">이벤트</button></li> |
|
| 182 |
+ </ul><!--// tab button --> |
|
| 183 |
+ <!-- 고객센터 - 상세페이지 --> |
|
| 184 |
+ <div class="serv_content current" id="tab5_1"> |
|
| 185 |
+ <div class="heading"> |
|
| 186 |
+ <h2>${brdMstrVO.bbsNm}</h2>
|
|
| 187 |
+ </div> |
|
| 188 |
+ <div class="list_cont" id="listTab_1"> |
|
| 189 |
+ <div class="view_wrap"> |
|
| 190 |
+ <div class="view_head"> |
|
| 191 |
+ <div class="title"><p><c:out value="${result.nttSj}" /></p></div>
|
|
| 192 |
+ <ul class="ext_info"> |
|
| 193 |
+ <li><i></i><c:out value="${result.frstRegisterPnttm}" /></li>
|
|
| 194 |
+ <li><i></i>운영자<%-- <c:out value="${result.frstRegisterNm}" /> --%></li>
|
|
| 195 |
+ </ul> |
|
| 196 |
+ </div> |
|
| 197 |
+ <div class="view_cont"> |
|
| 198 |
+ <div class="cont_in"> |
|
| 199 |
+ <%-- <div class="img_cont"> |
|
| 200 |
+ <c:if test="${not empty fileList}">
|
|
| 201 |
+ <c:forEach var="result" items="${fileList}" varStatus="status">
|
|
| 202 |
+ <img src='<c:url value='/cmm/fms/getImage.do'/>?atchFileId=<c:out value="${result.atchFileId}"/>&fileSn=<c:out value="${result.fileSn}"/>' alt="<c:out value='${nttSj}' />_<c:out value='${status.index+1}' />">
|
|
| 203 |
+ </c:forEach> |
|
| 204 |
+ </c:if> |
|
| 205 |
+ </div> --%> |
|
| 206 |
+ <c:out value="${result.nttCn}" escapeXml="false" />
|
|
| 207 |
+ </div> |
|
| 208 |
+ <%-- <div class="attachedFile2"> |
|
| 209 |
+ |
|
| 210 |
+ <c:if test="${result.atchFileCnt > 0}">
|
|
| 211 |
+ <ul class="attach"> |
|
| 212 |
+ <li><c:import url="/cmm/fms/selectBBSFileInfsMjon.do" charEncoding="utf-8"> |
|
| 213 |
+ <c:param name="param_atchFileId" value="${result.atchFileId}" />
|
|
| 214 |
+ </c:import> |
|
| 215 |
+ </li> |
|
| 216 |
+ </ul> |
|
| 217 |
+ </c:if> |
|
| 218 |
+ |
|
| 219 |
+ |
|
| 220 |
+ <!-- <div class="attachedFile_in"> |
|
| 221 |
+ <a href="#none"><i></i>2021년 인증서 교체작업 서비스 이용 제한 안내.pdf</a> |
|
| 222 |
+ </div> |
|
| 223 |
+ <div class="attachedFile_in"> |
|
| 224 |
+ <a href="#none"><i></i>2021년 인증서 교체작업 서비스 이용 제한 안내.hwp</a> |
|
| 225 |
+ </div> --> |
|
| 226 |
+ </div> --%> |
|
| 227 |
+ </div> |
|
| 228 |
+ <c:if test="${resultCnt > 0 and resultList[0].commentCn != ''}">
|
|
| 229 |
+ <div class="view_answer"> |
|
| 230 |
+ <div class="view_asnwer_head"> |
|
| 231 |
+ <ul class="ext_info"> |
|
| 232 |
+ <li><i></i><c:out value="${resultList[0].frstRegisterPnttm}" /></li>
|
|
| 233 |
+ <li><i></i><c:out value="${resultList[0].frstRegisterNm}" /></li>
|
|
| 234 |
+ </ul> |
|
| 235 |
+ </div> |
|
| 236 |
+ <div class="view_asnwer_body"> |
|
| 237 |
+ <div class="answer_title"><i></i></div> |
|
| 238 |
+ <div class="answer_cont"> |
|
| 239 |
+ <c:out value="${resultList[0].commentCn}" />
|
|
| 240 |
+ </div> |
|
| 241 |
+ </div> |
|
| 242 |
+ </div> |
|
| 243 |
+ </c:if> |
|
| 244 |
+ </div> |
|
| 245 |
+ |
|
| 246 |
+ <div class="view_btnWrap"> |
|
| 247 |
+ <c:if test="${'9997200' eq brdMstrVO.menuNo && empty answerList && 'T' ne result.secretAt}">
|
|
| 248 |
+ <button type="button" class="btnType btnType1" onclick="javascript:fn_egov_moveUpdt_notice(); return false;">수정</button> |
|
| 249 |
+ <button type="button" class="btnType btnType2" onclick="javascript:fn_egov_delete_notice('1'); return false;">삭제</button>
|
|
| 250 |
+ </c:if> |
|
| 251 |
+ <button type="button" class="btnType" onclick="javascript:fn_egov_select_noticeList(); return false;">목록</button> |
|
| 252 |
+ </div> |
|
| 253 |
+ <ul class="list_prev-next"> |
|
| 254 |
+ <li class="list_prev"> |
|
| 255 |
+ <div><span>이전글<i></i></span></div> |
|
| 256 |
+ <div> |
|
| 257 |
+ <c:choose> |
|
| 258 |
+ <c:when test="${empty prevNttIdNSj}">
|
|
| 259 |
+ 이전글이 없습니다. |
|
| 260 |
+ </c:when> |
|
| 261 |
+ <c:otherwise> |
|
| 262 |
+ <c:set var="prevNttId" value="${fn:split(prevNttIdNSj, '|')[0]}" />
|
|
| 263 |
+ <c:set var="prevNttSj" value="${fn:split(prevNttIdNSj, '|')[1]}" />
|
|
| 264 |
+ <c:set var="prevNttDate" value="${fn:split(prevNttIdNSj, '|')[2]}" />
|
|
| 265 |
+ <a href="#" onclick="fn_egov_select_detail('<c:out value='${result.bbsId}'/>' , '<c:out value='${prevNttId}'/>'); return false;" title="현재창 이전글이동">
|
|
| 266 |
+ <c:out value="${prevNttSj}" />
|
|
| 267 |
+ </a> |
|
| 268 |
+ <span class="nb_date"><c:out value="${prevNttDate}" /></span>
|
|
| 269 |
+ </c:otherwise> |
|
| 270 |
+ </c:choose> |
|
| 271 |
+ <!-- <a href="#none">[공지] 세금계산서 발행 안내</a> --> |
|
| 272 |
+ </div> |
|
| 273 |
+ </li> |
|
| 274 |
+ <li class="list_next"> |
|
| 275 |
+ <div><span>다음글<i></i></span></div> |
|
| 276 |
+ <div> |
|
| 277 |
+ <c:choose> |
|
| 278 |
+ <c:when test="${empty nextNttIdNSj}">
|
|
| 279 |
+ 다음글이 없습니다. |
|
| 280 |
+ </c:when> |
|
| 281 |
+ <c:otherwise> |
|
| 282 |
+ <c:set var="nextNttId" value="${fn:split(nextNttIdNSj, '|')[0]}" />
|
|
| 283 |
+ <c:set var="nextNttSj" value="${fn:split(nextNttIdNSj, '|')[1]}" />
|
|
| 284 |
+ <c:set var="nextNttDate" value="${fn:split(nextNttIdNSj, '|')[2]}" />
|
|
| 285 |
+ <a href="#" onclick="fn_egov_select_detail('<c:out value='${result.bbsId}'/>' , '<c:out value='${nextNttId}'/>'); return false;" title="현재창 다음글이동">
|
|
| 286 |
+ <c:out value="${nextNttSj}" />
|
|
| 287 |
+ </a> |
|
| 288 |
+ <span class="nb_date"><c:out value="${nextNttDate}" /></span>
|
|
| 289 |
+ </c:otherwise> |
|
| 290 |
+ </c:choose> |
|
| 291 |
+ <!-- <a href="#none">[공지] 문자온 6월 30일 정식 서비스 오픈 안내</a> --> |
|
| 292 |
+ <div> |
|
| 293 |
+ </li> |
|
| 294 |
+ </ul> |
|
| 295 |
+ </div> |
|
| 296 |
+ </div> |
|
| 297 |
+ </div><!-- 고객센터 - 상세페이지 --> |
|
| 298 |
+ |
|
| 299 |
+ </div><!--// send top --> |
|
| 300 |
+ |
|
| 301 |
+</body> |
|
| 302 |
+ |
--- src/main/webapp/WEB-INF/jsp/web/custom/MsgCustomView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/custom/MsgCustomView.jsp
... | ... | @@ -1,482 +1,482 @@ |
| 1 |
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 3 |
-<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 4 |
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> |
|
| 5 |
-<!DOCTYPE html> |
|
| 6 |
-<html lang="ko"> |
|
| 7 |
- |
|
| 8 |
-<head> |
|
| 9 |
-<meta charset="UTF-8"> |
|
| 10 |
-<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
| 11 |
-<title>문자온</title> |
|
| 12 |
- |
|
| 13 |
-<script type="text/javascript"> |
|
| 14 |
-var pageType = '${msgcampain}';
|
|
| 15 |
-var loginVO = '${loginVO}';
|
|
| 16 |
-var popCustomScrT=0; |
|
| 17 |
-$(document).ready(function(){
|
|
| 18 |
- |
|
| 19 |
- // 맞춤제작 셈플 리스트 |
|
| 20 |
- customSampleListAjax(1); |
|
| 21 |
- |
|
| 22 |
- customPopup(); |
|
| 23 |
- customPopupDetail(); |
|
| 24 |
- |
|
| 25 |
- // 맞춤제작 팝업 내보관함 리스트 로그인이 완료된 경우에만 로드되도록 |
|
| 26 |
- if(loginVO != "" && loginVO != null){
|
|
| 27 |
- myCustomListAjax(1); |
|
| 28 |
- } |
|
| 29 |
- |
|
| 30 |
- // 전체,기업, 개인 선택 옵션 처리 |
|
| 31 |
- $('.tDep1_mType').click(function(){
|
|
| 32 |
- |
|
| 33 |
- var mType = $(this).find('.on_active').text();
|
|
| 34 |
- var form = document.customSampleForm; |
|
| 35 |
- |
|
| 36 |
- if(mType == "전체"){
|
|
| 37 |
- |
|
| 38 |
- form.memberType.value = ""; |
|
| 39 |
- |
|
| 40 |
- }else if(mType == "기업"){
|
|
| 41 |
- |
|
| 42 |
- form.memberType.value = "B"; |
|
| 43 |
- |
|
| 44 |
- }else{
|
|
| 45 |
- |
|
| 46 |
- form.memberType.value = "P"; |
|
| 47 |
- |
|
| 48 |
- } |
|
| 49 |
- |
|
| 50 |
- //문자 리스트 불러오기 |
|
| 51 |
- form.letterType.value = "C"; |
|
| 52 |
- form.categoryCode.value = ""; |
|
| 53 |
- form.hashTag.value = ""; |
|
| 54 |
- form.pageIndex.value = 1; |
|
| 55 |
- |
|
| 56 |
- //문자 리스트 불러오기 |
|
| 57 |
- customSampleListAjax(1); |
|
| 58 |
- }); |
|
| 59 |
- |
|
| 60 |
- $('.tDep1_cateCode').click(function(){ // 카테고리 선택 시 옵션 처리
|
|
| 61 |
- |
|
| 62 |
- var cateCode = $(this).find('.on').attr("value");
|
|
| 63 |
- var form = document.customSampleForm; |
|
| 64 |
- |
|
| 65 |
- if(cateCode == "all"){ //전체 선택시
|
|
| 66 |
- cateCode = ""; |
|
| 67 |
- } else {
|
|
| 68 |
- //카테고리 코드 클릭 시 해쉬태그 초기화 후 전체 선택 |
|
| 69 |
- form.hashTag.value=""; |
|
| 70 |
- $('.tDep2_hashTag').find('.on').removeClass('on');
|
|
| 71 |
- $('.tDep2_hashTag').find('.hashAll').addClass('on');
|
|
| 72 |
- } |
|
| 73 |
- |
|
| 74 |
- form.categoryCode.value = cateCode; |
|
| 75 |
- form.pageIndex.value = 1; |
|
| 76 |
- |
|
| 77 |
- // 맞춤제작 셈플 리스트 |
|
| 78 |
- var pageUnit = $("#CPageUnit").val();
|
|
| 79 |
- customSampleListAjax(1); |
|
| 80 |
- }); |
|
| 81 |
- |
|
| 82 |
- $('.tDep2_hashTag').click(function(){ //해시 태그 선택 시 옵션 처리
|
|
| 83 |
- var hashTag = $(this).find('.on').attr("value");
|
|
| 84 |
- var form = document.customSampleForm; |
|
| 85 |
- |
|
| 86 |
- //해쉬태그 클릭 시 카테고리코드 초기화 후 전체 선택 |
|
| 87 |
- form.categoryCode.value=""; |
|
| 88 |
- $('.tDep1_cateCode').find('.on').removeClass('on');
|
|
| 89 |
- $('.tDep1_cateCode').find('.cateAll').addClass('on');
|
|
| 90 |
- |
|
| 91 |
- form.hashTag.value = hashTag; |
|
| 92 |
- form.pageIndex.value = 1; |
|
| 93 |
- |
|
| 94 |
- //문자 리스트 불러오기 |
|
| 95 |
- customSampleListAjax(1); |
|
| 96 |
- }); |
|
| 97 |
- |
|
| 98 |
- if(pageType == "msgcampain"){
|
|
| 99 |
- $(".tDep1_cateCode a").each(function(index, item){
|
|
| 100 |
- if($(this).text() == "선거"){
|
|
| 101 |
- $('.tDep1_cateCode').find('.on').removeClass('on');
|
|
| 102 |
- $(this).addClass('on');
|
|
| 103 |
- } |
|
| 104 |
- }) |
|
| 105 |
- } |
|
| 106 |
-}); |
|
| 107 |
- |
|
| 108 |
-function fnCPageUnit(){
|
|
| 109 |
- var pageUnit = $("#CPageUnit").val();
|
|
| 110 |
- document.customSampleForm.pageUnit.value = pageUnit; |
|
| 111 |
- customSampleListAjax(1); |
|
| 112 |
-} |
|
| 113 |
- |
|
| 114 |
-function fnMPageUnit(){
|
|
| 115 |
- var pageUnit = $("#myPageUnit").val();
|
|
| 116 |
- document.myCustomForm.pageUnit.value = pageUnit; |
|
| 117 |
- customSampleListAjax(1); |
|
| 118 |
-} |
|
| 119 |
- |
|
| 120 |
-// 맞춤제작 셈플 리스트 |
|
| 121 |
-function customSampleListAjax(pageNo){
|
|
| 122 |
- document.customSampleForm.pageIndex.value = pageNo; |
|
| 123 |
- var sendData= $(document.customSampleForm).serializeArray(); |
|
| 124 |
- $("#customSampleLoad").load("/web/mjon/custom/selectMsgCustomSampleListAjax.do", sendData ,function(response, status, xhr){
|
|
| 125 |
- photoLayerView(); |
|
| 126 |
- }); |
|
| 127 |
-} |
|
| 128 |
- |
|
| 129 |
-//맞춤제작 내보관함 리스트 |
|
| 130 |
-function myCustomListAjax(pageNo){
|
|
| 131 |
- |
|
| 132 |
- if(!fn_G_cmndataValueChk("startDate", "endDate", 12)){
|
|
| 133 |
- return; |
|
| 134 |
- }; |
|
| 135 |
- |
|
| 136 |
- document.myCustomForm.pageIndex.value = pageNo; |
|
| 137 |
- var sendData= $(document.myCustomForm).serializeArray(); |
|
| 138 |
- $("#myCustomLoad").load("/web/mjon/custom/selectMsgMyCustomListAjax.do", sendData ,function(response, status, xhr){
|
|
| 139 |
- photoLayerView(); |
|
| 140 |
- }); |
|
| 141 |
-} |
|
| 142 |
- |
|
| 143 |
-//맞춤제작 내보관함 정렬 조회 |
|
| 144 |
-function fnMyCustomSearchListOrd(){
|
|
| 145 |
- |
|
| 146 |
- var form = document.myCustomForm; |
|
| 147 |
- var sortOrd = form.searchSortOrd.value; |
|
| 148 |
- |
|
| 149 |
- if(sortOrd == 'desc'){
|
|
| 150 |
- |
|
| 151 |
- form.searchSortOrd.value = 'asc'; |
|
| 152 |
- $('#sortCnd').text('등록순');
|
|
| 153 |
- |
|
| 154 |
- }else{
|
|
| 155 |
- |
|
| 156 |
- form.searchSortOrd.value = 'desc'; |
|
| 157 |
- $('#sortCnd').text('최근순');
|
|
| 158 |
- |
|
| 159 |
- } |
|
| 160 |
- |
|
| 161 |
- //내문자함 내용 검색하기 |
|
| 162 |
- myCustomListAjax(1); |
|
| 163 |
- |
|
| 164 |
-} |
|
| 165 |
-//맞춤제작 등록 Popup |
|
| 166 |
-function customPopup(){
|
|
| 167 |
- $("#customPopup").load("/web/mjon/custom/selectMsgCustomPopupAjax.do", "" ,function(response, status, xhr){
|
|
| 168 |
- popupImgList(1); |
|
| 169 |
- }); |
|
| 170 |
-} |
|
| 171 |
- |
|
| 172 |
-function openMsgCustomPopup() {
|
|
| 173 |
- if(loginVO == "" || loginVO == null){
|
|
| 174 |
- alert("로그인 후 이용이 가능합니다.");
|
|
| 175 |
- return false; |
|
| 176 |
- } else {
|
|
| 177 |
- $("#customPopupOpen").trigger("click");
|
|
| 178 |
- } |
|
| 179 |
- $("#customType04").hide();
|
|
| 180 |
- popCustomScrT=$(window).scrollTop(); |
|
| 181 |
- popScrTarget(); |
|
| 182 |
-} |
|
| 183 |
- |
|
| 184 |
-//맞춤제작 등록 Popup |
|
| 185 |
-function customPopupDetail(){
|
|
| 186 |
- $("#customPopupDetail").load("/web/mjon/custom/MsgCustomVeiwPopupAjax.do", "" ,function(response, status, xhr){
|
|
| 187 |
- |
|
| 188 |
- }); |
|
| 189 |
-} |
|
| 190 |
- |
|
| 191 |
-function linkPhoPage(pageNo){
|
|
| 192 |
- customSampleListAjax(pageNo); |
|
| 193 |
-} |
|
| 194 |
- |
|
| 195 |
-function myCustomPage(pageNo){
|
|
| 196 |
- myCustomListAjax(pageNo); |
|
| 197 |
-} |
|
| 198 |
- |
|
| 199 |
-function fnCustomImgSendMsg(atchFileId, fileSn, strImgPath){
|
|
| 200 |
- |
|
| 201 |
- var form = document.customImgSendForm; |
|
| 202 |
- |
|
| 203 |
- form.atchFileId1.value = atchFileId; |
|
| 204 |
- form.fileSn.value = fileSn; |
|
| 205 |
- form.strImgPath.value = strImgPath; |
|
| 206 |
- form.customImgFlag.value = "Y"; |
|
| 207 |
- |
|
| 208 |
- form.action = "<c:url value='/web/mjon/msgdata/selectMsgDataView.do'/>"; |
|
| 209 |
- form.submit(); |
|
| 210 |
- |
|
| 211 |
-} |
|
| 212 |
- |
|
| 213 |
-$(function(){
|
|
| 214 |
- sitemapTabView(); |
|
| 215 |
-}); |
|
| 216 |
-function sitemapTabView(){
|
|
| 217 |
- var oldUrl=window.location.href; |
|
| 218 |
- var idx=oldUrl.slice(-1); |
|
| 219 |
- var n=oldUrl.indexOf('?');
|
|
| 220 |
- var changeUrl=oldUrl.slice(0,n); |
|
| 221 |
- |
|
| 222 |
- /* if(typeof (history.pushState) != 'undefined' && oldUrl.indexOf('?') !== -1){
|
|
| 223 |
- history.pushState(null, null, changeUrl); |
|
| 224 |
- }else{} */
|
|
| 225 |
- if(oldUrl.indexOf('?') !== -1){
|
|
| 226 |
- $('.tabType4 li').removeClass('active').eq(idx-1).addClass('active');
|
|
| 227 |
- $('.custom_content').removeClass('current');
|
|
| 228 |
- $('.custom_content.custom'+idx).addClass('current');
|
|
| 229 |
- |
|
| 230 |
- TabType4(this, idx); |
|
| 231 |
- } |
|
| 232 |
-} |
|
| 233 |
- |
|
| 234 |
-$(window).on('load',function(){
|
|
| 235 |
- setTimeout(function(){
|
|
| 236 |
- popScrTarget(); |
|
| 237 |
- },500); |
|
| 238 |
-}); |
|
| 239 |
- |
|
| 240 |
-function popScrTarget(){
|
|
| 241 |
- var closeTarget=$('.custom_layer .tooltip-close');
|
|
| 242 |
- closeTarget.attr('onclick','popScrCloseSetting();');
|
|
| 243 |
-} |
|
| 244 |
- |
|
| 245 |
-function popScrCloseSetting(){
|
|
| 246 |
- setTimeout(function(){
|
|
| 247 |
- $(window).scrollTop(popCustomScrT); |
|
| 248 |
- },1); |
|
| 249 |
-} |
|
| 250 |
-</script> |
|
| 251 |
-</head> |
|
| 252 |
-<body> |
|
| 253 |
- <!-- content 영역 --> |
|
| 254 |
- <div class="inner"> |
|
| 255 |
- <input type="hidden" id="msgcampain" value="${msgcampain}"/>
|
|
| 256 |
- <!-- 공통 visal --> |
|
| 257 |
- <div class="custom_visual"> |
|
| 258 |
- <div class="custom_visual_image"></div> |
|
| 259 |
- </div> |
|
| 260 |
- <!-- send top --> |
|
| 261 |
- <div class="send_top"> |
|
| 262 |
- <!-- tab button --> |
|
| 263 |
- <ul class="tabType4"> |
|
| 264 |
- <li class="tab active"> |
|
| 265 |
- <button type="button" onclick="TabType4(this,'1');">맞춤제작 샘플</button> |
|
| 266 |
- </li> |
|
| 267 |
- <li class="tab"> |
|
| 268 |
- <button type="button" onclick="TabType4(this,'2');">제작방법 및 이용안내</button> |
|
| 269 |
- </li> |
|
| 270 |
- <li class="tab"> |
|
| 271 |
- <button type="button" onclick="TabType4(this,'3');">내보관함</button> |
|
| 272 |
- </li> |
|
| 273 |
- </ul> |
|
| 274 |
- <form id="customImgSendForm" name="customImgSendForm" method="post"> |
|
| 275 |
- <input type="hidden" id="atchFileId1" name="atchFileId1" value=""/> |
|
| 276 |
- <input type="hidden" id="fileSn" name="fileSn" value=""/> |
|
| 277 |
- <input type="hidden" id="strImgPath" name="strImgPath" value=""/> |
|
| 278 |
- <input type="hidden" id="customImgFlag" name="customImgFlag" value="N"/> |
|
| 279 |
- </form> |
|
| 280 |
- <!--// tab button --> |
|
| 281 |
- <form id="customSampleForm" name="customSampleForm" method="post"> |
|
| 282 |
- <input type="hidden" name="pageIndex" /> |
|
| 283 |
- <input type="hidden" name="hashTag" id="hashTag" /> |
|
| 284 |
- <input type="hidden" name="letterType" id="letterType" /> |
|
| 285 |
- <input type="hidden" name="memberType" id="memberType" /> |
|
| 286 |
- <input type="hidden" name="pageUnit" id="pageUnit" value="${searchVO.pageUnit}"/>
|
|
| 287 |
- <input type="hidden" name="categoryCode" id="categoryCode" |
|
| 288 |
- <c:if test="${msgcampain eq 'msgcampain'}">
|
|
| 289 |
- value="${searchVO.categoryCode}"
|
|
| 290 |
- </c:if> |
|
| 291 |
- /> |
|
| 292 |
- <!-- tab content1 맞춤제작 샘플 --> |
|
| 293 |
- <div class="custom_content current custom1" id="tab4_1"> |
|
| 294 |
- <div class="area_tabs"> |
|
| 295 |
- <div class="top_tab"> |
|
| 296 |
- <!-- <div class="tab_depth1 tDep1_mType"> |
|
| 297 |
- <a href="#none" class="on" value="">전체</a> |
|
| 298 |
- <a href="#none" value="B">기업</a> |
|
| 299 |
- <a href="#none" class="on" value="P">개인</a> |
|
| 300 |
- <div class="on_active">전체</div> |
|
| 301 |
- </div> --> |
|
| 302 |
- <div class="customReq"> |
|
| 303 |
- <input type="hidden" id="customPopupOpen" data-tooltip="popup01"> |
|
| 304 |
- <button type="button" onclick="openMsgCustomPopup(); return false;"><i></i>맞춤제작 요청</button> |
|
| 305 |
- </div> |
|
| 306 |
- <select name="CPageUnit" id="CPageUnit" class="selType2" onChange="fnCPageUnit(); return false;"> |
|
| 307 |
- <option value="10">2줄보기</option> |
|
| 308 |
- <option value="20">4줄보기</option> |
|
| 309 |
- <option value="30">6줄보기</option> |
|
| 310 |
- </select> |
|
| 311 |
- </div> |
|
| 312 |
- <div class="bottom_tab"> |
|
| 313 |
- <div class="tab_depth3 tDep1_cateCode"> |
|
| 314 |
- <a href="#none" class="on cateAll" value="">All</a> |
|
| 315 |
- <a href="#none" value="best">BEST</a> |
|
| 316 |
- <c:forEach var="cateList" items="${cateCodeList}" varStatus="status">
|
|
| 317 |
- <a href="#none" value="<c:out value='${cateList.cateCode}'/>"><c:out value="${cateList.cateNm}"/></a>
|
|
| 318 |
- </c:forEach> |
|
| 319 |
- </div> |
|
| 320 |
- <div class="tab_depth4 tDep2_hashTag"> |
|
| 321 |
- <a href="#none" class="on hashAll" value="">전체</a> |
|
| 322 |
- <c:forEach var="hashList" items="${hashTagList}" varStatus="status">
|
|
| 323 |
- <a href="#none" value="${hashList.hashNm}">#<c:out value="${hashList.hashNm}"/></a>
|
|
| 324 |
- </c:forEach> |
|
| 325 |
- </div> |
|
| 326 |
- </div> |
|
| 327 |
- </div> |
|
| 328 |
- <div id="customSampleLoad"> |
|
| 329 |
- </div> |
|
| 330 |
- </div> |
|
| 331 |
- <!--// tab content1 맞춤제작 샘플 --> |
|
| 332 |
- </form> |
|
| 333 |
- <!-- tab content2 제작방법 및 이용안내 --> |
|
| 334 |
- <div class="custom_content custom2" id="tab4_2"> |
|
| 335 |
- <div class="heading"> |
|
| 336 |
- <h2>제작방법 및 이용안내</h2> |
|
| 337 |
- </div> |
|
| 338 |
- <div class="cont_top"> |
|
| 339 |
- <table> |
|
| 340 |
- <caption>제작방법 및 이용안내에 대한 구분, 용도, 가격, 제공방법 표</caption> |
|
| 341 |
- <colgroup> |
|
| 342 |
- <col style="width: 520px;"> |
|
| 343 |
- <col style="width: 15%;"> |
|
| 344 |
- <col style="width: 15%;"> |
|
| 345 |
- <col style="width: 25%;"> |
|
| 346 |
- </colgroup> |
|
| 347 |
- <thead> |
|
| 348 |
- <tr> |
|
| 349 |
- <th scope="col">구분</th> |
|
| 350 |
- <th scope="col">용도</th> |
|
| 351 |
- <th scope="col">가격<span>(VAT별도)</span></th> |
|
| 352 |
- <th scope="col">구분</th> |
|
| 353 |
- </tr> |
|
| 354 |
- </thead> |
|
| 355 |
- <tbody> |
|
| 356 |
- <tr> |
|
| 357 |
- <td>문자온 샘플 수정(글자, 색상, 폰트 등)</td> |
|
| 358 |
- <td>문자/카톡</td> |
|
| 359 |
- <td>${customSamplePrice}원</td>
|
|
| 360 |
- <td>내보관함/카톡/이메일</td> |
|
| 361 |
- </tr> |
|
| 362 |
- <tr> |
|
| 363 |
- <td>이미지 편집(첨부이미지 1장)</td> |
|
| 364 |
- <td>문자/카톡</td> |
|
| 365 |
- <td>${customEditPrice}원</td>
|
|
| 366 |
- <td>내보관함/카톡/이메일</td> |
|
| 367 |
- </tr> |
|
| 368 |
- <tr> |
|
| 369 |
- <td>이미지 편집(첨부이미지 3장이하)</td> |
|
| 370 |
- <td>문자/카톡</td> |
|
| 371 |
- <td>${customEdit3Price}원</td>
|
|
| 372 |
- <td>내보관함/카톡/이메일</td> |
|
| 373 |
- </tr> |
|
| 374 |
- <tr> |
|
| 375 |
- <td>텍스트 단순수정</td> |
|
| 376 |
- <td>문자/카톡</td> |
|
| 377 |
- <td>${customTextPrice}원</td>
|
|
| 378 |
- <td>내보관함/카톡/이메일</td> |
|
| 379 |
- </tr> |
|
| 380 |
- </tbody> |
|
| 381 |
- </table> |
|
| 382 |
- <div class="custom_notice"> |
|
| 383 |
- <div> |
|
| 384 |
- <i></i> |
|
| 385 |
- <p>유의사항</p> |
|
| 386 |
- </div> |
|
| 387 |
- <ul> |
|
| 388 |
- <li> |
|
| 389 |
- <p>- 모든 완성본은 1장만 제공됩니다.</p> |
|
| 390 |
- <p>- 제작 완료 후 추가 수정 시 별도 비용이 발생됩니다.</p> |
|
| 391 |
- </li> |
|
| 392 |
- <li> |
|
| 393 |
- <p>- 제작기간은 영업일 기준 1~3일 정도 소요됩니다.</p> |
|
| 394 |
- <p>- 제작 완료된 이미지는 내보관함에 자동 저장됩니다.</p> |
|
| 395 |
- </li> |
|
| 396 |
- <li> |
|
| 397 |
- <p>- PSD 원본 파일은 제공하지 않습니다.</p> |
|
| 398 |
- <p>- 제작비용은 신청 시 즉시 차감됩니다.</p> |
|
| 399 |
- </li> |
|
| 400 |
- </ul> |
|
| 401 |
- </div> |
|
| 402 |
- </div> |
|
| 403 |
- <div class="cont_bottom"> |
|
| 404 |
- <div class="custom_step"> |
|
| 405 |
- <div class="step_title"> |
|
| 406 |
- <p><span>샘플</span> 제작 요청방법</p> |
|
| 407 |
- <span class="summary">전문 디자이너가 직접 제작하는 고퀄리티 맞춤제작 서비스</span> |
|
| 408 |
- </div> |
|
| 409 |
- <ol> |
|
| 410 |
- <li> |
|
| 411 |
- <div class="step">STEP <strong>01</strong></div> |
|
| 412 |
- <div class="text">문자온 문자 샘플 목록에서<br><strong>원하는 이미지 선택</strong></div> |
|
| 413 |
- </li> |
|
| 414 |
- <li> |
|
| 415 |
- <div class="step">STEP <strong>02</strong></div> |
|
| 416 |
- <div class="text">작업 요청내역 입력 후<br><strong>신청하기 버튼 클릭</strong></div> |
|
| 417 |
- </li> |
|
| 418 |
- <li> |
|
| 419 |
- <div class="step">STEP <strong>03</strong></div> |
|
| 420 |
- <div class="text"><strong>내보관함</strong>에서<br>완성된 이미지 확인<span>(문자, 카톡 등)</span></div> |
|
| 421 |
- </li> |
|
| 422 |
- </ol> |
|
| 423 |
- </div> |
|
| 424 |
- </div> |
|
| 425 |
- </div> |
|
| 426 |
- <!--// tab content2 제작방법 및 이용안내 --> |
|
| 427 |
- |
|
| 428 |
- <!-- tab content3 내 보관함 --> |
|
| 429 |
- <form id="myCustomForm" name="myCustomForm" method="post"> |
|
| 430 |
- <input type="hidden" name="pageIndex" /> |
|
| 431 |
- <input type="hidden" name="pageUnit" id="pageUnit" value="${searchVO.pageUnit}"/>
|
|
| 432 |
- <input name="searchSortOrd" type="hidden" value="desc"/> |
|
| 433 |
- <div class="custom_content custom3" id="tab4_3"> |
|
| 434 |
- <div class="search_wrap clearfix"> |
|
| 435 |
- <div class="btn_left"> |
|
| 436 |
- <span>· 기간</span> |
|
| 437 |
- <div class="calendar_wrap"> |
|
| 438 |
- <input type="text" class="startDate inp calendar" title="검색 시작일" id="startDate" name="searchStartDate" value="${myStartDate}" data-datecontrol="true">
|
|
| 439 |
- <span class="dateEtc">~</span> |
|
| 440 |
- <input type="text" class="endDate inp calendar" title="검색 종료일" id="endDate" name="searchEndDate" value="${myEndDate}" data-datecontrol="true">
|
|
| 441 |
- </div> |
|
| 442 |
- <div class="search"> |
|
| 443 |
-<!-- <label for="searchWord" class="label"></label> --> |
|
| 444 |
-<!-- <input type="text" id="searchWord" name="searchWord" placeholder="내보관함 검색" onfocus="this.placeholder=''" onblur="this.placeholder='내보관함 검색'"> --> |
|
| 445 |
- <button type="button" class="btnType btnType2" onclick="javascript:myCustomListAjax(1); return false;">검색</button> |
|
| 446 |
- </div> |
|
| 447 |
- </div> |
|
| 448 |
- <div class="btn_right"> |
|
| 449 |
- <button type="button" id="sortOrd" name="sortOrd" onClick="javascript:fnMyCustomSearchListOrd(); return false;"><span id="sortCnd">최근순</span><i></i></button> |
|
| 450 |
- <!-- <label for="" class="label">검색조건 선택</label> |
|
| 451 |
- <select name="" id="" class="selType2"> |
|
| 452 |
- <option value="">전체보기</option> |
|
| 453 |
- <option value="">전체보기</option> |
|
| 454 |
- <option value="">전체보기</option> |
|
| 455 |
- </select> --> |
|
| 456 |
- <label for="pageUnit" class="label"></label> |
|
| 457 |
- <select name="myPageUnit" id="myPageUnit" class="selType2" onChange="fnMPageUnit(); return false;"> |
|
| 458 |
- <option value="10">2줄보기</option> |
|
| 459 |
- <option value="20">4줄보기</option> |
|
| 460 |
- <option value="30">6줄보기</option> |
|
| 461 |
- </select> |
|
| 462 |
- </div> |
|
| 463 |
- </div> |
|
| 464 |
- <div id="myCustomLoad"> |
|
| 465 |
- </div> |
|
| 466 |
- </div> |
|
| 467 |
- </form> |
|
| 468 |
- <!--//tab content3 내 보관함 --> |
|
| 469 |
- <!-- 맞춤제작 요청 레이어 팝업 --> |
|
| 470 |
- <div class="tooltip-wrap" id="customPopup"> |
|
| 471 |
- </div> |
|
| 472 |
- <!--// 맞춤제작 요청 레이어 팝업 --> |
|
| 473 |
- <!-- 내 보관함 상세보기 레이어 팝업 --> |
|
| 474 |
- <div class="tooltip-wrap" id="customPopupDetail"> |
|
| 475 |
- </div> |
|
| 476 |
- <!--// 내 보관함 상세보기 레이어 팝업 --> |
|
| 477 |
- </div> |
|
| 478 |
- <!--// send top --> |
|
| 479 |
- </div> |
|
| 480 |
- <!--// content 영역 --> |
|
| 481 |
-</body> |
|
| 482 |
-</html> |
|
| 1 |
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 3 |
+<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 4 |
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> |
|
| 5 |
+<!DOCTYPE html> |
|
| 6 |
+<html lang="ko"> |
|
| 7 |
+ |
|
| 8 |
+<head> |
|
| 9 |
+<meta charset="UTF-8"> |
|
| 10 |
+<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
| 11 |
+<title>문자온</title> |
|
| 12 |
+ |
|
| 13 |
+<script type="text/javascript"> |
|
| 14 |
+var pageType = '${msgcampain}';
|
|
| 15 |
+var loginVO = '${loginVO}';
|
|
| 16 |
+var popCustomScrT=0; |
|
| 17 |
+$(document).ready(function(){
|
|
| 18 |
+ |
|
| 19 |
+ // 맞춤제작 셈플 리스트 |
|
| 20 |
+ customSampleListAjax(1); |
|
| 21 |
+ |
|
| 22 |
+ customPopup(); |
|
| 23 |
+ customPopupDetail(); |
|
| 24 |
+ |
|
| 25 |
+ // 맞춤제작 팝업 내보관함 리스트 로그인이 완료된 경우에만 로드되도록 |
|
| 26 |
+ if(loginVO != "" && loginVO != null){
|
|
| 27 |
+ myCustomListAjax(1); |
|
| 28 |
+ } |
|
| 29 |
+ |
|
| 30 |
+ // 전체,기업, 개인 선택 옵션 처리 |
|
| 31 |
+ $('.tDep1_mType').click(function(){
|
|
| 32 |
+ |
|
| 33 |
+ var mType = $(this).find('.on_active').text();
|
|
| 34 |
+ var form = document.customSampleForm; |
|
| 35 |
+ |
|
| 36 |
+ if(mType == "전체"){
|
|
| 37 |
+ |
|
| 38 |
+ form.memberType.value = ""; |
|
| 39 |
+ |
|
| 40 |
+ }else if(mType == "기업"){
|
|
| 41 |
+ |
|
| 42 |
+ form.memberType.value = "B"; |
|
| 43 |
+ |
|
| 44 |
+ }else{
|
|
| 45 |
+ |
|
| 46 |
+ form.memberType.value = "P"; |
|
| 47 |
+ |
|
| 48 |
+ } |
|
| 49 |
+ |
|
| 50 |
+ //문자 리스트 불러오기 |
|
| 51 |
+ form.letterType.value = "C"; |
|
| 52 |
+ form.categoryCode.value = ""; |
|
| 53 |
+ form.hashTag.value = ""; |
|
| 54 |
+ form.pageIndex.value = 1; |
|
| 55 |
+ |
|
| 56 |
+ //문자 리스트 불러오기 |
|
| 57 |
+ customSampleListAjax(1); |
|
| 58 |
+ }); |
|
| 59 |
+ |
|
| 60 |
+ $('.tDep1_cateCode').click(function(){ // 카테고리 선택 시 옵션 처리
|
|
| 61 |
+ |
|
| 62 |
+ var cateCode = $(this).find('.on').attr("value");
|
|
| 63 |
+ var form = document.customSampleForm; |
|
| 64 |
+ |
|
| 65 |
+ if(cateCode == "all"){ //전체 선택시
|
|
| 66 |
+ cateCode = ""; |
|
| 67 |
+ } else {
|
|
| 68 |
+ //카테고리 코드 클릭 시 해쉬태그 초기화 후 전체 선택 |
|
| 69 |
+ form.hashTag.value=""; |
|
| 70 |
+ $('.tDep2_hashTag').find('.on').removeClass('on');
|
|
| 71 |
+ $('.tDep2_hashTag').find('.hashAll').addClass('on');
|
|
| 72 |
+ } |
|
| 73 |
+ |
|
| 74 |
+ form.categoryCode.value = cateCode; |
|
| 75 |
+ form.pageIndex.value = 1; |
|
| 76 |
+ |
|
| 77 |
+ // 맞춤제작 셈플 리스트 |
|
| 78 |
+ var pageUnit = $("#CPageUnit").val();
|
|
| 79 |
+ customSampleListAjax(1); |
|
| 80 |
+ }); |
|
| 81 |
+ |
|
| 82 |
+ $('.tDep2_hashTag').click(function(){ //해시 태그 선택 시 옵션 처리
|
|
| 83 |
+ var hashTag = $(this).find('.on').attr("value");
|
|
| 84 |
+ var form = document.customSampleForm; |
|
| 85 |
+ |
|
| 86 |
+ //해쉬태그 클릭 시 카테고리코드 초기화 후 전체 선택 |
|
| 87 |
+ form.categoryCode.value=""; |
|
| 88 |
+ $('.tDep1_cateCode').find('.on').removeClass('on');
|
|
| 89 |
+ $('.tDep1_cateCode').find('.cateAll').addClass('on');
|
|
| 90 |
+ |
|
| 91 |
+ form.hashTag.value = hashTag; |
|
| 92 |
+ form.pageIndex.value = 1; |
|
| 93 |
+ |
|
| 94 |
+ //문자 리스트 불러오기 |
|
| 95 |
+ customSampleListAjax(1); |
|
| 96 |
+ }); |
|
| 97 |
+ |
|
| 98 |
+ if(pageType == "msgcampain"){
|
|
| 99 |
+ $(".tDep1_cateCode a").each(function(index, item){
|
|
| 100 |
+ if($(this).text() == "선거"){
|
|
| 101 |
+ $('.tDep1_cateCode').find('.on').removeClass('on');
|
|
| 102 |
+ $(this).addClass('on');
|
|
| 103 |
+ } |
|
| 104 |
+ }) |
|
| 105 |
+ } |
|
| 106 |
+}); |
|
| 107 |
+ |
|
| 108 |
+function fnCPageUnit(){
|
|
| 109 |
+ var pageUnit = $("#CPageUnit").val();
|
|
| 110 |
+ document.customSampleForm.pageUnit.value = pageUnit; |
|
| 111 |
+ customSampleListAjax(1); |
|
| 112 |
+} |
|
| 113 |
+ |
|
| 114 |
+function fnMPageUnit(){
|
|
| 115 |
+ var pageUnit = $("#myPageUnit").val();
|
|
| 116 |
+ document.myCustomForm.pageUnit.value = pageUnit; |
|
| 117 |
+ customSampleListAjax(1); |
|
| 118 |
+} |
|
| 119 |
+ |
|
| 120 |
+// 맞춤제작 셈플 리스트 |
|
| 121 |
+function customSampleListAjax(pageNo){
|
|
| 122 |
+ document.customSampleForm.pageIndex.value = pageNo; |
|
| 123 |
+ var sendData= $(document.customSampleForm).serializeArray(); |
|
| 124 |
+ $("#customSampleLoad").load("/web/mjon/custom/selectMsgCustomSampleListAjax.do", sendData ,function(response, status, xhr){
|
|
| 125 |
+ photoLayerView(); |
|
| 126 |
+ }); |
|
| 127 |
+} |
|
| 128 |
+ |
|
| 129 |
+//맞춤제작 내보관함 리스트 |
|
| 130 |
+function myCustomListAjax(pageNo){
|
|
| 131 |
+ |
|
| 132 |
+ if(!fn_G_cmndataValueChk("startDate", "endDate", 12)){
|
|
| 133 |
+ return; |
|
| 134 |
+ }; |
|
| 135 |
+ |
|
| 136 |
+ document.myCustomForm.pageIndex.value = pageNo; |
|
| 137 |
+ var sendData= $(document.myCustomForm).serializeArray(); |
|
| 138 |
+ $("#myCustomLoad").load("/web/mjon/custom/selectMsgMyCustomListAjax.do", sendData ,function(response, status, xhr){
|
|
| 139 |
+ photoLayerView(); |
|
| 140 |
+ }); |
|
| 141 |
+} |
|
| 142 |
+ |
|
| 143 |
+//맞춤제작 내보관함 정렬 조회 |
|
| 144 |
+function fnMyCustomSearchListOrd(){
|
|
| 145 |
+ |
|
| 146 |
+ var form = document.myCustomForm; |
|
| 147 |
+ var sortOrd = form.searchSortOrd.value; |
|
| 148 |
+ |
|
| 149 |
+ if(sortOrd == 'desc'){
|
|
| 150 |
+ |
|
| 151 |
+ form.searchSortOrd.value = 'asc'; |
|
| 152 |
+ $('#sortCnd').text('등록순');
|
|
| 153 |
+ |
|
| 154 |
+ }else{
|
|
| 155 |
+ |
|
| 156 |
+ form.searchSortOrd.value = 'desc'; |
|
| 157 |
+ $('#sortCnd').text('최근순');
|
|
| 158 |
+ |
|
| 159 |
+ } |
|
| 160 |
+ |
|
| 161 |
+ //내문자함 내용 검색하기 |
|
| 162 |
+ myCustomListAjax(1); |
|
| 163 |
+ |
|
| 164 |
+} |
|
| 165 |
+//맞춤제작 등록 Popup |
|
| 166 |
+function customPopup(){
|
|
| 167 |
+ $("#customPopup").load("/web/mjon/custom/selectMsgCustomPopupAjax.do", "" ,function(response, status, xhr){
|
|
| 168 |
+ popupImgList(1); |
|
| 169 |
+ }); |
|
| 170 |
+} |
|
| 171 |
+ |
|
| 172 |
+function openMsgCustomPopup() {
|
|
| 173 |
+ if(loginVO == "" || loginVO == null){
|
|
| 174 |
+ alert("로그인 후 이용이 가능합니다.");
|
|
| 175 |
+ return false; |
|
| 176 |
+ } else {
|
|
| 177 |
+ $("#customPopupOpen").trigger("click");
|
|
| 178 |
+ } |
|
| 179 |
+ $("#customType04").hide();
|
|
| 180 |
+ popCustomScrT=$(window).scrollTop(); |
|
| 181 |
+ popScrTarget(); |
|
| 182 |
+} |
|
| 183 |
+ |
|
| 184 |
+//맞춤제작 등록 Popup |
|
| 185 |
+function customPopupDetail(){
|
|
| 186 |
+ $("#customPopupDetail").load("/web/mjon/custom/MsgCustomVeiwPopupAjax.do", "" ,function(response, status, xhr){
|
|
| 187 |
+ |
|
| 188 |
+ }); |
|
| 189 |
+} |
|
| 190 |
+ |
|
| 191 |
+function linkPhoPage(pageNo){
|
|
| 192 |
+ customSampleListAjax(pageNo); |
|
| 193 |
+} |
|
| 194 |
+ |
|
| 195 |
+function myCustomPage(pageNo){
|
|
| 196 |
+ myCustomListAjax(pageNo); |
|
| 197 |
+} |
|
| 198 |
+ |
|
| 199 |
+function fnCustomImgSendMsg(atchFileId, fileSn, strImgPath){
|
|
| 200 |
+ |
|
| 201 |
+ var form = document.customImgSendForm; |
|
| 202 |
+ |
|
| 203 |
+ form.atchFileId1.value = atchFileId; |
|
| 204 |
+ form.fileSn.value = fileSn; |
|
| 205 |
+ form.strImgPath.value = strImgPath; |
|
| 206 |
+ form.customImgFlag.value = "Y"; |
|
| 207 |
+ |
|
| 208 |
+ form.action = "<c:url value='/web/mjon/msgdata/selectMsgDataView.do'/>"; |
|
| 209 |
+ form.submit(); |
|
| 210 |
+ |
|
| 211 |
+} |
|
| 212 |
+ |
|
| 213 |
+$(function(){
|
|
| 214 |
+ sitemapTabView(); |
|
| 215 |
+}); |
|
| 216 |
+function sitemapTabView(){
|
|
| 217 |
+ var oldUrl=window.location.href; |
|
| 218 |
+ var idx=oldUrl.slice(-1); |
|
| 219 |
+ var n=oldUrl.indexOf('?');
|
|
| 220 |
+ var changeUrl=oldUrl.slice(0,n); |
|
| 221 |
+ |
|
| 222 |
+ /* if(typeof (history.pushState) != 'undefined' && oldUrl.indexOf('?') !== -1){
|
|
| 223 |
+ history.pushState(null, null, changeUrl); |
|
| 224 |
+ }else{} */
|
|
| 225 |
+ if(oldUrl.indexOf('?') !== -1){
|
|
| 226 |
+ $('.tabType4 li').removeClass('active').eq(idx-1).addClass('active');
|
|
| 227 |
+ $('.custom_content').removeClass('current');
|
|
| 228 |
+ $('.custom_content.custom'+idx).addClass('current');
|
|
| 229 |
+ |
|
| 230 |
+ TabType4(this, idx); |
|
| 231 |
+ } |
|
| 232 |
+} |
|
| 233 |
+ |
|
| 234 |
+$(window).on('load',function(){
|
|
| 235 |
+ setTimeout(function(){
|
|
| 236 |
+ popScrTarget(); |
|
| 237 |
+ },500); |
|
| 238 |
+}); |
|
| 239 |
+ |
|
| 240 |
+function popScrTarget(){
|
|
| 241 |
+ var closeTarget=$('.custom_layer .tooltip-close');
|
|
| 242 |
+ closeTarget.attr('onclick','popScrCloseSetting();');
|
|
| 243 |
+} |
|
| 244 |
+ |
|
| 245 |
+function popScrCloseSetting(){
|
|
| 246 |
+ setTimeout(function(){
|
|
| 247 |
+ $(window).scrollTop(popCustomScrT); |
|
| 248 |
+ },1); |
|
| 249 |
+} |
|
| 250 |
+</script> |
|
| 251 |
+</head> |
|
| 252 |
+<body> |
|
| 253 |
+ <!-- content 영역 --> |
|
| 254 |
+ <div class="inner"> |
|
| 255 |
+ <input type="hidden" id="msgcampain" value="${msgcampain}"/>
|
|
| 256 |
+ <!-- 공통 visal --> |
|
| 257 |
+ <div class="custom_visual"> |
|
| 258 |
+ <div class="custom_visual_image"></div> |
|
| 259 |
+ </div> |
|
| 260 |
+ <!-- send top --> |
|
| 261 |
+ <div class="send_top"> |
|
| 262 |
+ <!-- tab button --> |
|
| 263 |
+ <ul class="tabType4"> |
|
| 264 |
+ <li class="tab active"> |
|
| 265 |
+ <button type="button" onclick="TabType4(this,'1');">맞춤제작 샘플</button> |
|
| 266 |
+ </li> |
|
| 267 |
+ <li class="tab"> |
|
| 268 |
+ <button type="button" onclick="TabType4(this,'2');">제작방법 및 이용안내</button> |
|
| 269 |
+ </li> |
|
| 270 |
+ <li class="tab"> |
|
| 271 |
+ <button type="button" onclick="TabType4(this,'3');">내보관함</button> |
|
| 272 |
+ </li> |
|
| 273 |
+ </ul> |
|
| 274 |
+ <form id="customImgSendForm" name="customImgSendForm" method="post"> |
|
| 275 |
+ <input type="hidden" id="atchFileId1" name="atchFileId1" value=""/> |
|
| 276 |
+ <input type="hidden" id="fileSn" name="fileSn" value=""/> |
|
| 277 |
+ <input type="hidden" id="strImgPath" name="strImgPath" value=""/> |
|
| 278 |
+ <input type="hidden" id="customImgFlag" name="customImgFlag" value="N"/> |
|
| 279 |
+ </form> |
|
| 280 |
+ <!--// tab button --> |
|
| 281 |
+ <form id="customSampleForm" name="customSampleForm" method="post"> |
|
| 282 |
+ <input type="hidden" name="pageIndex" /> |
|
| 283 |
+ <input type="hidden" name="hashTag" id="hashTag" /> |
|
| 284 |
+ <input type="hidden" name="letterType" id="letterType" /> |
|
| 285 |
+ <input type="hidden" name="memberType" id="memberType" /> |
|
| 286 |
+ <input type="hidden" name="pageUnit" id="pageUnit" value="${searchVO.pageUnit}"/>
|
|
| 287 |
+ <input type="hidden" name="categoryCode" id="categoryCode" |
|
| 288 |
+ <c:if test="${msgcampain eq 'msgcampain'}">
|
|
| 289 |
+ value="${searchVO.categoryCode}"
|
|
| 290 |
+ </c:if> |
|
| 291 |
+ /> |
|
| 292 |
+ <!-- tab content1 맞춤제작 샘플 --> |
|
| 293 |
+ <div class="custom_content current custom1" id="tab4_1"> |
|
| 294 |
+ <div class="area_tabs"> |
|
| 295 |
+ <div class="top_tab"> |
|
| 296 |
+ <!-- <div class="tab_depth1 tDep1_mType"> |
|
| 297 |
+ <a href="#none" class="on" value="">전체</a> |
|
| 298 |
+ <a href="#none" value="B">기업</a> |
|
| 299 |
+ <a href="#none" class="on" value="P">개인</a> |
|
| 300 |
+ <div class="on_active">전체</div> |
|
| 301 |
+ </div> --> |
|
| 302 |
+ <div class="customReq"> |
|
| 303 |
+ <input type="hidden" id="customPopupOpen" data-tooltip="popup01"> |
|
| 304 |
+ <button type="button" onclick="openMsgCustomPopup(); return false;"><i></i>맞춤제작 요청</button> |
|
| 305 |
+ </div> |
|
| 306 |
+ <select name="CPageUnit" id="CPageUnit" class="selType2" onChange="fnCPageUnit(); return false;"> |
|
| 307 |
+ <option value="10">2줄보기</option> |
|
| 308 |
+ <option value="20">4줄보기</option> |
|
| 309 |
+ <option value="30">6줄보기</option> |
|
| 310 |
+ </select> |
|
| 311 |
+ </div> |
|
| 312 |
+ <div class="bottom_tab"> |
|
| 313 |
+ <div class="tab_depth3 tDep1_cateCode"> |
|
| 314 |
+ <a href="#none" class="on cateAll" value="">All</a> |
|
| 315 |
+ <a href="#none" value="best">BEST</a> |
|
| 316 |
+ <c:forEach var="cateList" items="${cateCodeList}" varStatus="status">
|
|
| 317 |
+ <a href="#none" value="<c:out value='${cateList.cateCode}'/>"><c:out value="${cateList.cateNm}"/></a>
|
|
| 318 |
+ </c:forEach> |
|
| 319 |
+ </div> |
|
| 320 |
+ <div class="tab_depth4 tDep2_hashTag"> |
|
| 321 |
+ <a href="#none" class="on hashAll" value="">전체</a> |
|
| 322 |
+ <c:forEach var="hashList" items="${hashTagList}" varStatus="status">
|
|
| 323 |
+ <a href="#none" value="${hashList.hashNm}">#<c:out value="${hashList.hashNm}"/></a>
|
|
| 324 |
+ </c:forEach> |
|
| 325 |
+ </div> |
|
| 326 |
+ </div> |
|
| 327 |
+ </div> |
|
| 328 |
+ <div id="customSampleLoad"> |
|
| 329 |
+ </div> |
|
| 330 |
+ </div> |
|
| 331 |
+ <!--// tab content1 맞춤제작 샘플 --> |
|
| 332 |
+ </form> |
|
| 333 |
+ <!-- tab content2 제작방법 및 이용안내 --> |
|
| 334 |
+ <div class="custom_content custom2" id="tab4_2"> |
|
| 335 |
+ <div class="heading"> |
|
| 336 |
+ <h2>제작방법 및 이용안내</h2> |
|
| 337 |
+ </div> |
|
| 338 |
+ <div class="cont_top"> |
|
| 339 |
+ <table> |
|
| 340 |
+ <caption>제작방법 및 이용안내에 대한 구분, 용도, 가격, 제공방법 표</caption> |
|
| 341 |
+ <colgroup> |
|
| 342 |
+ <col style="width: 520px;"> |
|
| 343 |
+ <col style="width: 15%;"> |
|
| 344 |
+ <col style="width: 15%;"> |
|
| 345 |
+ <col style="width: 25%;"> |
|
| 346 |
+ </colgroup> |
|
| 347 |
+ <thead> |
|
| 348 |
+ <tr> |
|
| 349 |
+ <th scope="col">구분</th> |
|
| 350 |
+ <th scope="col">용도</th> |
|
| 351 |
+ <th scope="col">가격<span>(VAT별도)</span></th> |
|
| 352 |
+ <th scope="col">구분</th> |
|
| 353 |
+ </tr> |
|
| 354 |
+ </thead> |
|
| 355 |
+ <tbody> |
|
| 356 |
+ <tr> |
|
| 357 |
+ <td>문자온 샘플 수정(글자, 색상, 폰트 등)</td> |
|
| 358 |
+ <td>문자/카톡</td> |
|
| 359 |
+ <td>${customSamplePrice}원</td>
|
|
| 360 |
+ <td>내보관함/카톡/이메일</td> |
|
| 361 |
+ </tr> |
|
| 362 |
+ <tr> |
|
| 363 |
+ <td>이미지 편집(첨부이미지 1장)</td> |
|
| 364 |
+ <td>문자/카톡</td> |
|
| 365 |
+ <td>${customEditPrice}원</td>
|
|
| 366 |
+ <td>내보관함/카톡/이메일</td> |
|
| 367 |
+ </tr> |
|
| 368 |
+ <tr> |
|
| 369 |
+ <td>이미지 편집(첨부이미지 3장이하)</td> |
|
| 370 |
+ <td>문자/카톡</td> |
|
| 371 |
+ <td>${customEdit3Price}원</td>
|
|
| 372 |
+ <td>내보관함/카톡/이메일</td> |
|
| 373 |
+ </tr> |
|
| 374 |
+ <tr> |
|
| 375 |
+ <td>텍스트 단순수정</td> |
|
| 376 |
+ <td>문자/카톡</td> |
|
| 377 |
+ <td>${customTextPrice}원</td>
|
|
| 378 |
+ <td>내보관함/카톡/이메일</td> |
|
| 379 |
+ </tr> |
|
| 380 |
+ </tbody> |
|
| 381 |
+ </table> |
|
| 382 |
+ <div class="custom_notice"> |
|
| 383 |
+ <div> |
|
| 384 |
+ <i></i> |
|
| 385 |
+ <p>유의사항</p> |
|
| 386 |
+ </div> |
|
| 387 |
+ <ul> |
|
| 388 |
+ <li> |
|
| 389 |
+ <p>- 모든 완성본은 1장만 제공됩니다.</p> |
|
| 390 |
+ <p>- 제작 완료 후 추가 수정 시 별도 비용이 발생됩니다.</p> |
|
| 391 |
+ </li> |
|
| 392 |
+ <li> |
|
| 393 |
+ <p>- 제작기간은 영업일 기준 1~3일 정도 소요됩니다.</p> |
|
| 394 |
+ <p>- 제작 완료된 이미지는 내보관함에 자동 저장됩니다.</p> |
|
| 395 |
+ </li> |
|
| 396 |
+ <li> |
|
| 397 |
+ <p>- PSD 원본 파일은 제공하지 않습니다.</p> |
|
| 398 |
+ <p>- 제작비용은 신청 시 즉시 차감됩니다.</p> |
|
| 399 |
+ </li> |
|
| 400 |
+ </ul> |
|
| 401 |
+ </div> |
|
| 402 |
+ </div> |
|
| 403 |
+ <div class="cont_bottom"> |
|
| 404 |
+ <div class="custom_step"> |
|
| 405 |
+ <div class="step_title"> |
|
| 406 |
+ <p><span>샘플</span> 제작 요청방법</p> |
|
| 407 |
+ <span class="summary">전문 디자이너가 직접 제작하는 고퀄리티 맞춤제작 서비스</span> |
|
| 408 |
+ </div> |
|
| 409 |
+ <ol> |
|
| 410 |
+ <li> |
|
| 411 |
+ <div class="step">STEP <strong>01</strong></div> |
|
| 412 |
+ <div class="text">문자온 문자 샘플 목록에서<br><strong>원하는 이미지 선택</strong></div> |
|
| 413 |
+ </li> |
|
| 414 |
+ <li> |
|
| 415 |
+ <div class="step">STEP <strong>02</strong></div> |
|
| 416 |
+ <div class="text">작업 요청내역 입력 후<br><strong>신청하기 버튼 클릭</strong></div> |
|
| 417 |
+ </li> |
|
| 418 |
+ <li> |
|
| 419 |
+ <div class="step">STEP <strong>03</strong></div> |
|
| 420 |
+ <div class="text"><strong>내보관함</strong>에서<br>완성된 이미지 확인<span>(문자, 카톡 등)</span></div> |
|
| 421 |
+ </li> |
|
| 422 |
+ </ol> |
|
| 423 |
+ </div> |
|
| 424 |
+ </div> |
|
| 425 |
+ </div> |
|
| 426 |
+ <!--// tab content2 제작방법 및 이용안내 --> |
|
| 427 |
+ |
|
| 428 |
+ <!-- tab content3 내 보관함 --> |
|
| 429 |
+ <form id="myCustomForm" name="myCustomForm" method="post"> |
|
| 430 |
+ <input type="hidden" name="pageIndex" /> |
|
| 431 |
+ <input type="hidden" name="pageUnit" id="pageUnit" value="${searchVO.pageUnit}"/>
|
|
| 432 |
+ <input name="searchSortOrd" type="hidden" value="desc"/> |
|
| 433 |
+ <div class="custom_content custom3" id="tab4_3"> |
|
| 434 |
+ <div class="search_wrap clearfix"> |
|
| 435 |
+ <div class="btn_left"> |
|
| 436 |
+ <span>· 기간</span> |
|
| 437 |
+ <div class="calendar_wrap"> |
|
| 438 |
+ <input type="text" class="startDate inp calendar" title="검색 시작일" id="startDate" name="searchStartDate" value="${myStartDate}" data-datecontrol="true">
|
|
| 439 |
+ <span class="dateEtc">~</span> |
|
| 440 |
+ <input type="text" class="endDate inp calendar" title="검색 종료일" id="endDate" name="searchEndDate" value="${myEndDate}" data-datecontrol="true">
|
|
| 441 |
+ </div> |
|
| 442 |
+ <div class="search"> |
|
| 443 |
+<!-- <label for="searchWord" class="label"></label> --> |
|
| 444 |
+<!-- <input type="text" id="searchWord" name="searchWord" placeholder="내보관함 검색" onfocus="this.placeholder=''" onblur="this.placeholder='내보관함 검색'"> --> |
|
| 445 |
+ <button type="button" class="btnType btnType2" onclick="javascript:myCustomListAjax(1); return false;">검색</button> |
|
| 446 |
+ </div> |
|
| 447 |
+ </div> |
|
| 448 |
+ <div class="btn_right"> |
|
| 449 |
+ <button type="button" id="sortOrd" name="sortOrd" onClick="javascript:fnMyCustomSearchListOrd(); return false;"><span id="sortCnd">최근순</span><i></i></button> |
|
| 450 |
+ <!-- <label for="" class="label">검색조건 선택</label> |
|
| 451 |
+ <select name="" id="" class="selType2"> |
|
| 452 |
+ <option value="">전체보기</option> |
|
| 453 |
+ <option value="">전체보기</option> |
|
| 454 |
+ <option value="">전체보기</option> |
|
| 455 |
+ </select> --> |
|
| 456 |
+ <label for="pageUnit" class="label"></label> |
|
| 457 |
+ <select name="myPageUnit" id="myPageUnit" class="selType2" onChange="fnMPageUnit(); return false;"> |
|
| 458 |
+ <option value="10">2줄보기</option> |
|
| 459 |
+ <option value="20">4줄보기</option> |
|
| 460 |
+ <option value="30">6줄보기</option> |
|
| 461 |
+ </select> |
|
| 462 |
+ </div> |
|
| 463 |
+ </div> |
|
| 464 |
+ <div id="myCustomLoad"> |
|
| 465 |
+ </div> |
|
| 466 |
+ </div> |
|
| 467 |
+ </form> |
|
| 468 |
+ <!--//tab content3 내 보관함 --> |
|
| 469 |
+ <!-- 맞춤제작 요청 레이어 팝업 --> |
|
| 470 |
+ <div class="tooltip-wrap" id="customPopup"> |
|
| 471 |
+ </div> |
|
| 472 |
+ <!--// 맞춤제작 요청 레이어 팝업 --> |
|
| 473 |
+ <!-- 내 보관함 상세보기 레이어 팝업 --> |
|
| 474 |
+ <div class="tooltip-wrap" id="customPopupDetail"> |
|
| 475 |
+ </div> |
|
| 476 |
+ <!--// 내 보관함 상세보기 레이어 팝업 --> |
|
| 477 |
+ </div> |
|
| 478 |
+ <!--// send top --> |
|
| 479 |
+ </div> |
|
| 480 |
+ <!--// content 영역 --> |
|
| 481 |
+</body> |
|
| 482 |
+</html> |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
... | ... | @@ -1,904 +1,904 @@ |
| 1 |
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
-<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 4 |
-<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> |
|
| 5 |
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
|
| 6 |
- |
|
| 7 |
-<script type="text/javascript" src="<c:url value='/publish/js/content.js'/>"></script> |
|
| 8 |
- |
|
| 9 |
-<script type="text/javascript"> |
|
| 10 |
- |
|
| 11 |
-var $tableExcel = null; //엑셀입력 탭 |
|
| 12 |
-var $tableError = null; //엑셀입력 탭 |
|
| 13 |
-$(document).ready(function(){
|
|
| 14 |
- |
|
| 15 |
- //Tabulator AJAX Data Loading |
|
| 16 |
- $tableError = new Tabulator("#tabulator_error", {
|
|
| 17 |
- height:"255px", |
|
| 18 |
- width:"100%", |
|
| 19 |
- layout:"fitColumns", |
|
| 20 |
- autoColumns:false, |
|
| 21 |
- headerHozAlign:"center", |
|
| 22 |
- validationMode:"highlight", |
|
| 23 |
- clipboard:false, |
|
| 24 |
- clipboardCopySelector:"table", |
|
| 25 |
- clipboardPasteAction:"insert", // insert, update, replace |
|
| 26 |
- placeholder:"등록 팝업에서 휴대폰을 선택 후 확인해주세요.", //fit columns to width of table (optional) |
|
| 27 |
- columns:[ //Define Table Columns |
|
| 28 |
- {title:"이름", field:"name", hozAlign:"center", headerHozAlign: "center", width:125},
|
|
| 29 |
- {title:"휴대폰", field:"phone", hozAlign:"center", headerHozAlign: "center", width:158},
|
|
| 30 |
- {title:"미등록 결과", field:"result", hozAlign:"center", headerHozAlign: "center", width:125}
|
|
| 31 |
- ] |
|
| 32 |
- }); |
|
| 33 |
- |
|
| 34 |
- |
|
| 35 |
- //Tabulator AJAX Data Loading |
|
| 36 |
- $tableExcel = new Tabulator("#tabulator_excel", {
|
|
| 37 |
- height:"255px", |
|
| 38 |
- width:"100%", |
|
| 39 |
- layout:"fitColumns", |
|
| 40 |
- autoColumns:false, |
|
| 41 |
- headerHozAlign:"center", |
|
| 42 |
- validationMode:"highlight", |
|
| 43 |
- clipboard:false, |
|
| 44 |
- clipboardCopySelector:"table", |
|
| 45 |
- clipboardPasteAction:"insert", // insert, update, replace |
|
| 46 |
- placeholder:"Excel 파일을 업로드 해주세요.", //fit columns to width of table (optional) |
|
| 47 |
- columns:[ //Define Table Columns |
|
| 48 |
- {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, headerHozAlign:"center", hozAlign:"center", headerSort:false, cellClick:function(e, cell){
|
|
| 49 |
- cell.getRow().toggleSelect(); |
|
| 50 |
- } |
|
| 51 |
- }, |
|
| 52 |
- {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:60},
|
|
| 53 |
- {title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 54 |
- {title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 55 |
- {title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 56 |
- {title:"D", field:"D", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 57 |
- {title:"E", field:"E", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 58 |
- {title:"F", field:"F", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}
|
|
| 59 |
- ], |
|
| 60 |
- validationFailed:function(cell, value, parameters){ // 유효성 체크 함수
|
|
| 61 |
- var valid = cell.isValid(); |
|
| 62 |
- if(!valid){
|
|
| 63 |
- alert("양식에 맞지 않는 정보가 입력되었습니다.");
|
|
| 64 |
- |
|
| 65 |
- //해당 셀 데이터 삭제 |
|
| 66 |
- cell.setValue("");
|
|
| 67 |
- } |
|
| 68 |
- return value % parameters.phone; |
|
| 69 |
- }, |
|
| 70 |
- }); |
|
| 71 |
- |
|
| 72 |
- $("#excelFile").on("change", function(event) {
|
|
| 73 |
- var fileInfo = event.target.files; |
|
| 74 |
- if(fileInfo.length > 0){
|
|
| 75 |
- excelFileChange(fileInfo[0]); |
|
| 76 |
- } else {
|
|
| 77 |
- fn_loadRemoveActive(); // 파일이 선택되지 않은 경우 로딩 상태 제거 |
|
| 78 |
- setTimeout(() => { $(this).val(''); }, 0); // 파일 선택 초기화
|
|
| 79 |
- } |
|
| 80 |
- }); |
|
| 81 |
- |
|
| 82 |
- |
|
| 83 |
- |
|
| 84 |
- $(document).on('click', '#btnAddrMassClose', function() {
|
|
| 85 |
- // 대량등록 닫기 |
|
| 86 |
- setAddrMassClose(); |
|
| 87 |
- }); |
|
| 88 |
- |
|
| 89 |
- |
|
| 90 |
- $(document).on('click', '#closeBtn', function() {
|
|
| 91 |
- // 대량등록 닫기 |
|
| 92 |
- setAddrMassClose(); |
|
| 93 |
- }); |
|
| 94 |
- |
|
| 95 |
- |
|
| 96 |
- // 엑셀등록 닫기 |
|
| 97 |
- function setAddrMassClose() {
|
|
| 98 |
- $tableExcel.clearData(); |
|
| 99 |
- $("#excelRowTotCnt").text(0); //총건수 수정
|
|
| 100 |
- $("#excelRowDupCnt").text(0); //중복건수 수정
|
|
| 101 |
- $("#excelRowErrorCnt").text(0); //중복건수 수정
|
|
| 102 |
- dupliPhoneDataRealList.length = 0; // 중복 휴대폰번호 초기화 |
|
| 103 |
- addrMassDupliSaveList = null; |
|
| 104 |
- |
|
| 105 |
- |
|
| 106 |
- // popup 영역 |
|
| 107 |
- $tableError.clearData(); |
|
| 108 |
- // 중복 카운트 |
|
| 109 |
- $("#errorPopDupCnt").text(0);
|
|
| 110 |
- // 에러 카운트 |
|
| 111 |
- $("#errorPopErrorCnt").text(0);
|
|
| 112 |
- // |
|
| 113 |
- $("#errorPopTotCnt").text(0);
|
|
| 114 |
- |
|
| 115 |
- |
|
| 116 |
- } |
|
| 117 |
- |
|
| 118 |
- //############################################################################################# |
|
| 119 |
- //파일업로드 드래그앤 드롭 |
|
| 120 |
- //############################################################################################# |
|
| 121 |
- var objDragAndDrop = $(".upload_area");
|
|
| 122 |
- $(document).on("dragenter",".upload_area",function(e){
|
|
| 123 |
- e.stopPropagation(); |
|
| 124 |
- e.preventDefault(); |
|
| 125 |
- //$(this).css('border', '2px solid #0B85A1');
|
|
| 126 |
- }); |
|
| 127 |
- $(document).on("dragover",".upload_area",function(e){
|
|
| 128 |
- e.stopPropagation(); |
|
| 129 |
- e.preventDefault(); |
|
| 130 |
- }); |
|
| 131 |
- $(document).on("drop",".upload_area",function(e){
|
|
| 132 |
- fn_loadAddActive(); |
|
| 133 |
- e.preventDefault(); |
|
| 134 |
- var files = e.originalEvent.dataTransfer.files; |
|
| 135 |
- excelFileChange(files[0]); |
|
| 136 |
- }); |
|
| 137 |
- |
|
| 138 |
- $(document).on('dragenter', function (e){
|
|
| 139 |
- e.stopPropagation(); |
|
| 140 |
- e.preventDefault(); |
|
| 141 |
- }); |
|
| 142 |
- $(document).on('dragover', function (e){
|
|
| 143 |
- e.stopPropagation(); |
|
| 144 |
- e.preventDefault(); |
|
| 145 |
- //objDragAndDrop.css('border', '2px dotted #0B85A1');
|
|
| 146 |
- }); |
|
| 147 |
- $(document).on('drop', function (e){
|
|
| 148 |
- e.stopPropagation(); |
|
| 149 |
- e.preventDefault(); |
|
| 150 |
- }); |
|
| 151 |
- //파일 드래그앤드롭 종료 |
|
| 152 |
- |
|
| 153 |
- |
|
| 154 |
- |
|
| 155 |
- |
|
| 156 |
- |
|
| 157 |
- //타이틀 select 선택 이벤트 |
|
| 158 |
- $('.field-selector').on('change', function() {
|
|
| 159 |
- fn_loadAddActive(); |
|
| 160 |
- |
|
| 161 |
- setTimeout(() => {
|
|
| 162 |
- var selectedFields = []; |
|
| 163 |
- var isDuplicate = false; |
|
| 164 |
- |
|
| 165 |
- if($tableExcel.getData().length < 1){
|
|
| 166 |
- alert('데이터 입력 후 선택해 주세요.');
|
|
| 167 |
- $(this).val("");
|
|
| 168 |
- fn_loadRemoveActive(); |
|
| 169 |
- return false; |
|
| 170 |
- } |
|
| 171 |
- |
|
| 172 |
- // 중복체크 |
|
| 173 |
- $('.field-selector').each(function() {
|
|
| 174 |
- var selectedField = $(this).val(); |
|
| 175 |
- if (selectedField) {
|
|
| 176 |
- if (selectedFields.includes(selectedField)) {
|
|
| 177 |
- alert("중복된 필드를 선택할 수 없습니다.");
|
|
| 178 |
- $(this).val(""); // 중복 필드를 선택한 경우 빈 값으로 초기화
|
|
| 179 |
- isDuplicate = true; |
|
| 180 |
- return false; // 반복문 종료 |
|
| 181 |
- } |
|
| 182 |
- selectedFields.push(selectedField); |
|
| 183 |
- } |
|
| 184 |
- }); |
|
| 185 |
- |
|
| 186 |
- |
|
| 187 |
- // |
|
| 188 |
- updateTableFields($tableExcel); |
|
| 189 |
- |
|
| 190 |
- // 필드가 휴대폰이면 열 중복체크 |
|
| 191 |
- if($(this).val() == 'addrPhoneNo'){
|
|
| 192 |
- fn_phoneDupl($tableExcel); |
|
| 193 |
- } |
|
| 194 |
- fn_loadRemoveActive(); |
|
| 195 |
- |
|
| 196 |
- }, 0); // 지연 없이 즉시 실행되도록 0ms 지연을 설정 |
|
| 197 |
- |
|
| 198 |
- |
|
| 199 |
- }); |
|
| 200 |
- |
|
| 201 |
- |
|
| 202 |
- |
|
| 203 |
- // 받는사람 선택삭제 버튼 처리해주기 |
|
| 204 |
- $('#in_select_del').click(function(){
|
|
| 205 |
- |
|
| 206 |
- if($tableExcel == null || $tableExcel == ""){
|
|
| 207 |
- |
|
| 208 |
- alert("받는사람을 추가해 주세요.");
|
|
| 209 |
- return false; |
|
| 210 |
- |
|
| 211 |
- } |
|
| 212 |
- |
|
| 213 |
- var selectedData = $tableExcel.getSelectedRows(); |
|
| 214 |
- |
|
| 215 |
- if(selectedData == "" || selectedData == null){
|
|
| 216 |
- |
|
| 217 |
- alert("삭제할 연락처를 선택해주세요.");
|
|
| 218 |
- return false; |
|
| 219 |
- |
|
| 220 |
- }else{ // 선택한 Row 데이터 삭제하기
|
|
| 221 |
- |
|
| 222 |
- if(confirm("선택하신 받는 사람을 삭제하시겠습니까?")){
|
|
| 223 |
- |
|
| 224 |
- // 선택 데이터 삭제 |
|
| 225 |
- selectedData.forEach(row => row.delete()); |
|
| 226 |
- |
|
| 227 |
- |
|
| 228 |
- totRows = $tableExcel.getRows().length; |
|
| 229 |
- $("#excelRowTotCnt").text(totRows);
|
|
| 230 |
- |
|
| 231 |
- |
|
| 232 |
- } |
|
| 233 |
- |
|
| 234 |
- } |
|
| 235 |
- |
|
| 236 |
- }); |
|
| 237 |
- |
|
| 238 |
- // 추가버튼 |
|
| 239 |
- $('#btnAddrMassReg').click(function(){
|
|
| 240 |
- |
|
| 241 |
- if($tableExcel.getData().length < 1){
|
|
| 242 |
- alert("한 개 이상의 연락처를 입력하세요");
|
|
| 243 |
- return false; |
|
| 244 |
- } |
|
| 245 |
-// else if (selectedData.length > 20000) {
|
|
| 246 |
-// alert("2만줄 이상의 업로드는 데이터 부하로 업로드 할수 없습니다.");
|
|
| 247 |
-// return false; |
|
| 248 |
-// } |
|
| 249 |
- |
|
| 250 |
- |
|
| 251 |
- // tableExcel 그룹의 select 요소들을 확인 |
|
| 252 |
-// var isPhoneSelected = false; |
|
| 253 |
-// var isNameSelected = false; |
|
| 254 |
- var columns = $tableExcel.getColumns(); |
|
| 255 |
- var isAddrPhoneNoSelected = columns.some(column => column.getField() === 'addrPhoneNo'); |
|
| 256 |
- |
|
| 257 |
- if (!isAddrPhoneNoSelected) {
|
|
| 258 |
-// isPhoneSelected = true; |
|
| 259 |
- alert('휴대폰이 선택되지 않았습니다.');
|
|
| 260 |
- return false; |
|
| 261 |
- |
|
| 262 |
- } |
|
| 263 |
- |
|
| 264 |
- var addrData = $tableExcel.getData().map((row, index) => ({
|
|
| 265 |
- name: row.addrNm, |
|
| 266 |
- phone: removeDash(row.addrPhoneNo), |
|
| 267 |
- rep1: row.addrInfo1, |
|
| 268 |
- rep2: row.addrInfo2, |
|
| 269 |
- rep3: row.addrInfo3, |
|
| 270 |
- rep4: row.addrInfo4, |
|
| 271 |
- })); |
|
| 272 |
- |
|
| 273 |
- |
|
| 274 |
- |
|
| 275 |
- |
|
| 276 |
- |
|
| 277 |
- |
|
| 278 |
- // 기존 tableL의 데이터를 가져옵니다. |
|
| 279 |
- var existingData = tableL.getData(); |
|
| 280 |
- // 기존 데이터와 새로운 데이터를 합칩니다. |
|
| 281 |
- var combinedData = existingData.concat(addrData); |
|
| 282 |
- // 합쳐진 데이터를 tableL에 설정합니다. |
|
| 283 |
- tableL.setData(combinedData); |
|
| 284 |
- |
|
| 285 |
- // 미리보기 버튼 활성화 |
|
| 286 |
- updateButtons(0); |
|
| 287 |
- |
|
| 288 |
- var totRows = tableL.getRows().length; |
|
| 289 |
- updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
|
| 290 |
- console.log('totRows : ', totRows);
|
|
| 291 |
- var smsTxtArea = $('#smsTxtArea').val();
|
|
| 292 |
- if(smsTxtArea.indexOf("[*이름*]") > -1
|
|
| 293 |
- || smsTxtArea.indexOf("[*1*]") > -1
|
|
| 294 |
- || smsTxtArea.indexOf("[*2*]") > -1
|
|
| 295 |
- || smsTxtArea.indexOf("[*3*]") > -1
|
|
| 296 |
- || smsTxtArea.indexOf("[*4*]") > -1){
|
|
| 297 |
- |
|
| 298 |
- fnReplCell(); |
|
| 299 |
- |
|
| 300 |
- }else{
|
|
| 301 |
- |
|
| 302 |
- //결제 금액 구하기 |
|
| 303 |
- totalPriceSum(totRows); |
|
| 304 |
- |
|
| 305 |
- } |
|
| 306 |
- |
|
| 307 |
- setAddrMassClose(); |
|
| 308 |
- $('#closeBtn').click();
|
|
| 309 |
- }); |
|
| 310 |
- |
|
| 311 |
- |
|
| 312 |
- |
|
| 313 |
- //받는사람 전체삭제 버튼 처리 |
|
| 314 |
- $('#allDel').click(function(){
|
|
| 315 |
- var data = $tableExcel.getRows(); |
|
| 316 |
- $tableExcel.clearData(); |
|
| 317 |
- $("#excelRowTotCnt").text(0); //총건수 수정
|
|
| 318 |
- $("#excelRowDupCnt").text(0); //중복건수 수정
|
|
| 319 |
- dupliPhoneDataRealList.length = 0; // 중복 휴대폰번호 초기화 |
|
| 320 |
- |
|
| 321 |
- // select box 초기화 |
|
| 322 |
- $('.field-selector').each(function() { $(this).val(''); });
|
|
| 323 |
- |
|
| 324 |
- }); |
|
| 325 |
- |
|
| 326 |
- |
|
| 327 |
- |
|
| 328 |
-}); |
|
| 329 |
- |
|
| 330 |
- |
|
| 331 |
- |
|
| 332 |
-function excelFileChange(file) {
|
|
| 333 |
- if (file) {
|
|
| 334 |
- fn_loadAddActive(); |
|
| 335 |
- var reader = new FileReader(); |
|
| 336 |
- var extension = file.name.split('.').pop().toLowerCase();
|
|
| 337 |
- reader.onload = function(e) {
|
|
| 338 |
- setTimeout(() => { // 파일 읽기 완료 후 실행되도록 함
|
|
| 339 |
- if (extension === 'xlsx') {
|
|
| 340 |
- var data = new Uint8Array(e.target.result); |
|
| 341 |
- var workbook = XLSX.read(data, {type: 'array'});
|
|
| 342 |
- var firstSheet = workbook.Sheets[workbook.SheetNames[0]]; |
|
| 343 |
- var jsonData = XLSX.utils.sheet_to_json(firstSheet, {header: 1});
|
|
| 344 |
- processExcelData(jsonData); |
|
| 345 |
- } else if (extension === 'txt') {
|
|
| 346 |
- var textData = e.target.result; |
|
| 347 |
- processTextData(textData); |
|
| 348 |
- } else {
|
|
| 349 |
- alert('지원되지 않는 파일 형식입니다.');
|
|
| 350 |
- } |
|
| 351 |
- fn_loadRemoveActive(); |
|
| 352 |
- }, 0); // 지연 없이 즉시 실행되도록 0ms 지연을 설정 |
|
| 353 |
- }; |
|
| 354 |
- if (extension === 'xlsx') {
|
|
| 355 |
- reader.readAsArrayBuffer(file); |
|
| 356 |
- } else if (extension === 'txt') {
|
|
| 357 |
- reader.readAsText(file); |
|
| 358 |
- } |
|
| 359 |
- } |
|
| 360 |
-} |
|
| 361 |
- |
|
| 362 |
- |
|
| 363 |
-// 엑셀 데이터 처리 함수 |
|
| 364 |
-function processExcelData(data) {
|
|
| 365 |
- var keys = ['A', 'B', 'C', 'D', 'E', 'F', 'G']; |
|
| 366 |
- var tableData = []; |
|
| 367 |
- var totalRows = data.length - 2; // 전체 데이터 수 (1, 2행 제외) |
|
| 368 |
- |
|
| 369 |
- |
|
| 370 |
- // 3번째 행부터 입력 |
|
| 371 |
- data.slice(0).forEach((row, index) => {
|
|
| 372 |
- var rowData = {};
|
|
| 373 |
- keys.forEach((key, idx) => { // index 변수명 변경 (내부와 외부에서 사용되므로 충돌 방지)
|
|
| 374 |
-// console.log('row[idx] : ', row[idx]);
|
|
| 375 |
-// rowData[key] = row[idx] ? row[idx].trim() : ""; // 각 컬럼에 대해 기본값을 설정 |
|
| 376 |
- rowData[key] = (typeof row[idx] === 'string') ? row[idx].trim() : row[idx]; |
|
| 377 |
- }); |
|
| 378 |
- tableData.push(rowData); |
|
| 379 |
- |
|
| 380 |
- }); |
|
| 381 |
- |
|
| 382 |
- updateTable(tableData); |
|
| 383 |
-} |
|
| 384 |
- |
|
| 385 |
- |
|
| 386 |
-// 텍스트 데이터 처리 함수 |
|
| 387 |
-function processTextData(text) {
|
|
| 388 |
- var lines = text.split('\n'); // 각 줄을 배열로 분리
|
|
| 389 |
- var keys = ['A', 'B', 'C', 'D', 'E', 'F', 'G']; |
|
| 390 |
- var tableData = []; |
|
| 391 |
- |
|
| 392 |
- lines.forEach(line => {
|
|
| 393 |
- var rowData = {};
|
|
| 394 |
- var row = line.split(','); // 쉼표로 분리
|
|
| 395 |
- keys.forEach((key, index) => {
|
|
| 396 |
- rowData[key] = row[index] ? row[index].trim() : ""; // 각 컬럼에 대해 기본값을 설정 |
|
| 397 |
- }); |
|
| 398 |
- tableData.push(rowData); |
|
| 399 |
- }); |
|
| 400 |
- |
|
| 401 |
- updateTable(tableData); |
|
| 402 |
-} |
|
| 403 |
- |
|
| 404 |
-//공통 테이블 업데이트 함수 |
|
| 405 |
-function updateTable(tableData) {
|
|
| 406 |
- $tableExcel.setColumns([ //Define Table Columns |
|
| 407 |
- {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, headerHozAlign:"center", hozAlign:"center", headerSort:false, cellClick:function(e, cell){
|
|
| 408 |
- cell.getRow().toggleSelect(); |
|
| 409 |
- } |
|
| 410 |
- }, |
|
| 411 |
- {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:60},
|
|
| 412 |
- {title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 413 |
- {title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 414 |
- {title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 415 |
- {title:"D", field:"D", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 416 |
- {title:"E", field:"E", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 417 |
- {title:"F", field:"F", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}
|
|
| 418 |
- ]); |
|
| 419 |
- |
|
| 420 |
- $tableExcel.setData(tableData).then(() => {
|
|
| 421 |
- // excelRowTotCnt 업데이트 |
|
| 422 |
- document.getElementById("excelRowTotCnt").innerText = tableData.length;
|
|
| 423 |
- }); |
|
| 424 |
- |
|
| 425 |
- fn_loadRemoveActive(); |
|
| 426 |
-} |
|
| 427 |
- |
|
| 428 |
- |
|
| 429 |
- |
|
| 430 |
-/* |
|
| 431 |
-* 타이틀 select 선택할때마다 실행해서 |
|
| 432 |
-* 데이터테이블 필드값 수정 |
|
| 433 |
-*/ |
|
| 434 |
-function updateTableFields($objTabul) {
|
|
| 435 |
- var currentData = $objTabul.getData(); |
|
| 436 |
- var columns = [ |
|
| 437 |
- {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, hozAlign: "center", headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) {
|
|
| 438 |
- cell.getRow().toggleSelect(); |
|
| 439 |
- }} |
|
| 440 |
- ,{formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", width:60}
|
|
| 441 |
- ]; |
|
| 442 |
- |
|
| 443 |
- var fieldMapping = []; |
|
| 444 |
- $('.field-selector').each(function(index) {
|
|
| 445 |
- var selectedField = $(this).val(); |
|
| 446 |
- // ASCII 문자 코드 사용 - 65=A, 66=B ... |
|
| 447 |
- var field = String.fromCharCode(65 + index); |
|
| 448 |
- if (selectedField) {
|
|
| 449 |
- columns.push({
|
|
| 450 |
- title: field |
|
| 451 |
- , field: selectedField |
|
| 452 |
- , hozAlign: "center" |
|
| 453 |
- , headerHozAlign: "center" |
|
| 454 |
-// , editor: "input" |
|
| 455 |
- , editor: false |
|
| 456 |
- , width: 140 |
|
| 457 |
- , validator: ["maxLength:100", "string"] |
|
| 458 |
- }); |
|
| 459 |
- fieldMapping.push(selectedField); |
|
| 460 |
- } else {
|
|
| 461 |
- columns.push({
|
|
| 462 |
- title: field |
|
| 463 |
- , field: field |
|
| 464 |
- , hozAlign: "center" |
|
| 465 |
- , headerHozAlign: "center" |
|
| 466 |
- , editor: false |
|
| 467 |
-// , editor: "input" |
|
| 468 |
- , width: 140 |
|
| 469 |
- , validator: ["maxLength:100", "string"] |
|
| 470 |
- }); |
|
| 471 |
- fieldMapping.push(field); |
|
| 472 |
- } |
|
| 473 |
- }); |
|
| 474 |
- |
|
| 475 |
- var updatedData = currentData.map(row => {
|
|
| 476 |
- var newRow = {};
|
|
| 477 |
- fieldMapping.forEach((field, index) => {
|
|
| 478 |
- newRow[field] = row[Object.keys(row)[index]] || ""; |
|
| 479 |
- }); |
|
| 480 |
- return newRow; |
|
| 481 |
- }); |
|
| 482 |
- |
|
| 483 |
- $objTabul.setColumns(columns); |
|
| 484 |
- $objTabul.setData(updatedData); |
|
| 485 |
-} |
|
| 486 |
- |
|
| 487 |
- |
|
| 488 |
-/** |
|
| 489 |
- * @ 핸드폰 중복 데이터 |
|
| 490 |
- * */ |
|
| 491 |
-function fn_phoneDupl($objTabul) {
|
|
| 492 |
- |
|
| 493 |
- $tableError.clearData(); |
|
| 494 |
- |
|
| 495 |
- var data = $objTabul.getData(); |
|
| 496 |
- var phoneNumberChk = false; |
|
| 497 |
- var existingNumbers = new Set(); // 배열에서 Set으로 변경 |
|
| 498 |
- |
|
| 499 |
- let errorCount = 0; // 중복 번호 개수를 저장할 변수 |
|
| 500 |
- let duplicateCount = 0; // 중복 번호 개수를 저장할 변수 |
|
| 501 |
- |
|
| 502 |
- const errors = []; // 오류 데이터를 저장할 배열 |
|
| 503 |
- const duplicates = []; // 오류 데이터를 저장할 배열 |
|
| 504 |
- const newData = []; // 유효한 데이터만 저장할 새로운 배열 |
|
| 505 |
- |
|
| 506 |
- data.forEach((row, index) => {
|
|
| 507 |
- if (index % 10000 === 0) {
|
|
| 508 |
- console.log('i : ', index);
|
|
| 509 |
- } |
|
| 510 |
- |
|
| 511 |
- const number = row.addrPhoneNo; |
|
| 512 |
- const formattedNumber = formatPhoneNumber(number); // 번호 표준화 |
|
| 513 |
- const cleanedNumber = formattedNumber.replace(/[^0-9]/g, ''); // 숫자만 남김 |
|
| 514 |
- |
|
| 515 |
- if (!existingNumbers.has(cleanedNumber)) { // 중복 번호 체크
|
|
| 516 |
- if (isValidPhoneNumber(formattedNumber)) { // 유효성 검사
|
|
| 517 |
- row.addrPhoneNo = formattedNumber; |
|
| 518 |
- existingNumbers.add(cleanedNumber); // 추가된 번호를 기존 목록에 추가 |
|
| 519 |
- newData.push(row); // 유효한 데이터만 새로운 배열에 추가 |
|
| 520 |
- } else {
|
|
| 521 |
- // 오류: 유효성 통과 못함 |
|
| 522 |
- errorCount++; |
|
| 523 |
- $tableError.addRow({
|
|
| 524 |
- name: row.addrNm, // 이름 |
|
| 525 |
- phone: row.addrPhoneNo, // 폰번호 |
|
| 526 |
- result: "오류" // 결과 메시지 추가 |
|
| 527 |
- }); |
|
| 528 |
- errors.push({
|
|
| 529 |
- name: row.addrNm, // 이름 |
|
| 530 |
- phone: row.addrPhoneNo, // 폰번호 |
|
| 531 |
- result: "오류" // 결과 메시지 추가 |
|
| 532 |
- }); |
|
| 533 |
- } |
|
| 534 |
- } else {
|
|
| 535 |
- // 중복 |
|
| 536 |
- duplicateCount++; // 중복 번호가 발견될 때마다 카운트를 증가 |
|
| 537 |
- $tableError.addRow({
|
|
| 538 |
- name: row.addrNm, // 이름 |
|
| 539 |
- phone: row.addrPhoneNo, // 폰번호 |
|
| 540 |
- result: "중복" // 결과 메시지 추가 |
|
| 541 |
- }); |
|
| 542 |
- duplicates.push({
|
|
| 543 |
- name: row.addrNm, // 이름 |
|
| 544 |
- phone: row.addrPhoneNo, // 폰번호 |
|
| 545 |
- result: "중복" // 결과 메시지 추가 |
|
| 546 |
- }); |
|
| 547 |
- } |
|
| 548 |
- }); |
|
| 549 |
- |
|
| 550 |
- // data 배열을 newData 배열로 대체 |
|
| 551 |
- data = newData; |
|
| 552 |
- |
|
| 553 |
- |
|
| 554 |
- // 수정된 데이터로 테이블 업데이트 |
|
| 555 |
- $objTabul.setData(data); |
|
| 556 |
- // 오류 총 카운트 |
|
| 557 |
- $("#excelRowTotCnt").text($objTabul.getDataCount());
|
|
| 558 |
- // 중복 카운트 |
|
| 559 |
- $("#excelRowDupCnt").text(duplicateCount);
|
|
| 560 |
- // 에러 카운트 |
|
| 561 |
- $("#excelRowErrorCnt").text(errorCount);
|
|
| 562 |
- |
|
| 563 |
- // popup 영역 |
|
| 564 |
- // 중복 카운트 |
|
| 565 |
- $("#errorPopDupCnt").text(duplicateCount);
|
|
| 566 |
- // 에러 카운트 |
|
| 567 |
- $("#errorPopErrorCnt").text(errorCount);
|
|
| 568 |
- // |
|
| 569 |
- $("#errorPopTotCnt").text(duplicateCount+errorCount);
|
|
| 570 |
- |
|
| 571 |
- |
|
| 572 |
- var errorData = errors.concat(duplicates); |
|
| 573 |
- // 오류 및 중복 데이터를 한 번에 추가 |
|
| 574 |
- $tableError.setData(errorData); |
|
| 575 |
- |
|
| 576 |
- if(errorCount > 0){
|
|
| 577 |
- alert('휴대폰 형식에 맞지 않는 데이터는 삭제 후 업로드 됩니다.\nex) 발송불가 특수문자, 자릿수 오류 등');
|
|
| 578 |
- } |
|
| 579 |
- |
|
| 580 |
- |
|
| 581 |
- |
|
| 582 |
-} |
|
| 583 |
- |
|
| 584 |
-function fn_dupliPopupShow(){
|
|
| 585 |
- |
|
| 586 |
- $("#tableExcelDupliBtn").show();
|
|
| 587 |
-} |
|
| 588 |
- |
|
| 589 |
-function makeAddrMassDupliPop(dupliPhoneDataRealList) {
|
|
| 590 |
- var sHtml = ""; |
|
| 591 |
- sHtml += "<div class='' style='overflow-x:auto; height:350px;'>"; |
|
| 592 |
- sHtml += "<table class='tType4'>"; |
|
| 593 |
- sHtml += " <colgroup>"; |
|
| 594 |
- sHtml += " <col style='width:auto' />"; |
|
| 595 |
- sHtml += " </colgroup>"; |
|
| 596 |
- sHtml += " <thead>"; |
|
| 597 |
- sHtml += " <tr>"; |
|
| 598 |
- sHtml += " <th>중복 휴대폰번호 (" + numberWithCommas(dupliPhoneDataRealList.length) + "개)</th>";
|
|
| 599 |
- sHtml += " </tr>"; |
|
| 600 |
- sHtml += " </thead>"; |
|
| 601 |
- sHtml += " <tbody>"; |
|
| 602 |
- for (var i = 0; i < dupliPhoneDataRealList.length; i++) {
|
|
| 603 |
- sHtml += " <tr>"; |
|
| 604 |
- sHtml += " <td>" + dupliPhoneDataRealList[i] + "</td>"; |
|
| 605 |
- sHtml += " </tr>"; |
|
| 606 |
- } |
|
| 607 |
- sHtml += " </tbody>"; |
|
| 608 |
- sHtml += " </table>"; |
|
| 609 |
- sHtml += " </div>"; |
|
| 610 |
- |
|
| 611 |
- $("#addrMassDupli_layer").html(sHtml);
|
|
| 612 |
- fn_dupliPopupShow(); |
|
| 613 |
- |
|
| 614 |
-} |
|
| 615 |
- |
|
| 616 |
- |
|
| 617 |
-function fn_dupliPopupShow(){
|
|
| 618 |
- $('#tableExcelDupliBtn').show();
|
|
| 619 |
-} |
|
| 620 |
- |
|
| 621 |
-//한국의 핸드폰 번호 형식 검사 함수 |
|
| 622 |
-function isValidKoreanPhoneNumber(phone) {
|
|
| 623 |
- // 하이픈(-)을 제거하고 숫자만 남긴 후 검사 |
|
| 624 |
- var cleaned = phone.replace(/-/g, ''); |
|
| 625 |
- // 010, 011, 016, 017, 018, 019로 시작하고 10~11자리인 경우 유효 |
|
| 626 |
- var valid = /^(010|011|016|017|018|019)\d{7,8}$/.test(cleaned);
|
|
| 627 |
- return valid; |
|
| 628 |
-} |
|
| 629 |
- |
|
| 630 |
- |
|
| 631 |
- |
|
| 632 |
- |
|
| 633 |
-// 상단 설명 더보기 |
|
| 634 |
-function popMore(e){
|
|
| 635 |
- $(e).closest(".pop_more_cont").toggleClass("pop_more_click");
|
|
| 636 |
- |
|
| 637 |
- if($(e).closest(".pop_more_cont").is(".pop_more_click")){
|
|
| 638 |
- $(e).html('숨기기');
|
|
| 639 |
- $(e).append('<i></i>');
|
|
| 640 |
- }else {
|
|
| 641 |
- $(e).html('더보기');
|
|
| 642 |
- $(e).append('<i></i>');
|
|
| 643 |
- } |
|
| 644 |
-} |
|
| 645 |
- |
|
| 646 |
-</script> |
|
| 647 |
- |
|
| 648 |
-<!-- 중복전화번호 data-tooltip:addrMassDupli_layer --> |
|
| 649 |
-<div class="tooltip-wrap"> |
|
| 650 |
- <div class="popup-com addrMassDupli_layer" tabindex="0" data-tooltip-con="addrMassDupli_layer" data-focus="addrMassDupli_layer" data-focus-prev="addrMassDupli_layer-close" style="width: 270px; height: 500px;"> |
|
| 651 |
- <div class="popup_heading"> |
|
| 652 |
- <p>중복 휴대폰번호</p> |
|
| 653 |
- <button type="button" class="tooltip-close" data-focus="addrMassDupli_layer-close" onclick="setAddrDupliClose();"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 654 |
- </div> |
|
| 655 |
- <div class="layer_in" style="padding:20px 0px;" id="addrMassDupli_layer"> |
|
| 656 |
- </div> |
|
| 657 |
- |
|
| 658 |
- <div class="popup_btn_wrap2" style="margin-top: 0px;"> |
|
| 659 |
- <button type="button" class="tooltip-close" data-focus="addrMassDupli_layer-close" data-focus-next="addrMassDupli_layer">닫기</button> |
|
| 660 |
- </div> |
|
| 661 |
- |
|
| 662 |
- </div> |
|
| 663 |
-</div> |
|
| 664 |
- |
|
| 665 |
- |
|
| 666 |
-<!-- 주소록 상세 결과 팝업 data-tooltip:adr_popup14 --> |
|
| 667 |
- <div class="tooltip-wrap"> |
|
| 668 |
- <div class="popup-com adr_layer adr_popup14" tabindex="0" data-tooltip-con="adr_popup14" data-focus="adr_popup14" data-focus-prev="adr_popu14-close" style="width: 450px;"> |
|
| 669 |
- <div class="popup_heading"> |
|
| 670 |
- <p>주소록 상세 결과</p> |
|
| 671 |
- <button type="button" class="tooltip-close" data-focus="adr_popup14-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 672 |
- </div> |
|
| 673 |
- <div class="layer_in" style="padding:30px 20px;"> |
|
| 674 |
- <div class="table_top"> |
|
| 675 |
- <p> |
|
| 676 |
- 총 <span class="c_e40000" id="errorPopTotCnt">0</span>건 |
|
| 677 |
- / 중복 <span class="c_002c9a" id="errorPopDupCnt">0</span>건 |
|
| 678 |
- / 오류 <span class="c_002c9a" id="errorPopErrorCnt">0</span>건</p> |
|
| 679 |
- <button type="button" class="excel_btn btnType" id="errorExcelBtn"><i class="downroad"></i>엑셀 다운로드</button> |
|
| 680 |
- </div> |
|
| 681 |
- <div class="tb_wrap adr_list" id="tabulator_error"> |
|
| 682 |
- <!-- $tableError 참고 --> |
|
| 683 |
- </div> |
|
| 684 |
- <ul class="cf_text_ul"> |
|
| 685 |
- <li>*중복번호는 하나의 번호만 등록됩니다.</li> |
|
| 686 |
- <li>*휴대폰 형식에 맞지 않는 데이터는 삭제 후 업로드 됩니다.</li> |
|
| 687 |
- <li>ex) 발송불가 특수문자, 자릿수 오류 등</li> |
|
| 688 |
- </ul> |
|
| 689 |
- <div class="popup_btn_wrap2"> |
|
| 690 |
-<!-- <button type="button">저장</button> --> |
|
| 691 |
- <button type="button" class="tooltip-close" data-focus="adr_popup14-close" data-focus-next="adr_popup14">닫기</button> |
|
| 692 |
- </div> |
|
| 693 |
- </div> |
|
| 694 |
- </div> |
|
| 695 |
- </div> |
|
| 696 |
- |
|
| 697 |
-<!--// 중복전화번호 팝업 --> |
|
| 698 |
- <div class="popup_heading"> |
|
| 699 |
- <p>엑셀 불러오기</p> |
|
| 700 |
- <button type="button" class="tooltip-close" id="closeBtn" data-focus="popup02-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 701 |
- </div> |
|
| 702 |
- <div class="layer_in" style="padding: 25px 30px;"> |
|
| 703 |
-<!-- <div class="list_tab_wrap2"> --> |
|
| 704 |
- <!-- tab button --> |
|
| 705 |
-<!-- <ul class="list_tab" id="tbTabl"> --> |
|
| 706 |
-<!-- <li class="tab active" data-tabul="tableExcel"><button type="button" onclick="popupTab(this,'1'); fn_tabToggle('1');">엑셀입력</button></li> -->
|
|
| 707 |
-<!-- <li class="tab" data-tabul="tableClip"><button type="button" onclick="popupTab(this,'2'); fn_tabToggle('2');">붙여넣기</button></li> -->
|
|
| 708 |
-<!-- <li class="tab" data-tabul="tableSelf"><button type="button" onclick="popupTab(this,'3'); fn_tabToggle('3');">직접입력</button></li> -->
|
|
| 709 |
-<!-- </ul>// tab button --> |
|
| 710 |
-<!-- </div> --> |
|
| 711 |
- <!-- 엑셀입력 --> |
|
| 712 |
- <div class="popCont current pop_more_cont" id="popCont_1"> |
|
| 713 |
- <div class="titBox"> |
|
| 714 |
- <p>- 주소록은 한 번에 최대 30만건까지 등록(EXCEL파일, 최대용량 3MB) 가능합니다. </p> |
|
| 715 |
- <p>- 엑셀 파일에 비밀번호 설정, 제한된 보기, 수식 등이 설정되어 있는 경우 업로드가 불가합니다.</p> |
|
| 716 |
- <p>- 구분선(|), 역슬래시(\, ₩), 큰따옴표(") 등 발송불가 특수문자는 저장되지 않습니다.</p>
|
|
| 717 |
- <p>- 이름 200byte, [*1*]~[*4*] 200byte, 메모 250byte까지 입력 가능합니다.</p> |
|
| 718 |
- <p>- 주소록 등록이 어려우신 경우에는 <a href="<c:url value='/web/mjon/addragency/selectAddrAgencyList.do'/>" style="font-weight: bold; color: blue;">주소록 입력대행</a> 메뉴를 이용하실 수 있습니다. </p> |
|
| 719 |
- </div> |
|
| 720 |
- <div class="pop_more_wrap"> |
|
| 721 |
- <button type="button" class="pop_more" onclick="popMore(this);">더보기<i></i></button> |
|
| 722 |
- </div> |
|
| 723 |
- </div><!--// 엑셀입력 --> |
|
| 724 |
- |
|
| 725 |
- <!-- 공통 --> |
|
| 726 |
- <div> |
|
| 727 |
- <table class="layer_tType1"> |
|
| 728 |
- <caption>엑셀입력 표</caption> |
|
| 729 |
- <colgroup> |
|
| 730 |
- <col style="width: 95px"> |
|
| 731 |
- <col style="width: auto"> |
|
| 732 |
- </colgroup> |
|
| 733 |
- <tbody> |
|
| 734 |
- <tr> |
|
| 735 |
- <!-- <th>그룹 선택</th> |
|
| 736 |
- <td> |
|
| 737 |
- <label for="" class="label">그룹 선택</label> |
|
| 738 |
- <select id="addrGrpIdInfo" name="addrGrpIdInfo"> |
|
| 739 |
- </select> |
|
| 740 |
- <label for="" class="label">그룹명 입력</label> |
|
| 741 |
- <input type="text" id="addrGrpNm" name="addrGrpNm" placeholder="새 그룹명을 입력해주세요." onfocus="this.placeholder=''" onblur="this.placeholder='새 그룹명을 입력해주세요.'"class="inputLight" style="width: 300px;"> |
|
| 742 |
- <input type="file" id="excelFile" accept=".xls, .xlsx, .txt" style="display:none"/> |
|
| 743 |
- <button type="button" class="excel_btn2 btnType c3"><i class="uproad"></i>엑셀, TXT파일 업로드</button> |
|
| 744 |
- </td> --> |
|
| 745 |
- <td colspan="2" style="padding:20px 0;"> |
|
| 746 |
- <div class="file_upload_wrap" style="width:100%;display:flex;"> |
|
| 747 |
- <div class="file_add upload_area"> |
|
| 748 |
- <p><img src="/publish/images/content/file_add.png" alt="파일 붙여넣기">마우스로 엑셀, TXT파일을 여기에 끌어다 놓으세요</p> |
|
| 749 |
- </div> |
|
| 750 |
- <input type="file" id="excelFile" accept=".xls, .xlsx, .txt" style="display:none"/> |
|
| 751 |
- <button type="button" class="excel_btn2 btnType c3"><i class="uproad"></i>엑셀, TXT파일 업로드</button> |
|
| 752 |
- </div> |
|
| 753 |
- </td> |
|
| 754 |
- </tr> |
|
| 755 |
- </tbody> |
|
| 756 |
- </table> |
|
| 757 |
- </div> |
|
| 758 |
- |
|
| 759 |
- |
|
| 760 |
- <div class="excel_middle2"> |
|
| 761 |
- <p> |
|
| 762 |
- 총 <span class="c_e40000 fwBold" id="excelRowTotCnt">0</span>건 |
|
| 763 |
- / 중복 <span class="c_002c9a fwBold" id="excelRowDupCnt">0</span>건 |
|
| 764 |
- / 오류 <span class="c_002c9a fwBold" id="excelRowErrorCnt">0</span>건 |
|
| 765 |
- <button type="button" class="btn_list_detail" data-tooltip="adr_popup14"><img src="/publish/images/search.png"></button> |
|
| 766 |
- </p> |
|
| 767 |
-<!-- --> |
|
| 768 |
-<!-- <button type="button" class="btnType btnType6" data-tooltip="addrMassDupli_layer" id="tableExcelDupliBtn">중복번호</button> --> |
|
| 769 |
-<!-- --> |
|
| 770 |
-<!-- <button type="button" class="btnType btnType6" data-tooltip="addrMassSaveDupli_layer" onclick="GetAddrMassSaveDupli()" id="btnAddrMassSaveDupli">중복번호</button> --> |
|
| 771 |
- </p> |
|
| 772 |
-<!-- <button type="button" class="btnType btnType6 addCallToF">번호추가</button> --> |
|
| 773 |
- </div> |
|
| 774 |
- |
|
| 775 |
- |
|
| 776 |
- |
|
| 777 |
- |
|
| 778 |
- <div class="adr_excel" style="margin-top: 13px;"> |
|
| 779 |
- <!-- thead --> |
|
| 780 |
- <div class="adr_hd select_adr_hd" data-group="tableExcel"> |
|
| 781 |
- <div style="width: 100px;"></div> |
|
| 782 |
- <div style="width: 140px;"> |
|
| 783 |
- <label for="" class="label"></label> |
|
| 784 |
- <select class="field-selector"> |
|
| 785 |
- <option value="">선택하기</option> |
|
| 786 |
- <option value="addrNm">이름</option> |
|
| 787 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 788 |
- <option value="addrInfo1">[*1*]</option> |
|
| 789 |
- <option value="addrInfo2">[*2*]</option> |
|
| 790 |
- <option value="addrInfo3">[*3*]</option> |
|
| 791 |
- <option value="addrInfo4">[*4*]</option> |
|
| 792 |
-<!-- <option value="addrComment">메모</option> --> |
|
| 793 |
- </select> |
|
| 794 |
- </div> |
|
| 795 |
- <div style="width: 140px;"> |
|
| 796 |
- <label for="" class="label"></label> |
|
| 797 |
- <select class="field-selector"> |
|
| 798 |
- <option value="">선택하기</option> |
|
| 799 |
- <option value="addrNm">이름</option> |
|
| 800 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 801 |
- <option value="addrInfo1">[*1*]</option> |
|
| 802 |
- <option value="addrInfo2">[*2*]</option> |
|
| 803 |
- <option value="addrInfo3">[*3*]</option> |
|
| 804 |
- <option value="addrInfo4">[*4*]</option> |
|
| 805 |
-<!-- <option value="addrComment">메모</option> --> |
|
| 806 |
- </select> |
|
| 807 |
- </div> |
|
| 808 |
- <div style="width: 140px;"> |
|
| 809 |
- <label for="" class="label"></label> |
|
| 810 |
- <select class="field-selector"> |
|
| 811 |
- <option value="">선택하기</option> |
|
| 812 |
- <option value="addrNm">이름</option> |
|
| 813 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 814 |
- <option value="addrInfo1">[*1*]</option> |
|
| 815 |
- <option value="addrInfo2">[*2*]</option> |
|
| 816 |
- <option value="addrInfo3">[*3*]</option> |
|
| 817 |
- <option value="addrInfo4">[*4*]</option> |
|
| 818 |
-<!-- <option value="addrComment">메모</option> --> |
|
| 819 |
- </select> |
|
| 820 |
- </div> |
|
| 821 |
- <div style="width: 140px;"> |
|
| 822 |
- <label for="" class="label"></label> |
|
| 823 |
- <select class="field-selector"> |
|
| 824 |
- <option value="">선택하기</option> |
|
| 825 |
- <option value="addrNm">이름</option> |
|
| 826 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 827 |
- <option value="addrInfo1">[*1*]</option> |
|
| 828 |
- <option value="addrInfo2">[*2*]</option> |
|
| 829 |
- <option value="addrInfo3">[*3*]</option> |
|
| 830 |
- <option value="addrInfo4">[*4*]</option> |
|
| 831 |
-<!-- <option value="addrComment">메모</option> --> |
|
| 832 |
- </select> |
|
| 833 |
- </div> |
|
| 834 |
- <div style="width: 140px;"> |
|
| 835 |
- <label for="" class="label"></label> |
|
| 836 |
- <select class="field-selector"> |
|
| 837 |
- <option value="">선택하기</option> |
|
| 838 |
- <option value="addrNm">이름</option> |
|
| 839 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 840 |
- <option value="addrInfo1">[*1*]</option> |
|
| 841 |
- <option value="addrInfo2">[*2*]</option> |
|
| 842 |
- <option value="addrInfo3">[*3*]</option> |
|
| 843 |
- <option value="addrInfo4">[*4*]</option> |
|
| 844 |
-<!-- <option value="addrComment">메모</option> --> |
|
| 845 |
- </select> |
|
| 846 |
- </div> |
|
| 847 |
- <div style="width: 140px;"> |
|
| 848 |
- <label for="" class="label"></label> |
|
| 849 |
- <select class="field-selector"> |
|
| 850 |
- <option value="">선택하기</option> |
|
| 851 |
- <option value="addrNm">이름</option> |
|
| 852 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 853 |
- <option value="addrInfo1">[*1*]</option> |
|
| 854 |
- <option value="addrInfo2">[*2*]</option> |
|
| 855 |
- <option value="addrInfo3">[*3*]</option> |
|
| 856 |
- <option value="addrInfo4">[*4*]</option> |
|
| 857 |
-<!-- <option value="addrComment">메모</option> --> |
|
| 858 |
- </select> |
|
| 859 |
- </div> |
|
| 860 |
- <!-- <div style="width: 125px;"> |
|
| 861 |
- <label for="" class="label"></label> |
|
| 862 |
- <select class="field-selector"> |
|
| 863 |
- <option value="">선택하기</option> |
|
| 864 |
- <option value="addrNm">이름</option> |
|
| 865 |
- <option value="addrPhoneNo">휴대폰</option> |
|
| 866 |
- <option value="addrInfo1">[*1*]</option> |
|
| 867 |
- <option value="addrInfo2">[*2*]</option> |
|
| 868 |
- <option value="addrInfo3">[*3*]</option> |
|
| 869 |
- <option value="addrInfo4">[*4*]</option> |
|
| 870 |
- <option value="addrComment">메모</option> |
|
| 871 |
- </select> |
|
| 872 |
- </div> --> |
|
| 873 |
- </div> |
|
| 874 |
- </div> |
|
| 875 |
- |
|
| 876 |
- <div class="drag_drop_wrap callList_includ_box" id="tabulator_excel"> |
|
| 877 |
-<!-- <img src="/publish/images/content/excel.jpg" style="width: 100%;"> --> |
|
| 878 |
- </div> |
|
| 879 |
- <div class="excel_middle"> |
|
| 880 |
- <div class="select_btnWrap clearfix"> |
|
| 881 |
- <div> |
|
| 882 |
- <button type="button" id="allDel"><i class="remove_img"></i>전체삭제</button> |
|
| 883 |
- <button type="button" id="in_select_del"><i class="remove_img"></i>선택삭제</button> |
|
| 884 |
- </div> |
|
| 885 |
- |
|
| 886 |
- </div> |
|
| 887 |
- </div><!--// 공통 --> |
|
| 888 |
- |
|
| 889 |
- <!-- 붙여놓기 설명 --> |
|
| 890 |
-<!-- <div class="req_area"> --> |
|
| 891 |
-<!-- <div class="text_box"> --> |
|
| 892 |
-<!-- - 휴대폰 번호가 입력된 txt 파일을 열어 복사(Ctrl+c) + 붙여넣기(Ctrl+v)로도 입력하실 수 있습니다.<br> --> |
|
| 893 |
-<!-- - 휴대폰 번호는 필수입력 항목입니다.<br> --> |
|
| 894 |
-<!-- - 이름,휴대폰 번호,[*1*],[*2*],[*3*],[*4*],메모 순서대로 입력해주세요.(예 : 010-1234-5678,홍길동,변수1…메모)<br> --> |
|
| 895 |
-<!-- - 이름은 24byte, [*1*]~[*4*] 40byte, 메모는 250byte까지 입력 가능합니다.<br> --> |
|
| 896 |
-<!-- - '오류 검사'를 통해 등록된 데이터에 전화번호 입력 오류를 확인하실 수 있습니다. --> |
|
| 897 |
-<!-- </div> --> |
|
| 898 |
-<!-- </div> --> |
|
| 899 |
- <div class="popup_btn_wrap2" style="margin: 0 auto 30px auto;"> |
|
| 900 |
- <button type="button" id="btnAddrMassReg">추가</button> |
|
| 901 |
- <button type="button" id="btnAddrMassClose" class="tooltip-close" data-focus="adr_popup01-close" data-focus-next="popup02">닫기</button> |
|
| 902 |
- </div> |
|
| 903 |
- |
|
| 1 |
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
+<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 4 |
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> |
|
| 5 |
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
|
| 6 |
+ |
|
| 7 |
+<script type="text/javascript" src="<c:url value='/publish/js/content.js'/>"></script> |
|
| 8 |
+ |
|
| 9 |
+<script type="text/javascript"> |
|
| 10 |
+ |
|
| 11 |
+var $tableExcel = null; //엑셀입력 탭 |
|
| 12 |
+var $tableError = null; //엑셀입력 탭 |
|
| 13 |
+$(document).ready(function(){
|
|
| 14 |
+ |
|
| 15 |
+ //Tabulator AJAX Data Loading |
|
| 16 |
+ $tableError = new Tabulator("#tabulator_error", {
|
|
| 17 |
+ height:"255px", |
|
| 18 |
+ width:"100%", |
|
| 19 |
+ layout:"fitColumns", |
|
| 20 |
+ autoColumns:false, |
|
| 21 |
+ headerHozAlign:"center", |
|
| 22 |
+ validationMode:"highlight", |
|
| 23 |
+ clipboard:false, |
|
| 24 |
+ clipboardCopySelector:"table", |
|
| 25 |
+ clipboardPasteAction:"insert", // insert, update, replace |
|
| 26 |
+ placeholder:"등록 팝업에서 휴대폰을 선택 후 확인해주세요.", //fit columns to width of table (optional) |
|
| 27 |
+ columns:[ //Define Table Columns |
|
| 28 |
+ {title:"이름", field:"name", hozAlign:"center", headerHozAlign: "center", width:125},
|
|
| 29 |
+ {title:"휴대폰", field:"phone", hozAlign:"center", headerHozAlign: "center", width:158},
|
|
| 30 |
+ {title:"미등록 결과", field:"result", hozAlign:"center", headerHozAlign: "center", width:125}
|
|
| 31 |
+ ] |
|
| 32 |
+ }); |
|
| 33 |
+ |
|
| 34 |
+ |
|
| 35 |
+ //Tabulator AJAX Data Loading |
|
| 36 |
+ $tableExcel = new Tabulator("#tabulator_excel", {
|
|
| 37 |
+ height:"255px", |
|
| 38 |
+ width:"100%", |
|
| 39 |
+ layout:"fitColumns", |
|
| 40 |
+ autoColumns:false, |
|
| 41 |
+ headerHozAlign:"center", |
|
| 42 |
+ validationMode:"highlight", |
|
| 43 |
+ clipboard:false, |
|
| 44 |
+ clipboardCopySelector:"table", |
|
| 45 |
+ clipboardPasteAction:"insert", // insert, update, replace |
|
| 46 |
+ placeholder:"Excel 파일을 업로드 해주세요.", //fit columns to width of table (optional) |
|
| 47 |
+ columns:[ //Define Table Columns |
|
| 48 |
+ {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, headerHozAlign:"center", hozAlign:"center", headerSort:false, cellClick:function(e, cell){
|
|
| 49 |
+ cell.getRow().toggleSelect(); |
|
| 50 |
+ } |
|
| 51 |
+ }, |
|
| 52 |
+ {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:60},
|
|
| 53 |
+ {title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 54 |
+ {title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 55 |
+ {title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 56 |
+ {title:"D", field:"D", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 57 |
+ {title:"E", field:"E", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 58 |
+ {title:"F", field:"F", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}
|
|
| 59 |
+ ], |
|
| 60 |
+ validationFailed:function(cell, value, parameters){ // 유효성 체크 함수
|
|
| 61 |
+ var valid = cell.isValid(); |
|
| 62 |
+ if(!valid){
|
|
| 63 |
+ alert("양식에 맞지 않는 정보가 입력되었습니다.");
|
|
| 64 |
+ |
|
| 65 |
+ //해당 셀 데이터 삭제 |
|
| 66 |
+ cell.setValue("");
|
|
| 67 |
+ } |
|
| 68 |
+ return value % parameters.phone; |
|
| 69 |
+ }, |
|
| 70 |
+ }); |
|
| 71 |
+ |
|
| 72 |
+ $("#excelFile").on("change", function(event) {
|
|
| 73 |
+ var fileInfo = event.target.files; |
|
| 74 |
+ if(fileInfo.length > 0){
|
|
| 75 |
+ excelFileChange(fileInfo[0]); |
|
| 76 |
+ } else {
|
|
| 77 |
+ fn_loadRemoveActive(); // 파일이 선택되지 않은 경우 로딩 상태 제거 |
|
| 78 |
+ setTimeout(() => { $(this).val(''); }, 0); // 파일 선택 초기화
|
|
| 79 |
+ } |
|
| 80 |
+ }); |
|
| 81 |
+ |
|
| 82 |
+ |
|
| 83 |
+ |
|
| 84 |
+ $(document).on('click', '#btnAddrMassClose', function() {
|
|
| 85 |
+ // 대량등록 닫기 |
|
| 86 |
+ setAddrMassClose(); |
|
| 87 |
+ }); |
|
| 88 |
+ |
|
| 89 |
+ |
|
| 90 |
+ $(document).on('click', '#closeBtn', function() {
|
|
| 91 |
+ // 대량등록 닫기 |
|
| 92 |
+ setAddrMassClose(); |
|
| 93 |
+ }); |
|
| 94 |
+ |
|
| 95 |
+ |
|
| 96 |
+ // 엑셀등록 닫기 |
|
| 97 |
+ function setAddrMassClose() {
|
|
| 98 |
+ $tableExcel.clearData(); |
|
| 99 |
+ $("#excelRowTotCnt").text(0); //총건수 수정
|
|
| 100 |
+ $("#excelRowDupCnt").text(0); //중복건수 수정
|
|
| 101 |
+ $("#excelRowErrorCnt").text(0); //중복건수 수정
|
|
| 102 |
+ dupliPhoneDataRealList.length = 0; // 중복 휴대폰번호 초기화 |
|
| 103 |
+ addrMassDupliSaveList = null; |
|
| 104 |
+ |
|
| 105 |
+ |
|
| 106 |
+ // popup 영역 |
|
| 107 |
+ $tableError.clearData(); |
|
| 108 |
+ // 중복 카운트 |
|
| 109 |
+ $("#errorPopDupCnt").text(0);
|
|
| 110 |
+ // 에러 카운트 |
|
| 111 |
+ $("#errorPopErrorCnt").text(0);
|
|
| 112 |
+ // |
|
| 113 |
+ $("#errorPopTotCnt").text(0);
|
|
| 114 |
+ |
|
| 115 |
+ |
|
| 116 |
+ } |
|
| 117 |
+ |
|
| 118 |
+ //############################################################################################# |
|
| 119 |
+ //파일업로드 드래그앤 드롭 |
|
| 120 |
+ //############################################################################################# |
|
| 121 |
+ var objDragAndDrop = $(".upload_area");
|
|
| 122 |
+ $(document).on("dragenter",".upload_area",function(e){
|
|
| 123 |
+ e.stopPropagation(); |
|
| 124 |
+ e.preventDefault(); |
|
| 125 |
+ //$(this).css('border', '2px solid #0B85A1');
|
|
| 126 |
+ }); |
|
| 127 |
+ $(document).on("dragover",".upload_area",function(e){
|
|
| 128 |
+ e.stopPropagation(); |
|
| 129 |
+ e.preventDefault(); |
|
| 130 |
+ }); |
|
| 131 |
+ $(document).on("drop",".upload_area",function(e){
|
|
| 132 |
+ fn_loadAddActive(); |
|
| 133 |
+ e.preventDefault(); |
|
| 134 |
+ var files = e.originalEvent.dataTransfer.files; |
|
| 135 |
+ excelFileChange(files[0]); |
|
| 136 |
+ }); |
|
| 137 |
+ |
|
| 138 |
+ $(document).on('dragenter', function (e){
|
|
| 139 |
+ e.stopPropagation(); |
|
| 140 |
+ e.preventDefault(); |
|
| 141 |
+ }); |
|
| 142 |
+ $(document).on('dragover', function (e){
|
|
| 143 |
+ e.stopPropagation(); |
|
| 144 |
+ e.preventDefault(); |
|
| 145 |
+ //objDragAndDrop.css('border', '2px dotted #0B85A1');
|
|
| 146 |
+ }); |
|
| 147 |
+ $(document).on('drop', function (e){
|
|
| 148 |
+ e.stopPropagation(); |
|
| 149 |
+ e.preventDefault(); |
|
| 150 |
+ }); |
|
| 151 |
+ //파일 드래그앤드롭 종료 |
|
| 152 |
+ |
|
| 153 |
+ |
|
| 154 |
+ |
|
| 155 |
+ |
|
| 156 |
+ |
|
| 157 |
+ //타이틀 select 선택 이벤트 |
|
| 158 |
+ $('.field-selector').on('change', function() {
|
|
| 159 |
+ fn_loadAddActive(); |
|
| 160 |
+ |
|
| 161 |
+ setTimeout(() => {
|
|
| 162 |
+ var selectedFields = []; |
|
| 163 |
+ var isDuplicate = false; |
|
| 164 |
+ |
|
| 165 |
+ if($tableExcel.getData().length < 1){
|
|
| 166 |
+ alert('데이터 입력 후 선택해 주세요.');
|
|
| 167 |
+ $(this).val("");
|
|
| 168 |
+ fn_loadRemoveActive(); |
|
| 169 |
+ return false; |
|
| 170 |
+ } |
|
| 171 |
+ |
|
| 172 |
+ // 중복체크 |
|
| 173 |
+ $('.field-selector').each(function() {
|
|
| 174 |
+ var selectedField = $(this).val(); |
|
| 175 |
+ if (selectedField) {
|
|
| 176 |
+ if (selectedFields.includes(selectedField)) {
|
|
| 177 |
+ alert("중복된 필드를 선택할 수 없습니다.");
|
|
| 178 |
+ $(this).val(""); // 중복 필드를 선택한 경우 빈 값으로 초기화
|
|
| 179 |
+ isDuplicate = true; |
|
| 180 |
+ return false; // 반복문 종료 |
|
| 181 |
+ } |
|
| 182 |
+ selectedFields.push(selectedField); |
|
| 183 |
+ } |
|
| 184 |
+ }); |
|
| 185 |
+ |
|
| 186 |
+ |
|
| 187 |
+ // |
|
| 188 |
+ updateTableFields($tableExcel); |
|
| 189 |
+ |
|
| 190 |
+ // 필드가 휴대폰이면 열 중복체크 |
|
| 191 |
+ if($(this).val() == 'addrPhoneNo'){
|
|
| 192 |
+ fn_phoneDupl($tableExcel); |
|
| 193 |
+ } |
|
| 194 |
+ fn_loadRemoveActive(); |
|
| 195 |
+ |
|
| 196 |
+ }, 0); // 지연 없이 즉시 실행되도록 0ms 지연을 설정 |
|
| 197 |
+ |
|
| 198 |
+ |
|
| 199 |
+ }); |
|
| 200 |
+ |
|
| 201 |
+ |
|
| 202 |
+ |
|
| 203 |
+ // 받는사람 선택삭제 버튼 처리해주기 |
|
| 204 |
+ $('#in_select_del').click(function(){
|
|
| 205 |
+ |
|
| 206 |
+ if($tableExcel == null || $tableExcel == ""){
|
|
| 207 |
+ |
|
| 208 |
+ alert("받는사람을 추가해 주세요.");
|
|
| 209 |
+ return false; |
|
| 210 |
+ |
|
| 211 |
+ } |
|
| 212 |
+ |
|
| 213 |
+ var selectedData = $tableExcel.getSelectedRows(); |
|
| 214 |
+ |
|
| 215 |
+ if(selectedData == "" || selectedData == null){
|
|
| 216 |
+ |
|
| 217 |
+ alert("삭제할 연락처를 선택해주세요.");
|
|
| 218 |
+ return false; |
|
| 219 |
+ |
|
| 220 |
+ }else{ // 선택한 Row 데이터 삭제하기
|
|
| 221 |
+ |
|
| 222 |
+ if(confirm("선택하신 받는 사람을 삭제하시겠습니까?")){
|
|
| 223 |
+ |
|
| 224 |
+ // 선택 데이터 삭제 |
|
| 225 |
+ selectedData.forEach(row => row.delete()); |
|
| 226 |
+ |
|
| 227 |
+ |
|
| 228 |
+ totRows = $tableExcel.getRows().length; |
|
| 229 |
+ $("#excelRowTotCnt").text(totRows);
|
|
| 230 |
+ |
|
| 231 |
+ |
|
| 232 |
+ } |
|
| 233 |
+ |
|
| 234 |
+ } |
|
| 235 |
+ |
|
| 236 |
+ }); |
|
| 237 |
+ |
|
| 238 |
+ // 추가버튼 |
|
| 239 |
+ $('#btnAddrMassReg').click(function(){
|
|
| 240 |
+ |
|
| 241 |
+ if($tableExcel.getData().length < 1){
|
|
| 242 |
+ alert("한 개 이상의 연락처를 입력하세요");
|
|
| 243 |
+ return false; |
|
| 244 |
+ } |
|
| 245 |
+// else if (selectedData.length > 20000) {
|
|
| 246 |
+// alert("2만줄 이상의 업로드는 데이터 부하로 업로드 할수 없습니다.");
|
|
| 247 |
+// return false; |
|
| 248 |
+// } |
|
| 249 |
+ |
|
| 250 |
+ |
|
| 251 |
+ // tableExcel 그룹의 select 요소들을 확인 |
|
| 252 |
+// var isPhoneSelected = false; |
|
| 253 |
+// var isNameSelected = false; |
|
| 254 |
+ var columns = $tableExcel.getColumns(); |
|
| 255 |
+ var isAddrPhoneNoSelected = columns.some(column => column.getField() === 'addrPhoneNo'); |
|
| 256 |
+ |
|
| 257 |
+ if (!isAddrPhoneNoSelected) {
|
|
| 258 |
+// isPhoneSelected = true; |
|
| 259 |
+ alert('휴대폰이 선택되지 않았습니다.');
|
|
| 260 |
+ return false; |
|
| 261 |
+ |
|
| 262 |
+ } |
|
| 263 |
+ |
|
| 264 |
+ var addrData = $tableExcel.getData().map((row, index) => ({
|
|
| 265 |
+ name: row.addrNm, |
|
| 266 |
+ phone: removeDash(row.addrPhoneNo), |
|
| 267 |
+ rep1: row.addrInfo1, |
|
| 268 |
+ rep2: row.addrInfo2, |
|
| 269 |
+ rep3: row.addrInfo3, |
|
| 270 |
+ rep4: row.addrInfo4, |
|
| 271 |
+ })); |
|
| 272 |
+ |
|
| 273 |
+ |
|
| 274 |
+ |
|
| 275 |
+ |
|
| 276 |
+ |
|
| 277 |
+ |
|
| 278 |
+ // 기존 tableL의 데이터를 가져옵니다. |
|
| 279 |
+ var existingData = tableL.getData(); |
|
| 280 |
+ // 기존 데이터와 새로운 데이터를 합칩니다. |
|
| 281 |
+ var combinedData = existingData.concat(addrData); |
|
| 282 |
+ // 합쳐진 데이터를 tableL에 설정합니다. |
|
| 283 |
+ tableL.setData(combinedData); |
|
| 284 |
+ |
|
| 285 |
+ // 미리보기 버튼 활성화 |
|
| 286 |
+ updateButtons(0); |
|
| 287 |
+ |
|
| 288 |
+ var totRows = tableL.getRows().length; |
|
| 289 |
+ updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
|
| 290 |
+ console.log('totRows : ', totRows);
|
|
| 291 |
+ var smsTxtArea = $('#smsTxtArea').val();
|
|
| 292 |
+ if(smsTxtArea.indexOf("[*이름*]") > -1
|
|
| 293 |
+ || smsTxtArea.indexOf("[*1*]") > -1
|
|
| 294 |
+ || smsTxtArea.indexOf("[*2*]") > -1
|
|
| 295 |
+ || smsTxtArea.indexOf("[*3*]") > -1
|
|
| 296 |
+ || smsTxtArea.indexOf("[*4*]") > -1){
|
|
| 297 |
+ |
|
| 298 |
+ fnReplCell(); |
|
| 299 |
+ |
|
| 300 |
+ }else{
|
|
| 301 |
+ |
|
| 302 |
+ //결제 금액 구하기 |
|
| 303 |
+ totalPriceSum(totRows); |
|
| 304 |
+ |
|
| 305 |
+ } |
|
| 306 |
+ |
|
| 307 |
+ setAddrMassClose(); |
|
| 308 |
+ $('#closeBtn').click();
|
|
| 309 |
+ }); |
|
| 310 |
+ |
|
| 311 |
+ |
|
| 312 |
+ |
|
| 313 |
+ //받는사람 전체삭제 버튼 처리 |
|
| 314 |
+ $('#allDel').click(function(){
|
|
| 315 |
+ var data = $tableExcel.getRows(); |
|
| 316 |
+ $tableExcel.clearData(); |
|
| 317 |
+ $("#excelRowTotCnt").text(0); //총건수 수정
|
|
| 318 |
+ $("#excelRowDupCnt").text(0); //중복건수 수정
|
|
| 319 |
+ dupliPhoneDataRealList.length = 0; // 중복 휴대폰번호 초기화 |
|
| 320 |
+ |
|
| 321 |
+ // select box 초기화 |
|
| 322 |
+ $('.field-selector').each(function() { $(this).val(''); });
|
|
| 323 |
+ |
|
| 324 |
+ }); |
|
| 325 |
+ |
|
| 326 |
+ |
|
| 327 |
+ |
|
| 328 |
+}); |
|
| 329 |
+ |
|
| 330 |
+ |
|
| 331 |
+ |
|
| 332 |
+function excelFileChange(file) {
|
|
| 333 |
+ if (file) {
|
|
| 334 |
+ fn_loadAddActive(); |
|
| 335 |
+ var reader = new FileReader(); |
|
| 336 |
+ var extension = file.name.split('.').pop().toLowerCase();
|
|
| 337 |
+ reader.onload = function(e) {
|
|
| 338 |
+ setTimeout(() => { // 파일 읽기 완료 후 실행되도록 함
|
|
| 339 |
+ if (extension === 'xlsx') {
|
|
| 340 |
+ var data = new Uint8Array(e.target.result); |
|
| 341 |
+ var workbook = XLSX.read(data, {type: 'array'});
|
|
| 342 |
+ var firstSheet = workbook.Sheets[workbook.SheetNames[0]]; |
|
| 343 |
+ var jsonData = XLSX.utils.sheet_to_json(firstSheet, {header: 1});
|
|
| 344 |
+ processExcelData(jsonData); |
|
| 345 |
+ } else if (extension === 'txt') {
|
|
| 346 |
+ var textData = e.target.result; |
|
| 347 |
+ processTextData(textData); |
|
| 348 |
+ } else {
|
|
| 349 |
+ alert('지원되지 않는 파일 형식입니다.');
|
|
| 350 |
+ } |
|
| 351 |
+ fn_loadRemoveActive(); |
|
| 352 |
+ }, 0); // 지연 없이 즉시 실행되도록 0ms 지연을 설정 |
|
| 353 |
+ }; |
|
| 354 |
+ if (extension === 'xlsx') {
|
|
| 355 |
+ reader.readAsArrayBuffer(file); |
|
| 356 |
+ } else if (extension === 'txt') {
|
|
| 357 |
+ reader.readAsText(file); |
|
| 358 |
+ } |
|
| 359 |
+ } |
|
| 360 |
+} |
|
| 361 |
+ |
|
| 362 |
+ |
|
| 363 |
+// 엑셀 데이터 처리 함수 |
|
| 364 |
+function processExcelData(data) {
|
|
| 365 |
+ var keys = ['A', 'B', 'C', 'D', 'E', 'F', 'G']; |
|
| 366 |
+ var tableData = []; |
|
| 367 |
+ var totalRows = data.length - 2; // 전체 데이터 수 (1, 2행 제외) |
|
| 368 |
+ |
|
| 369 |
+ |
|
| 370 |
+ // 3번째 행부터 입력 |
|
| 371 |
+ data.slice(0).forEach((row, index) => {
|
|
| 372 |
+ var rowData = {};
|
|
| 373 |
+ keys.forEach((key, idx) => { // index 변수명 변경 (내부와 외부에서 사용되므로 충돌 방지)
|
|
| 374 |
+// console.log('row[idx] : ', row[idx]);
|
|
| 375 |
+// rowData[key] = row[idx] ? row[idx].trim() : ""; // 각 컬럼에 대해 기본값을 설정 |
|
| 376 |
+ rowData[key] = (typeof row[idx] === 'string') ? row[idx].trim() : row[idx]; |
|
| 377 |
+ }); |
|
| 378 |
+ tableData.push(rowData); |
|
| 379 |
+ |
|
| 380 |
+ }); |
|
| 381 |
+ |
|
| 382 |
+ updateTable(tableData); |
|
| 383 |
+} |
|
| 384 |
+ |
|
| 385 |
+ |
|
| 386 |
+// 텍스트 데이터 처리 함수 |
|
| 387 |
+function processTextData(text) {
|
|
| 388 |
+ var lines = text.split('\n'); // 각 줄을 배열로 분리
|
|
| 389 |
+ var keys = ['A', 'B', 'C', 'D', 'E', 'F', 'G']; |
|
| 390 |
+ var tableData = []; |
|
| 391 |
+ |
|
| 392 |
+ lines.forEach(line => {
|
|
| 393 |
+ var rowData = {};
|
|
| 394 |
+ var row = line.split(','); // 쉼표로 분리
|
|
| 395 |
+ keys.forEach((key, index) => {
|
|
| 396 |
+ rowData[key] = row[index] ? row[index].trim() : ""; // 각 컬럼에 대해 기본값을 설정 |
|
| 397 |
+ }); |
|
| 398 |
+ tableData.push(rowData); |
|
| 399 |
+ }); |
|
| 400 |
+ |
|
| 401 |
+ updateTable(tableData); |
|
| 402 |
+} |
|
| 403 |
+ |
|
| 404 |
+//공통 테이블 업데이트 함수 |
|
| 405 |
+function updateTable(tableData) {
|
|
| 406 |
+ $tableExcel.setColumns([ //Define Table Columns |
|
| 407 |
+ {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, headerHozAlign:"center", hozAlign:"center", headerSort:false, cellClick:function(e, cell){
|
|
| 408 |
+ cell.getRow().toggleSelect(); |
|
| 409 |
+ } |
|
| 410 |
+ }, |
|
| 411 |
+ {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:60},
|
|
| 412 |
+ {title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 413 |
+ {title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 414 |
+ {title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 415 |
+ {title:"D", field:"D", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 416 |
+ {title:"E", field:"E", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]},
|
|
| 417 |
+ {title:"F", field:"F", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}
|
|
| 418 |
+ ]); |
|
| 419 |
+ |
|
| 420 |
+ $tableExcel.setData(tableData).then(() => {
|
|
| 421 |
+ // excelRowTotCnt 업데이트 |
|
| 422 |
+ document.getElementById("excelRowTotCnt").innerText = tableData.length;
|
|
| 423 |
+ }); |
|
| 424 |
+ |
|
| 425 |
+ fn_loadRemoveActive(); |
|
| 426 |
+} |
|
| 427 |
+ |
|
| 428 |
+ |
|
| 429 |
+ |
|
| 430 |
+/* |
|
| 431 |
+* 타이틀 select 선택할때마다 실행해서 |
|
| 432 |
+* 데이터테이블 필드값 수정 |
|
| 433 |
+*/ |
|
| 434 |
+function updateTableFields($objTabul) {
|
|
| 435 |
+ var currentData = $objTabul.getData(); |
|
| 436 |
+ var columns = [ |
|
| 437 |
+ {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, hozAlign: "center", headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) {
|
|
| 438 |
+ cell.getRow().toggleSelect(); |
|
| 439 |
+ }} |
|
| 440 |
+ ,{formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", width:60}
|
|
| 441 |
+ ]; |
|
| 442 |
+ |
|
| 443 |
+ var fieldMapping = []; |
|
| 444 |
+ $('.field-selector').each(function(index) {
|
|
| 445 |
+ var selectedField = $(this).val(); |
|
| 446 |
+ // ASCII 문자 코드 사용 - 65=A, 66=B ... |
|
| 447 |
+ var field = String.fromCharCode(65 + index); |
|
| 448 |
+ if (selectedField) {
|
|
| 449 |
+ columns.push({
|
|
| 450 |
+ title: field |
|
| 451 |
+ , field: selectedField |
|
| 452 |
+ , hozAlign: "center" |
|
| 453 |
+ , headerHozAlign: "center" |
|
| 454 |
+// , editor: "input" |
|
| 455 |
+ , editor: false |
|
| 456 |
+ , width: 140 |
|
| 457 |
+ , validator: ["maxLength:100", "string"] |
|
| 458 |
+ }); |
|
| 459 |
+ fieldMapping.push(selectedField); |
|
| 460 |
+ } else {
|
|
| 461 |
+ columns.push({
|
|
| 462 |
+ title: field |
|
| 463 |
+ , field: field |
|
| 464 |
+ , hozAlign: "center" |
|
| 465 |
+ , headerHozAlign: "center" |
|
| 466 |
+ , editor: false |
|
| 467 |
+// , editor: "input" |
|
| 468 |
+ , width: 140 |
|
| 469 |
+ , validator: ["maxLength:100", "string"] |
|
| 470 |
+ }); |
|
| 471 |
+ fieldMapping.push(field); |
|
| 472 |
+ } |
|
| 473 |
+ }); |
|
| 474 |
+ |
|
| 475 |
+ var updatedData = currentData.map(row => {
|
|
| 476 |
+ var newRow = {};
|
|
| 477 |
+ fieldMapping.forEach((field, index) => {
|
|
| 478 |
+ newRow[field] = row[Object.keys(row)[index]] || ""; |
|
| 479 |
+ }); |
|
| 480 |
+ return newRow; |
|
| 481 |
+ }); |
|
| 482 |
+ |
|
| 483 |
+ $objTabul.setColumns(columns); |
|
| 484 |
+ $objTabul.setData(updatedData); |
|
| 485 |
+} |
|
| 486 |
+ |
|
| 487 |
+ |
|
| 488 |
+/** |
|
| 489 |
+ * @ 핸드폰 중복 데이터 |
|
| 490 |
+ * */ |
|
| 491 |
+function fn_phoneDupl($objTabul) {
|
|
| 492 |
+ |
|
| 493 |
+ $tableError.clearData(); |
|
| 494 |
+ |
|
| 495 |
+ var data = $objTabul.getData(); |
|
| 496 |
+ var phoneNumberChk = false; |
|
| 497 |
+ var existingNumbers = new Set(); // 배열에서 Set으로 변경 |
|
| 498 |
+ |
|
| 499 |
+ let errorCount = 0; // 중복 번호 개수를 저장할 변수 |
|
| 500 |
+ let duplicateCount = 0; // 중복 번호 개수를 저장할 변수 |
|
| 501 |
+ |
|
| 502 |
+ const errors = []; // 오류 데이터를 저장할 배열 |
|
| 503 |
+ const duplicates = []; // 오류 데이터를 저장할 배열 |
|
| 504 |
+ const newData = []; // 유효한 데이터만 저장할 새로운 배열 |
|
| 505 |
+ |
|
| 506 |
+ data.forEach((row, index) => {
|
|
| 507 |
+ if (index % 10000 === 0) {
|
|
| 508 |
+ console.log('i : ', index);
|
|
| 509 |
+ } |
|
| 510 |
+ |
|
| 511 |
+ const number = row.addrPhoneNo; |
|
| 512 |
+ const formattedNumber = formatPhoneNumber(number); // 번호 표준화 |
|
| 513 |
+ const cleanedNumber = formattedNumber.replace(/[^0-9]/g, ''); // 숫자만 남김 |
|
| 514 |
+ |
|
| 515 |
+ if (!existingNumbers.has(cleanedNumber)) { // 중복 번호 체크
|
|
| 516 |
+ if (isValidPhoneNumber(formattedNumber)) { // 유효성 검사
|
|
| 517 |
+ row.addrPhoneNo = formattedNumber; |
|
| 518 |
+ existingNumbers.add(cleanedNumber); // 추가된 번호를 기존 목록에 추가 |
|
| 519 |
+ newData.push(row); // 유효한 데이터만 새로운 배열에 추가 |
|
| 520 |
+ } else {
|
|
| 521 |
+ // 오류: 유효성 통과 못함 |
|
| 522 |
+ errorCount++; |
|
| 523 |
+ $tableError.addRow({
|
|
| 524 |
+ name: row.addrNm, // 이름 |
|
| 525 |
+ phone: row.addrPhoneNo, // 폰번호 |
|
| 526 |
+ result: "오류" // 결과 메시지 추가 |
|
| 527 |
+ }); |
|
| 528 |
+ errors.push({
|
|
| 529 |
+ name: row.addrNm, // 이름 |
|
| 530 |
+ phone: row.addrPhoneNo, // 폰번호 |
|
| 531 |
+ result: "오류" // 결과 메시지 추가 |
|
| 532 |
+ }); |
|
| 533 |
+ } |
|
| 534 |
+ } else {
|
|
| 535 |
+ // 중복 |
|
| 536 |
+ duplicateCount++; // 중복 번호가 발견될 때마다 카운트를 증가 |
|
| 537 |
+ $tableError.addRow({
|
|
| 538 |
+ name: row.addrNm, // 이름 |
|
| 539 |
+ phone: row.addrPhoneNo, // 폰번호 |
|
| 540 |
+ result: "중복" // 결과 메시지 추가 |
|
| 541 |
+ }); |
|
| 542 |
+ duplicates.push({
|
|
| 543 |
+ name: row.addrNm, // 이름 |
|
| 544 |
+ phone: row.addrPhoneNo, // 폰번호 |
|
| 545 |
+ result: "중복" // 결과 메시지 추가 |
|
| 546 |
+ }); |
|
| 547 |
+ } |
|
| 548 |
+ }); |
|
| 549 |
+ |
|
| 550 |
+ // data 배열을 newData 배열로 대체 |
|
| 551 |
+ data = newData; |
|
| 552 |
+ |
|
| 553 |
+ |
|
| 554 |
+ // 수정된 데이터로 테이블 업데이트 |
|
| 555 |
+ $objTabul.setData(data); |
|
| 556 |
+ // 오류 총 카운트 |
|
| 557 |
+ $("#excelRowTotCnt").text($objTabul.getDataCount());
|
|
| 558 |
+ // 중복 카운트 |
|
| 559 |
+ $("#excelRowDupCnt").text(duplicateCount);
|
|
| 560 |
+ // 에러 카운트 |
|
| 561 |
+ $("#excelRowErrorCnt").text(errorCount);
|
|
| 562 |
+ |
|
| 563 |
+ // popup 영역 |
|
| 564 |
+ // 중복 카운트 |
|
| 565 |
+ $("#errorPopDupCnt").text(duplicateCount);
|
|
| 566 |
+ // 에러 카운트 |
|
| 567 |
+ $("#errorPopErrorCnt").text(errorCount);
|
|
| 568 |
+ // |
|
| 569 |
+ $("#errorPopTotCnt").text(duplicateCount+errorCount);
|
|
| 570 |
+ |
|
| 571 |
+ |
|
| 572 |
+ var errorData = errors.concat(duplicates); |
|
| 573 |
+ // 오류 및 중복 데이터를 한 번에 추가 |
|
| 574 |
+ $tableError.setData(errorData); |
|
| 575 |
+ |
|
| 576 |
+ if(errorCount > 0){
|
|
| 577 |
+ alert('휴대폰 형식에 맞지 않는 데이터는 삭제 후 업로드 됩니다.\nex) 발송불가 특수문자, 자릿수 오류 등');
|
|
| 578 |
+ } |
|
| 579 |
+ |
|
| 580 |
+ |
|
| 581 |
+ |
|
| 582 |
+} |
|
| 583 |
+ |
|
| 584 |
+function fn_dupliPopupShow(){
|
|
| 585 |
+ |
|
| 586 |
+ $("#tableExcelDupliBtn").show();
|
|
| 587 |
+} |
|
| 588 |
+ |
|
| 589 |
+function makeAddrMassDupliPop(dupliPhoneDataRealList) {
|
|
| 590 |
+ var sHtml = ""; |
|
| 591 |
+ sHtml += "<div class='' style='overflow-x:auto; height:350px;'>"; |
|
| 592 |
+ sHtml += "<table class='tType4'>"; |
|
| 593 |
+ sHtml += " <colgroup>"; |
|
| 594 |
+ sHtml += " <col style='width:auto' />"; |
|
| 595 |
+ sHtml += " </colgroup>"; |
|
| 596 |
+ sHtml += " <thead>"; |
|
| 597 |
+ sHtml += " <tr>"; |
|
| 598 |
+ sHtml += " <th>중복 휴대폰번호 (" + numberWithCommas(dupliPhoneDataRealList.length) + "개)</th>";
|
|
| 599 |
+ sHtml += " </tr>"; |
|
| 600 |
+ sHtml += " </thead>"; |
|
| 601 |
+ sHtml += " <tbody>"; |
|
| 602 |
+ for (var i = 0; i < dupliPhoneDataRealList.length; i++) {
|
|
| 603 |
+ sHtml += " <tr>"; |
|
| 604 |
+ sHtml += " <td>" + dupliPhoneDataRealList[i] + "</td>"; |
|
| 605 |
+ sHtml += " </tr>"; |
|
| 606 |
+ } |
|
| 607 |
+ sHtml += " </tbody>"; |
|
| 608 |
+ sHtml += " </table>"; |
|
| 609 |
+ sHtml += " </div>"; |
|
| 610 |
+ |
|
| 611 |
+ $("#addrMassDupli_layer").html(sHtml);
|
|
| 612 |
+ fn_dupliPopupShow(); |
|
| 613 |
+ |
|
| 614 |
+} |
|
| 615 |
+ |
|
| 616 |
+ |
|
| 617 |
+function fn_dupliPopupShow(){
|
|
| 618 |
+ $('#tableExcelDupliBtn').show();
|
|
| 619 |
+} |
|
| 620 |
+ |
|
| 621 |
+//한국의 핸드폰 번호 형식 검사 함수 |
|
| 622 |
+function isValidKoreanPhoneNumber(phone) {
|
|
| 623 |
+ // 하이픈(-)을 제거하고 숫자만 남긴 후 검사 |
|
| 624 |
+ var cleaned = phone.replace(/-/g, ''); |
|
| 625 |
+ // 010, 011, 016, 017, 018, 019로 시작하고 10~11자리인 경우 유효 |
|
| 626 |
+ var valid = /^(010|011|016|017|018|019)\d{7,8}$/.test(cleaned);
|
|
| 627 |
+ return valid; |
|
| 628 |
+} |
|
| 629 |
+ |
|
| 630 |
+ |
|
| 631 |
+ |
|
| 632 |
+ |
|
| 633 |
+// 상단 설명 더보기 |
|
| 634 |
+function popMore(e){
|
|
| 635 |
+ $(e).closest(".pop_more_cont").toggleClass("pop_more_click");
|
|
| 636 |
+ |
|
| 637 |
+ if($(e).closest(".pop_more_cont").is(".pop_more_click")){
|
|
| 638 |
+ $(e).html('숨기기');
|
|
| 639 |
+ $(e).append('<i></i>');
|
|
| 640 |
+ }else {
|
|
| 641 |
+ $(e).html('더보기');
|
|
| 642 |
+ $(e).append('<i></i>');
|
|
| 643 |
+ } |
|
| 644 |
+} |
|
| 645 |
+ |
|
| 646 |
+</script> |
|
| 647 |
+ |
|
| 648 |
+<!-- 중복전화번호 data-tooltip:addrMassDupli_layer --> |
|
| 649 |
+<div class="tooltip-wrap"> |
|
| 650 |
+ <div class="popup-com addrMassDupli_layer" tabindex="0" data-tooltip-con="addrMassDupli_layer" data-focus="addrMassDupli_layer" data-focus-prev="addrMassDupli_layer-close" style="width: 270px; height: 500px;"> |
|
| 651 |
+ <div class="popup_heading"> |
|
| 652 |
+ <p>중복 휴대폰번호</p> |
|
| 653 |
+ <button type="button" class="tooltip-close" data-focus="addrMassDupli_layer-close" onclick="setAddrDupliClose();"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 654 |
+ </div> |
|
| 655 |
+ <div class="layer_in" style="padding:20px 0px;" id="addrMassDupli_layer"> |
|
| 656 |
+ </div> |
|
| 657 |
+ |
|
| 658 |
+ <div class="popup_btn_wrap2" style="margin-top: 0px;"> |
|
| 659 |
+ <button type="button" class="tooltip-close" data-focus="addrMassDupli_layer-close" data-focus-next="addrMassDupli_layer">닫기</button> |
|
| 660 |
+ </div> |
|
| 661 |
+ |
|
| 662 |
+ </div> |
|
| 663 |
+</div> |
|
| 664 |
+ |
|
| 665 |
+ |
|
| 666 |
+<!-- 주소록 상세 결과 팝업 data-tooltip:adr_popup14 --> |
|
| 667 |
+ <div class="tooltip-wrap"> |
|
| 668 |
+ <div class="popup-com adr_layer adr_popup14" tabindex="0" data-tooltip-con="adr_popup14" data-focus="adr_popup14" data-focus-prev="adr_popu14-close" style="width: 450px;"> |
|
| 669 |
+ <div class="popup_heading"> |
|
| 670 |
+ <p>주소록 상세 결과</p> |
|
| 671 |
+ <button type="button" class="tooltip-close" data-focus="adr_popup14-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 672 |
+ </div> |
|
| 673 |
+ <div class="layer_in" style="padding:30px 20px;"> |
|
| 674 |
+ <div class="table_top"> |
|
| 675 |
+ <p> |
|
| 676 |
+ 총 <span class="c_e40000" id="errorPopTotCnt">0</span>건 |
|
| 677 |
+ / 중복 <span class="c_002c9a" id="errorPopDupCnt">0</span>건 |
|
| 678 |
+ / 오류 <span class="c_002c9a" id="errorPopErrorCnt">0</span>건</p> |
|
| 679 |
+ <button type="button" class="excel_btn btnType" id="errorExcelBtn"><i class="downroad"></i>엑셀 다운로드</button> |
|
| 680 |
+ </div> |
|
| 681 |
+ <div class="tb_wrap adr_list" id="tabulator_error"> |
|
| 682 |
+ <!-- $tableError 참고 --> |
|
| 683 |
+ </div> |
|
| 684 |
+ <ul class="cf_text_ul"> |
|
| 685 |
+ <li>*중복번호는 하나의 번호만 등록됩니다.</li> |
|
| 686 |
+ <li>*휴대폰 형식에 맞지 않는 데이터는 삭제 후 업로드 됩니다.</li> |
|
| 687 |
+ <li>ex) 발송불가 특수문자, 자릿수 오류 등</li> |
|
| 688 |
+ </ul> |
|
| 689 |
+ <div class="popup_btn_wrap2"> |
|
| 690 |
+<!-- <button type="button">저장</button> --> |
|
| 691 |
+ <button type="button" class="tooltip-close" data-focus="adr_popup14-close" data-focus-next="adr_popup14">닫기</button> |
|
| 692 |
+ </div> |
|
| 693 |
+ </div> |
|
| 694 |
+ </div> |
|
| 695 |
+ </div> |
|
| 696 |
+ |
|
| 697 |
+<!--// 중복전화번호 팝업 --> |
|
| 698 |
+ <div class="popup_heading"> |
|
| 699 |
+ <p>엑셀 불러오기</p> |
|
| 700 |
+ <button type="button" class="tooltip-close" id="closeBtn" data-focus="popup02-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 701 |
+ </div> |
|
| 702 |
+ <div class="layer_in" style="padding: 25px 30px;"> |
|
| 703 |
+<!-- <div class="list_tab_wrap2"> --> |
|
| 704 |
+ <!-- tab button --> |
|
| 705 |
+<!-- <ul class="list_tab" id="tbTabl"> --> |
|
| 706 |
+<!-- <li class="tab active" data-tabul="tableExcel"><button type="button" onclick="popupTab(this,'1'); fn_tabToggle('1');">엑셀입력</button></li> -->
|
|
| 707 |
+<!-- <li class="tab" data-tabul="tableClip"><button type="button" onclick="popupTab(this,'2'); fn_tabToggle('2');">붙여넣기</button></li> -->
|
|
| 708 |
+<!-- <li class="tab" data-tabul="tableSelf"><button type="button" onclick="popupTab(this,'3'); fn_tabToggle('3');">직접입력</button></li> -->
|
|
| 709 |
+<!-- </ul>// tab button --> |
|
| 710 |
+<!-- </div> --> |
|
| 711 |
+ <!-- 엑셀입력 --> |
|
| 712 |
+ <div class="popCont current pop_more_cont" id="popCont_1"> |
|
| 713 |
+ <div class="titBox"> |
|
| 714 |
+ <p>- 주소록은 한 번에 최대 30만건까지 등록(EXCEL파일, 최대용량 3MB) 가능합니다. </p> |
|
| 715 |
+ <p>- 엑셀 파일에 비밀번호 설정, 제한된 보기, 수식 등이 설정되어 있는 경우 업로드가 불가합니다.</p> |
|
| 716 |
+ <p>- 구분선(|), 역슬래시(\, ₩), 큰따옴표(") 등 발송불가 특수문자는 저장되지 않습니다.</p>
|
|
| 717 |
+ <p>- 이름 200byte, [*1*]~[*4*] 200byte, 메모 250byte까지 입력 가능합니다.</p> |
|
| 718 |
+ <p>- 주소록 등록이 어려우신 경우에는 <a href="<c:url value='/web/mjon/addragency/selectAddrAgencyList.do'/>" style="font-weight: bold; color: blue;">주소록 입력대행</a> 메뉴를 이용하실 수 있습니다. </p> |
|
| 719 |
+ </div> |
|
| 720 |
+ <div class="pop_more_wrap"> |
|
| 721 |
+ <button type="button" class="pop_more" onclick="popMore(this);">더보기<i></i></button> |
|
| 722 |
+ </div> |
|
| 723 |
+ </div><!--// 엑셀입력 --> |
|
| 724 |
+ |
|
| 725 |
+ <!-- 공통 --> |
|
| 726 |
+ <div> |
|
| 727 |
+ <table class="layer_tType1"> |
|
| 728 |
+ <caption>엑셀입력 표</caption> |
|
| 729 |
+ <colgroup> |
|
| 730 |
+ <col style="width: 95px"> |
|
| 731 |
+ <col style="width: auto"> |
|
| 732 |
+ </colgroup> |
|
| 733 |
+ <tbody> |
|
| 734 |
+ <tr> |
|
| 735 |
+ <!-- <th>그룹 선택</th> |
|
| 736 |
+ <td> |
|
| 737 |
+ <label for="" class="label">그룹 선택</label> |
|
| 738 |
+ <select id="addrGrpIdInfo" name="addrGrpIdInfo"> |
|
| 739 |
+ </select> |
|
| 740 |
+ <label for="" class="label">그룹명 입력</label> |
|
| 741 |
+ <input type="text" id="addrGrpNm" name="addrGrpNm" placeholder="새 그룹명을 입력해주세요." onfocus="this.placeholder=''" onblur="this.placeholder='새 그룹명을 입력해주세요.'"class="inputLight" style="width: 300px;"> |
|
| 742 |
+ <input type="file" id="excelFile" accept=".xls, .xlsx, .txt" style="display:none"/> |
|
| 743 |
+ <button type="button" class="excel_btn2 btnType c3"><i class="uproad"></i>엑셀, TXT파일 업로드</button> |
|
| 744 |
+ </td> --> |
|
| 745 |
+ <td colspan="2" style="padding:20px 0;"> |
|
| 746 |
+ <div class="file_upload_wrap" style="width:100%;display:flex;"> |
|
| 747 |
+ <div class="file_add upload_area"> |
|
| 748 |
+ <p><img src="/publish/images/content/file_add.png" alt="파일 붙여넣기">마우스로 엑셀, TXT파일을 여기에 끌어다 놓으세요</p> |
|
| 749 |
+ </div> |
|
| 750 |
+ <input type="file" id="excelFile" accept=".xls, .xlsx, .txt" style="display:none"/> |
|
| 751 |
+ <button type="button" class="excel_btn2 btnType c3"><i class="uproad"></i>엑셀, TXT파일 업로드</button> |
|
| 752 |
+ </div> |
|
| 753 |
+ </td> |
|
| 754 |
+ </tr> |
|
| 755 |
+ </tbody> |
|
| 756 |
+ </table> |
|
| 757 |
+ </div> |
|
| 758 |
+ |
|
| 759 |
+ |
|
| 760 |
+ <div class="excel_middle2"> |
|
| 761 |
+ <p> |
|
| 762 |
+ 총 <span class="c_e40000 fwBold" id="excelRowTotCnt">0</span>건 |
|
| 763 |
+ / 중복 <span class="c_002c9a fwBold" id="excelRowDupCnt">0</span>건 |
|
| 764 |
+ / 오류 <span class="c_002c9a fwBold" id="excelRowErrorCnt">0</span>건 |
|
| 765 |
+ <button type="button" class="btn_list_detail" data-tooltip="adr_popup14"><img src="/publish/images/search.png"></button> |
|
| 766 |
+ </p> |
|
| 767 |
+<!-- --> |
|
| 768 |
+<!-- <button type="button" class="btnType btnType6" data-tooltip="addrMassDupli_layer" id="tableExcelDupliBtn">중복번호</button> --> |
|
| 769 |
+<!-- --> |
|
| 770 |
+<!-- <button type="button" class="btnType btnType6" data-tooltip="addrMassSaveDupli_layer" onclick="GetAddrMassSaveDupli()" id="btnAddrMassSaveDupli">중복번호</button> --> |
|
| 771 |
+ </p> |
|
| 772 |
+<!-- <button type="button" class="btnType btnType6 addCallToF">번호추가</button> --> |
|
| 773 |
+ </div> |
|
| 774 |
+ |
|
| 775 |
+ |
|
| 776 |
+ |
|
| 777 |
+ |
|
| 778 |
+ <div class="adr_excel" style="margin-top: 13px;"> |
|
| 779 |
+ <!-- thead --> |
|
| 780 |
+ <div class="adr_hd select_adr_hd" data-group="tableExcel"> |
|
| 781 |
+ <div style="width: 100px;"></div> |
|
| 782 |
+ <div style="width: 140px;"> |
|
| 783 |
+ <label for="" class="label"></label> |
|
| 784 |
+ <select class="field-selector"> |
|
| 785 |
+ <option value="">선택하기</option> |
|
| 786 |
+ <option value="addrNm">이름</option> |
|
| 787 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 788 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 789 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 790 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 791 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 792 |
+<!-- <option value="addrComment">메모</option> --> |
|
| 793 |
+ </select> |
|
| 794 |
+ </div> |
|
| 795 |
+ <div style="width: 140px;"> |
|
| 796 |
+ <label for="" class="label"></label> |
|
| 797 |
+ <select class="field-selector"> |
|
| 798 |
+ <option value="">선택하기</option> |
|
| 799 |
+ <option value="addrNm">이름</option> |
|
| 800 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 801 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 802 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 803 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 804 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 805 |
+<!-- <option value="addrComment">메모</option> --> |
|
| 806 |
+ </select> |
|
| 807 |
+ </div> |
|
| 808 |
+ <div style="width: 140px;"> |
|
| 809 |
+ <label for="" class="label"></label> |
|
| 810 |
+ <select class="field-selector"> |
|
| 811 |
+ <option value="">선택하기</option> |
|
| 812 |
+ <option value="addrNm">이름</option> |
|
| 813 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 814 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 815 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 816 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 817 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 818 |
+<!-- <option value="addrComment">메모</option> --> |
|
| 819 |
+ </select> |
|
| 820 |
+ </div> |
|
| 821 |
+ <div style="width: 140px;"> |
|
| 822 |
+ <label for="" class="label"></label> |
|
| 823 |
+ <select class="field-selector"> |
|
| 824 |
+ <option value="">선택하기</option> |
|
| 825 |
+ <option value="addrNm">이름</option> |
|
| 826 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 827 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 828 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 829 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 830 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 831 |
+<!-- <option value="addrComment">메모</option> --> |
|
| 832 |
+ </select> |
|
| 833 |
+ </div> |
|
| 834 |
+ <div style="width: 140px;"> |
|
| 835 |
+ <label for="" class="label"></label> |
|
| 836 |
+ <select class="field-selector"> |
|
| 837 |
+ <option value="">선택하기</option> |
|
| 838 |
+ <option value="addrNm">이름</option> |
|
| 839 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 840 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 841 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 842 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 843 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 844 |
+<!-- <option value="addrComment">메모</option> --> |
|
| 845 |
+ </select> |
|
| 846 |
+ </div> |
|
| 847 |
+ <div style="width: 140px;"> |
|
| 848 |
+ <label for="" class="label"></label> |
|
| 849 |
+ <select class="field-selector"> |
|
| 850 |
+ <option value="">선택하기</option> |
|
| 851 |
+ <option value="addrNm">이름</option> |
|
| 852 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 853 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 854 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 855 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 856 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 857 |
+<!-- <option value="addrComment">메모</option> --> |
|
| 858 |
+ </select> |
|
| 859 |
+ </div> |
|
| 860 |
+ <!-- <div style="width: 125px;"> |
|
| 861 |
+ <label for="" class="label"></label> |
|
| 862 |
+ <select class="field-selector"> |
|
| 863 |
+ <option value="">선택하기</option> |
|
| 864 |
+ <option value="addrNm">이름</option> |
|
| 865 |
+ <option value="addrPhoneNo">휴대폰</option> |
|
| 866 |
+ <option value="addrInfo1">[*1*]</option> |
|
| 867 |
+ <option value="addrInfo2">[*2*]</option> |
|
| 868 |
+ <option value="addrInfo3">[*3*]</option> |
|
| 869 |
+ <option value="addrInfo4">[*4*]</option> |
|
| 870 |
+ <option value="addrComment">메모</option> |
|
| 871 |
+ </select> |
|
| 872 |
+ </div> --> |
|
| 873 |
+ </div> |
|
| 874 |
+ </div> |
|
| 875 |
+ |
|
| 876 |
+ <div class="drag_drop_wrap callList_includ_box" id="tabulator_excel"> |
|
| 877 |
+<!-- <img src="/publish/images/content/excel.jpg" style="width: 100%;"> --> |
|
| 878 |
+ </div> |
|
| 879 |
+ <div class="excel_middle"> |
|
| 880 |
+ <div class="select_btnWrap clearfix"> |
|
| 881 |
+ <div> |
|
| 882 |
+ <button type="button" id="allDel"><i class="remove_img"></i>전체삭제</button> |
|
| 883 |
+ <button type="button" id="in_select_del"><i class="remove_img"></i>선택삭제</button> |
|
| 884 |
+ </div> |
|
| 885 |
+ |
|
| 886 |
+ </div> |
|
| 887 |
+ </div><!--// 공통 --> |
|
| 888 |
+ |
|
| 889 |
+ <!-- 붙여놓기 설명 --> |
|
| 890 |
+<!-- <div class="req_area"> --> |
|
| 891 |
+<!-- <div class="text_box"> --> |
|
| 892 |
+<!-- - 휴대폰 번호가 입력된 txt 파일을 열어 복사(Ctrl+c) + 붙여넣기(Ctrl+v)로도 입력하실 수 있습니다.<br> --> |
|
| 893 |
+<!-- - 휴대폰 번호는 필수입력 항목입니다.<br> --> |
|
| 894 |
+<!-- - 이름,휴대폰 번호,[*1*],[*2*],[*3*],[*4*],메모 순서대로 입력해주세요.(예 : 010-1234-5678,홍길동,변수1…메모)<br> --> |
|
| 895 |
+<!-- - 이름은 24byte, [*1*]~[*4*] 40byte, 메모는 250byte까지 입력 가능합니다.<br> --> |
|
| 896 |
+<!-- - '오류 검사'를 통해 등록된 데이터에 전화번호 입력 오류를 확인하실 수 있습니다. --> |
|
| 897 |
+<!-- </div> --> |
|
| 898 |
+<!-- </div> --> |
|
| 899 |
+ <div class="popup_btn_wrap2" style="margin: 0 auto 30px auto;"> |
|
| 900 |
+ <button type="button" id="btnAddrMassReg">추가</button> |
|
| 901 |
+ <button type="button" id="btnAddrMassClose" class="tooltip-close" data-focus="adr_popup01-close" data-focus-next="popup02">닫기</button> |
|
| 902 |
+ </div> |
|
| 903 |
+ |
|
| 904 | 904 |
</div>(No newline at end of file) |
--- src/main/webapp/WEB-INF/jsp/web/pay/PayGuide.jsp
+++ src/main/webapp/WEB-INF/jsp/web/pay/PayGuide.jsp
... | ... | @@ -1,867 +1,867 @@ |
| 1 |
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|
| 4 |
- |
|
| 5 |
-<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> |
|
| 6 |
- |
|
| 7 |
-<script> |
|
| 8 |
-// 문자 단가 |
|
| 9 |
-var shortPrice = "${shortPrice}";
|
|
| 10 |
-var longPrice = "${longPrice}";
|
|
| 11 |
-var picturePrice = "${picturePrice}";
|
|
| 12 |
-var picturePrice2 = "${picturePrice2}";
|
|
| 13 |
-var picturePrice3 = "${picturePrice3}";
|
|
| 14 |
-var kakaoAtPrice = "${kakaoAtPrice}";
|
|
| 15 |
-var faxPrice = "${faxPrice}";
|
|
| 16 |
- |
|
| 17 |
-var smsList = new Array(); // 품목추가 Array |
|
| 18 |
-var supplySumPrice = 0; // 공급가액 |
|
| 19 |
-var vatSumPrice = 0; // 부가세액 |
|
| 20 |
-var totSumPrice = 0; // 합계 |
|
| 21 |
- |
|
| 22 |
-// 탭이동 |
|
| 23 |
-var tabType = "${tabType}";
|
|
| 24 |
- |
|
| 25 |
-$(document).ready(function () {
|
|
| 26 |
- |
|
| 27 |
- // 품목정보 추가 |
|
| 28 |
- getSmsItemAdd(); |
|
| 29 |
- |
|
| 30 |
- // 품목 Change Event |
|
| 31 |
- $("#smsItem").change(function(){
|
|
| 32 |
- $("#unitPrice").val($("#smsItem option:selected").val());
|
|
| 33 |
- |
|
| 34 |
- var optNm = $("#smsItem option:selected").text();
|
|
| 35 |
- if(optNm.includes('팩스')){
|
|
| 36 |
- $('#faxPages').show();
|
|
| 37 |
- }else{
|
|
| 38 |
- $('#faxPages').hide();
|
|
| 39 |
- } |
|
| 40 |
- }); |
|
| 41 |
- |
|
| 42 |
- // 품목추가 Click Event |
|
| 43 |
- $("#btnItemAdd").click(function(){
|
|
| 44 |
- // 품목추가 |
|
| 45 |
- setItemAdd(); |
|
| 46 |
- }); |
|
| 47 |
- |
|
| 48 |
- // 품목삭제 Click Event |
|
| 49 |
- $("#btnItemDel").click(function(){
|
|
| 50 |
- // 품목삭제 |
|
| 51 |
- setItemDel(); |
|
| 52 |
- |
|
| 53 |
- //품목추가 Html |
|
| 54 |
- setItemAddHtml(); |
|
| 55 |
- }); |
|
| 56 |
- |
|
| 57 |
- // 부가세별도 여부 Change Event |
|
| 58 |
- $("#isVat").change(function(){
|
|
| 59 |
- //품목추가 Html |
|
| 60 |
- setItemAddHtml(); |
|
| 61 |
- }); |
|
| 62 |
- |
|
| 63 |
- // 견적내기화면으로 이동 |
|
| 64 |
- if (tabType == "2") {
|
|
| 65 |
- $("#btnEstimate").trigger("click");
|
|
| 66 |
- } |
|
| 67 |
- |
|
| 68 |
- //등급제 시행 ON/OFF 체크(비로그인) |
|
| 69 |
- //getMberSettingDetailByNotLogin(); |
|
| 70 |
- |
|
| 71 |
- // 등급제 대상 여부 |
|
| 72 |
- //getMberGrdChk(); |
|
| 73 |
- |
|
| 74 |
-}); |
|
| 75 |
- |
|
| 76 |
-//품목정보 추가 |
|
| 77 |
-function getSmsItemAdd() {
|
|
| 78 |
- var sHtml = ""; |
|
| 79 |
- sHtml += "<option value='" + shortPrice + "'>단문(SMS)</option>"; |
|
| 80 |
- sHtml += "<option value='" + longPrice + "'>장문(LMS)</option>"; |
|
| 81 |
- sHtml += "<option value='" + picturePrice + "'>그림문자(1장)</option>"; |
|
| 82 |
- sHtml += "<option value='" + picturePrice2 + "'>그림문자(2장)</option>"; |
|
| 83 |
- sHtml += "<option value='" + picturePrice3 + "'>그림문자(3장)</option>"; |
|
| 84 |
- sHtml += "<option value='" + kakaoAtPrice + "'>카톡(알림톡)</option>"; |
|
| 85 |
- sHtml += "<option value='" + faxPrice + "'>팩스</option>"; |
|
| 86 |
- |
|
| 87 |
- $("#smsItem").append(sHtml);
|
|
| 88 |
- |
|
| 89 |
- // 단가 초기값 |
|
| 90 |
- $("#unitPrice").val($("#smsItem option:selected").val());
|
|
| 91 |
-} |
|
| 92 |
- |
|
| 93 |
- |
|
| 94 |
-// 품목추가 |
|
| 95 |
-function setItemAdd() {
|
|
| 96 |
- var caseNumber = $("#caseNumber").val().trim().replaceAll(",", "");
|
|
| 97 |
- var casePage = $("#casePage").val().trim().replaceAll(",", "");
|
|
| 98 |
- |
|
| 99 |
- if (caseNumber == null || caseNumber == "" || caseNumber == undefined) {
|
|
| 100 |
- alert("건수를 입력하세요.");
|
|
| 101 |
- return false; |
|
| 102 |
- } |
|
| 103 |
- else if (isNaN(caseNumber) == true) {
|
|
| 104 |
- alert("건수는 숫자를 입력하세요.");
|
|
| 105 |
- return false; |
|
| 106 |
- } |
|
| 107 |
- |
|
| 108 |
- // 객체 생성 |
|
| 109 |
- var data = new Object(); |
|
| 110 |
- data.smsItemName = $("#smsItem option:selected").text(); // 품목명
|
|
| 111 |
- data.unitPrice = $("#unitPrice").val(); // 단가
|
|
| 112 |
- data.unitPricePlusVat = $("#unitPrice").val(); // 단가
|
|
| 113 |
- data.caseNumber = caseNumber; // 건수 |
|
| 114 |
- data.supplyPrice = $("#unitPrice").val() * caseNumber;
|
|
| 115 |
- data.totPrice = $("#unitPrice").val() * caseNumber; // 금액
|
|
| 116 |
- |
|
| 117 |
- var itmNm = data.smsItemName |
|
| 118 |
- if(itmNm.includes('팩스')){//팩스인 경우 매수 곱해주기
|
|
| 119 |
- data.casePage = casePage; |
|
| 120 |
- data.supplyPrice = $("#unitPrice").val() * (caseNumber * casePage);
|
|
| 121 |
- data.totPrice = $("#unitPrice").val() * (caseNumber * casePage); // 금액
|
|
| 122 |
- } |
|
| 123 |
- |
|
| 124 |
- // 리스트에 생성된 객체 삽입 |
|
| 125 |
- smsList.push(data); |
|
| 126 |
- |
|
| 127 |
- //품목추가 Html |
|
| 128 |
- setItemAddHtml(); |
|
| 129 |
- } |
|
| 130 |
- |
|
| 131 |
-//품목추가 Html |
|
| 132 |
-function setItemAddHtml() {
|
|
| 133 |
- var isVat = $("#isVat option:selected").val();
|
|
| 134 |
- |
|
| 135 |
- // 부가세 케이스별 다시계산 |
|
| 136 |
- smsList.forEach(function(element) {
|
|
| 137 |
- var itmNm = element.smsItemName; |
|
| 138 |
- |
|
| 139 |
- if (isVat == 1) {
|
|
| 140 |
- |
|
| 141 |
- if(itmNm.includes('팩스')){//팩스인 경우 건수 * 매수에 대한 금액의 부가세를 계산해야함.
|
|
| 142 |
- // 부가세 포함 |
|
| 143 |
- element.vatPrice = Math.round(element.unitPrice * 0.1 * (element.caseNumber * element.casePage)); |
|
| 144 |
- }else{
|
|
| 145 |
- // 부가세 포함 |
|
| 146 |
- element.vatPrice = Math.round(element.unitPrice * 0.1 * element.caseNumber); |
|
| 147 |
- //element.unitPricePlusVat = parseInt(element.unitPrice, 10) + Math.round(element.unitPrice * 0.1); |
|
| 148 |
- } |
|
| 149 |
- |
|
| 150 |
- } |
|
| 151 |
- else {
|
|
| 152 |
- // 부가세 별도(부가세 : 0) |
|
| 153 |
- element.vatPrice = 0; |
|
| 154 |
- } |
|
| 155 |
- |
|
| 156 |
- if(itmNm.includes('팩스')){//팩스인 경우 건수 * 매수에 대한 금액의 부가세를 계산해야함.
|
|
| 157 |
- element.totVatPrice = (element.unitPrice * (element.caseNumber * element.casePage)) + element.vatPrice; // 금액 |
|
| 158 |
- }else{
|
|
| 159 |
- element.totVatPrice = (element.unitPrice * element.caseNumber) + element.vatPrice; // 금액 |
|
| 160 |
- } |
|
| 161 |
- }) |
|
| 162 |
- |
|
| 163 |
- vatSumPrice = 0; |
|
| 164 |
- supplySumPrice = 0; |
|
| 165 |
- totSumPrice = 0; |
|
| 166 |
- |
|
| 167 |
- var sHtml = ""; |
|
| 168 |
- smsList.forEach(function(element) {
|
|
| 169 |
- supplySumPrice += element.supplyPrice; |
|
| 170 |
- totSumPrice += element.totPrice; |
|
| 171 |
- |
|
| 172 |
- sHtml += "<div class='tType3_bd'>"; |
|
| 173 |
- sHtml += " <div>"; |
|
| 174 |
- sHtml += " <label for='' class='label'>한 줄 전체 선택</label>"; |
|
| 175 |
- sHtml += " <input type='checkbox' id='chkEach' name='chkEach'>"; |
|
| 176 |
- sHtml += " </div>"; |
|
| 177 |
- sHtml += " <div>" + element.smsItemName + "</div>"; |
|
| 178 |
- if (isVat == 1) {
|
|
| 179 |
- // 부가세 포함 |
|
| 180 |
- sHtml += " <div>" + element.unitPricePlusVat + "</div>"; |
|
| 181 |
- } |
|
| 182 |
- else {
|
|
| 183 |
- sHtml += " <div>" + element.unitPrice + "</div>"; |
|
| 184 |
- } |
|
| 185 |
- if(element.smsItemName.includes('팩스')){
|
|
| 186 |
- sHtml += " <div>" + numberWithCommas(element.caseNumber * element.casePage) + "</div>"; |
|
| 187 |
- } |
|
| 188 |
- else {
|
|
| 189 |
- sHtml += " <div>" + numberWithCommas(element.caseNumber) + "</div>"; |
|
| 190 |
- } |
|
| 191 |
- sHtml += " <div>" + numberWithCommas(element.supplyPrice) + "</div>"; |
|
| 192 |
- sHtml += " <div>" + numberWithCommas(element.vatPrice) + "</div>"; |
|
| 193 |
- sHtml += " <div>" + numberWithCommas(element.totVatPrice) + "</div>"; |
|
| 194 |
- sHtml += "</div>"; |
|
| 195 |
- }) |
|
| 196 |
- |
|
| 197 |
- $("#itemList").html(sHtml);
|
|
| 198 |
- |
|
| 199 |
- // Sum |
|
| 200 |
- setEstimateSum(); |
|
| 201 |
- } |
|
| 202 |
- |
|
| 203 |
-// Sum |
|
| 204 |
-function setEstimateSum() {
|
|
| 205 |
- var isVat = $("#isVat option:selected").val();
|
|
| 206 |
- console.log("setEstimateSum")
|
|
| 207 |
- if (isVat == 1) {
|
|
| 208 |
- // 부가세 포함 |
|
| 209 |
- vatSumPrice = Math.round(supplySumPrice * 0.1); |
|
| 210 |
- totSumPrice = totSumPrice + vatSumPrice; |
|
| 211 |
- } |
|
| 212 |
- else {
|
|
| 213 |
- // 부가세 별도(부가세 : 0) |
|
| 214 |
- vatSumPrice = 0; |
|
| 215 |
- supplySumPrice = supplySumPrice - vatSumPrice;; |
|
| 216 |
- } |
|
| 217 |
- |
|
| 218 |
- $("#supplySumPriceStr").html(numberWithCommas(supplySumPrice));
|
|
| 219 |
- $("#totSumPriceStr").html(numberWithCommas(totSumPrice));
|
|
| 220 |
- /* if($("#isVat option:selected").val() == '0'){
|
|
| 221 |
- $("#isVatStr").html($("#isVat option:selected").text() + '(' + numberWithCommas(vatSumPrice) + ')');
|
|
| 222 |
- }else{
|
|
| 223 |
- $("#isVatStr").html($("#isVat option:selected").text());
|
|
| 224 |
- } */ |
|
| 225 |
- $("#isVatStr").html(numberWithCommas(vatSumPrice));
|
|
| 226 |
- |
|
| 227 |
- $("#smsList").val(JSON.stringify(smsList));
|
|
| 228 |
- $("#supplySumPrice").val(supplySumPrice);
|
|
| 229 |
- $("#vatSumPrice").val(vatSumPrice);
|
|
| 230 |
- $("#totSumPrice").val(totSumPrice);
|
|
| 231 |
- |
|
| 232 |
-} |
|
| 233 |
- |
|
| 234 |
-// 품목 삭제 |
|
| 235 |
-function setItemDel() {
|
|
| 236 |
- //체크박스 체크 |
|
| 237 |
- var smsListLen = smsList.length; |
|
| 238 |
- while (smsListLen--) {
|
|
| 239 |
- if ($('input[name=chkEach]').eq(smsListLen).is(':checked') == true) {
|
|
| 240 |
- smsList.splice(smsListLen, 1); |
|
| 241 |
- } |
|
| 242 |
- } |
|
| 243 |
-} |
|
| 244 |
- |
|
| 245 |
-//유효성 검사 |
|
| 246 |
-function ValidationCheck() {
|
|
| 247 |
- var title = $("#title").val().trim();
|
|
| 248 |
- var recipientName = $("#recipientName").val().trim();
|
|
| 249 |
- var managerName = $("#managerName").val().trim();
|
|
| 250 |
- var mobile = $("#mobile").val().trim();
|
|
| 251 |
- var publishDate = $("#publishDate").val().trim();
|
|
| 252 |
- |
|
| 253 |
- if (title == null || title == "" || title == undefined) {
|
|
| 254 |
- alert("제목을 입력하세요.");
|
|
| 255 |
- $("#title").focus();
|
|
| 256 |
- return false; |
|
| 257 |
- } |
|
| 258 |
- else if (recipientName == null || recipientName == "" || recipientName == undefined) {
|
|
| 259 |
- alert("수신자(기업명)을 입력하세요.");
|
|
| 260 |
- $("#recipientName").focus();
|
|
| 261 |
- return false; |
|
| 262 |
- } |
|
| 263 |
- else if (managerName == null || managerName == "" || managerName == undefined) {
|
|
| 264 |
- alert("담당자(성명)을 입력하세요.");
|
|
| 265 |
- $("#managerName").focus();
|
|
| 266 |
- return false; |
|
| 267 |
- } |
|
| 268 |
- else if (mobile == null || mobile == "" || mobile == undefined) {
|
|
| 269 |
- alert("연락처를 입력하세요.");
|
|
| 270 |
- $("#mobile").focus();
|
|
| 271 |
- return false; |
|
| 272 |
- } |
|
| 273 |
- else if (publishDate == null || publishDate == "" || publishDate == undefined) {
|
|
| 274 |
- alert("발행일을 입력하세요.");
|
|
| 275 |
- $("#publishDate").focus();
|
|
| 276 |
- return false; |
|
| 277 |
- } |
|
| 278 |
- else if (smsList.length == 0) {
|
|
| 279 |
- alert("품목정보를 하나이상 추가해주세요.");
|
|
| 280 |
- return false; |
|
| 281 |
- } |
|
| 282 |
-} |
|
| 283 |
- |
|
| 284 |
-/* 인쇄미리보기 클릭 시 견적서 새창 팝업 오픈 */ |
|
| 285 |
-function showEst() {
|
|
| 286 |
- |
|
| 287 |
- // 유효성 검사 |
|
| 288 |
- if (ValidationCheck() == false) return false; |
|
| 289 |
- |
|
| 290 |
- //만들려는 팝업의 크기 |
|
| 291 |
- var popup_wid = 820; |
|
| 292 |
- var popup_ht = 900; |
|
| 293 |
- |
|
| 294 |
- //중앙 정렬을 위해 윈도우 스크린의 width,height 구하는 변수 만듦 |
|
| 295 |
- var popup_left = (window.screen.width / 2) - (popup_wid / 2); |
|
| 296 |
- var popup_top =(window.screen.height / 2) - (popup_ht / 2); |
|
| 297 |
- |
|
| 298 |
- // From Submit |
|
| 299 |
- var myForm = document.popForm; |
|
| 300 |
- var url = "/web/pay/PayEstimateAjax.do"; |
|
| 301 |
- window.open('' ,'popForm', 'scrollbars=1, width='+ popup_wid +', height='+ popup_ht +', left=' + popup_left + ', top='+ popup_top);
|
|
| 302 |
- myForm.action =url; |
|
| 303 |
- myForm.method="post"; |
|
| 304 |
- myForm.target="popForm"; |
|
| 305 |
- myForm.testVal = 'test'; |
|
| 306 |
- myForm.submit(); |
|
| 307 |
-} |
|
| 308 |
- |
|
| 309 |
-function inputNumberFormatPay(obj) {
|
|
| 310 |
- $(obj).val($(obj).val().replace(/[^0-9]/g,"")); |
|
| 311 |
- |
|
| 312 |
- $('#caseNumber').val(numberWithCommas(obj.value));
|
|
| 313 |
-} |
|
| 314 |
- |
|
| 315 |
- |
|
| 316 |
-function inputPagesNumberFormatPay(obj) {
|
|
| 317 |
- $(obj).val($(obj).val().replace(/[^0-9]/g,"")); |
|
| 318 |
- |
|
| 319 |
- $(obj).val(numberWithCommas(obj.value)); |
|
| 320 |
-} |
|
| 321 |
-function inputPagesNumber(obj) {
|
|
| 322 |
- $(obj).val($(obj).val().replace(/[^0-9]/g,"")); |
|
| 323 |
-} |
|
| 324 |
- |
|
| 325 |
-function fn_gunClear(){
|
|
| 326 |
- $('#caseNumber').val('');
|
|
| 327 |
-} |
|
| 328 |
- |
|
| 329 |
- |
|
| 330 |
-//체크박스 전체선택/해제 |
|
| 331 |
-$(document).on("click", "#chkAll", function(e) {
|
|
| 332 |
- var isChecked = $(this).is(":checked");
|
|
| 333 |
- $("input[name=chkEach]:checkbox").prop("checked", isChecked);
|
|
| 334 |
-}); |
|
| 335 |
- |
|
| 336 |
-/* 윈도우팝업 열기 */ |
|
| 337 |
-function infoPop(pageUrl){
|
|
| 338 |
- document.infoPopForm.pageType.value = pageUrl; |
|
| 339 |
- document.infoPopForm.action = "/web/pop/infoPop.do"; |
|
| 340 |
- document.infoPopForm.method = "post"; |
|
| 341 |
- window.open("about:blank", 'infoPop', 'width=790, height=280, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1');
|
|
| 342 |
- document.infoPopForm.target = "infoPop"; |
|
| 343 |
- document.infoPopForm.submit(); |
|
| 344 |
-} |
|
| 345 |
- |
|
| 346 |
- |
|
| 347 |
-//등급제 시행 ON/OFF 체크(비로그인) |
|
| 348 |
-function getMberSettingDetailByNotLogin() {
|
|
| 349 |
- $.ajax({
|
|
| 350 |
- type: "POST", |
|
| 351 |
- url: "/web/grd/mberSettDetailByNotLoginAjax.do", |
|
| 352 |
- data: {},
|
|
| 353 |
- dataType:'json', |
|
| 354 |
- async: false, |
|
| 355 |
- success: function (data) {
|
|
| 356 |
- if (data.isSuccess) {
|
|
| 357 |
- // 문자(등급별 요금 안내) |
|
| 358 |
- $("#mberGrdSettingArea").show();
|
|
| 359 |
- } |
|
| 360 |
- else {
|
|
| 361 |
- //alert("Msg : " + data.msg);
|
|
| 362 |
- } |
|
| 363 |
- }, |
|
| 364 |
- error: function (e) {
|
|
| 365 |
- //alert("ERROR : " + JSON.stringify(e));
|
|
| 366 |
- } |
|
| 367 |
- }); |
|
| 368 |
-} |
|
| 369 |
- |
|
| 370 |
-// 등급제 대상 여부 |
|
| 371 |
-function getMberGrdChk() {
|
|
| 372 |
- $.ajax({
|
|
| 373 |
- type: "POST", |
|
| 374 |
- url: "/web/grd/mberGrdChkAjax.do", |
|
| 375 |
- data: {},
|
|
| 376 |
- dataType:'json', |
|
| 377 |
- async: false, |
|
| 378 |
- success: function (data) {
|
|
| 379 |
- if (data.isSuccess) {
|
|
| 380 |
- // 등급제 누적결제액 세부내역 |
|
| 381 |
- $("#grdShowArea").html("(등급 : " + data.rtnMberGrdVO.grdSetNm + ")");
|
|
| 382 |
- $("#levelSubTitle").html("(" + data.rtnMberGrdVO.grdDate + " ~ 현재)");
|
|
| 383 |
- } |
|
| 384 |
- else {
|
|
| 385 |
- //alert("Msg : " + data.msg);
|
|
| 386 |
- } |
|
| 387 |
- }, |
|
| 388 |
- error: function (e) {
|
|
| 389 |
- //alert("ERROR : " + JSON.stringify(e));
|
|
| 390 |
- } |
|
| 391 |
- }); |
|
| 392 |
-} |
|
| 393 |
- |
|
| 394 |
-</script> |
|
| 395 |
- |
|
| 396 |
-<form name="popForm" method="post"> |
|
| 397 |
- <input type="hidden" name="smsList" id="smsList" value="" /> |
|
| 398 |
- <input type="hidden" name="supplySumPrice" id="supplySumPrice" value="" /> |
|
| 399 |
- <input type="hidden" name="vatSumPrice" id="vatSumPrice" value="" /> |
|
| 400 |
- <input type="hidden" name="totSumPrice" id="totSumPrice" value="" /> |
|
| 401 |
- |
|
| 402 |
- <!-- content 영역 --> |
|
| 403 |
- <div class="inner"> |
|
| 404 |
- <!-- send top --> |
|
| 405 |
- <div class="send_top"> |
|
| 406 |
- <!-- tab button --> |
|
| 407 |
- <ul class="tabType4"> |
|
| 408 |
- <li class="tab active"><button type="button">요금안내/견적내기</button></li> |
|
| 409 |
- <li class="tab"><button type="button" onclick="location.href='/web/member/pay/PayView.do'">결제하기</button></li> |
|
| 410 |
- <li class="tab"><button type="button" onclick="location.href='/web/member/pay/PayList.do'">요금 결제내역</button></li> |
|
| 411 |
- <li class="tab"><button type="button" onclick="location.href='/web/member/pay/PayUserSWList.do'">요금 사용내역</button></li> |
|
| 412 |
- <li class="tab"><button type="button" onclick="location.href='/web/member/pay/BillPub.do'">세금계산서 발행 등록</button></li> |
|
| 413 |
- </ul> |
|
| 414 |
- <!--// tab button --> |
|
| 415 |
- <!-- 결제관리 - 요금안내/견적내기 --> |
|
| 416 |
- <div class="serv_content charg_cont current" id="tab5_1"> |
|
| 417 |
- <div class="heading"> |
|
| 418 |
- <h2>요금안내/견적내기</h2> |
|
| 419 |
- <button type="button" class="button info" onclick="infoPop('PayGuide');">사용안내</button>
|
|
| 420 |
- </div> |
|
| 421 |
- <!-- tab button --> |
|
| 422 |
- <div class="pay_tab_wrap"> |
|
| 423 |
- <ul class="tabType1"> |
|
| 424 |
- <li class="tab active"> |
|
| 425 |
- <button type="button" onclick="TabType1(this,'1')">요금안내</button> |
|
| 426 |
- </li> |
|
| 427 |
- <li class="tab"> |
|
| 428 |
- <button type="button" onclick="TabType1(this,'2')" id="btnEstimate">견적내기</button> |
|
| 429 |
- </li> |
|
| 430 |
- </ul> |
|
| 431 |
- </div> |
|
| 432 |
- <!--// tab button --> |
|
| 433 |
- <!-- 결제관리 - 요금안내/견적내기 - 요금안내 --> |
|
| 434 |
- <div class="fee_cont current fee_wrap" id="tab1_1"> |
|
| 435 |
- <div> |
|
| 436 |
- <p class="tType1_title"> |
|
| 437 |
- <img src="/publish/images/content/icon_fee1.png" alt="문자이미지"> 문자<span class="level_first" id="grdShowArea"></span> |
|
| 438 |
- </p> |
|
| 439 |
- <table class="tType2"> |
|
| 440 |
- <caption></caption> |
|
| 441 |
- <colgroup> |
|
| 442 |
- <col style="width: 18%;"> |
|
| 443 |
- <col style="width: auto;"> |
|
| 444 |
- <col style="width: 32%;"> |
|
| 445 |
- </colgroup> |
|
| 446 |
- <thead> |
|
| 447 |
- <tr> |
|
| 448 |
- <th>구분</th> |
|
| 449 |
- <th>특징</th> |
|
| 450 |
- <th>가격</th> |
|
| 451 |
- </tr> |
|
| 452 |
- </thead> |
|
| 453 |
- <tbody> |
|
| 454 |
- <tr> |
|
| 455 |
- <th>단문(SMS)</th> |
|
| 456 |
- <td>90Byte 이하 단문 메시지(이미지 첨부 불가)</td> |
|
| 457 |
- <td><span>${shortPrice}</span>원</td>
|
|
| 458 |
- </tr> |
|
| 459 |
- <tr> |
|
| 460 |
- <th>장문(LMS)</th> |
|
| 461 |
- <td>91~2,000Byte 이하 장문메시지(이미지 첨부 불가)</td> |
|
| 462 |
- <td><span>${longPrice}</span>원</td>
|
|
| 463 |
- </tr> |
|
| 464 |
- <tr> |
|
| 465 |
- <th>그림문자(MMS)</th> |
|
| 466 |
- <td>2,000Byte 이하 문자 및 이미지를 포함하는그림메시지(이미지 최대 3장 첨부 가능) </td> |
|
| 467 |
- <td>1장 : <span>${picturePrice}</span>원 / 2장 : <span>${picturePrice2}<span>원/ 3장 : <span>${picturePrice3}</span>원</td>
|
|
| 468 |
- </tr> |
|
| 469 |
- </tbody> |
|
| 470 |
- </table> |
|
| 471 |
- <span class="reqTxt4">* 텍스트 용량(Byte)에 대한 안내 : 한글2Byte, 영문·숫자 1Byte를 차지.</span> |
|
| 472 |
- |
|
| 473 |
- <!--문자_등급별 요금 안내 추가 시작--> |
|
| 474 |
- <div id="mberGrdSettingArea" style="display: none;"> |
|
| 475 |
- <p class="tType1_title level"><img src="/publish/images/content/icon_fee1.png" alt="문자이미지"> 문자<span>(등급별 요금 안내)</span></p> |
|
| 476 |
- <table class="tType2 tType2_level"> |
|
| 477 |
- <caption></caption> |
|
| 478 |
- <colgroup> |
|
| 479 |
- <col style="width: 13%;"> |
|
| 480 |
- <col style="width: auto;"> |
|
| 481 |
- <col style="width: 11%;"> |
|
| 482 |
- <col style="width: 11%;"> |
|
| 483 |
- <col style="width: 11%;"> |
|
| 484 |
- <col style="width: 11%;"> |
|
| 485 |
- <col style="width: 11%;"> |
|
| 486 |
- </colgroup> |
|
| 487 |
- <thead> |
|
| 488 |
- <tr> |
|
| 489 |
- <th>등급</th> |
|
| 490 |
- <th class="th_second">누적결제액<span id="levelSubTitle"></span></th> |
|
| 491 |
- <th>단문</th> |
|
| 492 |
- <th>장문</th> |
|
| 493 |
- <th>그림(1장)</th> |
|
| 494 |
- <th>그림(2장)</th> |
|
| 495 |
- <th>그림(3장)</th> |
|
| 496 |
- </tr> |
|
| 497 |
- </thead> |
|
| 498 |
- <tbody> |
|
| 499 |
- <c:forEach var="result" items="${mberGrdSettingList}" varStatus="status">
|
|
| 500 |
- <tr class="level_table"> |
|
| 501 |
- <th><c:out value="${result.grdSetNm}"/></th>
|
|
| 502 |
- <td class="level_price"><c:out value="${result.stdAmtComma}"/></td>
|
|
| 503 |
- <td><c:out value="${result.shortPrice}"/></td>
|
|
| 504 |
- <td><c:out value="${result.longPrice}"/></td>
|
|
| 505 |
- <td><c:out value="${result.picturePrice}"/></td>
|
|
| 506 |
- <td><c:out value="${result.picture2Price}"/></td>
|
|
| 507 |
- <td><c:out value="${result.picture3Price}"/></td>
|
|
| 508 |
- </tr> |
|
| 509 |
- </c:forEach> |
|
| 510 |
- </tbody> |
|
| 511 |
- </table> |
|
| 512 |
- <span class="reqTxt4"> |
|
| 513 |
- * 등급별 요금제는 당사의 정책 및 운영의 필요상 수정, 중단 또는 변경될 수 있습니다. <br> |
|
| 514 |
- * 누적결제액은 등급별 요금제 적용일로부터 적립된 결제금액을 말하며, 누적결제액에 따라 등급은 자동으로 적용됩니다. <br> |
|
| 515 |
- * "첫결제 이벤트" 등 이벤트 결제금액은 등급별 요금제 누적결제액에서 제외됩니다. <br> |
|
| 516 |
- </span> |
|
| 517 |
- <p class="reqTxt4 reqTxt4_last"> |
|
| 518 |
- * 문자피싱, 스미싱, 주식, 도박, 로또, 스팸, 사기, 협박, 범죄, 유사투자, 유사수신 등을 목적으로 하거나 교사 또는 방조하는 내용의 정보, 발신번호 조작 등으로 인지되는 문자에 대해서는 사전 또는 즉시 발송을 차단하고 |
|
| 519 |
- 이용을 정지시킬 수 있으며, 이에 대한 어떠한 환불이나 보상을 실시하지 않습니다. 또한, 상기 문자를 발송한 회원에 대해서는 그 즉시 등급별 요금제 혜택을 취소합니다. |
|
| 520 |
- </p> |
|
| 521 |
- </div> |
|
| 522 |
- <!--문자_등급별 요금 안내 추가 끝--> |
|
| 523 |
- |
|
| 524 |
- <p class="tType1_title"><img src="/publish/images/content/icon_fee2.png" alt="알림톡 아이콘 이미지"> 알림톡</p> |
|
| 525 |
- <table class="tType2"> |
|
| 526 |
- <colgroup> |
|
| 527 |
- <col style="width: 20%;"> |
|
| 528 |
- <col style="width: 60%;"> |
|
| 529 |
- <col style="width: 20%;"> |
|
| 530 |
- </colgroup> |
|
| 531 |
- <thead> |
|
| 532 |
- <tr> |
|
| 533 |
- <th>구분</th> |
|
| 534 |
- <th>특징</th> |
|
| 535 |
- <th>가격</th> |
|
| 536 |
- </tr> |
|
| 537 |
- </thead> |
|
| 538 |
- <tbody> |
|
| 539 |
- <tr> |
|
| 540 |
- <th>알림톡</th> |
|
| 541 |
- <td>카카오톡을 통해 친구 추가 여부와 관계 없이 휴대폰 번호로 발송이 가능한 정보성 메시지<br>(1,000자 이하의 텍스트 및 이미지 중 카카오 사전 승인 건에 한하여 발송 가능)</td> |
|
| 542 |
- <td>1장 : <span>${kakaoAtPrice}</span>원</td>
|
|
| 543 |
- </tr> |
|
| 544 |
- </tbody> |
|
| 545 |
- </table> |
|
| 546 |
- <span class="reqTxt4">* 텍스트 용량(Byte)에 대한 안내 : 한글2Byte, 영문·숫자 1Byte를 차지.</span> |
|
| 547 |
- |
|
| 548 |
- <p class="tType1_title"><img src="/publish/images/content/icon_fee_fax.png" alt="팩스 아이콘 이미지"> 팩스</p> |
|
| 549 |
- <table class="tType2"> |
|
| 550 |
- <colgroup> |
|
| 551 |
- <col style="width: 20%;"> |
|
| 552 |
- <col style="width: 60%;"> |
|
| 553 |
- <col style="width: 20%;"> |
|
| 554 |
- </colgroup> |
|
| 555 |
- <thead> |
|
| 556 |
- <tr> |
|
| 557 |
- <th>구분</th> |
|
| 558 |
- <th>특징(전송가능확장자)</th> |
|
| 559 |
- <th>가격</th> |
|
| 560 |
- </tr> |
|
| 561 |
- </thead> |
|
| 562 |
- <tbody> |
|
| 563 |
- <tr> |
|
| 564 |
- <th>팩스</th> |
|
| 565 |
- <td>전송 가능 파일(hwp, pdf, ppt, xls, xlsx, doc, jpg, jpeg, bmp, txt, gif, hwpml, tif, gul)</td> |
|
| 566 |
- <td>1매 : <span>${faxPrice}</span>원</td>
|
|
| 567 |
- </tr> |
|
| 568 |
- </tbody> |
|
| 569 |
- </table> |
|
| 570 |
- |
|
| 571 |
- <p class="tType1_title"><img src="/publish/images/content/icon_fee3.png" alt="그림문자 맞춤제작 이미지"> 그림문자 맞춤제작</p> |
|
| 572 |
- <table class="tType2"> |
|
| 573 |
- <caption></caption> |
|
| 574 |
- <colgroup> |
|
| 575 |
- <col style="width: 80%;"> |
|
| 576 |
- <col style="width: 20%;"> |
|
| 577 |
- </colgroup> |
|
| 578 |
- <thead> |
|
| 579 |
- <tr> |
|
| 580 |
- <th>구분</th> |
|
| 581 |
- <th>가격</th> |
|
| 582 |
- </tr> |
|
| 583 |
- </thead> |
|
| 584 |
- <tbody> |
|
| 585 |
- <tr> |
|
| 586 |
- <th>문자온 샘플 수정(글자, 색상, 폰트 등)</th> |
|
| 587 |
- <td><span>${customSamplePrice}</span>원</td>
|
|
| 588 |
- </tr> |
|
| 589 |
- <tr> |
|
| 590 |
- <th>이미지 편집(첨부이미지 1장)</th> |
|
| 591 |
- <td><span>${customEditPrice}</span>원</td>
|
|
| 592 |
- </tr> |
|
| 593 |
- <tr> |
|
| 594 |
- <th>이미지 편집(첨부이미지 3장이하)</th> |
|
| 595 |
- <td><span>${customEdit3Price}</span>원</td>
|
|
| 596 |
- </tr> |
|
| 597 |
- <tr> |
|
| 598 |
- <th>텍스트 단순수정</th> |
|
| 599 |
- <td><span>${customTextPrice}</span>원</td>
|
|
| 600 |
- </tr> |
|
| 601 |
- </tbody> |
|
| 602 |
- </table> |
|
| 603 |
- <span class="reqTxt4">* 텍스트 단순수정 요청은 맞춤제작이 완료된 그림문자의 수정 시에만 가능합니다.</span> |
|
| 604 |
- |
|
| 605 |
- <div class="banner"> |
|
| 606 |
- <p>대량발송 고객 가격협의 가능</p> |
|
| 607 |
- <ul> |
|
| 608 |
- <li><img src="/publish/images/content/banner_call01.png" alt=""><p>전화 <strong>1551-8011</strong><p></li> |
|
| 609 |
- <li><img src="/publish/images/content/banner_email01.png" alt=""><p>이메일<span>help@iten.co.kr</span> <button type="button" onclick="location.href='mailto:help@iten.co.kr'">상담하기</button></li> |
|
| 610 |
- <li><img src="/publish/images/content/banner_kakao01.png" alt=""><p>카카오톡<span>munjaon</span><a href="http://pf.kakao.com/_PxoTtb/chat" target="_blank">상담하기</a><p></li> |
|
| 611 |
- </ul> |
|
| 612 |
- </div> |
|
| 613 |
- </div> |
|
| 614 |
- </div> |
|
| 615 |
- <!--// 결제관리 - 요금안내/견적내기 - 요금안내 --> |
|
| 616 |
- |
|
| 617 |
- <!-- 결제관리 - 요금안내/견적내기 - 견적내기 --> |
|
| 618 |
- <div class="fee_cont" id="tab1_2"> |
|
| 619 |
- <ul class="clause_list"> |
|
| 620 |
- <li class="list_open on"> |
|
| 621 |
- <div class="clause_list_head"> |
|
| 622 |
- <div class="list_head_in"> |
|
| 623 |
- <span><i></i>요금안내</span> |
|
| 624 |
- <button type="button" onclick="clause_list(this);"><i></i></button> |
|
| 625 |
- </div> |
|
| 626 |
- </div> |
|
| 627 |
- <div class="clause_list_body"> |
|
| 628 |
- <table class="refund_info"> |
|
| 629 |
- <caption>요금 안내</caption> |
|
| 630 |
- <colgroup> |
|
| 631 |
- <col style="width: 13%;"> |
|
| 632 |
- <col style="width: auto;"> |
|
| 633 |
- <col style="width: 25%;"> |
|
| 634 |
- </colgroup> |
|
| 635 |
- <thead> |
|
| 636 |
- <tr> |
|
| 637 |
- <th>구분</th> |
|
| 638 |
- <th>특징</th> |
|
| 639 |
- <th>금액</th> |
|
| 640 |
- </tr> |
|
| 641 |
- </thead> |
|
| 642 |
- <tbody> |
|
| 643 |
- <tr> |
|
| 644 |
- <td>단문(SMS)</td> |
|
| 645 |
- <td>90Byte 이하 단문 메시지(이미지 첨부 불가)</td> |
|
| 646 |
- <td><span>${shortPrice}</span>원</td>
|
|
| 647 |
- </tr> |
|
| 648 |
- <tr> |
|
| 649 |
- <td>장문(LMS)</td> |
|
| 650 |
- <td>91~2,000Byte 이하 장문메시지(이미지 첨부 불가)</td> |
|
| 651 |
- <td><span>${longPrice}</span>원</td>
|
|
| 652 |
- <tr> |
|
| 653 |
- <td>그림문자(MMS)</td> |
|
| 654 |
- <td>2,000Byte 이하 문자 및 이미지를 포함하는 그림메시지(이미지 최대 3장 첨부 가능)</td> |
|
| 655 |
- <td>1장 : <span>${picturePrice}</span>원 / 2장 : <span>${picturePrice2}</span>원 / 3장 : <span>${picturePrice3}</span>원</td>
|
|
| 656 |
- </tr> |
|
| 657 |
- <tr> |
|
| 658 |
- <td>카카오(알림톡)</td> |
|
| 659 |
- <td>카카오톡을 통해 친구 추가 여부와 관계 없이 휴대폰 번호로 발송이 가능한 정보성 메시지(1,000자 이하의 텍스트 및 이미지 중 카카오 사전 승인 건에 한하여 발송 가능)</td> |
|
| 660 |
- <td><span>${kakaoAtPrice}</span>원</td>
|
|
| 661 |
- </tr> |
|
| 662 |
- <tr> |
|
| 663 |
- <td>팩스</td> |
|
| 664 |
- <td>전송 가능 파일(hwp, pdf, ppt, xls, xlsx, doc, jpg, jpeg, bmp, txt, gif, hwpml, tif, htm, html, gul)</td> |
|
| 665 |
- <td><span>${faxPrice}</span>원</td>
|
|
| 666 |
- </tr> |
|
| 667 |
- <tr> |
|
| 668 |
- <td>맞춤제작</td> |
|
| 669 |
- <td>문자온 샘플 수정(글자, 색상, 폰트 등)</td> |
|
| 670 |
- <td><span>${customSamplePrice}</span>원</td>
|
|
| 671 |
- </tr> |
|
| 672 |
- <tr> |
|
| 673 |
- <td>맞춤제작</td> |
|
| 674 |
- <td>이미지 편집(첨부이미지 1장)</td> |
|
| 675 |
- <td><span>${customEditPrice}</span>원</td>
|
|
| 676 |
- </tr> |
|
| 677 |
- <tr> |
|
| 678 |
- <td>맞춤제작</td> |
|
| 679 |
- <td>이미지 편집(첨부이미지 3장이하)</td> |
|
| 680 |
- <td><span>${customEdit3Price}</span>원</td>
|
|
| 681 |
- </tr> |
|
| 682 |
- <tr> |
|
| 683 |
- <td>맞춤제작</td> |
|
| 684 |
- <td>텍스트 단순수정</td> |
|
| 685 |
- <td><span>${customTextPrice}</span>원</td>
|
|
| 686 |
- </tr> |
|
| 687 |
- </tbody> |
|
| 688 |
- </table> |
|
| 689 |
- </div> |
|
| 690 |
- </li> |
|
| 691 |
- </ul> |
|
| 692 |
- <div> |
|
| 693 |
- <p class="tType1_title">일반정보</p> |
|
| 694 |
- <table class="tType1"> |
|
| 695 |
- <caption></caption> |
|
| 696 |
- <colgroup> |
|
| 697 |
- <col style="width: 150px;"> |
|
| 698 |
- <col style="width: auto;"> |
|
| 699 |
- </colgroup> |
|
| 700 |
- <tbody> |
|
| 701 |
- <tr> |
|
| 702 |
- <th>제목</th> |
|
| 703 |
- <td> |
|
| 704 |
- <label for="" class="label">견적내기 제목</label> |
|
| 705 |
- <input type="text" id="title" name="title" placeholder="견적서" onfocus="this.placeholder=''" onblur="this.placeholder='견적서'" style="width: 400px;" maxlength="20"> |
|
| 706 |
- </td> |
|
| 707 |
- </tr> |
|
| 708 |
- <tr> |
|
| 709 |
- <th>수신자(기업명)</th> |
|
| 710 |
- <td> |
|
| 711 |
- <label for="" class="label">수신자(기업명) 입력</label> |
|
| 712 |
- <input type="text" id="recipientName" name="recipientName" style="width: 400px;" maxlength="18"> |
|
| 713 |
- </td> |
|
| 714 |
- </tr> |
|
| 715 |
- <tr> |
|
| 716 |
- <th>담당자(성명)</th> |
|
| 717 |
- <td> |
|
| 718 |
- <label for="" class="label">담당자(성명) 입력</label> |
|
| 719 |
- <input type="text" id="managerName" name="managerName" style="width: 400px;" maxlength="18"> |
|
| 720 |
- </td> |
|
| 721 |
- </tr> |
|
| 722 |
- <tr> |
|
| 723 |
- <th>연락처</th> |
|
| 724 |
- <td> |
|
| 725 |
- <label for="" class="label">연락처 입력</label> |
|
| 726 |
- <input type="text" onkeyup="inputPagesNumber(this)"; maxlength="11" id="mobile" name="mobile" style="width: 400px;"> |
|
| 727 |
- </td> |
|
| 728 |
- </tr> |
|
| 729 |
- <tr> |
|
| 730 |
- <th>발행일</th> |
|
| 731 |
- <td> |
|
| 732 |
- <div class="calendar_wrap"> |
|
| 733 |
- <input type="text" class="calendar" title="발행일" id="publishDate" name="publishDate"> |
|
| 734 |
- </div> |
|
| 735 |
- </td> |
|
| 736 |
- </tr> |
|
| 737 |
- </tbody> |
|
| 738 |
- </table> |
|
| 739 |
- |
|
| 740 |
- <p class="tType1_title">품목정보</p> |
|
| 741 |
- <table class="tType1 itemInfo"> |
|
| 742 |
- <caption></caption> |
|
| 743 |
- <colgroup> |
|
| 744 |
- <col style="width: 150px;"> |
|
| 745 |
- <col style="width: auto;"> |
|
| 746 |
- </colgroup> |
|
| 747 |
- <tbody> |
|
| 748 |
- <tr> |
|
| 749 |
- <th>구분</th> |
|
| 750 |
- <td> |
|
| 751 |
- <label for="" class="label">품목 선택</label> |
|
| 752 |
- <select id="smsItem" name="smsItem" onchange="fn_gunClear();" style="width: 210px;"> |
|
| 753 |
- </select> |
|
| 754 |
- <label for="" class="label">품목 별 단가</label> |
|
| 755 |
- <input type="text" id="unitPrice" name="unitPrice" value="0" placeholder="" readonly class="readonly"> |
|
| 756 |
- <p class="input_in">원</p> |
|
| 757 |
- </td> |
|
| 758 |
- </tr> |
|
| 759 |
- <tr> |
|
| 760 |
- <th>건수</th> |
|
| 761 |
- <td class="publish_btn"> |
|
| 762 |
- <label for="" class="label">건수 입력</label> |
|
| 763 |
- <input type="text" id="caseNumber" numberOnly maxlength="10" name="caseNumber" style="width: 210px;" onkeyup="inputNumberFormatPay(this)"> |
|
| 764 |
- <p class="input_in">건</p> |
|
| 765 |
- <div> |
|
| 766 |
- <button type="button" class="btnType" id="btnItemAdd">품목추가<i class="arrow_img"></i></button> |
|
| 767 |
- </div> |
|
| 768 |
- </td> |
|
| 769 |
- </tr> |
|
| 770 |
- <tr id="faxPages" style="display:none;"> |
|
| 771 |
- <th>매수</th> |
|
| 772 |
- <td class="publish_btn"> |
|
| 773 |
- <label for="" class="label">매수 입력</label> |
|
| 774 |
- <input type="text" id="casePage" name="casePage" style="width: 210px;" onkeyup="inputPagesNumberFormatPay(this)"> |
|
| 775 |
- <p class="input_in">매</p> |
|
| 776 |
- </td> |
|
| 777 |
- </tr> |
|
| 778 |
- </tbody> |
|
| 779 |
- </table> |
|
| 780 |
- <div class="search_group_bottom2"> |
|
| 781 |
- <div class="btnWrap1"> |
|
| 782 |
- <button type="button" class="btnType" id="btnItemDel"><i class="remove_img"></i>선택삭제</button> |
|
| 783 |
- </div> |
|
| 784 |
- </div> |
|
| 785 |
- <!-- table --> |
|
| 786 |
- <div class="tType3 payDetail"> |
|
| 787 |
- <!-- thead --> |
|
| 788 |
- <div class="tType3_hd"> |
|
| 789 |
- <div> |
|
| 790 |
- <label for="" class="label">전체 선택</label> |
|
| 791 |
- <input type="checkbox" id="chkAll"> |
|
| 792 |
- </div> |
|
| 793 |
- <div>품목</div> |
|
| 794 |
- <div>단가(원)</div> |
|
| 795 |
- <div>건수(건)</div> |
|
| 796 |
- <div>공급가액(원)</div> |
|
| 797 |
- <div>세액(부가세)</div> |
|
| 798 |
- <div>금액(원)</div> |
|
| 799 |
- </div> |
|
| 800 |
- <!-- tbody --> |
|
| 801 |
- <div class="tType3_bd_wrap" id="itemList"> |
|
| 802 |
- <div class="tType3_bd"> |
|
| 803 |
- <div></div> |
|
| 804 |
- <div></div> |
|
| 805 |
- <div></div> |
|
| 806 |
- <div></div> |
|
| 807 |
- <div></div> |
|
| 808 |
- <div></div> |
|
| 809 |
- <div></div> |
|
| 810 |
- </div> |
|
| 811 |
- </div> |
|
| 812 |
- </div> |
|
| 813 |
- <!--// table --> |
|
| 814 |
- <div class="tb_wrap totalPrice_tb"> |
|
| 815 |
- <table class="tType4"> |
|
| 816 |
- <colgroup> |
|
| 817 |
- <col style="width: 25%;"> |
|
| 818 |
- <col style="width: 25%;"> |
|
| 819 |
- <col style="width: 30%;"> |
|
| 820 |
- <col style="width: 15%;"> |
|
| 821 |
- </colgroup> |
|
| 822 |
- <thead> |
|
| 823 |
- <tr> |
|
| 824 |
- <th>공급가액</th> |
|
| 825 |
- <th>세액(부가세)</th> |
|
| 826 |
- <th>합계</th> |
|
| 827 |
- <th>비고</th> |
|
| 828 |
- </tr> |
|
| 829 |
- </thead> |
|
| 830 |
- <tbody> |
|
| 831 |
- <tr> |
|
| 832 |
- <td> |
|
| 833 |
- <span id="supplySumPriceStr"></span> |
|
| 834 |
- </td> |
|
| 835 |
- <td> |
|
| 836 |
- <span id="isVatStr"></span> |
|
| 837 |
- </td> |
|
| 838 |
- <td> |
|
| 839 |
- <span id="totSumPriceStr"></span> |
|
| 840 |
- </td> |
|
| 841 |
- <td style="text-align: center;"> |
|
| 842 |
- <label for="" class="label">부가세 포함,별도 선택</label> |
|
| 843 |
- <select id="isVat" name="isVat" class="selType2"> |
|
| 844 |
- <option value="0">부가세 별도</option> |
|
| 845 |
- <option value="1" selected>부가세 포함</option> |
|
| 846 |
- </select> |
|
| 847 |
- </td> |
|
| 848 |
- </tr> |
|
| 849 |
- </tbody> |
|
| 850 |
- </table> |
|
| 851 |
- </div> |
|
| 852 |
- <!-- //주소록리스트 --> |
|
| 853 |
- <div style="text-align: center;"> |
|
| 854 |
- <button class="btnType btnType16" onclick="showEst(); return false;">발행하기</button> |
|
| 855 |
- </div> |
|
| 856 |
- </div> |
|
| 857 |
- </div> |
|
| 858 |
- <!-- 결제관리 - 요금안내/견적내기 - 견적내기 --> |
|
| 859 |
- </div> |
|
| 860 |
- </div> |
|
| 861 |
- <!-- 결제관리 - 요금안내/견적내기 --> |
|
| 862 |
- </div> |
|
| 863 |
- <!--// send top --> |
|
| 864 |
-</form> |
|
| 865 |
-<form name="infoPopForm" id="infoPopForm" method="post"> |
|
| 866 |
- <input type="hidden" name="pageType" id="pageType" value=""/> |
|
| 867 |
-</form> |
|
| 1 |
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|
| 4 |
+ |
|
| 5 |
+<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> |
|
| 6 |
+ |
|
| 7 |
+<script> |
|
| 8 |
+// 문자 단가 |
|
| 9 |
+var shortPrice = "${shortPrice}";
|
|
| 10 |
+var longPrice = "${longPrice}";
|
|
| 11 |
+var picturePrice = "${picturePrice}";
|
|
| 12 |
+var picturePrice2 = "${picturePrice2}";
|
|
| 13 |
+var picturePrice3 = "${picturePrice3}";
|
|
| 14 |
+var kakaoAtPrice = "${kakaoAtPrice}";
|
|
| 15 |
+var faxPrice = "${faxPrice}";
|
|
| 16 |
+ |
|
| 17 |
+var smsList = new Array(); // 품목추가 Array |
|
| 18 |
+var supplySumPrice = 0; // 공급가액 |
|
| 19 |
+var vatSumPrice = 0; // 부가세액 |
|
| 20 |
+var totSumPrice = 0; // 합계 |
|
| 21 |
+ |
|
| 22 |
+// 탭이동 |
|
| 23 |
+var tabType = "${tabType}";
|
|
| 24 |
+ |
|
| 25 |
+$(document).ready(function () {
|
|
| 26 |
+ |
|
| 27 |
+ // 품목정보 추가 |
|
| 28 |
+ getSmsItemAdd(); |
|
| 29 |
+ |
|
| 30 |
+ // 품목 Change Event |
|
| 31 |
+ $("#smsItem").change(function(){
|
|
| 32 |
+ $("#unitPrice").val($("#smsItem option:selected").val());
|
|
| 33 |
+ |
|
| 34 |
+ var optNm = $("#smsItem option:selected").text();
|
|
| 35 |
+ if(optNm.includes('팩스')){
|
|
| 36 |
+ $('#faxPages').show();
|
|
| 37 |
+ }else{
|
|
| 38 |
+ $('#faxPages').hide();
|
|
| 39 |
+ } |
|
| 40 |
+ }); |
|
| 41 |
+ |
|
| 42 |
+ // 품목추가 Click Event |
|
| 43 |
+ $("#btnItemAdd").click(function(){
|
|
| 44 |
+ // 품목추가 |
|
| 45 |
+ setItemAdd(); |
|
| 46 |
+ }); |
|
| 47 |
+ |
|
| 48 |
+ // 품목삭제 Click Event |
|
| 49 |
+ $("#btnItemDel").click(function(){
|
|
| 50 |
+ // 품목삭제 |
|
| 51 |
+ setItemDel(); |
|
| 52 |
+ |
|
| 53 |
+ //품목추가 Html |
|
| 54 |
+ setItemAddHtml(); |
|
| 55 |
+ }); |
|
| 56 |
+ |
|
| 57 |
+ // 부가세별도 여부 Change Event |
|
| 58 |
+ $("#isVat").change(function(){
|
|
| 59 |
+ //품목추가 Html |
|
| 60 |
+ setItemAddHtml(); |
|
| 61 |
+ }); |
|
| 62 |
+ |
|
| 63 |
+ // 견적내기화면으로 이동 |
|
| 64 |
+ if (tabType == "2") {
|
|
| 65 |
+ $("#btnEstimate").trigger("click");
|
|
| 66 |
+ } |
|
| 67 |
+ |
|
| 68 |
+ //등급제 시행 ON/OFF 체크(비로그인) |
|
| 69 |
+ //getMberSettingDetailByNotLogin(); |
|
| 70 |
+ |
|
| 71 |
+ // 등급제 대상 여부 |
|
| 72 |
+ //getMberGrdChk(); |
|
| 73 |
+ |
|
| 74 |
+}); |
|
| 75 |
+ |
|
| 76 |
+//품목정보 추가 |
|
| 77 |
+function getSmsItemAdd() {
|
|
| 78 |
+ var sHtml = ""; |
|
| 79 |
+ sHtml += "<option value='" + shortPrice + "'>단문(SMS)</option>"; |
|
| 80 |
+ sHtml += "<option value='" + longPrice + "'>장문(LMS)</option>"; |
|
| 81 |
+ sHtml += "<option value='" + picturePrice + "'>그림문자(1장)</option>"; |
|
| 82 |
+ sHtml += "<option value='" + picturePrice2 + "'>그림문자(2장)</option>"; |
|
| 83 |
+ sHtml += "<option value='" + picturePrice3 + "'>그림문자(3장)</option>"; |
|
| 84 |
+ sHtml += "<option value='" + kakaoAtPrice + "'>카톡(알림톡)</option>"; |
|
| 85 |
+ sHtml += "<option value='" + faxPrice + "'>팩스</option>"; |
|
| 86 |
+ |
|
| 87 |
+ $("#smsItem").append(sHtml);
|
|
| 88 |
+ |
|
| 89 |
+ // 단가 초기값 |
|
| 90 |
+ $("#unitPrice").val($("#smsItem option:selected").val());
|
|
| 91 |
+} |
|
| 92 |
+ |
|
| 93 |
+ |
|
| 94 |
+// 품목추가 |
|
| 95 |
+function setItemAdd() {
|
|
| 96 |
+ var caseNumber = $("#caseNumber").val().trim().replaceAll(",", "");
|
|
| 97 |
+ var casePage = $("#casePage").val().trim().replaceAll(",", "");
|
|
| 98 |
+ |
|
| 99 |
+ if (caseNumber == null || caseNumber == "" || caseNumber == undefined) {
|
|
| 100 |
+ alert("건수를 입력하세요.");
|
|
| 101 |
+ return false; |
|
| 102 |
+ } |
|
| 103 |
+ else if (isNaN(caseNumber) == true) {
|
|
| 104 |
+ alert("건수는 숫자를 입력하세요.");
|
|
| 105 |
+ return false; |
|
| 106 |
+ } |
|
| 107 |
+ |
|
| 108 |
+ // 객체 생성 |
|
| 109 |
+ var data = new Object(); |
|
| 110 |
+ data.smsItemName = $("#smsItem option:selected").text(); // 품목명
|
|
| 111 |
+ data.unitPrice = $("#unitPrice").val(); // 단가
|
|
| 112 |
+ data.unitPricePlusVat = $("#unitPrice").val(); // 단가
|
|
| 113 |
+ data.caseNumber = caseNumber; // 건수 |
|
| 114 |
+ data.supplyPrice = $("#unitPrice").val() * caseNumber;
|
|
| 115 |
+ data.totPrice = $("#unitPrice").val() * caseNumber; // 금액
|
|
| 116 |
+ |
|
| 117 |
+ var itmNm = data.smsItemName |
|
| 118 |
+ if(itmNm.includes('팩스')){//팩스인 경우 매수 곱해주기
|
|
| 119 |
+ data.casePage = casePage; |
|
| 120 |
+ data.supplyPrice = $("#unitPrice").val() * (caseNumber * casePage);
|
|
| 121 |
+ data.totPrice = $("#unitPrice").val() * (caseNumber * casePage); // 금액
|
|
| 122 |
+ } |
|
| 123 |
+ |
|
| 124 |
+ // 리스트에 생성된 객체 삽입 |
|
| 125 |
+ smsList.push(data); |
|
| 126 |
+ |
|
| 127 |
+ //품목추가 Html |
|
| 128 |
+ setItemAddHtml(); |
|
| 129 |
+ } |
|
| 130 |
+ |
|
| 131 |
+//품목추가 Html |
|
| 132 |
+function setItemAddHtml() {
|
|
| 133 |
+ var isVat = $("#isVat option:selected").val();
|
|
| 134 |
+ |
|
| 135 |
+ // 부가세 케이스별 다시계산 |
|
| 136 |
+ smsList.forEach(function(element) {
|
|
| 137 |
+ var itmNm = element.smsItemName; |
|
| 138 |
+ |
|
| 139 |
+ if (isVat == 1) {
|
|
| 140 |
+ |
|
| 141 |
+ if(itmNm.includes('팩스')){//팩스인 경우 건수 * 매수에 대한 금액의 부가세를 계산해야함.
|
|
| 142 |
+ // 부가세 포함 |
|
| 143 |
+ element.vatPrice = Math.round(element.unitPrice * 0.1 * (element.caseNumber * element.casePage)); |
|
| 144 |
+ }else{
|
|
| 145 |
+ // 부가세 포함 |
|
| 146 |
+ element.vatPrice = Math.round(element.unitPrice * 0.1 * element.caseNumber); |
|
| 147 |
+ //element.unitPricePlusVat = parseInt(element.unitPrice, 10) + Math.round(element.unitPrice * 0.1); |
|
| 148 |
+ } |
|
| 149 |
+ |
|
| 150 |
+ } |
|
| 151 |
+ else {
|
|
| 152 |
+ // 부가세 별도(부가세 : 0) |
|
| 153 |
+ element.vatPrice = 0; |
|
| 154 |
+ } |
|
| 155 |
+ |
|
| 156 |
+ if(itmNm.includes('팩스')){//팩스인 경우 건수 * 매수에 대한 금액의 부가세를 계산해야함.
|
|
| 157 |
+ element.totVatPrice = (element.unitPrice * (element.caseNumber * element.casePage)) + element.vatPrice; // 금액 |
|
| 158 |
+ }else{
|
|
| 159 |
+ element.totVatPrice = (element.unitPrice * element.caseNumber) + element.vatPrice; // 금액 |
|
| 160 |
+ } |
|
| 161 |
+ }) |
|
| 162 |
+ |
|
| 163 |
+ vatSumPrice = 0; |
|
| 164 |
+ supplySumPrice = 0; |
|
| 165 |
+ totSumPrice = 0; |
|
| 166 |
+ |
|
| 167 |
+ var sHtml = ""; |
|
| 168 |
+ smsList.forEach(function(element) {
|
|
| 169 |
+ supplySumPrice += element.supplyPrice; |
|
| 170 |
+ totSumPrice += element.totPrice; |
|
| 171 |
+ |
|
| 172 |
+ sHtml += "<div class='tType3_bd'>"; |
|
| 173 |
+ sHtml += " <div>"; |
|
| 174 |
+ sHtml += " <label for='' class='label'>한 줄 전체 선택</label>"; |
|
| 175 |
+ sHtml += " <input type='checkbox' id='chkEach' name='chkEach'>"; |
|
| 176 |
+ sHtml += " </div>"; |
|
| 177 |
+ sHtml += " <div>" + element.smsItemName + "</div>"; |
|
| 178 |
+ if (isVat == 1) {
|
|
| 179 |
+ // 부가세 포함 |
|
| 180 |
+ sHtml += " <div>" + element.unitPricePlusVat + "</div>"; |
|
| 181 |
+ } |
|
| 182 |
+ else {
|
|
| 183 |
+ sHtml += " <div>" + element.unitPrice + "</div>"; |
|
| 184 |
+ } |
|
| 185 |
+ if(element.smsItemName.includes('팩스')){
|
|
| 186 |
+ sHtml += " <div>" + numberWithCommas(element.caseNumber * element.casePage) + "</div>"; |
|
| 187 |
+ } |
|
| 188 |
+ else {
|
|
| 189 |
+ sHtml += " <div>" + numberWithCommas(element.caseNumber) + "</div>"; |
|
| 190 |
+ } |
|
| 191 |
+ sHtml += " <div>" + numberWithCommas(element.supplyPrice) + "</div>"; |
|
| 192 |
+ sHtml += " <div>" + numberWithCommas(element.vatPrice) + "</div>"; |
|
| 193 |
+ sHtml += " <div>" + numberWithCommas(element.totVatPrice) + "</div>"; |
|
| 194 |
+ sHtml += "</div>"; |
|
| 195 |
+ }) |
|
| 196 |
+ |
|
| 197 |
+ $("#itemList").html(sHtml);
|
|
| 198 |
+ |
|
| 199 |
+ // Sum |
|
| 200 |
+ setEstimateSum(); |
|
| 201 |
+ } |
|
| 202 |
+ |
|
| 203 |
+// Sum |
|
| 204 |
+function setEstimateSum() {
|
|
| 205 |
+ var isVat = $("#isVat option:selected").val();
|
|
| 206 |
+ console.log("setEstimateSum")
|
|
| 207 |
+ if (isVat == 1) {
|
|
| 208 |
+ // 부가세 포함 |
|
| 209 |
+ vatSumPrice = Math.round(supplySumPrice * 0.1); |
|
| 210 |
+ totSumPrice = totSumPrice + vatSumPrice; |
|
| 211 |
+ } |
|
| 212 |
+ else {
|
|
| 213 |
+ // 부가세 별도(부가세 : 0) |
|
| 214 |
+ vatSumPrice = 0; |
|
| 215 |
+ supplySumPrice = supplySumPrice - vatSumPrice;; |
|
| 216 |
+ } |
|
| 217 |
+ |
|
| 218 |
+ $("#supplySumPriceStr").html(numberWithCommas(supplySumPrice));
|
|
| 219 |
+ $("#totSumPriceStr").html(numberWithCommas(totSumPrice));
|
|
| 220 |
+ /* if($("#isVat option:selected").val() == '0'){
|
|
| 221 |
+ $("#isVatStr").html($("#isVat option:selected").text() + '(' + numberWithCommas(vatSumPrice) + ')');
|
|
| 222 |
+ }else{
|
|
| 223 |
+ $("#isVatStr").html($("#isVat option:selected").text());
|
|
| 224 |
+ } */ |
|
| 225 |
+ $("#isVatStr").html(numberWithCommas(vatSumPrice));
|
|
| 226 |
+ |
|
| 227 |
+ $("#smsList").val(JSON.stringify(smsList));
|
|
| 228 |
+ $("#supplySumPrice").val(supplySumPrice);
|
|
| 229 |
+ $("#vatSumPrice").val(vatSumPrice);
|
|
| 230 |
+ $("#totSumPrice").val(totSumPrice);
|
|
| 231 |
+ |
|
| 232 |
+} |
|
| 233 |
+ |
|
| 234 |
+// 품목 삭제 |
|
| 235 |
+function setItemDel() {
|
|
| 236 |
+ //체크박스 체크 |
|
| 237 |
+ var smsListLen = smsList.length; |
|
| 238 |
+ while (smsListLen--) {
|
|
| 239 |
+ if ($('input[name=chkEach]').eq(smsListLen).is(':checked') == true) {
|
|
| 240 |
+ smsList.splice(smsListLen, 1); |
|
| 241 |
+ } |
|
| 242 |
+ } |
|
| 243 |
+} |
|
| 244 |
+ |
|
| 245 |
+//유효성 검사 |
|
| 246 |
+function ValidationCheck() {
|
|
| 247 |
+ var title = $("#title").val().trim();
|
|
| 248 |
+ var recipientName = $("#recipientName").val().trim();
|
|
| 249 |
+ var managerName = $("#managerName").val().trim();
|
|
| 250 |
+ var mobile = $("#mobile").val().trim();
|
|
| 251 |
+ var publishDate = $("#publishDate").val().trim();
|
|
| 252 |
+ |
|
| 253 |
+ if (title == null || title == "" || title == undefined) {
|
|
| 254 |
+ alert("제목을 입력하세요.");
|
|
| 255 |
+ $("#title").focus();
|
|
| 256 |
+ return false; |
|
| 257 |
+ } |
|
| 258 |
+ else if (recipientName == null || recipientName == "" || recipientName == undefined) {
|
|
| 259 |
+ alert("수신자(기업명)을 입력하세요.");
|
|
| 260 |
+ $("#recipientName").focus();
|
|
| 261 |
+ return false; |
|
| 262 |
+ } |
|
| 263 |
+ else if (managerName == null || managerName == "" || managerName == undefined) {
|
|
| 264 |
+ alert("담당자(성명)을 입력하세요.");
|
|
| 265 |
+ $("#managerName").focus();
|
|
| 266 |
+ return false; |
|
| 267 |
+ } |
|
| 268 |
+ else if (mobile == null || mobile == "" || mobile == undefined) {
|
|
| 269 |
+ alert("연락처를 입력하세요.");
|
|
| 270 |
+ $("#mobile").focus();
|
|
| 271 |
+ return false; |
|
| 272 |
+ } |
|
| 273 |
+ else if (publishDate == null || publishDate == "" || publishDate == undefined) {
|
|
| 274 |
+ alert("발행일을 입력하세요.");
|
|
| 275 |
+ $("#publishDate").focus();
|
|
| 276 |
+ return false; |
|
| 277 |
+ } |
|
| 278 |
+ else if (smsList.length == 0) {
|
|
| 279 |
+ alert("품목정보를 하나이상 추가해주세요.");
|
|
| 280 |
+ return false; |
|
| 281 |
+ } |
|
| 282 |
+} |
|
| 283 |
+ |
|
| 284 |
+/* 인쇄미리보기 클릭 시 견적서 새창 팝업 오픈 */ |
|
| 285 |
+function showEst() {
|
|
| 286 |
+ |
|
| 287 |
+ // 유효성 검사 |
|
| 288 |
+ if (ValidationCheck() == false) return false; |
|
| 289 |
+ |
|
| 290 |
+ //만들려는 팝업의 크기 |
|
| 291 |
+ var popup_wid = 820; |
|
| 292 |
+ var popup_ht = 900; |
|
| 293 |
+ |
|
| 294 |
+ //중앙 정렬을 위해 윈도우 스크린의 width,height 구하는 변수 만듦 |
|
| 295 |
+ var popup_left = (window.screen.width / 2) - (popup_wid / 2); |
|
| 296 |
+ var popup_top =(window.screen.height / 2) - (popup_ht / 2); |
|
| 297 |
+ |
|
| 298 |
+ // From Submit |
|
| 299 |
+ var myForm = document.popForm; |
|
| 300 |
+ var url = "/web/pay/PayEstimateAjax.do"; |
|
| 301 |
+ window.open('' ,'popForm', 'scrollbars=1, width='+ popup_wid +', height='+ popup_ht +', left=' + popup_left + ', top='+ popup_top);
|
|
| 302 |
+ myForm.action =url; |
|
| 303 |
+ myForm.method="post"; |
|
| 304 |
+ myForm.target="popForm"; |
|
| 305 |
+ myForm.testVal = 'test'; |
|
| 306 |
+ myForm.submit(); |
|
| 307 |
+} |
|
| 308 |
+ |
|
| 309 |
+function inputNumberFormatPay(obj) {
|
|
| 310 |
+ $(obj).val($(obj).val().replace(/[^0-9]/g,"")); |
|
| 311 |
+ |
|
| 312 |
+ $('#caseNumber').val(numberWithCommas(obj.value));
|
|
| 313 |
+} |
|
| 314 |
+ |
|
| 315 |
+ |
|
| 316 |
+function inputPagesNumberFormatPay(obj) {
|
|
| 317 |
+ $(obj).val($(obj).val().replace(/[^0-9]/g,"")); |
|
| 318 |
+ |
|
| 319 |
+ $(obj).val(numberWithCommas(obj.value)); |
|
| 320 |
+} |
|
| 321 |
+function inputPagesNumber(obj) {
|
|
| 322 |
+ $(obj).val($(obj).val().replace(/[^0-9]/g,"")); |
|
| 323 |
+} |
|
| 324 |
+ |
|
| 325 |
+function fn_gunClear(){
|
|
| 326 |
+ $('#caseNumber').val('');
|
|
| 327 |
+} |
|
| 328 |
+ |
|
| 329 |
+ |
|
| 330 |
+//체크박스 전체선택/해제 |
|
| 331 |
+$(document).on("click", "#chkAll", function(e) {
|
|
| 332 |
+ var isChecked = $(this).is(":checked");
|
|
| 333 |
+ $("input[name=chkEach]:checkbox").prop("checked", isChecked);
|
|
| 334 |
+}); |
|
| 335 |
+ |
|
| 336 |
+/* 윈도우팝업 열기 */ |
|
| 337 |
+function infoPop(pageUrl){
|
|
| 338 |
+ document.infoPopForm.pageType.value = pageUrl; |
|
| 339 |
+ document.infoPopForm.action = "/web/pop/infoPop.do"; |
|
| 340 |
+ document.infoPopForm.method = "post"; |
|
| 341 |
+ window.open("about:blank", 'infoPop', 'width=790, height=280, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1');
|
|
| 342 |
+ document.infoPopForm.target = "infoPop"; |
|
| 343 |
+ document.infoPopForm.submit(); |
|
| 344 |
+} |
|
| 345 |
+ |
|
| 346 |
+ |
|
| 347 |
+//등급제 시행 ON/OFF 체크(비로그인) |
|
| 348 |
+function getMberSettingDetailByNotLogin() {
|
|
| 349 |
+ $.ajax({
|
|
| 350 |
+ type: "POST", |
|
| 351 |
+ url: "/web/grd/mberSettDetailByNotLoginAjax.do", |
|
| 352 |
+ data: {},
|
|
| 353 |
+ dataType:'json', |
|
| 354 |
+ async: false, |
|
| 355 |
+ success: function (data) {
|
|
| 356 |
+ if (data.isSuccess) {
|
|
| 357 |
+ // 문자(등급별 요금 안내) |
|
| 358 |
+ $("#mberGrdSettingArea").show();
|
|
| 359 |
+ } |
|
| 360 |
+ else {
|
|
| 361 |
+ //alert("Msg : " + data.msg);
|
|
| 362 |
+ } |
|
| 363 |
+ }, |
|
| 364 |
+ error: function (e) {
|
|
| 365 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 366 |
+ } |
|
| 367 |
+ }); |
|
| 368 |
+} |
|
| 369 |
+ |
|
| 370 |
+// 등급제 대상 여부 |
|
| 371 |
+function getMberGrdChk() {
|
|
| 372 |
+ $.ajax({
|
|
| 373 |
+ type: "POST", |
|
| 374 |
+ url: "/web/grd/mberGrdChkAjax.do", |
|
| 375 |
+ data: {},
|
|
| 376 |
+ dataType:'json', |
|
| 377 |
+ async: false, |
|
| 378 |
+ success: function (data) {
|
|
| 379 |
+ if (data.isSuccess) {
|
|
| 380 |
+ // 등급제 누적결제액 세부내역 |
|
| 381 |
+ $("#grdShowArea").html("(등급 : " + data.rtnMberGrdVO.grdSetNm + ")");
|
|
| 382 |
+ $("#levelSubTitle").html("(" + data.rtnMberGrdVO.grdDate + " ~ 현재)");
|
|
| 383 |
+ } |
|
| 384 |
+ else {
|
|
| 385 |
+ //alert("Msg : " + data.msg);
|
|
| 386 |
+ } |
|
| 387 |
+ }, |
|
| 388 |
+ error: function (e) {
|
|
| 389 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 390 |
+ } |
|
| 391 |
+ }); |
|
| 392 |
+} |
|
| 393 |
+ |
|
| 394 |
+</script> |
|
| 395 |
+ |
|
| 396 |
+<form name="popForm" method="post"> |
|
| 397 |
+ <input type="hidden" name="smsList" id="smsList" value="" /> |
|
| 398 |
+ <input type="hidden" name="supplySumPrice" id="supplySumPrice" value="" /> |
|
| 399 |
+ <input type="hidden" name="vatSumPrice" id="vatSumPrice" value="" /> |
|
| 400 |
+ <input type="hidden" name="totSumPrice" id="totSumPrice" value="" /> |
|
| 401 |
+ |
|
| 402 |
+ <!-- content 영역 --> |
|
| 403 |
+ <div class="inner"> |
|
| 404 |
+ <!-- send top --> |
|
| 405 |
+ <div class="send_top"> |
|
| 406 |
+ <!-- tab button --> |
|
| 407 |
+ <ul class="tabType4"> |
|
| 408 |
+ <li class="tab active"><button type="button">요금안내/견적내기</button></li> |
|
| 409 |
+ <li class="tab"><button type="button" onclick="location.href='/web/member/pay/PayView.do'">결제하기</button></li> |
|
| 410 |
+ <li class="tab"><button type="button" onclick="location.href='/web/member/pay/PayList.do'">요금 결제내역</button></li> |
|
| 411 |
+ <li class="tab"><button type="button" onclick="location.href='/web/member/pay/PayUserSWList.do'">요금 사용내역</button></li> |
|
| 412 |
+ <li class="tab"><button type="button" onclick="location.href='/web/member/pay/BillPub.do'">세금계산서 발행 등록</button></li> |
|
| 413 |
+ </ul> |
|
| 414 |
+ <!--// tab button --> |
|
| 415 |
+ <!-- 결제관리 - 요금안내/견적내기 --> |
|
| 416 |
+ <div class="serv_content charg_cont current" id="tab5_1"> |
|
| 417 |
+ <div class="heading"> |
|
| 418 |
+ <h2>요금안내/견적내기</h2> |
|
| 419 |
+ <button type="button" class="button info" onclick="infoPop('PayGuide');">사용안내</button>
|
|
| 420 |
+ </div> |
|
| 421 |
+ <!-- tab button --> |
|
| 422 |
+ <div class="pay_tab_wrap"> |
|
| 423 |
+ <ul class="tabType1"> |
|
| 424 |
+ <li class="tab active"> |
|
| 425 |
+ <button type="button" onclick="TabType1(this,'1')">요금안내</button> |
|
| 426 |
+ </li> |
|
| 427 |
+ <li class="tab"> |
|
| 428 |
+ <button type="button" onclick="TabType1(this,'2')" id="btnEstimate">견적내기</button> |
|
| 429 |
+ </li> |
|
| 430 |
+ </ul> |
|
| 431 |
+ </div> |
|
| 432 |
+ <!--// tab button --> |
|
| 433 |
+ <!-- 결제관리 - 요금안내/견적내기 - 요금안내 --> |
|
| 434 |
+ <div class="fee_cont current fee_wrap" id="tab1_1"> |
|
| 435 |
+ <div> |
|
| 436 |
+ <p class="tType1_title"> |
|
| 437 |
+ <img src="/publish/images/content/icon_fee1.png" alt="문자이미지"> 문자<span class="level_first" id="grdShowArea"></span> |
|
| 438 |
+ </p> |
|
| 439 |
+ <table class="tType2"> |
|
| 440 |
+ <caption></caption> |
|
| 441 |
+ <colgroup> |
|
| 442 |
+ <col style="width: 18%;"> |
|
| 443 |
+ <col style="width: auto;"> |
|
| 444 |
+ <col style="width: 32%;"> |
|
| 445 |
+ </colgroup> |
|
| 446 |
+ <thead> |
|
| 447 |
+ <tr> |
|
| 448 |
+ <th>구분</th> |
|
| 449 |
+ <th>특징</th> |
|
| 450 |
+ <th>가격</th> |
|
| 451 |
+ </tr> |
|
| 452 |
+ </thead> |
|
| 453 |
+ <tbody> |
|
| 454 |
+ <tr> |
|
| 455 |
+ <th>단문(SMS)</th> |
|
| 456 |
+ <td>90Byte 이하 단문 메시지(이미지 첨부 불가)</td> |
|
| 457 |
+ <td><span>${shortPrice}</span>원</td>
|
|
| 458 |
+ </tr> |
|
| 459 |
+ <tr> |
|
| 460 |
+ <th>장문(LMS)</th> |
|
| 461 |
+ <td>91~2,000Byte 이하 장문메시지(이미지 첨부 불가)</td> |
|
| 462 |
+ <td><span>${longPrice}</span>원</td>
|
|
| 463 |
+ </tr> |
|
| 464 |
+ <tr> |
|
| 465 |
+ <th>그림문자(MMS)</th> |
|
| 466 |
+ <td>2,000Byte 이하 문자 및 이미지를 포함하는그림메시지(이미지 최대 3장 첨부 가능) </td> |
|
| 467 |
+ <td>1장 : <span>${picturePrice}</span>원 / 2장 : <span>${picturePrice2}<span>원/ 3장 : <span>${picturePrice3}</span>원</td>
|
|
| 468 |
+ </tr> |
|
| 469 |
+ </tbody> |
|
| 470 |
+ </table> |
|
| 471 |
+ <span class="reqTxt4">* 텍스트 용량(Byte)에 대한 안내 : 한글2Byte, 영문·숫자 1Byte를 차지.</span> |
|
| 472 |
+ |
|
| 473 |
+ <!--문자_등급별 요금 안내 추가 시작--> |
|
| 474 |
+ <div id="mberGrdSettingArea" style="display: none;"> |
|
| 475 |
+ <p class="tType1_title level"><img src="/publish/images/content/icon_fee1.png" alt="문자이미지"> 문자<span>(등급별 요금 안내)</span></p> |
|
| 476 |
+ <table class="tType2 tType2_level"> |
|
| 477 |
+ <caption></caption> |
|
| 478 |
+ <colgroup> |
|
| 479 |
+ <col style="width: 13%;"> |
|
| 480 |
+ <col style="width: auto;"> |
|
| 481 |
+ <col style="width: 11%;"> |
|
| 482 |
+ <col style="width: 11%;"> |
|
| 483 |
+ <col style="width: 11%;"> |
|
| 484 |
+ <col style="width: 11%;"> |
|
| 485 |
+ <col style="width: 11%;"> |
|
| 486 |
+ </colgroup> |
|
| 487 |
+ <thead> |
|
| 488 |
+ <tr> |
|
| 489 |
+ <th>등급</th> |
|
| 490 |
+ <th class="th_second">누적결제액<span id="levelSubTitle"></span></th> |
|
| 491 |
+ <th>단문</th> |
|
| 492 |
+ <th>장문</th> |
|
| 493 |
+ <th>그림(1장)</th> |
|
| 494 |
+ <th>그림(2장)</th> |
|
| 495 |
+ <th>그림(3장)</th> |
|
| 496 |
+ </tr> |
|
| 497 |
+ </thead> |
|
| 498 |
+ <tbody> |
|
| 499 |
+ <c:forEach var="result" items="${mberGrdSettingList}" varStatus="status">
|
|
| 500 |
+ <tr class="level_table"> |
|
| 501 |
+ <th><c:out value="${result.grdSetNm}"/></th>
|
|
| 502 |
+ <td class="level_price"><c:out value="${result.stdAmtComma}"/></td>
|
|
| 503 |
+ <td><c:out value="${result.shortPrice}"/></td>
|
|
| 504 |
+ <td><c:out value="${result.longPrice}"/></td>
|
|
| 505 |
+ <td><c:out value="${result.picturePrice}"/></td>
|
|
| 506 |
+ <td><c:out value="${result.picture2Price}"/></td>
|
|
| 507 |
+ <td><c:out value="${result.picture3Price}"/></td>
|
|
| 508 |
+ </tr> |
|
| 509 |
+ </c:forEach> |
|
| 510 |
+ </tbody> |
|
| 511 |
+ </table> |
|
| 512 |
+ <span class="reqTxt4"> |
|
| 513 |
+ * 등급별 요금제는 당사의 정책 및 운영의 필요상 수정, 중단 또는 변경될 수 있습니다. <br> |
|
| 514 |
+ * 누적결제액은 등급별 요금제 적용일로부터 적립된 결제금액을 말하며, 누적결제액에 따라 등급은 자동으로 적용됩니다. <br> |
|
| 515 |
+ * "첫결제 이벤트" 등 이벤트 결제금액은 등급별 요금제 누적결제액에서 제외됩니다. <br> |
|
| 516 |
+ </span> |
|
| 517 |
+ <p class="reqTxt4 reqTxt4_last"> |
|
| 518 |
+ * 문자피싱, 스미싱, 주식, 도박, 로또, 스팸, 사기, 협박, 범죄, 유사투자, 유사수신 등을 목적으로 하거나 교사 또는 방조하는 내용의 정보, 발신번호 조작 등으로 인지되는 문자에 대해서는 사전 또는 즉시 발송을 차단하고 |
|
| 519 |
+ 이용을 정지시킬 수 있으며, 이에 대한 어떠한 환불이나 보상을 실시하지 않습니다. 또한, 상기 문자를 발송한 회원에 대해서는 그 즉시 등급별 요금제 혜택을 취소합니다. |
|
| 520 |
+ </p> |
|
| 521 |
+ </div> |
|
| 522 |
+ <!--문자_등급별 요금 안내 추가 끝--> |
|
| 523 |
+ |
|
| 524 |
+ <p class="tType1_title"><img src="/publish/images/content/icon_fee2.png" alt="알림톡 아이콘 이미지"> 알림톡</p> |
|
| 525 |
+ <table class="tType2"> |
|
| 526 |
+ <colgroup> |
|
| 527 |
+ <col style="width: 20%;"> |
|
| 528 |
+ <col style="width: 60%;"> |
|
| 529 |
+ <col style="width: 20%;"> |
|
| 530 |
+ </colgroup> |
|
| 531 |
+ <thead> |
|
| 532 |
+ <tr> |
|
| 533 |
+ <th>구분</th> |
|
| 534 |
+ <th>특징</th> |
|
| 535 |
+ <th>가격</th> |
|
| 536 |
+ </tr> |
|
| 537 |
+ </thead> |
|
| 538 |
+ <tbody> |
|
| 539 |
+ <tr> |
|
| 540 |
+ <th>알림톡</th> |
|
| 541 |
+ <td>카카오톡을 통해 친구 추가 여부와 관계 없이 휴대폰 번호로 발송이 가능한 정보성 메시지<br>(1,000자 이하의 텍스트 및 이미지 중 카카오 사전 승인 건에 한하여 발송 가능)</td> |
|
| 542 |
+ <td>1장 : <span>${kakaoAtPrice}</span>원</td>
|
|
| 543 |
+ </tr> |
|
| 544 |
+ </tbody> |
|
| 545 |
+ </table> |
|
| 546 |
+ <span class="reqTxt4">* 텍스트 용량(Byte)에 대한 안내 : 한글2Byte, 영문·숫자 1Byte를 차지.</span> |
|
| 547 |
+ |
|
| 548 |
+ <p class="tType1_title"><img src="/publish/images/content/icon_fee_fax.png" alt="팩스 아이콘 이미지"> 팩스</p> |
|
| 549 |
+ <table class="tType2"> |
|
| 550 |
+ <colgroup> |
|
| 551 |
+ <col style="width: 20%;"> |
|
| 552 |
+ <col style="width: 60%;"> |
|
| 553 |
+ <col style="width: 20%;"> |
|
| 554 |
+ </colgroup> |
|
| 555 |
+ <thead> |
|
| 556 |
+ <tr> |
|
| 557 |
+ <th>구분</th> |
|
| 558 |
+ <th>특징(전송가능확장자)</th> |
|
| 559 |
+ <th>가격</th> |
|
| 560 |
+ </tr> |
|
| 561 |
+ </thead> |
|
| 562 |
+ <tbody> |
|
| 563 |
+ <tr> |
|
| 564 |
+ <th>팩스</th> |
|
| 565 |
+ <td>전송 가능 파일(hwp, pdf, ppt, xls, xlsx, doc, jpg, jpeg, bmp, txt, gif, hwpml, tif, gul)</td> |
|
| 566 |
+ <td>1매 : <span>${faxPrice}</span>원</td>
|
|
| 567 |
+ </tr> |
|
| 568 |
+ </tbody> |
|
| 569 |
+ </table> |
|
| 570 |
+ |
|
| 571 |
+ <p class="tType1_title"><img src="/publish/images/content/icon_fee3.png" alt="그림문자 맞춤제작 이미지"> 그림문자 맞춤제작</p> |
|
| 572 |
+ <table class="tType2"> |
|
| 573 |
+ <caption></caption> |
|
| 574 |
+ <colgroup> |
|
| 575 |
+ <col style="width: 80%;"> |
|
| 576 |
+ <col style="width: 20%;"> |
|
| 577 |
+ </colgroup> |
|
| 578 |
+ <thead> |
|
| 579 |
+ <tr> |
|
| 580 |
+ <th>구분</th> |
|
| 581 |
+ <th>가격</th> |
|
| 582 |
+ </tr> |
|
| 583 |
+ </thead> |
|
| 584 |
+ <tbody> |
|
| 585 |
+ <tr> |
|
| 586 |
+ <th>문자온 샘플 수정(글자, 색상, 폰트 등)</th> |
|
| 587 |
+ <td><span>${customSamplePrice}</span>원</td>
|
|
| 588 |
+ </tr> |
|
| 589 |
+ <tr> |
|
| 590 |
+ <th>이미지 편집(첨부이미지 1장)</th> |
|
| 591 |
+ <td><span>${customEditPrice}</span>원</td>
|
|
| 592 |
+ </tr> |
|
| 593 |
+ <tr> |
|
| 594 |
+ <th>이미지 편집(첨부이미지 3장이하)</th> |
|
| 595 |
+ <td><span>${customEdit3Price}</span>원</td>
|
|
| 596 |
+ </tr> |
|
| 597 |
+ <tr> |
|
| 598 |
+ <th>텍스트 단순수정</th> |
|
| 599 |
+ <td><span>${customTextPrice}</span>원</td>
|
|
| 600 |
+ </tr> |
|
| 601 |
+ </tbody> |
|
| 602 |
+ </table> |
|
| 603 |
+ <span class="reqTxt4">* 텍스트 단순수정 요청은 맞춤제작이 완료된 그림문자의 수정 시에만 가능합니다.</span> |
|
| 604 |
+ |
|
| 605 |
+ <div class="banner"> |
|
| 606 |
+ <p>대량발송 고객 가격협의 가능</p> |
|
| 607 |
+ <ul> |
|
| 608 |
+ <li><img src="/publish/images/content/banner_call01.png" alt=""><p>전화 <strong>1551-8011</strong><p></li> |
|
| 609 |
+ <li><img src="/publish/images/content/banner_email01.png" alt=""><p>이메일<span>help@iten.co.kr</span> <button type="button" onclick="location.href='mailto:help@iten.co.kr'">상담하기</button></li> |
|
| 610 |
+ <li><img src="/publish/images/content/banner_kakao01.png" alt=""><p>카카오톡<span>munjaon</span><a href="http://pf.kakao.com/_PxoTtb/chat" target="_blank">상담하기</a><p></li> |
|
| 611 |
+ </ul> |
|
| 612 |
+ </div> |
|
| 613 |
+ </div> |
|
| 614 |
+ </div> |
|
| 615 |
+ <!--// 결제관리 - 요금안내/견적내기 - 요금안내 --> |
|
| 616 |
+ |
|
| 617 |
+ <!-- 결제관리 - 요금안내/견적내기 - 견적내기 --> |
|
| 618 |
+ <div class="fee_cont" id="tab1_2"> |
|
| 619 |
+ <ul class="clause_list"> |
|
| 620 |
+ <li class="list_open on"> |
|
| 621 |
+ <div class="clause_list_head"> |
|
| 622 |
+ <div class="list_head_in"> |
|
| 623 |
+ <span><i></i>요금안내</span> |
|
| 624 |
+ <button type="button" onclick="clause_list(this);"><i></i></button> |
|
| 625 |
+ </div> |
|
| 626 |
+ </div> |
|
| 627 |
+ <div class="clause_list_body"> |
|
| 628 |
+ <table class="refund_info"> |
|
| 629 |
+ <caption>요금 안내</caption> |
|
| 630 |
+ <colgroup> |
|
| 631 |
+ <col style="width: 13%;"> |
|
| 632 |
+ <col style="width: auto;"> |
|
| 633 |
+ <col style="width: 25%;"> |
|
| 634 |
+ </colgroup> |
|
| 635 |
+ <thead> |
|
| 636 |
+ <tr> |
|
| 637 |
+ <th>구분</th> |
|
| 638 |
+ <th>특징</th> |
|
| 639 |
+ <th>금액</th> |
|
| 640 |
+ </tr> |
|
| 641 |
+ </thead> |
|
| 642 |
+ <tbody> |
|
| 643 |
+ <tr> |
|
| 644 |
+ <td>단문(SMS)</td> |
|
| 645 |
+ <td>90Byte 이하 단문 메시지(이미지 첨부 불가)</td> |
|
| 646 |
+ <td><span>${shortPrice}</span>원</td>
|
|
| 647 |
+ </tr> |
|
| 648 |
+ <tr> |
|
| 649 |
+ <td>장문(LMS)</td> |
|
| 650 |
+ <td>91~2,000Byte 이하 장문메시지(이미지 첨부 불가)</td> |
|
| 651 |
+ <td><span>${longPrice}</span>원</td>
|
|
| 652 |
+ <tr> |
|
| 653 |
+ <td>그림문자(MMS)</td> |
|
| 654 |
+ <td>2,000Byte 이하 문자 및 이미지를 포함하는 그림메시지(이미지 최대 3장 첨부 가능)</td> |
|
| 655 |
+ <td>1장 : <span>${picturePrice}</span>원 / 2장 : <span>${picturePrice2}</span>원 / 3장 : <span>${picturePrice3}</span>원</td>
|
|
| 656 |
+ </tr> |
|
| 657 |
+ <tr> |
|
| 658 |
+ <td>카카오(알림톡)</td> |
|
| 659 |
+ <td>카카오톡을 통해 친구 추가 여부와 관계 없이 휴대폰 번호로 발송이 가능한 정보성 메시지(1,000자 이하의 텍스트 및 이미지 중 카카오 사전 승인 건에 한하여 발송 가능)</td> |
|
| 660 |
+ <td><span>${kakaoAtPrice}</span>원</td>
|
|
| 661 |
+ </tr> |
|
| 662 |
+ <tr> |
|
| 663 |
+ <td>팩스</td> |
|
| 664 |
+ <td>전송 가능 파일(hwp, pdf, ppt, xls, xlsx, doc, jpg, jpeg, bmp, txt, gif, hwpml, tif, htm, html, gul)</td> |
|
| 665 |
+ <td><span>${faxPrice}</span>원</td>
|
|
| 666 |
+ </tr> |
|
| 667 |
+ <tr> |
|
| 668 |
+ <td>맞춤제작</td> |
|
| 669 |
+ <td>문자온 샘플 수정(글자, 색상, 폰트 등)</td> |
|
| 670 |
+ <td><span>${customSamplePrice}</span>원</td>
|
|
| 671 |
+ </tr> |
|
| 672 |
+ <tr> |
|
| 673 |
+ <td>맞춤제작</td> |
|
| 674 |
+ <td>이미지 편집(첨부이미지 1장)</td> |
|
| 675 |
+ <td><span>${customEditPrice}</span>원</td>
|
|
| 676 |
+ </tr> |
|
| 677 |
+ <tr> |
|
| 678 |
+ <td>맞춤제작</td> |
|
| 679 |
+ <td>이미지 편집(첨부이미지 3장이하)</td> |
|
| 680 |
+ <td><span>${customEdit3Price}</span>원</td>
|
|
| 681 |
+ </tr> |
|
| 682 |
+ <tr> |
|
| 683 |
+ <td>맞춤제작</td> |
|
| 684 |
+ <td>텍스트 단순수정</td> |
|
| 685 |
+ <td><span>${customTextPrice}</span>원</td>
|
|
| 686 |
+ </tr> |
|
| 687 |
+ </tbody> |
|
| 688 |
+ </table> |
|
| 689 |
+ </div> |
|
| 690 |
+ </li> |
|
| 691 |
+ </ul> |
|
| 692 |
+ <div> |
|
| 693 |
+ <p class="tType1_title">일반정보</p> |
|
| 694 |
+ <table class="tType1"> |
|
| 695 |
+ <caption></caption> |
|
| 696 |
+ <colgroup> |
|
| 697 |
+ <col style="width: 150px;"> |
|
| 698 |
+ <col style="width: auto;"> |
|
| 699 |
+ </colgroup> |
|
| 700 |
+ <tbody> |
|
| 701 |
+ <tr> |
|
| 702 |
+ <th>제목</th> |
|
| 703 |
+ <td> |
|
| 704 |
+ <label for="" class="label">견적내기 제목</label> |
|
| 705 |
+ <input type="text" id="title" name="title" placeholder="견적서" onfocus="this.placeholder=''" onblur="this.placeholder='견적서'" style="width: 400px;" maxlength="20"> |
|
| 706 |
+ </td> |
|
| 707 |
+ </tr> |
|
| 708 |
+ <tr> |
|
| 709 |
+ <th>수신자(기업명)</th> |
|
| 710 |
+ <td> |
|
| 711 |
+ <label for="" class="label">수신자(기업명) 입력</label> |
|
| 712 |
+ <input type="text" id="recipientName" name="recipientName" style="width: 400px;" maxlength="18"> |
|
| 713 |
+ </td> |
|
| 714 |
+ </tr> |
|
| 715 |
+ <tr> |
|
| 716 |
+ <th>담당자(성명)</th> |
|
| 717 |
+ <td> |
|
| 718 |
+ <label for="" class="label">담당자(성명) 입력</label> |
|
| 719 |
+ <input type="text" id="managerName" name="managerName" style="width: 400px;" maxlength="18"> |
|
| 720 |
+ </td> |
|
| 721 |
+ </tr> |
|
| 722 |
+ <tr> |
|
| 723 |
+ <th>연락처</th> |
|
| 724 |
+ <td> |
|
| 725 |
+ <label for="" class="label">연락처 입력</label> |
|
| 726 |
+ <input type="text" onkeyup="inputPagesNumber(this)"; maxlength="11" id="mobile" name="mobile" style="width: 400px;"> |
|
| 727 |
+ </td> |
|
| 728 |
+ </tr> |
|
| 729 |
+ <tr> |
|
| 730 |
+ <th>발행일</th> |
|
| 731 |
+ <td> |
|
| 732 |
+ <div class="calendar_wrap"> |
|
| 733 |
+ <input type="text" class="calendar" title="발행일" id="publishDate" name="publishDate"> |
|
| 734 |
+ </div> |
|
| 735 |
+ </td> |
|
| 736 |
+ </tr> |
|
| 737 |
+ </tbody> |
|
| 738 |
+ </table> |
|
| 739 |
+ |
|
| 740 |
+ <p class="tType1_title">품목정보</p> |
|
| 741 |
+ <table class="tType1 itemInfo"> |
|
| 742 |
+ <caption></caption> |
|
| 743 |
+ <colgroup> |
|
| 744 |
+ <col style="width: 150px;"> |
|
| 745 |
+ <col style="width: auto;"> |
|
| 746 |
+ </colgroup> |
|
| 747 |
+ <tbody> |
|
| 748 |
+ <tr> |
|
| 749 |
+ <th>구분</th> |
|
| 750 |
+ <td> |
|
| 751 |
+ <label for="" class="label">품목 선택</label> |
|
| 752 |
+ <select id="smsItem" name="smsItem" onchange="fn_gunClear();" style="width: 210px;"> |
|
| 753 |
+ </select> |
|
| 754 |
+ <label for="" class="label">품목 별 단가</label> |
|
| 755 |
+ <input type="text" id="unitPrice" name="unitPrice" value="0" placeholder="" readonly class="readonly"> |
|
| 756 |
+ <p class="input_in">원</p> |
|
| 757 |
+ </td> |
|
| 758 |
+ </tr> |
|
| 759 |
+ <tr> |
|
| 760 |
+ <th>건수</th> |
|
| 761 |
+ <td class="publish_btn"> |
|
| 762 |
+ <label for="" class="label">건수 입력</label> |
|
| 763 |
+ <input type="text" id="caseNumber" numberOnly maxlength="10" name="caseNumber" style="width: 210px;" onkeyup="inputNumberFormatPay(this)"> |
|
| 764 |
+ <p class="input_in">건</p> |
|
| 765 |
+ <div> |
|
| 766 |
+ <button type="button" class="btnType" id="btnItemAdd">품목추가<i class="arrow_img"></i></button> |
|
| 767 |
+ </div> |
|
| 768 |
+ </td> |
|
| 769 |
+ </tr> |
|
| 770 |
+ <tr id="faxPages" style="display:none;"> |
|
| 771 |
+ <th>매수</th> |
|
| 772 |
+ <td class="publish_btn"> |
|
| 773 |
+ <label for="" class="label">매수 입력</label> |
|
| 774 |
+ <input type="text" id="casePage" name="casePage" style="width: 210px;" onkeyup="inputPagesNumberFormatPay(this)"> |
|
| 775 |
+ <p class="input_in">매</p> |
|
| 776 |
+ </td> |
|
| 777 |
+ </tr> |
|
| 778 |
+ </tbody> |
|
| 779 |
+ </table> |
|
| 780 |
+ <div class="search_group_bottom2"> |
|
| 781 |
+ <div class="btnWrap1"> |
|
| 782 |
+ <button type="button" class="btnType" id="btnItemDel"><i class="remove_img"></i>선택삭제</button> |
|
| 783 |
+ </div> |
|
| 784 |
+ </div> |
|
| 785 |
+ <!-- table --> |
|
| 786 |
+ <div class="tType3 payDetail"> |
|
| 787 |
+ <!-- thead --> |
|
| 788 |
+ <div class="tType3_hd"> |
|
| 789 |
+ <div> |
|
| 790 |
+ <label for="" class="label">전체 선택</label> |
|
| 791 |
+ <input type="checkbox" id="chkAll"> |
|
| 792 |
+ </div> |
|
| 793 |
+ <div>품목</div> |
|
| 794 |
+ <div>단가(원)</div> |
|
| 795 |
+ <div>건수(건)</div> |
|
| 796 |
+ <div>공급가액(원)</div> |
|
| 797 |
+ <div>세액(부가세)</div> |
|
| 798 |
+ <div>금액(원)</div> |
|
| 799 |
+ </div> |
|
| 800 |
+ <!-- tbody --> |
|
| 801 |
+ <div class="tType3_bd_wrap" id="itemList"> |
|
| 802 |
+ <div class="tType3_bd"> |
|
| 803 |
+ <div></div> |
|
| 804 |
+ <div></div> |
|
| 805 |
+ <div></div> |
|
| 806 |
+ <div></div> |
|
| 807 |
+ <div></div> |
|
| 808 |
+ <div></div> |
|
| 809 |
+ <div></div> |
|
| 810 |
+ </div> |
|
| 811 |
+ </div> |
|
| 812 |
+ </div> |
|
| 813 |
+ <!--// table --> |
|
| 814 |
+ <div class="tb_wrap totalPrice_tb"> |
|
| 815 |
+ <table class="tType4"> |
|
| 816 |
+ <colgroup> |
|
| 817 |
+ <col style="width: 25%;"> |
|
| 818 |
+ <col style="width: 25%;"> |
|
| 819 |
+ <col style="width: 30%;"> |
|
| 820 |
+ <col style="width: 15%;"> |
|
| 821 |
+ </colgroup> |
|
| 822 |
+ <thead> |
|
| 823 |
+ <tr> |
|
| 824 |
+ <th>공급가액</th> |
|
| 825 |
+ <th>세액(부가세)</th> |
|
| 826 |
+ <th>합계</th> |
|
| 827 |
+ <th>비고</th> |
|
| 828 |
+ </tr> |
|
| 829 |
+ </thead> |
|
| 830 |
+ <tbody> |
|
| 831 |
+ <tr> |
|
| 832 |
+ <td> |
|
| 833 |
+ <span id="supplySumPriceStr"></span> |
|
| 834 |
+ </td> |
|
| 835 |
+ <td> |
|
| 836 |
+ <span id="isVatStr"></span> |
|
| 837 |
+ </td> |
|
| 838 |
+ <td> |
|
| 839 |
+ <span id="totSumPriceStr"></span> |
|
| 840 |
+ </td> |
|
| 841 |
+ <td style="text-align: center;"> |
|
| 842 |
+ <label for="" class="label">부가세 포함,별도 선택</label> |
|
| 843 |
+ <select id="isVat" name="isVat" class="selType2"> |
|
| 844 |
+ <option value="0">부가세 별도</option> |
|
| 845 |
+ <option value="1" selected>부가세 포함</option> |
|
| 846 |
+ </select> |
|
| 847 |
+ </td> |
|
| 848 |
+ </tr> |
|
| 849 |
+ </tbody> |
|
| 850 |
+ </table> |
|
| 851 |
+ </div> |
|
| 852 |
+ <!-- //주소록리스트 --> |
|
| 853 |
+ <div style="text-align: center;"> |
|
| 854 |
+ <button class="btnType btnType16" onclick="showEst(); return false;">발행하기</button> |
|
| 855 |
+ </div> |
|
| 856 |
+ </div> |
|
| 857 |
+ </div> |
|
| 858 |
+ <!-- 결제관리 - 요금안내/견적내기 - 견적내기 --> |
|
| 859 |
+ </div> |
|
| 860 |
+ </div> |
|
| 861 |
+ <!-- 결제관리 - 요금안내/견적내기 --> |
|
| 862 |
+ </div> |
|
| 863 |
+ <!--// send top --> |
|
| 864 |
+</form> |
|
| 865 |
+<form name="infoPopForm" id="infoPopForm" method="post"> |
|
| 866 |
+ <input type="hidden" name="pageType" id="pageType" value=""/> |
|
| 867 |
+</form> |
--- src/main/webapp/js/MJUtill.js
+++ src/main/webapp/js/MJUtill.js
... | ... | @@ -1,974 +1,974 @@ |
| 1 |
-/** |
|
| 2 |
- * 휴대폰번호 유효성 체크 |
|
| 3 |
- * true, false 반환 |
|
| 4 |
- * 대시 유무 상관없음 |
|
| 5 |
- */ |
|
| 6 |
-function checkHpNum(str) {
|
|
| 7 |
- |
|
| 8 |
- var regExp = /^(050[2345678]{1}|01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
|
|
| 9 |
- //var regExp = /^(01[016789]{1}|070|02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/; //지역번호(일반전화) 형식까지 체크해주는 정규식
|
|
| 10 |
- return regExp.test(str); |
|
| 11 |
-} |
|
| 12 |
- |
|
| 13 |
-/** |
|
| 14 |
- * 휴대폰번호만 유효성 체크 |
|
| 15 |
- * true, false 반환 |
|
| 16 |
- * 대시 유무 상관없음 |
|
| 17 |
- */ |
|
| 18 |
-function checkOnlyHpNum(str) {
|
|
| 19 |
- |
|
| 20 |
- //var regExp = /^(050[234567]{1}|01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
|
|
| 21 |
- var regExp = /^(01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$/; //지역번호(일반전화) 형식까지 체크해주는 정규식
|
|
| 22 |
- return regExp.test(str); |
|
| 23 |
-} |
|
| 24 |
- |
|
| 25 |
-/** |
|
| 26 |
- * 팩스 번호 유효성 체크 |
|
| 27 |
- * true, false 반환 |
|
| 28 |
- * 앞 3자리를 체크 함 |
|
| 29 |
- * -- 전국 지역번호 |
|
| 30 |
- * 02 서울특별시 |
|
| 31 |
- 031 경기도 |
|
| 32 |
- 032 인천광역시 |
|
| 33 |
- 033 강원도 |
|
| 34 |
- 041 충청남도 |
|
| 35 |
- 042 대전광역시 |
|
| 36 |
- 043 충청북도 |
|
| 37 |
- 044 세종특별자치시 |
|
| 38 |
- 051 부산광역시 |
|
| 39 |
- 052 울산광역시 |
|
| 40 |
- 053 대구광역시 |
|
| 41 |
- 054 경상북도 |
|
| 42 |
- 055 경상남도 |
|
| 43 |
- 061 전라남도 |
|
| 44 |
- 062 광주광역시 |
|
| 45 |
- 063 전라북도 |
|
| 46 |
- 064 제주특별자치도 |
|
| 47 |
- |
|
| 48 |
- -- 타사부가번호 |
|
| 49 |
- 030* |
|
| 50 |
- 050* |
|
| 51 |
- 060 |
|
| 52 |
- 070 |
|
| 53 |
- 080 |
|
| 54 |
- 1** |
|
| 55 |
- |
|
| 56 |
- 위 번호로 시작하는 팩스 번호만 허용함. |
|
| 57 |
- */ |
|
| 58 |
-function checkFaxNum(str) {
|
|
| 59 |
- str = removeDash(str); |
|
| 60 |
- var subNum = str.substring(0,3); |
|
| 61 |
- var regExp = /^(02[0-9]{1}|030|050|060|070|080|0[3-6]{1}[1-5]{1}|1[0-9]{1}[0-9]{1})$/; //지역번호(일반전화) 형식까지 체크해주는 정규식
|
|
| 62 |
- return regExp.test(subNum); |
|
| 63 |
-} |
|
| 64 |
- |
|
| 65 |
-/* |
|
| 66 |
- * 일반전화 유효성 체크 |
|
| 67 |
- * true, false 반환 |
|
| 68 |
- * |
|
| 69 |
- * */ |
|
| 70 |
-function checkNorPhoneNum(str){
|
|
| 71 |
- |
|
| 72 |
- var regExp = /^(02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
|
|
| 73 |
- |
|
| 74 |
- /** |
|
| 75 |
- * 기간통신사업자 공통 부가서비스 번호 체크 |
|
| 76 |
- * 번호 사업자 |
|
| 77 |
- 1588,1577,1899 KT |
|
| 78 |
- 1544,1644,1661,1800 ,1833 LG유플러스 |
|
| 79 |
- 1566,1600,1670 SK브로드밴드 |
|
| 80 |
- 1688,1666 온세텔레콤 |
|
| 81 |
- 1599 SK텔링크 |
|
| 82 |
- 1877 한국케이블텔레콤 |
|
| 83 |
- 1855 CJ헬로비전 |
|
| 84 |
- 1661 alleh KT |
|
| 85 |
- * |
|
| 86 |
- * */ |
|
| 87 |
- |
|
| 88 |
- if(str.substring(0,2) == "15"){
|
|
| 89 |
- |
|
| 90 |
- regExp = /^(15[0-9]{2})-?[0-9]{4}$/;
|
|
| 91 |
- |
|
| 92 |
- }else if(str.substring(0,2) == "16"){
|
|
| 93 |
- |
|
| 94 |
- regExp = /^(16[0-9]{2})-?[0-9]{4}$/;
|
|
| 95 |
- |
|
| 96 |
- }else if(str.substring(0,2) == "18"){
|
|
| 97 |
- |
|
| 98 |
- regExp = /^(18[0-9]{2})-?[0-9]{4}$/;
|
|
| 99 |
- |
|
| 100 |
- } |
|
| 101 |
- |
|
| 102 |
- return regExp.test(str); |
|
| 103 |
-} |
|
| 104 |
- |
|
| 105 |
-/* |
|
| 106 |
- * 일반전화 / 핸드폰 번호 종류 확인 |
|
| 107 |
- * true, false 반환 |
|
| 108 |
- * |
|
| 109 |
- * */ |
|
| 110 |
-function checkTelHpType(str){
|
|
| 111 |
- |
|
| 112 |
- var subCall = str.substring(0,3); // 전화번호 앞 3자리 받아오기 |
|
| 113 |
- var strType = ""; // 결과 반환 |
|
| 114 |
- |
|
| 115 |
- if(subCall != '010' |
|
| 116 |
- && subCall != '011' |
|
| 117 |
- && subCall != '016' |
|
| 118 |
- && subCall != '017'){//일반전화 번호이면
|
|
| 119 |
- |
|
| 120 |
- strType = "Tel"; |
|
| 121 |
- |
|
| 122 |
- }else{
|
|
| 123 |
- |
|
| 124 |
- strType = "Hp"; |
|
| 125 |
- } |
|
| 126 |
- |
|
| 127 |
- return strType; |
|
| 128 |
-} |
|
| 129 |
- |
|
| 130 |
- |
|
| 131 |
-/** |
|
| 132 |
- * 휴대폰번호 대시('-') 제거
|
|
| 133 |
- */ |
|
| 134 |
-function removeDash(str) {
|
|
| 135 |
- var regExp = new RegExp('-', 'g');
|
|
| 136 |
- return str.replace(regExp, ''); |
|
| 137 |
-} |
|
| 138 |
- |
|
| 139 |
-/** |
|
| 140 |
- * 휴대폰번호 대시('-') 추가
|
|
| 141 |
- * 대시 유무 상관없음 |
|
| 142 |
- * 유효성 맞지 않을시 변환안됨. |
|
| 143 |
- */ |
|
| 144 |
-function addDash(str) {
|
|
| 145 |
- return str.replace(/(^01[016789]{1}|070)([0-9]{3}|[0-9]{4})([0-9]{4})$/,"$1-$2-$3").replace("--", "-");
|
|
| 146 |
-} |
|
| 147 |
- |
|
| 148 |
-/** |
|
| 149 |
- * ReplaceAll (by javascript prototype) |
|
| 150 |
- * 정규식 패턴에서 \는 두 개 사용 |
|
| 151 |
- */ |
|
| 152 |
-String.prototype.replaceAll = function(pattern, changeString) {
|
|
| 153 |
- var regExp = new RegExp(pattern, 'g'); |
|
| 154 |
- return this.replace(regExp, changeString); |
|
| 155 |
-}; |
|
| 156 |
- |
|
| 157 |
-/** |
|
| 158 |
- * 이메일 유효성 체크 |
|
| 159 |
- * true, false 반환 |
|
| 160 |
- * |
|
| 161 |
- */ |
|
| 162 |
-function checkEmail(str) {
|
|
| 163 |
- var regExp = /^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\-]+\.[A-Za-z0-9\-]+/; |
|
| 164 |
- return regExp.test(str); |
|
| 165 |
-} |
|
| 166 |
- |
|
| 167 |
-/** |
|
| 168 |
- * XSS 체크하기 |
|
| 169 |
- * |
|
| 170 |
- * |
|
| 171 |
- */ |
|
| 172 |
- |
|
| 173 |
-function XSSCheck(str, level) {
|
|
| 174 |
- if (level == undefined || level == 0) {
|
|
| 175 |
- str = str.replace(/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-/g,""); |
|
| 176 |
- } else if (level != undefined && level == 1) {
|
|
| 177 |
- str = str.replace(/\</g, "<"); |
|
| 178 |
- str = str.replace(/\>/g, ">"); |
|
| 179 |
- } |
|
| 180 |
- return str; |
|
| 181 |
-} |
|
| 182 |
- |
|
| 183 |
- |
|
| 184 |
-//숫자 천단위 콤마 찍어주기 |
|
| 185 |
-function numberWithCommas(x) {
|
|
| 186 |
- return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
| 187 |
-} |
|
| 188 |
- |
|
| 189 |
-function comma(num){
|
|
| 190 |
- var len, point, str; |
|
| 191 |
- num = num + ""; |
|
| 192 |
- point = num.length % 3; |
|
| 193 |
- len = num.length; |
|
| 194 |
- str = num.substring(0, point); |
|
| 195 |
- while (point < len) {
|
|
| 196 |
- if (str != "") str += ","; |
|
| 197 |
- str += num.substring(point, point + 3); |
|
| 198 |
- point += 3; |
|
| 199 |
- } |
|
| 200 |
- return str; |
|
| 201 |
-} |
|
| 202 |
- |
|
| 203 |
- |
|
| 204 |
-function totalPriceSum(totRows){
|
|
| 205 |
- |
|
| 206 |
- var contents = $('#smsTxtArea').val(); //입력 문자 내용
|
|
| 207 |
- var msgType = conTypeCheck(contents); //입력 문자 길이 체크 |
|
| 208 |
- var collNumCnt = parseInt(totRows); //받는사람 건수 |
|
| 209 |
- var price = 0; //개별 건수 금액 |
|
| 210 |
- var totalPrice = 0; //전체 금액 |
|
| 211 |
- //var strDot = []; |
|
| 212 |
- //var subPrice = ""; |
|
| 213 |
- //var spPrice = ""; |
|
| 214 |
- var totalStr = "0"; //전체 합계 금액 |
|
| 215 |
- var userMoney = $('#hdUserMoney').text(); //헤더 영역 보유 금액 불러오기
|
|
| 216 |
- var msgCnt = 0; //발송 가능 문자 건수 |
|
| 217 |
- var imgCnt = $("#imgCnt").val(); // 현재 페이지에 첨부된 이미지 갯수
|
|
| 218 |
- |
|
| 219 |
- if(!userMoney > 0){
|
|
| 220 |
- |
|
| 221 |
- userMoney = 0; |
|
| 222 |
- |
|
| 223 |
- } |
|
| 224 |
- //헤더 영역 보유 금액 콤마 문자 제거 |
|
| 225 |
- if(userMoney != ''){
|
|
| 226 |
- |
|
| 227 |
- userMoney = userMoney.replaceAll("," , "");
|
|
| 228 |
- |
|
| 229 |
- } |
|
| 230 |
- |
|
| 231 |
- /*if(msgType == "P"){//그림문자
|
|
| 232 |
- |
|
| 233 |
- //그림 이미지 갯수에 따른 금액 계산 |
|
| 234 |
- if(imgCnt > 2){//그림 3장일경우
|
|
| 235 |
- price = parseFloat($('#p3Price').val());
|
|
| 236 |
- }else if(imgCnt > 1){//그림 2장일경우
|
|
| 237 |
- price = parseFloat($('#p2Price').val());
|
|
| 238 |
- }else{//그림 1장일 경우
|
|
| 239 |
- price = parseFloat($('#pPrice').val());
|
|
| 240 |
- } |
|
| 241 |
- |
|
| 242 |
- msgCnt = parseFloat(userMoney) / price; |
|
| 243 |
- |
|
| 244 |
- }else if(msgType == "M"){//장문 문자
|
|
| 245 |
- |
|
| 246 |
- price = parseFloat($('#mPrice').val());
|
|
| 247 |
- msgCnt = parseFloat(userMoney) / price; |
|
| 248 |
- |
|
| 249 |
- }else{//단문문자
|
|
| 250 |
- |
|
| 251 |
- price = parseFloat($('#sPrice').val());
|
|
| 252 |
- msgCnt = parseFloat(userMoney) / price; |
|
| 253 |
- |
|
| 254 |
- }*/ |
|
| 255 |
- |
|
| 256 |
- //금액 소수점 제거 하여 적용 20220623 소수점 버림 처리 |
|
| 257 |
- if(msgType == "P"){//그림문자
|
|
| 258 |
- |
|
| 259 |
- //그림 이미지 갯수에 따른 금액 계산 |
|
| 260 |
- if(imgCnt > 2){//그림 3장일경우
|
|
| 261 |
- price = $('#p3Price').val();
|
|
| 262 |
- }else if(imgCnt > 1){//그림 2장일경우
|
|
| 263 |
- price = $('#p2Price').val();
|
|
| 264 |
- }else{//그림 1장일 경우
|
|
| 265 |
- price = $('#pPrice').val();
|
|
| 266 |
- } |
|
| 267 |
- |
|
| 268 |
- msgCnt = userMoney / price; |
|
| 269 |
- |
|
| 270 |
- }else if(msgType == "M"){//장문 문자
|
|
| 271 |
- |
|
| 272 |
- price = $('#mPrice').val();
|
|
| 273 |
- msgCnt = userMoney / price; |
|
| 274 |
- |
|
| 275 |
- }else{//단문문자
|
|
| 276 |
- |
|
| 277 |
- price = $('#sPrice').val();
|
|
| 278 |
- msgCnt = userMoney / price; |
|
| 279 |
- |
|
| 280 |
- } |
|
| 281 |
- |
|
| 282 |
- totalPrice = price * collNumCnt; |
|
| 283 |
- |
|
| 284 |
- // 소수점 첫째자리 까지 표시 |
|
| 285 |
- totalPrice = totalPrice.toFixed(1); |
|
| 286 |
- |
|
| 287 |
- if(totalPrice > 0){
|
|
| 288 |
- |
|
| 289 |
- //totalStr = totalPrice.toFixed(2); |
|
| 290 |
- totalStr = totalPrice; |
|
| 291 |
- |
|
| 292 |
- } |
|
| 293 |
- |
|
| 294 |
- //개별 문자 단가 파라미터에 입력 |
|
| 295 |
- $('#eachPrice').val(numberWithCommas(price));
|
|
| 296 |
- |
|
| 297 |
- |
|
| 298 |
- //결제금액 합계 파라이터에 입력 |
|
| 299 |
- $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 300 |
- |
|
| 301 |
- //결제금액 합계 화면에 표시 |
|
| 302 |
- $('#totalPriceTxt').text(numberWithCommas(totalStr));
|
|
| 303 |
- |
|
| 304 |
- //현재 문자 전송 가능 갯수 표시 |
|
| 305 |
- $('.nowMsgCnt').text(numberWithCommas(msgCnt.toFixed()));
|
|
| 306 |
- |
|
| 307 |
- if(msgType == 'P'){
|
|
| 308 |
- |
|
| 309 |
- $('#nowMsgType').text("그림");
|
|
| 310 |
- |
|
| 311 |
- }else if(msgType == 'M'){
|
|
| 312 |
- |
|
| 313 |
- $('#nowMsgType').text("장문");
|
|
| 314 |
- |
|
| 315 |
- }else{
|
|
| 316 |
- |
|
| 317 |
- $('#nowMsgType').text("단문");
|
|
| 318 |
- |
|
| 319 |
- } |
|
| 320 |
- |
|
| 321 |
- $('#repPriceTxt').hide();
|
|
| 322 |
- |
|
| 323 |
- return totalStr; |
|
| 324 |
- |
|
| 325 |
-} |
|
| 326 |
- |
|
| 327 |
-function replTotalPriceSum(msg_short, msg_long, totRows){
|
|
| 328 |
- |
|
| 329 |
- var shortPrice = 0; //단문 개별 건수 금액 |
|
| 330 |
- var longPrice = 0; //장문 개별 건수 금액 |
|
| 331 |
- var imgPrice = 0; //그림문자 개별 건수 금액 |
|
| 332 |
- var totalPrice = 0; //전체 금액 |
|
| 333 |
- var totalStr = "0"; //전체 합계 금액 |
|
| 334 |
- var contents = $('#smsTxtArea').val(); //입력 문자 내용
|
|
| 335 |
- var msgType = conTypeCheck(contents); //입력 문자 길이 체크 |
|
| 336 |
- var userMoney = $('#hdUserMoney').text(); //헤더 영역 보유 금액 불러오기
|
|
| 337 |
- var msgCnt = 0; //발송 가능 문자 건수 |
|
| 338 |
- var imgCnt = $("#imgCnt").val(); // 현재 페이지에 첨부된 이미지 갯수
|
|
| 339 |
- var collNumCnt = parseInt(totRows); //받는사람 건수 |
|
| 340 |
- var totalCntTxt = ""; |
|
| 341 |
- |
|
| 342 |
- //금액 소수점 제거하여 금액 처리 |
|
| 343 |
- if(msgType == "P"){//그림문자
|
|
| 344 |
- |
|
| 345 |
- //그림 이미지 갯수에 따른 금액 계산 |
|
| 346 |
- if(imgCnt > 2){//그림 3장일경우
|
|
| 347 |
- imgPrice = $('#p3Price').val();
|
|
| 348 |
- }else if(imgCnt > 1){//그림 2장일경우
|
|
| 349 |
- imgPrice = $('#p2Price').val();
|
|
| 350 |
- |
|
| 351 |
- }else{//그림 1장일 경우
|
|
| 352 |
- imgPrice = $('#pPrice').val();
|
|
| 353 |
- } |
|
| 354 |
- |
|
| 355 |
- msgCnt = userMoney.replaceAll(",","") / imgPrice;
|
|
| 356 |
- |
|
| 357 |
- var imgTotPrice = imgPrice * collNumCnt; |
|
| 358 |
- imgTotPrice = Math.round(imgTotPrice * 100) / 100; //소수점 2자리 반올리 처리해주기 |
|
| 359 |
- |
|
| 360 |
- totalPrice = totalPrice + imgTotPrice; |
|
| 361 |
- |
|
| 362 |
- //input hidden 개별 문자 단가 파라미터에 입력 |
|
| 363 |
- $('#eachPrice').val(numberWithCommas(imgPrice));
|
|
| 364 |
- |
|
| 365 |
- //input hidden 결제금액 합계 파라이터에 입력 |
|
| 366 |
- $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 367 |
- |
|
| 368 |
- //결제금액 합계 화면에 표시 |
|
| 369 |
- $('#totalPriceTxt').text(numberWithCommas(totalStr));
|
|
| 370 |
- |
|
| 371 |
- //현재 문자 전송 가능 갯수 표시 |
|
| 372 |
- $('.nowMsgCnt').text(numberWithCommas(msgCnt.toFixed()));
|
|
| 373 |
- |
|
| 374 |
- //변환문자 건수 내용 표기 |
|
| 375 |
- totalCntTxt = "그림 : <strong>" + totRows + "</strong> 건";; |
|
| 376 |
- |
|
| 377 |
- }else{
|
|
| 378 |
- |
|
| 379 |
- if(msg_long > 0){//장문 문자
|
|
| 380 |
- |
|
| 381 |
- longPrice = $('#mPrice').val();
|
|
| 382 |
- var longTotPrice = longPrice * msg_long; |
|
| 383 |
- longTotPrice = Math.round(longTotPrice * 100) / 100; //소수점 2자리 반올리 처리해주기 |
|
| 384 |
- |
|
| 385 |
- totalPrice = totalPrice + longTotPrice; |
|
| 386 |
- |
|
| 387 |
- //input hidden 개별 문자 단가 파라미터에 입력 |
|
| 388 |
- $('#eachPrice').val(numberWithCommas(longPrice));
|
|
| 389 |
- |
|
| 390 |
- //변환문자 건수 내용 표기 |
|
| 391 |
- totalCntTxt = "장문 : <strong>" + msg_long + "</strong> 건"; |
|
| 392 |
- |
|
| 393 |
- //변환장문 건수 Hidden 폼에 넣어주기 |
|
| 394 |
- $('#longMsgCnt').val(msg_long);
|
|
| 395 |
- |
|
| 396 |
- }else{
|
|
| 397 |
- |
|
| 398 |
- //변환장문 건수 Hidden 폼에 넣어주기 |
|
| 399 |
- $('#longMsgCnt').val(msg_long);
|
|
| 400 |
- |
|
| 401 |
- } |
|
| 402 |
- |
|
| 403 |
- if(msg_short > 0){//단문문자
|
|
| 404 |
- |
|
| 405 |
- shortPrice = $('#sPrice').val();
|
|
| 406 |
- var shortTotPrice = shortPrice * msg_short; |
|
| 407 |
- shortTotPrice = Math.round(shortTotPrice * 100) / 100; //소수점 2자리 반올리 처리해주기 |
|
| 408 |
- |
|
| 409 |
- totalPrice = totalPrice + shortTotPrice; |
|
| 410 |
- |
|
| 411 |
- //input hidden 개별 문자 단가 파라미터에 입력 |
|
| 412 |
- $('#eachPrice').val(numberWithCommas(shortPrice));
|
|
| 413 |
- |
|
| 414 |
- if(msg_long > 0){
|
|
| 415 |
- |
|
| 416 |
- //변환문자 건수 내용 표기 |
|
| 417 |
- totalCntTxt = totalCntTxt + "/ 단문 : <strong>" + msg_short + "</strong> 건"; |
|
| 418 |
- |
|
| 419 |
- }else{
|
|
| 420 |
- |
|
| 421 |
- //변환문자 건수 내용 표기 |
|
| 422 |
- totalCntTxt = "단문 : <strong>" + msg_short + "</strong> 건"; |
|
| 423 |
- |
|
| 424 |
- } |
|
| 425 |
- |
|
| 426 |
- //변환단문 건수 Hidden 폼에 넣어주기 |
|
| 427 |
- $('#shortMsgCnt').val(msg_short);
|
|
| 428 |
- |
|
| 429 |
- }else{
|
|
| 430 |
- |
|
| 431 |
- //변환단문 건수 Hidden 폼에 넣어주기 |
|
| 432 |
- $('#shortMsgCnt').val(msg_short);
|
|
| 433 |
- |
|
| 434 |
- } |
|
| 435 |
- |
|
| 436 |
- } |
|
| 437 |
- |
|
| 438 |
- |
|
| 439 |
- if(totalPrice > 0){
|
|
| 440 |
- |
|
| 441 |
- //totalStr = totalPrice.toFixed(2); |
|
| 442 |
- totalStr = totalPrice; |
|
| 443 |
- |
|
| 444 |
- } |
|
| 445 |
- |
|
| 446 |
- //input hidden 결제금액 합계 파라이터에 입력 |
|
| 447 |
- $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 448 |
- |
|
| 449 |
- //결제금액 합계 화면에 표시 |
|
| 450 |
- $('#totalPriceTxt').text(numberWithCommas(totalStr));
|
|
| 451 |
- |
|
| 452 |
- //결제금액 합계 파라이터에 입력 |
|
| 453 |
- $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 454 |
- |
|
| 455 |
- //특정문구 일괄 변환으로 인한 단/장문 건수 표시 |
|
| 456 |
- $('#repPriceTxt').show();
|
|
| 457 |
- $('#repPriceTxt').html("(" + totalCntTxt + ")");
|
|
| 458 |
- |
|
| 459 |
- if(msgType == 'P'){
|
|
| 460 |
- |
|
| 461 |
- $('#nowMsgType').text("그림");
|
|
| 462 |
- |
|
| 463 |
- }else if(msgType == 'M'){
|
|
| 464 |
- |
|
| 465 |
- $('#nowMsgType').text("장문");
|
|
| 466 |
- |
|
| 467 |
- }else{
|
|
| 468 |
- |
|
| 469 |
- $('#nowMsgType').text("단문");
|
|
| 470 |
- |
|
| 471 |
- } |
|
| 472 |
- |
|
| 473 |
- return totalStr; |
|
| 474 |
- |
|
| 475 |
-} |
|
| 476 |
- |
|
| 477 |
-//예약 날짜 체크 함수 |
|
| 478 |
-function getGday(date) { /* 현재와 이전 날자의 차이를 년-개월-일 형태로 가져오기 */
|
|
| 479 |
- var now = new Date().getTime(); // 현재 날짜를 시간으로 변환 |
|
| 480 |
- var d = new Date(date.substring(0, 10)).getTime(); // 이전 날짜를 시간으로 변환 |
|
| 481 |
- var gap = now - d; // 현재 날짜와 이전 날짜의 차이를 밀리초 시간으로 구한다. |
|
| 482 |
- var result = Math.floor(gap/(1000 * 60 * 60 * 24)); // 날짜 차이를 일수로 계산 |
|
| 483 |
- |
|
| 484 |
- var year = Math.floor(result / 365); // 현재 날짜 년 - 개월 - 일 수로 표현하기 |
|
| 485 |
- var month = Math.floor(result % 365 / 30); |
|
| 486 |
- var day = result % 365 % 30; |
|
| 487 |
- |
|
| 488 |
- return result; |
|
| 489 |
- |
|
| 490 |
- //각 년도, 월, 일을 따로 리턴하려면 아래를 사용하면 됨 |
|
| 491 |
- /* return {
|
|
| 492 |
- year: year, |
|
| 493 |
- month: month, |
|
| 494 |
- day: day |
|
| 495 |
- }; */ |
|
| 496 |
-} |
|
| 497 |
- |
|
| 498 |
-/* |
|
| 499 |
- * 예약 날짜 오류 체크 함수 |
|
| 500 |
- * 날짜, 시간, 분 파라미터 전달 |
|
| 501 |
- * 현재 날짜와 파라미터 시간의 분 간격 계산해주기 |
|
| 502 |
- * */ |
|
| 503 |
-function getGapDayTime(paramDate,paramHours,paramMin) { /* 현재와 이전 날자의 차이를 년-개월-일 형태로 가져오기 */
|
|
| 504 |
- |
|
| 505 |
- var now = new Date(); |
|
| 506 |
- |
|
| 507 |
- //현재시간 구분하기 |
|
| 508 |
- var year = now.getFullYear(); |
|
| 509 |
- var month = now.getMonth() + 1 ; |
|
| 510 |
- var day = now.getDate(); |
|
| 511 |
- var hours = now.getHours(); |
|
| 512 |
- var min = now.getMinutes(); |
|
| 513 |
- |
|
| 514 |
- //비교시간 |
|
| 515 |
- var stDt = paramDate.split("/");
|
|
| 516 |
- var stYear = stDt[0]; |
|
| 517 |
- var stMonth = stDt[1]; |
|
| 518 |
- var stDay = stDt[2]; |
|
| 519 |
- |
|
| 520 |
- var nowDate = new Date(year, month-1, day, hours, min); |
|
| 521 |
- var stDate = new Date(stYear, stMonth-1, stDay, paramHours, paramMin); |
|
| 522 |
- var elapsedMSec = stDate.getTime() - nowDate.getTime(); |
|
| 523 |
- var elapseMin = elapsedMSec / 1000 / 60; |
|
| 524 |
- |
|
| 525 |
- elapseMin = parseInt(elapseMin); |
|
| 526 |
- |
|
| 527 |
- return elapseMin; |
|
| 528 |
- |
|
| 529 |
- //각 년도, 월, 일을 따로 리턴하려면 아래를 사용하면 됨 |
|
| 530 |
- /* return {
|
|
| 531 |
- year: year, |
|
| 532 |
- month: month, |
|
| 533 |
- day: day |
|
| 534 |
- }; */ |
|
| 535 |
-} |
|
| 536 |
- |
|
| 537 |
-// 중복 주소 체크하기 |
|
| 538 |
-/*function dupliAddrData(data){
|
|
| 539 |
- |
|
| 540 |
- var chk = true; //중복값 유무 |
|
| 541 |
- var uniqData = []; // 중복값 삭제 후 데이터 저장 |
|
| 542 |
- var dupCnt = 0; |
|
| 543 |
- |
|
| 544 |
- //첨부 주소 정보에서 연락처가 중복되는 경우 하나만 남기고 나머지는 삭제 하고 보여줌 |
|
| 545 |
- $.each(data, function(i, item){
|
|
| 546 |
- |
|
| 547 |
- chk = true; //중복값 유무 |
|
| 548 |
- |
|
| 549 |
- $.each(uniqData, function(j, item2){
|
|
| 550 |
- |
|
| 551 |
- if(item.phone == item2.phone){
|
|
| 552 |
- |
|
| 553 |
- chk = false; |
|
| 554 |
- dupCnt = dupCnt + 1; |
|
| 555 |
- console.log("++++++++++++++ dupCnt ::: "+ dupCnt);
|
|
| 556 |
- |
|
| 557 |
- } |
|
| 558 |
- |
|
| 559 |
- }); |
|
| 560 |
- |
|
| 561 |
- if(chk){
|
|
| 562 |
- |
|
| 563 |
- uniqData.push(item); |
|
| 564 |
- |
|
| 565 |
- } |
|
| 566 |
- |
|
| 567 |
- }); |
|
| 568 |
- |
|
| 569 |
- $("#rowDupCnt").text(dupCnt);
|
|
| 570 |
- return uniqData; |
|
| 571 |
- |
|
| 572 |
-}*/ |
|
| 573 |
- |
|
| 574 |
-var dupliPhoneDataRealList = []; |
|
| 575 |
- |
|
| 576 |
-//중복 전화번호 체크하기 |
|
| 577 |
-function dupliPhoneData(data){
|
|
| 578 |
- |
|
| 579 |
- var chk = true; //중복값 유무 |
|
| 580 |
- var uniqData = []; // 중복값 삭제 후 데이터 저장 |
|
| 581 |
- var dupCnt = 0; |
|
| 582 |
- |
|
| 583 |
- //첨부 주소 정보에서 연락처가 중복되는 경우 하나만 남기고 나머지는 삭제 하고 보여줌 |
|
| 584 |
- $.each(data, function(i, item){
|
|
| 585 |
- |
|
| 586 |
- chk = true; //중복값 유무 |
|
| 587 |
- |
|
| 588 |
- $.each(uniqData, function(j, item2){
|
|
| 589 |
- if(item.phone.length > 0){
|
|
| 590 |
- if(item.phone == item2.phone){
|
|
| 591 |
- |
|
| 592 |
- chk = false; |
|
| 593 |
- dupCnt = dupCnt + 1; |
|
| 594 |
- |
|
| 595 |
- } |
|
| 596 |
- } |
|
| 597 |
- |
|
| 598 |
- }); |
|
| 599 |
- |
|
| 600 |
- if(chk){
|
|
| 601 |
- uniqData.push(item); |
|
| 602 |
- } |
|
| 603 |
- else {
|
|
| 604 |
- // Get 중복 연락처 |
|
| 605 |
- GetDupliPhoneDataReal(item.phone); |
|
| 606 |
- } |
|
| 607 |
- |
|
| 608 |
- }); |
|
| 609 |
- |
|
| 610 |
- //중복건수 텍스트 입력해 주기 |
|
| 611 |
- $("#rowDupCnt").text(dupCnt);
|
|
| 612 |
- |
|
| 613 |
- // 중복번호 버튼 노출 |
|
| 614 |
- if($("#btnAddrMassDupli").length > 0) {
|
|
| 615 |
- $("#btnAddrMassDupli").show();
|
|
| 616 |
- } |
|
| 617 |
- |
|
| 618 |
- // 중복번호(기존 주소록) 버튼 노출 |
|
| 619 |
- if($("#btnAddrMassSaveDupli").length > 0) {
|
|
| 620 |
- $("#btnAddrMassSaveDupli").hide();
|
|
| 621 |
- } |
|
| 622 |
- |
|
| 623 |
- return uniqData; |
|
| 624 |
-} |
|
| 625 |
- |
|
| 626 |
- |
|
| 627 |
-//연락처 중복검사 속도 개선 버전 |
|
| 628 |
-function getSpupDupliPhoneDataChk(data){
|
|
| 629 |
- |
|
| 630 |
- var dataLen = data.length; |
|
| 631 |
- const arrUnique = data.filter((character, idx, arr)=>{
|
|
| 632 |
- return arr.findIndex((item) => item.phone === character.phone) === idx |
|
| 633 |
- }); |
|
| 634 |
- |
|
| 635 |
- var uniqLen = arrUnique.length; |
|
| 636 |
- var dupCnt = dataLen - uniqLen; |
|
| 637 |
- //중복건수 텍스트 입력해 주기 |
|
| 638 |
- $("#rowDupCnt").text(dupCnt);
|
|
| 639 |
- |
|
| 640 |
- return arrUnique; |
|
| 641 |
-} |
|
| 642 |
- |
|
| 643 |
-// Get 중복 연락처 |
|
| 644 |
-function GetDupliPhoneDataReal(item) {
|
|
| 645 |
- var isDuplicate = false; |
|
| 646 |
- if (dupliPhoneDataRealList.length == 0) {
|
|
| 647 |
- dupliPhoneDataRealList.push(item); |
|
| 648 |
- } |
|
| 649 |
- else {
|
|
| 650 |
- for (var i = 0; i < dupliPhoneDataRealList.length; i++) {
|
|
| 651 |
- if (dupliPhoneDataRealList[i] == item) {
|
|
| 652 |
- isDuplicate = true; |
|
| 653 |
- } |
|
| 654 |
- } |
|
| 655 |
- |
|
| 656 |
- if (isDuplicate) {
|
|
| 657 |
- return; |
|
| 658 |
- } |
|
| 659 |
- else {
|
|
| 660 |
- dupliPhoneDataRealList.push(item); |
|
| 661 |
- } |
|
| 662 |
- } |
|
| 663 |
-} |
|
| 664 |
- |
|
| 665 |
-//중복 전화번호 체크하여 중복 갯수 리턴하기 |
|
| 666 |
-function dupliPhoneDataChk(data){
|
|
| 667 |
- |
|
| 668 |
- var chk = true; //중복값 유무 |
|
| 669 |
- var uniqData = []; // 중복값 삭제 후 데이터 저장 |
|
| 670 |
- var dupCnt = 0; |
|
| 671 |
- |
|
| 672 |
- //첨부 주소 정보에서 연락처가 중복되는 경우 하나만 남기고 나머지는 삭제 하고 보여줌 |
|
| 673 |
- $.each(data, function(i, item){
|
|
| 674 |
- |
|
| 675 |
- chk = true; //중복값 유무 |
|
| 676 |
- |
|
| 677 |
- $.each(uniqData, function(j, item2){
|
|
| 678 |
- |
|
| 679 |
- if(item.phone.length > 0){
|
|
| 680 |
- |
|
| 681 |
- if(item.phone == item2.phone){
|
|
| 682 |
- |
|
| 683 |
- chk = false; |
|
| 684 |
- dupCnt = dupCnt + 1; |
|
| 685 |
- |
|
| 686 |
- } |
|
| 687 |
- |
|
| 688 |
- } |
|
| 689 |
- |
|
| 690 |
- }); |
|
| 691 |
- |
|
| 692 |
- if(chk){
|
|
| 693 |
- |
|
| 694 |
- uniqData.push(item); |
|
| 695 |
- |
|
| 696 |
- } |
|
| 697 |
- |
|
| 698 |
- }); |
|
| 699 |
- |
|
| 700 |
- return dupCnt; |
|
| 701 |
- |
|
| 702 |
-} |
|
| 703 |
- |
|
| 704 |
-//특정 바이트수 만큼 문자열 잘라서 반환해주기 |
|
| 705 |
-function strUnderLineSubstring(str, maxLength){
|
|
| 706 |
- |
|
| 707 |
- for(b=i=0;c=str.charCodeAt(i);) {
|
|
| 708 |
- |
|
| 709 |
- b+=c>>7?2:1; |
|
| 710 |
- |
|
| 711 |
- if (b > maxLength) |
|
| 712 |
- |
|
| 713 |
- break; |
|
| 714 |
- |
|
| 715 |
- i++; |
|
| 716 |
- |
|
| 717 |
- } |
|
| 718 |
- |
|
| 719 |
- return str.substring(0,i); |
|
| 720 |
- |
|
| 721 |
-} |
|
| 722 |
- |
|
| 723 |
- |
|
| 724 |
-//특정 글자수 만큼 문자열 잘라서 반환해주기 |
|
| 725 |
-function strMaxLengthSubstring(str, maxLength){
|
|
| 726 |
- |
|
| 727 |
- for(b=i=0;c=str.charCodeAt(i);) {
|
|
| 728 |
- |
|
| 729 |
- if (i > maxLength) |
|
| 730 |
- |
|
| 731 |
- break; |
|
| 732 |
- |
|
| 733 |
- i++; |
|
| 734 |
- |
|
| 735 |
- } |
|
| 736 |
- |
|
| 737 |
- return str.substring(0,i); |
|
| 738 |
- |
|
| 739 |
-} |
|
| 740 |
- |
|
| 741 |
-//문자열 글자수 반환해주기(한글, 영문, 특수문자, 엔터와 상관없이 글자수로 체크함) |
|
| 742 |
-function strMaxCharacterCnt(str){
|
|
| 743 |
- |
|
| 744 |
- var totLen = 0; |
|
| 745 |
- for(b=i=0;c=str.charCodeAt(i);) {
|
|
| 746 |
- i++; |
|
| 747 |
- totLen = i; |
|
| 748 |
- } |
|
| 749 |
- return totLen; |
|
| 750 |
-} |
|
| 751 |
- |
|
| 752 |
-//문자입력 첫번째 글자가 한글, 숫자, 영문자가 아니면 경고 표시 |
|
| 753 |
-function strFirstCharCheck(str){
|
|
| 754 |
- |
|
| 755 |
- var pattern1 = /[0-9]/; |
|
| 756 |
- var pattern2 = /[a-zA-Z]/; |
|
| 757 |
- var pattern3 = /[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/; |
|
| 758 |
- |
|
| 759 |
- var spChar = 0; |
|
| 760 |
- for(var i=0; i<str.length; i++){
|
|
| 761 |
- |
|
| 762 |
- if (!pattern1.test(str.charAt(i)) && !pattern2.test(str.charAt(i)) && !pattern3.test(str.charAt(i))) {
|
|
| 763 |
- spChar++; |
|
| 764 |
- }else{
|
|
| 765 |
- break; |
|
| 766 |
- } |
|
| 767 |
- |
|
| 768 |
- } |
|
| 769 |
- |
|
| 770 |
- var repStr = str.substring(0,spChar); |
|
| 771 |
- return repStr; |
|
| 772 |
- |
|
| 773 |
-} |
|
| 774 |
- |
|
| 775 |
-function strChinJpnCheck(str){
|
|
| 776 |
- |
|
| 777 |
- var rtnStr = ""; |
|
| 778 |
- for(var i=0; i < str.length; i++){
|
|
| 779 |
- |
|
| 780 |
- var cont = str.charAt(i); |
|
| 781 |
- |
|
| 782 |
- if(str.charAt(i) >= '\u4E00' && str.charAt(i) <= '\u9FFF'){//한중일 공통한자일 경우
|
|
| 783 |
- |
|
| 784 |
- if(rtnStr.length == 0){
|
|
| 785 |
- rtnStr = cont; |
|
| 786 |
- }else{
|
|
| 787 |
- rtnStr = rtnStr + ", " + cont; |
|
| 788 |
- } |
|
| 789 |
- |
|
| 790 |
- }else if(str.charAt(i) >= '\u2E80' && str.charAt(i) <= '\u2EFF'){//한자부수
|
|
| 791 |
- |
|
| 792 |
- if(rtnStr.length == 0){
|
|
| 793 |
- rtnStr = cont; |
|
| 794 |
- }else{
|
|
| 795 |
- rtnStr = rtnStr + ", " + cont; |
|
| 796 |
- } |
|
| 797 |
- |
|
| 798 |
- }else if(str.charAt(i) >= '\u3400' && str.charAt(i) <= '\u4DB5'){//한자확장A
|
|
| 799 |
- |
|
| 800 |
- if(rtnStr.length == 0){
|
|
| 801 |
- rtnStr = cont; |
|
| 802 |
- }else{
|
|
| 803 |
- rtnStr = rtnStr + ", " + cont; |
|
| 804 |
- } |
|
| 805 |
- |
|
| 806 |
- } |
|
| 807 |
- |
|
| 808 |
- } |
|
| 809 |
- |
|
| 810 |
- return rtnStr; |
|
| 811 |
-} |
|
| 812 |
- |
|
| 813 |
-//받아온 str 에 이모지가 포함되어있는지 체크하여 갯수로 반환 |
|
| 814 |
-function kakaoTemplateEmojiCheck (str) {
|
|
| 815 |
- var regex = /[\u{1F004}-\u{1F9E6}]|[\u{1F600}-\u{1F9D0}]/gu;
|
|
| 816 |
- var usedEmoji = ""; |
|
| 817 |
- var returnFlag = true; |
|
| 818 |
- |
|
| 819 |
- var splitMsg = str.split(/.*?/u); |
|
| 820 |
- |
|
| 821 |
- for(var i=0; i < splitMsg.length; i++){
|
|
| 822 |
- if(splitMsg[i].match(regex)) {
|
|
| 823 |
- usedEmoji = usedEmoji + splitMsg[i]; |
|
| 824 |
- returnFlag = false; |
|
| 825 |
- } |
|
| 826 |
- } |
|
| 827 |
- if(!returnFlag) alert("알림톡 내용에 이모지는 사용할 수 없습니다.\n이모지 삭제후 등록해주세요.\n(" + usedEmoji + ")");
|
|
| 828 |
- |
|
| 829 |
- return returnFlag; |
|
| 830 |
-} |
|
| 831 |
- |
|
| 832 |
-//받아온 str 에 이모지가 포함되어있는지 체크하여 갯수로 반환 |
|
| 833 |
-function emojiCheck (str) {
|
|
| 834 |
- var regex = /[\u{1F004}-\u{1F9E6}]|[\u{1F600}-\u{1F9D0}]/gu;
|
|
| 835 |
- var usedEmoji = ""; |
|
| 836 |
- var returnFlag = true; |
|
| 837 |
- |
|
| 838 |
- var splitMsg = str.split(/.*?/u); |
|
| 839 |
- |
|
| 840 |
- for(var i=0; i < splitMsg.length; i++){
|
|
| 841 |
- if(splitMsg[i].match(regex)) {
|
|
| 842 |
- usedEmoji = usedEmoji + splitMsg[i]; |
|
| 843 |
- returnFlag = false; |
|
| 844 |
- } |
|
| 845 |
- } |
|
| 846 |
- if(!returnFlag) alert("문자 제목, 내용에 이모지는 사용할 수 없습니다.\n이모지 삭제후 발송해주세요.\n(" + usedEmoji + ")");
|
|
| 847 |
- |
|
| 848 |
- return returnFlag; |
|
| 849 |
-} |
|
| 850 |
- |
|
| 851 |
-function addrEmojiCheck (str) {
|
|
| 852 |
- var regex = /[\u{1F004}-\u{1F9E6}]|[\u{1F600}-\u{1F9D0}]/gu;
|
|
| 853 |
- var usedEmoji = ""; |
|
| 854 |
- var returnFlag = true; |
|
| 855 |
- |
|
| 856 |
- var splitMsg = str.split(/.*?/u); |
|
| 857 |
- |
|
| 858 |
- for(var i=0; i < splitMsg.length; i++){
|
|
| 859 |
- if(splitMsg[i].match(regex)) {
|
|
| 860 |
- usedEmoji = usedEmoji + splitMsg[i]; |
|
| 861 |
- returnFlag = false; |
|
| 862 |
- } |
|
| 863 |
- } |
|
| 864 |
- |
|
| 865 |
- if(!returnFlag) {
|
|
| 866 |
- //로딩창 hide |
|
| 867 |
- $('.loading_layer').removeClass('active');
|
|
| 868 |
- |
|
| 869 |
- alert("주소록 저장 목록 중 이모지를 사용할 수 없습니다.\n이모지 삭제후 발송해주세요.\n(" + usedEmoji + ")");
|
|
| 870 |
- } |
|
| 871 |
- |
|
| 872 |
- return returnFlag; |
|
| 873 |
-} |
|
| 874 |
- |
|
| 875 |
-// 제목이 치환 문구 체크 |
|
| 876 |
-function getSpacialStringChk(mmsSubject){
|
|
| 877 |
- |
|
| 878 |
- var returnStr = false; |
|
| 879 |
- |
|
| 880 |
- if(mmsSubject.indexOf("[*이름*]") > -1 || mmsSubject.indexOf("[*1*]") > -1 || mmsSubject.indexOf("[*2*]") > -1 || mmsSubject.indexOf("[*3*]") > -1 || mmsSubject.indexOf("[*4*]") > -1){
|
|
| 881 |
- returnStr = true; |
|
| 882 |
- } |
|
| 883 |
- |
|
| 884 |
- return returnStr; |
|
| 885 |
- |
|
| 886 |
-} |
|
| 887 |
- |
|
| 888 |
-//커서 위치에 삽입 |
|
| 889 |
-function setCursorInsertText(pTxtArea, pAddTxt) {
|
|
| 890 |
- var txtArea = document.getElementById(pTxtArea); |
|
| 891 |
- var txtValue = txtArea.value; |
|
| 892 |
- var selectPos = txtArea.selectionStart; // 커서 위치 지정 |
|
| 893 |
- var beforeTxt = txtValue.substring(0, selectPos); // 기존텍스트 ~ 커서시작점 까지의 문자 |
|
| 894 |
- var afterTxt = txtValue.substring(txtArea.selectionEnd, txtValue.length); // 커서끝지점 ~ 기존텍스트 까지의 문자 |
|
| 895 |
- var addTxt = pAddTxt; // 추가 입력 할 텍스트 |
|
| 896 |
- txtArea.value = beforeTxt + addTxt + afterTxt; |
|
| 897 |
- |
|
| 898 |
- selectPos = selectPos + addTxt.length; |
|
| 899 |
- txtArea.selectionStart = selectPos; // 커서 시작점을 추가 삽입된 텍스트 이후로 지정 |
|
| 900 |
- txtArea.selectionEnd = selectPos; // 커서 끝지점을 추가 삽입된 텍스트 이후로 지정 |
|
| 901 |
- txtArea.focus(); |
|
| 902 |
-} |
|
| 903 |
- |
|
| 904 |
-//받는사람 목록의 체크박스가 20개가 모두 체크 되었는지 확인 |
|
| 905 |
-function fnCallToChkAllCnt(){
|
|
| 906 |
- |
|
| 907 |
- var chkCnt = 0; |
|
| 908 |
- var totChkCnt = $("input:checkbox[name='chkCallTo']").length;
|
|
| 909 |
- var btnAllVal = $("#checkAll").val();
|
|
| 910 |
- |
|
| 911 |
- //체크박스 체크된 갯수 구하기 |
|
| 912 |
- $("input:checkbox[name='chkCallTo']").each(function () {
|
|
| 913 |
- if($(this).is(':checked')){
|
|
| 914 |
- chkCnt++; |
|
| 915 |
- }; |
|
| 916 |
- }); |
|
| 917 |
- |
|
| 918 |
- //전체선택 체크 여부 값 변경해 주기 |
|
| 919 |
- //현재 체크된 체크박스 갯수와 전체 체크박스 갯수 비교하기 |
|
| 920 |
- if(totChkCnt > 0 && totChkCnt == chkCnt){
|
|
| 921 |
- |
|
| 922 |
- if(btnAllVal == 'N'){
|
|
| 923 |
- $("#checkAll").val("Y");
|
|
| 924 |
- $("#checkAll").text("선택해제");
|
|
| 925 |
- }else{
|
|
| 926 |
- $("#checkAll").val("N");
|
|
| 927 |
- $("#checkAll").text("전체선택");
|
|
| 928 |
- } |
|
| 929 |
- |
|
| 930 |
- }else{
|
|
| 931 |
- |
|
| 932 |
- $("#checkAll").val("N");
|
|
| 933 |
- $("#checkAll").text("전체선택");
|
|
| 934 |
- |
|
| 935 |
- } |
|
| 936 |
- |
|
| 937 |
-} |
|
| 938 |
- |
|
| 939 |
-//선거문자 20건 수신자 목록 추가된 건수 및 발송 금액 변경해주기 |
|
| 940 |
-function fnChkCallToChange(){
|
|
| 941 |
- |
|
| 942 |
- var callToCnt = 0; |
|
| 943 |
- $("input[name=chkCallTo]").each(function(){
|
|
| 944 |
- |
|
| 945 |
- var chkSts = $(this).is(':checked');
|
|
| 946 |
- if(chkSts){
|
|
| 947 |
- callToCnt++; |
|
| 948 |
- } |
|
| 949 |
- }); |
|
| 950 |
- |
|
| 951 |
- //체크박스가 모두 체크 되어있는지 확인 하기 |
|
| 952 |
- fnCallToChkAllCnt(); |
|
| 953 |
- |
|
| 954 |
- updateTotCnt(callToCnt); //전체 데이터 갯수 구하기 |
|
| 955 |
- totalPriceSum(callToCnt); |
|
| 956 |
- |
|
| 957 |
-} |
|
| 958 |
- |
|
| 959 |
-//Tabulator 주소록 그룹 목록일 경우 각 그룹 주소 갯수 합산해주기 |
|
| 960 |
-function getTabulatorLAddrGrpCnt(){
|
|
| 961 |
- |
|
| 962 |
- var selectedData = tableL.getRows(); |
|
| 963 |
- var totAddrCnt = 0; |
|
| 964 |
- for(var i=0; i < selectedData.length; i++){
|
|
| 965 |
- |
|
| 966 |
- //일괄변환 문자에 콤마(,)가 들어가있으면 배열로 넘길때 문제가 발생하여 특수문자(§)로 치환하여 넘겨주도록 한다. |
|
| 967 |
- var addrGrpCnt = tableL.getRows()[i].getData().addrGrpCnt; |
|
| 968 |
- |
|
| 969 |
- totAddrCnt = Number(totAddrCnt) + Number(addrGrpCnt); |
|
| 970 |
- |
|
| 971 |
- } |
|
| 972 |
- |
|
| 973 |
- return totAddrCnt; |
|
| 1 |
+/** |
|
| 2 |
+ * 휴대폰번호 유효성 체크 |
|
| 3 |
+ * true, false 반환 |
|
| 4 |
+ * 대시 유무 상관없음 |
|
| 5 |
+ */ |
|
| 6 |
+function checkHpNum(str) {
|
|
| 7 |
+ |
|
| 8 |
+ var regExp = /^(050[2345678]{1}|01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
|
|
| 9 |
+ //var regExp = /^(01[016789]{1}|070|02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/; //지역번호(일반전화) 형식까지 체크해주는 정규식
|
|
| 10 |
+ return regExp.test(str); |
|
| 11 |
+} |
|
| 12 |
+ |
|
| 13 |
+/** |
|
| 14 |
+ * 휴대폰번호만 유효성 체크 |
|
| 15 |
+ * true, false 반환 |
|
| 16 |
+ * 대시 유무 상관없음 |
|
| 17 |
+ */ |
|
| 18 |
+function checkOnlyHpNum(str) {
|
|
| 19 |
+ |
|
| 20 |
+ //var regExp = /^(050[234567]{1}|01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
|
|
| 21 |
+ var regExp = /^(01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$/; //지역번호(일반전화) 형식까지 체크해주는 정규식
|
|
| 22 |
+ return regExp.test(str); |
|
| 23 |
+} |
|
| 24 |
+ |
|
| 25 |
+/** |
|
| 26 |
+ * 팩스 번호 유효성 체크 |
|
| 27 |
+ * true, false 반환 |
|
| 28 |
+ * 앞 3자리를 체크 함 |
|
| 29 |
+ * -- 전국 지역번호 |
|
| 30 |
+ * 02 서울특별시 |
|
| 31 |
+ 031 경기도 |
|
| 32 |
+ 032 인천광역시 |
|
| 33 |
+ 033 강원도 |
|
| 34 |
+ 041 충청남도 |
|
| 35 |
+ 042 대전광역시 |
|
| 36 |
+ 043 충청북도 |
|
| 37 |
+ 044 세종특별자치시 |
|
| 38 |
+ 051 부산광역시 |
|
| 39 |
+ 052 울산광역시 |
|
| 40 |
+ 053 대구광역시 |
|
| 41 |
+ 054 경상북도 |
|
| 42 |
+ 055 경상남도 |
|
| 43 |
+ 061 전라남도 |
|
| 44 |
+ 062 광주광역시 |
|
| 45 |
+ 063 전라북도 |
|
| 46 |
+ 064 제주특별자치도 |
|
| 47 |
+ |
|
| 48 |
+ -- 타사부가번호 |
|
| 49 |
+ 030* |
|
| 50 |
+ 050* |
|
| 51 |
+ 060 |
|
| 52 |
+ 070 |
|
| 53 |
+ 080 |
|
| 54 |
+ 1** |
|
| 55 |
+ |
|
| 56 |
+ 위 번호로 시작하는 팩스 번호만 허용함. |
|
| 57 |
+ */ |
|
| 58 |
+function checkFaxNum(str) {
|
|
| 59 |
+ str = removeDash(str); |
|
| 60 |
+ var subNum = str.substring(0,3); |
|
| 61 |
+ var regExp = /^(02[0-9]{1}|030|050|060|070|080|0[3-6]{1}[1-5]{1}|1[0-9]{1}[0-9]{1})$/; //지역번호(일반전화) 형식까지 체크해주는 정규식
|
|
| 62 |
+ return regExp.test(subNum); |
|
| 63 |
+} |
|
| 64 |
+ |
|
| 65 |
+/* |
|
| 66 |
+ * 일반전화 유효성 체크 |
|
| 67 |
+ * true, false 반환 |
|
| 68 |
+ * |
|
| 69 |
+ * */ |
|
| 70 |
+function checkNorPhoneNum(str){
|
|
| 71 |
+ |
|
| 72 |
+ var regExp = /^(02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
|
|
| 73 |
+ |
|
| 74 |
+ /** |
|
| 75 |
+ * 기간통신사업자 공통 부가서비스 번호 체크 |
|
| 76 |
+ * 번호 사업자 |
|
| 77 |
+ 1588,1577,1899 KT |
|
| 78 |
+ 1544,1644,1661,1800 ,1833 LG유플러스 |
|
| 79 |
+ 1566,1600,1670 SK브로드밴드 |
|
| 80 |
+ 1688,1666 온세텔레콤 |
|
| 81 |
+ 1599 SK텔링크 |
|
| 82 |
+ 1877 한국케이블텔레콤 |
|
| 83 |
+ 1855 CJ헬로비전 |
|
| 84 |
+ 1661 alleh KT |
|
| 85 |
+ * |
|
| 86 |
+ * */ |
|
| 87 |
+ |
|
| 88 |
+ if(str.substring(0,2) == "15"){
|
|
| 89 |
+ |
|
| 90 |
+ regExp = /^(15[0-9]{2})-?[0-9]{4}$/;
|
|
| 91 |
+ |
|
| 92 |
+ }else if(str.substring(0,2) == "16"){
|
|
| 93 |
+ |
|
| 94 |
+ regExp = /^(16[0-9]{2})-?[0-9]{4}$/;
|
|
| 95 |
+ |
|
| 96 |
+ }else if(str.substring(0,2) == "18"){
|
|
| 97 |
+ |
|
| 98 |
+ regExp = /^(18[0-9]{2})-?[0-9]{4}$/;
|
|
| 99 |
+ |
|
| 100 |
+ } |
|
| 101 |
+ |
|
| 102 |
+ return regExp.test(str); |
|
| 103 |
+} |
|
| 104 |
+ |
|
| 105 |
+/* |
|
| 106 |
+ * 일반전화 / 핸드폰 번호 종류 확인 |
|
| 107 |
+ * true, false 반환 |
|
| 108 |
+ * |
|
| 109 |
+ * */ |
|
| 110 |
+function checkTelHpType(str){
|
|
| 111 |
+ |
|
| 112 |
+ var subCall = str.substring(0,3); // 전화번호 앞 3자리 받아오기 |
|
| 113 |
+ var strType = ""; // 결과 반환 |
|
| 114 |
+ |
|
| 115 |
+ if(subCall != '010' |
|
| 116 |
+ && subCall != '011' |
|
| 117 |
+ && subCall != '016' |
|
| 118 |
+ && subCall != '017'){//일반전화 번호이면
|
|
| 119 |
+ |
|
| 120 |
+ strType = "Tel"; |
|
| 121 |
+ |
|
| 122 |
+ }else{
|
|
| 123 |
+ |
|
| 124 |
+ strType = "Hp"; |
|
| 125 |
+ } |
|
| 126 |
+ |
|
| 127 |
+ return strType; |
|
| 128 |
+} |
|
| 129 |
+ |
|
| 130 |
+ |
|
| 131 |
+/** |
|
| 132 |
+ * 휴대폰번호 대시('-') 제거
|
|
| 133 |
+ */ |
|
| 134 |
+function removeDash(str) {
|
|
| 135 |
+ var regExp = new RegExp('-', 'g');
|
|
| 136 |
+ return str.replace(regExp, ''); |
|
| 137 |
+} |
|
| 138 |
+ |
|
| 139 |
+/** |
|
| 140 |
+ * 휴대폰번호 대시('-') 추가
|
|
| 141 |
+ * 대시 유무 상관없음 |
|
| 142 |
+ * 유효성 맞지 않을시 변환안됨. |
|
| 143 |
+ */ |
|
| 144 |
+function addDash(str) {
|
|
| 145 |
+ return str.replace(/(^01[016789]{1}|070)([0-9]{3}|[0-9]{4})([0-9]{4})$/,"$1-$2-$3").replace("--", "-");
|
|
| 146 |
+} |
|
| 147 |
+ |
|
| 148 |
+/** |
|
| 149 |
+ * ReplaceAll (by javascript prototype) |
|
| 150 |
+ * 정규식 패턴에서 \는 두 개 사용 |
|
| 151 |
+ */ |
|
| 152 |
+String.prototype.replaceAll = function(pattern, changeString) {
|
|
| 153 |
+ var regExp = new RegExp(pattern, 'g'); |
|
| 154 |
+ return this.replace(regExp, changeString); |
|
| 155 |
+}; |
|
| 156 |
+ |
|
| 157 |
+/** |
|
| 158 |
+ * 이메일 유효성 체크 |
|
| 159 |
+ * true, false 반환 |
|
| 160 |
+ * |
|
| 161 |
+ */ |
|
| 162 |
+function checkEmail(str) {
|
|
| 163 |
+ var regExp = /^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\-]+\.[A-Za-z0-9\-]+/; |
|
| 164 |
+ return regExp.test(str); |
|
| 165 |
+} |
|
| 166 |
+ |
|
| 167 |
+/** |
|
| 168 |
+ * XSS 체크하기 |
|
| 169 |
+ * |
|
| 170 |
+ * |
|
| 171 |
+ */ |
|
| 172 |
+ |
|
| 173 |
+function XSSCheck(str, level) {
|
|
| 174 |
+ if (level == undefined || level == 0) {
|
|
| 175 |
+ str = str.replace(/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-/g,""); |
|
| 176 |
+ } else if (level != undefined && level == 1) {
|
|
| 177 |
+ str = str.replace(/\</g, "<"); |
|
| 178 |
+ str = str.replace(/\>/g, ">"); |
|
| 179 |
+ } |
|
| 180 |
+ return str; |
|
| 181 |
+} |
|
| 182 |
+ |
|
| 183 |
+ |
|
| 184 |
+//숫자 천단위 콤마 찍어주기 |
|
| 185 |
+function numberWithCommas(x) {
|
|
| 186 |
+ return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
| 187 |
+} |
|
| 188 |
+ |
|
| 189 |
+function comma(num){
|
|
| 190 |
+ var len, point, str; |
|
| 191 |
+ num = num + ""; |
|
| 192 |
+ point = num.length % 3; |
|
| 193 |
+ len = num.length; |
|
| 194 |
+ str = num.substring(0, point); |
|
| 195 |
+ while (point < len) {
|
|
| 196 |
+ if (str != "") str += ","; |
|
| 197 |
+ str += num.substring(point, point + 3); |
|
| 198 |
+ point += 3; |
|
| 199 |
+ } |
|
| 200 |
+ return str; |
|
| 201 |
+} |
|
| 202 |
+ |
|
| 203 |
+ |
|
| 204 |
+function totalPriceSum(totRows){
|
|
| 205 |
+ |
|
| 206 |
+ var contents = $('#smsTxtArea').val(); //입력 문자 내용
|
|
| 207 |
+ var msgType = conTypeCheck(contents); //입력 문자 길이 체크 |
|
| 208 |
+ var collNumCnt = parseInt(totRows); //받는사람 건수 |
|
| 209 |
+ var price = 0; //개별 건수 금액 |
|
| 210 |
+ var totalPrice = 0; //전체 금액 |
|
| 211 |
+ //var strDot = []; |
|
| 212 |
+ //var subPrice = ""; |
|
| 213 |
+ //var spPrice = ""; |
|
| 214 |
+ var totalStr = "0"; //전체 합계 금액 |
|
| 215 |
+ var userMoney = $('#hdUserMoney').text(); //헤더 영역 보유 금액 불러오기
|
|
| 216 |
+ var msgCnt = 0; //발송 가능 문자 건수 |
|
| 217 |
+ var imgCnt = $("#imgCnt").val(); // 현재 페이지에 첨부된 이미지 갯수
|
|
| 218 |
+ |
|
| 219 |
+ if(!userMoney > 0){
|
|
| 220 |
+ |
|
| 221 |
+ userMoney = 0; |
|
| 222 |
+ |
|
| 223 |
+ } |
|
| 224 |
+ //헤더 영역 보유 금액 콤마 문자 제거 |
|
| 225 |
+ if(userMoney != ''){
|
|
| 226 |
+ |
|
| 227 |
+ userMoney = userMoney.replaceAll("," , "");
|
|
| 228 |
+ |
|
| 229 |
+ } |
|
| 230 |
+ |
|
| 231 |
+ /*if(msgType == "P"){//그림문자
|
|
| 232 |
+ |
|
| 233 |
+ //그림 이미지 갯수에 따른 금액 계산 |
|
| 234 |
+ if(imgCnt > 2){//그림 3장일경우
|
|
| 235 |
+ price = parseFloat($('#p3Price').val());
|
|
| 236 |
+ }else if(imgCnt > 1){//그림 2장일경우
|
|
| 237 |
+ price = parseFloat($('#p2Price').val());
|
|
| 238 |
+ }else{//그림 1장일 경우
|
|
| 239 |
+ price = parseFloat($('#pPrice').val());
|
|
| 240 |
+ } |
|
| 241 |
+ |
|
| 242 |
+ msgCnt = parseFloat(userMoney) / price; |
|
| 243 |
+ |
|
| 244 |
+ }else if(msgType == "M"){//장문 문자
|
|
| 245 |
+ |
|
| 246 |
+ price = parseFloat($('#mPrice').val());
|
|
| 247 |
+ msgCnt = parseFloat(userMoney) / price; |
|
| 248 |
+ |
|
| 249 |
+ }else{//단문문자
|
|
| 250 |
+ |
|
| 251 |
+ price = parseFloat($('#sPrice').val());
|
|
| 252 |
+ msgCnt = parseFloat(userMoney) / price; |
|
| 253 |
+ |
|
| 254 |
+ }*/ |
|
| 255 |
+ |
|
| 256 |
+ //금액 소수점 제거 하여 적용 20220623 소수점 버림 처리 |
|
| 257 |
+ if(msgType == "P"){//그림문자
|
|
| 258 |
+ |
|
| 259 |
+ //그림 이미지 갯수에 따른 금액 계산 |
|
| 260 |
+ if(imgCnt > 2){//그림 3장일경우
|
|
| 261 |
+ price = $('#p3Price').val();
|
|
| 262 |
+ }else if(imgCnt > 1){//그림 2장일경우
|
|
| 263 |
+ price = $('#p2Price').val();
|
|
| 264 |
+ }else{//그림 1장일 경우
|
|
| 265 |
+ price = $('#pPrice').val();
|
|
| 266 |
+ } |
|
| 267 |
+ |
|
| 268 |
+ msgCnt = userMoney / price; |
|
| 269 |
+ |
|
| 270 |
+ }else if(msgType == "M"){//장문 문자
|
|
| 271 |
+ |
|
| 272 |
+ price = $('#mPrice').val();
|
|
| 273 |
+ msgCnt = userMoney / price; |
|
| 274 |
+ |
|
| 275 |
+ }else{//단문문자
|
|
| 276 |
+ |
|
| 277 |
+ price = $('#sPrice').val();
|
|
| 278 |
+ msgCnt = userMoney / price; |
|
| 279 |
+ |
|
| 280 |
+ } |
|
| 281 |
+ |
|
| 282 |
+ totalPrice = price * collNumCnt; |
|
| 283 |
+ |
|
| 284 |
+ // 소수점 첫째자리 까지 표시 |
|
| 285 |
+ totalPrice = totalPrice.toFixed(1); |
|
| 286 |
+ |
|
| 287 |
+ if(totalPrice > 0){
|
|
| 288 |
+ |
|
| 289 |
+ //totalStr = totalPrice.toFixed(2); |
|
| 290 |
+ totalStr = totalPrice; |
|
| 291 |
+ |
|
| 292 |
+ } |
|
| 293 |
+ |
|
| 294 |
+ //개별 문자 단가 파라미터에 입력 |
|
| 295 |
+ $('#eachPrice').val(numberWithCommas(price));
|
|
| 296 |
+ |
|
| 297 |
+ |
|
| 298 |
+ //결제금액 합계 파라이터에 입력 |
|
| 299 |
+ $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 300 |
+ |
|
| 301 |
+ //결제금액 합계 화면에 표시 |
|
| 302 |
+ $('#totalPriceTxt').text(numberWithCommas(totalStr));
|
|
| 303 |
+ |
|
| 304 |
+ //현재 문자 전송 가능 갯수 표시 |
|
| 305 |
+ $('.nowMsgCnt').text(numberWithCommas(msgCnt.toFixed()));
|
|
| 306 |
+ |
|
| 307 |
+ if(msgType == 'P'){
|
|
| 308 |
+ |
|
| 309 |
+ $('#nowMsgType').text("그림");
|
|
| 310 |
+ |
|
| 311 |
+ }else if(msgType == 'M'){
|
|
| 312 |
+ |
|
| 313 |
+ $('#nowMsgType').text("장문");
|
|
| 314 |
+ |
|
| 315 |
+ }else{
|
|
| 316 |
+ |
|
| 317 |
+ $('#nowMsgType').text("단문");
|
|
| 318 |
+ |
|
| 319 |
+ } |
|
| 320 |
+ |
|
| 321 |
+ $('#repPriceTxt').hide();
|
|
| 322 |
+ |
|
| 323 |
+ return totalStr; |
|
| 324 |
+ |
|
| 325 |
+} |
|
| 326 |
+ |
|
| 327 |
+function replTotalPriceSum(msg_short, msg_long, totRows){
|
|
| 328 |
+ |
|
| 329 |
+ var shortPrice = 0; //단문 개별 건수 금액 |
|
| 330 |
+ var longPrice = 0; //장문 개별 건수 금액 |
|
| 331 |
+ var imgPrice = 0; //그림문자 개별 건수 금액 |
|
| 332 |
+ var totalPrice = 0; //전체 금액 |
|
| 333 |
+ var totalStr = "0"; //전체 합계 금액 |
|
| 334 |
+ var contents = $('#smsTxtArea').val(); //입력 문자 내용
|
|
| 335 |
+ var msgType = conTypeCheck(contents); //입력 문자 길이 체크 |
|
| 336 |
+ var userMoney = $('#hdUserMoney').text(); //헤더 영역 보유 금액 불러오기
|
|
| 337 |
+ var msgCnt = 0; //발송 가능 문자 건수 |
|
| 338 |
+ var imgCnt = $("#imgCnt").val(); // 현재 페이지에 첨부된 이미지 갯수
|
|
| 339 |
+ var collNumCnt = parseInt(totRows); //받는사람 건수 |
|
| 340 |
+ var totalCntTxt = ""; |
|
| 341 |
+ |
|
| 342 |
+ //금액 소수점 제거하여 금액 처리 |
|
| 343 |
+ if(msgType == "P"){//그림문자
|
|
| 344 |
+ |
|
| 345 |
+ //그림 이미지 갯수에 따른 금액 계산 |
|
| 346 |
+ if(imgCnt > 2){//그림 3장일경우
|
|
| 347 |
+ imgPrice = $('#p3Price').val();
|
|
| 348 |
+ }else if(imgCnt > 1){//그림 2장일경우
|
|
| 349 |
+ imgPrice = $('#p2Price').val();
|
|
| 350 |
+ |
|
| 351 |
+ }else{//그림 1장일 경우
|
|
| 352 |
+ imgPrice = $('#pPrice').val();
|
|
| 353 |
+ } |
|
| 354 |
+ |
|
| 355 |
+ msgCnt = userMoney.replaceAll(",","") / imgPrice;
|
|
| 356 |
+ |
|
| 357 |
+ var imgTotPrice = imgPrice * collNumCnt; |
|
| 358 |
+ imgTotPrice = Math.round(imgTotPrice * 100) / 100; //소수점 2자리 반올리 처리해주기 |
|
| 359 |
+ |
|
| 360 |
+ totalPrice = totalPrice + imgTotPrice; |
|
| 361 |
+ |
|
| 362 |
+ //input hidden 개별 문자 단가 파라미터에 입력 |
|
| 363 |
+ $('#eachPrice').val(numberWithCommas(imgPrice));
|
|
| 364 |
+ |
|
| 365 |
+ //input hidden 결제금액 합계 파라이터에 입력 |
|
| 366 |
+ $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 367 |
+ |
|
| 368 |
+ //결제금액 합계 화면에 표시 |
|
| 369 |
+ $('#totalPriceTxt').text(numberWithCommas(totalStr));
|
|
| 370 |
+ |
|
| 371 |
+ //현재 문자 전송 가능 갯수 표시 |
|
| 372 |
+ $('.nowMsgCnt').text(numberWithCommas(msgCnt.toFixed()));
|
|
| 373 |
+ |
|
| 374 |
+ //변환문자 건수 내용 표기 |
|
| 375 |
+ totalCntTxt = "그림 : <strong>" + totRows + "</strong> 건";; |
|
| 376 |
+ |
|
| 377 |
+ }else{
|
|
| 378 |
+ |
|
| 379 |
+ if(msg_long > 0){//장문 문자
|
|
| 380 |
+ |
|
| 381 |
+ longPrice = $('#mPrice').val();
|
|
| 382 |
+ var longTotPrice = longPrice * msg_long; |
|
| 383 |
+ longTotPrice = Math.round(longTotPrice * 100) / 100; //소수점 2자리 반올리 처리해주기 |
|
| 384 |
+ |
|
| 385 |
+ totalPrice = totalPrice + longTotPrice; |
|
| 386 |
+ |
|
| 387 |
+ //input hidden 개별 문자 단가 파라미터에 입력 |
|
| 388 |
+ $('#eachPrice').val(numberWithCommas(longPrice));
|
|
| 389 |
+ |
|
| 390 |
+ //변환문자 건수 내용 표기 |
|
| 391 |
+ totalCntTxt = "장문 : <strong>" + msg_long + "</strong> 건"; |
|
| 392 |
+ |
|
| 393 |
+ //변환장문 건수 Hidden 폼에 넣어주기 |
|
| 394 |
+ $('#longMsgCnt').val(msg_long);
|
|
| 395 |
+ |
|
| 396 |
+ }else{
|
|
| 397 |
+ |
|
| 398 |
+ //변환장문 건수 Hidden 폼에 넣어주기 |
|
| 399 |
+ $('#longMsgCnt').val(msg_long);
|
|
| 400 |
+ |
|
| 401 |
+ } |
|
| 402 |
+ |
|
| 403 |
+ if(msg_short > 0){//단문문자
|
|
| 404 |
+ |
|
| 405 |
+ shortPrice = $('#sPrice').val();
|
|
| 406 |
+ var shortTotPrice = shortPrice * msg_short; |
|
| 407 |
+ shortTotPrice = Math.round(shortTotPrice * 100) / 100; //소수점 2자리 반올리 처리해주기 |
|
| 408 |
+ |
|
| 409 |
+ totalPrice = totalPrice + shortTotPrice; |
|
| 410 |
+ |
|
| 411 |
+ //input hidden 개별 문자 단가 파라미터에 입력 |
|
| 412 |
+ $('#eachPrice').val(numberWithCommas(shortPrice));
|
|
| 413 |
+ |
|
| 414 |
+ if(msg_long > 0){
|
|
| 415 |
+ |
|
| 416 |
+ //변환문자 건수 내용 표기 |
|
| 417 |
+ totalCntTxt = totalCntTxt + "/ 단문 : <strong>" + msg_short + "</strong> 건"; |
|
| 418 |
+ |
|
| 419 |
+ }else{
|
|
| 420 |
+ |
|
| 421 |
+ //변환문자 건수 내용 표기 |
|
| 422 |
+ totalCntTxt = "단문 : <strong>" + msg_short + "</strong> 건"; |
|
| 423 |
+ |
|
| 424 |
+ } |
|
| 425 |
+ |
|
| 426 |
+ //변환단문 건수 Hidden 폼에 넣어주기 |
|
| 427 |
+ $('#shortMsgCnt').val(msg_short);
|
|
| 428 |
+ |
|
| 429 |
+ }else{
|
|
| 430 |
+ |
|
| 431 |
+ //변환단문 건수 Hidden 폼에 넣어주기 |
|
| 432 |
+ $('#shortMsgCnt').val(msg_short);
|
|
| 433 |
+ |
|
| 434 |
+ } |
|
| 435 |
+ |
|
| 436 |
+ } |
|
| 437 |
+ |
|
| 438 |
+ |
|
| 439 |
+ if(totalPrice > 0){
|
|
| 440 |
+ |
|
| 441 |
+ //totalStr = totalPrice.toFixed(2); |
|
| 442 |
+ totalStr = totalPrice; |
|
| 443 |
+ |
|
| 444 |
+ } |
|
| 445 |
+ |
|
| 446 |
+ //input hidden 결제금액 합계 파라이터에 입력 |
|
| 447 |
+ $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 448 |
+ |
|
| 449 |
+ //결제금액 합계 화면에 표시 |
|
| 450 |
+ $('#totalPriceTxt').text(numberWithCommas(totalStr));
|
|
| 451 |
+ |
|
| 452 |
+ //결제금액 합계 파라이터에 입력 |
|
| 453 |
+ $('#totPrice').val(numberWithCommas(totalStr));
|
|
| 454 |
+ |
|
| 455 |
+ //특정문구 일괄 변환으로 인한 단/장문 건수 표시 |
|
| 456 |
+ $('#repPriceTxt').show();
|
|
| 457 |
+ $('#repPriceTxt').html("(" + totalCntTxt + ")");
|
|
| 458 |
+ |
|
| 459 |
+ if(msgType == 'P'){
|
|
| 460 |
+ |
|
| 461 |
+ $('#nowMsgType').text("그림");
|
|
| 462 |
+ |
|
| 463 |
+ }else if(msgType == 'M'){
|
|
| 464 |
+ |
|
| 465 |
+ $('#nowMsgType').text("장문");
|
|
| 466 |
+ |
|
| 467 |
+ }else{
|
|
| 468 |
+ |
|
| 469 |
+ $('#nowMsgType').text("단문");
|
|
| 470 |
+ |
|
| 471 |
+ } |
|
| 472 |
+ |
|
| 473 |
+ return totalStr; |
|
| 474 |
+ |
|
| 475 |
+} |
|
| 476 |
+ |
|
| 477 |
+//예약 날짜 체크 함수 |
|
| 478 |
+function getGday(date) { /* 현재와 이전 날자의 차이를 년-개월-일 형태로 가져오기 */
|
|
| 479 |
+ var now = new Date().getTime(); // 현재 날짜를 시간으로 변환 |
|
| 480 |
+ var d = new Date(date.substring(0, 10)).getTime(); // 이전 날짜를 시간으로 변환 |
|
| 481 |
+ var gap = now - d; // 현재 날짜와 이전 날짜의 차이를 밀리초 시간으로 구한다. |
|
| 482 |
+ var result = Math.floor(gap/(1000 * 60 * 60 * 24)); // 날짜 차이를 일수로 계산 |
|
| 483 |
+ |
|
| 484 |
+ var year = Math.floor(result / 365); // 현재 날짜 년 - 개월 - 일 수로 표현하기 |
|
| 485 |
+ var month = Math.floor(result % 365 / 30); |
|
| 486 |
+ var day = result % 365 % 30; |
|
| 487 |
+ |
|
| 488 |
+ return result; |
|
| 489 |
+ |
|
| 490 |
+ //각 년도, 월, 일을 따로 리턴하려면 아래를 사용하면 됨 |
|
| 491 |
+ /* return {
|
|
| 492 |
+ year: year, |
|
| 493 |
+ month: month, |
|
| 494 |
+ day: day |
|
| 495 |
+ }; */ |
|
| 496 |
+} |
|
| 497 |
+ |
|
| 498 |
+/* |
|
| 499 |
+ * 예약 날짜 오류 체크 함수 |
|
| 500 |
+ * 날짜, 시간, 분 파라미터 전달 |
|
| 501 |
+ * 현재 날짜와 파라미터 시간의 분 간격 계산해주기 |
|
| 502 |
+ * */ |
|
| 503 |
+function getGapDayTime(paramDate,paramHours,paramMin) { /* 현재와 이전 날자의 차이를 년-개월-일 형태로 가져오기 */
|
|
| 504 |
+ |
|
| 505 |
+ var now = new Date(); |
|
| 506 |
+ |
|
| 507 |
+ //현재시간 구분하기 |
|
| 508 |
+ var year = now.getFullYear(); |
|
| 509 |
+ var month = now.getMonth() + 1 ; |
|
| 510 |
+ var day = now.getDate(); |
|
| 511 |
+ var hours = now.getHours(); |
|
| 512 |
+ var min = now.getMinutes(); |
|
| 513 |
+ |
|
| 514 |
+ //비교시간 |
|
| 515 |
+ var stDt = paramDate.split("/");
|
|
| 516 |
+ var stYear = stDt[0]; |
|
| 517 |
+ var stMonth = stDt[1]; |
|
| 518 |
+ var stDay = stDt[2]; |
|
| 519 |
+ |
|
| 520 |
+ var nowDate = new Date(year, month-1, day, hours, min); |
|
| 521 |
+ var stDate = new Date(stYear, stMonth-1, stDay, paramHours, paramMin); |
|
| 522 |
+ var elapsedMSec = stDate.getTime() - nowDate.getTime(); |
|
| 523 |
+ var elapseMin = elapsedMSec / 1000 / 60; |
|
| 524 |
+ |
|
| 525 |
+ elapseMin = parseInt(elapseMin); |
|
| 526 |
+ |
|
| 527 |
+ return elapseMin; |
|
| 528 |
+ |
|
| 529 |
+ //각 년도, 월, 일을 따로 리턴하려면 아래를 사용하면 됨 |
|
| 530 |
+ /* return {
|
|
| 531 |
+ year: year, |
|
| 532 |
+ month: month, |
|
| 533 |
+ day: day |
|
| 534 |
+ }; */ |
|
| 535 |
+} |
|
| 536 |
+ |
|
| 537 |
+// 중복 주소 체크하기 |
|
| 538 |
+/*function dupliAddrData(data){
|
|
| 539 |
+ |
|
| 540 |
+ var chk = true; //중복값 유무 |
|
| 541 |
+ var uniqData = []; // 중복값 삭제 후 데이터 저장 |
|
| 542 |
+ var dupCnt = 0; |
|
| 543 |
+ |
|
| 544 |
+ //첨부 주소 정보에서 연락처가 중복되는 경우 하나만 남기고 나머지는 삭제 하고 보여줌 |
|
| 545 |
+ $.each(data, function(i, item){
|
|
| 546 |
+ |
|
| 547 |
+ chk = true; //중복값 유무 |
|
| 548 |
+ |
|
| 549 |
+ $.each(uniqData, function(j, item2){
|
|
| 550 |
+ |
|
| 551 |
+ if(item.phone == item2.phone){
|
|
| 552 |
+ |
|
| 553 |
+ chk = false; |
|
| 554 |
+ dupCnt = dupCnt + 1; |
|
| 555 |
+ console.log("++++++++++++++ dupCnt ::: "+ dupCnt);
|
|
| 556 |
+ |
|
| 557 |
+ } |
|
| 558 |
+ |
|
| 559 |
+ }); |
|
| 560 |
+ |
|
| 561 |
+ if(chk){
|
|
| 562 |
+ |
|
| 563 |
+ uniqData.push(item); |
|
| 564 |
+ |
|
| 565 |
+ } |
|
| 566 |
+ |
|
| 567 |
+ }); |
|
| 568 |
+ |
|
| 569 |
+ $("#rowDupCnt").text(dupCnt);
|
|
| 570 |
+ return uniqData; |
|
| 571 |
+ |
|
| 572 |
+}*/ |
|
| 573 |
+ |
|
| 574 |
+var dupliPhoneDataRealList = []; |
|
| 575 |
+ |
|
| 576 |
+//중복 전화번호 체크하기 |
|
| 577 |
+function dupliPhoneData(data){
|
|
| 578 |
+ |
|
| 579 |
+ var chk = true; //중복값 유무 |
|
| 580 |
+ var uniqData = []; // 중복값 삭제 후 데이터 저장 |
|
| 581 |
+ var dupCnt = 0; |
|
| 582 |
+ |
|
| 583 |
+ //첨부 주소 정보에서 연락처가 중복되는 경우 하나만 남기고 나머지는 삭제 하고 보여줌 |
|
| 584 |
+ $.each(data, function(i, item){
|
|
| 585 |
+ |
|
| 586 |
+ chk = true; //중복값 유무 |
|
| 587 |
+ |
|
| 588 |
+ $.each(uniqData, function(j, item2){
|
|
| 589 |
+ if(item.phone.length > 0){
|
|
| 590 |
+ if(item.phone == item2.phone){
|
|
| 591 |
+ |
|
| 592 |
+ chk = false; |
|
| 593 |
+ dupCnt = dupCnt + 1; |
|
| 594 |
+ |
|
| 595 |
+ } |
|
| 596 |
+ } |
|
| 597 |
+ |
|
| 598 |
+ }); |
|
| 599 |
+ |
|
| 600 |
+ if(chk){
|
|
| 601 |
+ uniqData.push(item); |
|
| 602 |
+ } |
|
| 603 |
+ else {
|
|
| 604 |
+ // Get 중복 연락처 |
|
| 605 |
+ GetDupliPhoneDataReal(item.phone); |
|
| 606 |
+ } |
|
| 607 |
+ |
|
| 608 |
+ }); |
|
| 609 |
+ |
|
| 610 |
+ //중복건수 텍스트 입력해 주기 |
|
| 611 |
+ $("#rowDupCnt").text(dupCnt);
|
|
| 612 |
+ |
|
| 613 |
+ // 중복번호 버튼 노출 |
|
| 614 |
+ if($("#btnAddrMassDupli").length > 0) {
|
|
| 615 |
+ $("#btnAddrMassDupli").show();
|
|
| 616 |
+ } |
|
| 617 |
+ |
|
| 618 |
+ // 중복번호(기존 주소록) 버튼 노출 |
|
| 619 |
+ if($("#btnAddrMassSaveDupli").length > 0) {
|
|
| 620 |
+ $("#btnAddrMassSaveDupli").hide();
|
|
| 621 |
+ } |
|
| 622 |
+ |
|
| 623 |
+ return uniqData; |
|
| 624 |
+} |
|
| 625 |
+ |
|
| 626 |
+ |
|
| 627 |
+//연락처 중복검사 속도 개선 버전 |
|
| 628 |
+function getSpupDupliPhoneDataChk(data){
|
|
| 629 |
+ |
|
| 630 |
+ var dataLen = data.length; |
|
| 631 |
+ const arrUnique = data.filter((character, idx, arr)=>{
|
|
| 632 |
+ return arr.findIndex((item) => item.phone === character.phone) === idx |
|
| 633 |
+ }); |
|
| 634 |
+ |
|
| 635 |
+ var uniqLen = arrUnique.length; |
|
| 636 |
+ var dupCnt = dataLen - uniqLen; |
|
| 637 |
+ //중복건수 텍스트 입력해 주기 |
|
| 638 |
+ $("#rowDupCnt").text(dupCnt);
|
|
| 639 |
+ |
|
| 640 |
+ return arrUnique; |
|
| 641 |
+} |
|
| 642 |
+ |
|
| 643 |
+// Get 중복 연락처 |
|
| 644 |
+function GetDupliPhoneDataReal(item) {
|
|
| 645 |
+ var isDuplicate = false; |
|
| 646 |
+ if (dupliPhoneDataRealList.length == 0) {
|
|
| 647 |
+ dupliPhoneDataRealList.push(item); |
|
| 648 |
+ } |
|
| 649 |
+ else {
|
|
| 650 |
+ for (var i = 0; i < dupliPhoneDataRealList.length; i++) {
|
|
| 651 |
+ if (dupliPhoneDataRealList[i] == item) {
|
|
| 652 |
+ isDuplicate = true; |
|
| 653 |
+ } |
|
| 654 |
+ } |
|
| 655 |
+ |
|
| 656 |
+ if (isDuplicate) {
|
|
| 657 |
+ return; |
|
| 658 |
+ } |
|
| 659 |
+ else {
|
|
| 660 |
+ dupliPhoneDataRealList.push(item); |
|
| 661 |
+ } |
|
| 662 |
+ } |
|
| 663 |
+} |
|
| 664 |
+ |
|
| 665 |
+//중복 전화번호 체크하여 중복 갯수 리턴하기 |
|
| 666 |
+function dupliPhoneDataChk(data){
|
|
| 667 |
+ |
|
| 668 |
+ var chk = true; //중복값 유무 |
|
| 669 |
+ var uniqData = []; // 중복값 삭제 후 데이터 저장 |
|
| 670 |
+ var dupCnt = 0; |
|
| 671 |
+ |
|
| 672 |
+ //첨부 주소 정보에서 연락처가 중복되는 경우 하나만 남기고 나머지는 삭제 하고 보여줌 |
|
| 673 |
+ $.each(data, function(i, item){
|
|
| 674 |
+ |
|
| 675 |
+ chk = true; //중복값 유무 |
|
| 676 |
+ |
|
| 677 |
+ $.each(uniqData, function(j, item2){
|
|
| 678 |
+ |
|
| 679 |
+ if(item.phone.length > 0){
|
|
| 680 |
+ |
|
| 681 |
+ if(item.phone == item2.phone){
|
|
| 682 |
+ |
|
| 683 |
+ chk = false; |
|
| 684 |
+ dupCnt = dupCnt + 1; |
|
| 685 |
+ |
|
| 686 |
+ } |
|
| 687 |
+ |
|
| 688 |
+ } |
|
| 689 |
+ |
|
| 690 |
+ }); |
|
| 691 |
+ |
|
| 692 |
+ if(chk){
|
|
| 693 |
+ |
|
| 694 |
+ uniqData.push(item); |
|
| 695 |
+ |
|
| 696 |
+ } |
|
| 697 |
+ |
|
| 698 |
+ }); |
|
| 699 |
+ |
|
| 700 |
+ return dupCnt; |
|
| 701 |
+ |
|
| 702 |
+} |
|
| 703 |
+ |
|
| 704 |
+//특정 바이트수 만큼 문자열 잘라서 반환해주기 |
|
| 705 |
+function strUnderLineSubstring(str, maxLength){
|
|
| 706 |
+ |
|
| 707 |
+ for(b=i=0;c=str.charCodeAt(i);) {
|
|
| 708 |
+ |
|
| 709 |
+ b+=c>>7?2:1; |
|
| 710 |
+ |
|
| 711 |
+ if (b > maxLength) |
|
| 712 |
+ |
|
| 713 |
+ break; |
|
| 714 |
+ |
|
| 715 |
+ i++; |
|
| 716 |
+ |
|
| 717 |
+ } |
|
| 718 |
+ |
|
| 719 |
+ return str.substring(0,i); |
|
| 720 |
+ |
|
| 721 |
+} |
|
| 722 |
+ |
|
| 723 |
+ |
|
| 724 |
+//특정 글자수 만큼 문자열 잘라서 반환해주기 |
|
| 725 |
+function strMaxLengthSubstring(str, maxLength){
|
|
| 726 |
+ |
|
| 727 |
+ for(b=i=0;c=str.charCodeAt(i);) {
|
|
| 728 |
+ |
|
| 729 |
+ if (i > maxLength) |
|
| 730 |
+ |
|
| 731 |
+ break; |
|
| 732 |
+ |
|
| 733 |
+ i++; |
|
| 734 |
+ |
|
| 735 |
+ } |
|
| 736 |
+ |
|
| 737 |
+ return str.substring(0,i); |
|
| 738 |
+ |
|
| 739 |
+} |
|
| 740 |
+ |
|
| 741 |
+//문자열 글자수 반환해주기(한글, 영문, 특수문자, 엔터와 상관없이 글자수로 체크함) |
|
| 742 |
+function strMaxCharacterCnt(str){
|
|
| 743 |
+ |
|
| 744 |
+ var totLen = 0; |
|
| 745 |
+ for(b=i=0;c=str.charCodeAt(i);) {
|
|
| 746 |
+ i++; |
|
| 747 |
+ totLen = i; |
|
| 748 |
+ } |
|
| 749 |
+ return totLen; |
|
| 750 |
+} |
|
| 751 |
+ |
|
| 752 |
+//문자입력 첫번째 글자가 한글, 숫자, 영문자가 아니면 경고 표시 |
|
| 753 |
+function strFirstCharCheck(str){
|
|
| 754 |
+ |
|
| 755 |
+ var pattern1 = /[0-9]/; |
|
| 756 |
+ var pattern2 = /[a-zA-Z]/; |
|
| 757 |
+ var pattern3 = /[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/; |
|
| 758 |
+ |
|
| 759 |
+ var spChar = 0; |
|
| 760 |
+ for(var i=0; i<str.length; i++){
|
|
| 761 |
+ |
|
| 762 |
+ if (!pattern1.test(str.charAt(i)) && !pattern2.test(str.charAt(i)) && !pattern3.test(str.charAt(i))) {
|
|
| 763 |
+ spChar++; |
|
| 764 |
+ }else{
|
|
| 765 |
+ break; |
|
| 766 |
+ } |
|
| 767 |
+ |
|
| 768 |
+ } |
|
| 769 |
+ |
|
| 770 |
+ var repStr = str.substring(0,spChar); |
|
| 771 |
+ return repStr; |
|
| 772 |
+ |
|
| 773 |
+} |
|
| 774 |
+ |
|
| 775 |
+function strChinJpnCheck(str){
|
|
| 776 |
+ |
|
| 777 |
+ var rtnStr = ""; |
|
| 778 |
+ for(var i=0; i < str.length; i++){
|
|
| 779 |
+ |
|
| 780 |
+ var cont = str.charAt(i); |
|
| 781 |
+ |
|
| 782 |
+ if(str.charAt(i) >= '\u4E00' && str.charAt(i) <= '\u9FFF'){//한중일 공통한자일 경우
|
|
| 783 |
+ |
|
| 784 |
+ if(rtnStr.length == 0){
|
|
| 785 |
+ rtnStr = cont; |
|
| 786 |
+ }else{
|
|
| 787 |
+ rtnStr = rtnStr + ", " + cont; |
|
| 788 |
+ } |
|
| 789 |
+ |
|
| 790 |
+ }else if(str.charAt(i) >= '\u2E80' && str.charAt(i) <= '\u2EFF'){//한자부수
|
|
| 791 |
+ |
|
| 792 |
+ if(rtnStr.length == 0){
|
|
| 793 |
+ rtnStr = cont; |
|
| 794 |
+ }else{
|
|
| 795 |
+ rtnStr = rtnStr + ", " + cont; |
|
| 796 |
+ } |
|
| 797 |
+ |
|
| 798 |
+ }else if(str.charAt(i) >= '\u3400' && str.charAt(i) <= '\u4DB5'){//한자확장A
|
|
| 799 |
+ |
|
| 800 |
+ if(rtnStr.length == 0){
|
|
| 801 |
+ rtnStr = cont; |
|
| 802 |
+ }else{
|
|
| 803 |
+ rtnStr = rtnStr + ", " + cont; |
|
| 804 |
+ } |
|
| 805 |
+ |
|
| 806 |
+ } |
|
| 807 |
+ |
|
| 808 |
+ } |
|
| 809 |
+ |
|
| 810 |
+ return rtnStr; |
|
| 811 |
+} |
|
| 812 |
+ |
|
| 813 |
+//받아온 str 에 이모지가 포함되어있는지 체크하여 갯수로 반환 |
|
| 814 |
+function kakaoTemplateEmojiCheck (str) {
|
|
| 815 |
+ var regex = /[\u{1F004}-\u{1F9E6}]|[\u{1F600}-\u{1F9D0}]/gu;
|
|
| 816 |
+ var usedEmoji = ""; |
|
| 817 |
+ var returnFlag = true; |
|
| 818 |
+ |
|
| 819 |
+ var splitMsg = str.split(/.*?/u); |
|
| 820 |
+ |
|
| 821 |
+ for(var i=0; i < splitMsg.length; i++){
|
|
| 822 |
+ if(splitMsg[i].match(regex)) {
|
|
| 823 |
+ usedEmoji = usedEmoji + splitMsg[i]; |
|
| 824 |
+ returnFlag = false; |
|
| 825 |
+ } |
|
| 826 |
+ } |
|
| 827 |
+ if(!returnFlag) alert("알림톡 내용에 이모지는 사용할 수 없습니다.\n이모지 삭제후 등록해주세요.\n(" + usedEmoji + ")");
|
|
| 828 |
+ |
|
| 829 |
+ return returnFlag; |
|
| 830 |
+} |
|
| 831 |
+ |
|
| 832 |
+//받아온 str 에 이모지가 포함되어있는지 체크하여 갯수로 반환 |
|
| 833 |
+function emojiCheck (str) {
|
|
| 834 |
+ var regex = /[\u{1F004}-\u{1F9E6}]|[\u{1F600}-\u{1F9D0}]/gu;
|
|
| 835 |
+ var usedEmoji = ""; |
|
| 836 |
+ var returnFlag = true; |
|
| 837 |
+ |
|
| 838 |
+ var splitMsg = str.split(/.*?/u); |
|
| 839 |
+ |
|
| 840 |
+ for(var i=0; i < splitMsg.length; i++){
|
|
| 841 |
+ if(splitMsg[i].match(regex)) {
|
|
| 842 |
+ usedEmoji = usedEmoji + splitMsg[i]; |
|
| 843 |
+ returnFlag = false; |
|
| 844 |
+ } |
|
| 845 |
+ } |
|
| 846 |
+ if(!returnFlag) alert("문자 제목, 내용에 이모지는 사용할 수 없습니다.\n이모지 삭제후 발송해주세요.\n(" + usedEmoji + ")");
|
|
| 847 |
+ |
|
| 848 |
+ return returnFlag; |
|
| 849 |
+} |
|
| 850 |
+ |
|
| 851 |
+function addrEmojiCheck (str) {
|
|
| 852 |
+ var regex = /[\u{1F004}-\u{1F9E6}]|[\u{1F600}-\u{1F9D0}]/gu;
|
|
| 853 |
+ var usedEmoji = ""; |
|
| 854 |
+ var returnFlag = true; |
|
| 855 |
+ |
|
| 856 |
+ var splitMsg = str.split(/.*?/u); |
|
| 857 |
+ |
|
| 858 |
+ for(var i=0; i < splitMsg.length; i++){
|
|
| 859 |
+ if(splitMsg[i].match(regex)) {
|
|
| 860 |
+ usedEmoji = usedEmoji + splitMsg[i]; |
|
| 861 |
+ returnFlag = false; |
|
| 862 |
+ } |
|
| 863 |
+ } |
|
| 864 |
+ |
|
| 865 |
+ if(!returnFlag) {
|
|
| 866 |
+ //로딩창 hide |
|
| 867 |
+ $('.loading_layer').removeClass('active');
|
|
| 868 |
+ |
|
| 869 |
+ alert("주소록 저장 목록 중 이모지를 사용할 수 없습니다.\n이모지 삭제후 발송해주세요.\n(" + usedEmoji + ")");
|
|
| 870 |
+ } |
|
| 871 |
+ |
|
| 872 |
+ return returnFlag; |
|
| 873 |
+} |
|
| 874 |
+ |
|
| 875 |
+// 제목이 치환 문구 체크 |
|
| 876 |
+function getSpacialStringChk(mmsSubject){
|
|
| 877 |
+ |
|
| 878 |
+ var returnStr = false; |
|
| 879 |
+ |
|
| 880 |
+ if(mmsSubject.indexOf("[*이름*]") > -1 || mmsSubject.indexOf("[*1*]") > -1 || mmsSubject.indexOf("[*2*]") > -1 || mmsSubject.indexOf("[*3*]") > -1 || mmsSubject.indexOf("[*4*]") > -1){
|
|
| 881 |
+ returnStr = true; |
|
| 882 |
+ } |
|
| 883 |
+ |
|
| 884 |
+ return returnStr; |
|
| 885 |
+ |
|
| 886 |
+} |
|
| 887 |
+ |
|
| 888 |
+//커서 위치에 삽입 |
|
| 889 |
+function setCursorInsertText(pTxtArea, pAddTxt) {
|
|
| 890 |
+ var txtArea = document.getElementById(pTxtArea); |
|
| 891 |
+ var txtValue = txtArea.value; |
|
| 892 |
+ var selectPos = txtArea.selectionStart; // 커서 위치 지정 |
|
| 893 |
+ var beforeTxt = txtValue.substring(0, selectPos); // 기존텍스트 ~ 커서시작점 까지의 문자 |
|
| 894 |
+ var afterTxt = txtValue.substring(txtArea.selectionEnd, txtValue.length); // 커서끝지점 ~ 기존텍스트 까지의 문자 |
|
| 895 |
+ var addTxt = pAddTxt; // 추가 입력 할 텍스트 |
|
| 896 |
+ txtArea.value = beforeTxt + addTxt + afterTxt; |
|
| 897 |
+ |
|
| 898 |
+ selectPos = selectPos + addTxt.length; |
|
| 899 |
+ txtArea.selectionStart = selectPos; // 커서 시작점을 추가 삽입된 텍스트 이후로 지정 |
|
| 900 |
+ txtArea.selectionEnd = selectPos; // 커서 끝지점을 추가 삽입된 텍스트 이후로 지정 |
|
| 901 |
+ txtArea.focus(); |
|
| 902 |
+} |
|
| 903 |
+ |
|
| 904 |
+//받는사람 목록의 체크박스가 20개가 모두 체크 되었는지 확인 |
|
| 905 |
+function fnCallToChkAllCnt(){
|
|
| 906 |
+ |
|
| 907 |
+ var chkCnt = 0; |
|
| 908 |
+ var totChkCnt = $("input:checkbox[name='chkCallTo']").length;
|
|
| 909 |
+ var btnAllVal = $("#checkAll").val();
|
|
| 910 |
+ |
|
| 911 |
+ //체크박스 체크된 갯수 구하기 |
|
| 912 |
+ $("input:checkbox[name='chkCallTo']").each(function () {
|
|
| 913 |
+ if($(this).is(':checked')){
|
|
| 914 |
+ chkCnt++; |
|
| 915 |
+ }; |
|
| 916 |
+ }); |
|
| 917 |
+ |
|
| 918 |
+ //전체선택 체크 여부 값 변경해 주기 |
|
| 919 |
+ //현재 체크된 체크박스 갯수와 전체 체크박스 갯수 비교하기 |
|
| 920 |
+ if(totChkCnt > 0 && totChkCnt == chkCnt){
|
|
| 921 |
+ |
|
| 922 |
+ if(btnAllVal == 'N'){
|
|
| 923 |
+ $("#checkAll").val("Y");
|
|
| 924 |
+ $("#checkAll").text("선택해제");
|
|
| 925 |
+ }else{
|
|
| 926 |
+ $("#checkAll").val("N");
|
|
| 927 |
+ $("#checkAll").text("전체선택");
|
|
| 928 |
+ } |
|
| 929 |
+ |
|
| 930 |
+ }else{
|
|
| 931 |
+ |
|
| 932 |
+ $("#checkAll").val("N");
|
|
| 933 |
+ $("#checkAll").text("전체선택");
|
|
| 934 |
+ |
|
| 935 |
+ } |
|
| 936 |
+ |
|
| 937 |
+} |
|
| 938 |
+ |
|
| 939 |
+//선거문자 20건 수신자 목록 추가된 건수 및 발송 금액 변경해주기 |
|
| 940 |
+function fnChkCallToChange(){
|
|
| 941 |
+ |
|
| 942 |
+ var callToCnt = 0; |
|
| 943 |
+ $("input[name=chkCallTo]").each(function(){
|
|
| 944 |
+ |
|
| 945 |
+ var chkSts = $(this).is(':checked');
|
|
| 946 |
+ if(chkSts){
|
|
| 947 |
+ callToCnt++; |
|
| 948 |
+ } |
|
| 949 |
+ }); |
|
| 950 |
+ |
|
| 951 |
+ //체크박스가 모두 체크 되어있는지 확인 하기 |
|
| 952 |
+ fnCallToChkAllCnt(); |
|
| 953 |
+ |
|
| 954 |
+ updateTotCnt(callToCnt); //전체 데이터 갯수 구하기 |
|
| 955 |
+ totalPriceSum(callToCnt); |
|
| 956 |
+ |
|
| 957 |
+} |
|
| 958 |
+ |
|
| 959 |
+//Tabulator 주소록 그룹 목록일 경우 각 그룹 주소 갯수 합산해주기 |
|
| 960 |
+function getTabulatorLAddrGrpCnt(){
|
|
| 961 |
+ |
|
| 962 |
+ var selectedData = tableL.getRows(); |
|
| 963 |
+ var totAddrCnt = 0; |
|
| 964 |
+ for(var i=0; i < selectedData.length; i++){
|
|
| 965 |
+ |
|
| 966 |
+ //일괄변환 문자에 콤마(,)가 들어가있으면 배열로 넘길때 문제가 발생하여 특수문자(§)로 치환하여 넘겨주도록 한다. |
|
| 967 |
+ var addrGrpCnt = tableL.getRows()[i].getData().addrGrpCnt; |
|
| 968 |
+ |
|
| 969 |
+ totAddrCnt = Number(totAddrCnt) + Number(addrGrpCnt); |
|
| 970 |
+ |
|
| 971 |
+ } |
|
| 972 |
+ |
|
| 973 |
+ return totAddrCnt; |
|
| 974 | 974 |
}(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?