|
@@ -112,48 +112,7 @@ function itp_fn_BIZPOP_PO_STOCK_HIST(parentPopFn, args, returnType) {
|
112
|
112
|
multiselect: false,
|
113
|
113
|
loadComplete: function(data) {
|
114
|
114
|
itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_PO_STOCK_HIST', itp_BIZPOP_PO_STOCK_HIST_search, itp_fn_BIZPOP_PO_STOCK_HIST_empty, true, data.gridRecords, false);
|
115
|
|
- const self=this;
|
116
|
|
- if(self.sortUse) return;
|
117
|
|
- self.sortUse=true;
|
118
|
|
- self['sort2']='desc';
|
119
|
|
- const list=THIS_GIRD_ID+'_list';
|
120
|
|
- const th=$(list).find('.ui-jqgrid-labels .ui-th-div').eq(2);
|
121
|
|
- th.find('.s-ico').show();
|
122
|
|
- th.find('.ui-grid-ico-sort').hide();
|
123
|
|
- th.find('.glyphicon-triangle-top').show();//asc 는 bottom 으로
|
124
|
|
- //$(STOCK_MNG_HIST_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').css('cursor','default');
|
125
|
|
- $(list).find('th').eq(2).css({cursor:'pointer',background:'#FFEBCD'});
|
126
|
|
- $(list).find('.ui-jqgrid-labels>th').on('click', function() {
|
127
|
|
- const idx=$(this).index();
|
128
|
|
- console.log("xxxx grid header click xxxxxxx index=="+idx, param );
|
129
|
|
- if(idx==2 || idx==3) {
|
130
|
|
- var field='',sort=self['sort'+idx];
|
131
|
|
- if(sort ) {
|
132
|
|
- sort=sort=='asc'?'desc':'asc';
|
133
|
|
- } else {
|
134
|
|
- // 등록일 내림차순, 제목 오름차순
|
135
|
|
- sort=idx==2? 'asc':idx==3? 'desc': 'asc';
|
136
|
|
- }
|
137
|
|
- const icon=sort=='asc'? '.glyphicon-triangle-bottom': '.glyphicon-triangle-top';
|
138
|
|
- self['sort'+idx]=sort;
|
139
|
|
- if(idx==2) {
|
140
|
|
- field='sysRegDttm';
|
141
|
|
- } else if(idx==3) {
|
142
|
|
- field='pchPodrDtlNo';
|
143
|
|
- }
|
144
|
|
- param.page=1;
|
145
|
|
- param.sidx=field;
|
146
|
|
- param.sord=sort;
|
147
|
|
-
|
148
|
|
- $(THIS_GIRD_ID).jqGrid('setGridParam',{
|
149
|
|
- postData:JSON.stringify(param)
|
150
|
|
- }).trigger('reloadGrid');
|
151
|
|
- $(this).find('.s-ico').show();
|
152
|
|
- $(this).find('.ui-grid-ico-sort').hide();
|
153
|
|
- $(this).find(icon).show();
|
154
|
|
-
|
155
|
|
- }
|
156
|
|
- });
|
|
115
|
+
|
157
|
116
|
},
|
158
|
117
|
loadError: function(jqXHR, textStatus, errorThrown) {
|
159
|
118
|
itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
|