瀏覽代碼

구매요청 임시저장

dwkim 2 年之前
父節點
當前提交
f5c5f7f905

+ 21 - 3
bin/src/main/webapp/js/app/pomng/ITP_POMNG01010.js

@@ -129,7 +129,7 @@ let pageObj = {
129
 		var _this = this;
129
 		var _this = this;
130
 		// 납품장소 조회 버튼 클릭
130
 		// 납품장소 조회 버튼 클릭
131
 		$('#ITP_FORM_POMNG01010_SEARCH_WHS_NM').on('click', function() {
131
 		$('#ITP_FORM_POMNG01010_SEARCH_WHS_NM').on('click', function() {
132
-			//_this.popup('L');
132
+			_this.popup();
133
 		});
133
 		});
134
 		// 납품장소 텍스트 삭제 버튼 클릭
134
 		// 납품장소 텍스트 삭제 버튼 클릭
135
 		$('#ITP_FORM_POMNG01010_DELETE_WHS_NM').on('click', function() {
135
 		$('#ITP_FORM_POMNG01010_DELETE_WHS_NM').on('click', function() {
@@ -140,6 +140,24 @@ let pageObj = {
140
 			
140
 			
141
 		});
141
 		});
142
 	},
142
 	},
143
+	popup: function () {
144
+		// 팝업
145
+		var popFn = this.callback.create;
146
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
147
+		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
148
+		
149
+	},
150
+	callback: {
151
+		create: function(rowDataPop) {
152
+			console.log(rowDataPop);
153
+			if(rowDataPop) {
154
+				$('#ITP_FORM_POMNG01010_DETAIL_WHS_NM').val(rowDataPop.whsNm);
155
+				$('#ITP_FORM_POMNG01010_DETAIL_WHS_ID').val(rowDataPop.whsId);
156
+				$('#ITP_FORM_POMNG01010_DETAIL_LOCATION_NM').val(rowDataPop.locationNm);
157
+				$('#ITP_FORM_POMNG01010_DETAIL_LOCATION').val(rowDataPop.location);
158
+			}
159
+		}
160
+	},
143
 	itp_POMNG01010_param: {},  // ==>dwkim 
161
 	itp_POMNG01010_param: {},  // ==>dwkim 
144
 	itp_POMNG01010_search: false,  // ==>dwkim 
162
 	itp_POMNG01010_search: false,  // ==>dwkim 
145
 	ui: {
163
 	ui: {
@@ -237,8 +255,8 @@ let pageObj = {
237
 					});
255
 					});
238
 					$(POMNG01010_DETAIL_GRID_EMPTY).hide();
256
 					$(POMNG01010_DETAIL_GRID_EMPTY).hide();
239
 				};
257
 				};
240
-				//const key = {brandId:fn_make_user_info.get('brandId'), brandUnitUnqNo: selectVal, viewCd: 'R'};
241
-				fn_call_popup('biz', 'BIZPOP_ITEM', '#ITP_ASIDE', popFn, null, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
258
+				const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
259
+				fn_call_popup('biz', 'BIZPOP_ITEM', '#ITP_ASIDE', popFn, key, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
242
 			},
260
 			},
243
 			delRow: function() {
261
 			delRow: function() {
244
 				itp_fn_grid_del_row(POMNG01010_DETAIL_GRID_ID);
262
 				itp_fn_grid_del_row(POMNG01010_DETAIL_GRID_ID);

+ 26 - 36
bin/src/main/webapp/js/app/popup/biz/ITP_BIZPOP_WHS_LOCATION.js

@@ -6,7 +6,7 @@ require(['config'], function() {
6
 	});
6
 	});
7
 });
7
 });
8
 
8
 
9
-let API_POP_GRID_LIST = '/api/item/pop-grid-list';
9
+let API_POP_GRID_LIST = '/api/whs/mng/pop-whs-search';
10
 
10
 
11
 function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
11
 function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
12
 	console.log(args);
12
 	console.log(args);
@@ -45,11 +45,13 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
45
 
45
 
46
 		var list = [];
46
 		var list = [];
