Просмотр исходного кода

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

isna лет назад: 2
Родитель
Сommit
28c06c0c09

+ 40 - 6
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG01010.js

@@ -38,12 +38,6 @@ let API_DETAIL_SAVE 	 = '/api/pomng/inoutmng/save-inst-shmt';			// 출하지시
38 38
 /*화면 Grid ColModel*/
39 39
 const gridColModel = {
40 40
 	list: [
41
-		{
42
-			index: 'BRAND_ID', name: 'brandId',
43
-			label: ITP_MSG_LOCALE.label.brandId, //브랜드아이디
44
-			width: '13', fixed: false, align: 'center',
45
-			sortable: false, hidden: true
46
-		},
47 41
 		{
48 42
 			index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
49 43
 			label: ITP_MSG_LOCALE.label.pchPodrUnqNo, //구매발주번호
@@ -647,6 +641,46 @@ let listObj = {
647 641
 				rownumbers: false,
648 642
 				loadComplete: function(data) {
649 643
 					itp_fn_grid_load_complete(data, INOUTMNG01010_GRID_ID, true, 'number', 'INOUTMNG01010', listObj.itp_INOUTMNG01010_search, listObj.empty, true, data.gridRecords, true);
644
+					const self=this;
645
+					if(self.sortUse) return;
646
+					self.sortUse=true;
647
+					$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').css('cursor','default');
648
+					$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(1).css('cursor','pointer');
649
+					$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(2).css('cursor','pointer');
650
+					$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(4).css('cursor','pointer');
651
+					$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-labels>th').on('click', function() {
652
+						const idx=$(this).index();
653
+						console.log("xxxx grid header click xxxxxxx index=="+idx, param );
654
+						if(idx==1 || idx==2 || idx==4) {
655
+							var field='',sort=self['sort'+idx];
656
+							if(sort ) {
657
+								sort=sort=='asc'?'desc':'asc';
658
+							} else {
659
+								// 등록일 내림차순, 제목 오름차순
660
+								sort=idx==1? 'asc':idx==2? 'desc': 'asc';
661
+							}
662
+							const icon=sort=='asc'? '.glyphicon-triangle-bottom': '.glyphicon-triangle-top'; 
663
+							self['sort'+idx]=sort;
664
+							if(idx==1) {
665
+								field='pchPodrUnqNo';
666
+							} else if(idx==2) {
667
+								field='pchPodrDtlNo';
668
+							} else if(idx==4) {
669
+								field='itemNm';
670
+							} 
671
+							param.page=1;
672
+							param.sidx=field;
673
+							param.sord=sort;
674
+							
675
+							$(INOUTMNG01010_GRID_ID).jqGrid('setGridParam',{
676
+								postData:JSON.stringify(param)
677
+							}).trigger('reloadGrid');
678
+							$(this).find('.s-ico').show();
679
+							$(this).find('.ui-grid-ico-sort').hide();
680
+							$(this).find(icon).show();
681
+
682
+						}
683
+					});
650 684
 				},
651 685
 				onPaging: function(action) {
652 686
 					itp_fn_grid_paging(INOUTMNG01010_GRID_ID, action, param);

+ 37 - 0
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

@@ -379,6 +379,43 @@ let listObj = {
379 379
 				loadComplete: function(data) {
380 380
                     itp_fn_grid_load_complete(data, INOUTMNG02010_GRID_ID, true, 'number', 'INOUTMNG02010', listObj.itp_INOUTMNG02010_search, listObj.empty, true, data.gridRecords, true);
381 381
 					$('#cb_ITP_INOUTMNG02010_jqGrid').hide();
382
+					const self=this;
383
+					if(self.sortUse) return;
384
+					self.sortUse=true;
385
+					$(INOUTMNG02010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').css('cursor','default');
386
+					$(INOUTMNG02010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(7).css('cursor','pointer');
387
+					$(INOUTMNG02010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(14).css('cursor','pointer');
388
+					$(INOUTMNG02010_GRID_LIST).find('.ui-jqgrid-labels>th').on('click', function() {
389
+						const idx=$(this).index();
390
+						console.log("xxxx grid header click xxxxxxx index=="+idx, param );
391
+						if(idx==7 || idx==14) {
392
+							var field='',sort=self['sort'+idx];
393
+							if(sort ) {
394
+								sort=sort=='asc'?'desc':'asc';
395
+							} else {
396
+								// 등록일 내림차순, 제목 오름차순
397
+								sort=idx==7? 'asc':idx==14? 'desc': 'asc';
398
+							}
399
+							const icon=sort=='asc'? '.glyphicon-triangle-bottom': '.glyphicon-triangle-top'; 
400
+							self['sort'+idx]=sort;
401
+							if(idx==7) {
402
+								field='itemNm';
403
+							} else if(idx==14) {
404
+								field='rtnPodrDtlNo';
405
+							} 
406
+							param.page=1;
407
+							param.sidx=field;
408
+							param.sord=sort;
409
+							
410
+							$(INOUTMNG02010_GRID_ID).jqGrid('setGridParam',{
411
+								postData:JSON.stringify(param)
412
+							}).trigger('reloadGrid');
413
+							$(this).find('.s-ico').show();
414
+							$(this).find('.ui-grid-ico-sort').hide();
415
+							$(this).find(icon).show();
416
+
417
+						}
418
+					});
382 419
 				},
383 420
 				onCellSelect: function(rowId, cellIdx, cellValue) {
384 421
 					$(this).resetSelection();

+ 43 - 12
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG04010.js

@@ -22,18 +22,6 @@ let API_RTNMNG_INOUTMNG_OUTSEARCH_GRID_LIST = '/api/rtnmng/inoutmng/colsearch-gr
22 22
 //화면 grid ColModel
23 23
 const gridColModel = {
24 24
 	list:[
25
-		{
26
-			index: 'VIEW_CD', name: 'viewCd',
27
-			label: ITP_MSG_LOCALE.label.viewCd,
28
-			width: '10', fixed: false, align: 'center',
29
-			sortable: false, hidden: true
30
-		},
31
-		{
32
-			index: 'BRAND_NM', name: 'brandId',
33
-			label: ITP_MSG_LOCALE.label.brandId,				// 브랜드아이디
34
-			width: '10', fixed: false, align: 'center',
35
-			sortable: false, hidden: true
36
-		},
37 25
 		{
38 26
 			index: 'SHMT_REQ_UNQ_NO', name: 'colCmdUnqNo',
39 27
 			label: '수거번호',										// 수거지시번호
@@ -313,6 +301,49 @@ let listObj = {
313 301
             	loadComplete: function(data) {
314 302
                     itp_fn_grid_load_complete(data, INOUTMNG04010_GRID_ID, true, 'number', 'INOUTMNG04010', listObj.itp_INOUTMNG04010_search, listObj.empty, true, data.gridRecords, true);
315 303
 					$('#cb_ITP_INOUTMNG04010_jqGrid').hide();
304
+					const self=this;
305
+					if(self.sortUse) return;
306
+					self.sortUse=true;
307
+					$(INOUTMNG04010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').css('cursor','default');
308
+					$(INOUTMNG04010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(1).css('cursor','pointer');
309
+					$(INOUTMNG04010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(2).css('cursor','pointer');
310
+					$(INOUTMNG04010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(3).css('cursor','pointer');
311
+					$(INOUTMNG04010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(4).css('cursor','pointer');
312
+					$(INOUTMNG04010_GRID_LIST).find('.ui-jqgrid-labels>th').on('click', function() {
313
+						const idx=$(this).index();
314
+						console.log("xxxx grid header click xxxxxxx index=="+idx, param );
315
+						if(idx==1 || idx==2 || idx==3 || idx==4) {
316
+							var field='',sort=self['sort'+idx];
317
+							if(sort ) {
318
+								sort=sort=='asc'?'desc':'asc';
319
+							} else {
320
+								// 등록일 내림차순, 제목 오름차순
321
+								sort=idx==1? 'asc':idx==2? 'desc': 'asc';
322
+							}
323
+							const icon=sort=='asc'? '.glyphicon-triangle-bottom': '.glyphicon-triangle-top'; 
324
+							self['sort'+idx]=sort;
325
+							if(idx==1) {
326
+								field='colCmdUnqNo';
327
+							} else if(idx==2) {
328
+								field='colCmdDtlNo';
329
+							} else if(idx==3) {
330
+								field='rtnPodrUnqNo';
331
+							} else if(idx==4) {
332
+								field='rtnPodrDtlNo';
333
+							} 
334
+							param.page=1;
335
+							param.sidx=field;
336
+							param.sord=sort;
337
+							
338
+							$(INOUTMNG04010_GRID_ID).jqGrid('setGridParam',{
339
+								postData:JSON.stringify(param)
340
+							}).trigger('reloadGrid');
341
+							$(this).find('.s-ico').show();
342
+							$(this).find('.ui-grid-ico-sort').hide();
343
+							$(this).find(icon).show();
344
+
345
+						}
346
+					});
316 347
 				},
317 348
 				onCellSelect: function(rowId, cellIdx, cellValue) {
318 349
 					$(this).resetSelection();