판매관리, 매출관리 업데이트
This commit is contained in:
@@ -971,7 +971,6 @@
|
||||
/* INCOTERMS 필드 없음 - 검색 조건 무시 */
|
||||
</if>
|
||||
ORDER BY T.REGDATE DESC
|
||||
LIMIT #{COUNT_PER_PAGE} OFFSET #{PAGE_START}
|
||||
</select>
|
||||
|
||||
<!-- 매출관리 그리드 목록 개수 - project_mgmt 테이블 기반 -->
|
||||
|
||||
@@ -45,13 +45,11 @@
|
||||
//엔터키로 조회
|
||||
$("input").keyup(function(e){
|
||||
if(e.keyCode == 13){
|
||||
$("#page").val("1");
|
||||
fn_search();
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnSearch").click(function(){
|
||||
$("#page").val("1");
|
||||
fn_search();
|
||||
});
|
||||
|
||||
@@ -183,7 +181,7 @@ var columns = [
|
||||
];
|
||||
|
||||
function fn_search(){
|
||||
// 그리드 조회 및 Total 합계 업데이트
|
||||
// 그리드 조회 및 Total 합계 업데이트를 위한 커스텀 AJAX
|
||||
$.ajax({
|
||||
url: "/revenueMgmt/revenueGridList.do",
|
||||
type: "POST",
|
||||
@@ -196,23 +194,23 @@ function fn_search(){
|
||||
_endLoading();
|
||||
},
|
||||
success: function(response) {
|
||||
console.log("Response:", response); // 디버깅용
|
||||
|
||||
// 그리드 데이터 설정
|
||||
if(_tabulGrid){
|
||||
_tabulGrid.setData(response.RESULTLIST || []);
|
||||
} else {
|
||||
// 그리드 초기화
|
||||
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/revenueMgmt/revenueGridList.do", columns, true);
|
||||
_tabulGrid = new Tabulator("#mainGrid", {
|
||||
layout: _tabul_layout_fitColumns,
|
||||
columns: columns,
|
||||
data: response.RESULTLIST || []
|
||||
});
|
||||
// 그리드 초기화 후 Excel 버튼 이벤트 등록
|
||||
fn_bindExcelButton();
|
||||
}
|
||||
|
||||
// Total 합계 업데이트 (소문자 키 사용)
|
||||
// Total 합계 업데이트
|
||||
if(response && response.TOTALS){
|
||||
var totals = response.TOTALS;
|
||||
console.log("Totals:", totals); // 디버깅용
|
||||
// PostgreSQL이 소문자로 반환하므로 소문자 키 사용
|
||||
var supplyPrice = totals.total_supply_price || totals.TOTAL_SUPPLY_PRICE || 0;
|
||||
var vat = totals.total_vat || totals.TOTAL_VAT || 0;
|
||||
var amount = totals.total_amount || totals.TOTAL_AMOUNT || 0;
|
||||
@@ -221,7 +219,6 @@ function fn_search(){
|
||||
$("#totalVat").text(Number(vat).toLocaleString());
|
||||
$("#totalAmount").text(Number(amount).toLocaleString());
|
||||
} else {
|
||||
console.log("No TOTALS in response"); // 디버깅용
|
||||
$("#totalSupplyPrice").text("0");
|
||||
$("#totalVat").text("0");
|
||||
$("#totalAmount").text("0");
|
||||
@@ -233,12 +230,10 @@ function fn_search(){
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
console.error("Error:", jqxhr, status, error);
|
||||
_endLoading();
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
|
||||
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/revenueMgmt/revenueGridList.do", columns, true);
|
||||
}
|
||||
|
||||
function _fnc_datepick(){
|
||||
@@ -330,10 +325,10 @@ function fn_excel() {
|
||||
|
||||
function fn_FileRegist(objId, docType, docTypeName){
|
||||
var popup_width = 800;
|
||||
var popup_height = 350;
|
||||
var popup_height = 680;
|
||||
|
||||
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
||||
var url = "/common/FileRegistPopup.do"+params;
|
||||
var url = "/contractMgmt/FileRegistPopup.do"+params;
|
||||
|
||||
fn_centerPopup(popup_width, popup_height, url);
|
||||
}
|
||||
@@ -347,9 +342,6 @@ function fn_FileRegist(objId, docType, docTypeName){
|
||||
|
||||
<form name="form1" id="form1" method="post">
|
||||
<input type="hidden" name="actionType" id="actionType">
|
||||
<input type="hidden" name="page" id="page" value="1">
|
||||
<input type="hidden" name="COUNT_PER_PAGE" id="COUNT_PER_PAGE" value="10">
|
||||
<input type="hidden" name="PAGE_START" id="PAGE_START" value="0">
|
||||
<div class="min_part_enroll">
|
||||
<div class="content-box">
|
||||
<div class="content-box-s">
|
||||
|
||||
@@ -18,18 +18,16 @@
|
||||
fnc_datepick(); // 날짜 선택기 초기화
|
||||
$('.select2').select2(); // select2 초기화
|
||||
|
||||
// 엔터키로 조회
|
||||
$("input").keyup(function(e){
|
||||
if(e.keyCode == 13){
|
||||
$("#page").val("1");
|
||||
fn_search();
|
||||
}
|
||||
});
|
||||
// 엔터키로 조회
|
||||
$("input").keyup(function(e){
|
||||
if(e.keyCode == 13){
|
||||
fn_search();
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnSearch").click(function(){
|
||||
$("#page").val("1");
|
||||
fn_search();
|
||||
});
|
||||
$("#btnSearch").click(function(){
|
||||
fn_search();
|
||||
});
|
||||
|
||||
// 초기 데이터 조회
|
||||
fn_search();
|
||||
@@ -50,10 +48,10 @@
|
||||
|
||||
function fn_FileRegist(objId, docType, docTypeName){
|
||||
var popup_width = 800;
|
||||
var popup_height = 350;
|
||||
var popup_height = 680;
|
||||
|
||||
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
||||
var url = "/common/FileRegistPopup.do"+params;
|
||||
var url = "/contractMgmt/FileRegistPopup.do"+params;
|
||||
|
||||
fn_centerPopup(popup_width, popup_height, url);
|
||||
}
|
||||
@@ -155,7 +153,6 @@ function fn_bulkRegister(){
|
||||
</head>
|
||||
<body>
|
||||
<form name="form1" id="form1" method="post">
|
||||
<input type="hidden" name="page" id="page" value="1">
|
||||
<input type="hidden" name="actionType" id="actionType">
|
||||
<div class="min_part_enroll">
|
||||
<div class="content-box">
|
||||
|
||||
@@ -139,10 +139,12 @@ function fnc_tabul_searchAjax(gridObj, searchURL, formId, hidePaging, checkValid
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = $("#"+formId).serializeObject();
|
||||
|
||||
$.ajax({
|
||||
url: searchURL,
|
||||
type:"POST",
|
||||
data:$("#"+formId).serializeObject(),
|
||||
data:formData,
|
||||
dataType:"json",
|
||||
//async:false,
|
||||
beforeSend:function(){
|
||||
@@ -162,9 +164,8 @@ function fnc_tabul_searchAjax(gridObj, searchURL, formId, hidePaging, checkValid
|
||||
//console.log(data);
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
console.log(jqxhr);
|
||||
console.log(status);
|
||||
console.log(error);
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user