품의서관리_발주서생성

This commit is contained in:
2025-11-28 16:15:50 +09:00
parent 5c72cda6e6
commit 3b78871b74
7 changed files with 1615 additions and 330 deletions

View File

@@ -543,8 +543,8 @@ $(document).ready(function(){
$("#SALES_MNG_USER_HP").val($(this).find("option:selected").attr("data-cell_phone"));
});
<c:if test="${empty info || empty info.OBJID || info.actType eq 'C'}">
$("#PO_CLIENT_ID").val('-1130201617'); //우성 default
<c:if test="${empty info || empty info.PO_CLIENT_ID || info.actType eq 'C'}">
$("#PO_CLIENT_ID").val('-1130201617'); //RPS default
$("#PO_CLIENT_ID").trigger("change");
</c:if>

View File

@@ -7,6 +7,11 @@
<%--Expression Language ::: ${fn:escapeXml(str1)} --%>
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<%
// DB에서 메뉴명 조회 (공통 유틸 사용)
String menuObjId = request.getParameter("menuObjId");
String menuName = CommonUtils.getMenuName(menuObjId, "기본메뉴명");
%>
<!DOCTYPE html>
<html>
<head>
@@ -16,29 +21,8 @@
<link rel="stylesheet" href="/css/selectMulti.css">
<style>
/* //.tabulator-row-select { */
.tabulator-row .tabulator-cell {
/*
width: 20px !important;
*/
}
/*
.tabulator-row .tabulator-cell input[type="checkbox"] {
/*width: 20px; 원하는 너비로 조절하세요 */
}
*/
</style>
<script type="text/javascript">
$(document).ready(function(){
//fnc_changePaginationAndTotalCountArea();
//$(".tabulator-row > .tabulator-cell").has('input').css('width', '10px');
//$(".tabulator-cell input[type='checkbox']").css("width", "20px"); // 원하는 너비로 조절하세요
//$(".tabulator-row .tabulator-cell input[type='checkbox']").css("width", "20px !important"); // 원하는 너비로 조절하세요
$("input").keyup(function(e){
if(e.keyCode == 13){
@@ -161,102 +145,7 @@ $(document).ready(function(){
});
});
/*
grid1 = $("#grid1").jqGrid({
url: ""
,datatype: "local"
,data : $.parseJSON($("#grid1Data").val())
,colNames: ["OBJID","결재1","결재2"
,"년도","고객사","고객사 프로젝트명","당사프로젝트번호","발주부품","발주 No.", "발주구분","발주서_제목","납품장소","검수방법","결재조건","입고요청일","공급업체"
//,"레이저업체","용접업체","가공업체" // TODO: 협의중
,"구매담당","발주일","발주금액","상태"]
,colModel: [
{name:"OBJID" , index:"", width: 0, align:"center", hidden: true, sortable:false, editable:false}
,{name:"APPROVAL_OBJID" , index:"", width: 0, align:"center", hidden: true, sortable:false, editable:false}
,{name:"ROUTE_OBJID" , index:"", width: 0, align:"center", hidden: true, sortable:false, editable:false}
,{name:"CM_YEAR" , index:"", width:45, align:"center", hidden:false, sortable:false, editable:false}
,{name:"CUSTOMER_NAME" , index:"", width:100, align:"left", hidden:false, sortable:false, editable:false}
,{name:"CUSTOMER_PROJECT_NAME", index:"", width:150, align:"left", hidden:false, sortable:false, editable:false}
,{name:"PROJECT_NO" , index:"", width:120, align:"center", hidden:false, sortable:false, editable:false}
,{name:"TYPE_NAME" , index:"", width:70, align:"center", hidden:false, sortable:false, editable:false}
,{name:"PURCHASE_ORDER_NO" , index:"", width:100, align:"center", hidden:false, sortable:false, editable:false, formatter: col_custom_fmt, unformat:col_custom_fmt_un}
,{name:"ORDER_TYPE_CD_NAME" , index:"", width:70, align:"center", hidden:false, sortable:false, editable:false}
,{name:"TITLE" , index:"", width:200, align:"left", hidden:false, sortable:false, editable:false}
,{name:"DELIVERY_PLACE_NAME" , index:"", width:90, align:"center", hidden:false, sortable:false, editable:false}
,{name:"INSPECT_METHOD_NAME" , index:"", width:90, align:"center", hidden:false, sortable:false, editable:false}
,{name:"PAYMENT_TERMS_NAME" , index:"", width:120, align:"center", hidden:false, sortable:false, editable:false}
,{name:"DELIVERY_DATE" , index:"", width:90, align:"center", hidden:false, sortable:false, editable:false}
,{name:"PARTNER_NAME" , index:"", width:120, align:"left", hidden:false, sortable:false, editable:false}
//,{name:"SUPPLY1" , index:"", width:110, align:"center", hidden:false, sortable:false, editable:false} // TODO: 협의중
//,{name:"SUPPLY2" , index:"", width:110, align:"center", hidden:false, sortable:false, editable:false} // TODO: 협의중
//,{name:"SUPPLY3" , index:"", width:110, align:"center", hidden:false, sortable:false, editable:false} // TODO: 협의중
,{name:"SALES_MNG_USER_NAME" , index:"", width:80, align:"center", hidden:false, sortable:false, editable:false}
,{name:"REGDATE" , index:"", width:90, align:"center", hidden:false, sortable:false, editable:false}
,{name:"TOTAL_PRICE_ALL" , index:"", width:120, align: "right", hidden:false, sortable:false, editable:false, formatter :"integer"}
,{name:"APPR_STATUS_NAME" , index:"", width:80, align:"center", hidden:false, sortable:false, editable:false, formatter: col_custom_fmt, unformat:col_custom_fmt_un}
]
,ignoreCase : true //로컬 검색 및 정렬이 대,소문자를 구분하지 않도록 하려면true
,rownumbers : false //row번호 표시
,viewrecords : true //pager가 있을경우 표시되는 record number
,autowidth : true //그리드 너비가 자동으로 부모 요소의 너비로 다시 계산
,sortable : false //마우스로 열을 끌어다 놓아 열을 재정렬
,shrinkToFit : true //모든 열은 너비에 비례하여 크기가 조정
,forceFit : false //컬럼의 width를 변화시킬때 그리드의 width를 고정 여부
,multiselect : true //선택가능. 체크박스표시
//,height : 650
,height : 'auto'
//,rowNum : "${countPerPage}"
,rowNum : 90000
,jsonReader : {repeatitems: false}
,mtype :"POST"
,footerrow : false //바닥합계
,userDataOnFooter: false //바닥합계
//,caption :"제목"
//,pager :"#grid1Pager"
,loadComplete: function(data){ //모든 서버 요청 직후에 실행
var gid = this.id;
var grid_wrap_div = $("#gbox_"+gid);
$.each($("#"+gid).getDataIDs(), function(i,o){
var st = $("#"+gid).getCell(o, "APPR_STATUS_NAME");
if(st=="결재중"){
$("#jqg_"+gid+"_"+o).attr("disabled", true); //체크불가 행 설정
}
});
setTimeout("fn_jqGrid_init($('#"+gid+"'), true);", 50); //윈도우크기 비례 자동조절
//footer 커스텀..
}
,onSelectRow : function(rowid, status, e){ //행 선택시
var gid = $(this).attr("id");
var disabled = $("#jqg_"+gid+"_"+rowid).attr("disabled");
if(disabled){ //체크불가 처리한 행처리
$("#jqg_"+gid+"_"+rowid).attr("checked",false);
$("#jqg_"+gid+"_"+rowid).attr("value","off");
//$("tr.jqgrow#"+rowid, $("#gbox_"+gid)).removeClass("ui-state-highlight").attr("aria-selected", "false");
}
}
,onSelectAll : function(aRowids,status){ //전체선택시
var gid = $(this).attr("id");
if(status){
for(var i=1;i<=aRowids.length;i++){
var disabled = $("#jqg_"+gid+"_"+i).attr("disabled");
if(disabled){ //체크불가 처리한 행처리
$("#jqg_"+gid+"_"+i).attr("checked",false);
$("#jqg_"+gid+"_"+i).attr("value","off");
$("tr.jqgrow#"+i, $("#gbox_"+gid)).removeClass("ui-state-highlight").attr("aria-selected", "false");
}else{
$("#jqg_"+gid+"_"+i).attr("value","on");
}
}
}
}
});
*/
fn_search();
@@ -354,27 +243,32 @@ function fn_createGridAnchorTag(cell, formatterParams, onRendered){
var appendText = "";
var fieldValue = fnc_checkNull(cell.getValue());
if(cell.getField() == 'PURCHASE_ORDER_NO'){
var MULTI_YN = fnc_checkNull(cell.getData().MULTI_YN);
var MULTI_MASTER_YN = fnc_checkNull(cell.getData().MULTI_MASTER_YN);
var MULTI_MASTER_OBJID = fnc_checkNull(cell.getData().MULTI_MASTER_OBJID);
if(cell.getField() == 'PROPOSAL_NO'){
// 품의서 No - 값이 있으면 링크 표시
if(fieldValue != ''){
appendText = "<a href='#none' style='color:#0000EE'>"+fieldValue+"</a>";
}else{
appendText = fieldValue;
}
}else if(cell.getField() == 'PURCHASE_ORDER_NO'){
var MULTI_YN = fnc_checkNull(cell.getData().MULTI_YN);
var MULTI_MASTER_YN = fnc_checkNull(cell.getData().MULTI_MASTER_YN);
var targetStatus = fnc_checkNull(cell.getData().APPR_STATUS).toUpperCase();
if(MULTI_YN == 'Y' && MULTI_MASTER_YN == 'N' && targetStatus != 'COMPLETE'){
appendText = fieldValue;
}else{
appendText = "<a href='#' href='#none' style='color:#0000EE'>"+fieldValue+"</a>";
appendText = "<a href='#none' style='color:#0000EE'>"+fieldValue+"</a>";
}
}else if(cell.getField() == 'APPR_STATUS_NAME'){
var targetStatus = fnc_checkNull(cell.getData().APPR_STATUS).toUpperCase();
var MULTI_YN = fnc_checkNull(cell.getData().MULTI_YN);
var MULTI_MASTER_YN = fnc_checkNull(cell.getData().MULTI_MASTER_YN);
var MULTI_MASTER_OBJID = fnc_checkNull(cell.getData().MULTI_MASTER_OBJID);
var MULTI_YN = fnc_checkNull(cell.getData().MULTI_YN);
var MULTI_MASTER_YN = fnc_checkNull(cell.getData().MULTI_MASTER_YN);
var status = fnc_checkNull(cell.getData().STATUS).toUpperCase();
if(!fnc_isEmpty(targetStatus) && "CREATE" != targetStatus && "CANCEL" != status //&& "REJECT" != targetStatus
if(!fnc_isEmpty(targetStatus) && "CREATE" != targetStatus && "CANCEL" != status
&& (MULTI_YN != 'Y' || MULTI_YN == 'Y' && MULTI_MASTER_YN == 'Y' || MULTI_YN == 'Y' && MULTI_MASTER_YN == 'N' && targetStatus == 'COMPLETE') ){
appendText = "<a href='#' href='#none' style='color:#0000EE'>"+fieldValue+"</a>";
appendText = "<a href='#none' style='color:#0000EE'>"+fieldValue+"</a>";
}else{
appendText = fieldValue;
}
@@ -384,12 +278,23 @@ function fn_createGridAnchorTag(cell, formatterParams, onRendered){
}
var columns = [
{title:'OBJID_PROJECT',field:'OBJID_PROJECT' ,visible:false ,frozen:true },
{title:'APPROVAL_OBJID',field:'APPROVAL_OBJID' ,visible:false ,frozen:true },
{title:'ROUTE_OBJID',field:'ROUTE_OBJID' ,visible:false ,frozen:true },
{title:'MULTI_MASTER_OBJID',field:'MULTI_MASTER_OBJID' ,visible:false ,frozen:true },
{title:'OBJID',field:'OBJID', visible:false, frozen:true},
{title:'OBJID_PROJECT',field:'OBJID_PROJECT', visible:false, frozen:true},
{title:'APPROVAL_OBJID',field:'APPROVAL_OBJID', visible:false, frozen:true},
{title:'ROUTE_OBJID',field:'ROUTE_OBJID', visible:false, frozen:true},
{title:'MULTI_MASTER_OBJID',field:'MULTI_MASTER_OBJID', visible:false, frozen:true},
{title:'SALES_REQUEST_OBJID',field:'SALES_REQUEST_OBJID', visible:false, frozen:true},
{headerHozAlign : 'center', hozAlign : 'center', width : '96', title : '발주 No.', field : "PURCHASE_ORDER_NO", frozen:true,
{headerHozAlign:'center', hozAlign:'center', width:120, title:'품의서 No', field:'PROPOSAL_NO', frozen:true,
formatter:fn_createGridAnchorTag,
cellClick:function(e, cell){
var proposalObjid = fnc_checkNull(cell.getData().SALES_REQUEST_OBJID);
if(proposalObjid != ''){
window.open("/salesMng/proposalFormPopUp.do?PROPOSAL_OBJID=" + proposalObjid, "proposalFormPopUp", "width=1200,height=700,scrollbars=yes,resizable=yes");
}
}
},
{headerHozAlign:'center', hozAlign:'center', width:120, title:'발주서 No', field:'PURCHASE_ORDER_NO', frozen:true,
formatter:fn_createGridAnchorTag,
cellClick:function(e, cell){
var MULTI_YN = cell.getData().MULTI_YN;
@@ -398,108 +303,32 @@ var columns = [
var targetStatus = fnc_checkNull(cell.getData().APPR_STATUS).toUpperCase();
var objId = fnc_checkNull(cell.getData().OBJID);
if(MULTI_YN == 'Y' && MULTI_MASTER_YN == 'N' && targetStatus != 'COMPLETE'
//&& 1==2//for test
){
if(MULTI_YN == 'Y' && MULTI_MASTER_YN == 'N' && targetStatus != 'COMPLETE'){
objId = MULTI_MASTER_OBJID;
}else{
fn_formPopUp(objId);
}
//fn_formPopUp(objId); //for test(링크 다 열림)
}
},
/*
{title:"프로젝트정보", headerHozAlign:'center',
columns:[
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '년도', field : "CM_YEAR" },
{headerHozAlign : 'center', hozAlign : 'left' , width : '100', title : '고객사', field : "CUSTOMER_NAME" },
{headerHozAlign : 'center', hozAlign : 'left' , width : '100', title : '고객사 프로젝트명', field : "CUSTOMER_PROJECT_NAME" },
{headerHozAlign : 'center', hozAlign : 'left' , width : '100', title : '유닛명', field : "UNIT_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '프로젝트번호', field : "PROJECT_NO" },
],
frozen:true
},
*/
{title:"발주내용", headerHozAlign:'center',
columns:[
//{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '년도', field : "PO_YEAR" },
{headerHozAlign : 'center', hozAlign : 'left' , width : '95', title : '고객사', field : "CUSTOMER_NAME" },
//{headerHozAlign : 'center', hozAlign : 'left' , width : '100', title : '고객사 프로젝트명', field : "CUSTOMER_PROJECT_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '프로젝트번호', field : "PROJECT_NO" },
{headerHozAlign : 'center', hozAlign : 'left' , width : '140', title : '유닛명', field : "UNIT_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '부품', field : "TYPE_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '구분', field : "ORDER_TYPE_CD_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '동시', field : "MULTI_YN" }, //MULTI_YN_MAKED
{headerHozAlign : 'center', hozAlign : 'left ', width : '200', title : '발주서제목', field : "TITLE" },
{headerHozAlign : 'center', hozAlign : 'center', width : '63', title : '납품장소', field : "DELIVERY_PLACE_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '73', title : '검수방법', field : "INSPECT_METHOD_NAME" },
//{headerHozAlign : 'center', hozAlign : 'center', width : '73', title : '결재조건', field : "PAYMENT_TERMS_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '85', title : '입고요청일', field : "DELIVERY_DATE" },
{headerHozAlign : 'center', hozAlign : 'left' , /*width : '100',*/ title : '공급업체', field : "PARTNER_NAME" },
//{headerHozAlign : 'center', hozAlign : 'left' , /*width : '100',*/ title : '레이져업체명', field : "PARTNER_NAME" },
//{headerHozAlign : 'center', hozAlign : 'left' , /*width : '100',*/ title : '용접업체명', field : "PARTNER_NAME" },
//{headerHozAlign : 'center', hozAlign : 'left' , /*width : '100',*/ title : '가공업체명', field : "PARTNER_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '구매', field : "SALES_MNG_USER_NAME" },
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '발주일', field : "REGDATE" }, //발주서 작성일 기준(240312 확인)
{headerHozAlign : 'center', hozAlign : 'center', width : '61', title : '상태', field : "APPR_STATUS_NAME" , formatter:fn_createGridAnchorTag,
cellClick:function(e, cell){
var targetStatus = fnc_checkNull(cell.getData().APPR_STATUS).toUpperCase();
var MULTI_YN = fnc_checkNull(cell.getData().MULTI_YN);
var MULTI_MASTER_YN = fnc_checkNull(cell.getData().MULTI_MASTER_YN);
var MULTI_MASTER_OBJID = fnc_checkNull(cell.getData().MULTI_MASTER_OBJID);
var MULTI_MASTER_OBJID = fnc_checkNull(cell.getData().MULTI_MASTER_OBJID);
var status = fnc_checkNull(cell.getData().STATUS).toUpperCase();
if(!fnc_isEmpty(targetStatus) && "CREATE" != targetStatus && "CANCEL" != status //&& "REJECT" != targetStatus
&& (MULTI_YN != 'Y' || MULTI_YN == 'Y' && MULTI_MASTER_YN == 'Y' || MULTI_YN == 'Y' && MULTI_MASTER_YN == 'N' && targetStatus == 'COMPLETE') ){
fnc_approvalDetail(cell.getData().APPROVAL_OBJID, cell.getData().ROUTE_OBJID);
}
}},
/*
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '등록자', field : 'SPEC_WRITER_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '등록일', field : 'SPEC_REG_DATE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '상태', field : 'SPEC_STATUS_NAME' },
*/
{visible:false, headerHozAlign : 'center', hozAlign : 'right' , /* width : '90', */ title : '부가세포함공급가', field : "TOTAL_SUPPLY_UNIT_PRICE", formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, } },
{headerHozAlign : 'center', hozAlign : 'right' , /* width : '90', */ title : '공급가', field : "TOTAL_SUPPLY_PRICE", formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, } },
{headerHozAlign : 'center', hozAlign : 'right' , /* width : '90', */ title : '실공급가', field : "TOTAL_REAL_SUPPLY_PRICE", formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, } },
],
},
/*
{title:"단일", headerHozAlign:'center',
columns:[
{headerHozAlign : 'center', hozAlign : 'right' , width : '75', title : '공급가', field : "TOTAL_SUPPLY_PRICE" ,
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false, } },
],
},
*/
{title:"할인(NEGO)", headerHozAlign:'center', //고객정보
columns:[
{headerHozAlign : 'center', hozAlign : 'right' , width : '80', title : '할인금액', field : "DISCOUNT_PRICE_ALL", editable:editCheck, //DISCOUNT_PRICE
formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, },
editor:"number", editorParams:{
min:0, max:9999999999, maxlength:10,//step:10, mask:"999",
elementAttributes:{ maxlength:"10", pattern:"\d*",min:0, max:9999999999, oninput:"fnc_maxLengthCheck(this)" },
selectContents:true, verticalNavigation:"table", //up and down arrow keys navigate away from cell without changing value
}
},
{headerHozAlign : 'center', hozAlign : 'center', width : '85', title : '네고율(%)', field : "NEGO_RATE", headerSort:true,
editor:"number", editorParams:{
min:0, max:100, maxlength:3,//step:10, mask:"999",
elementAttributes:{ maxlength:"3", pattern:"\d*",min:0, max:100, oninput:"fnc_maxLengthCheck(this)" },
selectContents:true, verticalNavigation:"table", //up and down arrow keys navigate away from cell without changing value
}
},
{headerHozAlign : 'center', hozAlign : 'right' , /* width : '115', */ title : '할인공급가', field : "TOTAL_PRICE_ALL" , //TOTAL_PRICE
formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, } }, //NEGO_ORDER_PRICE
],
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'프로젝트번호', field:'PROJECT_NO',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell){
var orderNo = cell.getData().PROJECT_NO;
// 프로젝트 번호 클릭 시: 결재 정보 조회 모드 (saleNo에 "detail" 전달)
fn_openSaleRegPopup(orderNo, "detail");
}
},
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'구매유형', field:'PURCHASE_TYPE_NAME'},
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'주문유형', field:'CATEGORY_NAME'},
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'제품구분', field:'PRODUCT_NAME'},
{headerHozAlign:'center', hozAlign:'left', widthGrow:1.5, title:'품번', field:'PART_NO'},
{headerHozAlign:'center', hozAlign:'left', widthGrow:2, title:'품명', field:'PART_NAME'},
{headerHozAlign:'center', hozAlign:'left', widthGrow:1.5, title:'공급업체', field:'PARTNER_NAME'},
{headerHozAlign:'center', hozAlign:'right', widthGrow:1.2, title:'총액', field:'TOTAL_PRICE_ALL',
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false}
},
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'메일발송', field:'MAIL_SEND_YN'},
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'REGDATE'}
];
function editCheck (cell) {
@@ -538,29 +367,7 @@ function fn_search(){
$("#checkArr").val(checkArr);
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/purchaseOrder/purchaseOrderListPaging.do", columns, true, null, null, null, null, null, null, false, rowSelectionControl); //_tabul_layout_fitColumns _tabul_layout_fitDataStretch
//_tabulGrid.rowSelection = rowCheckControl;
//_tabulGrid.rowSelectionChanged = rowSelectionControl;
_tabulGrid.on("rowSelectionChanged", rowSelectionControl);
//_tabulGrid.selectable = false; //true
//_tabulGrid.selectRow();
//_tabulGrid.deselectRow();
/*
var rows = _tabulGrid.getRows();
rows.forEach(function (row) {
var rowData = row.getData();
//row.select(); // 활성화된 행은 선택됨
row.deselect(); // 비활성화된 행은 선택 취소됨
row.getElement().querySelector(".tabulator-row-select").disabled = true; // 비활성화된 행의 체크박스를 비활성화
// 선택된 행의 상태를 확인하고 활성화/비활성화를 설정
if (rowData.status === "active") {
row.getElement().style.backgroundColor = "green"; // 활성화된 행의 배경색을 변경
} else {
row.getElement().style.backgroundColor = "red"; // 비활성화된 행의 배경색을 변경
}
});
*/
var _sum=0;
var _sum2=0;
@@ -630,6 +437,13 @@ function rowCheckControl(row) {
return true; // 선택 활성화
}
function fn_openSaleRegPopup(orderNo, saleNo){
var popup_width = 1000;
var popup_height = 550;
// 한글 프로젝트 번호 인코딩 처리
var url = "/salesMgmt/salesRegForm.do?orderNo=" + encodeURIComponent(orderNo) + "&saleNo=" + (saleNo ? encodeURIComponent(saleNo) : "");
fn_centerPopup(popup_width, popup_height, url);
}
function fn_searchOld(){
document.form1.action = "/purchaseOrder/purchaseOrderList_new.do";
@@ -891,67 +705,29 @@ function col_custom_fmt_un(cellvalue, options, cell) {
</form>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="actionType" id="actionType">
<%--
<input type="hidden" name="countPerPage" id="countPerPage" value="${countPerPage }">
--%>
<div class="content-box" style="">
<div class="content-box-s">
<div class="plm_menu_name_gdnsi">
<h2>
<span>발주관리_발주관리</span>
<span><%=menuName%></span>
</h2>
<div class="btnArea">
<input type="button" class="plm_btns" value="발주서작성" id="btnReg">
<!-- <input type="button" class="plm_btns" value="발주서작성" id="btnReg">
<input type="button" class="plm_btns" value="복사" id="btnCopy">
<input type="button" class="plm_btns" value="결재상신" id="btnApproval">
<input type="button" class="plm_btns" value="취소" id="btnCancel">
<input type="button" class="plm_btns" value="삭제" id="btnDelete">
<input type="button" class="plm_btns" value="저장" id="btnSave">
<input type="button" class="plm_btns" value="저장" id="btnSave"> -->
<input type="button" class="plm_btns" value="발주서 송부" id="btnSend">
<input type="button" class="plm_btns" value="조회" id="btnSearch">
<!--
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
-->
</div>
</div>
<div id="plmSearchZon">
<table class="">
<!--
<colgroup>
<col width="70px">
<col width="*">
<col width="60px">
<col width="*">
<col width="80px">
<col width="*">
<col width="50px">
<col width="*">
<col width="60px">
<col width="*">
<col width="60px">
<col width="*">
<col width="60px">
<col width="7%">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
</colgroup>
-->
<tr>
<td><label for="Year">년도</label></td>
@@ -1042,30 +818,7 @@ function col_custom_fmt_un(cellvalue, options, cell) {
<div style="width:50%;float:left; color: RED;" class="purchaseOrderSum">
</div>
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
<%--
<section class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" class="plm_btns" value="결재상신" id="btnApproval">
<input type="button" class="plm_btns" value="삭제" id="btnDelete">
<input type="button" class="plm_btns" value="발주서작성" id="btnReg">
<input type="button" class="plm_btns" value="조회" id="btnSearch">
</div>
</div>
<div class="plm_table_wrap" style="overflow-x: auto;">
<table id="grid1"></table>
<!-- <div id="grid1Pager"></div> -->
<textarea style="width:0px; height:0px; visibility: hidden;" id="grid1Data">${LIST}<c:if test="${empty LIST}">[]</c:if></textarea><!-- [{},{},{}] -->
</div>
<div class="pdm_page">${PAGE_HTML}</div>
</section>
<textarea style="width:0px; height:0px; visibility: hidden;" id="jsonLevel3_csmCategory">${code_map.jsonLevel3_csmCategory}</textarea><!-- 코드동적설정 -->
--%>
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>

File diff suppressed because it is too large Load Diff

View File

@@ -119,14 +119,45 @@ $(document).ready(function(){
return false;
}
var status = fnc_checkNull(selectedRowIds[0].STATUS);
if(status != 'approvalComplete'){
var statusTitle = fnc_checkNull(selectedRowIds[0].STATUS_TITLE);
if(statusTitle != '결재완료'){
Swal.fire("결재완료 상태만 발주서 생성이 가능합니다.");
return false;
}
// TODO: 발주서 생성 로직 구현
Swal.fire("발주서 생성 기능은 준비 중입니다.");
Swal.fire({
title: '발주서를 작성 하시겠습니까?',
text: '',
icon: 'warning',
showCancelButton: true, // cancel버튼 보이기. 기본은 원래 없음
confirmButtonColor: '#3085d6', // confrim 버튼 색깔 지정
cancelButtonColor: '#d33', // cancel 버튼 색깔 지정
confirmButtonText: '확인', // confirm 버튼 텍스트 지정
cancelButtonText: '취소', // cancel 버튼 텍스트 지정
reverseButtons: false, // 버튼 순서 거꾸로
}).then(result => {
// 만약 Promise리턴을 받으면,
if (result.isConfirmed) { // 만약 모달창에서 confirm 버튼을 눌렀다면
$.ajax({
url:"/purchaseOrder/purchaseOrder_salesRequest_Save.do"
,type:"POST"
,data: $("#form1").serialize() + "&jqGrid="+ encodeURIComponent(JSON.stringify(selectedRowIds))
,dataType:"json"
,success:function(data){
if(data =="SUCCESS"){
alert("저장되었습니다.");
};
/* if(typeof opener.fn_search =="function"){ opener.fn_search() }; */
fn_search();
//self.close();
}
,error: function(jqxhr, status, error){
}
});
}
});
});
fn_search();