Browse Source

모바일 납품장소 팝업 수정

juney 2 years ago
parent
commit
765b6217b1

+ 23 - 40
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG01010.js

@@ -200,67 +200,50 @@ let mobContObj = {
200
 let mobPopObj = {
200
 let mobPopObj = {
201
 	popWhsNm: {
201
 	popWhsNm: {
202
 		popId: 'ITP_POP_MCOLLMNG01010_WHS_AREA',
202
 		popId: 'ITP_POP_MCOLLMNG01010_WHS_AREA',
203
-		rows: [],
204
 		init: function () {
203
 		init: function () {
204
+			$('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .mb_0').children().remove();
205
+			$('#ITP_POP_MCOLLMNG01010_WHS_AREA #ITP_FORM_MCOLLMNG01010_POP_WHS_KEYWORD').val('');
205
 			this.rows.length = 0;
206
 			this.rows.length = 0;
206
 			mobPopObj.show(this.popId);
207
 			mobPopObj.show(this.popId);
207
 			this.search();
208
 			this.search();
208
 			this.action();
209
 			this.action();
209
 		},
210
 		},
211
+		rows: [],
210
 		search: function () {
212
 		search: function () {
211
 			var _this = this;
213
 			var _this = this;
212
-			$('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .panel-group').empty();
214
+			$('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .mb_0').empty();
213
 			var callbackFn = function(result) {
215
 			var callbackFn = function(result) {
214
-				console.log(result);
215
-				_this.view(result.gridRows);
216
+				$.each(result.gridRows, function (i, item) {
217
+					$('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MCOLLMNG01010_POP_WHS_ROWCOPY').html());
218
+					var $li = $('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .mb_0 > .row_2:last');
219
+					$li.find('.fnWhsNm').text(item.whsNm);
220
+					$li.find('.fnLocationNm').text(item.locationNm);
221
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
222
+					$li.find('.fnWhsId').data('location', item.location);
223
+					$('#ITP_LIST_MCOLLMNG01010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
224
+				});
216
 			};
225
 			};
217
 			const param = $('#ITP_FORM_MCOLLMNG01010_POP_WHS').serializeObject();
226
 			const param = $('#ITP_FORM_MCOLLMNG01010_POP_WHS').serializeObject();
218
-			param.swhsDvsn = 'W01';
227
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
219
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
228
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
220
 		},
229
 		},
221
-		view: function(gridRows) {
222
-			this.rows = gridRows;
223
-			$.each(gridRows, function (i, item) {
224
-				$('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MCOLLMNG01010_POP_WHS_ROWCOPY').html());
225
-				var $li = $('#ITP_LIST_MCOLLMNG01010_POP_WHS_AREA .panel-group > .item-row:last');
226
-				$li.find('.fnWhsNm').text(item.whsNm);
227
-				$li.find('.fnLocationNm').text(item.locationNm);
228
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
230
+		action: function() {
231
+			var _this = this;
232
+			$('#ITP_FORM_MCOLLMNG01010_POP_WHS button[id="ITP_BTN_MCOLLMNG01010_POP_WHS_SEARCH"]').off('click').on('click', function() {
233
+				_this.search();
229
 			});
234
 			});
230
 		},
235
 		},
231
 		choice: function(elem) {
236
 		choice: function(elem) {
232
-			var _this = this;
233
 			var whsId = $(elem).data('whs-id');
237
 			var whsId = $(elem).data('whs-id');
234
-			$.each(this.rows, function (i, item) {
235
-				if(whsId === item.whsId) {
236
-					$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_ID').val(item.whsId);
237
-					$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_NM').val(item.whsNm);
238
-					_this.close();
239
-					return false;
240
-				}
241
-			});
242
-		},
243
-		action: function() {
244
-			var _this = this;
245
-			$('button[id^="ITP_BTN_MCOLLMNG01010_POP_WHS"]').off('click').on('click', function() {
246
-				var id = $(this).attr('id');
247
-				switch (id) {
248
-					case 'ITP_BTN_MCOLLMNG01010_POP_WHS_SEARCH'	: _this.search();			break;
249
-					case 'ITP_BTN_MCOLLMNG01010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
250
-					case 'ITP_BTN_MCOLLMNG01010_POP_WHS_CLOSE'	: _this.close(); 			break;
251
-				}
252
-				return false;
253
-			});
238
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
239
+			var location = $(elem).data('location');
240
+			$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_ID').val(whsId);
241
+			$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_NM').val(whsNm);
242
+			mobPopObj.hide(this.popId);
254
 		},
243
 		},
255
 		delete: function() {
244
 		delete: function() {
256
 			$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_ID').val('');
245
 			$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_ID').val('');
257
 			$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_NM').val('');
246
 			$('#ITP_FORM_MCOLLMNG01010_LIST_SEARCH #ITP_FORM_MCOLLMNG01010_LIST_SEARCH_WHS_NM').val('');
258
-		},
259
-		close: function() {
260
-			this.rows.length = 0;
261
-			$('#ITP_POP_MCOLLMNG01010_LIST_WHS_AREA .panel-group').empty();
262
-			$('#ITP_FORM_MCOLLMNG01010_POP_WHS #ITP_FORM_MCOLLMNG01010_POP_WHS_KEYWORD').val('');
263
-			mobPopObj.hide(this.popId);
264
 		}
247
 		}
265
 	},
248
 	},
266
 	show: function(popId) {
249
 	show: function(popId) {

+ 23 - 40
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG02010.js

@@ -287,67 +287,50 @@ let mobContObj = {
287
 let mobPopObj = {
287
 let mobPopObj = {
288
 	popWhsNm: {
288
 	popWhsNm: {
289
 		popId: 'ITP_POP_MCOLLMNG02010_WHS_AREA',
289
 		popId: 'ITP_POP_MCOLLMNG02010_WHS_AREA',
290
-		rows: [],
291
 		init: function () {
290
 		init: function () {
291
+			$('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .mb_0').children().remove();
292
+			$('#ITP_POP_MCOLLMNG02010_WHS_AREA #ITP_FORM_MCOLLMNG02010_POP_WHS_KEYWORD').val('');
292
 			this.rows.length = 0;
293
 			this.rows.length = 0;
293
 			mobPopObj.show(this.popId);
294
 			mobPopObj.show(this.popId);
294
 			this.search();
295
 			this.search();
295
 			this.action();
296
 			this.action();
296
 		},
297
 		},
298
+		rows: [],
297
 		search: function () {
299
 		search: function () {
298
 			var _this = this;
300
 			var _this = this;
299
-			$('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .panel-group').empty();
301
+			$('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .mb_0').empty();
300
 			var callbackFn = function(result) {
302
 			var callbackFn = function(result) {
301
-				console.log(result);
302
-				_this.view(result.gridRows);
303
+				$.each(result.gridRows, function (i, item) {
304
+					$('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWCOPY').html());
305
+					var $li = $('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .mb_0 > .row_2:last');
306
+					$li.find('.fnWhsNm').text(item.whsNm);
307
+					$li.find('.fnLocationNm').text(item.locationNm);
308
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
309
+					$li.find('.fnWhsId').data('location', item.location);
310
+					$('#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
311
+				});
303
 			};
312
 			};
304
 			const param = $('#ITP_FORM_MCOLLMNG02010_POP_WHS').serializeObject();
313
 			const param = $('#ITP_FORM_MCOLLMNG02010_POP_WHS').serializeObject();
305
-			param.swhsDvsn = 'W01';
314
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
306
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
315
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
307
 		},
316
 		},
308
-		view: function(gridRows) {
309
-			this.rows = gridRows;
310
-			$.each(gridRows, function (i, item) {
311
-				$('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWCOPY').html());
312
-				var $li = $('#ITP_LIST_MCOLLMNG02010_POP_WHS_AREA .panel-group > .item-row:last');
313
-				$li.find('.fnWhsNm').text(item.whsNm);
314
-				$li.find('.fnLocationNm').text(item.locationNm);
315
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
317
+		action: function() {
318
+			var _this = this;
319
+			$('#ITP_FORM_MCOLLMNG02010_POP_WHS button[id="ITP_BTN_MCOLLMNG02010_POP_WHS_SEARCH"]').off('click').on('click', function() {
320
+				_this.search();
316
 			});
321
 			});
317
 		},
322
 		},
318
 		choice: function(elem) {
323
 		choice: function(elem) {
319
-			var _this = this;
320
 			var whsId = $(elem).data('whs-id');
324
 			var whsId = $(elem).data('whs-id');
321
-			$.each(this.rows, function (i, item) {
322
-				if(whsId === item.whsId) {
323
-					$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_ID').val(item.whsId);
324
-					$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_NM').val(item.whsNm);
325
-					_this.close();
326
-					return false;
327
-				}
328
-			});
329
-		},
330
-		action: function() {
331
-			var _this = this;
332
-			$('button[id^="ITP_BTN_MCOLLMNG02010_POP_WHS"]').off('click').on('click', function() {
333
-				var id = $(this).attr('id');
334
-				switch (id) {
335
-					case 'ITP_BTN_MCOLLMNG02010_POP_WHS_SEARCH'	: _this.search();			break;
336
-					case 'ITP_BTN_MCOLLMNG02010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
337
-					case 'ITP_BTN_MCOLLMNG02010_POP_WHS_CLOSE'	: _this.close(); 			break;
338
-				}
339
-				return false;
340
-			});
325
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
326
+			var location = $(elem).data('location');
327
+			$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_ID').val(whsId);
328
+			$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_NM').val(whsNm);
329
+			mobPopObj.hide(this.popId);
341
 		},
330
 		},
342
 		delete: function() {
331
 		delete: function() {
343
 			$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_ID').val('');
332
 			$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_ID').val('');
344
 			$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_NM').val('');
333
 			$('#ITP_FORM_MCOLLMNG02010_LIST_SEARCH #ITP_FORM_MCOLLMNG02010_LIST_SEARCH_WHS_NM').val('');
345
-		},
346
-		close: function() {
347
-			this.rows.length = 0;
348
-			$('#ITP_POP_MCOLLMNG02010_LIST_WHS_AREA .panel-group').empty();
349
-			$('#ITP_FORM_MCOLLMNG02010_POP_WHS #ITP_FORM_MCOLLMNG02010_POP_WHS_KEYWORD').val('');
350
-			mobPopObj.hide(this.popId);
351
 		}
334
 		}
352
 	},
335
 	},
353
 	show: function(popId) {
336
 	show: function(popId) {

+ 23 - 40
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG03010.js

@@ -243,67 +243,50 @@ let mobContObj = {
243
 let mobPopObj = {
243
 let mobPopObj = {
244
 	popWhsNm: {
244
 	popWhsNm: {
245
 		popId: 'ITP_POP_MCOLLMNG03010_WHS_AREA',
245
 		popId: 'ITP_POP_MCOLLMNG03010_WHS_AREA',
246
-		rows: [],
247
 		init: function () {
246
 		init: function () {
247
+			$('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .mb_0').children().remove();
248
+			$('#ITP_POP_MCOLLMNG03010_WHS_AREA #ITP_FORM_MCOLLMNG03010_POP_WHS_KEYWORD').val('');
248
 			this.rows.length = 0;
249
 			this.rows.length = 0;
249
 			mobPopObj.show(this.popId);
250
 			mobPopObj.show(this.popId);
250
 			this.search();
251
 			this.search();
251
 			this.action();
252
 			this.action();
252
 		},
253
 		},
254
+		rows: [],
253
 		search: function () {
255
 		search: function () {
254
 			var _this = this;
256
 			var _this = this;
255
-			$('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .panel-group').empty();
257
+			$('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .mb_0').empty();
256
 			var callbackFn = function(result) {
258
 			var callbackFn = function(result) {
257
-				console.log(result);
258
-				_this.view(result.gridRows);
259
+				$.each(result.gridRows, function (i, item) {
260
+					$('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWCOPY').html());
261
+					var $li = $('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .mb_0 > .row_2:last');
262
+					$li.find('.fnWhsNm').text(item.whsNm);
263
+					$li.find('.fnLocationNm').text(item.locationNm);
264
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
265
+					$li.find('.fnWhsId').data('location', item.location);
266
+					$('#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
267
+				});
259
 			};
268
 			};
260
 			const param = $('#ITP_FORM_MCOLLMNG03010_POP_WHS').serializeObject();
269
 			const param = $('#ITP_FORM_MCOLLMNG03010_POP_WHS').serializeObject();
261
-			param.swhsDvsn = 'W01';
270
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
262
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
271
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
263
 		},
272
 		},
264
-		view: function(gridRows) {
265
-			this.rows = gridRows;
266
-			$.each(gridRows, function (i, item) {
267
-				$('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWCOPY').html());
268
-				var $li = $('#ITP_LIST_MCOLLMNG03010_POP_WHS_AREA .panel-group > .item-row:last');
269
-				$li.find('.fnWhsNm').text(item.whsNm);
270
-				$li.find('.fnLocationNm').text(item.locationNm);
271
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
273
+		action: function() {
274
+			var _this = this;
275
+			$('#ITP_FORM_MCOLLMNG03010_POP_WHS button[id="ITP_BTN_MCOLLMNG03010_POP_WHS_SEARCH"]').off('click').on('click', function() {
276
+				_this.search();
272
 			});
277
 			});
273
 		},
278
 		},
274
 		choice: function(elem) {
279
 		choice: function(elem) {
275
-			var _this = this;
276
 			var whsId = $(elem).data('whs-id');
280
 			var whsId = $(elem).data('whs-id');
277
-			$.each(this.rows, function (i, item) {
278
-				if(whsId === item.whsId) {
279
-					$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_ID').val(item.whsId);
280
-					$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_NM').val(item.whsNm);
281
-					_this.close();
282
-					return false;
283
-				}
284
-			});
285
-		},
286
-		action: function() {
287
-			var _this = this;
288
-			$('button[id^="ITP_BTN_MCOLLMNG03010_POP_WHS"]').off('click').on('click', function() {
289
-				var id = $(this).attr('id');
290
-				switch (id) {
291
-					case 'ITP_BTN_MCOLLMNG03010_POP_WHS_SEARCH'	: _this.search();			break;
292
-					case 'ITP_BTN_MCOLLMNG03010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
293
-					case 'ITP_BTN_MCOLLMNG03010_POP_WHS_CLOSE'	: _this.close(); 			break;
294
-				}
295
-				return false;
296
-			});
281
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
282
+			var location = $(elem).data('location');
283
+			$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_ID').val(whsId);
284
+			$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_NM').val(whsNm);
285
+			mobPopObj.hide(this.popId);
297
 		},
286
 		},
298
 		delete: function() {
287
 		delete: function() {
299
 			$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_ID').val('');
288
 			$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_ID').val('');
300
 			$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_NM').val('');
289
 			$('#ITP_FORM_MCOLLMNG03010_LIST_SEARCH #ITP_FORM_MCOLLMNG03010_LIST_SEARCH_WHS_NM').val('');
301
-		},
302
-		close: function() {
303
-			this.rows.length = 0;
304
-			$('#ITP_POP_MCOLLMNG03010_LIST_WHS_AREA .panel-group').empty();
305
-			$('#ITP_FORM_MCOLLMNG03010_POP_WHS #ITP_FORM_MCOLLMNG03010_POP_WHS_KEYWORD').val('');
306
-			mobPopObj.hide(this.popId);
307
 		}
290
 		}
308
 	},
291
 	},
309
 	show: function(popId) {
292
 	show: function(popId) {

+ 23 - 41
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG01010.js

@@ -200,68 +200,50 @@ let mobContObj = {
200
 let mobPopObj = {
200
 let mobPopObj = {
201
 	popWhsNm: {
201
 	popWhsNm: {
202
 		popId: 'ITP_POP_MORDMNG01010_WHS_AREA',
202
 		popId: 'ITP_POP_MORDMNG01010_WHS_AREA',
203
-		rows: [],
204
 		init: function () {
203
 		init: function () {
204
+			$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .mb_0').children().remove();
205
+			$('#ITP_POP_MORDMNG01010_WHS_AREA #ITP_FORM_MORDMNG01010_POP_WHS_KEYWORD').val('');
205
 			this.rows.length = 0;
206
 			this.rows.length = 0;
206
 			mobPopObj.show(this.popId);
207
 			mobPopObj.show(this.popId);
207
 			this.search();
208
 			this.search();
208
 			this.action();
209
 			this.action();
209
 		},
210
 		},
211
+		rows: [],
210
 		search: function () {
212
 		search: function () {
211
 			var _this = this;
213
 			var _this = this;
212
-			$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .panel-group').empty();
214
+			$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .mb_0').empty();
213
 			var callbackFn = function(result) {
215
 			var callbackFn = function(result) {
214
-				console.log(result);
215
-				_this.view(result.gridRows);
216
+				$.each(result.gridRows, function (i, item) {
217
+					$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MORDMNG01010_POP_WHS_ROWCOPY').html());
218
+					var $li = $('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .mb_0 > .row_2:last');
219
+					$li.find('.fnWhsNm').text(item.whsNm);
220
+					$li.find('.fnLocationNm').text(item.locationNm);
221
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
222
+					$li.find('.fnWhsId').data('location', item.location);
223
+					$('#ITP_LIST_MORDMNG01010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
224
+				});
216
 			};
225
 			};
217
 			const param = $('#ITP_FORM_MORDMNG01010_POP_WHS').serializeObject();
226
 			const param = $('#ITP_FORM_MORDMNG01010_POP_WHS').serializeObject();
218
-			param.swhsDvsn = 'W01';
227
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
219
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
228
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
220
 		},
229
 		},
221
-		view: function(gridRows) {
222
-			this.rows = gridRows;
223
-			$.each(gridRows, function (i, item) {
224
-				$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MORDMNG01010_POP_WHS_ROWCOPY').html());
225
-				var $li = $('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .panel-group > .item-row:last');
226
-				$li.find('.fnWhsNm').text(item.whsNm);
227
-				$li.find('.fnLocationNm').text(item.locationNm);
228
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
230
+		action: function() {
231
+			var _this = this;
232
+			$('#ITP_FORM_MORDMNG01010_POP_WHS button[id="ITP_BTN_MORDMNG01010_POP_WHS_SEARCH"]').off('click').on('click', function() {
233
+				_this.search();
229
 			});
234
 			});
230
 		},
235
 		},
231
 		choice: function(elem) {
236
 		choice: function(elem) {
232
-			var _this = this;
233
 			var whsId = $(elem).data('whs-id');
237
 			var whsId = $(elem).data('whs-id');
234
-			console.log("choice =====================", whsId, this.rows)
235
-			$.each(this.rows, function (i, item) {
236
-				if(whsId === item.whsId) {
237
-					$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID').val(item.whsId);
238
-					$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM').val(item.whsNm);
239
-					_this.close();
240
-					return false;
241
-				}
242
-			});
243
-		},
244
-		action: function() {
245
-			var _this = this;
246
-			$('button[id^="ITP_BTN_MORDMNG01010_POP_WHS"]').off('click').on('click', function() {
247
-				var id = $(this).attr('id');
248
-				switch (id) {
249
-					case 'ITP_BTN_MORDMNG01010_POP_WHS_SEARCH'	: _this.search();			break;
250
-					case 'ITP_BTN_MORDMNG01010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
251
-					case 'ITP_BTN_MORDMNG01010_POP_WHS_CLOSE'	: _this.close(); 			break;
252
-				}
253
-				return false;
254
-			});
238
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
239
+			var location = $(elem).data('location');
240
+			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID').val(whsId);
241
+			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM').val(whsNm);
242
+			mobPopObj.hide(this.popId);
255
 		},
243
 		},
256
 		delete: function() {
244
 		delete: function() {
257
 			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID').val('');
245
 			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID').val('');
258
 			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM').val('');
246
 			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM').val('');
259
-		},
260
-		close: function() {
261
-			this.rows.length = 0;
262
-			$('#ITP_POP_MORDMNG01010_LIST_WHS_AREA .panel-group').empty();
263
-			$('#ITP_FORM_MORDMNG01010_POP_WHS #ITP_FORM_MORDMNG01010_POP_WHS_KEYWORD').val('');
264
-			mobPopObj.hide(this.popId);
265
 		}
247
 		}
266
 	},
248
 	},
267
 	show: function(popId) {
249
 	show: function(popId) {

+ 23 - 40
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG02010.js

@@ -299,67 +299,50 @@ let mobContObj = {
299
 let mobPopObj = {
299
 let mobPopObj = {
300
 	popWhsNm: {
300
 	popWhsNm: {
301
 		popId: 'ITP_POP_MORDMNG02010_WHS_AREA',
301
 		popId: 'ITP_POP_MORDMNG02010_WHS_AREA',
302
-		rows: [],
303
 		init: function () {
302
 		init: function () {
303
+			$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .mb_0').children().remove();
304
+			$('#ITP_POP_MORDMNG02010_WHS_AREA #ITP_FORM_MORDMNG02010_POP_WHS_KEYWORD').val('');
304
 			this.rows.length = 0;
305
 			this.rows.length = 0;
305
 			mobPopObj.show(this.popId);
306
 			mobPopObj.show(this.popId);
306
 			this.search();
307
 			this.search();
307
 			this.action();
308
 			this.action();
308
 		},
309
 		},
310
+		rows: [],
309
 		search: function () {
311
 		search: function () {
310
 			var _this = this;
312
 			var _this = this;
311
-			$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .panel-group').empty();
313
+			$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .mb_0').empty();
312
 			var callbackFn = function(result) {
314
 			var callbackFn = function(result) {
313
-				console.log(result);
314
-				_this.view(result.gridRows);
315
+				$.each(result.gridRows, function (i, item) {
316
+					$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MORDMNG02010_POP_WHS_ROWCOPY').html());
317
+					var $li = $('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .mb_0 > .row_2:last');
318
+					$li.find('.fnWhsNm').text(item.whsNm);
319
+					$li.find('.fnLocationNm').text(item.locationNm);
320
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
321
+					$li.find('.fnWhsId').data('location', item.location);
322
+					$('#ITP_LIST_MORDMNG02010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
323
+				});
315
 			};
324
 			};
316
 			const param = $('#ITP_FORM_MORDMNG02010_POP_WHS').serializeObject();
325
 			const param = $('#ITP_FORM_MORDMNG02010_POP_WHS').serializeObject();
317
-			param.swhsDvsn = 'W01';
326
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
318
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
327
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
319
 		},
328
 		},
320
-		view: function(gridRows) {
321
-			this.rows = gridRows;
322
-			$.each(gridRows, function (i, item) {
323
-				$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MORDMNG02010_POP_WHS_ROWCOPY').html());
324
-				var $li = $('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .panel-group > .item-row:last');
325
-				$li.find('.fnWhsNm').text(item.whsNm);
326
-				$li.find('.fnLocationNm').text(item.locationNm);
327
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
329
+		action: function() {
330
+			var _this = this;
331
+			$('#ITP_FORM_MORDMNG02010_POP_WHS button[id="ITP_BTN_MORDMNG02010_POP_WHS_SEARCH"]').off('click').on('click', function() {
332
+				_this.search();
328
 			});
333
 			});
329
 		},
334
 		},
330
 		choice: function(elem) {
335
 		choice: function(elem) {
331
-			var _this = this;
332
 			var whsId = $(elem).data('whs-id');
336
 			var whsId = $(elem).data('whs-id');
333
-			$.each(this.rows, function (i, item) {
334
-				if(whsId === item.whsId) {
335
-					$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID').val(item.whsId);
336
-					$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_NM').val(item.whsNm);
337
-					_this.close();
338
-					return false;
339
-				}
340
-			});
341
-		},
342
-		action: function() {
343
-			var _this = this;
344
-			$('button[id^="ITP_BTN_MORDMNG02010_POP_WHS"]').off('click').on('click', function() {
345
-				var id = $(this).attr('id');
346
-				switch (id) {
347
-					case 'ITP_BTN_MORDMNG02010_POP_WHS_SEARCH'	: _this.search();			break;
348
-					case 'ITP_BTN_MORDMNG02010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
349
-					case 'ITP_BTN_MORDMNG02010_POP_WHS_CLOSE'	: _this.close(); 			break;
350
-				}
351
-				return false;
352
-			});
337
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
338
+			var location = $(elem).data('location');
339
+			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID').val(whsId);
340
+			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_NM').val(whsNm);
341
+			mobPopObj.hide(this.popId);
353
 		},
342
 		},
354
 		delete: function() {
343
 		delete: function() {
355
 			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID').val('');
344
 			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID').val('');
356
 			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_NM').val('');
345
 			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_NM').val('');
357
-		},
358
-		close: function() {
359
-			this.rows.length = 0;
360
-			$('#ITP_POP_MORDMNG02010_LIST_WHS_AREA .panel-group').empty();
361
-			$('#ITP_FORM_MORDMNG02010_POP_WHS #ITP_FORM_MORDMNG02010_POP_WHS_KEYWORD').val('');
362
-			mobPopObj.hide(this.popId);
363
 		}
346
 		}
364
 	},
347
 	},
365
 	show: function(popId) {
348
 	show: function(popId) {

+ 23 - 40
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG03010.js

@@ -249,67 +249,50 @@ let mobContObj = {
249
 let mobPopObj = {
249
 let mobPopObj = {
250
 	popWhsNm: {
250
 	popWhsNm: {
251
 		popId: 'ITP_POP_MORDMNG03010_WHS_AREA',
251
 		popId: 'ITP_POP_MORDMNG03010_WHS_AREA',
252
-		rows: [],
253
 		init: function () {
252
 		init: function () {
253
+			$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .mb_0').children().remove();
254
+			$('#ITP_POP_MORDMNG03010_WHS_AREA #ITP_FORM_MORDMNG03010_POP_WHS_KEYWORD').val('');
254
 			this.rows.length = 0;
255
 			this.rows.length = 0;
255
 			mobPopObj.show(this.popId);
256
 			mobPopObj.show(this.popId);
256
 			this.search();
257
 			this.search();
257
 			this.action();
258
 			this.action();
258
 		},
259
 		},
260
+		rows: [],
259
 		search: function () {
261
 		search: function () {
260
 			var _this = this;
262
 			var _this = this;
261
-			$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .panel-group').empty();
263
+			$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .mb_0').empty();
262
 			var callbackFn = function(result) {
264
 			var callbackFn = function(result) {
263
-				console.log(result);
264
-				_this.view(result.gridRows);
265
+				$.each(result.gridRows, function (i, item) {
266
+					$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MORDMNG03010_POP_WHS_ROWCOPY').html());
267
+					var $li = $('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .mb_0 > .row_2:last');
268
+					$li.find('.fnWhsNm').text(item.whsNm);
269
+					$li.find('.fnLocationNm').text(item.locationNm);
270
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
271
+					$li.find('.fnWhsId').data('location', item.location);
272
+					$('#ITP_LIST_MORDMNG03010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
273
+				});
265
 			};
274
 			};
266
 			const param = $('#ITP_FORM_MORDMNG03010_POP_WHS').serializeObject();
275
 			const param = $('#ITP_FORM_MORDMNG03010_POP_WHS').serializeObject();
267
-			param.swhsDvsn = 'W01';
276
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
268
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
277
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
269
 		},
278
 		},
270
-		view: function(gridRows) {
271
-			this.rows = gridRows;
272
-			$.each(gridRows, function (i, item) {
273
-				$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MORDMNG03010_POP_WHS_ROWCOPY').html());
274
-				var $li = $('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .panel-group > .item-row:last');
275
-				$li.find('.fnWhsNm').text(item.whsNm);
276
-				$li.find('.fnLocationNm').text(item.locationNm);
277
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
279
+		action: function() {
280
+			var _this = this;
281
+			$('#ITP_FORM_MORDMNG03010_POP_WHS button[id="ITP_BTN_MORDMNG03010_POP_WHS_SEARCH"]').off('click').on('click', function() {
282
+				_this.search();
278
 			});
283
 			});
279
 		},
284
 		},
280
 		choice: function(elem) {
285
 		choice: function(elem) {
281
-			var _this = this;
282
 			var whsId = $(elem).data('whs-id');
286
 			var whsId = $(elem).data('whs-id');
283
-			$.each(this.rows, function (i, item) {
284
-				if(whsId === item.whsId) {
285
-					$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID').val(item.whsId);
286
-					$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_NM').val(item.whsNm);
287
-					_this.close();
288
-					return false;
289
-				}
290
-			});
291
-		},
292
-		action: function() {
293
-			var _this = this;
294
-			$('button[id^="ITP_BTN_MORDMNG03010_POP_WHS"]').off('click').on('click', function() {
295
-				var id = $(this).attr('id');
296
-				switch (id) {
297
-					case 'ITP_BTN_MORDMNG03010_POP_WHS_SEARCH'	: _this.search();			break;
298
-					case 'ITP_BTN_MORDMNG03010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
299
-					case 'ITP_BTN_MORDMNG03010_POP_WHS_CLOSE'	: _this.close(); 			break;
300
-				}
301
-				return false;
302
-			});
287
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
288
+			var location = $(elem).data('location');
289
+			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID').val(whsId);
290
+			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_NM').val(whsNm);
291
+			mobPopObj.hide(this.popId);
303
 		},
292
 		},
304
 		delete: function() {
293
 		delete: function() {
305
 			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID').val('');
294
 			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID').val('');
306
 			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_NM').val('');
295
 			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_NM').val('');
307
-		},
308
-		close: function() {
309
-			this.rows.length = 0;
310
-			$('#ITP_POP_MORDMNG03010_LIST_WHS_AREA .panel-group').empty();
311
-			$('#ITP_FORM_MORDMNG03010_POP_WHS #ITP_FORM_MORDMNG03010_POP_WHS_KEYWORD').val('');
312
-			mobPopObj.hide(this.popId);
313
 		}
296
 		}
314
 	},
297
 	},
315
 	show: function(popId) {
298
 	show: function(popId) {

+ 3 - 3
src/main/webapp/mobile/js/app/popup/biz/ITP_BIZPOP_PO_PAYMENT.js

@@ -321,12 +321,12 @@ function f_moblie_submit() {
321
 	let param = $('#frm_pay').serializeObject();
321
 	let param = $('#frm_pay').serializeObject();
322
 	param.reqDataList = reqDataList;
322
 	param.reqDataList = reqDataList;
323
 	
323
 	
324
-	console.log("REQ : " + JSON.stringify(param));
324
+	// console.log("REQ : " + JSON.stringify(param));
325
 		
325
 		
326
 	fn_ajax_call(EASYPAY_PAYMENT_REQUEST, JSON.stringify(param), function(result) {
326
 	fn_ajax_call(EASYPAY_PAYMENT_REQUEST, JSON.stringify(param), function(result) {
327
 		
327
 		
328
-		console.log("RES : " + JSON.stringify(result));
329
-		console.log("RES_CD : " + result.res_cd);
328
+		// console.log("RES : " + JSON.stringify(result));
329
+		// console.log("RES_CD : " + result.res_cd);
330
 		
330
 		
331
 		if(result.res_cd === '0000') {
331
 		if(result.res_cd === '0000') {
332
 			popPageObj.parentPopFn(result);
332
 			popPageObj.parentPopFn(result);