|
@@ -27,19 +27,12 @@ let INOUTMNG01010_LAST_ROW_ID;
|
27
|
27
|
|
28
|
28
|
|
29
|
29
|
/*API URL*/
|
30
|
|
-let API_DETAIL_GRID_LIST = '/api/pomng/inoutmng/target-grid-list'; // 목록
|
|
30
|
+let API_DETAIL_GRID_LIST = '/api/pomng/inoutmng/target-grid-list'; // 목록
|
31
|
31
|
|
32
|
32
|
|
33
|
33
|
/*화면 Grid ColModel*/
|
34
|
34
|
const gridColModel = {
|
35
|
35
|
list: [
|
36
|
|
- {
|
37
|
|
- index: 'SEL_CHK', name: 'selChk',
|
38
|
|
- label: ITP_MSG_LOCALE.label.selChk, //브랜드아이디
|
39
|
|
- width: '13', fixed: false, align: 'center',
|
40
|
|
- sortable: false, hidden: false,editable: true,
|
41
|
|
- formatter: 'checkbox', edittype:"checkbox", editoptions :{value:'Y:N', defaultValue:'N'}
|
42
|
|
- },
|
43
|
36
|
{
|
44
|
37
|
index: 'BRAND_ID', name: 'brandId',
|
45
|
38
|
label: ITP_MSG_LOCALE.label.brandId, //브랜드아이디
|
|
@@ -99,29 +92,29 @@ const gridColModel = {
|
99
|
92
|
label: ITP_MSG_LOCALE.label.unitAmt, //단가
|
100
|
93
|
width: '6', fixed: false, align: 'right',
|
101
|
94
|
sortable: false, hidden: false,
|
102
|
|
- formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
|
95
|
+ formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
103
|
96
|
},
|
104
|
97
|
{
|
105
|
98
|
index: 'PODR_QTY', name: 'podrQty',
|
106
|
99
|
label: ITP_MSG_LOCALE.label.podrQty, //발주수량
|
107
|
100
|
width: '10', fixed: false, align: 'right',
|
108
|
101
|
sortable: false, hidden: false,
|
109
|
|
- formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
|
102
|
+ formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
110
|
103
|
},
|
111
|
104
|
{
|
112
|
105
|
index: 'SHMT_QTY', name: 'shmtQty',
|
113
|
106
|
label: ITP_MSG_LOCALE.label.shmtQty, //출고수량
|
114
|
107
|
width: '10', fixed: false, align: 'right',
|
115
|
108
|
sortable: true, editable: true, edittype: 'text',
|
116
|
|
- editrules: {required: true, number:true},
|
117
|
|
- formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
|
109
|
+ editrules: { required: true, number: true },
|
|
110
|
+ formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
118
|
111
|
},
|
119
|
112
|
{
|
120
|
113
|
index: 'STCK_QTY', name: 'stckQty',
|
121
|
114
|
label: ITP_MSG_LOCALE.label.stckQty, //현 재고
|
122
|
115
|
width: '10', fixed: false, align: 'right',
|
123
|
116
|
sortable: false, hidden: false,
|
124
|
|
- formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
|
117
|
+ formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
125
|
118
|
},
|
126
|
119
|
{
|
127
|
120
|
index: 'EXPRY_YN', name: 'expryYn',
|
|
@@ -140,15 +133,15 @@ const gridColModel = {
|
140
|
133
|
label: ITP_MSG_LOCALE.label.expryDate, //유통일자
|
141
|
134
|
width: '20', fixed: false, align: 'center',
|
142
|
135
|
sortable: false, hidden: false,
|
143
|
|
- editable:true, sorttype:"date",
|
144
|
|
- editoptions : { dataInit : function(e) { $(e).datepicker( ITP_DATE_LANGUAGE ); } }
|
|
136
|
+ editable: true, sorttype: "date",
|
|
137
|
+ editoptions: { dataInit: function(e) { $(e).datepicker(ITP_DATE_LANGUAGE); } }
|
145
|
138
|
},
|
146
|
139
|
{
|
147
|
140
|
index: 'PODR_AMT', name: 'podrAmt',
|
148
|
141
|
label: ITP_MSG_LOCALE.label.podrAmt, //발주금액
|
149
|
142
|
width: '10', fixed: false, align: 'right',
|
150
|
143
|
sortable: false, hidden: false,
|
151
|
|
- formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
|
144
|
+ formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
|
152
|
145
|
},
|
153
|
146
|
{
|
154
|
147
|
index: 'DLV_REQ_DT', name: 'dlvReqDt',
|
|
@@ -181,7 +174,7 @@ const gridColModel = {
|
181
|
174
|
|
182
|
175
|
/*목록화면 Object*/
|
183
|
176
|
let listObj = {
|
184
|
|
- init: function () {
|
|
177
|
+ init: function() {
|
185
|
178
|
this.view();
|
186
|
179
|
this.action();
|
187
|
180
|
this.event.init();
|
|
@@ -193,17 +186,17 @@ let listObj = {
|
193
|
186
|
|
194
|
187
|
// 공통코드 표시
|
195
|
188
|
$('select').each(function() {
|
196
|
|
- if($(this).data('select-code')) {
|
|
189
|
+ if ($(this).data('select-code')) {
|
197
|
190
|
fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
|
198
|
191
|
}
|
199
|
192
|
});
|
200
|
|
-
|
|
193
|
+
|
201
|
194
|
var now = new Date();
|
202
|
195
|
$('#ITP_TAB_INOUTMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
|
203
|
196
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setDate(now.getDate())));
|
204
|
|
- $('#ITP_FORM_INOUTMNG01010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+30)));
|
205
|
|
-
|
206
|
|
-
|
|
197
|
+ $('#ITP_FORM_INOUTMNG01010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 30)));
|
|
198
|
+
|
|
199
|
+
|
207
|
200
|
},
|
208
|
201
|
itp_INOUTMNG01010_search: false,
|
209
|
202
|
button: {
|
|
@@ -214,29 +207,22 @@ let listObj = {
|
214
|
207
|
param.gridSize = $.jgrid.defaults.rowNum;
|
215
|
208
|
param.gridPage = $.jgrid.defaults.page;
|
216
|
209
|
param.sbrandId = fn_make_user_info.get('brandId');
|
217
|
|
- $(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
|
|
210
|
+ $(INOUTMNG01010_GRID_ID).setGridParam({ 'postData': JSON.stringify(param) }).trigger('reloadGrid');
|
218
|
211
|
},
|
219
|
212
|
shmtout: function() {
|
220
|
|
-
|
221
|
|
-
|
222
|
|
-
|
223
|
|
-
|
224
|
|
-
|
|
213
|
+
|
225
|
214
|
console.log("search event");
|
226
|
215
|
listObj.itp_INOUTMNG01010_search = true;
|
227
|
216
|
let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
|
228
|
217
|
param.gridSize = $.jgrid.defaults.rowNum;
|
229
|
218
|
param.gridPage = $.jgrid.defaults.page;
|
230
|
219
|
param.sbrandId = fn_make_user_info.get('brandId');
|
231
|
|
- $(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
|
232
|
|
-
|
233
|
|
-
|
234
|
|
-
|
235
|
|
-
|
236
|
|
-
|
|
220
|
+ $(INOUTMNG01010_GRID_ID).setGridParam({ 'postData': JSON.stringify(param) }).trigger('reloadGrid');
|
|
221
|
+
|
|
222
|
+
|
237
|
223
|
}
|
238
|
224
|
},
|
239
|
|
- action: function () {
|
|
225
|
+ action: function() {
|
240
|
226
|
var _this = this;
|
241
|
227
|
// 출하창고 조회 버튼 클릭
|
242
|
228
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SHMT_WHS_NM').on('click', function() {
|
|
@@ -248,9 +234,9 @@ let listObj = {
|
248
|
234
|
console.log("=================================");
|
249
|
235
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM').val('');
|
250
|
236
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID').val('');
|
251
|
|
-
|
|
237
|
+
|
252
|
238
|
});
|
253
|
|
-
|
|
239
|
+
|
254
|
240
|
// 납품장소 조회 버튼 클릭
|
255
|
241
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_WHS_NM').on('click', function() {
|
256
|
242
|
console.log("=================================");
|
|
@@ -262,55 +248,55 @@ let listObj = {
|
262
|
248
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM').val('');
|
263
|
249
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID').val('');
|
264
|
250
|
});
|
265
|
|
-
|
|
251
|
+
|
266
|
252
|
},
|
267
|
|
- popup: function (arg) {
|
268
|
|
- var popFn ;
|
|
253
|
+ popup: function(arg) {
|
|
254
|
+ var popFn;
|
269
|
255
|
// 팝업
|
270
|
256
|
if (arg == "S") {
|
271
|
257
|
popFn = this.callback.shmtwhs;
|
272
|
258
|
} else {
|
273
|
259
|
popFn = this.callback.whs;
|
274
|
260
|
}
|
275
|
|
-
|
|
261
|
+
|
276
|
262
|
var whsDvsn = "";
|
277
|
|
-
|
|
263
|
+
|
278
|
264
|
if (arg == "S") {
|
279
|
265
|
whsDvsn = "W01";
|
280
|
266
|
} else {
|
281
|
267
|
whsDvsn = "W02";
|
282
|
268
|
}
|
283
|
|
-
|
284
|
|
- const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn: whsDvsn};
|
285
|
|
-
|
286
|
|
-
|
287
|
|
-
|
|
269
|
+
|
|
270
|
+ const key = { brandId: fn_make_user_info.get('brandId'), storeId: fn_make_user_info.get('storeId'), whsDvsn: whsDvsn };
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
288
|
274
|
fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
|
289
|
|
-
|
|
275
|
+
|
290
|
276
|
},
|
291
|
277
|
callback: {
|
292
|
278
|
shmtwhs: function(rowDataPop) {
|
293
|
279
|
console.log(rowDataPop);
|
294
|
|
- if(rowDataPop) {
|
|
280
|
+ if (rowDataPop) {
|
295
|
281
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM').val(rowDataPop.whsNm);
|
296
|
282
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID').val(rowDataPop.whsId);
|
297
|
283
|
}
|
298
|
|
-
|
|
284
|
+
|
299
|
285
|
},
|
300
|
286
|
whs: function(rowDataPop) {
|
301
|
287
|
console.log(rowDataPop);
|
302
|
|
- if(rowDataPop) {
|
|
288
|
+ if (rowDataPop) {
|
303
|
289
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
|
304
|
290
|
$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
|
305
|
291
|
}
|
306
|
|
-
|
|
292
|
+
|
307
|
293
|
}
|
308
|
294
|
},
|
309
|
295
|
event: {
|
310
|
|
- init: function () {
|
|
296
|
+ init: function() {
|
311
|
297
|
this.button();
|
312
|
298
|
},
|
313
|
|
- button: function () {
|
|
299
|
+ button: function() {
|
314
|
300
|
// 버튼 클릭 이벤트
|
315
|
301
|
$('button').each(function() {
|
316
|
302
|
var id = $(this).attr('id');
|
|
@@ -318,22 +304,22 @@ let listObj = {
|
318
|
304
|
console.log("button");
|
319
|
305
|
console.log(id);
|
320
|
306
|
switch (id) {
|
321
|
|
- case 'ITP_BTN_INOUTMNG01010_SRH' : listObj.button.search(); break; // 조회 버튼 클릭
|
322
|
|
- case 'ITP_BTN_INOUTMNG01010_OUT' : listObj.button.shmtout(); break; // 출하지시 버튼
|
323
|
|
-
|
|
307
|
+ case 'ITP_BTN_INOUTMNG01010_SRH': listObj.button.search(); break; // 조회 버튼 클릭
|
|
308
|
+ case 'ITP_BTN_INOUTMNG01010_OUT': listObj.button.shmtout(); break; // 출하지시 버튼
|
|
309
|
+
|
324
|
310
|
}
|
325
|
311
|
});
|
326
|
312
|
});
|
327
|
|
-
|
|
313
|
+
|
328
|
314
|
$('body').on('click', function(e) {
|
329
|
315
|
var gridId = INOUTMNG01010_GRID_ID.replace('#', '');
|
330
|
316
|
var rids = $(INOUTMNG01010_GRID_ID).jqGrid('getDataIDs');
|
331
|
317
|
var last_row_id = rids[rids.length - 1];
|
332
|
|
-
|
333
|
|
- itp_fn_grid_reset_selection(e, last_row_id, gridId, 'INOUTMNG01010');
|
|
318
|
+
|
|
319
|
+ itp_fn_grid_reset_selection(e, last_row_id, gridId, 'INOUTMNG01010');
|
334
|
320
|
});
|
335
|
321
|
|
336
|
|
-
|
|
322
|
+
|
337
|
323
|
}
|
338
|
324
|
},
|
339
|
325
|
empty: {
|
|
@@ -343,7 +329,7 @@ let listObj = {
|
343
|
329
|
$(INOUTMNG01010_GRID_EMPTY).on('click', function() {
|
344
|
330
|
_this.back();
|
345
|
331
|
_this.itp_INOUTMNG01010_param.gridSize = $.jgrid.defaults.rowNum;
|
346
|
|
- $(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_INOUTMNG01010_param)}).trigger('reloadGrid');
|
|
332
|
+ $(INOUTMNG01010_GRID_ID).setGridParam({ 'postData': JSON.stringify(_this.itp_INOUTMNG01010_param) }).trigger('reloadGrid');
|
347
|
333
|
});
|
348
|
334
|
},
|
349
|
335
|
itp_INOUTMNG01010_param: {},
|
|
@@ -360,13 +346,13 @@ let listObj = {
|
360
|
346
|
}
|
361
|
347
|
},
|
362
|
348
|
grid: {
|
363
|
|
- init: function () {
|
|
349
|
+ init: function() {
|
364
|
350
|
// 데이터 없을때
|
365
|
351
|
listObj.empty.push();
|
366
|
352
|
itp_fn_jqgrid_resize(INOUTMNG01010_GRID_ID, INOUTMNG01010_GRID_LIST, 'lg');
|
367
|
353
|
itp_fn_fire_window_resize();
|
368
|
354
|
this.search();
|
369
|
|
-
|
|
355
|
+
|
370
|
356
|
},
|
371
|
357
|
colModel: gridColModel.list,
|
372
|
358
|
search: function() {
|
|
@@ -377,16 +363,18 @@ let listObj = {
|
377
|
363
|
let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
|
378
|
364
|
param.gridSize = $.jgrid.defaults.rowNum;
|
379
|
365
|
param.sbrandId = fn_make_user_info.get('brandId');
|
380
|
|
-
|
|
366
|
+
|
381
|
367
|
var option = {
|
382
|
|
- multiselect: false,
|
|
368
|
+ multiselect: true,
|
383
|
369
|
autowidth: true,
|
|
370
|
+ //cellEdit: true,
|
384
|
371
|
gridId: INOUTMNG01010_GRID_ID,
|
385
|
372
|
colModel: gridColModel.list,
|
|
373
|
+ //viewrecords:false,
|
386
|
374
|
param: param,
|
387
|
375
|
url: DOMAIN + API_DETAIL_GRID_LIST,
|
388
|
376
|
pager: INOUTMNG01010_GRID_PAGER,
|
389
|
|
-
|
|
377
|
+
|
390
|
378
|
onCellSelect: function(rowid, cellIdx, cellValue) {
|
391
|
379
|
INOUTMNG01010_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, INOUTMNG01010_LAST_ROW_ID, INOUTMNG01010_GRID_ID, ['pchPodrUnqNo']);
|
392
|
380
|
},
|
|
@@ -401,10 +389,10 @@ let listObj = {
|
401
|
389
|
},
|
402
|
390
|
button: {
|
403
|
391
|
},
|
404
|
|
- unload : function() {
|
|
392
|
+ unload: function() {
|
405
|
393
|
$.jgrid.gridUnload(INOUTMNG01010_GRID_ID);
|
406
|
394
|
},
|
407
|
|
- clearData : function() {
|
|
395
|
+ clearData: function() {
|
408
|
396
|
$(INOUTMNG01010_GRID_ID).jqGrid('clearGridData', true);
|
409
|
397
|
$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
|
410
|
398
|
$(INOUTMNG01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
|