Browse Source

모바일 반품관리 수정사항 적용

juney 2 years ago
parent
commit
f702028474

+ 5 - 5
src/main/webapp/mobile/app/mrtnmng/MRTNMNG05010.html

@@ -26,7 +26,7 @@
26 26
 					<div class="line">
27 27
 						<label>수거창고</label>
28 28
 						<div class="float_left">
29
-							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="" class="" name="srtnWhsNm" placeholder="수거창고" readonly />
29
+							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="수거창고" class="" name="srtnWhsNm" placeholder="수거창고" readonly />
30 30
 							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID" class="" name="srtnWhsId" />
31 31
 							<div class="itp_input_btn">
32 32
 								<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
@@ -36,7 +36,7 @@
36 36
 							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
37 37
 						</div>
38 38
 					</div>
39
-					<div class="line">
39
+					<div class="line schSpply">
40 40
 						<label>공급업체</label>
41 41
 						<div class="float_left">
42 42
 							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_NM" class="" name="sspplyNm" placeholder="" readonly />
@@ -81,7 +81,7 @@
81 81
 								<label>수거장소 </label>
82 82
 								<span>:</span>
83 83
 								<div class="fnWhsNm"></div>
84
-								<div class="text_two fnLocationNm"></div>
84
+								<div class="text_two fnRtnWhsNm"></div>
85 85
 							</div>
86 86
 						</div>
87 87
 						<div class="left">
@@ -98,7 +98,7 @@
98 98
 							<div class="nomal">
99 99
 								<label>반품단가</label>
100 100
 								<span>:</span>	
101
-								<div class="fnRtnUnit"></div>
101
+								<div class="fnUnitAmt"></div>
102 102
 								<label class="col_6">수거요청금액</label>
103 103
 								<span>:</span>
104 104
 								<div class="fncolReqAmt"></div>
@@ -108,7 +108,7 @@
108 108
 							<div class="nomal">
109 109
 								<label class="">반품수량</label>
110 110
 								<span>:</span>
111
-								<div class=" fnRtnQty"></div>
111
+								<div class=" fnRodrQty"></div>
112 112
 								<label class="col_6">수거수량</label>
113 113
 								<span>:</span>
114 114
 								<input class="" id="ITP_FORM_MRTNMNG05010_LIST_COL_QTY" type="text" name="colQty">

+ 1 - 1
src/main/webapp/mobile/app/mrtnmng/MRTNMNG06010.html

@@ -35,7 +35,7 @@
35 35
 							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
36 36
 						</div>
37 37
 					</div>
38
-					<div class="line">
38
+					<div class="line schSpply">
39 39
 						<label>공급업체</label>
40 40
 						<div class="float_left">
41 41
 							<input type="text" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_NM" class="" name="sspplyNm" placeholder="" readonly />

+ 1 - 3
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG01010.js

@@ -67,14 +67,12 @@ let mobPageObj = {
67 67
 				return false;
68 68
 			});
69 69
 
70
+			$(document).off('click', '#ITP_LIST_MCOLLMNG01010_LIST_ITEM_ROWS li');
70 71
 			$(document).on('click', '#ITP_LIST_MCOLLMNG01010_LIST_ITEM_ROWS li', function() {
71 72
 				var item = mobContObj.list.rows[$(this).index()];
72 73
 				mobContObj.view.init(item);
73 74
 			});
74 75
 
75
-			$(document).on('click', '#ITP_LIST_MCOLLMNG01010_POP_WHS_ROWS li button', function() {
76
-				mobPopObj.popWhsNm.choice($(this));
77
-			});
78 76
 		}
79 77
 	},
80 78
 	switchScreen: function(mode) {

+ 1 - 7
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG02010.js

@@ -70,10 +70,7 @@ let mobPageObj = {
70 70
 				return false;
71 71
 			});
72 72
 
73
-			// $(document).on('click', '#ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWS li button', function() {
74
-			// 	var item = mobContObj.list.rows[$(this).index()];
75
-			// 	mobContObj.view.init(item);
76
-			// });
73
+			$(document).off('click', 'input[type="checkbox"][id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX"]');
77 74
 			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX"]', function() {
78 75
 				if($(this).prop('checked')) {
79 76
 					$('input[type="checkbox"][id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
@@ -81,9 +78,6 @@ let mobPageObj = {
81 78
 				}
82 79
 			});
83 80
 
