diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_english.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_english.jsp index 432d1f1..7b73166 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_english.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_english.jsp @@ -172,6 +172,11 @@ input.date_icon { .ui-jqgrid .select2-container--default .select2-selection--single .select2-selection__arrow { height: 24px; } +.ui-jqgrid tr.jqgrow td { + white-space: normal !important; + word-wrap: break-word; + word-break: break-all; +} @@ -192,6 +197,11 @@ $(document).ready(function(){ var unit_cd = $.parseJSON($("#unit_cd").val()); var currency_cd = $.parseJSON($("#currency_cd").val()); var _gridData = $.parseJSON($("#gridDetailList").val()); + for(var i = 0; i < _gridData.length; i++) { + if(_gridData[i].SPEC && _gridData[i].SPEC.trim() !== '') { + _gridData[i].PART_NAME = _gridData[i].PART_NAME + '/' + _gridData[i].SPEC; + } + } console.log("=== gridDetailList ===", JSON.stringify(_gridData)); console.log("=== currency_cd ===", JSON.stringify(currency_cd)); @@ -199,18 +209,17 @@ $(document).ready(function(){ url: "" ,datatype: "local" ,data: _gridData - ,colNames: ["OBJID","PART_OBJID","Item No.","Commodity & Description","Spec","Unit","Q'ty","Currency","Unit Price","Amount","Delivery"] + ,colNames: ["OBJID","PART_OBJID","Item No.","Commodity & Description","Unit","Q'ty","Currency","Unit Price","Amount","Delivery"] ,colModel: [ {name:"OBJID" , hidden: true, sortable:false, editable:false} ,{name:"PART_OBJID" , hidden: true, sortable:false, editable:false} - ,{name:"PART_NO" , width:90, align:"center", sortable:false, editable:false} - ,{name:"PART_NAME" , width:200, align:"left", sortable:false, editable:false} - ,{name:"SPEC" , width:120, align:"left", sortable:false, editable:false} + ,{name:"PART_NO" , width:120, align:"center", sortable:false, editable:false} + ,{name:"PART_NAME" , width:260, align:"left", sortable:false, editable:false} ,{name:"UNIT" , width:50, align:"center", sortable:false, editable:<%= isModify %> ,edittype:"select", formatter:"select" ,editoptions:{ value: unit_cd } } - ,{name:"ORDER_QTY" , width:60, align:"right", sortable:false, editable:<%= isModify %> + ,{name:"ORDER_QTY" , width:50, align:"right", sortable:false, editable:<%= isModify %> ,formatter:"integer", formatoptions:{thousandsSeparator:","} ,editoptions:{ dataInit: function(e){ e.style.textAlign = "right"; } @@ -241,7 +250,7 @@ $(document).ready(function(){ ,{name:"SUPPLY_UNIT_PRICE", width:90, align:"right", sortable:false, editable:false ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2} } - ,{name:"DELIVERY_REQUEST_DATE", width:120, align:"center", sortable:false, editable:<%= isModify %> + ,{name:"DELIVERY_REQUEST_DATE", width:90, align:"center", sortable:false, editable:<%= isModify %> ,editoptions:{ dataInit: function(elem) { $(elem).datepicker({ @@ -308,8 +317,13 @@ $(document).ready(function(){ return MONTH_NAMES_EN[d.getMonth()] + ". " + ("0"+d.getDate()).slice(-2) + ". " + d.getFullYear(); } - // 저장값(hidden) → 표시값 초기 세팅 + // 저장값(hidden) → 표시값 초기 세팅 (비어있으면 오늘 날짜) var initDate = $("#PURCHASE_DATE").val(); + if(!initDate || initDate.trim() === '') { + var today = new Date(); + initDate = today.getFullYear() + '-' + ('0'+(today.getMonth()+1)).slice(-2) + '-' + ('0'+today.getDate()).slice(-2); + $("#PURCHASE_DATE").val(initDate); + } $("#PURCHASE_DATE_DISPLAY").val(toEnglishDateDisplay(initDate)); $("#PURCHASE_DATE_DISPLAY").datepicker({ @@ -342,8 +356,7 @@ function fn_addRow(rowData){ var addData = { "PART_OBJID" : rowData.map.PART_OBJID ,"PART_NO" : rowData.map.PART_NO - ,"PART_NAME" : rowData.map.PART_NAME - ,"SPEC" : rowData.map.SPEC + ,"PART_NAME" : rowData.map.PART_NAME + (rowData.map.SPEC ? '/' + rowData.map.SPEC : '') ,"ORDER_QTY" : v1 ,"UNIT" : fnc_checkNullDefaultValue(rowData.map.UNIT, '0001400') ,"CURRENCY" : "0001534" diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp index dd5bbcc..bdcfa8a 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp @@ -268,7 +268,7 @@ $(document).ready(function(){ } } ,{name:"PARTNER_PRICE" , width:80, align:"right", sortable:false, editable:<%= isModify %> - ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2} + ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:0} ,editoptions:{ dataInit: function(e){ e.style.textAlign = "right"; @@ -285,7 +285,7 @@ $(document).ready(function(){ } } ,{name:"SUPPLY_UNIT_PRICE", width:90, align:"right", sortable:false, editable:false - ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2} + ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:0} } ,{name:"REMARK" , width:180, align:"left", sortable:false, editable:<%= isModify %>} ,{name:"DELIVERY_REQUEST_DATE", width:90, align:"center", sortable:false, editable:<%= isModify %>} @@ -551,8 +551,8 @@ var gridFn = { } function numberWithCommasDecimal(num) { - var n = Number(num); - return n.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ","); + var n = Math.round(Number(num)); + return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } // 라이브러리 로드 완료 후 dataLoaded 플래그 설정 diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_outsourcing.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_outsourcing.jsp index 4caf998..fe5fe2e 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_outsourcing.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_outsourcing.jsp @@ -227,7 +227,7 @@ $(document).ready(function(){ ,editoptions:{ value: unit_cd } } ,{name:"PARTNER_PRICE" , width:80, align:"right", sortable:false, editable:<%= isModify %> - ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2} + ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:0} ,editoptions:{ dataInit: function(e){ e.style.textAlign = "right"; @@ -244,7 +244,7 @@ $(document).ready(function(){ } } ,{name:"SUPPLY_UNIT_PRICE" , width:90, align:"right", sortable:false, editable:false - ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2} + ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:0} } ,{name:"WORK_ORDER_NO" , width:100, align:"center", sortable:false, editable:<%= isModify %>} ,{name:"PART_NO" , width:90, align:"center", sortable:false, editable:false} @@ -467,8 +467,8 @@ var gridFn = { } function numberWithCommasDecimal(num) { - var n = Number(num); - return n.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ","); + var n = Math.round(Number(num)); + return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } // 라이브러리 로드 완료 후 dataLoaded 플래그 설정 diff --git a/src/com/pms/salesmgmt/controller/ContractMgmtController.java b/src/com/pms/salesmgmt/controller/ContractMgmtController.java index 3c445a5..2854520 100644 --- a/src/com/pms/salesmgmt/controller/ContractMgmtController.java +++ b/src/com/pms/salesmgmt/controller/ContractMgmtController.java @@ -2690,7 +2690,7 @@ public class ContractMgmtController { code_map.put("contract_currency", commonService.bizMakeOptionList("0001533", CommonUtils.nullToEmpty((String)info.get("CONTRACT_CURRENCY")), "common.getCodeselect")); // 반납사유 코드 - code_map.put("return_reason_cd", commonService.bizMakeOptionList("0002268", "", "common.getCodeselect")); + code_map.put("return_reason_cd", commonService.bizMakeOptionList("0001810", CommonUtils.nullToEmpty((String)info.get("RETURN_REASON_CD")), "common.getCodeselect")); request.setAttribute("code_map",code_map); request.setAttribute("info", info);