Merge pull request 'ycplm_node' (#197) from ycplm_node into main
Reviewed-on: #197
This commit was merged in pull request #197.
This commit is contained in:
@@ -65,17 +65,25 @@
|
||||
position: relative;
|
||||
user-select: none;
|
||||
}
|
||||
#itemListTable th,
|
||||
#itemListTable td {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#itemListTable th .col-resizer {
|
||||
position: absolute;
|
||||
right: -4.5px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 7px;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
z-index: 10;
|
||||
background: transparent;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
#itemListTable th .col-resizer:hover {
|
||||
background: rgba(0, 120, 215, 0.3);
|
||||
#itemListTable.col-resizing {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ===== Select2 드래그 복사 지원 ===== */
|
||||
@@ -116,41 +124,67 @@
|
||||
// ===== 컬럼 리사이즈 기능 =====
|
||||
function fn_initColumnResize() {
|
||||
var $table = $('#itemListTable');
|
||||
if($table.length === 0) return;
|
||||
if ($table.length === 0) return;
|
||||
|
||||
// 각 th에 리사이저 핸들 추가
|
||||
$table.find('thead th').each(function() {
|
||||
if($(this).find('.col-resizer').length === 0) {
|
||||
$(this).append('<div class="col-resizer"></div>');
|
||||
var $cols = $table.find('colgroup col');
|
||||
var $ths = $table.find('thead th');
|
||||
|
||||
$ths.each(function(i) {
|
||||
if (i < $ths.length - 1) {
|
||||
if ($(this).find('.col-resizer').length === 0) {
|
||||
$(this).append('<div class="col-resizer"></div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var startX, startWidth, $th, colIndex, $col;
|
||||
var dragging = false;
|
||||
var startX = 0;
|
||||
var startWidthL = 0;
|
||||
var startWidthR = 0;
|
||||
var $colL, $colR, $resizerEl;
|
||||
var rafId = null;
|
||||
|
||||
$(document).on('mousedown', '#itemListTable .col-resizer', function(e) {
|
||||
$th = $(this).parent();
|
||||
colIndex = $th.index();
|
||||
$col = $table.find('colgroup col').eq(colIndex);
|
||||
startX = e.pageX;
|
||||
startWidth = $th.outerWidth();
|
||||
|
||||
$('body').css('cursor', 'col-resize');
|
||||
|
||||
$(document).on('mousemove.colResize', function(e) {
|
||||
var newWidth = startWidth + (e.pageX - startX);
|
||||
if(newWidth >= 40) {
|
||||
$col.css('width', newWidth + 'px');
|
||||
$th.css({'width': newWidth + 'px', 'min-width': newWidth + 'px'});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('mouseup.colResize', function() {
|
||||
$('body').css('cursor', '');
|
||||
$(document).off('mousemove.colResize mouseup.colResize');
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dragging = true;
|
||||
$resizerEl = $(this);
|
||||
var colIdx = $resizerEl.parent().index();
|
||||
|
||||
$colL = $cols.eq(colIdx);
|
||||
$colR = $cols.eq(colIdx + 1);
|
||||
|
||||
startWidthL = $colL[0].getBoundingClientRect().width;
|
||||
startWidthR = $colR[0].getBoundingClientRect().width;
|
||||
startX = e.clientX;
|
||||
|
||||
$resizerEl.addClass('is-resizing');
|
||||
$table.addClass('col-resizing');
|
||||
$('body').css('cursor', 'col-resize');
|
||||
});
|
||||
|
||||
$(document).on('mousemove.colResize', function(e) {
|
||||
if (!dragging) return;
|
||||
if (rafId) return;
|
||||
rafId = requestAnimationFrame(function() {
|
||||
rafId = null;
|
||||
var delta = e.clientX - startX;
|
||||
var newLeft = startWidthL + delta;
|
||||
var newRight = startWidthR - delta;
|
||||
if (newLeft < 40 || newRight < 40) return;
|
||||
$colL.css('width', newLeft + 'px');
|
||||
$colR.css('width', newRight + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('mouseup.colResize mouseleave.colResize', function() {
|
||||
if (!dragging) return;
|
||||
dragging = false;
|
||||
if (rafId) { cancelAnimationFrame(rafId); rafId = null; }
|
||||
if ($resizerEl) $resizerEl.removeClass('is-resizing');
|
||||
$table.removeClass('col-resizing');
|
||||
$('body').css('cursor', '');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -60,17 +60,25 @@
|
||||
position: relative;
|
||||
user-select: none;
|
||||
}
|
||||
#itemListTable th,
|
||||
#itemListTable td {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#itemListTable th .col-resizer {
|
||||
position: absolute;
|
||||
right: -4.5px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 7px;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
z-index: 10;
|
||||
background: transparent;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
#itemListTable th .col-resizer:hover {
|
||||
background: rgba(0, 120, 215, 0.3);
|
||||
#itemListTable.col-resizing {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ===== Select2 드래그 복사 지원 ===== */
|
||||
@@ -112,41 +120,67 @@
|
||||
// ===== 컬럼 리사이즈 기능 =====
|
||||
function fn_initColumnResize() {
|
||||
var $table = $('#itemListTable');
|
||||
if($table.length === 0) return;
|
||||
if ($table.length === 0) return;
|
||||
|
||||
// 각 th에 리사이저 핸들 추가
|
||||
$table.find('thead th').each(function() {
|
||||
if($(this).find('.col-resizer').length === 0) {
|
||||
$(this).append('<div class="col-resizer"></div>');
|
||||
var $cols = $table.find('colgroup col');
|
||||
var $ths = $table.find('thead th');
|
||||
|
||||
$ths.each(function(i) {
|
||||
if (i < $ths.length - 1) {
|
||||
if ($(this).find('.col-resizer').length === 0) {
|
||||
$(this).append('<div class="col-resizer"></div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var startX, startWidth, $th, colIndex, $col;
|
||||
var dragging = false;
|
||||
var startX = 0;
|
||||
var startWidthL = 0;
|
||||
var startWidthR = 0;
|
||||
var $colL, $colR, $resizerEl;
|
||||
var rafId = null;
|
||||
|
||||
$(document).on('mousedown', '#itemListTable .col-resizer', function(e) {
|
||||
$th = $(this).parent();
|
||||
colIndex = $th.index();
|
||||
$col = $table.find('colgroup col').eq(colIndex);
|
||||
startX = e.pageX;
|
||||
startWidth = $th.outerWidth();
|
||||
|
||||
$('body').css('cursor', 'col-resize');
|
||||
|
||||
$(document).on('mousemove.colResize', function(e) {
|
||||
var newWidth = startWidth + (e.pageX - startX);
|
||||
if(newWidth >= 40) {
|
||||
$col.css('width', newWidth + 'px');
|
||||
$th.css({'width': newWidth + 'px', 'min-width': newWidth + 'px'});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('mouseup.colResize', function() {
|
||||
$('body').css('cursor', '');
|
||||
$(document).off('mousemove.colResize mouseup.colResize');
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dragging = true;
|
||||
$resizerEl = $(this);
|
||||
var colIdx = $resizerEl.parent().index();
|
||||
|
||||
$colL = $cols.eq(colIdx);
|
||||
$colR = $cols.eq(colIdx + 1);
|
||||
|
||||
startWidthL = $colL[0].getBoundingClientRect().width;
|
||||
startWidthR = $colR[0].getBoundingClientRect().width;
|
||||
startX = e.clientX;
|
||||
|
||||
$resizerEl.addClass('is-resizing');
|
||||
$table.addClass('col-resizing');
|
||||
$('body').css('cursor', 'col-resize');
|
||||
});
|
||||
|
||||
$(document).on('mousemove.colResize', function(e) {
|
||||
if (!dragging) return;
|
||||
if (rafId) return;
|
||||
rafId = requestAnimationFrame(function() {
|
||||
rafId = null;
|
||||
var delta = e.clientX - startX;
|
||||
var newLeft = startWidthL + delta;
|
||||
var newRight = startWidthR - delta;
|
||||
if (newLeft < 40 || newRight < 40) return;
|
||||
$colL.css('width', newLeft + 'px');
|
||||
$colR.css('width', newRight + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('mouseup.colResize mouseleave.colResize', function() {
|
||||
if (!dragging) return;
|
||||
dragging = false;
|
||||
if (rafId) { cancelAnimationFrame(rafId); rafId = null; }
|
||||
if ($resizerEl) $resizerEl.removeClass('is-resizing');
|
||||
$table.removeClass('col-resizing');
|
||||
$('body').css('cursor', '');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#itemListTable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
#itemListTable th,
|
||||
@@ -34,8 +35,32 @@
|
||||
#itemListTable th {
|
||||
background-color: #f5f5f5;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
||||
/* ===== 컬럼 리사이즈 핸들 ===== */
|
||||
#itemListTable th,
|
||||
#itemListTable td {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#itemListTable th .col-resizer {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
z-index: 10;
|
||||
background: transparent;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
#itemListTable.col-resizing {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#itemListTable input[type="text"],
|
||||
#itemListTable input[type="number"] {
|
||||
width: 100%;
|
||||
@@ -55,6 +80,73 @@
|
||||
var itemCounter = 1;
|
||||
var itemList = [];
|
||||
|
||||
// ===== 컬럼 리사이즈 기능 =====
|
||||
function fn_initColumnResize() {
|
||||
var $table = $('#itemListTable');
|
||||
if ($table.length === 0) return;
|
||||
|
||||
var $cols = $table.find('colgroup col');
|
||||
var $ths = $table.find('thead th');
|
||||
|
||||
$ths.each(function(i) {
|
||||
if (i < $ths.length - 1) {
|
||||
if ($(this).find('.col-resizer').length === 0) {
|
||||
$(this).append('<div class="col-resizer"></div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var dragging = false;
|
||||
var startX = 0;
|
||||
var startWidthL = 0;
|
||||
var startWidthR = 0;
|
||||
var $colL, $colR, $resizerEl;
|
||||
var rafId = null;
|
||||
|
||||
$(document).on('mousedown', '#itemListTable .col-resizer', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dragging = true;
|
||||
$resizerEl = $(this);
|
||||
var colIdx = $resizerEl.parent().index();
|
||||
|
||||
$colL = $cols.eq(colIdx);
|
||||
$colR = $cols.eq(colIdx + 1);
|
||||
|
||||
startWidthL = $colL[0].getBoundingClientRect().width;
|
||||
startWidthR = $colR[0].getBoundingClientRect().width;
|
||||
startX = e.clientX;
|
||||
|
||||
$resizerEl.addClass('is-resizing');
|
||||
$table.addClass('col-resizing');
|
||||
$('body').css('cursor', 'col-resize');
|
||||
});
|
||||
|
||||
$(document).on('mousemove.colResize', function(e) {
|
||||
if (!dragging) return;
|
||||
if (rafId) return;
|
||||
rafId = requestAnimationFrame(function() {
|
||||
rafId = null;
|
||||
var delta = e.clientX - startX;
|
||||
var newLeft = startWidthL + delta;
|
||||
var newRight = startWidthR - delta;
|
||||
if (newLeft < 40 || newRight < 40) return;
|
||||
$colL.css('width', newLeft + 'px');
|
||||
$colR.css('width', newRight + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('mouseup.colResize mouseleave.colResize', function() {
|
||||
if (!dragging) return;
|
||||
dragging = false;
|
||||
if (rafId) { cancelAnimationFrame(rafId); rafId = null; }
|
||||
if ($resizerEl) $resizerEl.removeClass('is-resizing');
|
||||
$table.removeClass('col-resizing');
|
||||
$('body').css('cursor', '');
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// console.log("===== 수주등록 팝업 로드됨 =====");
|
||||
// console.log("useEstimateTemplate 값:", "${useEstimateTemplate}");
|
||||
@@ -102,6 +194,9 @@
|
||||
}
|
||||
});
|
||||
|
||||
// 컬럼 리사이즈 초기화
|
||||
fn_initColumnResize();
|
||||
|
||||
$('.select2').select2();
|
||||
|
||||
// 날짜 선택기 초기화
|
||||
|
||||
@@ -147,8 +147,8 @@ function fnc_tabul_search(layoutParam, gridObj, searchURL, columnParam, showChec
|
||||
|
||||
gridObj.on("tableBuilt", function(){ //tableBuilding
|
||||
$(".tabulator-footer").hide(); //tabulator 페이징 영역 숨김
|
||||
|
||||
if(!isNotSearchFirst) //생성과 동시에 검색
|
||||
|
||||
if(!isNotSearchFirst) //생성과 동시에 검색
|
||||
fnc_tabul_searchAjax(gridObj, searchURL, formId, hidePaging, checkValidation);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3140,9 +3140,9 @@ public class PurchaseOrderService {
|
||||
fromUser = CommonUtils.checkNull((String)masterInfo.get("WRITER"));
|
||||
}
|
||||
|
||||
// 발주서 메일 발송 (PURCHASE 계정 수신 불가 이슈로 SALES 계정 임시 사용 - TODO: PURCHASE 계정 정상화 후 원복)
|
||||
boolean sendResult = MailUtil.sendMailWithAttachFile(fromUser, fromEmail, toUserIdList, toEmailList, ccEmailList, null, null, subject, mailContents, attachFileList, "PURCHASE_ORDER", Constants.Mail.ACCOUNT_TYPE_SALES);
|
||||
//boolean sendResult = MailUtil.sendMailWithAttachFile(fromUser, fromEmail, toUserIdList, toEmailList, ccEmailList, null, null, subject, mailContents, attachFileList, "PURCHASE_ORDER", Constants.Mail.ACCOUNT_TYPE_PURCHASE);
|
||||
// 발주서 메일 발송 (PURCHASE 계정 사용)
|
||||
//boolean sendResult = MailUtil.sendMailWithAttachFile(fromUser, fromEmail, toUserIdList, toEmailList, ccEmailList, null, null, subject, mailContents, attachFileList, "PURCHASE_ORDER", Constants.Mail.ACCOUNT_TYPE_SALES);
|
||||
boolean sendResult = MailUtil.sendMailWithAttachFile(fromUser, fromEmail, toUserIdList, toEmailList, ccEmailList, null, null, subject, mailContents, attachFileList, "PURCHASE_ORDER", Constants.Mail.ACCOUNT_TYPE_PURCHASE);
|
||||
|
||||
if(sendResult) {
|
||||
// 메일 발송 성공 시 DB 업데이트
|
||||
|
||||
Reference in New Issue
Block a user