|
@@ -1,146 +0,0 @@
|
1
|
|
-require(['config'], function() {
|
2
|
|
- require([
|
3
|
|
- 'jquery'
|
4
|
|
- ], function($) {
|
5
|
|
-
|
6
|
|
- });
|
7
|
|
-});
|
8
|
|
-
|
9
|
|
-let API_POP_GRID_LIST = '/api/whs/mng/pop-whs-search';
|
10
|
|
-
|
11
|
|
-function itp_fn_BIZPOP_WHS_LOCATION(parentPopFn, args, returnType) {
|
12
|
|
- console.log(args);
|
13
|
|
- let itp_BIZPOP_WHS_LOCATION_param = {};
|
14
|
|
- let itp_BIZPOP_WHS_LOCATION_search = false;
|
15
|
|
-
|
16
|
|
- const THIS_FORM_ID = '#ITP_FORM_BIZPOP_WHS_LOCATION';
|
17
|
|
- const THIS_GIRD_ID = '#ITP_BIZPOP_WHS_LOCATION_jqGrid';
|
18
|
|
- const THIS_GIRD_PAGER = '#ITP_BIZPOP_WHS_LOCATION_jqGridPager';
|
19
|
|
-
|
20
|
|
- $('#ITP_FORM_BIZPOP_WHS_LOCATION_BRAND_ID').val(fn_make_user_info.get('brandId'));
|
21
|
|
- $('#ITP_FORM_BIZPOP_WHS_LOCATION_STORE_ID').val(fn_make_user_info.get('storeId'));
|
22
|
|
- $('#ITP_FORM_BIZPOP_WHS_LOCATION_WHS_DVSN').val(args.whsDvsn);
|
23
|
|
-
|
24
|
|
-
|
25
|
|
- $('#ITP_BIZPOP_WHS_LOCATION').one('shown.bs.modal', function(e) {
|
26
|
|
- itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_WHS_LOCATION_jqGrid_list', '');
|
27
|
|
- itp_fn_fire_window_resize();
|
28
|
|
- }).one('hidden.bs.modal', function(e) {
|
29
|
|
- $('#ITP_BIZPOP_WHS_LOCATION').remove();
|
30
|
|
- }).modal('show');
|
31
|
|
-
|
32
|
|
- $('#ITP_BIZPOP_WHS_LOCATION_BTN_SEARCH').on('click', function() {
|
33
|
|
- itp_BIZPOP_WHS_LOCATION_search = true;
|
34
|
|
- let param = $(THIS_FORM_ID).serializeObject();
|
35
|
|
- param.gridSize = 10;
|
36
|
|
- param.gridPage = $.jgrid.defaults.page;
|
37
|
|
- $(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
|
38
|
|
- });
|
39
|
|
-
|
40
|
|
- $('#ITP_BIZPOP_WHS_LOCATION_BTN_SELECT').on('click', function() {
|
41
|
|
-
|
42
|
|
- const rowKey = $(THIS_GIRD_ID).getGridParam('selrow');
|
43
|
|
- if (!rowKey) {
|
44
|
|
- return;
|
45
|
|
- }
|
46
|
|
-
|
47
|
|
- const selRow = $(THIS_GIRD_ID).getRowData(rowKey);
|
48
|
|
- parentPopFn(selRow);
|
49
|
|
-
|
50
|
|
-
|
51
|
|
- $('#ITP_BIZPOP_WHS_LOCATION').modal('hide'); // 팝업닫기
|
52
|
|
- });
|
53
|
|
-
|
54
|
|
- $('#ITP_BIZPOP_WHS_LOCATION_jqGridEmpty').on('click', function() {
|
55
|
|
- itp_fn_BIZPOP_WHS_LOCATION_empty.back();
|
56
|
|
- itp_BIZPOP_WHS_LOCATION_param.gridSize = 10;
|
57
|
|
- $(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_WHS_LOCATION_param)}).trigger('reloadGrid');
|
58
|
|
- });
|
59
|
|
-
|
60
|
|
- var itp_fn_BIZPOP_WHS_LOCATION_empty = {
|
61
|
|
- push: function() {
|
62
|
|
- let param = $(THIS_FORM_ID).serializeObject();
|
63
|
|
- itp_BIZPOP_WHS_LOCATION_param = param;
|
64
|
|
- },
|
65
|
|
- back: function() {
|
66
|
|
- $(THIS_FORM_ID + '_BRAND_ID').val(itp_BIZPOP_WHS_LOCATION_param.sbrandId);
|
67
|
|
- $(THIS_FORM_ID + '_STROE_ID').val(itp_BIZPOP_WHS_LOCATION_param.sstoreId);
|
68
|
|
- }
|
69
|
|
- };
|
70
|
|
-
|
71
|
|
- itp_fn_BIZPOP_WHS_LOCATION_empty.push();
|
72
|
|
- let param = $('#ITP_FORM_BIZPOP_WHS_LOCATION').serializeObject();
|
73
|
|
- param.gridSize = 10;
|
74
|
|
- console.log(JSON.stringify(param));
|
75
|
|
-
|
76
|
|
- $(THIS_GIRD_ID).jqGrid({
|
77
|
|
- colModel: [
|
78
|
|
- {
|
79
|
|
- index: 'BRAND_ID', name: 'brandId',
|
80
|
|
- label: '브랜드아이디', //
|
81
|
|
- width: '10', fixed: false, align: 'center',
|
82
|
|
- sortable: false, hidden: true
|
83
|
|
- },
|
84
|
|
- {
|
85
|
|
- index: 'BRAND_NM', name: 'brandNm',
|
86
|
|
- label: '브랜드명', //
|
87
|
|
- width: '12', fixed: false, align: 'left',
|
88
|
|
- sortable: false, hidden: false
|
89
|
|
- },
|
90
|
|
- {
|
91
|
|
- index: 'WHS_ID', name: 'whsId',
|
92
|
|
- label: '창고아이디', //
|
93
|
|
- width: '6', fixed: false, align: 'center',
|
94
|
|
- sortable: false, hidden: true
|
95
|
|
- },
|
96
|
|
- {
|
97
|
|
- index: 'WHS_NM', name: 'whsNm',
|
98
|
|
- label: '창고명', //
|
99
|
|
- width: '6', fixed: false, align: 'right',
|
100
|
|
- sortable: false, hidden: false
|
101
|
|
- },
|
102
|
|
- {
|
103
|
|
- index: 'LOCATION', name: 'location',
|
104
|
|
- label: 'LOCATION', //
|
105
|
|
- width: '6', fixed: false, align: 'center',
|
106
|
|
- sortable: false, hidden: true
|
107
|
|
- },
|
108
|
|
- {
|
109
|
|
- index: 'LOCATION_NM', name: 'locationNm',
|
110
|
|
- label: 'LOCATION명', //
|
111
|
|
- width: '6', fixed: false, align: 'center',
|
112
|
|
- sortable: false, hidden: false
|
113
|
|
- },
|
114
|
|
- {
|
115
|
|
- index: 'STCK_DVSN', name: 'stckDvsn',
|
116
|
|
- label: '창고구분', //
|
117
|
|
- width: '10', fixed: false, align: 'center',
|
118
|
|
- sortable: false, hidden: true
|
119
|
|
- },
|
120
|
|
- {
|
121
|
|
- index: 'STCK_DVSN_NM', name: 'stckDvsnNm',
|
122
|
|
- label: '창고구분명', //
|
123
|
|
- width: '10', fixed: false, align: 'center',
|
124
|
|
- sortable: false, hidden: false
|
125
|
|
- }
|
126
|
|
- ],
|
127
|
|
- loadBeforeSend: function(jqXHR) {
|
128
|
|
- jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
|
129
|
|
- },
|
130
|
|
- postData: JSON.stringify(param),
|
131
|
|
- url: DOMAIN + API_POP_GRID_LIST,
|
132
|
|
- pager: THIS_GIRD_PAGER,
|
133
|
|
- multiselect: false,
|
134
|
|
- rownumbers: false,
|
135
|
|
- loadComplete: function(data) {
|
136
|
|
- console.log(data);
|
137
|
|
- itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_WHS_LOCATION', itp_BIZPOP_WHS_LOCATION_search, itp_fn_BIZPOP_WHS_LOCATION_empty, true, data.gridRecords, false);
|
138
|
|
- },
|
139
|
|
- loadError: function(jqXHR, textStatus, errorThrown) {
|
140
|
|
- itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
|
141
|
|
- },
|
142
|
|
- onPaging: function(action) {
|
143
|
|
- itp_fn_grid_paging(THIS_GIRD_ID, action, param);
|
144
|
|
- }
|
145
|
|
- }).navGrid(THIS_GIRD_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
|
146
|
|
-};
|