디자인수정, 컬럼 수정, 이름 수정
This commit is contained in:
@@ -222,7 +222,23 @@ var columns = [
|
||||
{headerHozAlign : 'center', hozAlign : 'right', width : '120', title : '원화총액', field : 'SALES_TOTAL_AMOUNT_KRW',
|
||||
formatter: "money", formatterParams: {thousand: ",", symbolAfter: "", precision: false}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '출고일', field : 'SHIPPING_DATE'},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '출하일', field : 'SHIPPING_DATE_WITH_COUNT',
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
// SHIPPING_DATE_WITH_COUNT가 비어있으면 SHIPPING_DATE 사용
|
||||
if(!value || value.trim() === '') {
|
||||
var data = cell.getRow().getData();
|
||||
return data.SHIPPING_DATE || '';
|
||||
}
|
||||
return value;
|
||||
},
|
||||
cellClick: function(e, cell) {
|
||||
var projectNo = cell.getRow().getData().PROJECT_NO;
|
||||
if(projectNo) {
|
||||
fn_openShippingDetail(projectNo);
|
||||
}
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '국내/해외', field : 'NATION'},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환종', field : 'SALES_CURRENCY_NAME'},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '환율', field : 'SALES_EXCHANGE_RATE',
|
||||
@@ -261,37 +277,42 @@ function fn_search(){
|
||||
if(_tabulGrid){
|
||||
_tabulGrid.setData(response.RESULTLIST || []);
|
||||
} else {
|
||||
// 그리드 초기화
|
||||
_tabulGrid = new Tabulator("#mainGrid", {
|
||||
layout: _tabul_layout_fitColumns,
|
||||
height: "100%", // 부모 컨테이너 높이에 맞춤
|
||||
columns: columns,
|
||||
data: response.RESULTLIST || [],
|
||||
selectable: "highlight" // 다중 선택 가능하도록 설정
|
||||
// 그리드 초기화
|
||||
_tabulGrid = new Tabulator("#mainGrid", {
|
||||
layout: _tabul_layout_fitColumns,
|
||||
height: "100%", // 부모 컨테이너 높이에 맞춤
|
||||
columns: columns,
|
||||
data: response.RESULTLIST || [],
|
||||
selectable: "highlight" // 다중 선택 가능하도록 설정
|
||||
});
|
||||
|
||||
// 행 클릭으로 다중 선택
|
||||
_tabulGrid.on("rowClick", function(e, row){
|
||||
// 체크박스나 체크박스 셀을 클릭한 경우는 제외
|
||||
if($(e.target).hasClass('tabulator-row-handle') ||
|
||||
$(e.target).closest('.tabulator-row-handle').length > 0 ||
|
||||
e.target.type === 'checkbox') {
|
||||
return;
|
||||
}
|
||||
|
||||
// 이미 선택된 행인지 확인
|
||||
if(row.isSelected()){
|
||||
// 선택된 행 클릭 시 해제
|
||||
row.deselect();
|
||||
} else {
|
||||
// 선택되지 않은 행 클릭 시 선택 (기존 선택 유지)
|
||||
row.select();
|
||||
}
|
||||
});
|
||||
|
||||
// 행 클릭으로 다중 선택
|
||||
_tabulGrid.on("rowClick", function(e, row){
|
||||
// 체크박스나 체크박스 셀을 클릭한 경우는 제외
|
||||
if($(e.target).hasClass('tabulator-row-handle') ||
|
||||
$(e.target).closest('.tabulator-row-handle').length > 0 ||
|
||||
e.target.type === 'checkbox') {
|
||||
return;
|
||||
}
|
||||
|
||||
// 이미 선택된 행인지 확인
|
||||
if(row.isSelected()){
|
||||
// 선택된 행 클릭 시 해제
|
||||
row.deselect();
|
||||
} else {
|
||||
// 선택되지 않은 행 클릭 시 선택 (기존 선택 유지)
|
||||
row.select();
|
||||
}
|
||||
});
|
||||
|
||||
// 그리드 초기화 후 Excel 버튼 이벤트 등록
|
||||
fn_bindExcelButton();
|
||||
}
|
||||
|
||||
// 그리드 렌더링 완료 후 원화총액 합계 계산
|
||||
_tabulGrid.on("renderComplete", function(){
|
||||
fn_calculateTotalKRW();
|
||||
});
|
||||
|
||||
// 그리드 초기화 후 Excel 버튼 이벤트 등록
|
||||
fn_bindExcelButton();
|
||||
}
|
||||
|
||||
// Total 합계 업데이트
|
||||
if(response && response.TOTALS){
|
||||
@@ -300,14 +321,15 @@ function fn_search(){
|
||||
var vat = totals.total_vat || totals.TOTAL_VAT || 0;
|
||||
var amount = totals.total_amount || totals.TOTAL_AMOUNT || 0;
|
||||
|
||||
$("#totalSupplyPrice").text(Number(supplyPrice).toLocaleString());
|
||||
$("#totalVat").text(Number(vat).toLocaleString());
|
||||
$("#totalAmount").text(Number(amount).toLocaleString());
|
||||
} else {
|
||||
$("#totalSupplyPrice").text("0");
|
||||
$("#totalVat").text("0");
|
||||
$("#totalAmount").text("0");
|
||||
}
|
||||
$("#totalSupplyPrice").text(Number(supplyPrice).toLocaleString());
|
||||
$("#totalVat").text(Number(vat).toLocaleString());
|
||||
$("#totalAmount").text(Number(amount).toLocaleString());
|
||||
} else {
|
||||
$("#totalSupplyPrice").text("0");
|
||||
$("#totalVat").text("0");
|
||||
$("#totalAmount").text("0");
|
||||
$("#totalAmountKRW").text("0");
|
||||
}
|
||||
|
||||
// 페이징 HTML 업데이트
|
||||
if(response.PAGE_HTML){
|
||||
@@ -417,6 +439,38 @@ function fn_FileRegist(objId, docType, docTypeName){
|
||||
|
||||
fn_centerPopup(popup_width, popup_height, url);
|
||||
}
|
||||
|
||||
// 출하일 상세 팝업
|
||||
function fn_openShippingDetail(projectNo) {
|
||||
console.log("=== fn_openShippingDetail 호출 ===");
|
||||
console.log("전달받은 projectNo:", projectNo);
|
||||
console.log("projectNo 타입:", typeof projectNo);
|
||||
|
||||
if(!projectNo) {
|
||||
alert("프로젝트 번호가 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "/salesMgmt/shippingDetailPopup.do?projectNo=" + encodeURIComponent(projectNo);
|
||||
console.log("팝업 URL:", url);
|
||||
|
||||
window.open(url, "shippingDetailPopup", "width=800,height=600,scrollbars=yes,resizable=yes");
|
||||
}
|
||||
|
||||
// 원화총액 합계 계산
|
||||
function fn_calculateTotalKRW() {
|
||||
if(!_tabulGrid) return;
|
||||
|
||||
var data = _tabulGrid.getData();
|
||||
var totalKRW = 0;
|
||||
|
||||
data.forEach(function(row) {
|
||||
var amountKRW = parseFloat(row.SALES_TOTAL_AMOUNT_KRW) || 0;
|
||||
totalKRW += amountKRW;
|
||||
});
|
||||
|
||||
$("#totalAmountKRW").text(Number(totalKRW).toLocaleString());
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -499,8 +553,8 @@ function fn_FileRegist(objId, docType, docTypeName){
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label"><label for="">출고일</label></td>
|
||||
<td colspan="11"><input type="text" name="shippingDateFrom" class="date_icon"/> ~ <input type="text" name="shippingDateTo" class="date_icon"/></td>
|
||||
<td class="label"><label for="">출하일</label></td>
|
||||
<td colspan="11"><input type="text" name="shippingDateFrom" class="date_icon"/> ~ <input type="text" name="shippingDateTo" class="date_icon"/></td>
|
||||
</tr>
|
||||
|
||||
<!-- 주석처리된 필터들 (필요없는 항목) -->
|
||||
@@ -551,18 +605,12 @@ function fn_FileRegist(objId, docType, docTypeName){
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Total 합계 표시 영역 -->
|
||||
<div style="padding: 3px 10px; background: #f5f5f5; border-radius: 3px; margin: 0px 0;">
|
||||
<span style="font-weight: bold; font-size: 12px; margin-right: 20px;">
|
||||
Total 공급가액: <span id="totalSupplyPrice" style="color: #2196F3;">0</span> 원
|
||||
</span>
|
||||
<span style="font-weight: bold; font-size: 12px; margin-right: 20px;">
|
||||
Total 부가세: <span id="totalVat" style="color: #FF9800;">0</span> 원
|
||||
</span>
|
||||
<span style="font-weight: bold; font-size: 12px;">
|
||||
Total 총액: <span id="totalAmount" style="color: #4CAF50;">0</span> 원
|
||||
</span>
|
||||
</div>
|
||||
<!-- Total 합계 표시 영역 -->
|
||||
<div style="padding:5px 10px; background: #f5f5f5;">
|
||||
<span style="font-weight: bold; font-size: 13px;">
|
||||
Total 총액: <span id="totalAmountKRW" style="color: #4CAF50;">0</span> 원
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -637,8 +637,8 @@ function fn_bulkRegister(){
|
||||
<td class="label"><label for="">발주일</label></td>
|
||||
<td colspan="3"><input type="text" name="orderDateFrom" class="date_icon"/> ~ <input type="text" name="orderDateTo" class="date_icon"/></td>
|
||||
|
||||
<td class="label"><label for="">출고일</label></td>
|
||||
<td colspan="3"><input type="text" name="shippingDateFrom" class="date_icon"/> ~ <input type="text" name="shippingDateTo" class="date_icon"/></td>
|
||||
<td class="label"><label for="">출하일</label></td>
|
||||
<td colspan="3"><input type="text" name="shippingDateFrom" class="date_icon"/> ~ <input type="text" name="shippingDateTo" class="date_icon"/></td>
|
||||
|
||||
<%--
|
||||
<td class="label"><label for="">수주상태</label></td>
|
||||
@@ -675,13 +675,9 @@ function fn_bulkRegister(){
|
||||
</div>
|
||||
|
||||
<!-- Total 합계 표시 영역 (판매원화총액 기준) -->
|
||||
<div style=" background: #f5f5f5; border-radius: 3px; clear: both;">
|
||||
<div style="padding:5px 10px; background: #f5f5f5;">
|
||||
<span style="font-weight: bold; font-size: 13px;">
|
||||
발주 금액 : <span id="totalSalesAmountKRW" style="color: #4CAF50;">0</span> 원
|
||||
<span style="margin-left: 10px; font-size: 12px;">
|
||||
(출고 : <span id="shippedAmountKRW" style="color: #2196F3;">0</span> 원,
|
||||
미출고 : <span id="notShippedAmountKRW" style="color: #FF9800;">0</span> 원)
|
||||
</span>
|
||||
발주 금액: <span id="totalSalesAmountKRW" style="color: #4CAF50;">0</span> 원
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user