소스 검색

출하현황 작업-2

yhl88 2 년 전
부모
커밋
9e2ba6f68c
2개의 변경된 파일101개의 추가작업 그리고 13개의 파일을 삭제
  1. 11 7
      src/main/webapp/app/inoutmng/INOUTMNG02010.html
  2. 90 6
      src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

+ 11 - 7
src/main/webapp/app/inoutmng/INOUTMNG02010.html

@@ -27,10 +27,13 @@
27 27
 											</div>
28 28
 										</div>
29 29
 										<div class="col-xs-2 itp_ip itp_noMar">
30
-											<select id="ITP_FORM_INOUTMNG02010_SEARCH_SHMT_WHS_ID" class="form-control itp_input" name="sShmtWhsId">
31
-												<option value="A">출하창고</option>											
32
-											</select>
30
+											<input type="text" id="ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_ID" class="form-control itp_input" name="sshmtWhsId" placeholder="출하창고" />
31
+											<input type="hidden" id="ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_NM" class="form-control itp_input" name="" />
33 32
 										</div>
33
+										<div class="col-xs-1 itp_in" style="width:11%; padding:0px;">
34
+											<button type="button" id="ITP_BTN_INOUTMNG02010_SEARCH_SHMT_WHS_ID" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
35
+											<button type="button" id="ITP_BTN_INOUTMNG02010_DELETE_SHMT_WHS_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
36
+						                </div>
34 37
 									</div>
35 38
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
36 39
 										<div class="col-xs-2 itp_ip itp_noMar">
@@ -39,14 +42,15 @@
39 42
 											</select>
40 43
 										</div>
41 44
 										<div class="col-xs-2 itp_ip itp_noMar">
42
-											<input type="text" id="ITP_FORM_INOUTMNG02010_SEARCH_STORE_NM" class="form-control itp_input" name="sStoreNm" placeholder="매장" />
45
+											<input type="text" id="ITP_FORM_INOUTMNG02010_DETAIL_WHS_NM" class="form-control itp_input" name="swhsNm" placeholder="매장" />
46
+											<input type="hidden" id="ITP_FORM_INOUTMNG02010_DETAIL_WHS_NM" class="form-control itp_input" name="swhsId" />
43 47
 										</div>
44 48
 										<div class="col-xs-1 itp_in" style="width:11%; padding:0px;">
45
-											<button type="button" id="ITP_BTN_INOUTMNG02010_SEARCH_STORE_ID" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
46
-											<button type="button" id="ITP_BTN_INOUTMNG02010_DELETE_STORE_ID" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
49
+											<button type="button" id="ITP_BTN_INOUTMNG02010_SEARCH_WHS_ID" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
50
+											<button type="button" id="ITP_BTN_INOUTMNG02010_DELETE_WHS_ID" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
47 51
 						                </div>
48 52
 										<div class="col-xs-4 itp_ip itp_noMar">
49
-											<input type="text" id="ITP_FORM_INOUTMNG02010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목번호 or 품목명" />
53
+											<input type="text" id="ITP_FORM_INOUTMNG02010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목번호 or 품목명" />
50 54
 										</div>
51 55
 									</div>
52 56
 								</form>

+ 90 - 6
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

@@ -113,7 +113,46 @@ const gridColModel = {
113 113
 			width: '10', fixed: false, align: 'center',
114 114
 			sortable: false, hidden: false
115 115
 		}
116
-	]
116
+	],
117
+	view: [
118
+		{
119
+			index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
120
+			label: ITP_MSG_LOCALE.label.pchPodrUnqNo,			// 발주번호
121
+			width: '10', fixed: false, align: 'center',
122
+			sortable: false, hidden: false
123
+		},
124
+		{
125
+			index: 'ITEM_ID', name: 'itemId',
126
+			label: ITP_MSG_LOCALE.label.itemId,					// 품목번호
127
+			width: '10', fixed: false, align: 'center',
128
+			sortable: false, hidden: false
129
+		},
130
+		{
131
+			index: 'ITEM_NM', name: 'itemNm',
132
+			label: ITP_MSG_LOCALE.label.itemNm,					// 품목명
133
+			width: '10', fixed: false, align: 'center',
134
+			sortable: false, hidden: false
135
+		},
136
+		{
137
+			index: 'PODR_QTY', name: 'podrQty',
138
+			label: ITP_MSG_LOCALE.label.podrQty,				// 발주수량
139
+			width: '10', fixed: false, align: 'center',
140
+			sortable: false, hidden: false
141
+		},
142
+		{
143
+			index: 'DLV_QTY', name: 'dlvQty',
144
+			label: ITP_MSG_LOCALE.label.dlvQty,					// 납품수량
145
+			width: '10', fixed: false, align: 'center',
146
+			sortable: false, hidden: false
147
+		},
148
+		{
149
+			index: 'EXPRY_DATE', name: 'expryDate',
150
+			label: ITP_MSG_LOCALE.label.expryDate,				// 발주번호
151
+			width: '10', fixed: false, align: 'center',
152
+			sortable: false, hidden: false
153
+		}
154
+	],
155
+	detail: []
117 156
 }