47
 	    var selectedIds = $(THIS_GIRD_ID).getGridParam('selarrrow');
47
 	    var selectedIds = $(THIS_GIRD_ID).getGridParam('selarrrow');
48
-
48
+		
49
+		/*
49
 		if(selectedIds.length != 1) { // 1개만 선택
50
 		if(selectedIds.length != 1) { // 1개만 선택
50
 			 itp_fn_modal_alert('하나의 창고만 선택해주세요!');
51
 			 itp_fn_modal_alert('하나의 창고만 선택해주세요!');
51
 			 return;
52
 			 return;
52
 		}
53
 		}
54
+		*/
53
 		
55
 		
54
 	    for (var i=selectedIds.length-1; i>=0; i--) {
56
 	    for (var i=selectedIds.length-1; i>=0; i--) {
55
 			list.push($(THIS_GIRD_ID).jqGrid('getRowData', selectedIds[i]));	
57
 			list.push($(THIS_GIRD_ID).jqGrid('getRowData', selectedIds[i]));	
@@ -83,64 +85,52 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
83
 	$(THIS_GIRD_ID).jqGrid({
85
 	$(THIS_GIRD_ID).jqGrid({
84
 		colModel: [
86
 		colModel: [
85
 			{
87
 			{
86
-				index: 'ITEM_ID', name: 'itemId',
87
-				label: '품목ID', //
88
+				index: 'BRAND_ID', name: 'brandId',
89
+				label: '브랜드아이디', //
88
 				width: '10', fixed: false, align: 'center',
90
 				width: '10', fixed: false, align: 'center',
89
-				sortable: false, hidden: false
91
+				sortable: false, hidden: true
90
 			},
92
 			},
91
 			{
93
 			{
92
-				index: 'ITEM_NM', name: 'itemNm',
93
-				label: '품목명', //
94
+				index: 'BRAND_NM', name: 'brandNm',
95
+				label: '브랜드명', //
94
 				width: '12', fixed: false, align: 'left',
96
 				width: '12', fixed: false, align: 'left',
95
 				sortable: false, hidden: false
97
 				sortable: false, hidden: false
96
 			},
98
 			},
97
 			{
99
 			{
98
-				index: 'UNIT', name: 'unit',
99
-				label: '단위', //
100
+				index: 'WHS_ID', name: 'whsId',
101
+				label: '창고아이디', //
100
 				width: '6', fixed: false, align: 'center',
102
 				width: '6', fixed: false, align: 'center',
101
-				sortable: false, hidden: false
103
+				sortable: false, hidden: true
102
 			},
104
 			},
103
 			{
105
 			{
104
-				index: 'UNIT_AMT', name: 'unitAmt',
105
-				label: '단가', //
106
+				index: 'WHS_NM', name: 'whsNm',
107
+				label: '창고명', //
106
 				width: '6', fixed: false, align: 'right',
108
 				width: '6', fixed: false, align: 'right',
107
 				sortable: false, hidden: false
109
 				sortable: false, hidden: false
108
 			},
110
 			},
109
 			{
111
 			{
110
-				index: 'PODR_PSSBL_DVSN_NM', name: 'podrPssblDvsnNm',
111
-				label: '발주가능여부명', //
112
-				width: '6', fixed: false, align: 'center',
113
-				sortable: false, hidden: false
114
-			},
115
-			{
116
-				index: 'PODR_PSSBL_DVSN', name: 'podrPssblDvsn',
117
-				label: '발주가능여부', //
112
+				index: 'LOCATION', name: 'location',
113
+				label: 'LOCATION', //
118
 				width: '6', fixed: false, align: 'center',
114
 				width: '6', fixed: false, align: 'center',
119
 				sortable: false, hidden: true
115
 				sortable: false, hidden: true
120
 			},
116
 			},
121
 			{
117
 			{
122
-				index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
123
-				label: '브랜드단가고유번호', //
124
-				width: '10', fixed: false, align: 'center',
125
-				sortable: false, hidden: true
126
-			},
127
-			{
128
-				index: 'UNIT_GUBUN', name: 'unitGubun',
129
-				label: '단가구분', //
130
-				width: '10', fixed: false, align: 'center',
131
-				sortable: false, hidden: true
118
+				index: 'LOCATION_NM', name: 'locationNm',
119
+				label: 'LOCATION명', //
120
+				width: '6', fixed: false, align: 'center',
121
+				sortable: false, hidden: false
132
 			},
122
 			},
133
 			{
123
 			{
134
-				index: 'STORE_UNIT_UNQ_NO', name: 'storeUnitUnqNo',
135
-				label: '매장단가고유번호', //
124
+				index: 'STCK_DVSN', name: 'stckDvsn',
125
+				label: '창고구분', //
136
 				width: '10', fixed: false, align: 'center',
126
 				width: '10', fixed: false, align: 'center',
137
 				sortable: false, hidden: true
127
 				sortable: false, hidden: true
138
 			},
128
 			},
139
 			{
129
 			{
140
-				index: 'WHS_PASS_QTY', name: 'whsPassQty',
141
-				label: '출고가능수량', //
130
+				index: 'STCK_DVSN_NM', name: 'stckDvsnNm',
131
+				label: '창고구분명', //
142
 				width: '10', fixed: false, align: 'center',
132
 				width: '10', fixed: false, align: 'center',
143
-				sortable: false, hidden: true
133
+				sortable: false, hidden: false
144
 			}
134
 			}
145
 		],
135
 		],
146
 		loadBeforeSend: function(jqXHR) {
136
 		loadBeforeSend: function(jqXHR) {
@@ -149,7 +139,7 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
149
 		postData: JSON.stringify(param),
139
 		postData: JSON.stringify(param),
150
 		url: DOMAIN + API_POP_GRID_LIST,
140
 		url: DOMAIN + API_POP_GRID_LIST,
151
 		pager: THIS_GIRD_PAGER,
141
 		pager: THIS_GIRD_PAGER,
152
-		multiselect: true,
142
+		multiselect: false,
153
 		rownumbers: false,
143
 		rownumbers: false,
154
 		loadComplete: function(data) {
144
 		loadComplete: function(data) {
155
 			console.log(data);
145
 			console.log(data);

+ 21 - 3
src/main/webapp/js/app/pomng/ITP_POMNG01010.js

@@ -129,7 +129,7 @@ let pageObj = {
129
 		var _this = this;
129
 		var _this = this;
130
 		// 납품장소 조회 버튼 클릭
130
 		// 납품장소 조회 버튼 클릭
131
 		$('#ITP_FORM_POMNG01010_SEARCH_WHS_NM').on('click', function() {
131
 		$('#ITP_FORM_POMNG01010_SEARCH_WHS_NM').on('click', function() {
132
-			//_this.popup('L');
132
+			_this.popup();
133
 		});
133
 		});
134
 		// 납품장소 텍스트 삭제 버튼 클릭
134
 		// 납품장소 텍스트 삭제 버튼 클릭
135
 		$('#ITP_FORM_POMNG01010_DELETE_WHS_NM').on('click', function() {
135
 		$('#ITP_FORM_POMNG01010_DELETE_WHS_NM').on('click', function() {
@@ -140,6 +140,24 @@ let pageObj = {
140
 			
140
 			
141
 		});
141
 		});
142
 	},
142
 	},
143
+	popup: function () {
144
+		// 팝업
145
+		var popFn = this.callback.create;
146
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
147
+		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
148
+		
149
+	},
150
+	callback: {
151
+		create: function(rowDataPop) {
152
+			console.log(rowDataPop);
153
+			if(rowDataPop) {
154
+				$('#ITP_FORM_POMNG01010_DETAIL_WHS_NM').val(rowDataPop.whsNm);
155
+				$('#ITP_FORM_POMNG01010_DETAIL_WHS_ID').val(rowDataPop.whsId);
156
+				$('#ITP_FORM_POMNG01010_DETAIL_LOCATION_NM').val(rowDataPop.locationNm);
157
+				$('#ITP_FORM_POMNG01010_DETAIL_LOCATION').val(rowDataPop.location);
158
+			}
159
+		}
160
+	},
143
 	itp_POMNG01010_param: {},  // ==>dwkim 
161
 	itp_POMNG01010_param: {},  // ==>dwkim 
144
 	itp_POMNG01010_search: false,  // ==>dwkim 
162
 	itp_POMNG01010_search: false,  // ==>dwkim 
145
 	ui: {
163
 	ui: {
@@ -237,8 +255,8 @@ let pageObj = {
237
 					});
255
 					});
238
 					$(POMNG01010_DETAIL_GRID_EMPTY).hide();
256
 					$(POMNG01010_DETAIL_GRID_EMPTY).hide();
239
 				};
257
 				};
240
-				//const key = {brandId:fn_make_user_info.get('brandId'), brandUnitUnqNo: selectVal, viewCd: 'R'};
241
-				fn_call_popup('biz', 'BIZPOP_ITEM', '#ITP_ASIDE', popFn, null, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
258
+				const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
259
+				fn_call_popup('biz', 'BIZPOP_ITEM', '#ITP_ASIDE', popFn, key, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
242
 			},
260
 			},
243
 			delRow: function() {
261
 			delRow: function() {
244
 				itp_fn_grid_del_row(POMNG01010_DETAIL_GRID_ID);
262
 				itp_fn_grid_del_row(POMNG01010_DETAIL_GRID_ID);

+ 26 - 36
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_WHS_LOCATION.js

@@ -6,7 +6,7 @@ require(['config'], function() {
6
 	});
6
 	});
7
 });
7
 });
8
 
8
 
9
-let API_POP_GRID_LIST = '/api/item/pop-grid-list';
9
+let API_POP_GRID_LIST = '/api/whs/mng/pop-whs-search';
10
 
10
 
11
 function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
11
 function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
12
 	console.log(args);
12
 	console.log(args);
@@ -45,11 +45,13 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
45
 
45
 
46
 		var list = [];
46
 		var list = [];
47
 	    var selectedIds = $(THIS_GIRD_ID).getGridParam('selarrrow');
47
 	    var selectedIds = $(THIS_GIRD_ID).getGridParam('selarrrow');
48
-
48
+		
49
+		/*
49
 		if(selectedIds.length != 1) { // 1개만 선택
50
 		if(selectedIds.length != 1) { // 1개만 선택
50
 			 itp_fn_modal_alert('하나의 창고만 선택해주세요!');
51
 			 itp_fn_modal_alert('하나의 창고만 선택해주세요!');
51
 			 return;
52
 			 return;
52
 		}
53
 		}
54
+		*/
53
 		
55
 		
54
 	    for (var i=selectedIds.length-1; i>=0; i--) {
56
 	    for (var i=selectedIds.length-1; i>=0; i--) {
55
 			list.push($(THIS_GIRD_ID).jqGrid('getRowData', selectedIds[i]));	
57
 			list.push($(THIS_GIRD_ID).jqGrid('getRowData', selectedIds[i]));	
@@ -83,64 +85,52 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
83
 	$(THIS_GIRD_ID).jqGrid({
85
 	$(THIS_GIRD_ID).jqGrid({
84
 		colModel: [
86
 		colModel: [
85
 			{
87
 			{
86
-				index: 'ITEM_ID', name: 'itemId',
87
-				label: '품목ID', //
88
+				index: 'BRAND_ID', name: 'brandId',
89
+				label: '브랜드아이디', //
88
 				width: '10', fixed: false, align: 'center',
90
 				width: '10', fixed: false, align: 'center',
89
-				sortable: false, hidden: false
91
+				sortable: false, hidden: true
90
 			},
92
 			},
91
 			{
93
 			{
92
-				index: 'ITEM_NM', name: 'itemNm',
93
-				label: '품목명', //
94
+				index: 'BRAND_NM', name: 'brandNm',
95
+				label: '브랜드명', //
94
 				width: '12', fixed: false, align: 'left',
96
 				width: '12', fixed: false, align: 'left',
95
 				sortable: false, hidden: false
97
 				sortable: false, hidden: false
96
 			},
98
 			},
97
 			{
99
 			{
98
-				index: 'UNIT', name: 'unit',
99
-				label: '단위', //
100
+				index: 'WHS_ID', name: 'whsId',
101
+				label: '창고아이디', //
100
 				width: '6', fixed: false, align: 'center',
102
 				width: '6', fixed: false, align: 'center',
101
-				sortable: false, hidden: false
103
+				sortable: false, hidden: true
102
 			},
104
 			},
103
 			{
105
 			{
104
-				index: 'UNIT_AMT', name: 'unitAmt',
105
-				label: '단가', //
106
+				index: 'WHS_NM', name: 'whsNm',
107
+				label: '창고명', //
106
 				width: '6', fixed: false, align: 'right',
108
 				width: '6', fixed: false, align: 'right',
107
 				sortable: false, hidden: false
109
 				sortable: false, hidden: false
108
 			},
110
 			},
109
 			{
111
 			{
110
-				index: 'PODR_PSSBL_DVSN_NM', name: 'podrPssblDvsnNm',
111
-				label: '발주가능여부명', //
112
-				width: '6', fixed: false, align: 'center',
113
-				sortable: false, hidden: false
114
-			},
115
-			{
116
-				index: 'PODR_PSSBL_DVSN', name: 'podrPssblDvsn',
117
-				label: '발주가능여부', //
112
+				index: 'LOCATION', name: 'location',
113
+				label: 'LOCATION', //
118
 				width: '6', fixed: false, align: 'center',
114
 				width: '6', fixed: false, align: 'center',
119
 				sortable: false, hidden: true
115
 				sortable: false, hidden: true
120
 			},
116
 			},
121
 			{
117
 			{
122
-				index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
123
-				label: '브랜드단가고유번호', //
124
-				width: '10', fixed: false, align: 'center',
125
-				sortable: false, hidden: true
126
-			},
127
-			{
128
-				index: 'UNIT_GUBUN', name: 'unitGubun',
129
-				label: '단가구분', //
130
-				width: '10', fixed: false, align: 'center',
131
-				sortable: false, hidden: true
118
+				index: 'LOCATION_NM', name: 'locationNm',
119
+				label: 'LOCATION명', //
120
+				width: '6', fixed: false, align: 'center',
121
+				sortable: false, hidden: false
132
 			},
122
 			},
133
 			{
123
 			{
134
-				index: 'STORE_UNIT_UNQ_NO', name: 'storeUnitUnqNo',
135
-				label: '매장단가고유번호', //
124
+				index: 'STCK_DVSN', name: 'stckDvsn',
125
+				label: '창고구분', //
136
 				width: '10', fixed: false, align: 'center',
126
 				width: '10', fixed: false, align: 'center',
137
 				sortable: false, hidden: true
127
 				sortable: false, hidden: true
138
 			},
128
 			},
139
 			{
129
 			{
140
-				index: 'WHS_PASS_QTY', name: 'whsPassQty',
141
-				label: '출고가능수량', //
130
+				index: 'STCK_DVSN_NM', name: 'stckDvsnNm',
131
+				label: '창고구분명', //
142
 				width: '10', fixed: false, align: 'center',
132
 				width: '10', fixed: false, align: 'center',
143
-				sortable: false, hidden: true
133
+				sortable: false, hidden: false
144
 			}
134
 			}
145
 		],
135
 		],
146
 		loadBeforeSend: function(jqXHR) {
136
 		loadBeforeSend: function(jqXHR) {
@@ -149,7 +139,7 @@ function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
149
 		postData: JSON.stringify(param),
139
 		postData: JSON.stringify(param),
150
 		url: DOMAIN + API_POP_GRID_LIST,
140
 		url: DOMAIN + API_POP_GRID_LIST,
151
 		pager: THIS_GIRD_PAGER,
141
 		pager: THIS_GIRD_PAGER,
152
-		multiselect: true,
142
+		multiselect: false,
153
 		rownumbers: false,
143
 		rownumbers: false,
154
 		loadComplete: function(data) {
144
 		loadComplete: function(data) {
155
 			console.log(data);
145
 			console.log(data);