판매 등록디자인일관성 수정
This commit is contained in:
@@ -1,179 +1,183 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ include file="/init_new.jsp" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@include file="/init_new.jsp"%>
|
||||
<%
|
||||
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>판매 등록</title>
|
||||
<link rel="stylesheet" href="/css/ions-basic.css">
|
||||
<script type="text/javascript" src="/js/ions-common.js" ></script>
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
<script type="text/javascript">
|
||||
// S/N 관리 전역 변수
|
||||
var snList = [];
|
||||
var snCounter = 1;
|
||||
|
||||
$(function() {
|
||||
$('.select2').select2();
|
||||
|
||||
<script>
|
||||
// S/N 관리 전역 변수
|
||||
var snList = [];
|
||||
var snCounter = 1;
|
||||
|
||||
$(document).ready(function() {
|
||||
// select2 초기화
|
||||
$('.select2').select2();
|
||||
|
||||
// 달력 초기화
|
||||
fnc_makeDatepick();
|
||||
|
||||
// 기존 담당자 값 설정
|
||||
var managerValue = "${saleInfo.MANAGER}";
|
||||
if(managerValue) {
|
||||
$("#manager").val(managerValue).trigger('change');
|
||||
}
|
||||
|
||||
// 판매환종 초기값 설정 (견적환종과 동기화)
|
||||
initializeSalesCurrency();
|
||||
|
||||
// S/N 필드 클릭 이벤트
|
||||
$("#serialNo").click(function() {
|
||||
fn_openSnManagePopup();
|
||||
});
|
||||
|
||||
// 페이지 로드 시 기존 S/N 데이터가 있으면 파싱하여 hidden 필드에 저장
|
||||
var initialSnValue = $("#serialNo").val();
|
||||
if(initialSnValue && initialSnValue.trim() != '') {
|
||||
var snArray = initialSnValue.split(',');
|
||||
var initialSnList = [];
|
||||
for(var i = 0; i < snArray.length; i++) {
|
||||
if(snArray[i].trim() != '') {
|
||||
initialSnList.push({
|
||||
id: i + 1,
|
||||
value: snArray[i].trim()
|
||||
});
|
||||
}
|
||||
}
|
||||
if(initialSnList.length > 0) {
|
||||
$("#serialNoList").val(JSON.stringify(initialSnList));
|
||||
snCounter = initialSnList.length + 1;
|
||||
console.log("초기 S/N 데이터 로드:", initialSnList);
|
||||
}
|
||||
}
|
||||
// 날짜 선택기 초기화
|
||||
_fnc_datepick();
|
||||
|
||||
// 기존 담당자 값 설정
|
||||
var managerValue = "${saleInfo.MANAGER}";
|
||||
if(managerValue) {
|
||||
$("#manager").val(managerValue).trigger('change');
|
||||
}
|
||||
|
||||
// 판매환종 초기값 설정 (견적환종과 동기화)
|
||||
initializeSalesCurrency();
|
||||
|
||||
// S/N 필드 클릭 이벤트
|
||||
$("#serialNo").click(function() {
|
||||
fn_openSnManagePopup();
|
||||
});
|
||||
|
||||
// 페이지 로드 시 기존 S/N 데이터가 있으면 파싱하여 hidden 필드에 저장
|
||||
var initialSnValue = $("#serialNo").val();
|
||||
if(initialSnValue && initialSnValue.trim() != '') {
|
||||
var snArray = initialSnValue.split(',');
|
||||
var initialSnList = [];
|
||||
for(var i = 0; i < snArray.length; i++) {
|
||||
if(snArray[i].trim() != '') {
|
||||
initialSnList.push({
|
||||
id: i + 1,
|
||||
value: snArray[i].trim()
|
||||
});
|
||||
}
|
||||
}
|
||||
if(initialSnList.length > 0) {
|
||||
$("#serialNoList").val(JSON.stringify(initialSnList));
|
||||
snCounter = initialSnList.length + 1;
|
||||
console.log("초기 S/N 데이터 로드:", initialSnList);
|
||||
}
|
||||
}
|
||||
|
||||
// 닫기 버튼
|
||||
$("#btnClose").click(function() {
|
||||
window.close();
|
||||
});
|
||||
// 닫기 버튼
|
||||
$("#btnClose").click(function() {
|
||||
self.close();
|
||||
});
|
||||
|
||||
// 저장 버튼
|
||||
$("#btnSave").click(function() {
|
||||
fn_save();
|
||||
});
|
||||
});
|
||||
// 저장 버튼
|
||||
$("#btnSave").click(function() {
|
||||
fn_save();
|
||||
});
|
||||
});
|
||||
|
||||
// 판매공급가액 계산 함수
|
||||
function fn_calculateSupplyPrice() {
|
||||
var currency = $("#salesCurrency").val();
|
||||
var exchangeRate = parseFloat($("#salesExchangeRate").val()) || 1;
|
||||
var quantity = parseFloat($("#salesQuantity").val()) || 0;
|
||||
var unitPrice = parseFloat($("#salesUnitPrice").val()) || 0;
|
||||
|
||||
// 외화 기준 금액 계산
|
||||
var foreignSupplyPrice = quantity * unitPrice;
|
||||
|
||||
// KRW가 아니고 환율이 있으면 환율 적용
|
||||
if(currency && currency !== 'KRW' && exchangeRate > 0) {
|
||||
var krwSupplyPrice = Math.round(foreignSupplyPrice * exchangeRate);
|
||||
$("#salesSupplyPrice").val(krwSupplyPrice);
|
||||
} else {
|
||||
$("#salesSupplyPrice").val(foreignSupplyPrice);
|
||||
}
|
||||
|
||||
fn_calculateVat();
|
||||
}
|
||||
// 판매공급가액 계산 함수
|
||||
function fn_calculateSupplyPrice() {
|
||||
var currency = $("#salesCurrency").val();
|
||||
var exchangeRate = parseFloat($("#salesExchangeRate").val()) || 1;
|
||||
var quantity = parseFloat($("#salesQuantity").val()) || 0;
|
||||
var unitPrice = parseFloat($("#salesUnitPrice").val()) || 0;
|
||||
|
||||
// 외화 기준 금액 계산
|
||||
var foreignSupplyPrice = quantity * unitPrice;
|
||||
|
||||
// KRW가 아니고 환율이 있으면 환율 적용
|
||||
if(currency && currency !== 'KRW' && exchangeRate > 0) {
|
||||
var krwSupplyPrice = Math.round(foreignSupplyPrice * exchangeRate);
|
||||
$("#salesSupplyPrice").val(krwSupplyPrice);
|
||||
} else {
|
||||
$("#salesSupplyPrice").val(foreignSupplyPrice);
|
||||
}
|
||||
|
||||
fn_calculateVat();
|
||||
}
|
||||
|
||||
// 부가세 계산 함수
|
||||
function fn_calculateVat() {
|
||||
var supplyPrice = parseFloat($("#salesSupplyPrice").val()) || 0;
|
||||
var vat = Math.round(supplyPrice * 0.1);
|
||||
$("#salesVat").val(vat);
|
||||
fn_calculateTotalAmount();
|
||||
}
|
||||
|
||||
// 판매총액 계산 함수 (공급가액 + 부가세)
|
||||
function fn_calculateTotalAmount() {
|
||||
var supplyPrice = parseFloat($("#salesSupplyPrice").val()) || 0;
|
||||
var vat = parseFloat($("#salesVat").val()) || 0;
|
||||
var totalAmount = supplyPrice + vat;
|
||||
$("#salesTotalAmount").val(totalAmount);
|
||||
}
|
||||
|
||||
// 판매환종 초기값 설정 (견적환종과 동기화하되, 사용자가 변경 가능)
|
||||
function initializeSalesCurrency() {
|
||||
var existingSalesCurrency = "${saleInfo.SALES_CURRENCY}";
|
||||
var contractCurrency = "${orderInfo.SALES_CURRENCY}"; // 견적환종 (SALES_CURRENCY로 통일)
|
||||
var contractExchangeRate = "${orderInfo.SALES_EXCHANGE_RATE}"; // 견적환율
|
||||
|
||||
console.log("=== 판매환종 초기화 디버그 ===");
|
||||
console.log("기존 판매환종:", existingSalesCurrency);
|
||||
console.log("견적환종:", contractCurrency);
|
||||
console.log("견적환율:", contractExchangeRate);
|
||||
|
||||
// 이미 저장된 판매환종이 있으면 그대로 사용
|
||||
if(existingSalesCurrency && existingSalesCurrency.trim() !== '') {
|
||||
$("#salesCurrency").val(existingSalesCurrency).trigger('change');
|
||||
console.log("기존 판매환종 사용:", existingSalesCurrency);
|
||||
}
|
||||
// 없으면 견적환종을 기본값으로 설정
|
||||
else if(contractCurrency && contractCurrency.trim() !== '') {
|
||||
$("#salesCurrency").val(contractCurrency).trigger('change');
|
||||
|
||||
// 견적환율도 함께 설정
|
||||
if(contractExchangeRate && contractExchangeRate.trim() !== '') {
|
||||
$("#salesExchangeRate").val(contractExchangeRate);
|
||||
}
|
||||
|
||||
console.log("판매환종 자동 설정: " + contractCurrency + " (견적환종과 동기화)");
|
||||
} else {
|
||||
console.log("견적환종이 없습니다. orderInfo를 확인하세요.");
|
||||
}
|
||||
}
|
||||
|
||||
// 환율 변경 시 원화 금액 재계산
|
||||
function fn_recalculateByExchangeRate() {
|
||||
var currency = $("#salesCurrency").val();
|
||||
var exchangeRate = parseFloat($("#salesExchangeRate").val()) || 1;
|
||||
|
||||
// KRW가 아닌 경우에만 환율 적용
|
||||
if(currency && currency !== 'KRW' && exchangeRate > 0) {
|
||||
var quantity = parseFloat($("#salesQuantity").val()) || 0;
|
||||
var unitPrice = parseFloat($("#salesUnitPrice").val()) || 0;
|
||||
|
||||
// 외화 기준 금액 계산
|
||||
var foreignSupplyPrice = quantity * unitPrice;
|
||||
|
||||
// 원화 환산 금액 계산
|
||||
var krwSupplyPrice = Math.round(foreignSupplyPrice * exchangeRate);
|
||||
var krwVat = Math.round(krwSupplyPrice * 0.1);
|
||||
var krwTotalAmount = krwSupplyPrice + krwVat;
|
||||
|
||||
$("#salesSupplyPrice").val(krwSupplyPrice);
|
||||
$("#salesVat").val(krwVat);
|
||||
$("#salesTotalAmount").val(krwTotalAmount);
|
||||
} else {
|
||||
// KRW인 경우 일반 계산
|
||||
fn_calculateSupplyPrice();
|
||||
}
|
||||
}
|
||||
// 부가세 계산 함수
|
||||
function fn_calculateVat() {
|
||||
var supplyPrice = parseFloat($("#salesSupplyPrice").val()) || 0;
|
||||
var vat = Math.round(supplyPrice * 0.1);
|
||||
$("#salesVat").val(vat);
|
||||
fn_calculateTotalAmount();
|
||||
}
|
||||
|
||||
// 판매총액 계산 함수 (공급가액 + 부가세)
|
||||
function fn_calculateTotalAmount() {
|
||||
var supplyPrice = parseFloat($("#salesSupplyPrice").val()) || 0;
|
||||
var vat = parseFloat($("#salesVat").val()) || 0;
|
||||
var totalAmount = supplyPrice + vat;
|
||||
$("#salesTotalAmount").val(totalAmount);
|
||||
}
|
||||
|
||||
// 판매환종 초기값 설정 (견적환종과 동기화하되, 사용자가 변경 가능)
|
||||
function initializeSalesCurrency() {
|
||||
var existingSalesCurrency = "${saleInfo.SALES_CURRENCY}";
|
||||
var contractCurrency = "${orderInfo.SALES_CURRENCY}"; // 견적환종 (SALES_CURRENCY로 통일)
|
||||
var contractExchangeRate = "${orderInfo.SALES_EXCHANGE_RATE}"; // 견적환율
|
||||
|
||||
console.log("=== 판매환종 초기화 디버그 ===");
|
||||
console.log("기존 판매환종:", existingSalesCurrency);
|
||||
console.log("견적환종:", contractCurrency);
|
||||
console.log("견적환율:", contractExchangeRate);
|
||||
|
||||
// 이미 저장된 판매환종이 있으면 그대로 사용
|
||||
if(existingSalesCurrency && existingSalesCurrency.trim() !== '') {
|
||||
$("#salesCurrency").val(existingSalesCurrency).trigger('change');
|
||||
console.log("기존 판매환종 사용:", existingSalesCurrency);
|
||||
}
|
||||
// 없으면 견적환종을 기본값으로 설정
|
||||
else if(contractCurrency && contractCurrency.trim() !== '') {
|
||||
$("#salesCurrency").val(contractCurrency).trigger('change');
|
||||
|
||||
// 견적환율도 함께 설정
|
||||
if(contractExchangeRate && contractExchangeRate.trim() !== '') {
|
||||
$("#salesExchangeRate").val(contractExchangeRate);
|
||||
}
|
||||
|
||||
console.log("판매환종 자동 설정: " + contractCurrency + " (견적환종과 동기화)");
|
||||
} else {
|
||||
console.log("견적환종이 없습니다. orderInfo를 확인하세요.");
|
||||
}
|
||||
}
|
||||
|
||||
// 환율 변경 시 원화 금액 재계산
|
||||
function fn_recalculateByExchangeRate() {
|
||||
var currency = $("#salesCurrency").val();
|
||||
var exchangeRate = parseFloat($("#salesExchangeRate").val()) || 1;
|
||||
|
||||
// KRW가 아닌 경우에만 환율 적용
|
||||
if(currency && currency !== 'KRW' && exchangeRate > 0) {
|
||||
var quantity = parseFloat($("#salesQuantity").val()) || 0;
|
||||
var unitPrice = parseFloat($("#salesUnitPrice").val()) || 0;
|
||||
|
||||
// 외화 기준 금액 계산
|
||||
var foreignSupplyPrice = quantity * unitPrice;
|
||||
|
||||
// 원화 환산 금액 계산
|
||||
var krwSupplyPrice = Math.round(foreignSupplyPrice * exchangeRate);
|
||||
var krwVat = Math.round(krwSupplyPrice * 0.1);
|
||||
var krwTotalAmount = krwSupplyPrice + krwVat;
|
||||
|
||||
$("#salesSupplyPrice").val(krwSupplyPrice);
|
||||
$("#salesVat").val(krwVat);
|
||||
$("#salesTotalAmount").val(krwTotalAmount);
|
||||
} else {
|
||||
// KRW인 경우 일반 계산
|
||||
fn_calculateSupplyPrice();
|
||||
}
|
||||
}
|
||||
|
||||
// S/N 화면 표시 업데이트
|
||||
function fn_updateSnDisplay() {
|
||||
var count = snList.length;
|
||||
if(count > 0) {
|
||||
// 모든 S/N을 쉼표로 연결
|
||||
var snValues = [];
|
||||
for(var i = 0; i < snList.length; i++) {
|
||||
snValues.push(snList[i].value);
|
||||
}
|
||||
$("#serialNo").val(snValues.join(', '));
|
||||
} else {
|
||||
$("#serialNo").val('');
|
||||
}
|
||||
}
|
||||
// S/N 화면 표시 업데이트
|
||||
function fn_updateSnDisplay() {
|
||||
var count = snList.length;
|
||||
if(count > 0) {
|
||||
// 모든 S/N을 쉼표로 연결
|
||||
var snValues = [];
|
||||
for(var i = 0; i < snList.length; i++) {
|
||||
snValues.push(snList[i].value);
|
||||
}
|
||||
$("#serialNo").val(snValues.join(', '));
|
||||
} else {
|
||||
$("#serialNo").val('');
|
||||
}
|
||||
}
|
||||
|
||||
// S/N 관리 팝업 열기
|
||||
function fn_openSnManagePopup() {
|
||||
@@ -461,60 +465,72 @@
|
||||
Swal.close();
|
||||
}
|
||||
|
||||
function fn_save() {
|
||||
// 체크박스 상태에 따라 출하지시 상태 값 설정
|
||||
var isChecked = $("#isShippingOrder").is(":checked");
|
||||
$("#shippingOrderStatus").val(isChecked ? "출하지시" : "");
|
||||
|
||||
// S/N 데이터 처리: JSON에서 값만 추출하여 콤마로 연결
|
||||
var serialNoListValue = $("#serialNoList").val();
|
||||
console.log("=== 저장 전 S/N 처리 시작 ===");
|
||||
console.log("serialNoList 값:", serialNoListValue);
|
||||
|
||||
if(serialNoListValue && serialNoListValue.trim() != '') {
|
||||
try {
|
||||
var snArray = JSON.parse(serialNoListValue);
|
||||
console.log("파싱된 배열:", snArray);
|
||||
var snValues = [];
|
||||
for(var i = 0; i < snArray.length; i++) {
|
||||
if(snArray[i].value) {
|
||||
snValues.push(snArray[i].value);
|
||||
}
|
||||
}
|
||||
console.log("추출된 값들:", snValues);
|
||||
// 콤마로 구분된 문자열로 변환 (서버 저장용, 띄어쓰기 없이)
|
||||
var finalSnString = snValues.join(',');
|
||||
console.log("최종 S/N 문자열:", finalSnString);
|
||||
$("#serialNo").val(finalSnString);
|
||||
console.log("설정 후 serialNo 필드 값:", $("#serialNo").val());
|
||||
} catch(e) {
|
||||
console.error("S/N JSON 파싱 오류:", e);
|
||||
}
|
||||
} else {
|
||||
console.log("serialNoList가 비어있음");
|
||||
}
|
||||
console.log("=== S/N 처리 완료 ===");
|
||||
|
||||
if(confirm("저장하시겠습니까?")) {
|
||||
$.ajax({
|
||||
url: "/salesMgmt/saveSales.do",
|
||||
type: "POST",
|
||||
data: $("#form1").serialize(),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
alert(data.msg);
|
||||
if (data.result) {
|
||||
opener.fn_search(); // 부모창 그리드 새로고침
|
||||
window.close(); // 팝업 닫기
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error) {
|
||||
console.error("Error:", error);
|
||||
alert("저장에 실패했습니다.");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function fn_save() {
|
||||
// 체크박스 상태에 따라 출하지시 상태 값 설정
|
||||
var isChecked = $("#isShippingOrder").is(":checked");
|
||||
$("#shippingOrderStatus").val(isChecked ? "출하지시" : "");
|
||||
|
||||
// S/N 데이터 처리: JSON에서 값만 추출하여 콤마로 연결
|
||||
var serialNoListValue = $("#serialNoList").val();
|
||||
console.log("=== 저장 전 S/N 처리 시작 ===");
|
||||
console.log("serialNoList 값:", serialNoListValue);
|
||||
|
||||
if(serialNoListValue && serialNoListValue.trim() != '') {
|
||||
try {
|
||||
var snArray = JSON.parse(serialNoListValue);
|
||||
console.log("파싱된 배열:", snArray);
|
||||
var snValues = [];
|
||||
for(var i = 0; i < snArray.length; i++) {
|
||||
if(snArray[i].value) {
|
||||
snValues.push(snArray[i].value);
|
||||
}
|
||||
}
|
||||
console.log("추출된 값들:", snValues);
|
||||
// 콤마로 구분된 문자열로 변환 (서버 저장용, 띄어쓰기 없이)
|
||||
var finalSnString = snValues.join(',');
|
||||
console.log("최종 S/N 문자열:", finalSnString);
|
||||
$("#serialNo").val(finalSnString);
|
||||
console.log("설정 후 serialNo 필드 값:", $("#serialNo").val());
|
||||
} catch(e) {
|
||||
console.error("S/N JSON 파싱 오류:", e);
|
||||
}
|
||||
} else {
|
||||
console.log("serialNoList가 비어있음");
|
||||
}
|
||||
console.log("=== S/N 처리 완료 ===");
|
||||
|
||||
if (confirm("저장하시겠습니까?")) {
|
||||
$.ajax({
|
||||
url : "/salesMgmt/saveSales.do",
|
||||
type : "POST",
|
||||
data : $("#form1").serialize(),
|
||||
dataType : "json",
|
||||
success : function(data) {
|
||||
alert(data.msg);
|
||||
if(opener && opener.fn_search) {
|
||||
opener.fn_search();
|
||||
}
|
||||
self.close();
|
||||
},
|
||||
error : function(jqxhr, status, error) {
|
||||
alert("저장 중 오류가 발생했습니다.");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 날짜 선택기 초기화
|
||||
function _fnc_datepick() {
|
||||
var $dateinput = $("input.date_icon");
|
||||
for (var i = 0; i < $dateinput.length; i++) {
|
||||
$dateinput.eq(i).attr("size", "10");
|
||||
$dateinput.eq(i).datepicker({
|
||||
changeMonth : true,
|
||||
changeYear : true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -523,131 +539,191 @@
|
||||
<input type="hidden" name="saleNo" value="${param.saleNo}">
|
||||
<!-- serialNoList는 name 속성 없이 id만 사용 (클라이언트 전용) -->
|
||||
<input type="hidden" id="serialNoList" value="${saleInfo.SERIAL_NO_LIST}" />
|
||||
<section>
|
||||
|
||||
<section class="business_popup_min_width">
|
||||
<div class="plm_menu_name">
|
||||
<h2>
|
||||
<span>판매 등록</span>
|
||||
<span>판매 등록 (주문번호: ${param.orderNo})</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="businessPopupFormWrap" >
|
||||
<table class="pmsPopupForm">
|
||||
<div id="EntirePopupFormWrap">
|
||||
<!-- 출하지시 영역 -->
|
||||
<div class="form_popup_title">
|
||||
<span>출하 정보</span>
|
||||
</div>
|
||||
<table class="">
|
||||
<colgroup>
|
||||
<col width="15%"/>
|
||||
<col width="35%"/>
|
||||
<col width="15%"/>
|
||||
<col width="35%"/>
|
||||
<col width="100%" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4" style="height:15px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="isShippingOrder">출하지시</label>
|
||||
</td>
|
||||
<td class="input_sub_title" colspan="3">
|
||||
<input type="checkbox" name="isShippingOrderCheck" id="isShippingOrder"
|
||||
${saleInfo.SHIPPING_ORDER_STATUS == '출하지시' ? 'checked' : ''} />
|
||||
<input type="hidden" name="shippingOrderStatus" id="shippingOrderStatus"
|
||||
value="${saleInfo.SHIPPING_ORDER_STATUS != null ? saleInfo.SHIPPING_ORDER_STATUS : ''}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="serialNo">S/N</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" name="serialNo" id="serialNo"
|
||||
placeholder="클릭하여 S/N 추가"
|
||||
style="width:100%; cursor:pointer; background-color:#f8f9fa; color:#333 !important;"
|
||||
value="${saleInfo.SERIAL_NO}"
|
||||
readonly />
|
||||
</td>
|
||||
<td class="input_title"></td>
|
||||
<td class="input_sub_title"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesQuantity">판매수량</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="number" name="salesQuantity" id="salesQuantity" style="width:100%;" value="${saleInfo.SALES_QUANTITY}" onchange="fn_calculateSupplyPrice()" />
|
||||
</td>
|
||||
<td class="input_title"><label for="shippingDate">출하일</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" id="shippingDate" name="shippingDate" class="date_icon" style="width:100%; background-color:#fff;" value="${saleInfo.SHIPPING_DATE}" autocomplete="off" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="shippingMethod">출하방법</label></td>
|
||||
<td class="input_sub_title">
|
||||
<select name="shippingMethod" id="shippingMethod" style="width:100%;" class="select2">
|
||||
<option value="">선택</option>
|
||||
<option value="내수/직납" ${saleInfo.SHIPPING_METHOD == '내수/직납' ? 'selected' : ''}>내수/직납</option>
|
||||
<option value="내수/택배" ${saleInfo.SHIPPING_METHOD == '내수/택배' ? 'selected' : ''}>내수/택배</option>
|
||||
<option value="내수/기타" ${saleInfo.SHIPPING_METHOD == '내수/기타' ? 'selected' : ''}>내수/기타</option>
|
||||
<option value="수출" ${saleInfo.SHIPPING_METHOD == '수출' ? 'selected' : ''}>수출</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="manager">담당자</label></td>
|
||||
<td class="input_sub_title">
|
||||
<select name="manager" id="manager" style="width:100%;" class="select2">
|
||||
<option value="">선택</option>
|
||||
${codeMap.managerList}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesUnitPrice">판매단가</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="number" name="salesUnitPrice" id="salesUnitPrice" style="width:100%;" value="${saleInfo.SALES_UNIT_PRICE}" onchange="fn_calculateSupplyPrice()" />
|
||||
</td>
|
||||
<td class="input_title"><label for="salesSupplyPrice">판매공급가액</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="number" name="salesSupplyPrice" id="salesSupplyPrice" style="width:100%; background-color: #f0f0f0;" value="${saleInfo.SALES_SUPPLY_PRICE}" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesVat">판매부가세</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="number" name="salesVat" id="salesVat" style="width:100%; background-color: #f0f0f0;" value="${saleInfo.SALES_VAT}" readonly />
|
||||
</td>
|
||||
<td class="input_title"><label for="salesTotalAmount">판매총액</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="number" name="salesTotalAmount" id="salesTotalAmount" style="width:100%; background-color: #f0f0f0;" value="${saleInfo.SALES_TOTAL_AMOUNT}" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesCurrency">판매환종</label></td>
|
||||
<td class="input_sub_title">
|
||||
<select name="salesCurrency" id="salesCurrency" style="width:100%;" class="select2" onchange="fn_recalculateByExchangeRate()">
|
||||
<option value="">선택</option>
|
||||
${codeMap.salesCurrency}
|
||||
</select>
|
||||
<small style="color:#666;">* 최초 저장 시 견적환종이 자동 설정되며, 변경 가능합니다.</small>
|
||||
</td>
|
||||
<td class="input_title"><label for="salesExchangeRate">판매환율</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="number" name="salesExchangeRate" id="salesExchangeRate" style="width:100%;" step="0.01" value="${saleInfo.SALES_EXCHANGE_RATE}" onchange="fn_recalculateByExchangeRate()" />
|
||||
<td>
|
||||
<table class="pmsPopuptable">
|
||||
<colgroup>
|
||||
<col width="15%" />
|
||||
<col width="85%" />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="isShippingOrder">출하지시</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="isShippingOrderCheck" id="isShippingOrder"
|
||||
${saleInfo.SHIPPING_ORDER_STATUS == '출하지시' ? 'checked' : ''} />
|
||||
<input type="hidden" name="shippingOrderStatus" id="shippingOrderStatus"
|
||||
value="${saleInfo.SHIPPING_ORDER_STATUS != null ? saleInfo.SHIPPING_ORDER_STATUS : ''}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="incoterms">인도조건</label></td>
|
||||
<td class="input_sub_title">
|
||||
<select name="incoterms" id="incoterms" style="width:100%;" class="select2">
|
||||
<option value="">선택</option>
|
||||
<option value="FOB" ${saleInfo.INCOTERMS == 'FOB' ? 'selected' : ''}>FOB</option>
|
||||
<option value="EXW" ${saleInfo.INCOTERMS == 'EXW' ? 'selected' : ''}>EXW</option>
|
||||
<option value="CIF" ${saleInfo.INCOTERMS == 'CIF' ? 'selected' : ''}>CIF</option>
|
||||
<option value="DDP" ${saleInfo.INCOTERMS == 'DDP' ? 'selected' : ''}>DDP</option>
|
||||
<option value="DAP" ${saleInfo.INCOTERMS == 'DAP' ? 'selected' : ''}>DAP</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"></td>
|
||||
<td class="input_sub_title"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" style="height:15px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 기본 정보 영역 -->
|
||||
<div class="form_popup_title" style="margin-top:15px;">
|
||||
<span>기본 정보</span>
|
||||
</div>
|
||||
<table class="">
|
||||
<colgroup>
|
||||
<col width="100%" />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="pmsPopuptable">
|
||||
<colgroup>
|
||||
<col width="15%" />
|
||||
<col width="35%" />
|
||||
<col width="15%" />
|
||||
<col width="35%" />
|
||||
</colgroup>
|
||||
|
||||
<!-- 첫번째 행: S/N -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="serialNo">S/N</label></td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="serialNo" id="serialNo"
|
||||
placeholder="클릭하여 S/N 추가"
|
||||
style="width:100%; cursor:pointer; background-color:#f8f9fa; color:#333 !important;"
|
||||
value="${saleInfo.SERIAL_NO}"
|
||||
readonly />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 두번째 행: 판매수량, 출하일 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesQuantity">판매수량</label></td>
|
||||
<td>
|
||||
<input type="number" name="salesQuantity" id="salesQuantity" value="${saleInfo.SALES_QUANTITY}" onchange="fn_calculateSupplyPrice()" />
|
||||
</td>
|
||||
<td class="input_title"><label for="shippingDate">출하일</label></td>
|
||||
<td>
|
||||
<input type="text" id="shippingDate" name="shippingDate" class="date_icon" value="${saleInfo.SHIPPING_DATE}" autocomplete="off" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 세번째 행: 출하방법, 담당자 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="shippingMethod">출하방법</label></td>
|
||||
<td>
|
||||
<select name="shippingMethod" id="shippingMethod" class="select2">
|
||||
<option value="">선택</option>
|
||||
<option value="내수/직납" ${saleInfo.SHIPPING_METHOD == '내수/직납' ? 'selected' : ''}>내수/직납</option>
|
||||
<option value="내수/택배" ${saleInfo.SHIPPING_METHOD == '내수/택배' ? 'selected' : ''}>내수/택배</option>
|
||||
<option value="내수/기타" ${saleInfo.SHIPPING_METHOD == '내수/기타' ? 'selected' : ''}>내수/기타</option>
|
||||
<option value="수출" ${saleInfo.SHIPPING_METHOD == '수출' ? 'selected' : ''}>수출</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="manager">담당자</label></td>
|
||||
<td>
|
||||
<select name="manager" id="manager" class="select2">
|
||||
<option value="">선택</option>
|
||||
${codeMap.managerList}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 금액 정보 영역 -->
|
||||
<div class="form_popup_title" style="margin-top:15px;">
|
||||
<span>금액 정보</span>
|
||||
</div>
|
||||
<table class="">
|
||||
<colgroup>
|
||||
<col width="100%" />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="pmsPopuptable">
|
||||
<colgroup>
|
||||
<col width="15%" />
|
||||
<col width="35%" />
|
||||
<col width="15%" />
|
||||
<col width="35%" />
|
||||
</colgroup>
|
||||
|
||||
<!-- 첫번째 행: 판매단가, 판매공급가액 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesUnitPrice">판매단가</label></td>
|
||||
<td>
|
||||
<input type="number" name="salesUnitPrice" id="salesUnitPrice" value="${saleInfo.SALES_UNIT_PRICE}" onchange="fn_calculateSupplyPrice()" />
|
||||
</td>
|
||||
<td class="input_title"><label for="salesSupplyPrice">판매공급가액</label></td>
|
||||
<td>
|
||||
<input type="number" name="salesSupplyPrice" id="salesSupplyPrice" value="${saleInfo.SALES_SUPPLY_PRICE}" readonly style="background-color:#f5f5f5;" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 두번째 행: 판매부가세, 판매총액 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesVat">판매부가세</label></td>
|
||||
<td>
|
||||
<input type="number" name="salesVat" id="salesVat" value="${saleInfo.SALES_VAT}" readonly style="background-color:#f5f5f5;" />
|
||||
</td>
|
||||
<td class="input_title"><label for="salesTotalAmount">판매총액</label></td>
|
||||
<td>
|
||||
<input type="number" name="salesTotalAmount" id="salesTotalAmount" value="${saleInfo.SALES_TOTAL_AMOUNT}" readonly style="background-color:#f5f5f5;" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 세번째 행: 판매환종, 판매환율 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="salesCurrency">판매환종</label></td>
|
||||
<td>
|
||||
<select name="salesCurrency" id="salesCurrency" class="select2" onchange="fn_recalculateByExchangeRate()">
|
||||
<option value="">선택</option>
|
||||
${codeMap.salesCurrency}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="salesExchangeRate">판매환율</label></td>
|
||||
<td>
|
||||
<input type="number" name="salesExchangeRate" id="salesExchangeRate" step="0.01" value="${saleInfo.SALES_EXCHANGE_RATE}" onchange="fn_recalculateByExchangeRate()" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 네번째 행: 인도조건 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="incoterms">인도조건</label></td>
|
||||
<td colspan="3">
|
||||
<select name="incoterms" id="incoterms" class="select2">
|
||||
<option value="">선택</option>
|
||||
<option value="FOB" ${saleInfo.INCOTERMS == 'FOB' ? 'selected' : ''}>FOB</option>
|
||||
<option value="EXW" ${saleInfo.INCOTERMS == 'EXW' ? 'selected' : ''}>EXW</option>
|
||||
<option value="CIF" ${saleInfo.INCOTERMS == 'CIF' ? 'selected' : ''}>CIF</option>
|
||||
<option value="DDP" ${saleInfo.INCOTERMS == 'DDP' ? 'selected' : ''}>DDP</option>
|
||||
<option value="DAP" ${saleInfo.INCOTERMS == 'DAP' ? 'selected' : ''}>DAP</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn_wrap">
|
||||
@@ -660,3 +736,4 @@
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user