|
@@ -33,18 +33,6 @@ let LOGIN_AUTH_TYPE_CD;
|
33
|
33
|
/*화면 Grid ColModel*/
|
34
|
34
|
const gridColModel = {
|
35
|
35
|
list: [
|
36
|
|
- {
|
37
|
|
- index: 'BRAND_ID', name: 'brandId',
|
38
|
|
- label: "브랜드ID",
|
39
|
|
- width: '0', fixed: false, align: 'center',
|
40
|
|
- sortable: false, hidden: true
|
41
|
|
- },
|
42
|
|
- {
|
43
|
|
- index: 'LOCATION', name: 'location',
|
44
|
|
- label: "로케이션",
|
45
|
|
- width: '0', fixed: false, align: 'center',
|
46
|
|
- sortable: false, hidden: true
|
47
|
|
- },
|
48
|
36
|
{
|
49
|
37
|
index: 'WHS_ID', name: 'whsId',
|
50
|
38
|
label: "창고번호",
|
|
@@ -400,6 +388,46 @@ let listObj = {
|
400
|
388
|
// $(STOCKMNG01010_GRID_ID).jqGrid('setCell', rowId, 'whsNm', '', ITP_GRID_COL_STYLE.link);
|
401
|
389
|
});
|
402
|
390
|
$('#cb_ITP_STOCKMNG01010_jqGrid').hide();
|
|
391
|
+ const self=this;
|
|
392
|
+ if(self.sortUse) return;
|
|
393
|
+ self.sortUse=true;
|
|
394
|
+ $(STOCKMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').css('cursor','default');
|
|
395
|
+ $(STOCKMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(1).css('cursor','pointer');
|
|
396
|
+ $(STOCKMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(3).css('cursor','pointer');
|
|
397
|
+ $(STOCKMNG01010_GRID_LIST).find('.ui-jqgrid-labels .ui-th-div').eq(5).css('cursor','pointer');
|
|
398
|
+ $(STOCKMNG01010_GRID_LIST).find('.ui-jqgrid-labels>th').on('click', function() {
|
|
399
|
+ const idx=$(this).index();
|
|
400
|
+ console.log("xxxx grid header click xxxxxxx index=="+idx, param );
|
|
401
|
+ if(idx==1 || idx==3 || idx==5) {
|
|
402
|
+ var field='',sort=self['sort'+idx];
|
|
403
|
+ if(sort ) {
|
|
404
|
+ sort=sort=='asc'?'desc':'asc';
|
|
405
|
+ } else {
|
|
406
|
+ // 등록일 내림차순, 제목 오름차순
|
|
407
|
+ sort=idx==1? 'asc':idx==3? 'desc': 'asc';
|
|
408
|
+ }
|
|
409
|
+ const icon=sort=='asc'? '.glyphicon-triangle-bottom': '.glyphicon-triangle-top';
|
|
410
|
+ self['sort'+idx]=sort;
|
|
411
|
+ if(idx==1) {
|
|
412
|
+ field='whsId';
|
|
413
|
+ } else if(idx==3) {
|
|
414
|
+ field='locationNm';
|
|
415
|
+ } else if(idx==5) {
|
|
416
|
+ field='itemNm';
|
|
417
|
+ }
|
|
418
|
+ param.page=1;
|
|
419
|
+ param.sidx=field;
|
|
420
|
+ param.sord=sort;
|
|
421
|
+
|
|
422
|
+ $(STOCKMNG01010_GRID_ID).jqGrid('setGridParam',{
|
|
423
|
+ postData:JSON.stringify(param)
|
|
424
|
+ }).trigger('reloadGrid');
|
|
425
|
+ $(this).find('.s-ico').show();
|
|
426
|
+ $(this).find('.ui-grid-ico-sort').hide();
|
|
427
|
+ $(this).find(icon).show();
|
|
428
|
+
|
|
429
|
+ }
|
|
430
|
+ });
|
403
|
431
|
},
|
404
|
432
|
onPaging: function(action) {
|
405
|
433
|
var param=$(STOCKMNG01010_GRID_ID).data('grid-param');
|