84
-			$(document).on('click', '#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWS li button', function() {
85
-				mobPopObj.popWhsNm.choice($(this));
86
-			});
87 81
 		}
88 82
 	},
89 83
 	switchScreen: function(mode) {

+ 2 - 3
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG03010.js

@@ -69,9 +69,7 @@ let mobPageObj = {
69 69
 				return false;
70 70
 			});
71 71
 
72
-			// $(document).on('click', '#ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWS li', function() {
73
-			// 	mobContObj.list.iChoice = $(this).index();
74
-			// });
72
+			$(document).off('click', 'input[type="checkbox"][id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX"]');
75 73
 			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX"]', function() {
76 74
 				if($(this).prop('checked')) {
77 75
 					$('input[type="checkbox"][id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
@@ -79,6 +77,7 @@ let mobPageObj = {
79 77
 				}
80 78
 			});
81 79
 
80
+			$(document).off('click', '#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWS li button');
82 81
 			$(document).on('click', '#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWS li button', function() {
83 82
 				mobPopObj.popWhsNm.choice($(this));
84 83
 			});

+ 4 - 0
src/main/webapp/mobile/js/app/mloanmng/ITP_MLOANMNG01011.js

@@ -45,6 +45,7 @@ let mobPageObj = {
45 45
 				var id = $(this).attr('id');
46 46
 				switch (id) {
47 47
 					case 'ITP_BTN_MLOANMNG01011_VIEW_SEARCH'		: mobContObj.view.history.search();	break;
48
+					case 'ITP_BTN_MLOANMNG01011_VIEW_CANCEL_LIST'	: mobContObj.cancel();				break;
48 49
 				}
49 50
 				return false;
50 51
 			});
@@ -140,5 +141,8 @@ let mobContObj = {
140 141
 				fn_ajax_call(API_MOBILE_HISTORY, JSON.stringify(param), callbackFn, 'POST', errFn);
141 142
 			}
142 143
 		}
144
+	},
145
+	cancel: function () {
146
+		$(location).attr('href', MOBILE_CONTEXTPATH + '/app/main.html');
143 147
 	}
144 148
 };

+ 1 - 3
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG01010.js

@@ -67,14 +67,12 @@ let mobPageObj = {
67 67
 				return false;
68 68
 			});
69 69
 
70
+			$(document).off('click', '#ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS li');
70 71
 			$(document).on('click', '#ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS li', function() {
71 72
 				var item = mobContObj.list.rows[$(this).index()];
72 73
 				mobContObj.view.init(item);
73 74
 			});
74 75
 
75
-			$(document).on('click', '#ITP_LIST_MORDMNG01010_POP_WHS_ROWS li button', function() {
76
-				mobPopObj.popWhsNm.choice($(this));
77
-			});
78 76
 		}
79 77
 	},
80 78
 	switchScreen: function(mode) {

+ 1 - 6
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG02010.js

@@ -70,9 +70,7 @@ let mobPageObj = {
70 70
 				return false;
71 71
 			});
72 72
 
73
-			// $(document).on('click', '#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS li', function() {
74
-			// 	mobContObj.list.iChoice = $(this).index();
75
-			// });
73
+			$(document).off('click', 'input[type="checkbox"][id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX"]');
76 74
 			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX"]', function() {
77 75
 				if($(this).prop('checked')) {
78 76
 					$('input[type="checkbox"][id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
@@ -80,9 +78,6 @@ let mobPageObj = {
80 78
 				}
81 79
 			});
82 80
 
83
-			$(document).on('click', '#ITP_LIST_MORDMNG02010_POP_WHS_ROWS li button', function() {
84
-				mobPopObj.popWhsNm.choice($(this));
85
-			});
86 81
 		}
87 82
 	},
88 83
 	switchScreen: function(mode) {

+ 1 - 3
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG03010.js

@@ -72,6 +72,7 @@ let mobPageObj = {
72 72
 			// $(document).on('click', '#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS li', function() {
73 73
 			// 	mobContObj.list.iChoice = $(this).index();
74 74
 			// });
75
+			$(document).off('click', 'input[type="checkbox"][id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX"]');
75 76
 			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX"]', function() {
76 77
 				if($(this).prop('checked')) {
77 78
 					$('input[type="checkbox"][id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
@@ -79,9 +80,6 @@ let mobPageObj = {
79 80
 				}
80 81
 			});
81 82
 
82
-			$(document).on('click', '#ITP_LIST_MORDMNG03010_POP_WHS_ROWS li button', function() {
83
-				mobPopObj.popWhsNm.choice($(this));
84
-			});
85 83
 		}
86 84
 	},
