2 Commits 36b088db2e ... 062ca8c0b2

Autor SHA1 Nachricht Datum
  juney 062ca8c0b2 Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view vor 2 Jahren
  juney 40b502f743 모바일 발주처리 추가 vor 2 Jahren

+ 62 - 33
src/main/webapp/mobile/app/mpomng/MPOMNG04011.html

@@ -1,14 +1,8 @@
1 1
 <section id="ITP_MOBILE_MPOMNG04011">
2 2
 	<div id="ITP_AJAX_MPOMNG04011_VIEW_CONTAINER">
3 3
 	  <form id="ITP_FORM_MPOMNG04011_DETAIL" class="put_btn form-horizontal" onsubmit="return false;">
4
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_VIEW_CD" name="viewCd" value="C">
5
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_BRAND_ID" name="brandId" value="">
6
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_STORE_ID" name="storeId" value="">
7
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_LOAN_DVSN" name="loanDvsn" value="">
8
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_LOAN_MGNT_UNQ_NO" name="loanMgntUnqNo" value="">
9
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_PCH_REQ_DVSN" name="pchReqDvsn" value="">
10
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_PCH_REQ_ST_CD" name="pchReqStCd" value="">
11
-		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_MALL_ID" name="mallId" value="">
4
+		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_BRAND_ID" name="sbrandId" value="">
5
+		<input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_STORE_ID" name="sstoreId" value="">
12 6
 		<div class="content">
13 7
 			<div class="content_fix">
14 8
 				<div class="line header">
@@ -27,8 +21,7 @@
27 21
 				<label>납품장소</label>
28 22
 				  <div class="float_left">
29 23
 					  <input type="text" id="ITP_FORM_MPOMNG04011_DETAIL_WHS_NM" class="" name="whsNm" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="납품장소" placeholder="" readonly />
30
-					  <input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_WHS_ID" class="form-control itp_input" name="whsId" value="" />
31
-					  <input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_LOCATION" class="form-control itp_input" name="location" value="" />
24
+					  <input type="hidden" id="ITP_FORM_MPOMNG04011_DETAIL_WHS_ID" class="form-control itp_input" name="swhsId" value="" />
32 25
 					  <div class="itp_input_btn">
33 26
 						   <button id="ITP_BTN_MPOMNG04011_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG04011_WHS_AREA"><img src="../img/search.png" alt=""></button>
34 27
 						 </div>
@@ -41,12 +34,12 @@
41 34
 			  <div class="line">
42 35
 				  <label>구매요청번호</label>
43 36
 				  <div class="float_left name">
44
-					<input id="ITP_FORM_MPOMNG04011_PCH_REQ_UNQ_NO" name="pchReqUnqNo" type="text">
37
+					<input id="ITP_FORM_MPOMNG04011_PCH_REQ_UNQ_NO" name="spchReqUnqNo" type="text">
45 38
 				  </div>
46 39
 			  </div>
47 40
 			  <div class="line">
48 41
 				  <div class="search">
49
-					<button id="ITP_BTN_MPOMNG04011_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
42
+					<button id="ITP_BTN_MPOMNG04011_DETAIL_SEARCH" class="btn-primary btn-sm ADB">검색</button>
50 43
 				  </div>
51 44
 				</div>
52 45
 				<div class="table_header">
@@ -57,7 +50,7 @@
57 50
 		<div id="ITP_LIST_MPOMNG04011_ITEM_AREA" class="scroll_area row-1">
58 51
 		  <ul id="ITP_LIST_MPOMNG04011_DETAIL_ROWS" class="mb_0 panel-group"></ul>
59 52
 		   <!--   검색된 데이터가 없습니다  -->
60
-		   <div class="itp_non_data" style="display:none;">
53
+		   <div class="itp_non_data" style="display:block;">
61 54
 			  <div>검색된 데이터가 없습니다.</div>
62 55
 		   </div>
63 56
 		  <div id="ITP_LIST_MPOMNG04011_DETAIL_ROWCOPY" style="display: none;">
@@ -66,7 +59,7 @@
66 59
 				  <div class="nomal">
67 60
 					<label class="col_6">구매요청번호</label>
68 61
 					<span>:</span>
69
-					<div class="btn fnPchReqNo"></div>
62
+					<div class="btn fnPchReqUnqNo"></div>
70 63
 					<button style="margin-right: 5px;width: 90px;font-size: 12pt;height: 45px;" id="ITP_BTN_MPOMNG04011_DETAIL_PODR" class="btn-primary REQ">발주처리</button>
71 64
 				  </div>
72 65
 				</div>
@@ -74,35 +67,71 @@
74 67
 				  <div class="nomal">
75 68
 					<label class="col_6">납품장소</label>
76 69
 					<span>:</span>
77
-					<div class="non_btn fnLocationNm"></div>
70
+					<div class="non_btn fnWhsNm"></div>
78 71
 				  </div>
79 72
 				</div>
73
+			  </li>
74
+		  </div>
75
+			<div id="ITP_LIST_MPOMNG04011_DETAIL_ITEMCOPY" style="display: none;">
80 76
 				<div class="podr_list"> <!-- 반복되는 부분 -->
81 77
 					<div class="left">
82
-					  <div class="nomal">
83
-						<label>품목명</label>
84
-						<span>:</span>
85
-						<div style="min-width:110px;" class="fnItemNm"></div>
86
-						<label class="col_4">구매수량</label>
87
-						<span>:</span>
88
-						<div class="fnPchQty"></div>
89
-					  </div>
78
+						<div class="nomal">
79
+							<label>품목명</label>
80
+							<span>:</span>
81
+							<div style="min-width:110px;" class="fnItemNm">$fnItemNm</div>
82
+							<label class="col_4">구매수량</label>
83
+							<span>:</span>
84
+							<div class="fnPchQty">$fnPchQty</div>
85
+						</div>
90 86
 					</div>
