원자재, 구매리스트 가공업체 수정~~
This commit is contained in:
@@ -176,11 +176,12 @@ function fn_initResultGrid() {
|
||||
data: [],
|
||||
layout: "fitColumns",
|
||||
height: "calc(100vh - 450px)",
|
||||
pagination: false, // 페이지네이션 비활성화 (전체 데이터 표시)
|
||||
columns: [
|
||||
{
|
||||
title: '구분',
|
||||
field: 'CATEGORY_NAME',
|
||||
width: 100,
|
||||
width: 150,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'center'
|
||||
@@ -188,7 +189,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '품번',
|
||||
field: 'PART_NO',
|
||||
width: 180,
|
||||
width: 320,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'left'
|
||||
@@ -203,7 +204,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '소요량',
|
||||
field: 'REQUIRED_QTY',
|
||||
width: 100,
|
||||
width: 150,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'right',
|
||||
@@ -218,7 +219,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '소재',
|
||||
field: 'MATERIAL',
|
||||
width: 120,
|
||||
width: 150,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'center'
|
||||
@@ -226,7 +227,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '사이즈',
|
||||
field: 'SPEC',
|
||||
width: 120,
|
||||
width: 150,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'center'
|
||||
@@ -234,7 +235,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '소재품번',
|
||||
field: 'MATERIAL_PART_NO',
|
||||
width: 180,
|
||||
width: 250,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'left'
|
||||
@@ -242,7 +243,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '소재소요량',
|
||||
field: 'MATERIAL_REQUIRED_QTY',
|
||||
width: 120,
|
||||
width: 150,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'right',
|
||||
@@ -321,10 +322,17 @@ function fn_search() {
|
||||
data: JSON.stringify({mbomItems: mbomItems}),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
console.log("=== 서버 응답 데이터 ===");
|
||||
console.log("전체 응답:", data);
|
||||
console.log("리스트 개수:", data.list ? data.list.length : 0);
|
||||
console.log("리스트 데이터:", data.list);
|
||||
|
||||
if(data.result === "success") {
|
||||
resultGrid.setData(data.list || []);
|
||||
var cnt = data.list ? data.list.length : 0;
|
||||
$("#resultCnt").text(cnt);
|
||||
|
||||
console.log("그리드 데이터 개수:", resultGrid.getData().length);
|
||||
if(cnt === 0) {
|
||||
Swal.fire({
|
||||
title: '조회 결과 없음',
|
||||
@@ -374,7 +382,7 @@ function fn_search() {
|
||||
</div>
|
||||
|
||||
<!-- 결과 그리드 영역 -->
|
||||
<div class="section-title" style="margin-left: 16px;">원자재 소요량 (구매품) - 조회결과: <span id="resultCnt">0</span>건</div>
|
||||
<div class="section-title" style="margin-left: 16px;">원자재 소요량 (구매품, 원소재) - 조회결과: <span id="resultCnt">0</span>건</div>
|
||||
<div id="resultGrid" style="margin: 0 16px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -188,7 +188,7 @@ function fn_initResultGrid() {
|
||||
{
|
||||
title: '품번',
|
||||
field: 'PART_NO',
|
||||
width: 300,
|
||||
width: 320,
|
||||
headerHozAlign: 'center',
|
||||
headerSort: true,
|
||||
hozAlign: 'left'
|
||||
|
||||
@@ -85,7 +85,7 @@ body, html {
|
||||
<tr>
|
||||
<td>
|
||||
<label>프로젝트번호:</label>
|
||||
<span id="infoProjectNo">${resultMap.PROJECT_NO}</span>
|
||||
<span id="infoProjectNo">${resultMap.PROJECT_NUMBER}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>고객사:</label>
|
||||
@@ -115,7 +115,7 @@ body, html {
|
||||
</td>
|
||||
<td>
|
||||
<label>입고요청일:</label>
|
||||
<span id="infoDeliveryDate">${resultMap.DELIVERY_REQUEST_DATE}</span>
|
||||
<span id="infoDeliveryDate">${resultMap.DUE_DATE}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -542,7 +542,13 @@ function fn_initGrid() {
|
||||
},
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(!value) return '';
|
||||
|
||||
// 저장된 값이 없으면 기본값 '5001'(RPS) 설정
|
||||
if(value === undefined || value === null || value === '') {
|
||||
value = '5001';
|
||||
cell.getRow().update({PROCESSING_VENDOR: value}, false);
|
||||
}
|
||||
|
||||
// OBJID로 업체명 조회하여 표시
|
||||
for(var i = 0; i < processingVendorList.length; i++) {
|
||||
if(processingVendorList[i].id == value) {
|
||||
@@ -632,28 +638,27 @@ function fn_initGrid() {
|
||||
return value ? Number(value).toLocaleString() : '0';
|
||||
}
|
||||
},
|
||||
// 30. 공급업체 (수정가능 - 기준정보에서 선택)
|
||||
// 30. 공급업체 (수정가능 - Select2 에디터)
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'left',
|
||||
width: 150,
|
||||
title: '<span style="background-color: #FFFF00; padding: 2px 5px;">공급업체</span>',
|
||||
field: 'VENDOR_PM',
|
||||
editor: 'list',
|
||||
editorParams: function(cell) {
|
||||
return {
|
||||
values: vendorList,
|
||||
autocomplete: true,
|
||||
listOnEmpty: true,
|
||||
freetext: true,
|
||||
allowEmpty: true
|
||||
};
|
||||
editor: function(cell, onRendered, success, cancel, editorParams) {
|
||||
// Select2 에디터 (가공업체와 동일한 목록 사용)
|
||||
return createSelect2Editor(processingVendorList)(cell, onRendered, success, cancel, editorParams);
|
||||
},
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(!value) return '';
|
||||
// vendorList에서 해당 값의 이름 찾기
|
||||
return vendorList[value] || value;
|
||||
// processingVendorList에서 해당 값의 이름 찾기
|
||||
for(var i = 0; i < processingVendorList.length; i++) {
|
||||
if(processingVendorList[i].id == value) {
|
||||
return processingVendorList[i].text;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
// 31. 단가 (수정가능)
|
||||
|
||||
Reference in New Issue
Block a user