87 85
 	switchScreen: function(mode) {

+ 3 - 2
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG02010.js

@@ -180,7 +180,7 @@ let mobContObj = {
180 180
 				var index = $(this).index();
181 181
 				var item = _this.rows[index];
182 182
 				(item.pchReqStCd === PCH_REQ_ST_CD_TEMP_SAVE) ?
183
-					(item.pchReqMgrId  === fn_make_user_info.get('userId')) ? mobContObj.modify.init(item) : mobContObj.detail.init(item) :
183
+					(item.pchReqMgrId === fn_make_user_info.get('userId')) ? mobContObj.modify.init(item) : mobContObj.detail.init(item) :
184 184
 					mobContObj.detail.init(item);
185 185
 			});
186 186
 		}
@@ -206,7 +206,7 @@ let mobContObj = {
206 206
 			var id = '#ITP_AJAX_MPOMNG02010_VIEW_CONTAINER';
207 207
 			$(id).find('.fnDlvReqDt').text(result.dlvReqDt);
208 208
 			$(id).find('.fnPchReqTotalAmt').text(CommonObj.currency.add(result.pchReqTotalAmt));
209
-			$(id).find('.fnLocationNm').text(result.locationNm);
209
+			$(id).find('.fnLocationNm').text(result.whsNm);
210 210
 			$(id).find('.fnPchReqStnm').text(result.pchReqStNm);
211 211
 			$(id).find('.fnPchReqRjctDt').text(result.pchReqRjctDt);
212 212
 			$(id).find('.fnPchReqRjctNm').text(result.pchReqRjctNm);
@@ -507,6 +507,7 @@ let mobPopObj = {
507 507
 		popId: 'ITP_POP_MPOMNG02010_WHS_AREA',
508 508
 		init: function () {
509 509
 			$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .mb_0').children().remove();
510
+			$('#ITP_POP_MPOMNG02010_WHS_AREA #ITP_FORM_MPOMNG02010_POP_WHS_KEYWORD').val('');
510 511
 			this.rows.length = 0;
511 512
 			mobPopObj.show(this.popId);
512 513
 			this.search();

+ 1 - 0
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG01010.js

@@ -327,6 +327,7 @@ let mobPopObj = {
327 327
 	},
328 328
 	popWhsNm: {
329 329
 		init: function () {
330
+			$('#ITP_POP_MPOMNG01010_WHS_AREA #ITP_FORM_MPOMNG01010_POP_WHS_KEYWORD').val('');
330 331
 			this.rows.length = 0;
331 332
 			this.search();
332 333
 			this.action();

+ 16 - 24
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG02010.js

@@ -92,7 +92,9 @@ let mobPageObj = {
92 92
 			$(document).on('click', '#ITP_LIST_MRTNMNG02010_LIST_ROWS li', function() {
93 93
 				var index = $(this).index();
94 94
 				var item = mobContObj.list.rows[index];
95
-				(item.rtnReqStCd === RTN_REQ_ST_CD_TEMP_SAVE) ? mobContObj.modify.init(item) : mobContObj.detail.init(item);
95
+				(item.rtnReqStCd === RTN_REQ_ST_CD_TEMP_SAVE) ?
96
+					(item.rtnReqMgrId === fn_make_user_info.get('userId')) ? mobContObj.modify.init(item) : mobContObj.detail.init(item) :
97
+					mobContObj.detail.init(item);
96 98
 			});
97 99
 
98 100
 			// $(document).on('click', '#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li', function(e) {
@@ -290,7 +292,7 @@ let mobContObj = {
290 292
 						$li.find('.fnItemNm').text(item.itemNm);
291 293
 						$li.find('.fnRtnQty').text(item.rtnQty);
292 294
 						$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
293
-						$li.find('.fnOrdAmt').text(CommonObj.currency.add(Number(item.unitAmt) * Number(item.pchReqQty)));
295
+						$li.find('.fnOrdAmt').text(CommonObj.currency.add(Number(item.unitAmt) * Number(item.rtnQty)));
294 296
 						$('.item-row .DETAIL_ITEM_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
295 297
 						$('.item-row .DETAIL_ITEM_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
296 298
 						_this.rtnReqAmtTot();
@@ -321,10 +323,12 @@ let mobContObj = {
321 323
 				}
322 324
 			},
323 325
 			actPlus: function(elem) {
324
-				var $div = $(elem).siblings('div');
325
-				var num = Number($div.text());
326
-				$($div).text((num + 1).toString());
327
-				this.rows[$div.parents('li').index()]['rtnQty'] = $($div).text();
326
+				var $li = $(elem).closest('li');
327
+				var num = Number($li.find('.fnRtnQty').text());
328
+				var calcNum = num + 1;
329
+				$($li).find('.fnRtnQty').text(calcNum.toString());
330
+				this.rows[$li.index()]['rtnQty'] = calcNum;
331
+				this.rtnReqAmtUnit(elem, calcNum);
328 332
 				this.rtnReqAmtTot();
329 333
 			},
330 334
 			actMinus: function(elem) {
@@ -335,28 +339,15 @@ let mobContObj = {
335 339
 				} else {
336 340
 					$($div).text((num - 1).toString());
337 341
 					this.rows[$div.parents('li').index()]['rtnQty'] = $($div).text();
342
+					this.rtnReqAmtUnit(elem, $($div).text());
338 343
 					this.rtnReqAmtTot();
339 344
 				}
340 345
 			},
341
-			/*ctPlus: function(elem) {
342
-				console.log('actPlus');
343
-				var index = $(elem).index();
344
-				var num = Number($(elem).find('.fnRtnQty').text()) + 1;
345
-				$(elem).find('.fnRtnQty').text(num.toString());
346
-				this.rows[index]['rtnQty'] = num;
347
-				this.rtnReqAmtTot();
346
+			rtnReqAmtUnit: function(elem, qty) {
347
+				var $div = $(elem).parent().prev();
348
+				var unitAmt = CommonObj.onlyNumber($div.find('.fnUnitAmt').text());
349
+				$div.find('.fnOrdAmt').text(CommonObj.currency.add(Number(unitAmt ? unitAmt : 0) * Number(qty)));
348 350
 			},
349
-			actMinus: function(elem) {
350
-				var index = $(elem).index();
351
-				var num = Number($(elem).find('.fnRtnQty').text()) - 1;
352
-				if(num < 1) {
353
-					itp_fn_modal_alert('수량을 확인하세요.');
354
-				} else {
355
-					$(elem).find('.fnRtnQty').text(num.toString());
356
-					this.rows[index]['rtnQty'] = num;
357
-					this.rtnReqAmtTot();
358
-				}
359
-			},*/
360 351
 			rtnReqAmtTot: function() {
361 352
 				var reqAmt = 0;
362 353
 				$.each(this.rows, function(index, item) {
@@ -502,6 +493,7 @@ let mobPopObj = {
502 493
 		rows: [],
503 494
 		init: function (mode) {
504 495
 			this.mode = mode;
496
+			$('#ITP_POP_MRTNMNG02010_WHS_AREA #ITP_FORM_MRTNMNG02010_POP_WHS_KEYWORD').val('');
505 497
 			this.rows.length = 0;
506 498
 			mobPopObj.show(this.popId);
507 499
 			this.search();

+ 36 - 59
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG05010.js

@@ -34,10 +34,7 @@ let mobPageObj = {
34 34
 				}
35 35
 			});
36 36
 
37
-			if(fn_make_user_info.get('authTpCd') === '50') {
38
-				$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_BTN_MRTNMNG05010_LIST_SEARCH_SPPLY_NM').attr('disabled', true);
39
-				$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_BTN_MRTNMNG05010_LIST_DELETE_SPPLY_NM').attr('disabled', true);
40
-			}
37
+			(fn_make_user_info.get('authTpCd') === '50') ? $('#ITP_FORM_MRTNMNG05010_LIST_SEARCH .schSpply').hide() : $('#ITP_FORM_MRTNMNG05010_LIST_SEARCH .schSpply').show();
41 38
 
42 39
 			// 조회일자 지정
43 40
 			$('#ITP_MOBILE_MRTNMNG05010 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);
@@ -68,13 +65,6 @@ let mobPageObj = {
68 65
 				return false;
69 66
 			});
70 67
 
71
-			$(document).on('click', '#ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWS li button', function() {
72
-				mobPopObj.popSpply.choice($(this));
73
-			});
74
-
75
-			$(document).on('click', '#ITP_LIST_MRTNMNG05010_POP_WHS_ROWS li button', function() {
76
-				mobPopObj.popWhsNm.choice($(this));
77
-			});
78 68
 		}
79 69
 	},
80 70
 	switchScreen: function(mode) {
@@ -103,8 +93,7 @@ let mobContObj = {
103 93
 			var formId = '#ITP_FORM_MRTNMNG05010_LIST_SEARCH';
104 94
 			itp_fn_form_clear_validate(null, formId);
105 95
 			if (itp_fn_form_event.isValid(formId)) {
106
-				this.listPage = 0;
107
-				this.totPage = 0;
96
+				this.listPage = 1;
108 97
 				this.rows.length = 0;
109 98
 				$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWS').empty();
110 99
 				setTimeout(function() {
@@ -126,12 +115,14 @@ let mobContObj = {
126 115
 				$.each(result.gridRows, function (i, item) {
127 116
 					$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWCOPY').html());
128 117
 					var $li = $('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group > .item-row:last');
129
-					$li.find('.fnRtnPodrUnqNo').text(item.rtnPodrUnqNo);
130
-					$li.find('.fnColSchDt').text(item.colSchDt);
131
-					$li.find('.fnSpplyNm').text(item.spplyNm);
132
-					$li.find('.fnRtnWhsNm').text(item.rtnWhsNm);
133 118
 					$li.find('.fnItemNm').text(item.itemNm);
134
-					$li.find('.fnColReqQty').text(CommonObj.comma.set(item.colReqQty));
119
+					$li.find('.fnWhsNm').text(item.whsNm);
120
+					$li.find('.fnRtnWhsNm').text(item.rtnWhsNm);
121
+					$li.find('.fnColReqDt').text(CommonObj.nullToString(item.colReqDt));
122
+					$li.find('.fnColSchDt').text(CommonObj.nullToString(item.colSchDt));
123
+					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
124
+					$li.find('.fncolReqAmt').text(CommonObj.currency.add(item.colReqAmt));
125
+					$li.find('.fnRodrQty').text(CommonObj.currency.add(item.rodrQty, ''));
135 126
 					$li.find('#ITP_FORM_MRTNMNG05010_LIST_COL_QTY').val(item.colQty);
136 127
 					mobContObj.list.rows.push(item);
137 128
 				});
@@ -228,6 +219,7 @@ let mobPopObj = {
228 219
 		init: function() {
229 220
 			this.rows.length = 0;
230 221
 			mobPopObj.show(this.popId);
222
+			$('#ITP_FORM_MRTNMNG05010_POP_SPPLY_SEARCH #ITP_FORM_MRTNMNG05010_POP_SPPLY_KEYWORD').val('');
231 223
 			this.search();
232 224
 			this.action();
233 225
 		},
@@ -242,6 +234,7 @@ let mobPopObj = {
242 234
 			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
243 235
 		},
244 236
 		view: function(gridRows) {
237
+			var _this = this;
245 238
 			this.rows = gridRows;
246 239
 			$.each(gridRows, function (i, item) {
247 240
 				$('#ITP_POP_MRTNMNG05010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWCOPY').html());
@@ -249,6 +242,7 @@ let mobPopObj = {
249 242
 				$li.find('.fnSpplyNm').text(item.spplyNm);
250 243
 				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
251 244
 				$li.find('.fnSpplyId').data('item-key', item.spplyId);
245
+				$('#ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
252 246
 			});
253 247
 		},
254 248
 		choice: function(elem) {
@@ -269,7 +263,7 @@ let mobPopObj = {
269 263
 				var id = $(this).attr('id');
270 264
 				switch (id) {
271 265
 					case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_SEARCH'	: _this.search();			break;
272
-					case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
266
+					// case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
273 267
 					case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_CLOSE'		: _this.close(); 			break;
274 268
 				}
275 269
 				return false;
@@ -288,67 +282,50 @@ let mobPopObj = {
288 282
 	},
289 283
 	popWhsNm: {
290 284
 		popId: 'ITP_POP_MRTNMNG05010_WHS_AREA',
291
-		rows: [],
292 285
 		init: function () {
286
+			$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .mb_0').children().remove();
287
+			$('#ITP_POP_MRTNMNG05010_WHS_AREA #ITP_FORM_MRTNMNG05010_POP_WHS_KEYWORD').val('');
293 288
 			this.rows.length = 0;
294 289
 			mobPopObj.show(this.popId);
295 290
 			this.search();
296 291
 			this.action();
297 292
 		},
293
+		rows: [],
298 294
 		search: function () {
299 295
 			var _this = this;
300
-			$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .panel-group').empty();
296
+			$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .mb_0').empty();
301 297
 			var callbackFn = function(result) {
302
-				console.log(result);
303
-				_this.view(result.gridRows);
298
+				$.each(result.gridRows, function (i, item) {
299
+					$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MRTNMNG05010_POP_WHS_ROWCOPY').html());
300
+					var $li = $('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .mb_0 > .row_2:last');
301
+					$li.find('.fnWhsNm').text(item.whsNm);
302
+					$li.find('.fnLocationNm').text(item.locationNm);
303
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
304
+					$li.find('.fnWhsId').data('location', item.location);
305
+					$('#ITP_LIST_MRTNMNG05010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
306
+				});
304 307
 			};
305 308
 			const param = $('#ITP_FORM_MRTNMNG05010_POP_WHS').serializeObject();
306
-			param.swhsDvsn = CommonObj.schWhsDvsn();
309
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
307 310
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
308 311
 		},
309
-		view: function(gridRows) {
310
-			this.rows = gridRows;
311
-			$.each(gridRows, function (i, item) {
312
-				$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MRTNMNG05010_POP_WHS_ROWCOPY').html());
313
-				var $li = $('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .panel-group > .list-row:last');
314
-				$li.find('.fnWhsNm').text(item.whsNm);
315
-				$li.find('.fnLocationNm').text(item.locationNm);
316
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
312
+		action: function() {
313
+			var _this = this;
314
+			$('#ITP_FORM_MRTNMNG05010_POP_WHS button[id="ITP_BTN_MRTNMNG05010_POP_WHS_SEARCH"]').off('click').on('click', function() {
315
+				_this.search();
317 316
 			});
318 317
 		},
319 318
 		choice: function(elem) {
320
-			var _this = this;
321 319
 			var whsId = $(elem).data('whs-id');
322
-			$.each(this.rows, function (i, item) {
323
-				if(whsId === item.whsId) {
324
-					$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val(item.whsId);
325
-					$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val(item.whsNm);
326
-					_this.close();
327
-					return false;
328
-				}
329
-			});
330
-		},
331
-		action: function() {
332
-			var _this = this;
333
-			$('button[id^="ITP_BTN_MRTNMNG05010_POP_WHS"]').off('click').on('click', function() {
334
-				var id = $(this).attr('id');
335
-				switch (id) {
336
-					case 'ITP_BTN_MRTNMNG05010_POP_WHS_SEARCH'	: _this.search();			break;
337
-					case 'ITP_BTN_MRTNMNG05010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
338
-					case 'ITP_BTN_MRTNMNG05010_POP_WHS_CLOSE'	: _this.close(); 			break;
339
-				}
340
-				return false;
341
-			});
320
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
321
+			var location = $(elem).data('location');
322
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val(whsId);
323
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val(whsNm);
324
+			mobPopObj.hide(this.popId);
342 325
 		},
343 326
 		delete: function() {
344 327
 			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val('');
345 328
 			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val('');
346
-		},
347
-		close: function() {
348
-			this.rows.length = 0;
349
-			$('#ITP_POP_MRTNMNG05010_LIST_WHS_AREA .panel-group').empty();
350
-			$('#ITP_FORM_MRTNMNG05010_POP_WHS #ITP_FORM_MRTNMNG05010_POP_WHS_KEYWORD').val('');
351
-			mobPopObj.hide(this.popId);
352 329
 		}
353 330
 	},
354 331
 	show: function(popId) {

+ 1 - 4
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG06010.js

@@ -34,10 +34,7 @@ let mobPageObj = {
34 34
 				}
35 35
 			});
36 36
 
37
-			if(fn_make_user_info.get('authTpCd') === '50') {
38
-				$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_BTN_MRTNMNG06010_LIST_SEARCH_SPPLY_NM').attr('disabled', true);
39
-				$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_BTN_MRTNMNG06010_LIST_DELETE_SPPLY_NM').attr('disabled', true);
40
-			}
37
+			(fn_make_user_info.get('authTpCd') === '50') ? $('#ITP_FORM_MRTNMNG06010_LIST_SEARCH .schSpply').hide() : $('#ITP_FORM_MRTNMNG06010_LIST_SEARCH .schSpply').show();
41 38
 
42 39
 			// 조회일자 지정
43 40
 			$('#ITP_MOBILE_MRTNMNG06010 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);