91 87
 					<div class="left">
92
-					  <div class="nomal">
93
-						<label>단가</label>
94
-						<span>:</span>
95
-						<div style="min-width:110px;" class="fnUnit"></div>
96
-						<label class="col_4">구매금액</label>
97
-						<span>:</span>
98
-						<div class="fnPchAmt"></div>
99
-					  </div>
88
+						<div class="nomal">
89
+							<label>단가</label>
90
+							<span>:</span>
91
+							<div style="min-width:110px;" class="fnUnitAmt">$fnUnitAmt</div>
92
+							<label class="col_4">구매금액</label>
93
+							<span>:</span>
94
+							<div class="fnPchOrdAmt">$fnPchOrdAmt</div>
95
+						</div>
100 96
 					</div>
101 97
 				</div>
102
-			  </li>
103
-		  </div>
98
+			</div>
104 99
 		</div>
105 100
 	  </form>
106 101
 	</div>
107 102
 	<div id="ITP_MOBILE_JS"></div>
103
+	<div id="ITP_POP_MPOMNG04011_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
104
+		<div class="pop">
105
+			<div class="header">
106
+				<div class="header_left">
107
+					<label>납품장소</label>
108
+				</div>
109
+				<div class="header_right">
110
+					<button type="button" id="ITP_BTN_MPOMNG04011_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
111
+				</div>
112
+			</div>
113
+			<div class="search_bar">
114
+				<form id="ITP_FORM_MPOMNG04011_POP_WHS" class="form-horizontal" onsubmit="return false;">
115
+					<input type="hidden" id="ITP_FORM_MPOMNG04011_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
116
+					<input type="hidden" id="ITP_FORM_MPOMNG04011_WHS_ITEM_STORE_ID" name="sstoreId" value="">
117
+					<input id="ITP_FORM_MPOMNG04011_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
118
+					<button id="ITP_BTN_MPOMNG04011_POP_WHS_SEARCH"><img src="../img/search.png"></button>
119
+				</form>
120
+			</div>
121
+			<div id="ITP_LIST_MPOMNG04011_POP_WHS_AREA" class="popup_scroll">
122
+				<ul id="ITP_LIST_MPOMNG04011_POP_WHS_ROWS" class="mb_0 itp_nav"></ul>
123
+				<div id="ITP_LIST_MPOMNG04011_POP_WHS_ROWCOPY" style="display: none;">
124
+					<li class="row_2 item-row">
125
+						<div class="scroll_left">
126
+							<div class="con_2 fnWhsNm"></div>
127
+							<div class="con_2 wichi fnLocationNm"></div>
128
+						</div>
129
+						<div class="scroll_right">
130
+							<button id="ITP_BTN_MPOMNG04011_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="" data-location="">선택</button>
131
+						</div>
132
+					</li>
133
+				</div>
134
+			</div>
135
+		</div>
136
+	</div>
108 137
   </section>

+ 63 - 35
src/main/webapp/mobile/app/mrtnmng/MRTNMNG04011.html

@@ -1,15 +1,8 @@
1 1
 <section id="ITP_MOBILE_MRTNMNG04011">
2 2
 	<div id="ITP_AJAX_MRTNMNG04011_VIEW_CONTAINER">
3 3
 	  <form id="ITP_FORM_MRTNMNG04011_DETAIL" class="area_full form-horizontal" onsubmit="return false;">
4
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_VIEW_CD" name="viewCd" value="C">
5
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_BRAND_ID" name="brandId" value="">
6
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_STORE_ID" name="storeId" value="">
7
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_LOAN_DVSN" name="loanDvsn" value="">
8
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_LOAN_MGNT_UNQ_NO" name="loanMgntUnqNo" value="">
9
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_PCH_REQ_DVSN" name="pchReqDvsn" value="">
10
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_PCH_REQ_ST_CD" name="pchReqStCd" value="">
11
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_PCH_REQ_UNQ_NO" name="pchReqUnqNo" value="">
12
-		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_MALL_ID" name="mallId" value="">
4
+		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_BRAND_ID" name="sbrandId" value="">
5
+		<input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_STORE_ID" name="sstoreId" value="">
13 6
 		<div class="content">
14 7
 			<div class="content_fix">
15 8
 				<div class="line header">
@@ -28,8 +21,7 @@
28 21
 				<label>수거장소</label>
29 22
 				  <div class="float_left">
30 23
 					  <input type="text" id="ITP_FORM_MRTNMNG04011_DETAIL_WHS_NM" class="" name="whsNm" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="수거장소" placeholder="" readonly />
31
-					  <input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_WHS_ID" class="form-control itp_input" name="whsId" value="" />
32
-					  <input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_LOCATION" class="form-control itp_input" name="location" value="" />
24
+					  <input type="hidden" id="ITP_FORM_MRTNMNG04011_DETAIL_WHS_ID" class="form-control itp_input" name="swhsId" value="" />
33 25
 					  <div class="itp_input_btn">
34 26
 					   <button id="ITP_BTN_MRTNMNG04011_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG04011_WHS_AREA"><img src="../img/search.png" alt=""></button>
35 27
 					 </div>
@@ -42,12 +34,12 @@
42 34
 			  <div class="line">
43 35
 				  <label>반품요청번호</label>
44 36
 				  <div class="float_left name">
45
-					<input id="ITP_FORM_MRTNMNG04011_RTN_REQ_UNQ_NO" name="rtnReqUnqNo" type="text">
37
+					<input id="ITP_FORM_MRTNMNG04011_RTN_REQ_UNQ_NO" name="srtnReqUnqNo" type="text">
46 38
 				  </div>
47 39
 			  </div>
48 40
 			  <div class="line">
49 41
 				  <div class="search">
50
-					<button id="ITP_BTN_MRTNMNG04011_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
42
+					<button id="ITP_BTN_MRTNMNG04011_DETAIL_SEARCH" class="btn-primary btn-sm ADB">검색</button>
51 43
 				  </div>
52 44
 				</div>
53 45
 				<div class="table_header">
@@ -58,7 +50,7 @@
58 50
 		<div id="ITP_LIST_MRTNMNG04011_ITEM_AREA" class="scroll_area row-1">
59 51
 		  <ul id="ITP_LIST_MRTNMNG04011_DETAIL_ROWS" class="mb_0 panel-group"></ul>
60 52
 		   <!--   검색된 데이터가 없습니다  -->
61
-		   <div class="itp_non_data" style="display:none;">
53
+		   <div class="itp_non_data" style="display:block;">
62 54
 			  <div>검색된 데이터가 없습니다.</div>
63 55
 		   </div>
64 56
 		  <div id="ITP_LIST_MRTNMNG04011_DETAIL_ROWCOPY" style="display: none;">
@@ -67,43 +59,79 @@
67 59
 				  <div class="nomal">
68 60
 					<label class="col_6">반품요청번호</label>
69 61
 					<span>:</span>
70
-					<div class="btn fnRtnReqNo"></div>
62
+					<div class="btn fnRtnReqUnqNo"></div>
71 63
 					<button style="margin-right: 5px;width: 90px;font-size: 12pt;height: 45px;" id="ITP_BTN_MRTNMNG04011_DETAIL_PODR" class="btn-primary REQ">발주처리</button>
72 64
 				  </div>
73 65
 				</div>
74 66
 				<div class="left">
75 67
 				  <div class="nomal">
76
-					<label class="col_6">납품장소</label>
68
+					<label class="col_6">수거장소</label>
77 69
 					<span>:</span>
78
-					<div class="non_btn fnLocationNm"></div>
70
+					<div class="non_btn fnRtnWhsNm"></div>
79 71
 				  </div>
80 72
 				</div>
73
+			  </li>
74
+		  </div>
75
+			<div id="ITP_LIST_MRTNMNG04011_DETAIL_ITEMCOPY" style="display: none;">
81 76
 				<div class="podr_list"> <!-- 반복되는 부분 -->
82 77
 					<div class="left">
83
-					  <div class="nomal">
84
-						<label>품목명</label>
85
-						<span>:</span>
86
-						<div style="min-width:110px;" class="fnItemNm"></div>
87
-						<label class="col_4">반품수량</label>
88
-						<span>:</span>
89
-						<div class="fnRtnQty"></div>
90
-					  </div>
78
+						<div class="nomal">
79
+							<label>품목명</label>
80
+							<span>:</span>
81
+							<div style="min-width:110px;" class="fnItemNm">$fnItemNm</div>
82
+							<label class="col_4">반품수량</label>
83
+							<span>:</span>
84
+							<div class="fnRtnQty">$fnQty</div>
85
+						</div>
91 86
 					</div>
92 87
 					<div class="left">
93
-					  <div class="nomal">
94
-						<label>단가</label>
95
-						<span>:</span>
96
-						<div style="min-width:110px;" class="fnUnit"></div>
97
-						<label class="col_4">반품금액</label>
98
-						<span>:</span>
99
-						<div class="fnRtnAmt"></div>
100
-					  </div>
88
+						<div class="nomal">
89
+							<label>단가</label>
90
+							<span>:</span>
91
+							<div style="min-width:110px;" class="fnUnittAmt">$fnUnitAmt</div>
92
+							<label class="col_4">반품금액</label>
93
+							<span>:</span>
94
+							<div class="fnRtnAmt">$fnRtnAmt</div>
95
+						</div>
101 96
 					</div>
102 97
 				</div>
103
-			  </li>
104
-		  </div>
98
+			</div>
105 99
 		</div>
106 100
 	  </form>
107 101
 	</div>
108 102
 	<div id="ITP_MOBILE_JS"></div>
103
+	<div id="ITP_POP_MRTNMNG04011_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
104
+		<div class="pop">
105
+			<div class="header">
106
+				<div class="header_left">
107
+					<label>납품장소</label>
108
+				</div>
109
+				<div class="header_right">
110
+					<button type="button" id="ITP_BTN_MRTNMNG04011_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
111
+				</div>
112
+			</div>
113
+			<div class="search_bar">
114
+				<form id="ITP_FORM_MRTNMNG04011_POP_WHS" class="form-horizontal" onsubmit="return false;">
115
+					<input type="hidden" id="ITP_FORM_MRTNMNG04011_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
116
+					<input type="hidden" id="ITP_FORM_MRTNMNG04011_WHS_ITEM_STORE_ID" name="sstoreId" value="">
117
+					<input id="ITP_FORM_MRTNMNG04011_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
118
+					<button id="ITP_BTN_MRTNMNG04011_POP_WHS_SEARCH"><img src="../img/search.png"></button>
119
+				</form>
120
+			</div>
121
+			<div id="ITP_LIST_MRTNMNG04011_POP_WHS_AREA" class="popup_scroll">
122
+				<ul id="ITP_LIST_MRTNMNG04011_POP_WHS_ROWS" class="mb_0 itp_nav"></ul>
123
+				<div id="ITP_LIST_MRTNMNG04011_POP_WHS_ROWCOPY" style="display: none;">
124
+					<li class="row_2 item-row">
125
+						<div class="scroll_left">
126
+							<div class="con_2 fnWhsNm"></div>
127
+							<div class="con_2 wichi fnLocationNm"></div>
128
+						</div>
129
+						<div class="scroll_right">
130
+							<button id="ITP_BTN_MRTNMNG04011_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="" data-location="">선택</button>
131
+						</div>
132
+					</li>
133
+				</div>
134
+			</div>
135
+		</div>
136
+	</div>
109 137
   </section>

+ 1 - 1
src/main/webapp/mobile/js/app/main.js

@@ -41,7 +41,7 @@ var mobMainObj = {
41 41
 		if(authTpCd === '40' ) {
42 42
 			$('#ITP_BRAND_ICON_BAR').show();
43 43
 			if(fn_make_user_info.get('authTpCd') === '40') {
44
-				if(fn_make_user_info.get('shmtColProcType') === '0') {
44
+				if(fn_make_user_info.get('shmtColProcType') === '10') {
45 45
 					$('#ITP_MAIN_ICON_ODER_PRO').remove();
46 46
 					$('#ITP_MAIN_ICON_RETURN_PRO').remove();
47 47
 					$('#ITP_BRAND_ICON_BAR .itp_icon_bar').each(function(i) {

+ 1 - 1
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG04010.js

@@ -169,7 +169,7 @@ let mobContObj = {
169 169
 				var $li = $('#ITP_LIST_MPOMNG04010_VIEW_ITEM_AREA .panel-group > .item-row:last');
170 170
 				$li.find('.fnItemNm').text(item.itemNm);
171 171
 				$li.find('.fnUnit').text(item.unit);
172
-				$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty + ' ' + item.unit));
172
+				$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty) + ' ' + item.unit);
173 173
 				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
174 174
 				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
175 175
 			});

+ 44 - 177
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG04011.js

@@ -8,16 +8,9 @@ require(['config'], function() {
8 8
 /*API URL*/
9 9
 const API_MOBILE_GRID_LIST 			= '/api/pomng/po-streamline-grid-list';	// 목록
10 10
 const API_MOBILE_INFO 				= '/api/pomng/po/info-pchOdr';		// 상세
11
-const API_MOBILE_CANCEL_PCHPO		=  '/api/pomng/po/cancel-pchPo';
12 11
 const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
13
-const API_POP_ITEM_LIST 			= '/api/item/pop-grid-list';
14
-const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
15
-
16
-const PAGE_MODE_LIST				= "LIST";
17
-const PAGE_MODE_VIEW				= "VIEW";
18 12
 
19 13
 let mobPageObj = {
20
-	viewMode: PAGE_MODE_LIST,
21 14
 	init: function () {
22 15
 		this.ui.init();
23 16
 		this.event.init();
@@ -38,7 +31,7 @@ let mobPageObj = {
38 31
 			// 조회일자 지정
39 32
 			$('#ITP_MOBILE_MPOMNG04011 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);
40 33
 			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH_FROM_DT').datepicker('setDate', itp_fn_date_add('D', -7));
41
-			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH_TO_DT').datepicker('setDate', itp_fn_date_add('D', 0));
34
+			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH_TO_DT').datepicker('setDate', itp_fn_date_add('D', 7));
42 35
 
43 36
 			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
44 37
 			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
@@ -49,46 +42,17 @@ let mobPageObj = {
49 42
 			this.button();
50 43
 		},
51 44
 		button: function() {
52
-			$('button[id^="ITP_BTN_MPOMNG04011_LIST"]').on('click', function() {
45
+			$('button[id^="ITP_BTN_MPOMNG04011_DETAIL"]').on('click', function() {
53 46
 				var id = $(this).attr('id');
54 47
 				switch (id) {
55
-					case 'ITP_BTN_MPOMNG04011_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
56
-					case 'ITP_BTN_MPOMNG04011_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
57
-					case 'ITP_BTN_MPOMNG04011_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
58
-					case 'ITP_BTN_MPOMNG04011_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
59
-					case 'ITP_BTN_MPOMNG04011_LIST_SEARCH'			: mobContObj.list.search();	break;
48
+					case 'ITP_BTN_MPOMNG04011_DETAIL_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
49
+					case 'ITP_BTN_MPOMNG04011_DETAIL_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
50
+					case 'ITP_BTN_MPOMNG04011_DETAIL_SEARCH'		: mobContObj.list.search();		break;
60 51
 				}
61 52
 				return false;
62 53
 			});
63
-
64
-			$('button[id^="ITP_BTN_MPOMNG04011_VIEW"]').on('click', function() {
65
-				var id = $(this).attr('id');
66
-				switch (id) {
67
-					case 'ITP_BTN_MPOMNG04011_VIEW_CANCEL_LIST'		: mobContObj.view.cancel();	break;
68
-				}
69
-				return false;
70
-			});
71
-
72
-			$(document).off('click', '#ITP_LIST_MPOMNG04011_LIST_ITEM_ROWS li');
73
-			$(document).on('click', '#ITP_LIST_MPOMNG04011_LIST_ITEM_ROWS li', function() {
74
-				var item = mobContObj.list.rows[$(this).index()];
75
-				mobContObj.view.init(item);
76
-			});
77
-
78 54
 		}
79 55
 	},
80
-	switchScreen: function(mode) {
81
-		$('#ITP_MOBILE_MPOMNG04011').find('div[id$="_CONTAINER"]').each(function(i) {
82
-			$(this).hide();
83
-		});
84
-		if(mode === PAGE_MODE_LIST) {
85
-			$('#ITP_AJAX_MPOMNG04011_LIST_CONTAINER').show();
86
-		} else if(mode === PAGE_MODE_VIEW) {
87
-			$('#ITP_AJAX_MPOMNG04011_VIEW_CONTAINER').show();
88
-			CommonObj.moreView('#ITP_LIST_MPOMNG04011_LIST_ITEM_AREA', false);
89
-		}
90
-		this.viewMode = mode;
91
-	},
92 56
 	ready: function() {
93 57
 		mobContObj.list.init();
94 58
 	}
@@ -96,167 +60,67 @@ let mobPageObj = {
96 60
 
97 61
 let mobContObj = {
98 62
 	list: {
99
-		listPage: 1,
100 63
 		rows: [],
101 64
 		init: function() {
102
-			// mobPageObj.switchScreen(PAGE_MODE_LIST);
103 65
 			// this.search();
104 66
 		},
105 67
 		search: function() {
106
-			this.listPage = 1;
68
+			// if($('#ITP_FORM_MPOMNG04011_DETAIL #ITP_FORM_MPOMNG04011_DETAIL_WHS_ID').val() === '') {
69
+			// 	itp_fn_modal_alert('납품장소를 선택하세요.');
70
+			// 	return;
71
+			// }
107 72
 			this.rows.length = 0;
108
-			$('#ITP_LIST_MPOMNG04011_LIST_ITEM_ROWS').empty();
73
+			$('#ITP_LIST_MPOMNG04011_DETAIL_ROWS').empty();
109 74
 			setTimeout(function() {
110 75
 				mobContObj.list.load();
111 76
 			}, 100);
112 77
 		},
113
-		pager: function(totPage) {
114
-			(this.listPage < totPage) ?
115
-				CommonObj.moreView('#ITP_LIST_MPOMNG04011_LIST_ITEM_AREA', true, mobContObj.list.load) :
116
-				CommonObj.moreView('#ITP_LIST_MPOMNG04011_LIST_ITEM_AREA', false);
117
-			this.listPage += 1;
118
-		},
119 78
 		load: function() {
120 79
 			var _this = this;
121 80
 			var callbackFn = function(result) {
122 81
 				console.log(result);
123
-				mobContObj.list.pager(result.gridTotal);
82
+				var pchReqUnqNo = '';
83
+				var index = 0;
124 84
 				$.each(result.gridRows, function (i, item) {
125
-					$('#ITP_LIST_MPOMNG04011_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG04011_LIST_ITEM_ROWCOPY').html());
126
-					var $li = $('#ITP_LIST_MPOMNG04011_LIST_ITEM_AREA .panel-group > .item-row:last');
127
-					$li.find('.fnPodrDt').text(item.podrDt);
128
-					$li.find('.fnPodrMgrNm').text($li.find('.fnPodrMgrNm').text().replace('$', item.podrMgrNm));
129
-					$li.find('.fnPchodrStCd').text(item.pchOdrStNm);
130
-					$li.find('.fnLocationNm').text(item.whsNm);
131
-					// $li.find('.fnLocationNm').text(item.whsNm + ' - ' + item.locationNm);
132
-					$li.find('.fnPodrItemQty').text(CommonObj.comma.set(item.podrItemQty));
133
-					$li.find('.fnPodrTotalAmt').text(CommonObj.currency.add(item.podrTotalAmt));
134
-					$li.find('.fnSpplyNm').text(item.spplyNm);
135
-					$li.find('.fnDlvDvsnNm').text(item.dlvDvsnNm);
85
+					if(item.pchReqUnqNo !== pchReqUnqNo) {
86
+						$('#ITP_LIST_MPOMNG04011_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG04011_DETAIL_ROWCOPY').html());
87
+						var $headerLi = $('#ITP_LIST_MPOMNG04011_ITEM_AREA .panel-group > .item-row:last');
88
+						$headerLi.find('.fnPchReqUnqNo').text(item.pchReqUnqNo);
89
+						$headerLi.find('.fnWhsNm').text(item.whsNm);
90
+						$('#ITP_LIST_MPOMNG04011_DETAIL_ROWS li button')[$headerLi.index()].addEventListener('click', function() { _this.save(item); });
91
+						pchReqUnqNo = item.pchReqUnqNo;
92
+						index += 1;
93
+					}
94
+					var div = $('#ITP_LIST_MPOMNG04011_DETAIL_ITEMCOPY').html();
95
+					div = div.replace('$fnItemNm', item.itemNm);
96
+					div = div.replace('$fnPchQty', CommonObj.comma.set(item.pchReqQty));
97
+					div = div.replace('$fnUnitAmt', CommonObj.currency.add(item.unitAmt));
98
+					div = div.replace('$fnPchOrdAmt', CommonObj.currency.add(item.pchOrdAmt));
99
+					var $li = $('#ITP_LIST_MPOMNG04011_ITEM_AREA .panel-group > .item-row:last');
100
+					$li.append(div);
136 101
 					mobContObj.list.rows.push(item);
137 102
 				});
103
+				result.gridRows.length < 1 ? $('.itp_non_data').show() : $('.itp_non_data').hide();
138 104
 			};
139 105
 			const param = $('#ITP_FORM_MPOMNG04011_DETAIL').serializeObject();
140 106
 			param.pagingYn = false;
107
+			console.log(JSON.stringify(param));
141 108
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST');
142
-		}
143
-	},
144
-	view: {
145
-		init: function(item) {
146
-			mobPageObj.switchScreen(PAGE_MODE_VIEW);
147
-			this.search(item);
148 109
 		},
149
-		search: function(item) {
150
-			var _this = this;
151
-			var callbackFn = function(result) {
152
-				console.log(result);
153
-				_this.view(result);
154
-			};
155
-			const param = {'pchPodrUnqNo': item.pchPodrUnqNo};
156
-			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
157
-		},
158
-		view: function(result) {
159
-			var _this = this;
160
-			var id = '#ITP_AJAX_MPOMNG04011_VIEW_CONTAINER';
161
-			$(id).find('.fnPodrDt').text(result.podrDt);
162
-			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrTotalAmt));
163
-			$(id).find('.fnDlvReqDt').text(result.dlvReqDt);
164
-			$(id).find('.fnWhsNm').text(result.whsNm);
165
-			$(id).find('.fnSpplyNm').text(result.spplyNm);
166
-			$.each(result.pchOdrDtlList, function (i, item) {
167
-				$('#ITP_LIST_MPOMNG04011_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG04011_VIEW_ITEM_ROWCOPY').html());
168
-				var $li = $('#ITP_LIST_MPOMNG04011_VIEW_ITEM_AREA .panel-group > .item-row:last');
169
-				$li.find('.fnItemNm').text(item.itemNm);
170
-				$li.find('.fnUnit').text(item.unit);
171
-				$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty + ' ' + item.unit));
172
-				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
173
-				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
174
-			});
175
-		},
176
-		cancel: function () {
177
-			var id = '#ITP_AJAX_MPOMNG04011_VIEW_CONTAINER';
178
-			$(id).find('.fnPodrDt').text('');
179
-			$(id).find('.fnPodrTotalAmt').text('');
180
-			$(id).find('.fnDlvReqDt').text('');
181
-			$(id).find('.fnWhsNm').text('');
182
-			$(id).find('.fnSpplyNm').text('');
183
-			$('#ITP_LIST_MPOMNG04011_VIEW_ITEM_AREA .panel-group').empty();
184
-			mobPageObj.switchScreen(PAGE_MODE_LIST);
110
+		save: function(item) {
111
+			console.log(item);
185 112
 		}
186 113
 	}
187 114
 };
188 115
 
189 116
 let mobPopObj = {
190
-	popSpply: {
191
-		popId: 'ITP_POP_MPOMNG04011_SPPLY_AREA',
192
-		rows: [],
193
-		init: function() {
194
-			this.rows.length = 0;
195
-			mobPopObj.show(this.popId);
196
-			this.search();
197
-			this.action();
198
-		},
199
-		search: function() {
200
-			var _this = this;
201
-			$('#ITP_POP_MPOMNG04011_SPPLY_AREA .panel-group').empty();
202
-			var callbackFn = function(result) {
203
-				console.log(result);
204
-				_this.view(result.gridRows);
205
-			};
206
-			let param = $('#ITP_FORM_MPOMNG04011_POP_SPPLY_SEARCH').serializeObject();
207
-			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
208
-		},
209
-		view: function(gridRows) {
210
-			this.rows = gridRows;
211
-			$.each(gridRows, function (i, item) {
212
-				$('#ITP_POP_MPOMNG04011_SPPLY_AREA .panel-group').append($('#ITP_POP_MPOMNG04011_SPPLY_LIST_ROWCOPY').html());
213
-				var $li = $('#ITP_POP_MPOMNG04011_SPPLY_AREA .panel-group > .row_2:last');
214
-				$li.find('.fnSpplyNm').text(item.spplyNm);
215
-				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
216
-				$li.find('.fnSpplyId').data('item-key', item.spplyId);
217
-			});
218
-		},
219
-		choice: function(elem) {
220
-			var _this = this;
221
-			var spplyId = $(elem).data('item-key');
222
-			$.each(this.rows, function (i, item) {
223
-				if(spplyId === item.spplyId) {
224
-					$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
225
-					$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
226
-					_this.close();
227
-					return false;
228
-				}
229
-			});
230
-		},
231
-		action: function() {
232
-			var _this = this;
233
-			$('button[id^="ITP_BTN_MPOMNG04011_POP_SPPLY"]').off('click').on('click', function() {
234
-				var id = $(this).attr('id');
235
-				switch (id) {
236
-					case 'ITP_BTN_MPOMNG04011_POP_SPPLY_SEARCH'	: _this.search();			break;
237
-					case 'ITP_BTN_MPOMNG04011_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
238
-					case 'ITP_BTN_MPOMNG04011_POP_SPPLY_CLOSE'	: _this.close(); 			break;
239
-				}
240
-				return false;
241
-			});
242
-		},
243
-		delete: function() {
244
-			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_SPPLY_ID').val('');
245
-			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_SPPLY_NM').val('');
246
-		},
247
-		close: function() {
248
-			this.rows.length = 0;
249
-			$('#ITP_POP_MPOMNG04011_LIST_SPPLY_AREA .panel-group').empty();
250
-			$('#ITP_FORM_MPOMNG04011_POP_SPPLY_SEARCH #ITP_FORM_MPOMNG04011_POP_SPPLY_KEYWORD').val('');
251
-			mobPopObj.hide(this.popId);
252
-		}
253
-	},
254 117
 	popWhsNm: {
255 118
 		popId: 'ITP_POP_MPOMNG04011_WHS_AREA',
256 119
 		rows: [],
257 120
 		init: function () {
258 121
 			this.rows.length = 0;
259 122
 			mobPopObj.show(this.popId);
123
+			this.reset();
260 124
 			this.search();
261 125
 			this.action();
262 126
 		},
@@ -274,8 +138,8 @@ let mobPopObj = {
274 138
 		view: function(gridRows) {
275 139
 			this.rows = gridRows;
276 140
 			$.each(gridRows, function (i, item) {
277
-				$('#ITP_LIST_MPOMNG04011_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MPOMNG04011_POP_WHS_ROWCOPY').html());
278
-				var $li = $('#ITP_LIST_MPOMNG04011_POP_WHS_AREA .panel-group > .row_2:last');
141
+				$('#ITP_LIST_MPOMNG04011_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MPOMNG04011_POP_WHS_ROWCOPY').html());
142
+				var $li = $('#ITP_LIST_MPOMNG04011_POP_WHS_AREA .mb_0 > .row_2:last');
279 143
 				$li.find('.fnWhsNm').text(item.whsNm);
280 144
 				$li.find('.fnLocationNm').text(item.locationNm);
281 145
 				$li.find('.fnWhsId').data('whs-id', item.whsId);
@@ -286,8 +150,8 @@ let mobPopObj = {
286 150
 			var whsId = $(elem).data('whs-id');
287 151
 			$.each(this.rows, function (i, item) {
288 152
 				if(whsId === item.whsId) {
289
-					$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_WHS_ID').val(item.whsId);
290
-					$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_WHS_NM').val(item.whsNm);
153
+					$('#ITP_FORM_MPOMNG04011_DETAIL #ITP_FORM_MPOMNG04011_DETAIL_WHS_ID').val(item.whsId);
154
+					$('#ITP_FORM_MPOMNG04011_DETAIL #ITP_FORM_MPOMNG04011_DETAIL_WHS_NM').val(item.whsNm);
291 155
 					_this.close();
292 156
 					return false;
293 157
 				}
@@ -306,13 +170,16 @@ let mobPopObj = {
306 170
 			});
307 171
 		},
308 172
 		delete: function() {
309
-			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_WHS_ID').val('');
310
-			$('#ITP_FORM_MPOMNG04011_LIST_SEARCH #ITP_FORM_MPOMNG04011_LIST_SEARCH_WHS_NM').val('');
173
+			$('#ITP_FORM_MPOMNG04011_DETAIL #ITP_FORM_MPOMNG04011_DETAIL_WHS_ID').val('');
174
+			$('#ITP_FORM_MPOMNG04011_DETAIL #ITP_FORM_MPOMNG04011_DETAIL_WHS_NM').val('');
311 175
 		},
312
-		close: function() {
176
+		reset: function() {
313 177
 			this.rows.length = 0;
314
-			$('#ITP_POP_MPOMNG04011_LIST_WHS_AREA .panel-group').empty();
178
+			$('#ITP_LIST_MPOMNG04011_POP_WHS_ROWS').empty();
315 179
 			$('#ITP_FORM_MPOMNG04011_POP_WHS #ITP_FORM_MPOMNG04011_POP_WHS_KEYWORD').val('');
180
+		},
181
+		close: function() {
182
+			this.reset();
316 183
 			mobPopObj.hide(this.popId);
317 184
 		}
318 185
 	},

+ 192 - 0
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG04011.js

@@ -0,0 +1,192 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_GRID_LIST 			= '/api/rtnmng/rtn-streamline-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/po/info-pchOdr';		// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+
13
+let mobPageObj = {
14
+	init: function () {
15
+		this.ui.init();
16
+		this.event.init();
17
+		this.ready();
18
+	},
19
+	ui: {
20
+		init: function () {
21
+			this.view();
22
+		},
23
+		view: function() {
24
+			// 공통코드 표시
25
+			$('select').each(function() {
26
+				if($(this).data('select-code')) {
27
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
28
+				}
29
+			});
30
+
31
+			// 조회일자 지정
32
+			$('#ITP_MOBILE_MRTNMNG04011 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);
33
+			$('#ITP_FORM_MRTNMNG04011_LIST_SEARCH_FROM_DT').datepicker('setDate', itp_fn_date_add('D', -7));
34
+			$('#ITP_FORM_MRTNMNG04011_LIST_SEARCH_TO_DT').datepicker('setDate', itp_fn_date_add('D', 7));
35
+
36
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
37
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
38
+		}
39
+	},
40
+	event: {
41
+		init: function() {
42
+			this.button();
43
+		},
44
+		button: function() {
45
+			$('button[id^="ITP_BTN_MRTNMNG04011_DETAIL"]').on('click', function() {
46
+				var id = $(this).attr('id');
47
+				switch (id) {
48
+					case 'ITP_BTN_MRTNMNG04011_DETAIL_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
49
+					case 'ITP_BTN_MRTNMNG04011_DETAIL_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
50
+					case 'ITP_BTN_MRTNMNG04011_DETAIL_SEARCH'			: mobContObj.list.search();		break;
51
+				}
52
+				return false;
53
+			});
54
+		}
55
+	},
56
+	ready: function() {
57
+		mobContObj.list.init();
58
+	}
59
+};
60
+
61
+let mobContObj = {
62
+	list: {
63
+		rows: [],
64
+		init: function() {
65
+			// this.search();
66
+		},
67
+		search: function() {
68
+			this.rows.length = 0;
69
+			$('#ITP_LIST_MRTNMNG04011_DETAIL_ROWS').empty();
70
+			setTimeout(function() {
71
+				mobContObj.list.load();
72
+			}, 100);
73
+		},
74
+		load: function() {
75
+			var _this = this;
76
+			var callbackFn = function(result) {
77
+				console.log(result);
78
+				var rtnReqUnqNo = '';
79
+				$.each(result.gridRows, function (i, item) {
80
+					if(item.rtnReqUnqNo !== rtnReqUnqNo) {
81
+						$('#ITP_LIST_MRTNMNG04011_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG04011_DETAIL_ROWCOPY').html());
82
+						var $headerLi = $('#ITP_LIST_MRTNMNG04011_ITEM_AREA .panel-group > .item-row:last');
83
+						$headerLi.find('.fnRtnReqUnqNo').text(item.rtnReqUnqNo);
84
+						$headerLi.find('.fnRtnWhsNm').text(item.rtnWhsNm);
85
+						$('#ITP_LIST_MRTNMNG04011_DETAIL_ROWS li button')[$headerLi.index()].addEventListener('click', function() { _this.save(item); });
86
+						rtnReqUnqNo = item.rtnReqUnqNo;
87
+					}
88
+					var div = $('#ITP_LIST_MRTNMNG04011_DETAIL_ITEMCOPY').html();
89
+					div = div.replace('$fnItemNm', item.itemNm);
90
+					div = div.replace('$fnQty', CommonObj.comma.set(item.rtnQty));
91
+					div = div.replace('$fnUnitAmt', CommonObj.currency.add(item.unitAmt));
92
+					div = div.replace('$fnRtnAmt', CommonObj.currency.add(item.rtnAmt));
93
+					var $li = $('#ITP_LIST_MRTNMNG04011_ITEM_AREA .panel-group > .item-row:last');
94
+					$li.append(div);
95
+					mobContObj.list.rows.push(item);
96
+				});
97
+				result.gridRows.length < 1 ? $('.itp_non_data').show() : $('.itp_non_data').hide();
98
+			};
99
+			const param = $('#ITP_FORM_MRTNMNG04011_DETAIL').serializeObject();
100
+			param.pagingYn = false;
101
+			console.log(JSON.stringify(param));
102
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST');
103
+		},
104
+		save: function(item) {
105
+			console.log(item);
106
+		}
107
+	}
108
+};
109
+
110
+let mobPopObj = {
111
+	popWhsNm: {
112
+		popId: 'ITP_POP_MRTNMNG04011_WHS_AREA',
113
+		rows: [],
114
+		init: function () {
115
+			this.rows.length = 0;
116
+			mobPopObj.show(this.popId);
117
+			this.reset();
118
+			this.search();
119
+			this.action();
120
+		},
121
+		search: function () {
122
+			var _this = this;
123
+			$('#ITP_LIST_MRTNMNG04011_POP_WHS_AREA .panel-group').empty();
124
+			var callbackFn = function(result) {
125
+				console.log(result);
126
+				_this.view(result.gridRows);
127
+			};
128
+			const param = $('#ITP_FORM_MRTNMNG04011_POP_WHS').serializeObject();
129
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = '';
130
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
131
+		},
132
+		view: function(gridRows) {
133
+			this.rows = gridRows;
134
+			$.each(gridRows, function (i, item) {
135
+				$('#ITP_LIST_MRTNMNG04011_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MRTNMNG04011_POP_WHS_ROWCOPY').html());
136
+				var $li = $('#ITP_LIST_MRTNMNG04011_POP_WHS_AREA .mb_0 > .row_2:last');
137
+				$li.find('.fnWhsNm').text(item.whsNm);
138
+				$li.find('.fnLocationNm').text(item.locationNm);
139
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
140
+			});
141
+		},
142
+		choice: function(elem) {
143
+			var _this = this;
144
+			var whsId = $(elem).data('whs-id');
145
+			$.each(this.rows, function (i, item) {
146
+				if(whsId === item.whsId) {
147
+					$('#ITP_FORM_MRTNMNG04011_DETAIL #ITP_FORM_MRTNMNG04011_DETAIL_WHS_ID').val(item.whsId);
148
+					$('#ITP_FORM_MRTNMNG04011_DETAIL #ITP_FORM_MRTNMNG04011_DETAIL_WHS_NM').val(item.whsNm);
149
+					_this.close();
150
+					return false;
151
+				}
152
+			});
153
+		},
154
+		action: function() {
155
+			var _this = this;
156
+			$('button[id^="ITP_BTN_MRTNMNG04011_POP_WHS"]').off('click').on('click', function() {
157
+				var id = $(this).attr('id');
158
+				switch (id) {
159
+					case 'ITP_BTN_MRTNMNG04011_POP_WHS_SEARCH'	: _this.search();			break;
160
+					case 'ITP_BTN_MRTNMNG04011_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
161
+					case 'ITP_BTN_MRTNMNG04011_POP_WHS_CLOSE'	: _this.close(); 			break;
162
+				}
163
+				return false;
164
+			});
165
+		},
166
+		delete: function() {
167
+			$('#ITP_FORM_MRTNMNG04011_DETAIL #ITP_FORM_MRTNMNG04011_DETAIL_WHS_ID').val('');
168
+			$('#ITP_FORM_MRTNMNG04011_DETAIL #ITP_FORM_MRTNMNG04011_DETAIL_WHS_NM').val('');
169
+		},
170
+		reset: function() {
171
+			this.rows.length = 0;
172
+			$('#ITP_LIST_MRTNMNG04011_POP_WHS_ROWS').empty();
173
+			$('#ITP_FORM_MRTNMNG04011_POP_WHS #ITP_FORM_MRTNMNG04011_POP_WHS_KEYWORD').val('');
174
+		},
175
+		close: function() {
176
+			this.reset();
177
+			mobPopObj.hide(this.popId);
178
+		}
179
+	},
180
+	show: function(popId) {
181
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
182
+			console.log($(this).attr('id'));
183
+			if($(this).hasClass('btn-pop-close')) {
184
+				mobPopObj.hide(popId);
185
+			}
186
+		});
187
+		$('#' + popId).show();
188
+	},
189
+	hide: function(popId) {
190
+		$('#' + popId).closest('.mobile-pop-close').hide();
191
+	}
192
+};