- Add Docker Compose configurations for dev, prod, and standalone environments - Add database initialization scripts (init-db.sh, init-db-docker.sh) - Add enhanced start-docker-linux.sh with DB init support - Add comprehensive database initialization guide - Support for automatic dbexport.pgsql import on first run - Include safety checks for production environment
1007 lines
36 KiB
Plaintext
1007 lines
36 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file="/init_jqGrid.jsp"%>
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
<%
|
|
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
|
String userId = CommonUtils.checkNull(person.getUserId());
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
</head>
|
|
<script>
|
|
var grid;
|
|
|
|
$(document).ready(function(){
|
|
|
|
var custcd = $("#custcd").val();
|
|
var year = "${ecrInfo.YEAR}";
|
|
var PRODUCT_CODE_READY = $("#PRODUCT_CODE_READY").val();
|
|
|
|
fnc_AsContractYearList(custcd,"year", year);
|
|
|
|
fnc_AsproductList(year,custcd,"product_code", PRODUCT_CODE_READY);
|
|
|
|
|
|
$('input:radio[name="payment_type1"]:input[value="${ecrInfo.PAYMENT_TYPE}"]').prop("checked", true);
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
fnc_setFileDropZone("ecrDropZone", "${ecrInfo.OBJID}", "ECR_ATTACH_01", "ECR이미지01", "fileAreaDraw",false,null,null);
|
|
fnc_setFileDropZone("ecr1DropZone", "${ecrInfo.OBJID}", "ECR_ATTACH_02", "ECR이미지02", "fileAreaDraw",false,null,null);
|
|
|
|
fnc_setFileDropZone("MasterFileDropZone", "${ecrInfo.OBJID}", "AS_DOC", "AS_DOC", "fileAreaDraw",false,null,null);
|
|
|
|
fileAreaDraw();
|
|
|
|
fn_getApprovalLine();
|
|
|
|
$('.select2').select2();
|
|
|
|
|
|
$("#btnAdd").click(function(){
|
|
fn_openPartMngListPopUp();
|
|
});
|
|
|
|
$("#workingtime").change(function(){
|
|
var workingtime = this.value;
|
|
var wage = $("#wage").val();
|
|
var part_price = $("#part_price").val();
|
|
|
|
var price1 = parseInt((workingtime*wage));
|
|
$("#_price1").text(price1);
|
|
$("#price1").val(price1);
|
|
|
|
var price2 = (parseInt(price1) + parseInt(part_price)) * 0.1;
|
|
$("#_price2").text(price2);
|
|
$("#price2").val(price2);
|
|
|
|
var price3 = (parseInt(price1)+parseInt(part_price)+parseInt(price2)) * 0.1;
|
|
|
|
var total= parseInt(price1) + parseInt(price2) + parseInt(price3) + parseInt(part_price);
|
|
$("#_price3").text(price3);
|
|
$("#price3").val(price3);
|
|
|
|
$("#_total_price").text(total);
|
|
$("#total_price").val(total);
|
|
});
|
|
|
|
$("#wage").change(function(){
|
|
var workingtime = $("#workingtime").val();
|
|
var wage = this.value;
|
|
var part_price = $("#part_price").val();
|
|
|
|
var price1 = parseInt((workingtime*wage));
|
|
$("#_price1").text(price1);
|
|
$("#price1").val(price1);
|
|
|
|
var price2 = (parseInt(price1) + parseInt(part_price)) * 0.1;
|
|
$("#_price2").text(price2);
|
|
$("#price2").val(price2);
|
|
|
|
var price3 = (parseInt(price1)+parseInt(part_price)+parseInt(price2)) * 0.1;
|
|
|
|
var total= parseInt(price1) + parseInt(price2) + parseInt(price3) + parseInt(part_price);
|
|
$("#_price3").text(price3);
|
|
$("#price3").val(price3);
|
|
|
|
$("#_total_price").text(total);
|
|
$("#total_price").val(total);
|
|
|
|
});
|
|
|
|
|
|
$("#part_price").change(function(){
|
|
var workingtime = $("#workingtime").val();
|
|
var wage = $("#wage").val();
|
|
var part_price = this.value;
|
|
|
|
var price1 = parseInt((workingtime*wage));
|
|
$("#_price1").text(price1);
|
|
$("#price1").val(price1);
|
|
|
|
var price2 = (parseInt(price1) + parseInt(part_price)) * 0.1;
|
|
$("#_price2").text(price2);
|
|
$("#price2").val(price2);
|
|
|
|
var price3 = (parseInt(price1)+parseInt(part_price)+parseInt(price2)) * 0.1;
|
|
|
|
var total= parseInt(price1) + parseInt(price2) + parseInt(price3) + parseInt(part_price);
|
|
$("#_price3").text(price3);
|
|
$("#price3").val(price3);
|
|
|
|
$("#_total_price").text(total);
|
|
$("#total_price").val(total);
|
|
});
|
|
|
|
|
|
$("#custcd").change(function(){
|
|
$("#inoutdate").text("");
|
|
$("#release_date").val("");
|
|
|
|
$("#pshellno").text("");
|
|
$("#car_number").val("");
|
|
|
|
$("#goodsguarantee").text("");
|
|
$("#paid_free").val("");
|
|
|
|
fnc_AsproductList(this.value,"product_code", "");
|
|
});
|
|
|
|
$("#product_code").change(function(){
|
|
|
|
$("#inoutdate").text("");
|
|
$("#release_date").val("");
|
|
|
|
$("#pshellno").text("");
|
|
$("#car_number").val("");
|
|
|
|
$("#goodsguarantee").text("");
|
|
$("#paid_free").val("");
|
|
|
|
|
|
var GOODSCD = $("#product_code option:selected").attr("id");
|
|
var PSHELLNO = $("#product_code option:selected").attr("data-pshellno"); //차량번호
|
|
var GOODSGUARANTEE = $("#product_code option:selected").attr("data-goodsguarantee"); //보증기간
|
|
var INOUTDATE = $("#product_code option:selected").attr("data-inoutdate"); //출고일
|
|
|
|
$("#inoutdate").text(INOUTDATE);
|
|
$("#release_date").val(INOUTDATE);
|
|
|
|
$("#pshellno").text(PSHELLNO);
|
|
$("#car_number").val(PSHELLNO);
|
|
|
|
$("#goodsguarantee").text(GOODSGUARANTEE);
|
|
$("#paid_free").val(GOODSGUARANTEE);
|
|
//Swal.fire(GOODSCD +'/'+PSHELLNO+'/'+GOODSGUARANTEE+'/'+INOUTDATE);
|
|
//fnc_getProductUPGPARTList(this.value,"part_objid", "");
|
|
});
|
|
|
|
if("${ecrInfo.CUSTCD}"!=""){
|
|
fnc_AsproductList("${ecrInfo.CUSTCD}","product_code", "");
|
|
$("#product_code").val("${ecrInfo.PRODUCT_CODE}");
|
|
}
|
|
_fnc_datepick();
|
|
|
|
$('input').prop('readonly', true);
|
|
$('input').prop('disabled', true);
|
|
|
|
$('select').prop('readonly', true);
|
|
$('select').prop('disabled', true);
|
|
|
|
$('textarea').prop('readonly', true);
|
|
$('textarea').prop('disabled', true);
|
|
|
|
|
|
$('#btnClose').prop('readonly', false);
|
|
$('#btnClose').prop('disabled', false);
|
|
|
|
|
|
grid = $("#expenseDetailGrid").jqGrid({
|
|
url: ""
|
|
,datatype: "local"
|
|
,colNames: ["OBJID","품번","품명","규격","수량","단가","공급가","비고"]
|
|
,colModel: [
|
|
{name:"OBJID",index:"OBJID", width: 0, align:"center", hidden: true, sortable:false, editable:true}
|
|
,{name:"PART_NO",index:"PART_NO", width: 200, align:"center", hidden: false, sortable:false, editable:false
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"PART_NAME",index:"PART_NAME", width: 200, align:"center", hidden: false, sortable:false, editable:false
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"SPEC",index:"SPEC", width: 150, align:"center", hidden: false, sortable:false, editable:false
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"QTY" ,index:"QTY" , width:80, align: "center", hidden:false, sortable:false, editable: true
|
|
,formatter: "integer", formatoptions:{thousandsSeparator:","}
|
|
,editoptions:{
|
|
dataEvents: [
|
|
{type:"change", fn:function(e) {
|
|
//var rowid = grid.jqGrid('getGridParam','selrow');
|
|
var rowid = this.id.replace("_QTY","");
|
|
var rowData = grid.getRowData(rowid);
|
|
var cell1 = this.value;
|
|
var cell2 = rowData.PRICE;
|
|
var newValue = cell1 * cell2;
|
|
grid.jqGrid('setCell', rowid, 'UNIT_PRICE', newValue);
|
|
gridFn.footerSummary();
|
|
}}
|
|
]
|
|
,dataInit: function(e){
|
|
e.style.textAlign = "right";
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"PRICE",index:"PRICE", width: 150, align:"right", hidden: false, sortable:false, editable:false ,formatter: "integer", formatoptions:{thousandsSeparator:","}}
|
|
,{name:"SUP_PRICE",index:"SUP_PRICE", width: 150, align:"right", hidden: false, sortable:false, editable:false ,formatter: "integer", formatoptions:{thousandsSeparator:","}}
|
|
,{name:"NOTE",index:"NOTE", width: 300, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
|
|
]
|
|
,rownumbers : true
|
|
,viewrecords : true
|
|
,height : 150
|
|
,multiselect : true
|
|
,shrinkToFit : false
|
|
,autowidth : true
|
|
,sortable : false
|
|
,rowNum : 10000
|
|
,forceFit : false //컬럼의 width를 변화시킬때 그리드의 width를 고정 여부
|
|
,jsonReader : {repeatitems: false}
|
|
,mtype :"POST"
|
|
,footerrow : false //바닥합계
|
|
,userDataOnFooter: true //바닥합계
|
|
,loadComplete: function(){
|
|
//footer 커스텀..
|
|
|
|
}
|
|
});
|
|
|
|
gridFn.search();
|
|
|
|
gridFn.closeEdit();
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
var gridFn = {
|
|
addRow : function() {
|
|
var newId = grid.getGridParam("reccount")+1;
|
|
var addData = {
|
|
"OBJID": "",
|
|
"PRODUCT_TITLE" : "",
|
|
"STANDARD" : "",
|
|
"UNIT" : "",
|
|
"QTY" : "",
|
|
"PRICE" : "",
|
|
"UNIT_PRICE" : ""
|
|
};
|
|
grid.addRowData(newId, addData);
|
|
grid.jqGrid("editRow", newId);
|
|
},
|
|
opennEdit : function() { //수정가능
|
|
var ids = grid.jqGrid("getDataIDs");
|
|
for (var i = 0; i < ids.length; i++) {
|
|
grid.jqGrid("editRow",ids[i]);
|
|
}
|
|
}
|
|
,closeEdit : function() { //수정불가
|
|
var ids = grid.jqGrid("getDataIDs");
|
|
for (var i = 0; i < ids.length; i++) {
|
|
grid.jqGrid("saveRow", ids[i], /*successFunction*/null, /*url*/"clientArray"/*, extraparam, aftersavefunc,errorfunc, afterrestorefunc*/);
|
|
}
|
|
}
|
|
,delRow : function(){
|
|
var selectedRowIds = grid.jqGrid("getGridParam","selarrrow");
|
|
if(selectedRowIds.length==0){
|
|
Swal.fire("삭제할 행을 선택해주십시오.");
|
|
return false;
|
|
}
|
|
for(var i = selectedRowIds.length - 1; i >= 0; i--){
|
|
grid.delRowData(selectedRowIds[i]);
|
|
}
|
|
}
|
|
,search : function() {
|
|
grid.setGridParam({
|
|
url: "/as/searchPartMgmt.do"
|
|
,datatype : "json"
|
|
,postData : $("#form1").serialize()
|
|
,loadComplete : function(data) {
|
|
gridFn.footerSummary();
|
|
}
|
|
,gridComplete : function() {
|
|
gridFn.opennEdit(); //수정가능
|
|
}
|
|
}).trigger("reloadGrid");
|
|
grid.setGridParam({url: "", datatype : "local"});
|
|
}
|
|
,footerSummary: function(){ //자동합계
|
|
var ids = grid.jqGrid("getDataIDs");
|
|
var total =0;
|
|
for (var i = 0; i < ids.length; i++) {
|
|
if($.isNumeric(grid.jqGrid('getCell', i+1, 'UNIT_PRICE'))){
|
|
//Swal.fire(parseInt(grid.jqGrid('getCell', i+1, 'UNIT_PRICE')));
|
|
total = parseInt(total) + parseInt(grid.jqGrid('getCell', i+1, 'UNIT_PRICE'));
|
|
}
|
|
|
|
}
|
|
|
|
/* $("#total").text(total);
|
|
$("#final_order_amount").val(total); */
|
|
}
|
|
}
|
|
|
|
function fn_openPartMngListPopUp(){
|
|
var hiddenForm = document.hiddenForm;
|
|
|
|
var target = "partMngListPopUp";
|
|
var url = "/as/partMngListPopUp.do?OBJID="+ ${ecrInfo.OBJID};
|
|
window.open("",target,"width=1400,height=800");
|
|
|
|
hiddenForm.OBJID.value = "${ecrInfo.OBJID}";
|
|
hiddenForm.action = url;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function _fnc_datepick(){
|
|
var $dateinput = $("input");
|
|
|
|
for(var i=0; i<$dateinput.length; i++){
|
|
var id = $dateinput.eq(i).attr("id");
|
|
|
|
if(id != null){
|
|
if(id.indexOf("Date")>-1 || id.indexOf("date")>-1 || id.indexOf("DATE")>-1){
|
|
$dateinput.eq(i).attr("size","10");
|
|
$dateinput.eq(i).datepicker({
|
|
changeMonth:true,
|
|
changeYear:true
|
|
});
|
|
}else{
|
|
$dateinput.eq(i).attr("size","10");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//결재정보를 가져온다.
|
|
function fn_getApprovalLine(){
|
|
var scheduleList = new Array();
|
|
|
|
<c:forEach items="${approvalList}" var="approvalItem">
|
|
var seq = "${approvalItem.SEQ}";
|
|
var targetUserName = "${approvalItem.TARGET_USER_NAME}";
|
|
var procDate = "${approvalItem.PROC_DATE}";
|
|
|
|
if(1 == seq){
|
|
$("#reviewerName").append(targetUserName);
|
|
$("#reviewerDate").append(procDate);
|
|
}
|
|
|
|
if(2 == seq){
|
|
$("#confirmName").append(targetUserName);
|
|
$("#confirmDate").append(procDate);
|
|
}
|
|
</c:forEach>
|
|
}
|
|
|
|
function fileAreaDraw(){
|
|
fn_fileCallback1("Master","AS_DOC");
|
|
fn_Img_fileCallback("ecrAttach","ECR_ATTACH_01");
|
|
fn_Img_fileCallback("ecrAttach1","ECR_ATTACH_02");
|
|
|
|
}
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback1(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${ecrInfo.OBJID}", "docType":fileType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
//첨부파일 목록 영역 show
|
|
$("#"+areaId+"FileArea").empty();
|
|
|
|
if(0 < $("#"+areaId+"DefaultRow").length){
|
|
$("#"+areaId+"DefaultRow").hide();
|
|
}
|
|
|
|
$.each(data, function(i){
|
|
|
|
var appendText = "";
|
|
if("Master" == areaId){
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
appendText += "<colgroup>";
|
|
appendText +=" <col width='10%'>";
|
|
appendText +=" <col width='70%'>";
|
|
appendText +=" <col width='20%'>";
|
|
appendText +=" </colgroup>";
|
|
appendText+= "<tr>";
|
|
appendText+= " <td>"+[i+1]+"</td>";
|
|
appendText+= " <td class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
/* <c:if test="${param.actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
</c:if> */
|
|
appendText+= "</td>";
|
|
appendText+= " <td>"+data[i].REGDATE+"</td>";
|
|
appendText+= "</tr>";
|
|
}
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#"+areaId+"DropZone").show();
|
|
$("#"+areaId+"AttachFileList").hide();
|
|
$("#"+areaId+"FileArea").empty();
|
|
var appendText = "";
|
|
appendText += "<tr>";
|
|
appendText += "<td>첨부 파일이 없습니다.</td>";
|
|
appendText +="</tr>";
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_Img_fileCallback(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${ecrInfo.OBJID}", "docType":fileType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
|
|
//첨부파일 목록 영역 show
|
|
$("#"+areaId+"FileArea").empty();
|
|
|
|
if(0 < $("#"+areaId+"DefaultRow").length){
|
|
$("#"+areaId+"DefaultRow").hide();
|
|
}
|
|
|
|
$.each(data, function(i){
|
|
|
|
var appendText = "";
|
|
if("ecrAttach" == areaId){
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+data[i].REAL_FILE_NAME+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
|
|
appendText+= "<img src='"+srcLocation+"' style='width:96% !important; height:132px; margin:0;padding:0;' onclick=\"openImagePopUp(this.src)\" style='cursor:pointer;' />";
|
|
|
|
appendText+= " <div class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
/* <c:if test="${param.actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
</c:if> */
|
|
appendText+= "</div>";
|
|
//$("#ecrDropZone").hide();
|
|
} else if("ecrAttach1" == areaId){
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+data[i].REAL_FILE_NAME+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
|
|
appendText+= "<img src='"+srcLocation+"' style='width:96% !important; height:132px; margin:0;padding:0;' onclick=\"openImagePopUp(this.src)\" style='cursor:pointer;' />";
|
|
appendText+= " <div class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
/* <c:if test="${param.actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
</c:if> */
|
|
appendText+= "</div>";
|
|
//$("#ecr1DropZone").hide();
|
|
}
|
|
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#"+areaId+"DropZone").show();
|
|
$("#"+areaId+"AttachFileList").hide();
|
|
$("#"+areaId+"FileArea").empty();
|
|
/* var appendText = "";
|
|
appendText += "<tr>";
|
|
appendText += "<td>첨부 파일이 없습니다.</td>";
|
|
appendText +="</tr>";
|
|
$("#"+areaId+"FileArea").append(appendText); */
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
|
|
function openImagePopUp(url){
|
|
var img=new Image();
|
|
img.src=url;
|
|
var img_width=img.width;
|
|
var img_height=img.height;
|
|
var win_width=img.width+25;
|
|
var height=img.height+30;
|
|
|
|
window.open(url,"problemImgPopUp","width="+img_width+",height="+height+", menubars=no, scrollbars=yes'");
|
|
}
|
|
|
|
/*첨부 파일 삭제 */
|
|
function fileDelete(fileObjId,areaId){
|
|
var type =areaId;
|
|
if(confirm("파일을 삭제하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/common/deleteFileInfo.do",
|
|
type:"POST",
|
|
data:{"objId":fileObjId},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
fileAreaDraw();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_save(){
|
|
if(fnc_validate('form1')){
|
|
if(confirm("저장하시겠습니까?")){
|
|
var rec_codeArr = new Array();
|
|
$('input:checkbox[name="rec_type"]').each(function() {
|
|
if(this.checked){//checked 처리된 항목의 값
|
|
rec_codeArr.push(this.value);
|
|
}
|
|
});
|
|
$("#rec_type_codeArr").val(rec_codeArr);
|
|
|
|
$("#payment_type").val($('input:radio[name="payment_type1"]:checked').val());
|
|
/* Swal.fire(request_codeArr);
|
|
return; */
|
|
$.ajax({
|
|
url:"/as/saveas.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
Swal.fire(data.message);
|
|
opener.fn_search();
|
|
self.close();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
}
|
|
</script>
|
|
<style>
|
|
.input_title {border-left:1px solid #ccc;}
|
|
.input_sub_title {border-left:1px solid #ccc;}
|
|
.pmsPopupForm tr:last-child td{border-bottom:1px solid #ccc;}
|
|
</style>
|
|
<body>
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
|
</form>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${ecrInfo.OBJID}">
|
|
<input type="hidden" name="PRODUCT_CODE_READY" id="PRODUCT_CODE_READY" value="${ecrInfo.PRODUCT_CODE}">
|
|
<input type="hidden" name="rec_type_codeArr" id="rec_type_codeArr">
|
|
<input type="hidden" name="payment_type" id="payment_type">
|
|
<section>
|
|
<div class="plm_menu_name" style="display:flex;">
|
|
<h2 style="width:50%;text-align:center;margin-top:20px;">
|
|
<span style="font-size:30px;">A/S접수 및 처리</span>
|
|
</h2>
|
|
<table class="pmsPopupForm" style="width:50%;background:white;">
|
|
<colgroup>
|
|
<col width="20%">
|
|
<col width="20%">
|
|
<col width="20%">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
|
<td class="input_title" rowspan="3" style="text-align:center;">
|
|
<label>결재</label>
|
|
</td>
|
|
<td class="input_title" style="text-align:center;">
|
|
<label>작성자</label>
|
|
</td>
|
|
<td class="input_title" style="text-align:center;">
|
|
<label>검토</label>
|
|
</td>
|
|
<td class="input_title" style="text-align:center;">
|
|
<label>승인</label>
|
|
</td>
|
|
</tr>
|
|
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;">
|
|
<td class="input_sub_title" style="text-align:center;">
|
|
${ecrInfo.WRITER}<!-- 작성자이름 -->
|
|
</td>
|
|
<td class="input_sub_title" style="text-align:center;" id="reviewerName"></td>
|
|
<td class="input_sub_title" style="text-align:center;" id="confirmName"></td>
|
|
</tr>
|
|
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
|
<td class="input_sub_title" style="text-align:center;">
|
|
${ecrInfo.REG_DATE}<!-- 작성일자 -->
|
|
</td>
|
|
<td class="input_sub_title" style="text-align:center;" id="reviewerDate"></td>
|
|
<td class="input_sub_title" style="text-align:center;" id="confirmDate"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">고객명</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="custcd" id="custcd" required reqTitle="고객명" type="select" class="select2">
|
|
<option value="">전체</option>
|
|
${code_map.custcd}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">년도</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="year" id="year" class="select2">
|
|
<option value="">선택</option>
|
|
<c:forEach begin="${sysYear-7}" end="${sysYear}" var="req_year">
|
|
<option value="${req_year}"${ecrInfo.YEAR eq req_year ? 'selected':'' }>${req_year}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">계약제품</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
<select name="product_code" id="product_code" class="select2">
|
|
<option value="">전체</option>
|
|
</select>
|
|
</td>
|
|
|
|
|
|
<td class="input_title">
|
|
<label for="">AS NO</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
${ecrInfo.AS_NO}
|
|
</td>
|
|
|
|
<!-- <td class="input_title"> -->
|
|
<!-- <label for="">정비업체명</label> -->
|
|
<!-- </td> -->
|
|
<!-- <td class="input_sub_title" colspan="2"> -->
|
|
<!-- <select name="maintenance" id="maintenance" required reqTitle=정비업체명 type="select" class="select2"> -->
|
|
<!-- <option value="">전체</option> -->
|
|
<%-- ${code_map.maintenance} --%>
|
|
<!-- </select> -->
|
|
<!-- </td> -->
|
|
|
|
<td class="input_title">
|
|
<label for="">요금지불방식</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="2">
|
|
<select name="payment_type1" id="payment_type1" required reqTitle="요금지불방식" type="select" class="select2">
|
|
<option value="">전체</option>
|
|
${code_map.payment_type}
|
|
</select>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
|
|
<td class="input_title">
|
|
<label for="">출고일자</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<span id="inoutdate">${ecrInfo.RELEASE_DATE}</span>
|
|
<input type="hidden" name="release_date" id="release_date" value="${ecrInfo.RELEASE_DATE}">
|
|
</td>
|
|
<%-- <td class="input_title">
|
|
<label for="">자동차번호</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<span id="pshellno">${ecrInfo.CAR_NUMBER}</span>
|
|
<input type="hidden" name="car_number" id="car_number" value="${ecrInfo.CAR_NUMBER}">
|
|
</td> --%>
|
|
<td class="input_title">
|
|
<label for="">S/N</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<span id="pshellno">${ecrInfo.SN_NO}</span>
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">보증기간</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<span id="goodsguarantee">${ecrInfo.PAID_FREE}</span>
|
|
<input type="hidden" name="paid_free" id="paid_free" value="${ecrInfo.PAID_FREE}">
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">연락처</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="phone" id="phone" value="${ecrInfo.PHONE}">
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">수리완료예정일</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="plan_date" id="plan_date" value="${ecrInfo.PLAN_DATE}">
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">접수유형</label>
|
|
</td>
|
|
|
|
<td class="input_sub_title" colspan="7" style="word-spacing: 10px;">
|
|
${code_map.rec_type}
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">유/무상</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="2">
|
|
<select name="warranty_code" id="warranty_code" required reqTitle=유/무상 type="select" class="select2">
|
|
<option value="">전체</option>
|
|
${code_map.warranty_code}
|
|
</select>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<table class="pmsPopupForm" style="border:3px solid #000000;">
|
|
<tr>
|
|
<td style="border-right:1px solid #000000;text-align:center;" >
|
|
<span>문제점(현상)</span>
|
|
<textarea placeholder="문제점(현상)" id="problem_contents" name="problem_contents" style="border:3px solid #ccc; width:100%; height:150px;">${ecrInfo.PROBLEM_CONTENTS}</textarea>
|
|
</td>
|
|
<td style="border-right:1px solid #000000;text-align:center;" >
|
|
<!-- <div id="ecrDropZone" class="dropzone" style="width:98% !important; height:30px; margin:0;padding:0; line-height: 30px;">Drag & Drop Image Files Here</div> -->
|
|
<div id="ecrAttachFileArea"></div>
|
|
</td>
|
|
|
|
<td style="border-right:1px solid #000000;text-align:center;" >
|
|
<span>작업내용</span>
|
|
<textarea placeholder="작업내용" id="action_contents" name="action_contents" style="border:3px solid #ccc; width:100%; height:150px;">${ecrInfo.ACTION_CONTENTS}</textarea>
|
|
</td>
|
|
|
|
<td style="border-right:1px solid #000000;text-align:center;">
|
|
|
|
<!-- <div id="ecr1DropZone" class="dropzone" style="width:98% !important; height:30px; margin:0;padding:0; line-height: 30px;">Drag & Drop Image Files Here</div> -->
|
|
<div id="ecrAttach1FileArea"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!--
|
|
<table style="width: 100%;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="90%">
|
|
</colgroup>
|
|
<tr>
|
|
<td><h3>사용부품</h3></td>
|
|
</tr>
|
|
</table>
|
|
<div id="plm_table_wrap1" style="padding:0 8 0 8;">
|
|
<div style="">
|
|
<div style="height: 170px;">
|
|
<table id="expenseDetailGrid""></table>
|
|
<div id="jqGridPager"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="btn_wrap">
|
|
|
|
</div>
|
|
-->
|
|
|
|
<%--
|
|
<table class="pmsPopupForm" style="margin-top: 10px;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
</colgroup>
|
|
<tr>
|
|
<td colspan="5"><label for="">작업시간(Hr)</label></td>
|
|
<td rowspan="10"></td><!-- 빈공간 -->
|
|
<td colspan="1"><label for="">요금지불방식</label></td>
|
|
<td colspan="2"><label for="">무상사유</label></td>
|
|
</tr>
|
|
<tr style="border-top:3px solid #000000;">
|
|
<td class="input_title" style="border-left:3px solid #000000; text-align: center;">시작일</td>
|
|
<td class="input_title" style="text-align: center;">종료일</td>
|
|
<td class="input_title" style="text-align: center;">작업시간</td>
|
|
<td class="input_title" colspan="2" style="border-right:3px solid #000000;text-align: center;">임단가</td>
|
|
|
|
<td rowspan="5" style="border:3px solid #000000;">
|
|
<input type="radio" name="payment_type1" id="payment_type1" value="0000149" checked> 현금<br>
|
|
<input type="radio" name="payment_type1" id="payment_type1" value="0000149"> 카드<br>
|
|
<input type="radio" name="payment_type1" id="payment_type1" value="0000149"> 계좌이체<br>
|
|
<input type="radio" name="payment_type1" id="payment_type1" value="0000150"> 미수<br>
|
|
<input type="radio" name="payment_type1" id="payment_type1" value="0000151"> 세금계산서
|
|
<select name="payment_type" id="payment_type" required reqTitle="요금지불방식" type="select" class="select2">
|
|
<option value="">전체</option>
|
|
${code_map.payment_type}
|
|
</select>
|
|
</td> <!-- 요금지불방식 선택박스 -->
|
|
<td rowspan="5" colspan="2" style="border:3px solid #000000;">
|
|
|
|
<textarea placeholder="무상사유" id="free_contents" name="free_contents" style="border:3px solid #ccc; width:100%; height:100px;">${ecrInfo.FREE_CONTENTS}</textarea>
|
|
</td> <!-- 무상사유 입력 -->
|
|
</tr>
|
|
<tr style="border-bottom:3px solid #000000;">
|
|
<td style="border-left:3px solid #000000;"><input type="text" style="text-align: center;" autocomplete="off" name="start_date" id="start_date" value="${ecrInfo.START_DATE}"></td> <!-- 작업시작 시작일 선택 -->
|
|
<td><input type="text" style="text-align: center;" name="end_date" id="end_date" autocomplete="off" value="${ecrInfo.END_DATE}"></td> <!-- 작업시간 종료일 선택 -->
|
|
<td style="text-align: center;"><input type="number" style="text-align: center;" name="workingtime" id="workingtime" autocomplete="off" value="${ecrInfo.WORKINGTIME}"><fmt:formatNumber value="${ecrInfo.WORKINGTIME}" pattern="#,###" /></td> <!-- 작업시간 작업시간 입력 -->
|
|
<td colspan="2" style="border-right:3px solid #000000; text-align: center;"><input type="number" style="text-align: center;" name="wage" id="wage" value="${ecrInfo.WAGE}"><fmt:formatNumber value="${ecrInfo.WAGE}" pattern="#,###" /></td> <!-- 작업시간 임단가 입력 -->
|
|
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5"><label for="">발생비용(원)</label></td>
|
|
</tr>
|
|
<tr style="border-top:3px solid #000000;">
|
|
<td class="input_title" style="border-left:3px solid #000000; text-align: center;">부품가격</td>
|
|
<td class="input_title" style="text-align: center;">공임</td>
|
|
<td class="input_title" style="text-align: center;">기술료(%)</td>
|
|
<td class="input_title" style="text-align: center;">부가세(%)</td>
|
|
<td class="input_title" style="border-right:3px solid #000000; text-align: center;">합계</td>
|
|
</tr>
|
|
<tr style="border-bottom:3px solid #000000;">
|
|
<td style="border-left:3px solid #000000; text-align: center;"><input type="number" style="text-align: center;" name="part_price" id="part_price" value="${ecrInfo.PART_PRICE}"><fmt:formatNumber value="${ecrInfo.PART_PRICE}" pattern="#,###" /></td> <!-- 부품가격 입력 -->
|
|
<td style="text-align: center;"><input type="hidden" name="price1" id="price1" value="${ecrInfo.PRICE1}"><span id="_price1">${ecrInfo.PRICE1}</span><fmt:formatNumber value="${ecrInfo.PRICE1}" pattern="#,###" /></td> <!-- 부품가격 공임 -->
|
|
<td style="text-align: center;"><input type="hidden" name="price2" id="price2" value="${ecrInfo.PRICE2}"><span id="_price2">${ecrInfo.PRICE2}</span><fmt:formatNumber value="${ecrInfo.PRICE2}" pattern="#,###" /></td> <!-- 부품가격 기술료 -->
|
|
<td style="text-align: center;"><input type="hidden" name="price3" id="price3" value="${ecrInfo.PRICE1}"><span id="_price3">${ecrInfo.PRICE3}</span><fmt:formatNumber value="${ecrInfo.PRICE3}" pattern="#,###" /></td> <!-- 부품가격 부가세 -->
|
|
<td style="border-right:3px solid #000000; text-align: center;"><input type="hidden" name="total_price" id="total_price" value="${ecrInfo.TOTAL_PRICE}"><span id="_total_price"><fmt:formatNumber value="${ecrInfo.TOTAL_PRICE}" pattern="#,###" /></span></td> <!-- 부품가격 합계 -->
|
|
</tr>
|
|
|
|
<tr style="border-bottom:3px solid #000000;">
|
|
<td colspan="5"><label for="">고객확인</label></td>
|
|
<td colspan="3"><label for="">서비스엔지니어(날인)</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="3" colspan="4" style="border-left:3px solid #000000; border-bottom:3px solid #000000; border-right: solid 1px #ccc; text-align: center;">부품교환 등 본인이 요구하는 모든 사항이 정확히 이행되어 이상 없음을 확인합니다.</td>
|
|
<td rowspan="2" style="border-right:3px solid #000000; text-align: center;"><br><span id="customer_name"></span></td> <!-- 고객명/상호명 자동 -->
|
|
<td rowspan="3" colspan="2" style="border:3px solid #000000;text-align:center;">
|
|
<%=userId%>
|
|
${ecrInfo.WRITER_NAME}</td> <!-- 서비스 엔지니어날인 등록자 자동 -->
|
|
<td rowspan="3" colspan="1" style="border:3px solid #000000; text-align: center;">Date<br><input type="text" style="text-align: center;" name="as_date" id="as_date" value="${ecrInfo.AS_DATE}"></td> <!-- 서비스 엔지니어날인 Date 선택 -->
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
<tr>
|
|
<td style="border-bottom:3px solid #000000; border-right:3px solid #000000;"><input type="text" style="text-align: center;" name="req_date" id="req_date" value="${ecrInfo.REQ_DATE}"></td> <!-- 고객명/상호명 DATE 선택 -->
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5">※ 주의 : A/S 정비후 고객님께서는 필히 이상 유,무를 체크하여 주시기 바랍니다.</td>
|
|
<td colspan="4" style="text-align: right;">중소기업, 지톤그룹-청주공장, 626-052323-01-011</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">첨부파일</label>
|
|
</td>
|
|
<td colspan="8">
|
|
<!-- <div id="MasterFileDropZone" class="dropzone"style="width:99% !important;">Drag & Drop Files Here</div> -->
|
|
<div class="project_form_in_table"style="width:100%" id="MasterFileAreaTable" >
|
|
<div style="overflow-y:scroll;">
|
|
<table class=""fileListscrollThead"" style="width:100%;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="70%">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>No</td>
|
|
<td>첨부파일명</td>
|
|
<td>등록일</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="height:45px;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
</table>
|
|
<table id="MasterFileArea" class="fileListscrollTbody">
|
|
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
--%>
|
|
<table class="pmsPopupForm" style="margin-top: 10px;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
</colgroup>
|
|
<tr>
|
|
<td colspan="2"><label for="">작업시간(Hr)</label></td>
|
|
<td rowspan="3" colspan="7"></td><!-- 빈공간 -->
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" style="border-top:3px solid #000000; border-left:3px solid #000000; text-align: center;">작업시간</td>
|
|
<td class="input_title" style="border-top:3px solid #000000; border-right:3px solid #000000; text-align: center;">공임</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="border-bottom:3px solid #000000; border-left:3px solid #000000;">
|
|
<input type="number" style="text-align: center;" name="workingtime" id="workingtime" autocomplete="off" value="${ecrInfo.WORKINGTIME}">
|
|
</td>
|
|
<td style="border-bottom:3px solid #000000; border-right:3px solid #000000;">
|
|
<input type="number" style="text-align: center;" name="total_price" id="total_price" autocomplete="off" value="${ecrInfo.TOTAL_PRICE}">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |