From 7c540d109b1bb3f43ef70909bb2a76ce85bfd134 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Thu, 19 Mar 2026 14:06:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=81=EB=AC=B8=EB=B0=9C=EC=A3=BC=EC=84=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseOrderFormPopup_english.jsp | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) 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"