파트 계정구분, 조달구분 항목 추가 및 파트업로드 엑셀 템플릿 수정

This commit is contained in:
2026-02-10 14:17:26 +09:00
parent d953a9189a
commit 47d71b3699
5 changed files with 60 additions and 7 deletions

View File

@@ -233,10 +233,12 @@ $(document).ready(function(){
// JSON 파싱 시 에러 처리
var unit_cd_val = $("#unit_cd").val();
var part_type_val = $("#part_type").val();
var acctfg_code_val = $("#acctfg_code").val();
var sup_code_val = $("#sup_code").val();
var unit_cd = unit_cd_val && unit_cd_val.trim() !== '' ? $.parseJSON(unit_cd_val) : {};
var part_type = part_type_val && part_type_val.trim() !== '' ? $.parseJSON(part_type_val) : {};
var acctfg_code = acctfg_code_val && acctfg_code_val.trim() !== '' ? $.parseJSON(acctfg_code_val) : {};
var sup_code = sup_code_val && sup_code_val.trim() !== '' ? $.parseJSON(sup_code_val) : {};
//Excel File Upload된 파일 목록 부분을 초기화 한다.
@@ -356,7 +358,7 @@ $(document).ready(function(){
,edittype :"select"
,formatter :"select"
,editoptions:{
value: {"":"선택","0":"원자재","1":"부재료"}
value: acctfg_code
,dataInit : function(e){
e.style.width = "92%";
e.style.fontSize = 13;
@@ -1267,6 +1269,7 @@ function fn_save(){
</div>
<textarea style="width:0px; height:0px; visibility: hidden;" id="unit_cd">${code_map.unit_cd}</textarea><!-- 코드동적설정 -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="part_type">${code_map.part_type}</textarea><!-- 코드동적설정 -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="acctfg_code">${code_map.acctfg_code}</textarea><!-- 계정구분 코드동적설정 -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="sup_code">${code_map.sup_code}</textarea><!-- 코드동적설정 -->
</form>
</body>

View File

@@ -36,6 +36,7 @@ $(document).ready(function(){
//var unit_cd = $.parseJSON($("#unit_cd").val()); //jqGrid 구분
var part_type = $.parseJSON($("#part_type").val()); //jqGrid 구분
var acctfg_code = $.parseJSON($("#acctfg_code").val()); //jqGrid 계정구분
var sup_code = $.parseJSON($("#sup_code").val()); //jqGrid 구분
//Excel File Upload된 파일 목록 부분을 초기화 한다.
@@ -160,7 +161,7 @@ $(document).ready(function(){
,edittype :"select"
,formatter :"select"
,editoptions:{
value: {"":"선택","0":"원자재","1":"부재료"}
value: acctfg_code
,dataInit : function(e){
e.style.width = "92%";
e.style.fontSize = 13;
@@ -833,7 +834,7 @@ function fn_save(){
<div style="width:100%; display: inline-block; float:left;">
<div style=" margin: 0 8px;">
<div id="partExcelPopupFormWrap">
<div class="form_popup_title" style="position:relative;">&nbsp;&nbsp;&nbsp;Excel upload<!--<img src="/images/btnExcel.png" style="position:absolute; top:9px; right:135px;"/><span style="position:absolute; top:0px; right:10px; cursor:pointer;" id="templateDownload">Template Download</span>--></div>
<div class="form_popup_title" style="position:relative;">&nbsp;&nbsp;&nbsp;Excel upload<img src="/images/btnExcel.png" style="position:absolute; top:9px; right:135px;"/><span style="position:absolute; top:0px; right:10px; cursor:pointer;" id="templateDownload">Template Download</span></div>
<div id="excelUploadPopupForm">
<div class="fileDnDWrap" style="display: flex;">
<div id="excelImportDropZone" class="dropzone" style="height:100px;width:50% !important;">Drag & Drop 엑셀 템플릿</div>
@@ -983,6 +984,7 @@ function fn_save(){
</div>
<textarea style="width:0px; height:0px; visibility: hidden;" id="unit_cd">${code_map.unit_cd}</textarea><!-- 코드동적설정 -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="part_type">${code_map.part_type}</textarea><!-- 코드동적설정 -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="acctfg_code">${code_map.acctfg_code}</textarea><!-- 계정구분 코드동적설정 -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="sup_code">${code_map.sup_code}</textarea><!-- 코드동적설정 -->
</form>
</body>

View File

@@ -667,6 +667,16 @@ public class PartMngController {
try{
objid = CommonUtils.createObjId();
// 범주이름(PART_TYPE) 공통코드 조회 - jqGrid selectBox용 JSON
Map partTypeParam = new HashMap();
partTypeParam.put("codeId", Constants.PART_TYPE_CODE);
code_map.put("part_type", commonService.getJqGridSelectBoxJsonData("common.getCodeList", partTypeParam, "선택"));
// 계정구분(ACCTFG) 공통코드 조회 - jqGrid selectBox용 JSON
Map acctfgParam = new HashMap();
acctfgParam.put("codeId", Constants.ACCTFG_CODE);
code_map.put("acctfg_code", commonService.getJqGridSelectBoxJsonData("common.getCodeList", acctfgParam, "선택"));
/*
code_map.put("customer_cd",commonService.bizMakeOptionList("", (String)paramMap.get("customer_cd"),"common.getsupplyselect"));
code_map.put("project_name",commonService.bizMakeOptionList("", (String)paramMap.get("project_name"),"common.getProjectNameList"));
@@ -1856,6 +1866,11 @@ public class PartMngController {
//제품구분
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", CommonUtils.nullToEmpty((String)paramMap.get("product_cd")),"common.getCodeselect")); //제품구분
// 계정구분(ACCTFG) 공통코드 조회 - jqGrid selectBox용 JSON
Map acctfgParam = new HashMap();
acctfgParam.put("codeId", Constants.ACCTFG_CODE);
code_map.put("acctfg_code", commonService.getJqGridSelectBoxJsonData("common.getCodeList", acctfgParam, "선택"));
sqlSession = SqlMapConfig.getInstance().getSqlSession();

View File

@@ -3085,8 +3085,19 @@ public class PartMngService extends BaseService {
} else {
partMap.put("ACCTFG", "");
}
// 조달구분(ODRFG)
partMap.put("ODRFG", getCellValue(row, columnIndex++, formatter, emptyColCnt));
// 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환
String odrfgValue = getCellValue(row, columnIndex++, formatter, emptyColCnt);
if(!CommonUtils.isBlank(odrfgValue)){
if("구매".equals(odrfgValue.trim())){
partMap.put("ODRFG", "0");
} else if("생산".equals(odrfgValue.trim())){
partMap.put("ODRFG", "1");
} else {
partMap.put("ODRFG", odrfgValue); // 숫자면 그대로
}
} else {
partMap.put("ODRFG", "");
}
//비고(REMARK)
partMap.put("REMARK", getCellValue(row, columnIndex++, formatter, emptyColCnt));
@@ -3546,7 +3557,18 @@ public class PartMngService extends BaseService {
} else {
partMap.put("ACCTFG", "");
}
partMap.put("ODRFG", odrfg); // 조달구분
// 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환
if(!CommonUtils.isBlank(odrfg)){
if("구매".equals(odrfg.trim())){
partMap.put("ODRFG", "0");
} else if("생산".equals(odrfg.trim())){
partMap.put("ODRFG", "1");
} else {
partMap.put("ODRFG", odrfg); // 숫자면 그대로
}
} else {
partMap.put("ODRFG", "");
}
partMap.put("NOTE", noteMsg);
if(!StringUtils.isBlank(noteMsg) || emptyColCnt.intValue() < 9) {
@@ -3947,7 +3969,18 @@ public class PartMngService extends BaseService {
} else {
partMap.put("ACCTFG", "");
}
partMap.put("ODRFG", odrfg); // 조달구분
// 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환
if(!CommonUtils.isBlank(odrfg)){
if("구매".equals(odrfg.trim())){
partMap.put("ODRFG", "0");
} else if("생산".equals(odrfg.trim())){
partMap.put("ODRFG", "1");
} else {
partMap.put("ODRFG", odrfg); // 숫자면 그대로
}
} else {
partMap.put("ODRFG", "");
}
partMap.put("NOTE", noteMsg);
if(logging) logger.info("partMap:"+partMap);