|
@@ -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();
|