Sfoglia il codice sorgente

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

juney 2 anni fa
parent
commit
a8e2f65d09

+ 9 - 5
src/main/webapp/js/app/config.js

@@ -1752,7 +1752,7 @@ function itp_fn_grid_paging(grid_id, action, args) {
1752 1752
 	let currentPage = gridOption.page;
1753 1753
 	const lastPage = gridOption.lastpage;
1754 1754
     const userPage = $(suffix).find('.ui-pg-input').val();
1755
-
1755
+	if(!currentPage) currentPage=1;
1756 1756
     if (action == 'next') {
1757 1757
         if (currentPage < lastPage) {
1758 1758
             currentPage += 1;
@@ -1773,10 +1773,14 @@ function itp_fn_grid_paging(grid_id, action, args) {
1773 1773
         }
1774 1774
     }
1775 1775
 
1776
-    args.gridPage = currentPage;
1777
-    $(grid_id).setGridParam({
1778
-        postData : JSON.stringify(args)
1779
-    });
1776
+    var param=$(grid_id).data('grid-param');
1777
+	if( typeof param=='object' ) {
1778
+		console.log("itp_fn_grid_paging param==",param);
1779
+	} else {
1780
+		param=args;
1781
+	}
1782
+    param.gridPage = currentPage;
1783
+    $(grid_id).setGridParam( {'postData': JSON.stringify(param)});
1780 1784
 };
1781 1785
 
1782 1786
 function itp_fn_grid_sorting(grid_id, index, sortOrder, args) {

+ 12 - 43
src/main/webapp/js/app/oper/ITP_OPER01010.js

@@ -46,45 +46,15 @@ let API_DETAIL_SAVE 		= '/api/user/save-user';
46 46
 let API_CHECK_DUPLICATE 	= '/api/user/check-duplicate';
47 47
 let API_INTI_USERPW 		= '/api/user/inti-userpw';
48 48
 let API_POP_GRID_LIST 		= '/api/brand/pop-grid-list';
49
-
50
-let gridParams=null;
51
-function itp_fn_grid_make_remote(option) {
52
-	var options = $.extend({
53
-		mtype: 'POST',
54
-		multiselect: false,
55
-		rownumbers: true,
56
-		
57
-		ondblClickRow: null,
58
-		loadBeforeSend: function(jqXHR) {
59
-			jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
60
-		},
61
-		onPaging: function(action) {
62
-			console.log("xxxxxx onPaging xxxxxxxx", option.param, gridParams );
63
-			itp_fn_grid_paging(option.gridId, action, gridParams);
64
-		},
65
-		loadError: function(jqXHR, textStatus, errorThrown) {
66
-			itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
67
-		}
68
-	}, option);
69
-
70
-	$(options.gridId).jqGrid({
71
-		colModel: options.colModel,
72
-		postData: JSON.stringify(options.param),
73
-		mtype: options.mtype,
74
-		url: options.url,
75
-		pager: options.pager,
76
-		multiselect: options.multiselect,
77
-		rownumbers: options.rownumbers,
78
-		loadBeforeSend: options.loadBeforeSend,
79
-		onCellSelect: options.onCellSelect,
80
-		ondblClickRow: options.ondblClickRow,
81
-		loadComplete: options.loadComplete,
82
-		loadError: options.loadError,
83
-		onPaging: options.onPaging
84
-	}).navGrid(options.pager, ITP_GRID_NAV_DEFAULTS.navGrid); 
85
-	console.log("xxxxxx itp_fn_grid_make_remote xxxxxxxx", options );
86
-}
87
-
49
+ 
50
+$(window).on('resize', function(e) {
51
+	setTimeout(()=>{
52
+		const left=$(OPER01010_GRID_PAGER+'_left'), pageing=$(OPER01010_GRID_PAGER+'_center').find('table');
53
+		left.width(60);
54
+		pageing.width(150);
55
+	}, 100);
56
+});
57
+ 
88 58
 /*화면 Grid ColModel*/
89 59
 const gridColModel = {
90 60
 	list: [
@@ -237,7 +207,6 @@ const gridColModel = {
237 207
 /*화면공통 Object*/
238 208
 let pageObj = {
239 209
 	init: function () {
240
-		itp_fn_jqgrid_resize(OPER01010_GRID_ID, OPER01010_GRID_LIST, 'lg');
241 210
 		this.ui.init();
242 211
 		this.event.init();
243 212
 		afflShopObj.init();
@@ -361,6 +330,7 @@ let pageObj = {
361 330
 			$(this).hide();
362 331
 		});
363 332
 		if(mode === 'LIST') { // 목록
333
+			itp_fn_fire_window_resize();
364 334
 			$('#ITP_AJAX_OPER01010_LIST_CONTAINER').show();
365 335
 			if(fn_make_user_info.get('authTpCd') === '10') {
366 336
 				$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_NM').attr('readonly', false);
@@ -423,7 +393,7 @@ let listObj = {
423 393
 			let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
424 394
 			param.gridSize = $.jgrid.defaults.rowNum;
425 395
 			param.gridPage = $.jgrid.defaults.page;
426
-			gridParams=param;
396
+			$(OPER01010_GRID_ID).data('grid-param',param);
427 397
 			$(OPER01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
428 398
 		},
429 399
 		create:  function () {
@@ -436,8 +406,7 @@ let listObj = {
436 406
 		init: function() {
437 407
 			// 데이터 없을때
438 408
 			this.itp_fn_OPER01010_empty.push();
439
-			//itp_fn_jqgrid_resize(OPER01010_GRID_ID, OPER01010_GRID_LIST, 'lg');
440
-			itp_fn_fire_window_resize();
409
+			itp_fn_jqgrid_resize(OPER01010_GRID_ID, OPER01010_GRID_LIST, 'lg'); 
441 410
 			this.search();
442 411
 		},
443 412
 		colModel: gridColModel.list,