diff --git a/WebContent/WEB-INF/view/admin/material/materialMngList.jsp b/WebContent/WEB-INF/view/admin/material/materialMngList.jsp new file mode 100644 index 0000000..bf6d1fd --- /dev/null +++ b/WebContent/WEB-INF/view/admin/material/materialMngList.jsp @@ -0,0 +1,168 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="com.pms.common.utils.*"%> +<%@ page import="java.util.*" %> +<%@include file= "/init.jsp" %> +<% + String material_name = CommonUtils.checkNull(request.getParameter("material_name")); + String material_code = CommonUtils.checkNull(request.getParameter("material_code")); +%> + + + + +<%=Constants.SYSTEM_NAME%> + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+

+ 소재관리 +

+
+ + + +
+
+
+ + + + + + + + + +
+
+ + <%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %> + +
+
+
+ + diff --git a/WebContent/WEB-INF/view/admin/material/materialRegistPopUp.jsp b/WebContent/WEB-INF/view/admin/material/materialRegistPopUp.jsp new file mode 100644 index 0000000..6ce0f23 --- /dev/null +++ b/WebContent/WEB-INF/view/admin/material/materialRegistPopUp.jsp @@ -0,0 +1,186 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="com.pms.common.utils.*"%> +<%@ page import="java.util.*" %> +<%@include file= "/init.jsp" %> + + + + +<%=Constants.SYSTEM_NAME%> + + + + +
+ + +
+

