2024-12-31 14:05 g/w 및 오류 게시판 작업
This commit is contained in:
parent
759fcb48e7
commit
0dcd0a5f26
@ -81,6 +81,7 @@ import kcc.let.sym.site.service.EgovSiteManagerService;
|
||||
import kcc.let.sym.site.service.SiteManagerVO;
|
||||
import kcc.let.uat.uia.service.SsoLoginVO;
|
||||
import kcc.let.utl.sim.service.EgovClntInfo;
|
||||
import seed.utils.FairnetUtils;
|
||||
|
||||
/**
|
||||
* 게시물 관리를 위한 컨트롤러 클래스
|
||||
@ -364,6 +365,8 @@ public class EgovBBSManageController {
|
||||
return modelAndView;
|
||||
}*/
|
||||
|
||||
System.out.println("1");
|
||||
|
||||
beanValidator.validate(board, bindingResult);
|
||||
if (bindingResult.hasErrors()) {
|
||||
model.addAttribute("bdMstr", bmvo);
|
||||
@ -371,6 +374,8 @@ public class EgovBBSManageController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
System.out.println("12");
|
||||
|
||||
String atchFileId = "";
|
||||
String isThumbFile = "";
|
||||
if (("BBST05").equals(bmvo.getBbsTyCode()) || ("BBST06").equals(bmvo.getBbsTyCode())) isThumbFile = "thumbFile";
|
||||
@ -389,6 +394,7 @@ public class EgovBBSManageController {
|
||||
board.setAtchFileId(atchFileId);
|
||||
}
|
||||
|
||||
System.out.println("13");
|
||||
|
||||
board.setFrstRegisterId(user.getUniqId());
|
||||
|
||||
@ -403,6 +409,8 @@ public class EgovBBSManageController {
|
||||
String userIp = EgovClntInfo.getClntIP(multiRequest);
|
||||
board.setNtcrIp(userIp);
|
||||
|
||||
System.out.println("14");
|
||||
|
||||
if(null !=board.getFrstRegisterPnttm() && !"".equals(board.getFrstRegisterPnttm()) ) {
|
||||
board.getFrstRegisterPnttm();
|
||||
String tempDete = board.getFrstRegisterPnttm().split("-")[0]+board.getFrstRegisterPnttm().split("-")[1]+board.getFrstRegisterPnttm().split("-")[2];
|
||||
@ -410,13 +418,15 @@ public class EgovBBSManageController {
|
||||
}
|
||||
|
||||
bbsMngService.insertBoardArticle(board);
|
||||
|
||||
System.out.println("15");
|
||||
redirectAttributes.addAttribute("pageIndex", boardVO.getPageIndex());
|
||||
redirectAttributes.addAttribute("searchCnd", boardVO.getSearchCnd());
|
||||
redirectAttributes.addAttribute("searchWrd", boardVO.getSearchWrd());
|
||||
redirectAttributes.addAttribute("bbsId", boardVO.getBbsId());
|
||||
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
System.out.println("16");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@ -664,7 +674,24 @@ public class EgovBBSManageController {
|
||||
|
||||
// 관리권한, 사용여부
|
||||
|
||||
|
||||
|
||||
|
||||
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
System.out.println("+++++++++++++++++++user+++++++++++++++++++");
|
||||
System.out.println(user);
|
||||
|
||||
/*
|
||||
model.put("siteIdx", "case");
|
||||
model.put("url", "/web/user/mypage/case/01/168/myCheck.do");
|
||||
model.put("umessage", "본인인증이 필요합니다.");
|
||||
model.put("opener", "");
|
||||
model.put("append", "");
|
||||
model.put("self", "");
|
||||
|
||||
return "/_common/jsp/umessage";
|
||||
*/
|
||||
|
||||
if(!"ROLE_ADMIN".equals(user.getAuthority())){ //관리자 제외
|
||||
if (bdMstr == null || ("N").equals(bdMstr.getUseAt())
|
||||
|| !isBBSAuthFlag(bdMstr.getManageAuth(), bdMstr.getBbsId(), null)) {
|
||||
@ -1301,6 +1328,146 @@ public class EgovBBSManageController {
|
||||
return "/web/cop/bbs/EgovNoticeList";
|
||||
}
|
||||
|
||||
/**
|
||||
* (사용자)게시물에 대한 목록을 조회한다. - 오류 게시판 임시
|
||||
*
|
||||
* @param boardVO
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value= {"/web/cop/bbsWeb/selectBoardErrorList.do" })
|
||||
public String selectBoardErrorList(HttpServletRequest request, @ModelAttribute("searchVO") BoardVO boardVO, ModelMap model
|
||||
,RedirectAttributes redirectAttributes
|
||||
, ModelMap mapz, HttpSession session
|
||||
) throws Exception {
|
||||
|
||||
|
||||
// CI 체크
|
||||
if(!FairnetUtils.ciCheck(mapz, session)) {
|
||||
//return new ModelAndView("/_common/jsp/umessage");
|
||||
//redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.imposbl"));
|
||||
//return "redirect:/web/main/mainPage.do";
|
||||
|
||||
model.put("siteIdx", "case");
|
||||
model.put("url", "/web/user/mypage/case/01/168/myCheck.do");
|
||||
model.put("umessage", "본인인증이 필요합니다.");
|
||||
model.put("opener", "");
|
||||
model.put("append", "");
|
||||
model.put("self", "");
|
||||
|
||||
return "/_common/jsp/umessage";
|
||||
}
|
||||
|
||||
boolean b_ret_u = true;
|
||||
mapz = FairnetUtils.myCheck(mapz, session);
|
||||
b_ret_u = (boolean)mapz.get("b_ret");
|
||||
|
||||
if (!b_ret_u) {
|
||||
//return new ModelAndView("/_common/jsp/umessage");
|
||||
//redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.imposbl"));
|
||||
//return "redirect:/web/main/mainPage.do";
|
||||
|
||||
model.put("siteIdx", "case");
|
||||
model.put("url", "/web/user/mypage/case/01/168/myCheck.do");
|
||||
model.put("umessage", "본인인증이 필요합니다.");
|
||||
model.put("opener", "");
|
||||
model.put("append", "");
|
||||
model.put("self", "");
|
||||
|
||||
return "/_common/jsp/umessage";
|
||||
}
|
||||
|
||||
setSessionMessageRemove(session);
|
||||
|
||||
|
||||
|
||||
Map<String, ?> flashMap =RequestContextUtils.getInputFlashMap(request);
|
||||
|
||||
if(flashMap!=null && flashMap.get("boardVO") != null) {
|
||||
boardVO = (BoardVO)flashMap.get("boardVO");
|
||||
}
|
||||
|
||||
BoardMasterVO bmVO = new BoardMasterVO();
|
||||
bmVO.setBbsId(boardVO.getBbsId());
|
||||
bmVO = bbsAttrbService.selectBBSMasterInf(bmVO);
|
||||
UserVO userVO = (UserVO)request.getSession().getAttribute("userVO"); // 사용자 정보
|
||||
SsoLoginVO ssoLoginVO = (SsoLoginVO) request.getSession().getAttribute("SSOLoginVO");
|
||||
|
||||
if (bmVO == null || ("N").equals(bmVO.getUseAt())) {
|
||||
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("fail.common.imposbl"));
|
||||
return "redirect:/web/main/mainPage.do";
|
||||
}
|
||||
|
||||
boardVO.setPageUnit(Integer.parseInt(bmVO.getListNum()));
|
||||
boardVO.setPageSize(Integer.parseInt(bmVO.getPageNum()));
|
||||
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
|
||||
paginationInfo.setPageSize(boardVO.getPageSize());
|
||||
|
||||
boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if (("BBST05").equals(bmVO.getBbsTyCode())){ //사진게시판 8개씩 9개조회후 9개면 더보기
|
||||
boardVO.setRecordCountPerPage(8); //리스트 수
|
||||
boardVO.setFirstIndex( (boardVO.getPageIndex()-1)*8); //offset
|
||||
paginationInfo.setRecordCountPerPage(boardVO.getRecordCountPerPage()); //웹 접근성 획득 후 롤백
|
||||
}
|
||||
|
||||
// 공지사항
|
||||
if (("Y").equals(bmVO.getNoticeYn())) {
|
||||
List<BoardVO> notifyList = bbsMngService.selectBoardNotifyArticles(boardVO, null);
|
||||
model.addAttribute("notifyList", notifyList);
|
||||
boardVO.setNoticeAt("N"); //다음에 공지사항 아닌것만 검색
|
||||
}
|
||||
|
||||
if("BBST05".equals(bmVO.getBbsTyCode())){ //재단소식
|
||||
boardVO.setSearchSortCnd("FRST_REGIST_PNTTM");
|
||||
boardVO.setSearchSortOrd("desc");
|
||||
}
|
||||
|
||||
Map<String, Object> map = bbsMngService.selectBoardArticlesWeb(boardVO, null);
|
||||
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
|
||||
|
||||
List<BoardVO> resultList = (List<BoardVO>)map.get("resultList");
|
||||
|
||||
PaginationInfo paginationInfoMobile = new PaginationInfo();
|
||||
paginationInfoMobile.setCurrentPageNo(paginationInfo.getCurrentPageNo());
|
||||
paginationInfoMobile.setTotalRecordCount(paginationInfo.getTotalRecordCount());
|
||||
paginationInfoMobile.setPageSize(5);
|
||||
paginationInfoMobile.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("resultCnt", map.get("resultCnt"));
|
||||
model.addAttribute("boardVO", boardVO);
|
||||
model.addAttribute("brdMstrVO", bmVO);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("paginationInfoMobile", paginationInfoMobile);
|
||||
|
||||
if("BBST05".equals(bmVO.getBbsTyCode())){
|
||||
if(resultList.size()>8) { //더보기 더튼 추가
|
||||
model.addAttribute("more", true);
|
||||
}else {
|
||||
model.addAttribute("more", false);
|
||||
}
|
||||
if("/web/cop/bbsWeb/selectMoreListAjax.do".equals(request.getRequestURI())) { //더보기
|
||||
return "/web/cop/bbs/EgovNoticePhotoListAjax";
|
||||
}
|
||||
|
||||
System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
|
||||
return "/web/cop/bbs/EgovNoticePhotoList"; //메인
|
||||
}
|
||||
System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbb");
|
||||
return "/web/cop/bbs/EgovNoticeList";
|
||||
}
|
||||
|
||||
/**
|
||||
* (사용자)게시물 등록을 위한 등록페이지로 이동한다.(묻고답하기)
|
||||
*
|
||||
@ -1397,6 +1564,24 @@ public class EgovBBSManageController {
|
||||
for(BoardMasterVO tempMasterVO : boardMenuList ) {
|
||||
tempMasterVO.setBbsNm(tempMasterVO.getBbsNm().split("\\(")[1].split("\\)")[0]) ;
|
||||
}*/
|
||||
|
||||
//SsoLoginVO ssoLoginVO = new SsoLoginVO();
|
||||
System.out.println("+++++++++++++++++++user+++++++++++++++++++");
|
||||
System.out.println( request.getSession().getAttribute("SSOLoginVO"));
|
||||
System.out.println( FairnetUtils.ciCheck(model, session));
|
||||
//System.out.println(user);
|
||||
|
||||
if (!FairnetUtils.ciCheck(model, session)) {
|
||||
model.put("siteIdx", "case");
|
||||
model.put("url", "/web/user/mypage/case/01/168/myCheck.do");
|
||||
model.put("umessage", "본인인증이 필요합니다.");
|
||||
model.put("opener", "");
|
||||
model.put("append", "");
|
||||
model.put("self", "");
|
||||
|
||||
return "/_common/jsp/umessage";
|
||||
}
|
||||
|
||||
BoardMasterVO bmVO = new BoardMasterVO();
|
||||
bmVO.setBbsId(boardVO.getBbsId());
|
||||
bmVO = bbsAttrbService.selectBBSMasterInf(bmVO);
|
||||
@ -2080,6 +2265,8 @@ public class EgovBBSManageController {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
System.out.println("1====");
|
||||
|
||||
BoardMasterVO bmVO = new BoardMasterVO();
|
||||
bmVO.setBbsId(boardVO.getBbsId());
|
||||
bmVO = bbsAttrbService.selectBBSMasterInf(bmVO);
|
||||
@ -2091,6 +2278,8 @@ public class EgovBBSManageController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
System.out.println("1===2=");
|
||||
|
||||
beanValidator.validate(board, bindingResult);
|
||||
if (bindingResult.hasErrors()) {
|
||||
// 공통코드 Set
|
||||
@ -2101,6 +2290,8 @@ public class EgovBBSManageController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
System.out.println("1===3=");
|
||||
|
||||
List<FileVO> result = null;
|
||||
String atchFileId = "";
|
||||
String isThumbFile = "";
|
||||
@ -2120,6 +2311,8 @@ public class EgovBBSManageController {
|
||||
atchFileId = fileMngService.insertFileInfs(result);
|
||||
}
|
||||
|
||||
System.out.println("1==4==");
|
||||
|
||||
board.setAtchFileId(atchFileId);
|
||||
board.setBbsId(board.getBbsId());
|
||||
board.setNttCn(unscript(board.getNttCn())); // XSS 방지
|
||||
@ -2134,6 +2327,9 @@ public class EgovBBSManageController {
|
||||
redirectAttributes.addAttribute("bbsId", boardVO.getBbsId());
|
||||
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.insert"));
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
System.out.println("1==5==");
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@ -3567,4 +3763,12 @@ public class EgovBBSManageController {
|
||||
}
|
||||
return day ;
|
||||
}
|
||||
|
||||
private void setSessionMessageRemove(HttpSession session){
|
||||
session.removeAttribute("url");
|
||||
session.removeAttribute("message");
|
||||
session.removeAttribute("opener");
|
||||
session.removeAttribute("append");
|
||||
session.removeAttribute("self");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package seed.com.gtm.base;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@ -198,6 +197,19 @@ public class BaseController {
|
||||
//mav.addObject("data", bservice.list(params));
|
||||
params.put("data", JSPUtil.fixNull(bservice.list(params)));
|
||||
}else if("S".equals(type)){
|
||||
|
||||
//기안자 GW ID 받아오기
|
||||
//params.put("sql", "join.selectNewOne");
|
||||
try {
|
||||
//params.put("gwData", JSPUtil.fixNull(service.memberNewOne(params)));
|
||||
Map<String, Object> tmap = (Map<String, Object>) JSPUtil.fixNull(memberService.memberNewOne(params));
|
||||
//params.put("gwId", tmap.get("MEMBER_ITEM_F6").toString());
|
||||
params.put("gwId", this.getGWID(tmap));
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
//mav.addObject("data", bservice.select(params));
|
||||
params.put("data", JSPUtil.fixNull(bservice.select(params)));
|
||||
}else if("I".equals(type)){
|
||||
@ -728,4 +740,14 @@ public class BaseController {
|
||||
return "/_common/jsp/message";
|
||||
}
|
||||
|
||||
private String getGWID(Map<String, Object> p_tmap) {
|
||||
//Map<String, Object> tmap = (Map<String, Object>) JSPUtil.fixNull(memberService.memberNewOne(params));
|
||||
//return p_tmap.get("MEMBER_ITEM_F6").toString();
|
||||
if ("seed".equals(p_tmap.get("MEMBER_ID").toString())) {
|
||||
return "test04";
|
||||
}
|
||||
return p_tmap.get("MEMBER_ID").toString();
|
||||
//params.put("gwId", tmap.get("MEMBER_ID").toString());
|
||||
//params.put("gwId", tmap.get("MEMBER_ITEM_F6").toString());
|
||||
}
|
||||
}
|
||||
@ -3531,7 +3531,7 @@ function nanumCall_bef(p_no, p_name, p_fileKey){
|
||||
function nanumApi(jobID, codeNo, nanumSubject, obj1, obj2, obj3, obj4,
|
||||
obj5, obj6, obj7, obj8, obj9, obj10, obj11, obj12, obj13, obj14, obj15){
|
||||
|
||||
alert(jobID+":"+codeNo+":"+nanumSubject);
|
||||
//alert(jobID+":"+codeNo+":"+nanumSubject);
|
||||
//alert(obj4+":"+obj5);
|
||||
//alert(obj6+":"+obj7);
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ var _searchYear = "<c:out value='${boardVO.searchYear}'/>";
|
||||
<!-- page_location -->
|
||||
<ul class="page_location">
|
||||
<li><i class="icon home"></i></li>
|
||||
<li>게시판</li>bbb
|
||||
<li>게시판</li>
|
||||
<li>${brdMstrVO.bbsNm}</li>
|
||||
</ul>
|
||||
<!-- //page_location -->
|
||||
@ -105,19 +105,19 @@ var _searchYear = "<c:out value='${boardVO.searchYear}'/>";
|
||||
<input type="hidden" id= "password" name="password" value=""/>
|
||||
<input type="hidden" id="pubDetail" name="pubDetail" value=""/>
|
||||
|
||||
<div class="search_wrap">
|
||||
<select name="searchCnd" id="subSearch" class="select">
|
||||
<option value="" <c:if test="${searchVO.searchCnd == ''}">selected="selected"</c:if>>전체</option>
|
||||
<option value="0" <c:if test="${searchVO.searchCnd == '0'}">selected="selected"</c:if>>제목</option>
|
||||
<option value="1" <c:if test="${searchVO.searchCnd == '1'}">selected="selected"</c:if>>내용</option>
|
||||
</select>
|
||||
<input type="text" name="searchWrd" class="input_text" title="검색어 입력" placeholder="검색어를 입력하세요" onfocus="this.placeholder=''" value='<c:out value="${searchVO.searchWrd}"/>'>
|
||||
<button type="button" class="btn btn_text btn_40 darkblue_fill btn_search" onclick="javascript:linkPage('1'); return false;">검색</button>
|
||||
</div>
|
||||
<!-- <div class="search_wrap"> -->
|
||||
<!-- <select name="searchCnd" id="subSearch" class="select"> -->
|
||||
<%-- <option value="" <c:if test="${searchVO.searchCnd == ''}">selected="selected"</c:if>>전체</option> --%>
|
||||
<%-- <option value="0" <c:if test="${searchVO.searchCnd == '0'}">selected="selected"</c:if>>제목</option> --%>
|
||||
<%-- <option value="1" <c:if test="${searchVO.searchCnd == '1'}">selected="selected"</c:if>>내용</option> --%>
|
||||
<!-- </select> -->
|
||||
<%-- <input type="text" name="searchWrd" class="input_text" title="검색어 입력" placeholder="검색어를 입력하세요" onfocus="this.placeholder=''" value='<c:out value="${searchVO.searchWrd}"/>'> --%>
|
||||
<!-- <button type="button" class="btn btn_text btn_40 darkblue_fill btn_search" onclick="javascript:linkPage('1'); return false;">검색</button> -->
|
||||
<!-- </div> -->
|
||||
</form>
|
||||
<div class="table_top">
|
||||
<p class="list_total_number">전체 <span class="color_blue">${resultCnt}</span>건</p>
|
||||
</div>
|
||||
<!-- <div class="table_top"> -->
|
||||
<%-- <p class="list_total_number">전체 <span class="color_blue">${resultCnt}</span>건</p> --%>
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- list -->
|
||||
<div class="table_type_cols">
|
||||
@ -233,7 +233,7 @@ var _searchYear = "<c:out value='${boardVO.searchYear}'/>";
|
||||
<button type="button" class="btnType09" onclick="javascript:fn_egov_addNotice(); return false;">글쓰기</button>
|
||||
</c:if>
|
||||
<button type="button" class="btn btn_text btn_40 darkblue_fill btn_search" onclick="javascript:fn_egov_addNotice(); return false;">글쓰기</button>
|
||||
<button type="button" class="btn btn_text btn_40 darkblue_fill btn_search" onclick="javascript:linkPage('1'); return false;">검색</button>
|
||||
<!-- <button type="button" class="btn btn_text btn_40 darkblue_fill btn_search" onclick="javascript:linkPage('1'); return false;">검색</button> -->
|
||||
</div>
|
||||
<!-- //하단 버튼 -->
|
||||
</div>
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
<head>
|
||||
<!-- 첨부파일용 CSS -->
|
||||
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
|
||||
<script src="/js/ncms_common.js"></script>
|
||||
<validator:javascript formName="board" staticJavascript="false" xhtml="true" cdata="false" />
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
@ -39,7 +40,7 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(".lnb").hide();// 메뉴 색상 숨기기
|
||||
});
|
||||
|
||||
function fn_egov_regist_notice() {
|
||||
@ -62,73 +63,27 @@
|
||||
|
||||
function moveFunc(type){
|
||||
if(type == "step02"){
|
||||
$("#moveFrm").attr("action", "/web/main/mainPage.do");
|
||||
$("#moveFrm").submit();
|
||||
location.href="/web/main/mainPage.do";
|
||||
//$("#moveFrm").attr("action", "/web/cop/bbsWeb/selectBoardErrorList.do?bbsId=BBSMSTR_000000000010");
|
||||
//$("#moveFrm").submit();
|
||||
}else if(type == "step03"){
|
||||
|
||||
if($("#reserveTel01").val() == ""){
|
||||
alert("전화번호를 입력해 주세요");
|
||||
$("#reserveTel01").focus();
|
||||
if($("#nttSj").val() == ""){
|
||||
alert("오류제목을 입력해 주세요");
|
||||
$("#nttSj").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#reserveTel02").val() == ""){
|
||||
alert("전화번호를 입력해 주세요");
|
||||
$("#reserveTel02").focus();
|
||||
if($("#nttCn").val() == ""){
|
||||
alert("오류내용을 입력해 주세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#reserveTel03").val() == ""){
|
||||
alert("전화번호를 입력해 주세요");
|
||||
$("#reserveTel03").focus();
|
||||
return false;
|
||||
}
|
||||
//$("#writeFrm").attr("action", "/web/user/lawCounsel/${siteIdx}/02/${siteMenuIdx}/lawWrite.do");
|
||||
//$("#writeFrm").submit();
|
||||
|
||||
/*
|
||||
if($("#caseGubun").val() == ""){
|
||||
alert("조정유형을 선택해 주세요");
|
||||
$("#caseGubun").focus();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
goSave();
|
||||
|
||||
if($("#applcntTel01").val() == ""){
|
||||
alert("전화번호를 입력해 주세요");
|
||||
$("#applcntTel01").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#applcntTel02").val() == ""){
|
||||
alert("전화번호를 입력해 주세요");
|
||||
$("#applcntTel02").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#applcntTel03").val() == ""){
|
||||
alert("전화번호를 입력해 주세요");
|
||||
$("#applcntTel03").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#applcntEmail").val() == ""){
|
||||
alert("이메일을 입력해 주세요");
|
||||
$("#applcntEmail").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#counselTitle").val() == ""){
|
||||
alert("상담제목을 입력해 주세요");
|
||||
$("#counselTitle").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#editorParam_counselContent").val() == ""){
|
||||
alert("상담내용을 입력해 주세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#writeFrm").attr("action", "/web/user/lawCounsel/${siteIdx}/02/${siteMenuIdx}/lawWrite.do");
|
||||
$("#writeFrm").submit();
|
||||
}else if(type == "list"){
|
||||
$("#examNo").remove();
|
||||
$("#fileFuncType").remove();
|
||||
@ -144,6 +99,73 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 글 저장 function */
|
||||
function goSave(method_parm ){ //method_parm :관리자로그 메소드에서 사용.(파일업로드 부분 공통으로 사용하여, 페이지 구분을 위해)
|
||||
if($('#content').length > 0){ //팝업존에서 타이틀 무조건 체크
|
||||
if('' == $('#content').val()){
|
||||
alert("이미지 등록시 타이틀은 필수입니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*if(undefined !=$("input[name=limitcount]").val() && ""!=$("input[name=limitcount]").val() ){
|
||||
if($('#atchFileNece').length > 0 ){
|
||||
if($('#tbody_fiielist').find('tr').length == 0){
|
||||
alert("첨부파일을 추가해 주십시오");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
var msg;
|
||||
msg = "해당 첨부파일을 수정하시겠습니까?";
|
||||
var data = new FormData(document.writeForm == undefined ? document.board : document.writeForm);
|
||||
_fileForm2.forEach(function(obj, idx) {
|
||||
if (obj) data.append("file"+idx, obj.fileObj);
|
||||
});
|
||||
|
||||
|
||||
var url = "";
|
||||
url = "/web/cop/bbs/insertBoardArticleAjax.do";
|
||||
/*
|
||||
if($("#pageType").val() == "insert"){//게시판저장
|
||||
url = "/cop/bbs/insertBoardArticleAjax.do";
|
||||
}else if($("#pageType").val() == "replay"){ //게시판 답변
|
||||
url = "/cop/bbs/replyBoardArticleAjax.do";
|
||||
}else{
|
||||
url = document.writeForm == undefined ? "/cop/bbs/updateBoardArticleAjax.do" : "/uss/ion/fms/FmsFileInsertAjax.do?logParam="+method_parm;
|
||||
}
|
||||
*/
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: data,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false,
|
||||
//timeout: 600000,
|
||||
success: function (returnData, status) {
|
||||
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
||||
if("fail"==returnData.result){
|
||||
alert(returnData.message);
|
||||
return;
|
||||
}
|
||||
alert("저장 되었습니다.11");
|
||||
moveFunc('step02');
|
||||
//goList();
|
||||
} else if(status== 'fail'){
|
||||
alert("저장에 실패하였습니다. 22!!");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="" method="get" id="moveFrm">
|
||||
@ -185,7 +207,7 @@
|
||||
<!-- page_location -->
|
||||
<ul class="page_location">
|
||||
<li><i class="icon home"></i></li>
|
||||
<li>게시판</li>bbb
|
||||
<li>게시판</li>
|
||||
<li>${brdMstrVO.bbsNm}</li>
|
||||
</ul>
|
||||
<!-- //page_location -->
|
||||
@ -208,36 +230,97 @@
|
||||
<p class="required_text">*<span>필수입력</span></p>오류제목
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<input type="text" class="input_text w100per" placeholder="ex) 가맹사업거래 상담 신청합니다." id="counselTitle" name="counselTitle">
|
||||
<input type="text" class="input_text w100per" id="nttSj" name="nttSj">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>오류내용</th>
|
||||
<td colspan="3">
|
||||
<div class="length_wrap">
|
||||
<textarea name="editorParam_counselContent" id="editorParam_counselContent" class="input_text"></textarea>
|
||||
<textarea name="nttCn" id="nttCn" class="input_text" placeholder="ex) 연락처를 남겨주시면 연락드리겠습니다."></textarea>
|
||||
<p class="length"><span class="color_red">0</span>/ 1300자</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
첨부파일
|
||||
<th class="req_text">
|
||||
<p>첨부파일</p>
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<div class="file_upload_wrap">
|
||||
<div class="file_button">
|
||||
<input type="file" id="file" class="input_file">
|
||||
<label for="file" class="file btn btn_text btn_40 darkblue_border">파일선택</label>
|
||||
<td class="upload_area">
|
||||
<!-- <input type="text" id="fileNm" size="30" class="file_input" readonly> --><!-- <button type="button" class="btnType01 btn_add_file">파일 첨부하기</button> -->
|
||||
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
|
||||
<button type="button" id="filebutton" class="btn btn_text btn_30 blue_border btnType01 btn_add_file">파일 첨부하기</button>
|
||||
<div class="file_wrap file_upload_box no_img_box" style="width:700px;">
|
||||
<table class="tbType02">
|
||||
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
||||
<colgroup>
|
||||
<col style="width: 60%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 10%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<!-- <th>
|
||||
<input type="checkbox" id="all_check"><label for="all_check"></label>
|
||||
</th> -->
|
||||
<th style="text-align:center;">파일 명</th>
|
||||
<th style="text-align:center;">종류</th>
|
||||
<th style="text-align:center;">크기</th>
|
||||
<th style="text-align:center;">삭제</th>
|
||||
</thead>
|
||||
<tbody class="tb_file_before">
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="#none" download="download"><i class="icon file clip"></i><span class="file_name">분쟁조정신청 관련_필요한 첨부이미지_10310.png </span><span class="file_size">457kb</span></a> <button type="button" class="btn btn_only_icon round"><i class="icon delete gray_fill"></i></button></li>
|
||||
</ul>
|
||||
<div class="file_wrap fileAfter file_list_div" style="width:700px;">
|
||||
<table class="tbType02">
|
||||
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
||||
<colgroup>
|
||||
<col style="width: 60%">
|
||||
<col style="width: 10%">
|
||||
<col style="width: 20%">
|
||||
<col style="width: 10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<!-- <th>
|
||||
<input type="checkbox" id="all_check"><label for="all_check"></label>
|
||||
</th> -->
|
||||
<th style="text-align:center;">파일 명</th>
|
||||
<th style="text-align:center;">종류</th>
|
||||
<th style="text-align:center;">크기</th>
|
||||
<th style="text-align:center;">삭제</th>
|
||||
</thead>
|
||||
<tbody id="tbody_fiielist" class="tb_file_after">
|
||||
<c:forEach var="fileList" items="${fileList}" varStatus="status">
|
||||
<tr class="item_<c:out value='${fileList.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
|
||||
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
|
||||
<td class="td_filename">
|
||||
<!-- <img src="/direct/img/upload_hwp_img.png" alt="" /> -->
|
||||
<span class="file_name_text"><c:out value='${fileList.orignlFileNm}' /></span>
|
||||
</td>
|
||||
<td class="td_filesort">
|
||||
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
|
||||
</td>
|
||||
<td class="td_filesize">
|
||||
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"><c:out value="${fileList.fileMg}"/></span>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn_text btn_30 red_border btn_del" onclick="delAtchFile('<c:out value='${fileList.atchFileId}' />', '<c:out value='${fileList.fileSn}' />'); return false;" title="파일삭제">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user