diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp
index 5d6c727..adc4fc0 100644
--- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp
+++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_general.jsp
@@ -84,25 +84,7 @@ input.date_icon {
letter-spacing: 20px;
border: none !important;
}
-/* 결재란 */
-.approval-table {
- border-collapse: collapse;
- float: right;
-}
-.approval-table th, .approval-table td {
- border: 1px solid #000;
- text-align: center;
- padding: 3px 10px;
- font-size: 11px;
- width: 55px;
-}
-.approval-table th {
- background-color: #d9d9d9;
- font-weight: normal;
-}
-.approval-table td {
- height: 35px;
-}
+
/* 기본정보 라벨 */
.info-label {
font-weight: bold;
@@ -163,34 +145,6 @@ input.date_icon {
overflow-y: scroll !important;
max-height: 350px !important;
}
-/* 합계 테이블 */
-.total-table {
- width: 100%;
- border-collapse: collapse;
- margin-top: 10px;
-}
-.total-table td {
- border: 1px solid #000;
- padding: 8px;
- font-size: 12px;
-}
-.total-table .label {
- text-align: center;
- font-weight: bold;
- width: 60%;
- letter-spacing: 5px;
-
-}
-.total-table .currency {
- width: 30px;
- text-align: center;
- font-weight: bold;
- border-right: none !important;
-}
-.total-table .amount {
- text-align: right;
- font-weight: bold;
-}
/* 버튼 영역 */
.btn-area {
text-align: left;
@@ -199,6 +153,54 @@ input.date_icon {
.graycolor {
background-color: #d9d9d9;
}
+.total-section {
+ border: 1px solid #333;
+ width: 50%;
+}
+.total-section table {
+ width: 100%;
+ border-collapse: collapse;
+}
+.total-section td {
+ padding: 10px;
+ border: 1px solid #333;
+ font-size: 14px;
+}
+.total-section .label {
+ background-color: #e2efda;
+ font-weight: bold;
+ text-align: center;
+ width: 40%;
+ white-space: nowrap;
+}
+.total-section .amount {
+ text-align: right;
+ font-weight: bold;
+}
+.confidential-notice {
+ padding: 10px;
+ font-size: 12px;
+ text-align: right;
+ color: #cb3333;
+}
+/* jqGrid 내 Select2 스타일 */
+.ui-jqgrid .select2-container {
+ z-index: 9999;
+}
+.ui-jqgrid .select2-container--default .select2-selection--single {
+ height: 24px;
+ min-height: 24px;
+ border: none;
+ background: transparent;
+}
+.ui-jqgrid .select2-container--default .select2-selection--single .select2-selection__rendered {
+ line-height: 24px;
+ padding-left: 4px;
+ font-size: 12px;
+}
+.ui-jqgrid .select2-container--default .select2-selection--single .select2-selection__arrow {
+ height: 24px;
+}
@@ -218,25 +220,23 @@ $(document).ready(function(){
$(this).val(fnc_addComma($(this).val().replace(/[^0-9]/g,"")));
});
- // 결재라인 가져오기
- fn_getApprLine();
-
var unit_cd = $.parseJSON($("#unit_cd").val());
+ var delivery_place_grid = $.parseJSON($("#delivery_place_grid").val());
// 그리드 초기화
grid = $("#grid1").jqGrid({
url: ""
,datatype: "local"
,data: $.parseJSON($("#gridDetailList").val())
- ,colNames: ["OBJID","PART_OBJID","PART_NO","No","품명","규격","수량","단위","배송지","단가","공급가액","비고"]
+ ,colNames: ["OBJID","PART_OBJID","PART_NO","No","품명","규격","수량","단위","배송지","단가","공급가액","비고","입고요청일"]
,colModel: [
{name:"OBJID" , hidden: true, sortable:false, editable:false}
,{name:"PART_OBJID" , hidden: true, sortable:false, editable:false}
,{name:"PART_NO" , hidden: true, sortable:false, editable:false}
,{name:"ROW_NUM" , width:40, align:"center", sortable:false, editable:false}
- ,{name:"PART_NAME" , width:170, align:"left", sortable:false, editable:false}
- ,{name:"SPEC" , width:180, align:"left", sortable:false, editable:<%= isModify %>}
- ,{name:"ORDER_QTY" , width:60, align:"right", sortable:false, editable:<%= isModify %>
+ ,{name:"PART_NAME" , width:160, align:"left", sortable:false, editable:false}
+ ,{name:"SPEC" , width:120, align:"left", sortable:false, editable:false}
+ ,{name:"ORDER_QTY" , width:50, align:"right", sortable:false, editable:<%= isModify %>
,formatter:"integer", formatoptions:{thousandsSeparator:","}
,editoptions:{
dataInit: function(e){ e.style.textAlign = "right"; }
@@ -247,18 +247,38 @@ $(document).ready(function(){
,edittype:"select", formatter:"select"
,editoptions:{ value: unit_cd }
}
- ,{name:"PART_DELIVERY_PLACE" , width:80, align:"center", sortable:false, editable:<%= isModify %>}
- ,{name:"PARTNER_PRICE" , width:90, align:"right", sortable:false, editable:<%= isModify %>
- ,formatter:"integer", formatoptions:{thousandsSeparator:","}
+ ,{name:"PART_DELIVERY_PLACE", width:130, align:"center", sortable:false, editable:<%= isModify %>
+ ,edittype:"select", formatter:"select"
+ ,editoptions:{
+ value: delivery_place_grid
+ ,defaultValue: "RPS"
+ ,dataInit: function(elem) {
+ var $el = $(elem);
+ if(!$el.val() || $el.val() === '') {
+ $el.val('RPS');
+ }
+ setTimeout(function(){
+ $el.select2({
+ width: '100%'
+ ,dropdownAutoWidth: true
+ ,dropdownParent: $el.closest('.ui-jqgrid')
+ });
+ }, 50);
+ }
+ }
+ }
+ ,{name:"PARTNER_PRICE" , width:80, align:"right", sortable:false, editable:<%= isModify %>
+ ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2}
,editoptions:{
dataInit: function(e){ e.style.textAlign = "right"; }
,dataEvents: [{type:"change", fn:function(e){ gridFn.calcRowAll(e); }}]
}
}
- ,{name:"SUPPLY_UNIT_PRICE", width:100, align:"right", sortable:false, editable:false
- ,formatter:"integer", formatoptions:{thousandsSeparator:","}
+ ,{name:"SUPPLY_UNIT_PRICE", width:90, align:"right", sortable:false, editable:false
+ ,formatter:"number", formatoptions:{thousandsSeparator:",", decimalPlaces:2}
}
- ,{name:"REMARK" , width:120, align:"left", sortable:false, editable:<%= isModify %>}
+ ,{name:"REMARK" , width:100, align:"left", sortable:false, editable:<%= isModify %>}
+ ,{name:"DELIVERY_REQUEST_DATE", width:90, align:"center", sortable:false, editable:<%= isModify %>}
]
,rownumbers : false
,viewrecords : true
@@ -346,17 +366,7 @@ $(document).ready(function(){
$("#btnAdd").click(function(){ fn_openPartMngListPopUp(); });
$("#btnDel").click(function(){ gridFn.delRow(); });
$("#btnSave").click(function(){ fn_save(); });
- $("#btnAppr").click(function(){
- if(fnc_valitate("form1")){
- var objId = "${objId}";
- if(""==grid.getRowData()){
- Swal.fire('저장할 품목이 존재 하지 않습니다');
- return;
- }
- var title = encodeURIComponent($("#TITLE").val());
- window.open("/approval/registApproval.do?targetType=PURCHASE_ORDER_GENERAL&targetObjId="+objId+"&approvalTitle="+title,"registApproval","width=700,height=700");
- }
- });
+
<% }else{ %>
$("#btnDown").click(function(){
document.form1.action = "/purchaseOrder/purchaseOrderFormPopup_general.do?actType=DOWN&PURCHASE_ORDER_MASTER_OBJID=${objId}";
@@ -371,28 +381,6 @@ $(document).ready(function(){
gridFn.calcAllRows();
});
-// 결재라인 가져오기
-function fn_getApprLine(){
- if('${objId}'!=''){
- $.ajax({
- url:"/common/getApprovalLine.do",
- type:"POST",
- data:{"objId":"${objId}"},
- dataType:"json",
- async:false,
- success:function(data){
- $.each(data.RESULT, function(i,o){
- if(i==0){
- $("#appr_writer").html(o.WRITER);
- }
- if(i < 3){
- $("#appr"+(i+1)).html(o.TARGET_USER_NAME +"
"+ (o.PROC_DATE!=undefined?o.PROC_DATE:""));
- }
- });
- }
- });
- }
-}
// 행추가 팝업
function fn_openPartMngListPopUp(){
@@ -418,6 +406,7 @@ function fn_addRow(rowData){
,"PARTNER_PRICE" : v2
,"SUPPLY_UNIT_PRICE": _rowSum
,"REMARK" : ""
+ ,"DELIVERY_REQUEST_DATE" : ""
};
grid.addRowData(newId, addData);
@@ -538,12 +527,18 @@ var gridFn = {
var vat = Math.floor(totalSupplyPrice * 0.1);
var totalWithVat = totalSupplyPrice + vat;
- $("#TOTAL_SUPPLY_PRICE").val(numberWithCommas(totalSupplyPrice));
- $("#TOTAL_VAT").val(numberWithCommas(vat));
- $("#TOTAL_PRICE_ALL").val(numberWithCommas(totalWithVat));
+ $("#TOTAL_SUPPLY_PRICE").val(numberWithCommasDecimal(totalSupplyPrice));
+ $("#TOTAL_VAT").val(numberWithCommasDecimal(vat));
+ $("#TOTAL_PRICE_ALL").val(numberWithCommasDecimal(totalWithVat));
+ $("#TOTAL_AMOUNT_DISPLAY").text(numberWithCommasDecimal(totalSupplyPrice) + " 원");
}
}
+function numberWithCommasDecimal(num) {
+ var n = Number(num);
+ return n.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+}
+
// 라이브러리 로드 완료 후 dataLoaded 플래그 설정
$(window).on('load', function() {
setTimeout(function() {
@@ -762,18 +757,6 @@ function fn_generateAndUploadPdf(callback) {
발 주 서
-
-
- | 담당자 |
- 부사장 |
- 대표이사 |
-
-
- |
- 전결 |
- 전결 |
-
-
|
@@ -783,7 +766,7 @@ function fn_generateAndUploadPdf(callback) {
@@ -842,7 +825,7 @@ function fn_generateAndUploadPdf(callback) {
| 담 당 자 |
<% if(isModify){ %>
- |