+ 소재 등록/수정 +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ + +
+ +
+ + + diff --git a/WebContent/WEB-INF/view/purchaseOrder/deliveryAcceptanceFormPopUp_new.jsp b/WebContent/WEB-INF/view/purchaseOrder/deliveryAcceptanceFormPopUp_new.jsp index 37f33e3..4881215 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/deliveryAcceptanceFormPopUp_new.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/deliveryAcceptanceFormPopUp_new.jsp @@ -1075,7 +1075,7 @@ function fn_location_save(){ ${item.SPEC} ${item.MAKER} ${item.UNIT_TITLE} - + ${item.POM_DELIVERY_DATE} diff --git a/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp b/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp index 6eb7cb2..b51e6d6 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp @@ -334,14 +334,14 @@ function fn_formPopUp(objId){ - + - + @@ -369,7 +369,7 @@ function fn_formPopUp(objId){ - diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp index 84472cc..adaf0de 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp @@ -346,7 +346,7 @@ var columns = [ } } }, - {headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'REGDATE'} + {headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'MAIL_SEND_DATE'} ]; function editCheck (cell) { @@ -879,7 +879,7 @@ function fn_openMailFormPopup(purchaseOrderObjId){ - + diff --git a/WebContent/WEB-INF/view/salesMng/proposalFormPopUp.jsp b/WebContent/WEB-INF/view/salesMng/proposalFormPopUp.jsp index 13a34ab..3cc3d15 100644 --- a/WebContent/WEB-INF/view/salesMng/proposalFormPopUp.jsp +++ b/WebContent/WEB-INF/view/salesMng/proposalFormPopUp.jsp @@ -107,10 +107,10 @@ body { } .header-left { - flex: 0 0 auto; - width: 35%; + flex: 1; + width: 100%; min-width: 200px; - border-right: 1px solid #000; + /* border-right: 1px solid #000; */ /* 결재란 주석 처리로 인해 비활성화 */ } .header-right { @@ -539,7 +539,8 @@ function fn_save(){ - + + <%--
@@ -689,6 +690,7 @@ function fn_save(){
+ --%> diff --git a/src/com/pms/controller/AdminController.java b/src/com/pms/controller/AdminController.java index d455160..7356066 100644 --- a/src/com/pms/controller/AdminController.java +++ b/src/com/pms/controller/AdminController.java @@ -24,9 +24,12 @@ import com.pms.common.bean.PersonBean; import com.pms.common.service.BaseService; import com.pms.common.utils.CommonUtils; import com.pms.common.utils.Constants; +import com.pms.common.SqlMapConfig; import com.pms.service.AdminService; import com.pms.service.CommonService; +import org.apache.ibatis.session.SqlSession; + @Controller public class AdminController extends BaseService { @@ -5062,4 +5065,135 @@ public String clientImportFileProc(HttpServletRequest request, HttpSession sessi return resultMap; } + /** + * 소재 목록을 가져온다. + * @param request + * @param paramMap + * @return + */ + @RequestMapping("/admin/materialMngPagingList.do") + public String getMaterialMngPaging(HttpServletRequest request, @RequestParam Map paramMap){ + return "/admin/material/materialMngList"; + } + + /** + * 소재 목록 관리 - 소재 목록 그리드 + * @param request + * @param paramMap + * @return + */ + @ResponseBody + @RequestMapping("/admin/materialMngGridList.do") + public Map materialMngGridList(HttpServletRequest request, @RequestParam Map paramMap){ + commonService.selectListPagingNew("admin.getMaterialMngGridList", request, paramMap); + return paramMap; + } + + /** + * 소재 등록/수정 팝업 + * @param request + * @param paramMap + * @return + */ + @RequestMapping("/admin/materialRegistPopUp.do") + public String materialRegistPopUp(HttpServletRequest request, @RequestParam Map paramMap){ + Map resultMap = new HashMap(); + try { + String objid = CommonUtils.checkNull(paramMap.get("objid")); + if(!"".equals(objid)) { + // 기존 소재 정보 조회 + resultMap = commonService.selectOne("admin.getMaterialMngInfo", request, paramMap); + } + } catch(Exception e) { + e.printStackTrace(); + } + request.setAttribute("resultMap", resultMap); + return "/admin/material/materialRegistPopUp"; + } + + /** + * 소재 저장 (등록/수정) + * @param request + * @param paramMap + * @return + */ + @ResponseBody + @RequestMapping("/admin/saveMaterialMngInfo.do") + public Map saveMaterialMngInfo(HttpServletRequest request, @RequestParam Map paramMap){ + Map resultMap = new HashMap(); + SqlSession sqlSession = null; + + try { + sqlSession = SqlMapConfig.getInstance().getSqlSession(false); + + HttpSession session = request.getSession(); + PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN); + String userId = CommonUtils.checkNull(person.getUserId()); + + String objid = CommonUtils.checkNull(paramMap.get("objid")); + paramMap.put("userId", userId); + + if("".equals(objid)) { + // 신규 등록 + paramMap.put("objid", CommonUtils.createObjId()); + sqlSession.insert("admin.insertMaterialMng", paramMap); + } else { + // 수정 + sqlSession.update("admin.updateMaterialMng", paramMap); + } + + sqlSession.commit(); + resultMap.put("result", "true"); + resultMap.put("message", "저장되었습니다."); + + } catch(Exception e) { + if(sqlSession != null) sqlSession.rollback(); + e.printStackTrace(); + resultMap.put("result", "false"); + resultMap.put("message", "저장 중 오류가 발생했습니다: " + e.getMessage()); + } finally { + if(sqlSession != null) sqlSession.close(); + } + + return resultMap; + } + + /** + * 소재 삭제 + * @param request + * @param paramMap + * @return + */ + @ResponseBody + @RequestMapping("/admin/deleteMaterialMngInfo.do") + public Map deleteMaterialMngInfo(HttpServletRequest request, @RequestParam Map paramMap){ + Map resultMap = new HashMap(); + SqlSession sqlSession = null; + + try { + sqlSession = SqlMapConfig.getInstance().getSqlSession(false); + + String objId = CommonUtils.checkNull(paramMap.get("objId")); + if(!"".equals(objId)) { + Map deleteParam = new HashMap(); + deleteParam.put("objid", objId); + sqlSession.delete("admin.deleteMaterialMng", deleteParam); + sqlSession.commit(); + resultMap.put("result", "true"); + } else { + resultMap.put("result", "false"); + resultMap.put("message", "삭제할 대상이 없습니다."); + } + + } catch(Exception e) { + if(sqlSession != null) sqlSession.rollback(); + e.printStackTrace(); + resultMap.put("result", "false"); + resultMap.put("message", "삭제 중 오류가 발생했습니다: " + e.getMessage()); + } finally { + if(sqlSession != null) sqlSession.close(); + } + + return resultMap; + } } diff --git a/src/com/pms/mapper/admin.xml b/src/com/pms/mapper/admin.xml index 7d2c81a..c31397c 100644 --- a/src/com/pms/mapper/admin.xml +++ b/src/com/pms/mapper/admin.xml @@ -9434,4 +9434,97 @@ SELECT ORDER BY SCM.REGDATE DESC + + + + + + + + + + + INSERT INTO MATERIAL_MNG ( + OBJID, + MATERIAL_CODE, + MATERIAL_NAME, + MATERIAL_PART_NO, + SIZE_SPEC, + REMARK, + STATUS, + WRITER, + REGDATE + ) VALUES ( + #{objid}, + #{material_code}, + #{material_name}, + #{material_part_no}, + #{size_spec}, + #{remark}, + COALESCE(#{status}, 'ACTIVE'), + #{userId}, + NOW() + ) + + + + + UPDATE MATERIAL_MNG SET + MATERIAL_CODE = #{material_code}, + MATERIAL_NAME = #{material_name}, + MATERIAL_PART_NO = #{material_part_no}, + SIZE_SPEC = #{size_spec}, + REMARK = #{remark}, + STATUS = #{status}, + EDITER = #{userId}, + EDIT_DATE = NOW() + WHERE OBJID = #{objid} + + + + + DELETE FROM MATERIAL_MNG + WHERE OBJID = #{objid} + + \ No newline at end of file diff --git a/src/com/pms/mapper/purchaseOrder.xml b/src/com/pms/mapper/purchaseOrder.xml index 775e357..70bc8e0 100644 --- a/src/com/pms/mapper/purchaseOrder.xml +++ b/src/com/pms/mapper/purchaseOrder.xml @@ -4292,6 +4292,7 @@ SELECT POM.OBJID /*결재완료*/ + AND POM.MAIL_SEND_DATE IS NOT NULL AND (MULTI_MASTER_YN = 'Y' OR NVL(MULTI_MASTER_YN, '') != 'Y' AND NVL(MULTI_YN, '') != 'Y')