118 157
 
119 158
 
@@ -186,10 +225,10 @@ let pageObj = {
186 225
             fn_show_btn_auth_array(['#ITP_BTN_INOUTMNG02010_SRH', '#ITP_BTN_INOUTMNG02010_NEWREG']);
187 226
             $('#ITP_AJAX_INOUTMNG02010_LIST_CONTAINER').show();
188 227
             $('#ITP_FORM_INOUTMNG02010_SEARCH #ITP_FORM_INOUTMNG02010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
189
-            $('#ITP_BTN_INOUTMNG02010_PRINT').show();
190
-            $('#ITP_BTN_INOUTMNG02010_SRH').show();
191
-            $('#ITP_BTN_INOUTMNG02010_SEARCH_STORE_ID').show();
192
-            $('#ITP_BTN_INOUTMNG02010_DELETE_STORE_ID').show();
228
+            $('#ITP_BTN_INOUTMNG02010_SEARCH_SHMT_WHS_ID').show();
229
+            $('#ITP_BTN_INOUTMNG02010_DELETE_SHMT_WHS_NM').show();
230
+            $('#ITP_BTN_INOUTMNG02010_SEARCH_WHS_ID').show();
231
+            $('#ITP_BTN_INOUTMNG02010_DELETE_WHS_ID').show();
193 232
             
194 233
         } /*else if(mode == 'ADD') { // 등록
195 234
             $('#ITP_AJAX_INOUTMNG02010_DETAIL_CONTAINER').show();
@@ -248,7 +287,7 @@ let pageObj = {
248 287
 let listObj = {
249 288
 	init: function() {
250 289
 		this.grid.init();
251
-		//this.action();
290
+		this.action();
252 291
 	},
253 292
 	itp_INOUTMNG02010_param: {},
254 293
 	itp_INOUTMNG02010_search: false,
@@ -308,6 +347,7 @@ let listObj = {
308 347
             	url: DOMAIN + API_POMNG_INOUTMNG_OUTSEARCH_GRID_LIST,
309 348
             	pager: INOUTMNG02010_GRID_PAGER,
310 349
 				multiselect: true,
350
+				multiboxonly : false,
311 351
 				rownumbers: false,/*
312 352
             	onCellSelect: function(rowId, cellIdx, cellValue) {
313 353
                     var cm = $(this).jqGrid('getGridParam', 'colModel');
@@ -339,7 +379,51 @@ let listObj = {
339 379
 		unload: function() {
340 380
 			$.jgrid.gridUnload(INOUTMNG02010_GRID_ID);
341 381
 		}
382
+	},
383
+	action: function() {
384
+		var _this = this;
385
+		// 출하창고 조회 버튼 클릭
386
+		$('#ITP_BTN_INOUTMNG02010_SEARCH_SHMT_WHS_ID').on('click', function() {
387
+			_this.popup('shmtWhs');
388
+		});
389
+		// 출하창고 텍스트 삭제 버튼 클릭
390
+		$('#ITP_BTN_INOUTMNG02010_DELETE_SHMT_WHS_NM').on('click', function() {
391
+			$('#ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_ID').val('');
392
+			$('#ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_NM').val('');
393
+		});
394
+		// 매장/창고 조회 버튼 클릭
395
+		$('#ITP_BTN_INOUTMNG02010_SEARCH_WHS_ID').on('click', function() {
396
+			_this.popup('whs');
397
+		});
398
+		// 매장/창고 텍스트 삭제 버튼 클릭
399
+		$('#ITP_BTN_INOUTMNG02010_DELETE_WHS_ID').on('click', function() {
400
+			$('#ITP_FORM_INOUTMNG02010_DETAIL_WHS_NM').val('');
401
+			$('#ITP_FORM_INOUTMNG02010_DETAIL_WHS_ID').val('');
402
+		});
403
+	},
404
+	popup: function(keyword) {
405
+		var popFn = this.callback.create;
406
+		// const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
407
+		if(keyword == 'shmtWhs'){
408
+			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, /*key*/null, 'S');
409
+		} else if(keyword == 'whs'){
410
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, /*key*/null, 'S');
411
+		}
412
+	},
413
+	callback: {
414
+		create: function(rowDataPop) {
415
+			console.log(rowDataPop);
416
+			if(rowDataPop.hasOwnProperty('whsId') == false) {
417
+				$('#ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_ID').val(rowDataPop.spplyNm);
418
+				$('#ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_NM').val(rowDataPop.spplyId);
419
+			} else {
420
+				$('#ITP_FORM_INOUTMNG02010_DETAIL_WHS_NM').val(rowDataPop.whsNm);
421
+				$('#ITP_FORM_INOUTMNG02010_DETAIL_WHS_ID').val(rowDataPop.whsId);
422
+			}
423
+		}
342 424
 	}
343 425
 }
344 426
 
427
+
428
+
345 429
 console.log(CODE_LIST);