Kaynağa Gözat

모바일 공급사 수주관리 작업

juney 2 yıl önce
ebeveyn
işleme
6d991058bb

+ 85 - 44
src/main/webapp/mobile/app/mordmng/MORDMNG01010.html

@@ -1,24 +1,29 @@
1 1
 <section id="ITP_MOBILE_MORDMNG01010">
2
-	<div id="ITP_AJAX_MORDMNG01010_LIST_CONTAINER" style="display: none;">
3
-	  <form id="ITP_FORM_MORDMNG01010_LIST" class="form-horizontal" onsubmit="return false;">
2
+	<div id="ITP_AJAX_MORDMNG01010_LIST_CONTAINER" style="display: block;">
3
+	  <form id="ITP_FORM_MORDMNG01010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
4 4
 		<input type="hidden" id="ITP_FORM_MORDMNG01010_LIST_VIEW_CD" name="viewCd" value="C">
5
+		  <input type="hidden" id="ITP_FORM_MORDMNG01010_SEARCH_BRAND_ID" name="sbrandId" value="">
6
+		  <input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_STORE_ID" name="sstoreId" value="">
7
+		  <input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_SPPLY_ID" name="sspplyId" value="">
8
+		  <input type="hidden" id="ITP_FORM_ORDMNG01010_LIST_SEARCH_IDX" name="sidx" value="0">
5 9
 		  <div class="content">
6 10
 			<div class="line">
7 11
 			  <label>납품장소</label>
8 12
 			  <div class="search_wrap">
9 13
 				  <div class="float_left">
10
-					<input id="ITP_FORM_MORDMNG01010_LIST_DLV_PLACE" name="dlvPlace" type="text" placeholder="A매장명">
14
+					<input id="ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM" name="swhsNm" type="text" placeholder="A매장명">
15
+					  <input type="hidden" id="ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId"/>
11 16
 				  </div>
12 17
 				  <div class="float_left_btn">
13
-					<button id="ITP_BTN_MORDMNG01010_LIST_SEARCH_DLV_PLACE" data-call-popup="ITP_POP_MORDMNG01010_DLV_AREA"><img src="../img/search.png" alt=""></button>
14
-					<button id="ITP_BTN_MORDMNG01010_LIST_DETELE_DLV_PLACE"><img src="../img/delete.png" alt=""></button>
18
+					  <button type="button" id="ITP_BTN_MORDMNG01010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
19
+					  <button type="button" id="ITP_BTN_MORDMNG01010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
15 20
 				  </div>	
16 21
 			  </div>
17 22
 			</div>
18 23
 			<div class="line">
19 24
 			  <label>수주상태</label>
20 25
 			  <div class="line_right">
21
-				<select name="stCd" id="ITP_FORM_MORDMNG01010_LIST_ST_CD">
26
+				<select name="spchOdrStCd" id="ITP_FORM_MORDMNG01010_LIST_SEARCH_ST_CD" data-select-code="PCH_ODR_ST_CD">
22 27
 				  <option value=""></option>
23 28
 				</select>
24 29
 			  </div>
@@ -26,17 +31,15 @@
26 31
 			<div class="line">
27 32
 			  <label>수주일자</label>
28 33
 			  <div class="date_to">
29
-				<input id="ITP_FORM_MORDMNG01010_LIST_FORM_DT" name="formDt" class="year" type="date">
30
-				<div class="at">~</div>
31
-				<input id="ITP_FORM_MORDMNG01010_LIST_TO_DT" name="toDt" class="year" type="date">
34
+				  <input id="ITP_FORM_MORDMNG01010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
35
+				  <div class="at">~</div>
36
+				  <input id="ITP_FORM_MORDMNG01010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
32 37
 			  </div>
33 38
 			</div>
34 39
 			<div class="line">
35
-			  <select class="label" name="itemNm" id="ITP_FORM_MORDMNG01010_LIST_ITEM_NM">
36
-				<option value="">발주번호/품목명</option>
37
-			  </select>
40
+				<label>발주번호/품목번호/품목명</label>
38 41
 			  <div class="search_wrap">
39
-				<input id="ITP_FORM_MORDMNG01010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="검색어입력">
42
+				<input id="ITP_FORM_MORDMNG01010_LIST_SEARCH_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="검색어입력">
40 43
 			  </div>
41 44
 			</div>
42 45
 			<div class="line" style="height:50px;">
@@ -48,20 +51,20 @@
48 51
 			  <h1>> 수거수주 내역</h1>
49 52
 			</div>
50 53
 		  </div>
51
-			<div id="ITP_LIST_MORDMNG01010_ITEM_AREA" class="scroll_area row-3">
52
-			  <ul id="ITP_LIST_MORDMNG01010_LIST_ROWS" class="panel-group"></ul>
53
-			  <div id="ITP_LIST_MORDMNG01010_LIST_ROWCOPY" style="display:none;">
54
-				<li class="history_list">
54
+		  <div id="ITP_LIST_MORDMNG01010_LIST_ITEM_AREA" class="scroll_area row-3">
55
+			  <ul id="ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS" class="panel-group"></ul>
56
+			  <div id="ITP_LIST_MORDMNG01010_LIST_ITEM_ROWCOPY" style="display: none;">
57
+				<li class="history_list list-row">
55 58
 				  <div>
56 59
 					<div class="left">
57 60
 					  <div class="nomal">
58 61
 						<label>브랜드명 &nbsp;:</label>
59 62
 						<div>
60
-						  <div class="fnBrandNm">브랜드명</div>
63
+						  <div class="fnBrandNm"></div>
61 64
 						</div>
62 65
 						<label>발주번호&nbsp;:</label>
63 66
 						<div>
64
-						  <div class="fnPodrNo">PO1234123</div>
67
+						  <div class="fnPchPodrUnqNo"></div>
65 68
 						</div>
66 69
 					  </div>
67 70
 					</div>
@@ -69,11 +72,11 @@
69 72
 					  <div class="nomal">
70 73
 						<label>발주상태 &nbsp;:</label>
71 74
 						<div>
72
-						  <div class="fnPodrStCd">요청</div>
75
+						  <div class="fnPchOdrStNm"></div>
73 76
 						</div>
74 77
 						<label>발주일자&nbsp;:</label>
75 78
 						<div>
76
-						  <div class="fnPodrDt">2022.10.05</div>
79
+						  <div class="fnPodrDt"></div>
77 80
 						</div>
78 81
 					  </div>
79 82
 					</div>
@@ -81,11 +84,11 @@
81 84
 					  <div class="nomal">
82 85
 						<label class="col_6">납품요청일 &nbsp;:</label>
83 86
 						<div>
84
-						  <div class="fnDlvReqDt">2022.10.09</div>
87
+						  <div class="fnDlvReqDt"></div>
85 88
 						</div>
86 89
 						<label>납품장소&nbsp;:</label>
87 90
 						<div>
88
-						  <div class="fnDlvPlace">A창고</div>
91
+						  <div class="fnWhsNm"></div>
89 92
 						</div>
90 93
 					  </div>
91 94
 					</div>
@@ -93,11 +96,11 @@
93 96
 					  <div class="nomal">
94 97
 						<label>발주금액 &nbsp;:</label>
95 98
 						<div>
96
-						  <div class="fnPodrAmt">2,000,000</div>
99
+						  <div class="fnPodrTotalAmt"></div>
97 100
 						</div>
98 101
 						<label>품목수&nbsp;:</label>
99 102
 						<div>
100
-						  <div class="fnItemQty">3개</div>
103
+						  <div class="fnPodrItemQty">3개</div>
101 104
 						</div>
102 105
 					  </div>
103 106
 					</div>
@@ -107,60 +110,60 @@
107 110
 		  </div>
108 111
 	  </form>
109 112
 	</div>
110
-	<div id="ITP_AJAX_MORDMNG01010_VIEW_CONTAINER" style="display: block;">
113
+	<div id="ITP_AJAX_MORDMNG01010_VIEW_CONTAINER" style="display: none;">
111 114
 		<form id="ITP_FORM_MORDMNG01010_VIEW" class="form-horizontal" onsubmit="return false;">
112 115
 		<input type="hidden" id="ITP_FORM_MORDMNG01010_VIEW_VIEW_CD" name="viewCd" value="C">
113 116
 		  <div class="content">
114 117
 			<div class="line">
115 118
 			  <label>브랜드명</label>
116 119
 			  <div class="line_right">
117
-				<div class="fnbrandNm">A브랜드명</div>
120
+				<div class="fnBrandNm"></div>
118 121
 			  </div>      
119 122
 			</div>
120 123
 			<div class="line">
121 124
 			  <label>발주번호</label>
122 125
 			  <div class="line_right">
123
-				<div class="fnPodrNo">PO12345678</div>
126
+				<div class="fnPchPodrUnqNo"></div>
124 127
 			  </div>      
125 128
 			</div>
126 129
 			<div class="line">
127 130
 			  <label>발주일자</label>
128 131
 			  <div class="line_right">
129
-				<div class="fnPodrDt">2022.10.09</div>
132
+				<div class="fnPodrDt"></div>
130 133
 			  </div>      
131 134
 			</div>
132 135
 			<div class="line">
133 136
 			  <label>발주상태</label>
134 137
 			  <div class="line_right">
135
-				<div class="fnPodrStCd">발주요청</div>
138
+				<div class="fnPchOdrStNm"></div>
136 139
 			  </div>      
137 140
 			</div>
138 141
 			<div class="line">
139 142
 			  <label>납품장소</label>
140 143
 			  <div class="line_right">
141
-				<div class="fnDlvPlace">A창고</div>
144
+				<div class="fnWhsNm"></div>
142 145
 			  </div>      
143 146
 			</div>
144 147
 			<div class="line">
145 148
 			  <label>발주금액</label>
146 149
 			  <div class="line_right">
147
-				<div class="fnPodrAmt">800,000원</div>
150
+				<div class="fnPodrTotalAmt"></div>
148 151
 			  </div>      
149 152
 			</div>
150 153
 			<div class="line">
151 154
 			  <label>발주담당자</label>
152 155
 			  <div class="line_right">
153
-				<div class="fnPodrMgrNm">홍길동</div>
156
+				<div class="fnPodrMgrNm"></div>
154 157
 			  </div>      
155 158
 			</div>
156 159
 			<div class="table_header">
157 160
 			  <h1>> 수주 상세 내역</h1>
158 161
 			</div>
159 162
 		  </div>
160
-			<div id="ITP_LIST_MORDMNG01010_ITEM_AREA" class="scroll_area row-5">
161
-			  <ul id="ITP_LIST_MORDMNG01010_VIEW_ROWS" class="panel-group"></ul>
162
-			  <div id="ITP_LIST_MORDMNG01010_VIEW_ROWCOPY" style="display: none;">
163
-				<li class="history_list2">
163
+			<div id="ITP_LIST_MORDMNG01010_VIEW_ITEM_AREA" class="scroll_area row-5">
164
+			  <ul id="ITP_LIST_MORDMNG01010_VIEW_ITEM_ROWS" class="panel-group"></ul>
165
+			  <div id="ITP_LIST_MORDMNG01010_VIEW_ITEM_ROWCOPY" style="display: none;">
166
+				<li class="history_list2 list-row">
164 167
 				  <div>
165 168
 					<div class="left">
166 169
 					  <div class="nomal">
@@ -170,7 +173,7 @@
170 173
 						</div>
171 174
 						<label class="col_0">품목아이디&nbsp;:</label>
172 175
 						<div class="space2">
173
-						  <div class="fnItemId">asdf1234</div>
176
+						  <div class="fnItemId"></div>
174 177
 						</div>
175 178
 					  </div>
176 179
 					</div>
@@ -178,11 +181,11 @@
178 181
 					  <div class="nomal">
179 182
 						<label>품목명 &nbsp;:</label>
180 183
 						<div class="space2">
181
-						  <div class="fnItemNm">커피원두</div>
184
+						  <div class="fnItemNm"></div>
182 185
 						</div>
183 186
 						<label>가격단위&nbsp;:</label>
184 187
 						<div class="space2">
185
-						  <div class="fnUnitQty">1</div>
188
+						  <div class="fnUPodrQty">1</div>
186 189
 						</div>
187 190
 					  </div>
188 191
 					</div>
@@ -190,11 +193,11 @@
190 193
 					  <div class="nomal">
191 194
 						<label>단가 &nbsp;:</label>
192 195
 						<div>
193
-						  <div class="fnUnit">1,000원</div>
196
+						  <div class="fnUnitAmt"></div>
194 197
 						</div>
195 198
 						<label>단위&nbsp;:</label>
196 199
 						<div>
197
-						  <div class="fnUnit">Kg</div>
200
+						  <div class="fnUnit"></div>
198 201
 						</div>
199 202
 					  </div>
200 203
 					</div>
@@ -214,7 +217,7 @@
214 217
 					  <div class="nomal">
215 218
 						<label class="col_6">납기요청일 &nbsp;:</label>
216 219
 						<div>
217
-						  <div class="fnDlvReqDt">2022.10.09</div>
220
+						  <div class="fnDlvReqDt"></div>
218 221
 						</div>
219 222
 					  </div>
220 223
 					</div>
@@ -223,8 +226,46 @@
223 226
 			</div>
224 227
 		  </div>
225 228
 		  <div class="button_bar">
226
-			<button id="ITP_BTN_MORDMNG01010_VIEW_CANCEL" class="col_12 btn-gray CLB">취소</button>
229
+			<button id="ITP_BTN_MORDMNG01010_VIEW_CANCEL_LIST" class="col_12 btn-gray CLB">취소</button>
227 230
 		  </div>
228 231
 	  </form>
229 232
 	</div>
233
+	<div id="ITP_MOBILE_JS"></div>
234
+	<div id="ITP_POP_MORDMNG01010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
235
+		<div class="pop">
236
+			<div class="header">
237
+				<div class="header_left">
238
+					<label>> 납품장소</label>
239
+				</div>
240
+				<div class="header_right">
241
+					<button type="button" id="ITP_BTN_MORDMNG01010_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
242
+				</div>
243
+			</div>
244
+			<div class="search_bar">
245
+				<form id="ITP_FORM_MORDMNG01010_POP_WHS" class="form-horizontal" onsubmit="return false;">
246
+					<input type="hidden" id="ITP_FORM_MORDMNG01010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
247
+					<input type="hidden" id="ITP_FORM_MORDMNG01010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
248
+					<input id="ITP_FORM_MORDMNG01010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
249
+					<button id="ITP_BTN_MORDMNG01010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
250
+				</form>
251
+			</div>
252
+			<div class="search_bar">
253
+				<button id="ITP_BTN_MORDMNG01010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
254
+			</div>
255
+			<div id="ITP_LIST_MORDMNG01010_POP_WHS_AREA" class="popup_scroll">
256
+				<ul id="ITP_LIST_MORDMNG01010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
257
+				<div id="ITP_LIST_MORDMNG01010_POP_WHS_ROWCOPY" style="display:none;">
258
+					<li class="list-row">
259
+						<div class="scroll_left">
260
+							<div class="fnWhsNm">브랜드 창고 명A</div>
261
+							<div class="fnLocationNm">(상세위치내용)</div>
262
+						</div>
263
+						<div class="scroll_right">
264
+							<button id="ITP_BTN_MORDMNG01010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
265
+						</div>
266
+					</li>
267
+				</div>
268
+			</div>
269
+		</div>
270
+	</div>
230 271
   </section>

+ 107 - 65
src/main/webapp/mobile/app/mordmng/MORDMNG02010.html

@@ -1,34 +1,36 @@
1 1
 <section id="ITP_MOBILE_MORDMNG02010">
2 2
 	<div id="ITP_AJAX_MORDMNG02010_LIST_CONTAINER" style="display: block;">
3
-		<form id="ITP_FORM_MORDMNG02010_LIST" class="form-horizontal" onsubmit="return false;">
4
-		<input type="hidden" id="ITP_FORM_MORDMNG02010_LIST_VIEW_CD" name="viewCd" value="C">
3
+		<form id="ITP_FORM_MORDMNG02010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
4
+			<input type="hidden" id="ITP_FORM_MORDMNG02010_LIST_VIEW_CD" name="viewCd" value="C">
5
+			<input type="hidden" id="ITP_FORM_MORDMNG02010_SEARCH_BRAND_ID" name="sbrandId" value="">
6
+			<input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_STORE_ID" name="sstoreId" value="">
7
+			<input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_SPPLY_ID" name="sspplyId" value="">
5 8
 		  <div class="content">
6 9
 		   <div class="line">
7 10
 			  <label>납품장소</label>
8
-			  <div class="search_wrap">
9
-				  <div class="float_left">
10
-					<input id="ITP_FORM_MORDMNG02010_LIST_DLV_PLACE" name="dlvPlace" type="text" placeholder="A매장명">
11
-				  </div>
12
-				  <div class="float_left_btn">
13
-					<button id="ITP_BTN_MORDMNG02010_LIST_SEARCH_DLV_PLACE" data-call-popup="ITP_POP_MORDMNG02010_DLV_AREA"><img src="../img/search.png" alt=""></button>
14
-					<button id="ITP_BTN_MORDMNG02010_LIST_DETELE_DLV_PLACE"><img src="../img/delete.png" alt=""></button>
15
-				  </div>	
16
-			  </div>
11
+			   <div class="search_wrap">
12
+				   <div class="float_left">
13
+					   <input id="ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_NM" name="swhsNm" type="text" placeholder="A매장명">
14
+					   <input type="hidden" id="ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId"/>
15
+				   </div>
16
+				   <div class="float_left_btn">
17
+					   <button type="button" id="ITP_BTN_MORDMNG02010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
18
+					   <button type="button" id="ITP_BTN_MORDMNG02010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
19
+				   </div>
20
+			   </div>
17 21
 			</div>
18 22
 			<div class="line">
19 23
 			  <label>납품요청일</label>
20
-			  <div class="date_to">
21
-				<input id="ITP_FORM_MORDMNG02010_LIST_DLV_REQ_DT" name="dlvReqDt" class="year" type="date">
22
-				<div class="at">~</div>
23
-				<input id="ITP_FORM_MORDMNG02010_LIST" class="year" type="date">
24
-			  </div>
24
+				<div class="date_to">
25
+					<input id="ITP_FORM_MORDMNG02010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
26
+					<div class="at">~</div>
27
+					<input id="ITP_FORM_MORDMNG02010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
28
+				</div>
25 29
 			</div>
26 30
 			<div class="line">
27
-			  <select class="label" name="itemNm" id="ITP_FORM_MORDMNG02010_LIST_ITEM_NM">
28
-				<option value="">발주번호/품목명</option>
29
-			  </select>
31
+				<label>발주번호/품목명</label>
30 32
 			  <div class="search_wrap">
31
-				<input id="ITP_FORM_MORDMNG02010_LIST_ITEM_NM" name="ITEM_NM" style="width: 262px;" type="text" placeholder="검색어입력">
33
+				<input id="ITP_FORM_MORDMNG02010_LIST_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="검색어입력">
32 34
 			  </div>
33 35
 			</div>
34 36
 			<div class="line" style="height:45px;">
@@ -40,20 +42,20 @@
40 42
 			  <h1>> 수주 내역</h1>
41 43
 			</div>
42 44
 		  </div>
43
-		   <div id="ITP_LIST_MORDMNG02010_ITEM_AREA" class="scroll_area row-2">
44
-			  <ul id="ITP_LIST_MORDMNG02010_LIST_ROWS" class="panel-group"></ul>
45
-			  <div id="ITP_LIST_MORDMNG02010_LIST_ROWCOPY" style="display:none;">
46
-				<li class="history_list3">
45
+		   <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_AREA" class="scroll_area row-2">
46
+			  <ul id="ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS" class="panel-group"></ul>
47
+			  <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_ROWCOPY" style="display:none;">
48
+				<li class="history_list3 list-row">
47 49
 				  <div>
48 50
 					<div class="left">
49 51
 					  <div class="nomal">
50 52
 						<label class="col_0">브랜드명 &nbsp;:</label>
51 53
 						<div>
52
-						  <div class="fnBrandNm space1">브랜드명</div>
54
+						  <div class="fnBrandNm space1"></div>
53 55
 						</div>
54 56
 						<label class="col_0">발주번호&nbsp;:</label>
55 57
 						<div>
56
-						  <div class="fnpodrNo">PO1234123</div>
58
+						  <div class="fnPchPodrUnqNo"></div>
57 59
 						</div>
58 60
 					  </div>
59 61
 					</div>
@@ -61,11 +63,11 @@
61 63
 					  <div class="nomal">
62 64
 						<label class="col_0">발주항번 &nbsp;:</label>
63 65
 						<div>
64
-						  <div class="fnPodrNo space1">1</div>
66
+						  <div class="fnPchPodrDtlNo space1"></div>
65 67
 						</div>
66 68
 						<label class="col_6">납품요청일 &nbsp;:</label>
67 69
 						<div>
68
-						  <div class="fnDlvReqDt space1">2022.10.09</div>
70
+						  <div class="fnDlvReqDt space1"></div>
69 71
 						</div>
70 72
 					  </div>
71 73
 					</div>
@@ -73,11 +75,11 @@
73 75
 					  <div class="nomal">
74 76
 						<label class="col_0">납품장소&nbsp;:</label>
75 77
 						<div>
76
-						  <div class="fnDlvPlace space1">A창고</div>
78
+						  <div class="fnWhsNm space1">A창고</div>
77 79
 						</div>
78 80
 						<label class="col_0">품목번호 &nbsp;:</label>
79 81
 						<div>
80
-						  <div class="fnItemNo space1">asdf1324</div>
82
+						  <div class="fnItemId space1">asdf1324</div>
81 83
 						</div>
82 84
 					  </div>
83 85
 					</div>
@@ -85,11 +87,11 @@
85 87
 					  <div class="nomal">
86 88
 						<label class="col_0">품목명 &nbsp;:</label>
87 89
 						<div>
88
-						  <div class="fnItemNm space1">asdf1324</div>
90
+						  <div class="fnItemNm space1"></div>
89 91
 						</div>
90 92
 						<label class="col_0">발주수량&nbsp;:</label>
91 93
 						<div>
92
-						  <div class="fnPodrQty">3개</div>
94
+						  <div class="fnPodrQty"></div>
93 95
 						</div>
94 96
 					  </div>
95 97
 					</div>
@@ -97,15 +99,15 @@
97 99
 					  <div class="nomal">
98 100
 						<label class="col_0">단가금액 &nbsp;:</label>
99 101
 						<div class="col_5">
100
-						  <div class="fnUnitAmt col_5">1,000원</div>
102
+						  <div class="fnUnitAmt col_5">1,</div>
101 103
 						</div>
102 104
 						<label class="col_0">발주금액&nbsp;:</label>
103 105
 						<div>
104
-						  <div class="fnPodrAmt space0">20,000원</div>
106
+						  <div class="fnPodrAmt space0"></div>
105 107
 						</div>
106
-						<div class="scroll_btn">
108
+						<!--<div class="scroll_btn">
107 109
 						  <button id="ITP_BTN_MORDMNG02010_LIST_CHOICE">선택</button>
108
-						</div>
110
+						</div>-->
109 111
 					  </div>
110 112
 					</div>
111 113
 				  </div>
@@ -119,45 +121,51 @@
119 121
 	  </form>
120 122
 	</div>
121 123
 	<div id="ITP_AJAX_MORDMNG02010_VIEW_CONTAINER" style="display: none;">
122
-		<form id="ITP_FORM_MORDMNG01010_VIEW" class="form-horizontal" onsubmit="return false;">
123
-		<input type="hidden" id="ITP_FORM_MORDMNG01010_VIEW_VIEW_CD" name="viewCd" value="C">
124
+		<form id="ITP_FORM_MORDMNG02010_VIEW" class="form-horizontal" onsubmit="return false;">
125
+		<input type="hidden" id="ITP_FORM_MORDMNG02010_VIEW_VIEW_CD" name="viewCd" value="C">
124 126
 		  <div class="content">
125 127
 			<div class="line">
126 128
 			  <label>브랜드명</label>
127 129
 			  <div class="line_right">
128
-				<div class="fnbrandNm">A브랜드명</div>
130
+				<div class="fnBrandNm"></div>
129 131
 			  </div>      
130 132
 			</div>
131 133
 			<div class="line">
132 134
 			  <label>발주번호</label>
133 135
 			  <div class="line_right">
134
-				<div class="fnPodrNo">PO12345678</div>
136
+				<div class="fnPchPodrUnqNo"></div>
135 137
 			  </div>      
136 138
 			</div>
137 139
 			<div class="line">
138 140
 			  <label class="col_6">납품서생성일자</label>
139 141
 			  <div class="line_right">
140
-				<div class="fnDlvRegDt">2022.10.09</div>
142
+				<div class="fnDlvRegDt"></div>
141 143
 			  </div>      
142 144
 			</div>
143 145
 			<div class="line">
144 146
 			  <label>발주총금액</label>
145 147
 			  <div class="line_right">
146
-				<div class="fnPodrAmt">600,000원</div>
148
+				<div class="fnPodrTotalAmt"></div>
147 149
 			  </div>      
148 150
 			</div>
149 151
 			<div class="line">
150 152
 			  <label>납품장소</label>
151 153
 			  <div class="line_right">
152
-				<div class="fnDlvPlace">A창고</div>
154
+				<div class="fnWhsNm">A창고</div>
153 155
 			  </div>      
154 156
 			</div>
155 157
 			<div class="line">
156 158
 			  <label class="col_6">납품장소연락처</label>
157 159
 			  <div class="line_right">
158
-				<div class="fnPodrPlaceNum">02-0202-4544</div>
160
+				<div class="fnDeliTelNo"></div>
159 161
 			  </div>      
160 162
 			</div>
163
+			  <div class="line">
164
+				  <label class="col_6">납품일자</label>
165
+				  <div class="line_right">
166
+					  <input id="ITP_FORM_MORDMNG02010_VIEW_DLV_SCH_DT" name="dlvSchDt" class="year" type="date">
167
+				  </div>
168
+			  </div>
161 169
 			<div class="line">
162 170
 			  <label>발주담당자</label>
163 171
 			  <div class="line_right">
@@ -169,20 +177,20 @@
169 177
 			  <h1>> 납품 상세 내역</h1>
170 178
 			</div>
171 179
 		  </div>
172
-			<div id="ITP_LIST_MORDMNG02010_ITEM_AREA" class="scroll_area row-5">
173
-			  <ul id="ITP_LIST_MORDMNG02010_VIEW_ROWS" class="panel-group"></ul>
174
-			  <div id="ITP_LIST_MORDMNG02010_VIEW_ROWCOPY" style="display: none;">
175
-				<li class="history_list2">
180
+			<div id="ITP_LIST_MORDMNG02010_VIEW_ITEM_AREA" class="scroll_area row-5">
181
+			  <ul id="ITP_LIST_MORDMNG02010_VIEW_ITEM_ROWS" class="panel-group"></ul>
182
+			  <div id="ITP_LIST_MORDMNG02010_VIEW_ITEM_ROWCOPY" style="display: none;">
183
+				<li class="history_list2 list-row">
176 184
 				  <div>
177 185
 					<div class="left">
178 186
 					  <div class="nomal">
179 187
 						<label>발주항번 &nbsp;:</label>
180 188
 						<div class="space2">
181
-						  <div class="fnPodrSeq">1</div>
189
+						  <div class="fnPchPodrDtlNo">1</div>
182 190
 						</div>
183 191
 						<label class="col_0">품목아이디&nbsp;:</label>
184 192
 						<div class="space2">
185
-						  <div class="fnItemId">asdf1234</div>
193
+						  <div class="fnItemId"></div>
186 194
 						</div>
187 195
 					  </div>
188 196
 					</div>
@@ -190,7 +198,7 @@
190 198
 					  <div class="nomal">
191 199
 						<label>품목명 &nbsp;:</label>
192 200
 						<div class="space2">
193
-						  <div class="fnItemNm">커피원두</div>
201
+						  <div class="fnItemNm"></div>
194 202
 						</div>
195 203
 						<label>가격단위&nbsp;:</label>
196 204
 						<div class="space2">
@@ -202,11 +210,11 @@
202 210
 					  <div class="nomal">
203 211
 						<label>단가 &nbsp;:</label>
204 212
 						<div class="">
205
-						  <div class="fnUnit">1,000원</div>
213
+						  <div class="fnUnitAmt">1,000원</div>
206 214
 						</div>
207
-						<label>단위&nbsp;:</label>
215
+						<label>발주수량&nbsp;:</label>
208 216
 						<div class="">
209
-						  <div class="fnUnit">Kg</div>
217
+						  <div class="fnPodrQty"></div>
210 218
 						</div>
211 219
 					  </div>
212 220
 					</div>
@@ -214,23 +222,19 @@
214 222
 					  <div class="nomal">
215 223
 						<label>납품수량 &nbsp;:</label>
216 224
 						<div class="">
217
-						  <input id="ITP_FORM_MORDMNG02010_VIEW_DLV_QTY" type="text">
218
-						</div>
219
-						<label>납품일자&nbsp;:</label>
220
-						<div class="">
221
-						  <input id="ITP_FORM_MORDMNG02010_VIEW_DLV_DT" type="text">
225
+						  <input id="ITP_FORM_MORDMNG02010_VIEW_SHMT_QTY" name="shmtQty" type="text">
222 226
 						</div>
227
+						  <label>유통기한 &nbsp;:</label>
228
+						  <div class="space2">
229
+							  <input id="ITP_FORM_MORDMNG02010_VIEW_EXPRY_DATE" name="expryDate" class="year" type="date">
230
+						  </div>
223 231
 					  </div>
224 232
 					</div>
225 233
 					<div class="left">
226 234
 					  <div class="nomal">
227
-						<label>유통기한 &nbsp;:</label>
228
-						<div class="space2">
229
-						  <input id="ITP_FORM_MORDMNG02010_VIEW_EXPRY_DATE" type="text">
230
-						</div>
231 235
 						<label>비고 &nbsp;:</label>
232 236
 						<div class="space2">
233
-						  <input id="ITP_FORM_MORDMNG02010_VIEW_NOTE" type="text">
237
+						  <input id="ITP_FORM_MORDMNG02010_VIEW_DELI_DESC" type="text" name="deliDesc">
234 238
 						</div>
235 239
 					  </div>
236 240
 					</div>
@@ -240,8 +244,46 @@
240 244
 		  </div>
241 245
 		  <div class="button_bar">
242 246
 			<button id="ITP_BTN_MORDMNG02010_VIEW_ADD" class="btn_col_6 btn-primary CRT">생성</button>
243
-			<button id="ITP_BTN_MORDMNG02010_VIEW_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>
247
+			<button id="ITP_BTN_MORDMNG02010_VIEW_CANCEL_LIST" class="btn_col_3 btn-gray CLB">취소</button>
244 248
 		  </div>
245 249
 	  </form>
246 250
 	</div>
251
+	<div id="ITP_MOBILE_JS"></div>
252
+	<div id="ITP_POP_MORDMNG02010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
253
+		<div class="pop">
254
+			<div class="header">
255
+				<div class="header_left">
256
+					<label>> 납품장소</label>
257
+				</div>
258
+				<div class="header_right">
259
+					<button type="button" id="ITP_BTN_MORDMNG02010_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
260
+				</div>
261
+			</div>
262
+			<div class="search_bar">
263
+				<form id="ITP_FORM_MORDMNG02010_POP_WHS" class="form-horizontal" onsubmit="return false;">
264
+					<input type="hidden" id="ITP_FORM_MORDMNG02010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
265
+					<input type="hidden" id="ITP_FORM_MORDMNG02010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
266
+					<input id="ITP_FORM_MORDMNG02010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
267
+					<button id="ITP_BTN_MORDMNG02010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
268
+				</form>
269
+			</div>
270
+			<div class="search_bar">
271
+				<button id="ITP_BTN_MORDMNG02010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
272
+			</div>
273
+			<div id="ITP_LIST_MORDMNG02010_POP_WHS_AREA" class="popup_scroll">
274
+				<ul id="ITP_LIST_MORDMNG02010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
275
+				<div id="ITP_LIST_MORDMNG02010_POP_WHS_ROWCOPY" style="display:none;">
276
+					<li class="list-row">
277
+						<div class="scroll_left">
278
+							<div class="fnWhsNm">브랜드 창고 명A</div>
279
+							<div class="fnLocationNm">(상세위치내용)</div>
280
+						</div>
281
+						<div class="scroll_right">
282
+							<button id="ITP_BTN_MORDMNG02010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
283
+						</div>
284
+					</li>
285
+				</div>
286
+			</div>
287
+		</div>
288
+	</div>
247 289
   </section>

+ 92 - 50
src/main/webapp/mobile/app/mordmng/MORDMNG03010.html

@@ -1,34 +1,37 @@
1 1
 <section id="ITP_MOBILE_MORDMNG03010">
2 2
 	<div id="ITP_AJAX_MORDMNG03010_LIST_CONTAINER" style="display: block;">
3
-	  <form id="ITP_FORM_MORDMNG03010_LIST" class="form-horizontal" onsubmit="return false;">
3
+	  <form id="ITP_FORM_MORDMNG03010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
4 4
 		<input type="hidden" id="ITP_FORM_MORDMNG03010_LIST_VIEW_CD" name="viewCd" value="C">
5
+		  <input type="hidden" id="ITP_FORM_MORDMNG03010_SEARCH_BRAND_ID" name="sbrandId" value="">
6
+		  <input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_STORE_ID" name="sstoreId" value="">
7
+		  <input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_SPPLY_ID" name="sspplyId" value="">
5 8
 		  <div class="content">
6 9
 			<div class="line">
7 10
 			  <label>납품장소</label>
8
-			  <div class="search_wrap">
9
-				  <div class="float_left">
10
-					<input id="ITP_FORM_MORDMNG03010_LIST_DLV_PLACE" name="dlvPlace" type="text" placeholder="A매장명">
11
-				  </div>
12
-				  <div class="float_left_btn">
13
-					<button id="ITP_BTN_MORDMNG03010_LIST_SEARCH_DLV_PLACE" data-call-popup="ITP_POP_MORDMNG03010_DLV_AREA"><img src="../img/search.png" alt=""></button>
14
-					<button id="ITP_BTN_MORDMNG03010_LIST_DETELE_DLV_PLACE"><img src="../img/delete.png" alt=""></button>
15
-				  </div>
16
-			  </div>
11
+				<label>납품장소</label>
12
+				<div class="search_wrap">
13
+					<div class="float_left">
14
+						<input id="ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_NM" name="swhsNm" type="text" placeholder="A매장명">
15
+						<input type="hidden" id="ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId"/>
16
+					</div>
17
+					<div class="float_left_btn">
18
+						<button type="button" id="ITP_BTN_MORDMNG03010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
19
+						<button type="button" id="ITP_BTN_MORDMNG03010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
20
+					</div>
21
+				</div>
17 22
 			</div>
18 23
 			<div class="line">
19 24
 			  <label>납품일자</label>
20
-			  <div class="date_to">
21
-				<input id="ITP_FORM_MORDMNG03010_LIST_DLV_REQ_DT" name="dlvReqDt" class="year" type="date">
22
-				<div class="at">~</div>
23
-				<input id="ITP_FORM_MORDMNG03010_LIST_DLV_CMPLT_DT" name="dlvCmpltDt" class="year" type="date">
24
-			  </div>
25
+				<div class="date_to">
26
+					<input id="ITP_FORM_MORDMNG03010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
27
+					<div class="at">~</div>
28
+					<input id="ITP_FORM_MORDMNG03010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
29
+				</div>
25 30
 			</div>
26 31
 			<div class="line">
27
-			  <select class="label" name="itemNm" id="ITP_FORM_MORDMNG03010_LIST_ITEM_NM">
28
-				<option value="">발주번호/품목명</option>
29
-			  </select>
32
+				<label>발주번호/품목명</label>
30 33
 			  <div class="search_wrap">
31
-				<input id="ITP_FORM_MORDMNG03010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="검색어입력">
34
+				  <input id="ITP_FORM_MORDMNG03010_LIST_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="검색어입력">
32 35
 			  </div>
33 36
 			</div>
34 37
 			<div class="line" style="height:45px;">
@@ -40,10 +43,10 @@
40 43
 			  <h1>> 수주 내역</h1>
41 44
 			</div>
42 45
 		  </div>
43
-		  <div id="ITP_LIST_MORDMNG03010_ITEM_AREA" class="scroll_area row-2">
44
-			  <ul id="ITP_LIST_MORDMNG03010_LIST_ROWS" class="panel-group"></ul>
45
-			  <div id="ITP_LIST_MORDMNG03010_LIST_ROWCOPY" style="display:none;">
46
-				<li class="history_list3">
46
+		  <div id="ITP_LIST_MORDMNG03010_LIST_ITEM_AREA" class="scroll_area row-2">
47
+			  <ul id="ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS" class="panel-group"></ul>
48
+			  <div id="ITP_LIST_MORDMNG03010_LIST_ITEM_ROWCOPY" style="display:none;">
49
+				<li class="history_list3 list-row">
47 50
 				  <div>
48 51
 					<div class="left">
49 52
 					  <div class="nomal">
@@ -53,7 +56,7 @@
53 56
 						</div>
54 57
 						<label>납품서번호&nbsp;:</label>
55 58
 						<div>
56
-						  <div class="fnDlvNo">PO1234123</div>
59
+						  <div class="fnDlvShmtUnqNo">PO1234123</div>
57 60
 						</div>
58 61
 					  </div>
59 62
 					</div>
@@ -65,7 +68,7 @@
65 68
 						</div>
66 69
 						<label class="col_0">수주일자&nbsp;:</label>
67 70
 						<div>
68
-						  <div class="fnDt">2022.10.09</div>
71
+						  <div class="fnPodrRegDt">2022.10.09</div>
69 72
 						</div>
70 73
 					  </div>
71 74
 					</div>
@@ -75,9 +78,9 @@
75 78
 						<div>
76 79
 						  <div class="fnDlvReqDt">2022.10.09</div>
77 80
 						</div>
78
-						<label>품예정일&nbsp;:</label>
81
+						<label>품예정일&nbsp;:</label>
79 82
 						<div>
80
-						  <div class="fnReqDt">2022.10.10</div>
83
+						  <div class="fnDlvSchDt">2022.10.10</div>
81 84
 						</div>
82 85
 					  </div>
83 86
 					</div>
@@ -85,7 +88,7 @@
85 88
 					  <div class="nomal">
86 89
 						<label class="col_0">품목수량 &nbsp;:</label>
87 90
 						<div>
88
-						  <div class="fnItemQty space1">2</div>
91
+						  <div class="fnDlvQty space1">2</div>
89 92
 						</div>
90 93
 						<label>발주총금액&nbsp;:</label>
91 94
 						<div>
@@ -97,7 +100,7 @@
97 100
 					  <div class="nomal">
98 101
 						<label class="col_0">납품장소 &nbsp;:</label>
99 102
 						<div>
100
-						  <div class="fnDlvPlace space1">A창고</div>
103
+						  <div class="fnWhsNm space1">A창고</div>
101 104
 						</div>
102 105
 						<label>납품담당자&nbsp;:</label>
103 106
 						<div>
@@ -109,8 +112,8 @@
109 112
 				</li>
110 113
 			</div>
111 114
 			<div class="button_bar">
112
-			  <button id="ITP_BTN_MORDMNG03010_LIST_DLV" class="btn_col_6 btn-primary IVDETAIL">납품서보기</button>
113
-			  <button id="ITP_BTN_MORDMNG03010_LIST_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>
115
+			  <button id="ITP_BTN_MORDMNG03010_LIST_DLV_VIEW" class="btn_col_12 btn-primary IVDETAIL">납품서보기</button>
116
+			  <!--<button id="ITP_BTN_MORDMNG03010_LIST_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>-->
114 117
 			</div>
115 118
 		  </div>
116 119
 	  </form>
@@ -131,17 +134,17 @@
131 134
 			  <div class="detail_col">
132 135
 				<label>발행일</label>
133 136
 				<i>:</i>
134
-				<div class="fnDt">2022.10.09</div>
137
+				<div class="fnDlvRegDt">2022.10.09</div>
135 138
 			  </div>
136 139
 			  <div class="detail_col">
137 140
 				<label>납품서확인번호</label>
138 141
 				<i>:</i>
139
-				<div class="fnDlvCnfmNo">DL123445</div>
142
+				<div class="fnDlvSttmtUnqNo">DL123445</div>
140 143
 			  </div>
141 144
 			  <div class="detail_col">
142 145
 				<label>납품일</label>
143 146
 				<i>:</i>
144
-				<div class="fnDlvDt">2022.10.10</div>
147
+				<div class="fnDlvRegDt">2022.10.10</div>
145 148
 			  </div>
146 149
 			  <div class="detail_col">
147 150
 				<label>납품담당자</label>
@@ -151,12 +154,12 @@
151 154
 			  <div class="detail_col">
152 155
 				<label>납품장소</label>
153 156
 				<i>:</i>
154
-				<div class="fnDlvPlace">(123450 서울 송파구 문정동 100 A창고)</div>
157
+				<div class="fnDlvAddr">(123450 서울 송파구 문정동 100 A창고)</div>
155 158
 			  </div>
156 159
 			  <div class="detail_col">
157 160
 				<label>전화번호</label>
158 161
 				<i>:</i>
159
-				<div class="fnTel">02-123-4567</div>
162
+				<div class="fnWhsMgrTelNo">02-123-4567</div>
160 163
 			  </div>
161 164
 			</div>
162 165
 			<div class="detail_company_info">
@@ -166,19 +169,19 @@
166 169
 				</div>
167 170
 				<div class="company_info">
168 171
 				  <label>등록번호&nbsp;:&nbsp;</label>
169
-				  <div class="fnBsnsRegNo">215-12-23454</div>
172
+				  <div class="fnDlvBsnsRegno">215-12-23454</div>
170 173
 				</div>
171 174
 				<div class="company_info">
172 175
 				  <label>상호&nbsp;:&nbsp;</label>
173
-				  <div class="fnSag">공급업체명</div>
176
+				  <div class="fnDlvNm">공급업체명</div>
174 177
 				</div>
175 178
 				<div class="company_info">
176 179
 				  <label>성명&nbsp;:&nbsp;</label>
177
-				  <div class="fnNm">공급자</div>
180
+				  <div class="fnDlvOwnerNm">공급자</div>
178 181
 				</div>
179 182
 				<div class="company_info">
180 183
 				  <label>주소&nbsp;:&nbsp;</label>
181
-				  <div class="fnAddr">서울 송파구 문정동</div>
184
+				  <div class="fnDlvAddr">서울 송파구 문정동</div>
182 185
 				</div>
183 186
 			  </div>
184 187
 			  <div class="info_left">
@@ -187,19 +190,19 @@
187 190
 				</div>
188 191
 				<div class="company_info">
189 192
 				  <label>등록번호&nbsp;:&nbsp;</label>
190
-				  <div class="fnBsnsRegNo">215-12-23454</div>
193
+				  <div class="fnPoBsnsRegno">215-12-23454</div>
191 194
 				</div>
192 195
 				<div class="company_info">
193 196
 				  <label>상호&nbsp;:&nbsp;</label>
194
-				  <div class="fnSag">브랜드 회사명</div>
197
+				  <div class="fnPoNm">브랜드 회사명</div>
195 198
 				</div>
196 199
 				<div class="company_info">
197 200
 				  <label>성명&nbsp;:&nbsp;</label>
198
-				  <div class="fnNm">대표자명</div>
201
+				  <div class="fnPoOwnerNm">대표자명</div>
199 202
 				</div>
200 203
 				<div class="company_info">
201 204
 				  <label>주소&nbsp;:&nbsp;</label>
202
-				  <div class="fnAddr">경기 성남시 상대원동</div>
205
+				  <div class="fnDlvQty">경기 성남시 상대원동</div>
203 206
 				</div>
204 207
 			  </div>
205 208
 			</div>
@@ -207,16 +210,16 @@
207 210
 			  <h1>> 납품 상세 내역</h1>
208 211
 			</div>
209 212
 		  </div>
210
-			<div id="ITP_LIST_MORDMNG03010_ITEM_AREA" class="scroll_area row-7">
211
-				 <ul id="ITP_LIST_MORDMNG03010_VIEW_ROWS" class="panel-group"></ul>
212
-				 <div id="ITP_LIST_MORDMNG03010_VIEW_ROWCOPY" style="display:none;">
213
-				<li class="history_list5">
213
+			<div id="ITP_LIST_MORDMNG03010_VIEW_ITEM_AREA" class="scroll_area row-7">
214
+				 <ul id="ITP_LIST_MORDMNG03010_VIEW_ITEM_ROWS" class="panel-group"></ul>
215
+				 <div id="ITP_LIST_MORDMNG03010_VIEW_ITEM_ROWCOPY" style="display:none;">
216
+				<li class="history_list5 list-row">
214 217
 				  <div>
215 218
 					<div class="left">
216 219
 					  <div class="nomal">
217 220
 						<label>발주번호 &nbsp;:</label>
218 221
 						<div class="space2">
219
-						  <div class="fnPodrNo">P12345</div>
222
+						  <div class="fnPchPodrUnqNo">P12345</div>
220 223
 						</div>
221 224
 						<label class="col_0">품목아이디&nbsp;:</label>
222 225
 						<div class="space2">
@@ -253,8 +256,47 @@
253 256
 			</div>
254 257
 		  </div>
255 258
 		  <div class="button_bar">
256
-			<button id="ITP_BTN_MORDMNG03010_VIEW" class="ok col_12 btn-gray COK">확인</button>
259
+			<button id="ITP_BTN_MORDMNG03010_VIEW_CONFIRM" class="ok col_12 btn-gray COK">확인</button>
260
+			  <!--<button id="ITP_BTN_MORDMNG03010_VIEW_CANCEL_LIST" class="btn_col_3 btn-gray CLB">취소</button>-->
257 261
 		  </div>
258 262
 	  </form>
259 263
 	</div>
264
+	<div id="ITP_MOBILE_JS"></div>
265
+	<div id="ITP_POP_MORDMNG03010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
266
+		<div class="pop">
267
+			<div class="header">
268
+				<div class="header_left">
269
+					<label>> 납품장소</label>
270
+				</div>
271
+				<div class="header_right">
272
+					<button type="button" id="ITP_BTN_MORDMNG03010_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
273
+				</div>
274
+			</div>
275
+			<div class="search_bar">
276
+				<form id="ITP_FORM_MORDMNG03010_POP_WHS" class="form-horizontal" onsubmit="return false;">
277
+					<input type="hidden" id="ITP_FORM_MORDMNG03010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
278
+					<input type="hidden" id="ITP_FORM_MORDMNG03010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
279
+					<input id="ITP_FORM_MORDMNG03010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
280
+					<button id="ITP_BTN_MORDMNG03010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
281
+				</form>
282
+			</div>
283
+			<div class="search_bar">
284
+				<button id="ITP_BTN_MORDMNG03010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
285
+			</div>
286
+			<div id="ITP_LIST_MORDMNG03010_POP_WHS_AREA" class="popup_scroll">
287
+				<ul id="ITP_LIST_MORDMNG03010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
288
+				<div id="ITP_LIST_MORDMNG03010_POP_WHS_ROWCOPY" style="display:none;">
289
+					<li class="list-row">
290
+						<div class="scroll_left">
291
+							<div class="fnWhsNm">브랜드 창고 명A</div>
292
+							<div class="fnLocationNm">(상세위치내용)</div>
293
+						</div>
294
+						<div class="scroll_right">
295
+							<button id="ITP_BTN_MORDMNG03010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
296
+						</div>
297
+					</li>
298
+				</div>
299
+			</div>
300
+		</div>
301
+	</div>
260 302
   </section>

+ 169 - 169
src/main/webapp/mobile/app/mrtnmng/MRTNMNG01010.html

@@ -1,184 +1,184 @@
1 1
 <section id="ITP_MOBILE_MRTNMNG01010">
2
-	<div id="ITP_POP_MRTNMNG01010_REQ_CONFIRM" class="popup mobile-pop-close" style="display: none;">
3
-	  <div class="pop">
4
-		<div class="pop_line">
5
-		  <label>반품요청일 &nbsp;&nbsp;:</label>
6
-		  <div class="fnRtnReqDt">2022.09.30</div>
7
-		</div>
8
-		<div class="pop_line">
9
-		  <label>품목수&nbsp;&nbsp; :</label>
10
-		  <div class="fnPop">2개</div>
11
-		</div>
12
-		<div class="pop_line">
13
-		  <label>반품금액 &nbsp;&nbsp;:</label>
14
-		  <div class="fnRtnAmt">2022.09.30원</div>
15
-		</div>
16
-		<label class="pop_label">요청 하시겠습니까?</label>
17
-		<div class="popup_btn">
18
-		  <button id="ITP_BTN_MRTNMNG01010" class="cancel btn-gray CLB">취소</button>
19
-		  <button id="ITP_BTN_MRTNMNG01010" class="ok btn-primary COK">확인</button>
2
+	<div id="ITP_POP_MRTNMNG01010_RTN_AREA" class="popup mobile-pop-close" style="display: none;">
3
+		<div class="pop">
4
+			<div class="pop_line">
5
+				<label>반품요청일 &nbsp;&nbsp;:</label>
6
+				<div class="fnRtnReqDt"></div>
7
+			</div>
8
+			<div class="pop_line">
9
+				<label>품목수&nbsp;&nbsp; :</label>
10
+				<div class="fnItemQty">개</div>
11
+			</div>
12
+			<div class="pop_line">
13
+				<label>반품금액 &nbsp;&nbsp;:</label>
14
+				<div class="fnRtnAmt">원</div>
15
+			</div>
16
+			<label class="pop_label msg_save">요청 하시겠습니까?</label>
17
+			<div class="popup_btn">
18
+				<button id="ITP_BTN_MRTNMNG01010_POP_RTN_CLOSE" class="cancel btn-gray CLB btn-pop-close">취소</button>
19
+				<button id="ITP_BTN_MRTNMNG01010_POP_RTN_CONFIRM" class="ok btn-primary COK">확인</button>
20
+			</div>
20 21
 		</div>
21
-	  </div>
22 22
 	</div>
23
-	<div id="ITP_POP_MRTNMNG01010_WHS_NM" class="popup2 mobile-pop-close" style="display: block;">
24
-	  <div class="pop">
25
-		<div class="header">
26
-		  <div class="header_left">
27
-			<label>> 반품장소</label>
28
-		  </div>
29
-		  <div class="header_right">
30
-			<button id="ITP_BTN_MRTNMNG01010_POP_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
31
-		  </div>
32
-		</div>
33
-		<div class="search_bar">
34
-			<form id="ITP_FORM_MRTNMNG01010_POPUP" class="form-horizontal" onsubmit="return false;">
35
-			  <input id="ITP_FORM_MRTNMNG01010_POP_KEYWORD" type="text" placeholder="반품장소명">
36
-			  <button id="ITP_BTN_MRTNMNG01010_POP_SEARCH"><img src="../img/search.png"></button>
37
-			</form>
38
-		</div>
39
-		<div class="search_bar">
40
-		  <button id="ITP_BTN_MRTNMNG01010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
41
-		</div>
42
-		<div class="popup_scroll">
43
-			<ul id="ITP_LIST_MRTNMNG01010_POP_ROWS" class="panel-group itp_nav"></ul>
44
-				<div id="ITP_LIST_MRTNMNG01010_POP_ROWCOPY" style="display:none;">
45
-				  <li>
46
-					<div class="scroll_left">
47
-					  <div class="fnBrandWhsNm">브랜드 창고 명A</div>
48
-					  <div class="fn">(상세위치내용)</div>
49
-					</div>
50
-					<div class="scroll_right">
51
-					  <button id="ITP_BTN_MRTNMNG01010_POP_CHOICE">선택</button>
52
-					</div>
53
-				  </li>	
23
+	<div id="ITP_POP_MRTNMNG01010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
24
+		<div class="pop">
25
+			<div class="header">
26
+				<div class="header_left">
27
+					<label>> 반품장소</label>
54 28
 				</div>
55
-		  </div>
56
-	  </div>
57
-	</div>
58
-	<div id="ITP_POP_MRTNMNG01010_ITEM_NM" class="popup2 mobile-pop-close" style="display: block;">
59
-	  <div class="pop">
60
-		  <div class="header">
61
-			  <div class="header_left">
62
-				  <label>> 품목 검색</label>
63
-			  </div>
64
-			  <div class="header_right">
65
-				  <button type="button" id="ITP_BTN_MRTNMNG01010_POP_ITEM_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
66
-			  </div>
67
-		  </div>
68
-		  <form id="ITP_FORM_MRTNMNG01010_POPUP_ITEM" class="form-horizontal" onsubmit="return false;">
69
-			  <input type="hidden" id="ITP_FORM_MRTNMNG01010_POPUP_ITEM_BRAND_ID" name="sbrandId" value="">
70
-			  <input type="hidden" id="ITP_FORM_MRTNMNG01010_POPUP_ITEM_STORE_ID" name="sstoreId" value="">
71
-			  <div class="search_bar">
72
-				  <input id="ITP_FORM_MRTNMNG01010_POP_ITEM_KEYWORD" name="sitemNm" type="text" placeholder="품목명/품목번호" />
73
-				  <button id="ITP_BTN_MRTNMNG01010_POP_ITEM_SEARCH"><img src="../img/search.png"></button>
74
-			  </div>
75
-			  <div class="search_bar">
76
-				  <button id="ITP_BTN_MRTNMNG01010_POP_ITEM_NM" class="btn_blue">품목명▼</button>
77
-			  </div>
78
-		  </form>
79
-		  <div class="popup_scroll">
80
-			  <ul id="ITP_LIST_MRTNMNG01010_POP_ITEM_ROWS" class="panel-group"></ul>
81
-			  <div id="ITP_LIST_MRTNMNG01010_POP_ITEM_ROWCOPY" style="display:block;">
82
-				  <li class="row_2"
83
-					  data-brandUnitUnqNo=""
84
-					  data-podrPssblDvsn=""
85
-					  data-spplyId=""
86
-					  data-stddQty=""
87
-					  data-storeUnitUnqNo=""
88
-					  data-unit=""
89
-					  data-unitAmt=""
90
-					  data-unitGubun="">
91
-					  <div class="left" style="width:200px;">
92
-						  <div class="check_box">
93
-							  <input type="checkbox" id="ITP_FORM_MRTNMNG01010_POP_ITEM_CHECKBOX" name="itemId" />
94
-						  </div>
95
-						  <div class="thick">
96
-							  <div class="fnItemNm">품목명</div>
97
-							  <div>-</div>
98
-							  <div class="fnOrdUnit">EA</div>
99
-						  </div>
100
-						  <div class="thick" style="font-weight:100;">
101
-							  <div class="space">구매가 :</div>
102
-							  <div class="fnOrdAmount">0</div>
103
-						  </div>
104
-					  </div>
105
-					  <div class="right">
106
-						  <button id="ITP_BTN_MRTNMNG01010_POP_ITEM_PLUS">-</button>
107
-						  <div class="num">2</div>
108
-						  <button id="ITP_BTN_MRTNMNG01010_POP_ITEM_MINUS">+</button>
109
-					  </div>
110
-					  <div class="add">
111
-						  <button id="ITP_BTN_MRTNMNG01010_POP_ITEM_ADD">추가</button>
112
-					  </div>
113
-				  </li>
114
-			  </div>
115
-		  </div>
116
-	  </div>
117
-  </div>
118
-	
119
-	<div id="ITP_AJAX_MRTNMNG01010_LIST_CONTAINER">
120
-	  <form id="ITP_FORM_MRTNMNG01010_LIST" class="form-horizontal" onsubmit="return false;">
121
-		 <input type="hidden" id="ITP_FORM_MPOMNG01010_LIST_VIEW_CD" name="viewCd" value="C">
122
-		  <div class="content">
123
-			<div class="line">
124
-			  <label>반품요청일</label>
125
-			  <input id="ITP_FORM_MRTNMNG01010_LIST_RTN_REQ_DT" name="rtnReqDt" class="date" type="date" placeholder="">
29
+				<div class="header_right">
30
+					<button type="button" id="ITP_BTN_MRTNMNG01010_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
31
+				</div>
32
+			</div>
33
+			<div class="search_bar">
34
+				<form id="ITP_FORM_MRTNMNG01010_POP_WHS" class="form-horizontal" onsubmit="return false;">
35
+					<input type="hidden" id="ITP_FORM_MRTNMNG01010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
36
+					<input type="hidden" id="ITP_FORM_MRTNMNG01010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
37
+					<input id="ITP_FORM_MRTNMNG01010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
38
+					<button id="ITP_BTN_MRTNMNG01010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
39
+				</form>
126 40
 			</div>
127
-			<div class="line">
128
-			  <label>반품요청금액</label>
129
-			  <div class="line_right">
130
-				<div class="fnRtnReqAmt">424,000원</div>
131
-			  </div>
41
+			<div class="search_bar">
42
+				<button id="ITP_BTN_MRTNMNG01010_POP_WHS_NM" class="btn_blue">반품장소▼</button>
132 43
 			</div>
133
-			<div class="line">
134
-			  <label>빈품장소</label>
135
-			  <div class="search_nm">
136
-				<div class="float_left">
137
-				  <input id="ITP_FORM_MRTNMNG01010_LIST_WHS_NM" name="whsNm" type="text" placeholder="A매장명">
44
+			<div id="ITP_LIST_MRTNMNG01010_POP_WHS_AREA" class="popup_scroll">
45
+				<ul id="ITP_LIST_MRTNMNG01010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
46
+				<div id="ITP_LIST_MRTNMNG01010_POP_WHS_ROWCOPY" style="display:none;">
47
+					<li class="row_2">
48
+						<div class="scroll_left">
49
+							<div class="fnWhsNm">브랜드 창고 명A</div>
50
+							<div class="fnLocationNm">(상세위치내용)</div>
51
+						</div>
52
+						<div class="scroll_right">
53
+							<button id="ITP_BTN_MRTNMNG01010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
54
+						</div>
55
+					</li>
56
+				</div>
57
+			</div>
58
+		</div>
59
+	</div>
60
+	<div id="ITP_POP_MRTNMNG01010_ITEM_AREA" class="popup2 mobile-pop-close" style="display: none;">
61
+		<div class="pop">
62
+			<div class="header">
63
+				<div class="header_left">
64
+					<label>> 품목 검색</label>
138 65
 				</div>
139
-				<div class="float_left_btn">
140
-				  <button id="ITP_BTN_MRTNMNG01010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG01010_WHS_NM"><img src="../img/search.png" alt=""></button>
141
-				  <button id="ITP_BTN_MRTNMNG01010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
66
+				<div class="header_right">
67
+					<button type="button" id="ITP_BTN_MRTNMNG01010_POP_ITEM_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
142 68
 				</div>
143
-			  </div>
144 69
 			</div>
145
-			<div class="table_header">
146
-			  <h1>> 반품 품목</h1>
147
-			   <button type="button" id="ITP_BTN_MRTNMNG01010_LIST_DELROW" class="btn-primary btn-sm ADB">품목삭제</button>
148
-			  <button type="button" id="ITP_BTN_MRTNMNG01010_LIST_ADDROW" class="btn-primary btn-sm ADB">품목추가</button>	     
70
+			<form id="ITP_FORM_MRTNMNG01010_POPUP_ITEM" class="form-horizontal" onsubmit="return false;">
71
+				<input type="hidden" id="ITP_FORM_MRTNMNG01010_POPUP_ITEM_BRAND_ID" name="sbrandId" value="">
72
+				<input type="hidden" id="ITP_FORM_MRTNMNG01010_POPUP_ITEM_STORE_ID" name="sstoreId" value="">
73
+				<div class="search_bar">
74
+					<input id="ITP_FORM_MRTNMNG01010_POP_ITEM_KEYWORD" name="sitemNm" type="text" placeholder="품목명/품목번호" />
75
+					<button id="ITP_BTN_MRTNMNG01010_POP_ITEM_SEARCH"><img src="../img/search.png"></button>
76
+				</div>
77
+				<div class="search_bar">
78
+					<button id="ITP_BTN_MRTNMNG01010_POP_ITEM_NM" class="btn_blue">품목명▼</button>
79
+				</div>
80
+			</form>
81
+			<div id="ITP_LIST_MRTNMNG01010_POP_ITEM_AREA" class="popup_scroll">
82
+				<ul id="ITP_LIST_MRTNMNG01010_POP_ITEM_ROWS" class="panel-group"></ul>
83
+				<div id="ITP_LIST_MRTNMNG01010_POP_ITEM_ROWCOPY" style="display:none;">
84
+					<li class="row_2">
85
+						<div class="left" style="width:180px;">
86
+							<div class="thick">
87
+								<div class="fnItemNm">품목명</div>
88
+								<div>-</div>
89
+								<div class="fnUnit">EA</div>
90
+							</div>
91
+							<div class="thick" style="font-weight:100;">
92
+								<div class="space">구매가 :</div>
93
+								<div class="fnUnitAmt">0</div>
94
+							</div>
95
+						</div>
96
+						<div class="right">
97
+							<button id="ITP_BTN_MRTNMNG01010_POP_ITEM_MINUS" class="POP_ITEM_MINUS">-</button>
98
+							<div class="num fnPchReqQty">1</div>
99
+							<button id="ITP_BTN_MRTNMNG01010_POP_ITEM_PLUS" class="POP_ITEM_PLUS">+</button>
100
+						</div>
101
+						<div class="add">
102
+							<button id="ITP_BTN_MRTNMNG01010_POP_ITEM_ADD" class="POP_ITEM_ADD">추가</button>
103
+						</div>
104
+					</li>
105
+				</div>
149 106
 			</div>
150
-		  </div>
151
-		  <div class="scroll_area row-1">
152
-		  <ul id="ITP_LIST_MRTNMNG01010_LIST_ROWS"></ul>
153
-		  <div id="ITP_LIST_MRTNMNG01010_LIST_ROWCOPY" style="display:none;">	     
154
-			  <li>
155
-				  <div class="left_info">
156
-					  <div class="thick">
157
-					  <div><input type="checkbox" id="ITP_FORM_MPOMNG01010_LIST_CHECKBOX" name="itemId" /></div>
107
+		</div>
108
+	</div>
109
+
110
+	<div id="ITP_AJAX_MRTNMNG01010_VIEW_CONTAINER">
111
+		<form id="ITP_FORM_MRTNMNG01010_DETAIL" class="form-horizontal" onsubmit="return false;">
112
+			<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
113
+			<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_BRAND_ID" name="brandId" value="">
114
+			<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_STORE_ID" name="storeId" value="">
115
+			<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_WHS_DVSN" name="whsDvsn" value="">
116
+			<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_RTN_REQ_ST_CD" name="rtnReqStCd" value="">
117
+			<div class="content">
118
+				<div class="line">
119
+					<label>반품요청일</label>
120
+					<input id="ITP_FORM_MRTNMNG01010_DETAIL_DLV_REQ_DT" name="colReqDt" class="date" data-check-required="empty" type="date" placeholder="">
121
+				</div>
122
+				<div class="line">
123
+					<label>반품요청금액</label>
124
+					<div class="line_right">
125
+						<div class="fnRtnReqAmt">0원</div>
126
+					</div>
127
+				</div>
128
+				<div class="line">
129
+					<label>빈품장소</label>
130
+					<div class="search_nm">
131
+						<div class="float_left">
132
+							<input type="text" id="ITP_FORM_MRTNMNG01010_DETAIL_WHS_NM" class="" name="rtnWhsNm" data-check-required="empty" placeholder="매장명" readonly />
133
+							<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_WHS_ID" class="form-control itp_input" name="rtnWhsId" value="" />
134
+							<input type="hidden" id="ITP_FORM_MRTNMNG01010_DETAIL_LOCATION" class="form-control itp_input" name="rtnLocation" value="" />
135
+						</div>
136
+						<div class="float_left_btn">
137
+							<button id="ITP_BTN_MRTNMNG01010_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG01010_WHS_AREA"><img src="../img/search.png" alt=""></button>
138
+							<button id="ITP_BTN_MRTNMNG01010_DETAIL_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
158 139
 						</div>
159
-					<div class="thick">
160
-					  <div class="fnItemNm">품목명</div>
161
-					  <div>-</div>
162
-					  <div class="fnUnit">2EA</div>
163 140
 					</div>
164
-					<div class="thick">
165
-					  <label class="space0">구매가 :</label>
166
-					  <div class="fnPchActAmt">1,120,000</div>
141
+				</div>
142
+				<div class="line">
143
+					<div class="table_header">
144
+						<h1>>빈품 품목</h1>
145
+						<button type="button" id="ITP_BTN_MRTNMNG01010_DETAIL_DELROW" class="btn-primary btn-sm ADB">품목삭제</button>
146
+						<button type="button" id="ITP_BTN_MRTNMNG01010_DETAIL_ADDROW" class="btn-primary btn-sm ADB" data-call-popup="ITP_POP_MRTNMNG01010_ITEM_AREA">품목추가</button>
167 147
 					</div>
168
-				  </div>
169
-				  <div class="right">
170
-					<button id="ITP_BTN_MRTNMNG01010_LIST_MINUS"><</button>
171
-					<div class="num fnNum">2</div>
172
-					<button id="ITP_BTN_MRTNMNG01010_LIST_PLUS">></button>
173
-				  </div>
174
-				</li>
148
+				</div>
149
+			</div>
150
+			<div id="ITP_LIST_MRTNMNG01010_ITEM_AREA" class="scroll_area row-1-1">
151
+				<ul id="ITP_LIST_MRTNMNG01010_DETAIL_ROWS" class="panel-group"></ul>
152
+				<div id="ITP_LIST_MRTNMNG01010_DETAIL_ROWCOPY" style="display:none;">
153
+					<li class="row_2">
154
+						<div class="left_info">
155
+							<div class="check_box"><!-- class 변경 -->
156
+								<div><input type="checkbox" name="brandUnitUnqNo" class="fnBrandUnitUnqNo" /></div>
157
+							</div>
158
+							<div class="thick">
159
+								<div class="fnItemNm">품목명</div>
160
+								<div>-</div>
161
+								<div class="fnUnit">EA</div>
162
+							</div>
163
+							<div class="thick">
164
+								<label class="space0">구매가 :</label>
165
+								<div class="fnUnitAmt">1,120,000</div>
166
+							</div>
167
+						</div>
168
+						<div class="right">
169
+							<button id="ITP_BTN_MRTNMNG01010_DETAIL_MINUS" class="DETAIL_ITEM_MINUS">-</button>
170
+							<div class="num fnPchReqQty">1</div>
171
+							<button id="ITP_BTN_MRTNMNG01010_DETAIL_PLUS" class="DETAIL_ITEM_PLUS">+</button>
172
+						</div>
173
+					</li>
174
+				</div>
175
+			</div>
176
+			<div class="button_bar">
177
+				<button id="ITP_BTN_MRTNMNG01010_DETAIL_RTN_ORDER" data-call-popup="ITP_POP_MRTNMNG01010_RTN_AREA" class="col_3 btn-primary REQ">빈품요청</button>
178
+				<button id="ITP_BTN_MRTNMNG01010_DETAIL_TEMP_SAVE" data-call-popup="ITP_POP_MRTNMNG01010_RTN_AREA" class="col_3 btn-gray TSA">임시저장</button>
179
+				<button id="ITP_BTN_MRTNMNG01010_DETAIL_CANCEL" class="col_3 btn-gray CLB">취소</button>
175 180
 			</div>
176
-		  </div>
177
-		  <div class="button_bar">
178
-			  <button id="ITP_BTN_MRTNMNG01010_LIST_REQ_ORDER" data-call-popup="ITP_POP_MRTNMNG01010_REQ_CONFIRM" class="col_3 btn-primary REQ">구매요청</button>
179
-			  <button id="ITP_BTN_MRTNMNG01010_LIST_TEMP_SAVE" class="col_3 btn-gray TSA">임시저장</button>
180
-			  <button id="ITP_BTN_MRTNMNG01010_LIST_CANCEL" class="col_3 btn-gray CLB">취소</button>
181
-		  </div>
182
-	  </form>
181
+		</form>
183 182
 	</div>
184
-  </section>
183
+	<div id="ITP_MOBILE_JS"></div>
184
+</section>

+ 322 - 120
src/main/webapp/mobile/app/mrtnmng/MRTNMNG02010.html

@@ -1,133 +1,335 @@
1 1
 <section id="ITP_MOBILE_MRTNMNG02010">
2
-	<div id="ITP_AJAX_MRTNMNG02010_LIST_CONTAINER" style="display: block;">
3
-	  <form id="ITP_FORM_MPOMNG02010_LIST" class="form-horizontal" onsubmit="return false;">
4
-			 <input type="hidden" id="ITP_FORM_MRTNMNG02010_LIST_VIEW_CD" name="viewCd" value="C">
5
-			 <div class="content">
6
-			  <div class="line">
2
+	<div id="ITP_AJAX_MRTNMNG02010_LIST_CONTAINER" style="display: none;">
3
+		<div class="content">
4
+			<form id="ITP_FORM_MRTNMNG02010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
5
+				<input type="hidden" id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
6
+				<input type="hidden" id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
7
+				<div class="line">
8
+					<label>구매요청일</label>
9
+					<div class="input-group date_to date">
10
+						<input type="date" id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_FROM_DT" name="fromDt" pattern="\d{4}.\d{2}.\d{2}">
11
+						<div class="at">~</div>
12
+						<input type="date" id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_TO_DT" name="toDt" pattern="\d{4}.\d{2}.\d{2}">
13
+					</div>
14
+				</div>
15
+				<div class="line">
16
+					<label>구매요청상태</label>
17
+					<div class="line_right">
18
+						<select id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_RTN_REQ_ST_CD" data-select-code="RTN_REQ_ST_CD" class="stcd" name="srtnReqStCd">
19
+							<option value="">상태</option>
20
+						</select>
21
+					</div>
22
+				</div>
23
+				<div class="line">
24
+					<label>납품장소</label>
25
+					<div class="search_wrap">
26
+						<div class="float_left">
27
+							<input id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" type="text" placeholder="납품창고" readonly>
28
+							<input type="hidden" id="ITP_FORM_MRTNMNG02010_LIST_SEARCH_WHS_ID" name="swhsId" value="">
29
+						</div>
30
+						<div class="float_left_btn">
31
+							<button id="ITP_BTN_MRTNMNG02010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
32
+							<button id="ITP_BTN_MRTNMNG02010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
33
+						</div>
34
+					</div>
35
+				</div>
36
+				<div class="line" style="height:50px;">
37
+					<div class="search">
38
+						<button id="ITP_BTN_MRTNMNG02010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
39
+					</div>
40
+				</div>
41
+				<div class="table_header">
42
+					<h1>>구매 요청 내역</h1>
43
+				</div>
44
+			</form>
45
+		</div>
46
+		<div id="ITP_LIST_MRTNMNG02010_LIST_AREA" class="scroll_area row-1-1">
47
+			<ul id="ITP_LIST_MRTNMNG02010_LIST_ROWS" class="panel-group"></ul>
48
+			<div id="ITP_LIST_MRTNMNG02010_LIST_ROWCOPY" style="display:none;">
49
+				<li class="history_list list-row">
50
+					<div class="left">
51
+						<div class="nomal">
52
+							<label>반품요청일 </label>
53
+							<span>:</span>
54
+							<div class="history">
55
+								<div class="fnRtnReqDt">2022.10.01</div>
56
+								(<div class="fnRtnReqMgrNm">홍길동 점주</div>)
57
+							</div>
58
+						</div>
59
+					</div>
60
+					<div class="left">
61
+						<div class="nomal">
62
+							<div class="half">
63
+								<label>반품상태</label>
64
+								<span>:</span>
65
+								<div class="history">
66
+									<div class="fnRtnReqStNm">대기</div>
67
+								</div>
68
+							</div>
69
+							<div class="half">
70
+								<label>수거장소명 </label>
71
+								<span>:</span>
72
+								<div class="history">
73
+									<div class="fnRtnWhsNm">A매장내</div>
74
+								</div>
75
+							</div>
76
+						</div>
77
+					</div>
78
+					<div class="left">
79
+						<div class="nomal">
80
+							<label style="width: 127px;">반품요청 정보</label>
81
+							<span>:</span>
82
+							<div class="history">
83
+								<div class="fnRtnReqItemQty">품목수(3)</div>
84
+								<i>- </i>
85
+								<div class="fnRtnReqAmt"></div> 원
86
+							</div>
87
+						</div>
88
+					</div>
89
+				</li>
90
+			</div>
91
+		</div>
92
+	</div>
93
+	<div id="ITP_AJAX_MRTNMNG02010_DETAIL_CONTAINER" style="display: none;">
94
+		<div class="content">
95
+			<div class="line">
7 96
 				<label>반품요청일</label>
8
-			  <div class="date_to">
9
-				<input id="ITP_FORM_MRTNMNG02010_LIST_RTN_REQ_DT" class="year" type="date">
10
-				<div class="at">~</div>
11
-				<input id="ITP_FORM_MRTNMNG02010_LIST" class="year" type="date">
12
-			  </div>
97
+				<div class="line_right">
98
+					<div class="fnRtnReqDt"></div>
99
+				</div>
13 100
 			</div>
14 101
 			<div class="line">
15
-			  <label>반품요청상태</label>
16
-			  <div class="line_right">
17
-				  <select id="ITP_FORM_MRTNMNG02010_LIST_RTN_REQ_ST_CD" data-select-code="ST_CD" data-check-required="empty" name="rtnReqStCd"></select>
18
-			  </div>
102
+				<label>반품요청금액</label>
103
+				<div class="line_right">
104
+					<div class="fnRtnReqAmt">424,000원</div>
105
+				</div>
19 106
 			</div>
20 107
 			<div class="line">
21
-			  <label>반품장소</label>
22
-			  <div class="search_nm">
23
-				  <div class="float_left">
24
-					<input id="ITP_FORM_MRTNMNG02010_LIST_WHS_NM" name="whsNm" type="text" placeholder="A매장명">
25
-				  </div>
26
-				  <div class="float_left_btn">
27
-					<button id="ITP_BTN_MRTNMNG02010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG02010_WHS_NM"><img src="../img/search.png" alt=""></button>
28
-					<button id="ITP_BTN_MRTNMNG02010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
29
-				  </div>
30
-				</div>   
31
-			</div>
32
-			<div class="line" style="height:45px;">
33
-			  <div class="search">
34
-				<button id="ITP_BTN_MRTNMNG02010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
35
-			  </div>
108
+				<label>반품장소</label>
109
+				<div class="line_right">
110
+					<div class="fnWhsNm">A매장내</div>
111
+				</div>
36 112
 			</div>
37 113
 			<div class="table_header">
38
-			  <h1>> 반품 요청 내역</h1>
39
-			</div>
40
-		  </div>
41
-		  <div class="scroll_area row-2">
42
-		  <ul id="ITP_LIST_MRTNMNG02010_LIST_ROWS"></ul>
43
-			 <div id="ITP_LIST_MRTNMNG02010_LIST_ROWCOPY" style="display:none;">	     
44
-			<li class="history_list5">
45
-			  <div class="left">
46
-				<div class="nomal">
47
-				  <label>반품요청일 :</label>
48
-				  <div class="history">
49
-					<div class="fnRtnReqDt">2022.10.01</div> 
50
-					(<div class="fnNm">홍길동 점주</div>)
51
-				  </div>
52
-				</div>
53
-			  </div>
54
-			  <div class="left">
55
-				<div class="nomal">
56
-				  <label>반품상태 :</label>
57
-				  <div class="history">
58
-					<div class="fnRtnReqStCd">대기</div>
59
-				  </div>
60
-				  <label>수거장소명 :</label>
61
-				  <div class="history">
62
-					<div class="fnColPlaceNm">A매장내</div>
63
-				  </div>
64
-				</div>
65
-			  </div>
66
-			  <div class="left">
67
-				<div class="nomal">
68
-				  <label class="col_7">반품요청 정보 :</label>
69
-				  <div class="history">
70
-					<div class="fn">품목수(3)</div> 
71
-					<i>- </i>
72
-					<div class="fnPchActAmt">1,200,000</div> 원
73
-				  </div>
74
-				</div>
75
-			  </div>
76
-			</li>
77
-			</div>
78
-		  </div>
79
-		  </form>
114
+				<h1>> 반품 품목</h1>
115
+			</div>
80 116
 		</div>
81
-	<div id="ITP_AJAX_MRTNMNG02010_VIEW_CONTAINER" style="display: none;">
82
-		<form id="ITP_FORM_MRTNMNG01010_VIEW" class="form-horizontal" onsubmit="return false;">
83
-		   <input type="hidden" id="ITP_FORM_MPOMNG01010_VIEW_VIEW_CD" name="viewCd" value="C">
84
-		  <div class="content">
85
-			<div class="line">
86
-			  <label>반품요청일</label>
87
-			  <div class="line_right">
88
-				<div class="fnRtnReqDt">2022.10.10</div>
89
-			  </div>      
117
+		<div id="ITP_LIST_MRTNMNG02010_DETAIL_AREA" class="scroll_area row-2">
118
+			<ul id="ITP_LIST_MRTNMNG02010_DETAIL_ROWS" class="panel-group"></ul>
119
+			<div id="ITP_LIST_MRTNMNG02010_DETAIL_ROWCOPY" style="display:none;">
120
+				<li class="list-row">
121
+					<div class="left_info">
122
+						<div class="thick">
123
+							<div class="fnItemNm">품목명</div>
124
+							<div>-</div>
125
+							<div class="fnUnit">2EA</div>
126
+						</div>
127
+						<div class="thick">
128
+							<label class="space0">반품가 :</label>
129
+							<div class="fnRtnReqAmt">1,120,000</div>
130
+						</div>
131
+					</div>
132
+					<div class="right">
133
+						<div class="fnRtnReqQty">2</div>
134
+					</div>
135
+				</li>
90 136
 			</div>
91
-			<div class="line">
92
-			  <label>반품요청금액</label>
93
-			  <div class="line_right">
94
-				<div class="fnRtnReqAmt">424,000원</div>
95
-			  </div>
137
+		</div>
138
+		<div class="button_bar">
139
+			<button id="ITP_BTN_MRTNMNG02010_DETAIL_CANCEL_LIST" class="col_12 btn-gray CLB">취소</button>
140
+		</div>
141
+	</div>
142
+	<div id="ITP_AJAX_MRTNMNG02010_MODIFY_CONTAINER" style="display: none;">
143
+		<form id="ITP_FORM_MRTNMNG02010_MODIFY" class="form-horizontal" onsubmit="return false;">
144
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_VIEW_CD" name="viewCd" value="U">
145
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_BRAND_ID" name="brandId" value="">
146
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_STORE_ID" name="storeId" value="">
147
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_LOAN_DVSN" name="loanDvsn" value="">
148
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_LOAN_MGNT_UNQ_NO" name="loanMgntUnqNo" value="">
149
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_DVSN" name="pchReqDvsn" value="">
150
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_UNQ_NO" name="pchReqUnqNo" value="">
151
+			<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_ST_CD" name="pchReqStCd" value="">
152
+			<div class="content">
153
+				<div class="line">
154
+					<label>납기요청일</label>
155
+					<input id="ITP_FORM_MRTNMNG02010_MODIFY_DLV_REQ_DT" name="dlvReqDt" class="date fnDlvReqDt" data-check-required="empty" type="date" placeholder="">
156
+				</div>
157
+				<div class="line">
158
+					<label>구매요청금액</label>
159
+					<div class="line_right">
160
+						<div class="fnRtnReqTotalAmt">0원</div>
161
+					</div>
162
+				</div>
163
+				<div class="line">
164
+					<label>구매가능금액</label>
165
+					<div class="line_right">
166
+						<div class="fnOrdUseAmt">0원</div>
167
+					</div>
168
+				</div>
169
+				<div class="line">
170
+					<label>납품장소</label>
171
+					<div class="search_nm">
172
+						<div class="float_left">
173
+							<input type="text" id="ITP_FORM_MRTNMNG02010_MODIFY_WHS_NM" class="" name="whsNm" data-check-required="empty" placeholder="매장명" readonly />
174
+							<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_WHS_ID" class="form-control itp_input" name="whsId" value="" />
175
+							<input type="hidden" id="ITP_FORM_MRTNMNG02010_MODIFY_LOCATION" class="form-control itp_input" name="location" value="" />
176
+						</div>
177
+						<div class="float_left_btn">
178
+							<button id="ITP_BTN_MRTNMNG02010_MODIFY_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
179
+							<button id="ITP_BTN_MRTNMNG02010_MODIFY_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
180
+						</div>
181
+					</div>
182
+				</div>
183
+				<div class="line">
184
+					<div class="table_header">
185
+						<h1>>구매 품목</h1>
186
+						<button type="button" id="ITP_BTN_MRTNMNG02010_MODIFY_DEL_ROW" class="btn-primary btn-sm ADB">품목삭제</button>
187
+						<button type="button" id="ITP_BTN_MRTNMNG02010_MODIFY_ADD_ROW" class="btn-primary btn-sm ADB">품목추가</button>
188
+					</div>
189
+				</div>
96 190
 			</div>
97
-			<div class="line">
98
-			  <label>반품장소</label>
99
-			  <div class="line_right">
100
-				<div class="fnWhsNm">A매장내</div>
101
-			  </div>
191
+			<div id="ITP_LIST_MRTNMNG02010_MODIFY_AREA" class="scroll_area row-1-1">
192
+				<ul id="ITP_LIST_MRTNMNG02010_MODIFY_ROWS" class="panel-group"></ul>
193
+				<div id="ITP_LIST_MRTNMNG02010_MODIFY_ROWCOPY" style="display:none;">
194
+					<li class="list-row">
195
+						<div class="left_info">
196
+							<div class="check_box"><!-- class 변경 -->
197
+								<div><input type="checkbox" name="brandUnitUnqNo" class="fnBrandUnitUnqNo" /></div>
198
+							</div>
199
+							<div class="thick">
200
+								<div class="fnItemNm">품목명</div>
201
+								<div>-</div>
202
+								<div class="fnUnit">EA</div>
203
+							</div>
204
+							<div class="thick">
205
+								<label class="space0">구매가 :</label>
206
+								<div class="fnUnitAmt"></div>
207
+							</div>
208
+						</div>
209
+						<div class="right">
210
+							<button id="ITP_BTN_MRTNMNG02010_MODIFY_MINUS" class="DETAIL_ITEM_MINUS">-</button>
211
+							<div class="num fnRtnReqQty">1</div>
212
+							<button id="ITP_BTN_MRTNMNG02010_MODIFY_PLUS" class="DETAIL_ITEM_PLUS">+</button>
213
+						</div>
214
+					</li>
215
+				</div>
102 216
 			</div>
103
-			<div class="table_header">
104
-			  <h1>> 반품 품목</h1>
105
-			</div>
106
-		  </div>
107
-		  <div class="scroll_area row-1" >
108
-			<ul id="ITP_LIST_MRTNMNG02010_VIEW_ROWS"></ul>
109
-			 <div id="ITP_LIST_MRTNMNG02010_VIEW_ROWCOPY" style="display:none;">	
110
-			<li>
111
-			  <div class="left_info">
112
-				<div class="thick">
113
-				  <div class="fnItemNm">품목명</div>
114
-				  <div>-</div>
115
-				  <div class="fnUnit">2EA</div>
116
-				</div>
117
-				<div class="thick">
118
-				  <label class="space0">반품가 :</label>
119
-				  <div class="fnPchActAmt">1,120,000</div>
120
-				</div>
121
-			  </div>
122
-			  <div class="right">
123
-				<div class="num fnNum">2</div>
124
-			  </div>
125
-			</li>
126
-			</div>
127
-		  </div>
128
-		  <div class="button_bar">
129
-			  <button id="ITP_BTN_MRTNMNG02010_VIEW_CANCEL" class="col_12 btn-gray CLB">취소</button>
130
-		  </div>
131
-	  </form>
217
+			<div class="button_bar">
218
+				<button id="ITP_BTN_MRTNMNG02010_MODIFY_REQ_ORDER" class="col_3 btn-primary REQ">구매요청</button>
219
+				<button id="ITP_BTN_MRTNMNG02010_MODIFY_TEMP_SAVE" class="col_3 btn-gray TSA">임시저장</button>
220
+				<button id="ITP_BTN_MRTNMNG02010_MODIFY_CANCEL" class="col_3 btn-gray CLB">취소</button>
221
+			</div>
222
+		</form>
223
+	</div>
224
+	<div id="ITP_POP_MRTNMNG02010_REQ_AREA" class="popup mobile-pop-close" style="display: none;">
225
+		<div class="pop">
226
+			<div class="pop_line">
227
+				<label>납품요청일 &nbsp;&nbsp;:</label>
228
+				<div class="fnPopDlvReqDt"></div>
229
+			</div>
230
+			<div class="pop_line">
231
+				<label>품목수&nbsp;&nbsp; :</label>
232
+				<div class="fnItemQty">개</div>
233
+			</div>
234
+			<div class="pop_line">
235
+				<label>구매금액 &nbsp;&nbsp;:</label>
236
+				<div class="fnOrdAmt">원</div>
237
+			</div>
238
+			<label class="pop_label msg_save">구매요청 하시겠습니까?</label>
239
+			<div class="popup_btn">
240
+				<button id="ITP_BTN_MRTNMNG02010_POP_REQ_CLOSE" class="cancel btn-gray CLB btn-pop-close">취소</button>
241
+				<button id="ITP_BTN_MRTNMNG02010_POP_REQ_CONFIRM" class="ok btn-primary COK">확인</button>
242
+			</div>
243
+		</div>
244
+	</div>
245
+	<div id="ITP_POP_MRTNMNG02010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
246
+		<div class="pop">
247
+			<div class="header">
248
+				<div class="header_left">
249
+					<label>> 납품장소</label>
250
+				</div>
251
+				<div class="header_right">
252
+					<button type="button" id="ITP_BTN_MRTNMNG02010_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
253
+				</div>
254
+			</div>
255
+			<div class="search_bar">
256
+				<form id="ITP_FORM_MRTNMNG02010_POP_WHS" class="form-horizontal" onsubmit="return false;">
257
+					<input type="hidden" id="ITP_FORM_MRTNMNG02010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
258
+					<input type="hidden" id="ITP_FORM_MRTNMNG02010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
259
+					<input id="ITP_FORM_MRTNMNG02010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
260
+					<button id="ITP_BTN_MRTNMNG02010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
261
+				</form>
262
+			</div>
263
+			<div class="search_bar">
264
+				<button id="ITP_BTN_MRTNMNG02010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
265
+			</div>
266
+			<div id="ITP_LIST_MRTNMNG02010_POP_WHS_AREA" class="popup_scroll">
267
+				<ul id="ITP_LIST_MRTNMNG02010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
268
+				<div id="ITP_LIST_MRTNMNG02010_POP_WHS_ROWCOPY" style="display:none;">
269
+					<li class="row_2">
270
+						<div class="scroll_left">
271
+							<div class="fnWhsNm">브랜드 창고 명A</div>
272
+							<div class="fnLocationNm">(상세위치내용)</div>
273
+						</div>
274
+						<div class="scroll_right">
275
+							<button id="ITP_BTN_MRTNMNG02010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
276
+						</div>
277
+					</li>
278
+				</div>
279
+			</div>
280
+		</div>
281
+	</div>
282
+	<div id="ITP_POP_MRTNMNG02010_ITEM_AREA" class="popup2 mobile-pop-close" style="display: none;">
283
+		<div class="pop">
284
+			<div class="header">
285
+				<div class="header_left">
286
+					<label>> 품목 검색</label>
287
+				</div>
288
+				<div class="header_right">
289
+					<button type="button" id="ITP_BTN_MRTNMNG02010_POP_ITEM_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
290
+				</div>
291
+			</div>
292
+			<form id="ITP_FORM_MRTNMNG02010_POPUP_ITEM" class="form-horizontal" onsubmit="return false;">
293
+				<input type="hidden" id="ITP_FORM_MRTNMNG02010_POPUP_ITEM_BRAND_ID" name="sbrandId" value="">
294
+				<input type="hidden" id="ITP_FORM_MRTNMNG02010_POPUP_ITEM_STORE_ID" name="sstoreId" value="">
295
+				<div class="search_bar">
296
+					<input id="ITP_FORM_MRTNMNG02010_POP_ITEM_KEYWORD" name="sitemNm" type="text" placeholder="품목명/품목번호" />
297
+					<button id="ITP_BTN_MRTNMNG02010_POP_ITEM_SEARCH"><img src="../img/search.png"></button>
298
+				</div>
299
+				<div class="search_bar">
300
+					<button id="ITP_BTN_MRTNMNG02010_POP_ITEM_NM" class="btn_blue">품목명▼</button>
301
+				</div>
302
+			</form>
303
+			<div id="ITP_LIST_MRTNMNG02010_POP_ITEM_AREA" class="popup_scroll">
304
+				<ul id="ITP_LIST_MRTNMNG02010_POP_ITEM_ROWS" class="panel-group"></ul>
305
+				<div id="ITP_LIST_MRTNMNG02010_POP_ITEM_ROWCOPY" style="display:none;">
306
+					<li class="row_2">
307
+						<div class="left" style="width:180px;">
308
+							<!--<div class="check_box">
309
+                                <input type="checkbox" id="ITP_FORM_MRTNMNG02010_POP_ITEM_CHECKBOX" name="itemId" />
310
+                            </div>-->
311
+							<div class="thick">
312
+								<div class="fnItemNm">품목명</div>
313
+								<div>-</div>
314
+								<div class="fnUnit">EA</div>
315
+							</div>
316
+							<div class="thick" style="font-weight:100;">
317
+								<div class="space">구매가 :</div>
318
+								<div class="fnUnitAmt">0</div>
319
+							</div>
320
+						</div>
321
+						<div class="right">
322
+							<button id="ITP_BTN_MRTNMNG02010_POP_ITEM_MINUS" class="POP_ITEM_MINUS">-</button>
323
+							<div class="num fnRtnReqQty">1</div>
324
+							<button id="ITP_BTN_MRTNMNG02010_POP_ITEM_PLUS" class="POP_ITEM_PLUS">+</button>
325
+						</div>
326
+						<div class="add">
327
+							<button id="ITP_BTN_MRTNMNG02010_POP_ITEM_ADD" class="POP_ITEM_ADD">추가</button>
328
+						</div>
329
+					</li>
330
+				</div>
331
+			</div>
332
+		</div>
132 333
 	</div>
133
-  </section>
334
+	<div id="ITP_MOBILE_JS"></div>
335
+</section>

+ 219 - 173
src/main/webapp/mobile/app/mrtnmng/MRTNMNG04010.html

@@ -1,174 +1,220 @@
1 1
 <section id="ITP_MOBILE_MRTNMNG04010">
2
-	<div id="ITP_AJAX_MRTNMNG04010_LIST_CONTAINER" style="display: none;">
3
-	   <form id="ITP_FORM_MRTNMNG04010_LIST" class="form-horizontal" onsubmit="return false;">
4
-	   <input type="hidden" id="ITP_FORM_MRTNMNG04010_LIST_VIEW_CD" name="viewCd" value="C">
5
-		   <div class="content">
6
-			<div class="line">
7
-		   <label>반품발주일자</label>
8
-		   <div class="date_to">
9
-			 <input id="ITP_FORM_MRTNMNG04010_LIST" class="year" type="date">
10
-			 <div class="at">~</div>
11
-			 <input id="ITP_FORM_MRTNMNG04010_LIST" class="year" type="date">
12
-		   </div>
13
-		 </div>
14
-		 <div class="line">
15
-		   <label>반품발주상태</label>
16
-		   <div class="line_right">
17
-			  <select id="ITP_FORM_MRTNMNG04010_LIST_RTN_PODR_ST_CD" data-select-code="ST_CD" data-check-required="empty" name="rtnPodrStCd"></select>
18
-		   </div>
19
-		 </div>
20
-		 <div class="line">
21
-		   <label>반품장소</label>
22
-		   <div class="search_nm">
23
-			   <div class="float_left">
24
-				 <input id="ITP_FORM_MRTNMNG04010_LIST_WHS_NM" name="whsNm" type="text" placeholder="A매장명">
25
-			   </div>
26
-			   <div class="float_left_btn">
27
-				   <button id="ITP_BTN_MRTNMNG04010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG04010_WHS_NM"><img src="../img/search.png" alt=""></button>
28
-				   <button id="ITP_BTN_MRTNMNG04010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
29
-			   </div>
30
-		   </div>
31
-		 </div>
32
-		 <div class="line">
33
-		   <label>반품입고장소</label>
34
-		   <div class="search_nm">
35
-			   <div class="float_left">
36
-				 <input id="ITP_FORM_MRTNMNG04010_LIST_WHS_NM" type="text" placeholder="A공급업체명">
37
-			   </div>
38
-			   <div class="float_left_btn">
39
-				 <button id="ITP_BTN_MRTNMNG04010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG04010_WHS_NM"><img src="../img/search.png" alt=""></button>
40
-				 <button id="ITP_BTN_MRTNMNG04010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
41
-			   </div>
42
-		   </div>	
43
-		 </div>
44
-		 <div class="line" style="height:50px;">
45
-		   <div class="search">
46
-			 <button id="ITP_BTN_MRTNMNG04010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
47
-		   </div>
48
-		 </div>
49
-		 <div class="table_header">
50
-		   <h1>> 반품 발주 내역</h1>
51
-		 </div>
52
-	   </div>
53
-	   <div class="scroll_area row-3">
54
-	   <ul id="ITP_LIST_MRTNMNG04010_LIST_ROWS"></ul>
55
-	   <div id="ITP_LIST_MRTNMNG04010_LIST_ROWCOPY" style="display:none;">	     
56
-		 <li class="history_list">
57
-		   <div class="left">
58
-			 <div class="nomal">
59
-			   <label class="col_2">반품발주일자&nbsp;:</label>
60
-			   <div>
61
-				 <div class="fnRtnPodrDt">2022.10.01</div> 
62
-				 (&nbsp;<div class="fnNm">홍길동 점주</div> )
63
-			   </div>
64
-			 </div>
65
-		   </div>
66
-		   <div class="left">
67
-			 <div class="nomal">
68
-			   <label class="col_2">반품발주상태&nbsp;:</label>
69
-			   <div class="col_5">
70
-				 <div class="col_5 fnRtnPodrStCd">대기</div>
71
-			   </div>
72
-			   <label>납품장소명&nbsp;:</label>
73
-			   <div>
74
-				 <div class="fnDlvPlaceNm">A매장내</div>
75
-			   </div>
76
-			 </div>
77
-		   </div>
78
-		   <div class="left">
79
-			 <div class="nomal">
80
-			   <label class="col_2">반품발주정보&nbsp;:</label>
81
-			   <div>
82
-				 <div class="fn">품목수(3)</div> 
83
-				 <i>-</i>
84
-				 <div class="fnPchActAmt">1,200,000</div>원
85
-			   </div>
86
-			 </div>
87
-		   </div>
88
-		   <div class="left">
89
-			 <div class="nomal">
90
-			   <label class="col_2">반품입고장소&nbsp;:</label>
91
-			   <div>
92
-				 <div class="fnWhsNm">A공급업체</div> 
93
-			   </div>
94
-			 </div>
95
-		   </div>
96
-		 </li>
97
-		 </div>
98
-	   </div>
99
-	   </form>
100
-	 </div>
101
-	<div id="ITP_AJAX_MRTNMNG04010_VIEW_CONTAINER" style="display: block;">
102
-	   <form id="ITP_FORM_MRTNMNG04010_VIEW" class="form-horizontal" onsubmit="return false;">
103
-			<input type="hidden" id="ITP_FORM_MPOMNG01010_VIEW_VIEW_CD" name="viewCd" value="C">
104
-	   <div class="content">
105
-		 <div class="line">
106
-		   <label>반품발주일자</label>
107
-		   <div class="line_right">
108
-			 <div class="fnRtnPodrDt">2022.10.10</div>
109
-		   </div>      
110
-		 </div>
111
-		 <div class="line">
112
-		   <label>반품발주금액</label>
113
-		   <div class="line_right">
114
-			 <div class="fnRtnPodrAmt">424,000원</div>
115
-		   </div>
116
-		 </div>
117
-		 <div class="line">
118
-		   <label>반품장소</label>
119
-		   <div class="line_right">
120
-			 <div class="fn">A매장내</div>
121
-		   </div>
122
-		 </div>
123
-		 <div class="line">
124
-		   <label>반품입고장소</label>
125
-		   <div class="line_right">
126
-			 <div class="fnWhsNm">A공급업체</div>
127
-		   </div>
128
-		 </div>
129
-		 <div class="table_header">
130
-		   <h1>> 반품 발주 품목</h1>
131
-		 </div>
132
-	   </div>
133
-	   <div class="scroll_area row-2">
134
-	   <ul id="ITP_LIST_MRTNMNG04010_VIEW_ROWS"></ul>
135
-	   <div id="ITP_LIST_MRTNMNG04010_VIEW_ROWCOPY" style="display:none;">	
136
-		 <li>
137
-		   <div>
138
-			 <div class="left_info col-4">
139
-			   <div class="thick">
140
-				 <div class="fnItemNm">품목명</div>
141
-				 <i>-</i>
142
-				 <div class="fnUnit">2EA</div>
143
-			   </div>
144
-			 </div>
145
-			 <div class="left_info col-6">
146
-			   <div class="thick">
147
-				 <label>수량/금액</label>
148
-				 <div class="fn">2</div>
149
-				 <i>/</i>
150
-				 <div class="fn">24,000</div>
151
-			   </div>
152
-			 </div>
153
-			 <div class="left_info col-4">
154
-			   <div class="thick">
155
-				 <label style="margin:0;">구매가 :</label>
156
-				 <div class="fnPchActAmt">12,000</div>
157
-			   </div>
158
-			 </div>
159
-			 <div class="left_info col-6">
160
-			   <div class="thick">
161
-				 <label>납기요청일&nbsp;:&nbsp;</label>
162
-				 <div class="fnRtnReqDt">2022.10.01</div>
163
-			   </div>
164
-			 </div>
165
-		   </div>
166
-		 </li>
167
-		 </div>
168
-	   </div>
169
-	   <div class="button_bar">
170
-		 <button id="ITP_BTN_MRTNMNG04010_VIEW_CANCEL" class="col_12 btn-gray CLB">취소</button>
171
-	   </div>
172
-	   </form>
173
-	 </div>
174
-   </section>
2
+	<div id="ITP_POP_MRTNMNG04010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
3
+		<div class="pop">
4
+			<div class="header">
5
+				<div class="header_left">
6
+					<label>> 납품장소</label>
7
+				</div>
8
+				<div class="header_right">
9
+					<button type="button" id="ITP_BTN_MRTNMNG04010_POP_WHS_CLOSE"><img src="../img/close.png"></button>
10
+				</div>
11
+			</div>
12
+			<div class="search_bar">
13
+				<form id="ITP_FORM_MRTNMNG04010_POP_WHS" class="form-horizontal" onsubmit="return false;">
14
+					<input type="hidden" id="ITP_FORM_MRTNMNG04010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
15
+					<input type="hidden" id="ITP_FORM_MRTNMNG04010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
16
+					<input id="ITP_FORM_MRTNMNG04010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
17
+					<button id="ITP_BTN_MRTNMNG04010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
18
+				</form>
19
+			</div>
20
+			<div class="search_bar">
21
+				<button id="ITP_BTN_MRTNMNG04010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
22
+			</div>
23
+			<div id="ITP_LIST_MRTNMNG04010_POP_WHS_AREA" class="popup_scroll">
24
+				<ul id="ITP_LIST_MRTNMNG04010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
25
+				<div id="ITP_LIST_MRTNMNG04010_POP_WHS_ROWCOPY" style="display:none;">
26
+					<li class="list-row">
27
+						<div class="scroll_left">
28
+							<div class="fnWhsNm">브랜드 창고 명A</div>
29
+							<div class="fnLocationNm">(상세위치내용)</div>
30
+						</div>
31
+						<div class="scroll_right">
32
+							<button id="ITP_BTN_MRTNMNG04010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
33
+						</div>
34
+					</li>
35
+				</div>
36
+			</div>
37
+		</div>
38
+	</div>
39
+	<div id="ITP_AJAX_MRTNMNG04010_LIST_CONTAINER" style="display: block;">
40
+		<form id="ITP_FORM_MRTNMNG04010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
41
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
42
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
43
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_IDX" name="sidx" value="0">
44
+			<div class="content">
45
+				<div class="line">
46
+					<label>반품요청일</label>
47
+					<div class="date_to">
48
+						<input id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
49
+						<div class="at">~</div>
50
+						<input id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
51
+					</div>
52
+				</div>
53
+				<div class="line">
54
+					<label>반품발주상태</label>
55
+					<div class="search_wrap">
56
+						<div class="line_right">
57
+							<select id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_ODR_ST_CD" data-select-code="RTN_ODR_ST_CD" class="stcd" name="srtnOdrStCd">
58
+								<option value=""></option>
59
+							</select>
60
+						</div>
61
+					</div>
62
+				</div>
63
+				<div class="line">
64
+					<label>수거장소</label>
65
+					<div class="search_nm">
66
+						<div class="float_left">
67
+							<input type="text" id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_WHS_NM" class="" name="srtnWhsNm" placeholder="매장명" readonly />
68
+							<input type="hidden" id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_WHS_ID" class="" name="srtnWhsId" />
69
+						</div>
70
+						<div class="float_left_btn">
71
+							<button id="ITP_BTN_MRTNMNG04010_LIST_SEARCH_RTN_WHS_NM"><img src="../img/search.png" alt=""></button>
72
+							<button id="ITP_BTN_MRTNMNG04010_LIST_DELETE_RTN_WHS_NM"><img src="../img/delete.png" alt=""></button>
73
+						</div>
74
+					</div>
75
+				</div>
76
+				<div class="line">
77
+					<label>반품입고장소</label>
78
+					<div class="search_nm">
79
+						<div class="float_left">
80
+							<input type="text" id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" placeholder="매장명" readonly />
81
+							<input type="hidden" id="ITP_FORM_MRTNMNG04010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
82
+						</div>
83
+						<div class="float_left_btn">
84
+							<button id="ITP_BTN_MRTNMNG04010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
85
+							<button id="ITP_BTN_MRTNMNG04010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
86
+						</div>
87
+					</div>
88
+				</div>
89
+				<div class="line" style="height:50px;">
90
+					<div class="search">
91
+						<button id="ITP_BTN_MRTNMNG04010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
92
+					</div>
93
+				</div>
94
+				<div class="table_header">
95
+					<h1>> 반품 발주 내역</h1>
96
+				</div>
97
+			</div>
98
+			<div id="ITP_LIST_MRTNMNG04010_LIST_ITEM_AREA" class="scroll_area row-3">
99
+				<ul id="ITP_LIST_MRTNMNG04010_LIST_ITEM_ROWS" class="panel-group"></ul>
100
+				<div id="ITP_LIST_MRTNMNG04010_LIST_ITEM_ROWCOPY" style="display: none;">
101
+					<li class="history_list list-row">
102
+						<div class="left">
103
+							<div class="nomal">
104
+								<label>반품발주일자 &nbsp;:</label>
105
+								<div class="history">
106
+									<div class="fnRtnOdrRegDt">2022.10.01</div>
107
+									(<div class="fnRtnOdrMgrNm"></div>)
108
+								</div>
109
+							</div>
110
+						</div>
111
+						<div class="left">
112
+							<div class="nomal">
113
+								<label>반품발주상태 &nbsp;:</label>
114
+								<div class="history">
115
+									<div class="fnRtnOdrStNm">대기</div>
116
+								</div>
117
+								<label>납품장소명&nbsp;:</label>
118
+								<div class="history">
119
+									<div class="fnWhsNm">A매장내</div>
120
+								</div>
121
+							</div>
122
+						</div>
123
+						<div class="left">
124
+							<div class="nomal">
125
+								<label>반품발주정보 &nbsp;:</label>
126
+								<div class="history">
127
+									<div class="fnRtnDodrItemQty">품목수($)</div>
128
+									<i>-</i>
129
+									<div class="fnRtnDodrTotalAmt">1,200,000</div>원
130
+								</div>
131
+							</div>
132
+						</div>
133
+						<div class="left">
134
+							<div class="nomal">
135
+								<label>반품입고장소 &nbsp;:</label>
136
+								<div class="history">
137
+									<div class="fnRtnWhsNm">A공급업체</div>
138
+								</div>
139
+							</div>
140
+						</div>
141
+					</li>
142
+				</div>
143
+			</div>
144
+		</form>
145
+	</div>
146
+	<div id="ITP_AJAX_MRTNMNG04010_VIEW_CONTAINER" style="display: none;">
147
+		<form id="ITP_FORM_MRTNMNG04010_VIEW" class="form-horizontal" onsubmit="return false;">
148
+			<input type="hidden" id="ITP_FORM_MRTNMNG04010_VIEW_VIEW_CD" name="viewCd" value="C">
149
+			<div class="content">
150
+				<div class="line">
151
+					<label>반품발주일자</label>
152
+					<div class="line_right">
153
+						<div class="fnRtnOdrRegDt"></div>
154
+					</div>
155
+				</div>
156
+				<div class="line">
157
+					<label>반품발주금액</label>
158
+					<div class="line_right">
159
+						<div class="fnRtnDodrTotalAmt"></div>
160
+					</div>
161
+				</div>
162
+				<div class="line">
163
+					<label>반품장소</label>
164
+					<div class="line_right">
165
+						<div class="fnRtnWhsNm"></div>
166
+					</div>
167
+				</div>
168
+				<div class="line">
169
+					<label>반품입고장소</label>
170
+					<div class="line_right">
171
+						<div class="fnWhsNm"></div>
172
+					</div>
173
+				</div>
174
+				<div class="table_header">
175
+					<h1>> 반품 발주 품목</h1>
176
+				</div>
177
+			</div>
178
+			<div id="ITP_LIST_MRTNMNG04010_VIEW_ITEM_AREA" class="scroll_area row-3">
179
+				<ul id="ITP_LIST_MRTNMNG04010_VIEW_ITEM_ROWS" class="panel-group"></ul>
180
+				<div id="ITP_LIST_MRTNMNG04010_VIEW_ITEM_ROWCOPY" style="display:none;">
181
+					<li class="list-row">
182
+						<div>
183
+							<div class="left_info col-4">
184
+								<div class="thick">
185
+									<div class="fnItemNm">품목명</div>
186
+									<i>-</i>
187
+									<div class="fnRtnQty"></div>
188
+								</div>
189
+							</div>
190
+							<div class="left_info col-6">
191
+								<div class="thick">
192
+									<label>수량/금액</label>
193
+									<div class="fnRtnReqQty">2</div>
194
+									<i>/</i>
195
+									<div class="fnUnitAmt">24,000</div>
196
+								</div>
197
+							</div>
198
+							<div class="left_info col-4">
199
+								<div class="thick">
200
+									<label style="margin:0;">구매가 :</label>
201
+									<div class="fnRtnOdrAmt"></div>
202
+								</div>
203
+							</div>
204
+							<div class="left_info col-6">
205
+								<div class="thick">
206
+									<label>납기요청일&nbsp;:&nbsp;</label>
207
+									<div class="fnColReqDt"></div>
208
+								</div>
209
+							</div>
210
+						</div>
211
+					</li>
212
+				</div>
213
+			</div>
214
+			<div class="button_bar">
215
+				<button id="ITP_BTN_MRTNMNG04010_VIEW_CANCEL_LIST" class="col_12 btn-gray CLB">취소</button>
216
+			</div>
217
+		</form>
218
+	</div>
219
+	<div id="ITP_MOBILE_JS"></div>
220
+</section>

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

@@ -1,120 +1,172 @@
1 1
 <section id="ITP_MOBILE_MRTNMNG05010">
2
-	<div id="ITP_AJAX_MRTNMNG05010_LIST_CONTAINER" style="display: block;">
3
-		<form id="ITP_FORM_MPOMNG04010_LIST" class="form-horizontal" onsubmit="return false;">
4
-		  <input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_VIEW_CD" name="viewCd" value="C">
5
-		  <div class="content">
6
-			<div class="line">
7
-			  <label>반품예정일</label>
8
-			  <div class="line_right">
9
-				<input id="ITP_FORM_MRTNMNG05010_LIST_RTN_SCH_DT" name="rtnSchDt" class="date2" type="date">
10
-			  </div>
11
-			</div>
12
-			<div class="line">
13
-			  <label>반품서번호</label>
14
-			  <div class="line_right">
15
-					<input id="ITP_FORM_MRTNMNG05010_LIST_RTN_REQ_UNQ_NO" name="rtnReqUnqNo" class="" type="text">
16
-			  </div>
17
-			</div>
18
-			<div class="line">
19
-			  <label>반품입고장소</label>
20
-			  <div class="search_wrap">
21
-				  <div class="float_left">
22
-					<input id="ITP_FORM_MRTNMNG05010_LIST_WHS_NM" name="whsNm" type="text" placeholder="A공급업체명">
23
-				  </div>
24
-				  <div class="float_left_btn">
25
-					<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG05010_WHS_NM"><img src="../img/search.png" alt=""></button>
26
-					<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
27
-				  </div>
28
-			  </div>
29
-			</div>
30
-			<div class="line">
31
-			  <label>반품장소</label>
32
-			  <div class="search_wrap">
33
-				  <div class="float_left">
34
-					<input id="ITP_FORM_MRTNMNG05010_LIST_WHS_NM" type="text" placeholder="A매장명">
35
-				  </div>
36
-				  <div class="float_left_btn">
37
-					<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG05010_WHS_NM"><img src="../img/search.png" alt=""></button>
38
-					<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
39
-				  </div>
40
-				</div>  
2
+	<div id="ITP_POP_MRTNMNG05010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
3
+		<div class="pop">
4
+			<div class="header">
5
+				<div class="header_left">
6
+					<label>> 납품장소</label>
7
+				</div>
8
+				<div class="header_right">
9
+					<button type="button" id="ITP_BTN_MRTNMNG05010_POP_WHS_CLOSE"><img src="../img/close.png"></button>
10
+				</div>
41 11
 			</div>
42
-			<div class="line">
43
-			  <label>반품품목명</label>
44
-				 <div class="search_wrap">
45
-				  <div class="float_left">
46
-					<input id="ITP_FORM_MRTNMNG05010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
47
-				  </div>
48
-				  </div>   
12
+			<div class="search_bar">
13
+				<form id="ITP_FORM_MRTNMNG05010_POP_WHS" class="form-horizontal" onsubmit="return false;">
14
+					<input type="hidden" id="ITP_FORM_MRTNMNG05010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
15
+					<input type="hidden" id="ITP_FORM_MRTNMNG05010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
16
+					<input id="ITP_FORM_MRTNMNG05010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
17
+					<button id="ITP_BTN_MRTNMNG05010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
18
+				</form>
49 19
 			</div>
50
-			<div class="line" style="height:50px;">
51
-			  <div class="search">
52
-				<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
53
-			  </div>
20
+			<div class="search_bar">
21
+				<button id="ITP_BTN_MRTNMNG05010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
54 22
 			</div>
55
-			<div class="table_header">
56
-			  <h1>> 반품서 내역</h1>
23
+			<div id="ITP_LIST_MRTNMNG05010_POP_WHS_AREA" class="popup_scroll">
24
+				<ul id="ITP_LIST_MRTNMNG05010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
25
+				<div id="ITP_LIST_MRTNMNG05010_POP_WHS_ROWCOPY" style="display:none;">
26
+					<li class="list-row">
27
+						<div class="scroll_left">
28
+							<div class="fnWhsNm">브랜드 창고 명A</div>
29
+							<div class="fnLocationNm">(상세위치내용)</div>
30
+						</div>
31
+						<div class="scroll_right">
32
+							<button id="ITP_BTN_MRTNMNG05010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
33
+						</div>
34
+					</li>
35
+				</div>
57 36
 			</div>
58
-		  </div>
59
-		  <div class="scroll_area row-4" >
60
-		   <ul id="ITP_LIST_MRTNMNG05010_LIST_ROWS"></ul>
61
-			 <div id="ITP_LIST_MRTNMNG05010_LIST_ROWCOPY" style="display:none;">	    
62
-			<li class="history_list2">
63
-			  <div class="left">
64
-				<div class="nomal">
65
-				  <label>반품번호 </label>
66
-				  <div class="history">
67
-					<div class="fnRtnNo">202210010000001-0100</div> 
68
-				  </div>
37
+		</div>
38
+	</div>
39
+	<div id="ITP_AJAX_MRTNMNG05010_LIST_CONTAINER" >
40
+		<form id="ITP_FORM_MRTNMNG05010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
41
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
42
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
43
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_IDX" name="sidx" value="0">
44
+			<div class="content">
45
+				<div class="line">
46
+					<label>반품예정일</label>
47
+					<div class="date_to">
48
+						<!--<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" readonly>
49
+						<span class="input-group-addon itp_date_to">~</span>
50
+						<input type="text" id="ITP_FORM_STINFO02010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" readonly>-->
51
+
52
+						<input id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
53
+						<div class="at">~</div>
54
+						<input id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
55
+					</div>
69 56
 				</div>
70
-			  </div>
71
-			  <div class="left">
72
-				<div class="nomal">
73
-				  <label class="history_label">반품예정일</label>
74
-				  <div class="history">
75
-					<div class="fnRtnSchDt">2022.10.03</div>
76
-				  </div>
57
+				<div class="line">
58
+					<label>반품서번호</label>
59
+					<div class="search_wrap">
60
+						<div class="float_left">
61
+							<input id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_PODR_UNQ_NO" name="srtnPodrUnqNo" style="width: 262px;" type="text" placeholder="">
62
+						</div>
63
+					</div>
77 64
 				</div>
78
-			  </div>
79
-			  <div class="left">
80
-				<div class="nomal">
81
-				  <label>공급업체</label>
82
-				  <div class="history">
83
-					<div class="history_info fnSpplyNm">A공급업체명</div>
84
-				  </div>
85
-				  <label class="sub_info">반품장소</label>
86
-				  <div class="history">
87
-					<div class="fnWhsNm">A매장내</div>
88
-				  </div>
65
+				<div class="line">
66
+					<label>반품입고장소</label>
67
+					<div class="search_nm">
68
+						<div class="float_left">
69
+							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM" data-check-required="empty" class="" name="srtnWhsNm" placeholder="매장명" readonly />
70
+							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_ID" data-check-required="empty" class="" name="srtnWhsId" />
71
+						</div>
72
+						<div class="float_left_btn">
73
+							<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM"><img src="../img/search.png" alt=""></button>
74
+							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_RTN_WHS_NM"><img src="../img/delete.png" alt=""></button>
75
+						</div>
76
+					</div>
89 77
 				</div>
90
-			  </div>
91
-			  <div class="left">
92
-				<div class="nomal">
93
-				  <label>품목 </label>
94
-				  <div class="history">
95
-					<div class="fnItemNm">품목명(EA)</div> 
96
-				  </div>
78
+				<div class="line">
79
+					<label>반품장소</label>
80
+					<div class="search_nm">
81
+						<div class="float_left">
82
+							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-check-required="empty" class="" name="swhsNm" placeholder="매장명" readonly />
83
+							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID" data-check-required="empty" class="" name="swhsId" />
84
+						</div>
85
+						<div class="float_left_btn">
86
+							<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
87
+							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
88
+						</div>
89
+					</div>
97 90
 				</div>
98
-			  </div>
99
-			  <div class="left">
100
-				<div class="nomal">
101
-				  <label class="col_2">반품요청수량</label>
102
-				  <div class="col_5 history">
103
-					<div class="col_5 fnRtnReqQty">10</div>
104
-				  </div>
105
-				  <label class="col_0">반품발주수량</label>
106
-				  <div class="history">
107
-					<input class="" id="ITP_FORM_MRTNMNG05010_LIST_RTN_PODR_QTY" type="text" name="rtnPodrQty">
108
-				  </div>
91
+				<div class="line">
92
+					<label>반품품목명</label>
93
+					<div class="search_wrap">
94
+						<div class="float_left">
95
+							<input id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="A매장명">
96
+						</div>
97
+					</div>
98
+				</div>
99
+				<div class="line" style="height:50px;">
100
+					<div class="search">
101
+						<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
102
+					</div>
103
+				</div>
104
+				<div class="table_header">
105
+					<h1>> 반품서 내역</h1>
109 106
 				</div>
110
-			  </div>
111
-			</li>
112 107
 			</div>
113
-		</div>
114
-		<div class="button_bar">
115
-		  <button id="ITP_BTN_MRTNMNG05010_LIST_" class="btn_col_6 btn-primary INPS">입고처리</button>
116
-		  <button id="ITP_BTN_MRTNMNG05010_LIST_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>
117
-		</div>
108
+		</form>
109
+		<form id="ITP_FORM_MRTNMNG05010_LIST_MODIFY" class="form-horizontal" onsubmit="return false;">
110
+			<div id="ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA" class="scroll_area row-4">
111
+				<ul id="ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWS" class="panel-group"></ul>
112
+				<div id="ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWCOPY" style="display: none;">
113
+					<li class="history_list2 list-row">
114
+						<div class="left">
115
+							<div class="nomal">
116
+								<label>반품번호 </label>
117
+								<div class="history">
118
+									<div class="fnRtnPodrUnqNo"></div>
119
+								</div>
120
+							</div>
121
+						</div>
122
+						<div class="left">
123
+							<div class="nomal">
124
+								<label class="history_label">반품예정일</label>
125
+								<div class="history">
126
+									<div class="fnRtnSchDt history_info"></div>
127
+								</div>
128
+							</div>
129
+						</div>
130
+						<div class="left">
131
+							<div class="nomal">
132
+								<label>공급업체</label>
133
+								<div class="history">
134
+									<div class="history_info fnSpplyNm"></div>
135
+								</div>
136
+								<label class="sub_info">반품장소</label>
137
+								<div class="history">
138
+									<div class="fnRtnWhsNm"></div>
139
+								</div>
140
+							</div>
141
+						</div>
142
+						<div class="left">
143
+							<div class="nomal">
144
+								<label>품목 </label>
145
+								<div class="history">
146
+									<div class="fnItemNm"></div>
147
+								</div>
148
+							</div>
149
+						</div>
150
+						<div class="left">
151
+							<div class="nomal">
152
+								<label class="col_2">반품요청수량</label>
153
+								<div class="col_5 history">
154
+									<div class="col_5 fnRtnReqQty"></div>
155
+								</div>
156
+								<label class="col_0">반품발주수량</label>
157
+								<div class="history">
158
+									<input class="" id="ITP_FORM_MRTNMNG05010_LIST_RTN_PODR_QTY" type="text" name="rtnPodrQty">
159
+								</div>
160
+							</div>
161
+						</div>
162
+					</li>
163
+				</div>
164
+			</div>
165
+			<div class="button_bar">
166
+				<button id="ITP_BTN_MRTNMNG05010_LIST_MODIFY" class="btn_col_6 btn-primary INPS">입고처리</button>
167
+				<!--<button id="ITP_BTN_MRTNMNG05010_LIST_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>-->
168
+			</div>
118 169
 		</form>
119 170
 	</div>
120
-  </section>
171
+	<div id="ITP_MOBILE_JS"></div>
172
+</section>

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

@@ -1,120 +1,162 @@
1 1
 <section id="ITP_MOBILE_MRTNMNG06010">
2
-	<div id="ITP_AJAX_MRTNMNG06010_LIST_CONTAINER" style="display: block;">    
3
-    <form id="ITP_FORM_MRTNMNG06010_LIST" class="form-horizontal" onsubmit="return false;">
4
-  		<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_VIEW_CD" name="viewCd" value="C">
5
-		<div class="content">
6
-	      <div class="line">
7
-			<select id="ITP_FORM_MRTNMNG06010_LIST_RTN_DT" data-select-code="RTN_DT" data-check-required="empty" name="rtnDt">
8
-				<option>반품일자</option>
9
-			</select>	        
10
-			<div class="date_to">
11
-	          <input id="ITP_FORM_MRTNMNG06010_LIST" class="year" type="date">
12
-	          <div class="at">~</div>
13
-	          <input id="ITP_FORM_MRTNMNG06010_LIST" class="year" type="date">
14
-	        </div>
15
-	      </div>
16
-	      <div class="line">
17
-	        <label>반품발주번호</label>
18
-	        <div class="line_right">
19
-	          <input id="ITP_FORM_MRTNMNG06010_LIST_RTN_PODR_NO" name="rtnPodrNo" type="text">
20
-	        </div>
21
-	      </div>
22
-	      <div class="line">
23
-	        <label>반품입고장소</label>
24
-	        <div class="search_wrap">
25
-		        <div class="float_left">
26
-		          <input id="ITP_FORM_MRTNMNG06010_LIST_WHS_NM" name="whsNm" type="text" placeholder="A공급업체명">
27
-		        </div>
28
-		        <div class="float_left_btn">
29
-		          <button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG06010_WHS_NM"><img src="../img/search.png" alt=""></button>
30
-		          <button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
31
-		        </div>
32
-	        </div>
33
-	      </div>
34
-	      <div class="line">
35
-	        <label>반품장소</label>
36
-	        <div class="search_wrap">
37
-		        <div class="float_left">
38
-		          <input id="ITP_FORM_MRTNMNG06010_LIST_WHS_NM" type="text" placeholder="A매장명">
39
-		        </div>
40
-		        <div class="float_left_btn">
41
-		          <button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG06010_WHS_NM"><img src="../img/search.png" alt=""></button>
42
-		          <button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
43
-		        </div>
44
-	        </div>
45
-	      </div>
46
-	      <div class="line">
47
-	        <label>품목명</label>
48
-	        <div class="search_wrap">
49
-		        <div class="float_left">
50
-		          <input id="ITP_FORM_MRTNMNG06010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
51
-		        </div>
52
-	        </div>
53
-	      </div>
54
-	      <div class="line" style="height:50px;">
55
-	        <div class="search">
56
-	          <button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
57
-	        </div>
58
-	      </div>
59
-	      <div class="table_header">
60
-	        <h1>> 반품 내역</h1>
61
-	      </div>
62
-	    </div>
63
-	    <div class="scroll_area row-4">
64
-      	<ul id="ITP_LIST_MRTNMNG06010_LIST_ROWS"></ul>
65
-   		<div id="ITP_LIST_MRTNMNG06010_LIST_ROWCOPY" style="display:none;">
66
-	      <li class="history_list2">
67
-	        <div class="left">
68
-	          <div class="nomal">
69
-	            <label>반품발주번호 </label>
70
-	            <div>
71
-	              <div class="fnRtnPodrNo">202210010000001-0100</div> 
72
-	            </div>
73
-	          </div>
74
-	        </div>
75
-	        <div class="left">
76
-	          <div class="nomal">
77
-	            <label class="fn_label">반품예정일</label>
78
-	            <div>
79
-	              <div class="fn_info fnRtnSchDt">2022.10.03</div>
80
-	            </div>
81
-	          </div>
82
-	        </div>
83
-	        <div class="left">
84
-	          <div class="nomal">
85
-	            <label>공급업체</label>
86
-	            <div>
87
-	              <div class="fnSpplyNm">A공급업체명</div>
88
-	            </div>
89
-	            <label class="sub_info">납품장소</label>
90
-	            <div>
91
-	              <div class="fnWhsNm">A매장내</div>
92
-	            </div>
93
-	          </div>
94
-	        </div>
95
-	        <div class="left">
96
-	          <div class="nomal">
97
-	            <label>품목 </label>
98
-	            <div>
99
-	              <div class="fn">품목명(EA)</div> 
100
-	            </div>
101
-	          </div>
102
-	        </div>
103
-	        <div class="left">
104
-	          <div class="nomal">
105
-	            <label>반품발주수량</label>
106
-	            <div class="col_5">
107
-	              <div class="col_5 fnRtnPodrQty">10</div>
108
-	            </div>
109
-	            <label>반품입고수량</label>
110
-	            <div>
111
-	              <div class="fnRtnWhsQty">10</div>
112
-	            </div>
113
-	          </div>
114
-	        </div>
115
-	      </li>
116
-	      </div>
117
-	    </div>
118
-	    </form>
119
-	  </div>
2
+	<div id="ITP_POP_MRTNMNG06010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
3
+		<div class="pop">
4
+			<div class="header">
5
+				<div class="header_left">
6
+					<label>> 납품장소</label>
7
+				</div>
8
+				<div class="header_right">
9
+					<button type="button" id="ITP_BTN_MRTNMNG06010_POP_WHS_CLOSE"><img src="../img/close.png"></button>
10
+				</div>
11
+			</div>
12
+			<div class="search_bar">
13
+				<form id="ITP_FORM_MRTNMNG06010_POP_WHS" class="form-horizontal" onsubmit="return false;">
14
+					<input type="hidden" id="ITP_FORM_MRTNMNG06010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
15
+					<input type="hidden" id="ITP_FORM_MRTNMNG06010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
16
+					<input id="ITP_FORM_MRTNMNG06010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
17
+					<button id="ITP_BTN_MRTNMNG06010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
18
+				</form>
19
+			</div>
20
+			<div class="search_bar">
21
+				<button id="ITP_BTN_MRTNMNG06010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
22
+			</div>
23
+			<div id="ITP_LIST_MRTNMNG06010_POP_WHS_AREA" class="popup_scroll">
24
+				<ul id="ITP_LIST_MRTNMNG06010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
25
+				<div id="ITP_LIST_MRTNMNG06010_POP_WHS_ROWCOPY" style="display:none;">
26
+					<li class="list-row">
27
+						<div class="scroll_left">
28
+							<div class="fnWhsNm">브랜드 창고 명A</div>
29
+							<div class="fnLocationNm">(상세위치내용)</div>
30
+						</div>
31
+						<div class="scroll_right">
32
+							<button id="ITP_BTN_MRTNMNG06010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
33
+						</div>
34
+					</li>
35
+				</div>
36
+			</div>
37
+		</div>
38
+	</div>
39
+	<div id="ITP_AJAX_MRTNMNG06010_LIST_CONTAINER" >
40
+		<form id="ITP_FORM_MRTNMNG06010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
41
+			<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
42
+			<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
43
+			<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_IDX" name="sidx" value="0">
44
+			<div class="content">
45
+				<div class="line">
46
+					<label>반품일자</label>
47
+					<div class="date_to">
48
+						<input id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
49
+						<div class="at">~</div>
50
+						<input id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
51
+					</div>
52
+				</div>
53
+				<div class="line">
54
+					<label>반품발주번호</label>
55
+					<div class="search_wrap">
56
+						<div class="line_right">
57
+							<input id="ITP_FORM_MRTNMNG06010_LIST_RTN_PODR_UNQ_NO" name="srtnPodrNo" type="text">
58
+						</div>
59
+					</div>
60
+				</div>
61
+				<div class="line">
62
+					<label>반품입고장소</label>
63
+					<div class="search_wrap">
64
+						<div class="float_left">
65
+							<input id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM" name="srtnWhsNm" type="text" placeholder="A공급업체명">
66
+							<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_ID" class="" name="srtnWhsId" />
67
+						</div>
68
+						<div class="float_left_btn">
69
+							<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM" data-call-popup="ITP_POP_MRTNMNG06010_WHS_NM"><img src="../img/search.png" alt=""></button>
70
+							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_RTN_WHS_NM"><img src="../img/delete.png" alt=""></button>
71
+						</div>
72
+					</div>
73
+				</div>
74
+				<div class="line">
75
+					<label>반품장소</label>
76
+					<div class="search_nm">
77
+						<div class="float_left">
78
+							<input type="text" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" placeholder="매장명" readonly />
79
+							<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
80
+						</div>
81
+						<div class="float_left_btn">
82
+							<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
83
+							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
84
+						</div>
85
+					</div>
86
+				</div>
87
+				<div class="line">
88
+					<label>품목명</label>
89
+					<div class="search_wrap">
90
+						<div class="float_left">
91
+							<input id="ITP_FORM_MRTNMNG06010_LIST_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="품목명">
92
+						</div>
93
+					</div>
94
+				</div>
95
+				<div class="line" style="height:50px;">
96
+					<div class="search">
97
+						<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
98
+					</div>
99
+				</div>
100
+				<div class="table_header">
101
+					<h1>> 반품 내역</h1>
102
+				</div>
103
+			</div>
104
+			<div id="ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA" class="scroll_area row-4">
105
+				<ul id="ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWS" class="panel-group"></ul>
106
+				<div id="ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWCOPY" style="display: none;">
107
+					<li class="history_list2 list-row">
108
+						<div class="left">
109
+							<div class="nomal">
110
+								<label>반품발주번호 </label>
111
+								<div class="history">
112
+									<div class="fnRtnPodrNo"></div>
113
+								</div>
114
+							</div>
115
+						</div>
116
+						<div class="left">
117
+							<div class="nomal">
118
+								<label class="history_label">반품예정일</label>
119
+								<div class="history">
120
+									<div class="fn_info fnRtnSchDt"></div>
121
+								</div>
122
+							</div>
123
+						</div>
124
+						<div class="left">
125
+							<div class="nomal">
126
+								<label>공급업체</label>
127
+								<div>
128
+									<div class="fnSpplyNm">A공급업체명</div>
129
+								</div>
130
+								<label class="sub_info">납품장소</label>
131
+								<div>
132
+									<div class="fnWhsNm">A매장내</div>
133
+								<div>
134
+							</div>
135
+						</div>
136
+						<div class="left">
137
+							<div class="nomal">
138
+								<label>품목 </label>
139
+								<div class="history">
140
+									<div class="fnItemNm">품목명(EA)</div>
141
+								</div>
142
+							</div>
143
+						</div>
144
+						<div class="left">
145
+							<div class="nomal">
146
+								<label>반품발주수량</label>
147
+								<div class="history">
148
+									<div class="col_5 fnRtnPodrQty"></div>
149
+								</div>
150
+								<label class="sub_info">반품입고수량</label>
151
+								<div class="history">
152
+									<div class="fnRtnWhsQty">10</div>
153
+								</div>
154
+							</div>
155
+						</div>
156
+					</li>
157
+				</div>
158
+			</div>
159
+		</form>
160
+	</div>
161
+	<div id="ITP_MOBILE_JS"></div>
120 162
 </section>

+ 296 - 0
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG01010.js

@@ -0,0 +1,296 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_GRID_LIST 			= '/api/pomng/po/spply-po-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/po/info-spply-pchOdr';	// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+
13
+const PAGE_MODE_LIST				= "LIST";
14
+const PAGE_MODE_VIEW				= "VIEW";
15
+
16
+let mobPageObj = {
17
+	viewMode: PAGE_MODE_LIST,
18
+	init: function () {
19
+		this.ui.init();
20
+		this.event.init();
21
+		this.ready();
22
+	},
23
+	ui: {
24
+		init: function () {
25
+			this.view();
26
+			this.info();
27
+		},
28
+		view: function() {
29
+			// 공통코드 표시
30
+			$('select').each(function() {
31
+				if($(this).data('select-code')) {
32
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
33
+				}
34
+			});
35
+
36
+			// 조회일자 지정
37
+			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
38
+			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
39
+		},
40
+		info: function() {
41
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
42
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
43
+			$('input:hidden[id$="_SPPLY_ID"]').val(fn_make_user_info.get('userId'));
44
+		}
45
+	},
46
+	event: {
47
+		init: function() {
48
+			this.button();
49
+		},
50
+		button: function() {
51
+			$('button[id^="ITP_BTN_MORDMNG01010_LIST"]').on('click', function() {
52
+				var id = $(this).attr('id');
53
+				switch (id) {
54
+					case 'ITP_BTN_MORDMNG01010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
55
+					case 'ITP_BTN_MORDMNG01010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
56
+					case 'ITP_BTN_MORDMNG01010_LIST_SEARCH'			: mobContentObj.list.search();	break;
57
+				}
58
+				return false;
59
+			});
60
+
61
+			$('button[id^="ITP_BTN_MORDMNG01010_VIEW"]').on('click', function() {
62
+				var id = $(this).attr('id');
63
+				switch (id) {
64
+					case 'ITP_BTN_MORDMNG01010_VIEW_CANCEL_LIST'		: mobContentObj.view.cancel();	break;
65
+				}
66
+				return false;
67
+			});
68
+
69
+			$(document).on('click', '#ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS li', function() {
70
+				var item = mobContentObj.list.rows[$(this).index()];
71
+				mobContentObj.view.init(item);
72
+			});
73
+
74
+			$(document).on('click', '#ITP_LIST_MORDMNG01010_POP_WHS_ROWS li button', function() {
75
+				mobPopObj.popWhsNm.choice($(this));
76
+			});
77
+		}
78
+	},
79
+	switchScreen: function(mode) {
80
+		$('#ITP_MOBILE_MORDMNG01010').find('div[id$="_CONTAINER"]').each(function(i) {
81
+			$(this).hide();
82
+		});
83
+		if(mode === PAGE_MODE_LIST) {
84
+			$('#ITP_AJAX_MORDMNG01010_LIST_CONTAINER').show();
85
+			this.moreView(true);
86
+		} else if(mode === PAGE_MODE_VIEW) {
87
+			$('#ITP_AJAX_MORDMNG01010_VIEW_CONTAINER').show();
88
+			this.moreView(false);
89
+		}
90
+		this.viewMode = mode;
91
+	},
92
+	moreView: function(isScroll) {
93
+		var _this = this;
94
+		if(isScroll) {
95
+			$('#ITP_LIST_MORDMNG01010_LIST_ITEM_AREA').on('scroll', function () {
96
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
97
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
98
+						if(!mobContentObj.list.isSearch) {
99
+							mobContentObj.list.load();
100
+						}
101
+					}
102
+				}
103
+			});
104
+		} else {
105
+			$('#ITP_LIST_MORDMNG01010_LIST_AREA').off('scroll');
106
+		}
107
+	},
108
+	ready: function() {
109
+		mobContentObj.list.init();
110
+	}
111
+};
112
+
113
+let mobContentObj = {
114
+	list: {
115
+		listSize: 10,
116
+		listPage: 0,
117
+		totPage: 0,
118
+		isSearch: false,
119
+		rows: [],
120
+		init: function() {
121
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
122
+			this.search();
123
+		},
124
+		search: function() {
125
+			this.listPage = 0;
126
+			this.totPage = 0;
127
+			this.rows.length = 0;
128
+			$('#ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS').empty();
129
+			this.load();
130
+		},
131
+		load: function() {
132
+			var _this = this;
133
+			this.isSearch = true;
134
+			var callbackFn = function(result) {
135
+				console.log(result);
136
+				_this.isSearch = false;
137
+				_this.totPage = result.gridTotal;
138
+				$.each(result.gridRows, function (i, item) {
139
+					$('#ITP_LIST_MORDMNG01010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MORDMNG01010_LIST_ITEM_ROWCOPY').html());
140
+					var $li = $('#ITP_LIST_MORDMNG01010_LIST_ITEM_AREA .panel-group > .list-row:last');
141
+					$li.find('.fnBrandNm').text(item.brandNm);
142
+					$li.find('.fnPchPodrUnqNo').text(item.pchPodrUnqNo);
143
+					$li.find('.fnPchOdrStNm').text(item.pchOdrStNm);
144
+					$li.find('.fnPodrDt').text(item.podrDt);
145
+					$li.find('.fnDlvReqDt').text(item.dlvReqDt);
146
+					$li.find('.fnWhsNm').text(item.whsNm);
147
+					$li.find('.fnPodrTotalAmt').text(CommonObj.comma.set(item.podrTotalAmt));
148
+					$li.find('.fnPodrItemQty').text(CommonObj.currency.add(item.podrItemQty, '개'));
149
+					_this.rows.push(item);
150
+				});
151
+			};
152
+			var errFn = function() { _this.isSearch = false;};
153
+			const param = $('#ITP_FORM_MORDMNG01010_LIST_SEARCH').serializeObject();
154
+			param.gridPage = ++this.listPage;
155
+			param.gridSize = this.listSize;
156
+			param.fromDt = param.fromDt.replace(/-/g, ".");
157
+			param.toDt = param.toDt.replace(/-/g, ".");
158
+			console.log(JSON.stringify(param));
159
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
160
+		}
161
+	},
162
+	view: {
163
+		init: function(item) {
164
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
165
+			this.search(item);
166
+		},
167
+		search: function(item) {
168
+			var _this = this;
169
+			var callbackFn = function(result) {
170
+				console.log(result);
171
+				_this.view(result);
172
+			};
173
+			const param = {
174
+				'brandId': fn_make_user_info.get('brandId'),
175
+				'spplyId': fn_make_user_info.get('userId'),
176
+				'pchPodrUnqNo': item.pchPodrUnqNo
177
+			};
178
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
179
+		},
180
+		view: function(result) {
181
+			var _this = this;
182
+			var id = '#ITP_AJAX_MORDMNG01010_VIEW_CONTAINER';
183
+			$(id).find('.fnBrandNm').text(result.brandNm);
184
+			$(id).find('.fnPchPodrUnqNo').text(result.pchPodrUnqNo);
185
+			$(id).find('.fnPodrDt').text(result.podrDt);
186
+			$(id).find('.fnPchOdrStNm').text(result.pchOdrStNm);
187
+			$(id).find('.fnWhsNm').text(result.whsNm);
188
+			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrItemQty));
189
+			$(id).find('.fnPodrMgrNm').text(result.podrMgrNm);
190
+			$.each(result.pchOdrDtlList, function (i, item) {
191
+				$('#ITP_LIST_MORDMNG01010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MORDMNG01010_VIEW_ITEM_ROWCOPY').html());
192
+				var $li = $('#ITP_LIST_MORDMNG01010_VIEW_ITEM_AREA .panel-group > .list-row:last');
193
+				$li.find('.fnItemid').text(item.itemId);
194
+				$li.find('.fnItemNm').text(item.itemNm);
195
+				$li.find('.fnUPodrQty').text(item.podrQty);
196
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
197
+				$li.find('.fnUnit').text(item.unit);
198
+				$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
199
+				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
200
+				$li.find('.fnDlvReqDt').text(item.dlvReqDt);
201
+			});
202
+		},
203
+		cancel: function () {
204
+			var id = '#ITP_AJAX_MORDMNG01010_VIEW_CONTAINER';
205
+			$(id).find('.fnItemid').text('');
206
+			$(id).find('.fnItemNm').text('');
207
+			$(id).find('.fnUPodrQty').text('');
208
+			$(id).find('.fnUnitAmt').text('');
209
+			$(id).find('.fnUnit').text('');
210
+			$(id).find('.fnPodrQty').text('');
211
+			$(id).find('.fnPodrAmt').text('');
212
+			$(id).find('.fnDlvReqDt').text('');
213
+			$('#ITP_LIST_MORDMNG01010_VIEW_ITEM_AREA .panel-group').empty();
214
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
215
+		}
216
+	}
217
+};
218
+
219
+let mobPopObj = {
220
+	popWhsNm: {
221
+		popId: 'ITP_POP_MORDMNG01010_WHS_AREA',
222
+		rows: [],
223
+		init: function () {
224
+			this.rows.length = 0;
225
+			mobPopObj.show(this.popId);
226
+			this.search();
227
+			this.action();
228
+		},
229
+		search: function () {
230
+			var _this = this;
231
+			$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .panel-group').empty();
232
+			var callbackFn = function(result) {
233
+				console.log(result);
234
+				_this.view(result.gridRows);
235
+			};
236
+			const param = $('#ITP_FORM_MORDMNG01010_POP_WHS').serializeObject();
237
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
238
+		},
239
+		view: function(gridRows) {
240
+			this.rows = gridRows;
241
+			$.each(gridRows, function (i, item) {
242
+				$('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MORDMNG01010_POP_WHS_ROWCOPY').html());
243
+				var $li = $('#ITP_LIST_MORDMNG01010_POP_WHS_AREA .panel-group > .list-row:last');
244
+				$li.find('.fnWhsNm').text(item.whsNm);
245
+				$li.find('.fnLocationNm').text(item.locationNm);
246
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
247
+			});
248
+		},
249
+		choice: function(elem) {
250
+			var _this = this;
251
+			var whsId = $(elem).data('whs-id');
252
+			$.each(this.rows, function (i, item) {
253
+				if(whsId === item.whsId) {
254
+					$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID').val(item.whsId);
255
+					$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM').val(item.whsNm);
256
+					_this.close();
257
+					return false;
258
+				}
259
+			});
260
+		},
261
+		action: function() {
262
+			var _this = this;
263
+			$('button[id^="ITP_BTN_MORDMNG01010_POP_WHS"]').off('click').on('click', function() {
264
+				var id = $(this).attr('id');
265
+				switch (id) {
266
+					case 'ITP_BTN_MORDMNG01010_POP_WHS_SEARCH'	: _this.search();			break;
267
+					case 'ITP_BTN_MORDMNG01010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
268
+					case 'ITP_BTN_MORDMNG01010_POP_WHS_CLOSE'	: _this.close(); 			break;
269
+				}
270
+				return false;
271
+			});
272
+		},
273
+		delete: function() {
274
+			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_ID').val('');
275
+			$('#ITP_FORM_MORDMNG01010_LIST_SEARCH #ITP_FORM_MORDMNG01010_LIST_SEARCH_WHS_NM').val('');
276
+		},
277
+		close: function() {
278
+			this.rows.length = 0;
279
+			$('#ITP_POP_MORDMNG01010_LIST_WHS_AREA .panel-group').empty();
280
+			$('#ITP_FORM_MORDMNG01010_POP_WHS #ITP_FORM_MORDMNG01010_POP_WHS_KEYWORD').val('');
281
+			mobPopObj.hide(this.popId);
282
+		}
283
+	},
284
+	show: function(popId) {
285
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
286
+			console.log($(this).attr('id'));
287
+			if($(this).hasClass('btn-pop-close')) {
288
+				mobPopObj.hide(popId);
289
+			}
290
+		});
291
+		$('#' + popId).show();
292
+	},
293
+	hide: function(popId) {
294
+		$('#' + popId).closest('.mobile-pop-close').hide();
295
+	}
296
+};

+ 366 - 0
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG02010.js

@@ -0,0 +1,366 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_GRID_LIST 			= '/api/pomng/inoutmng/spply-target-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/inoutmng/init-spply-inv';			// 상세
11
+const API_MOBILE_SAVE 				= '/api/pomng/inoutmng/save-spply-inv';			// 저장
12
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
13
+
14
+const PAGE_MODE_LIST				= "LIST";
15
+const PAGE_MODE_VIEW				= "VIEW";
16
+
17
+let mobPageObj = {
18
+	viewMode: PAGE_MODE_LIST,
19
+	init: function () {
20
+		this.ui.init();
21
+		this.event.init();
22
+		this.ready();
23
+	},
24
+	ui: {
25
+		init: function () {
26
+			this.view();
27
+			this.info();
28
+		},
29
+		view: function() {
30
+			// 공통코드 표시
31
+			$('select').each(function() {
32
+				if($(this).data('select-code')) {
33
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
34
+				}
35
+			});
36
+
37
+			// 조회일자 지정
38
+			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
39
+			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
40
+		},
41
+		info: function() {
42
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
43
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
44
+			$('input:hidden[id$="_SPPLY_ID"]').val(fn_make_user_info.get('userId'));
45
+		}
46
+	},
47
+	event: {
48
+		init: function() {
49
+			this.button();
50
+		},
51
+		button: function() {
52
+			$('button[id^="ITP_BTN_MORDMNG02010_LIST"]').on('click', function() {
53
+				var id = $(this).attr('id');
54
+				switch (id) {
55
+					case 'ITP_BTN_MORDMNG02010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
56
+					case 'ITP_BTN_MORDMNG02010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
57
+					case 'ITP_BTN_MORDMNG02010_LIST_SEARCH'			: mobContentObj.list.search();	break;
58
+				}
59
+				return false;
60
+			});
61
+
62
+			$('button[id^="ITP_BTN_MORDMNG02010_VIEW"]').on('click', function() {
63
+				var id = $(this).attr('id');
64
+				switch (id) {
65
+					case 'ITP_BTN_MORDMNG02010_VIEW_ADD'			: mobContentObj.view.add();	break;
66
+					case 'ITP_BTN_MORDMNG02010_VIEW_CANCEL_LIST'	: mobContentObj.view.cancel();	break;
67
+				}
68
+				return false;
69
+			});
70
+
71
+			$(document).on('click', '#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS li', function() {
72
+				var item = mobContentObj.list.rows[$(this).index()];
73
+				mobContentObj.view.init(item);
74
+			});
75
+
76
+			$(document).on('click', '#ITP_LIST_MORDMNG02010_POP_WHS_ROWS li button', function() {
77
+				mobPopObj.popWhsNm.choice($(this));
78
+			});
79
+		}
80
+	},
81
+	switchScreen: function(mode) {
82
+		$('#ITP_MOBILE_MORDMNG02010').find('div[id$="_CONTAINER"]').each(function(i) {
83
+			$(this).hide();
84
+		});
85
+		if(mode === PAGE_MODE_LIST) {
86
+			$('#ITP_AJAX_MORDMNG02010_LIST_CONTAINER').show();
87
+			this.moreView(true);
88
+		} else if(mode === PAGE_MODE_VIEW) {
89
+			$('#ITP_AJAX_MORDMNG02010_VIEW_CONTAINER').show();
90
+			this.moreView(false);
91
+		}
92
+		this.viewMode = mode;
93
+	},
94
+	moreView: function(isScroll) {
95
+		var _this = this;
96
+		if(isScroll) {
97
+			$('#ITP_LIST_MORDMNG02010_LIST_ITEM_AREA').on('scroll', function () {
98
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
99
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
100
+						if(!mobContentObj.list.isSearch) {
101
+							mobContentObj.list.load();
102
+						}
103
+					}
104
+				}
105
+			});
106
+		} else {
107
+			$('#ITP_LIST_MORDMNG02010_LIST_AREA').off('scroll');
108
+		}
109
+	},
110
+	ready: function() {
111
+		mobContentObj.list.init();
112
+	}
113
+};
114
+
115
+let mobContentObj = {
116
+	list: {
117
+		listSize: 10,
118
+		listPage: 0,
119
+		totPage: 0,
120
+		isSearch: false,
121
+		rows: [],
122
+		init: function() {
123
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
124
+			this.search();
125
+		},
126
+		search: function() {
127
+			this.listPage = 0;
128
+			this.totPage = 0;
129
+			this.rows.length = 0;
130
+			$('#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS').empty();
131
+			this.load();
132
+		},
133
+		load: function() {
134
+			var _this = this;
135
+			this.isSearch = true;
136
+			var callbackFn = function(result) {
137
+				console.log(result);
138
+				_this.isSearch = false;
139
+				_this.totPage = result.gridTotal;
140
+				$.each(result.gridRows, function (i, item) {
141
+					$('#ITP_LIST_MORDMNG02010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWCOPY').html());
142
+					var $li = $('#ITP_LIST_MORDMNG02010_LIST_ITEM_AREA .panel-group > .list-row:last');
143
+					$li.find('.fnBrandNm').text(item.brandNm);
144
+					$li.find('.fnPchPodrUnqNo').text(item.pchPodrUnqNo);
145
+					$li.find('.fnPchPodrDtlNo').text(item.pchPodrDtlNo);
146
+					$li.find('.fnDlvReqDt').text(item.dlvReqDt);
147
+					$li.find('.fnWhsNm').text(item.whsNm);
148
+					$li.find('.fnPodrDt').text(item.podrDt);
149
+					$li.find('.fnItemId').text(item.itemId);
150
+					$li.find('.fnItemNm').text(item.itemNm);
151
+					$li.find('.fnPodrQty').text(CommonObj.currency.add(item.podrQty, '개'));
152
+					$li.find('.fnUnitAmt').text(CommonObj.comma.set(item.unitAmt));
153
+					$li.find('.fnPodrAmt').text(CommonObj.comma.set(item.podrAmt));
154
+					_this.rows.push(item);
155
+				});
156
+			};
157
+			var errFn = function() { _this.isSearch = false;};
158
+			const param = $('#ITP_FORM_MORDMNG02010_LIST_SEARCH').serializeObject();
159
+			param.gridPage = ++this.listPage;
160
+			param.gridSize = this.listSize;
161
+			param.fromDt = param.fromDt.replace(/-/g, ".");
162
+			param.toDt = param.toDt.replace(/-/g, ".");
163
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
164
+		}
165
+	},
166
+	view: {
167
+		rows: [],
168
+		init: function(item) {
169
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
170
+			this.search(item);
171
+		},
172
+		search: function(item) {
173
+			var _this = this;
174
+			var callbackFn = function(result) {
175
+				console.log(result);
176
+				_this.view(result);
177
+			};
178
+			const param = {
179
+				'brandId': fn_make_user_info.get('brandId'),
180
+				'spplyId': fn_make_user_info.get('userId'),
181
+				'pchPodrUnqNo': item.pchPodrUnqNo
182
+			};
183
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
184
+		},
185
+		view: function(result) {
186
+			var _this = this;
187
+			var id = '#ITP_AJAX_MORDMNG02010_VIEW_CONTAINER';
188
+			$(id).find('.fnBrandNm').text(result.brandNm);
189
+			$(id).find('.fnPchPodrUnqNo').text(result.pchPodrUnqNo);
190
+			$(id).find('.fnDlvRegDt').text(result.dlvReqDt);
191
+			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrTotalAmt));
192
+			$(id).find('.fnWhsNm').text(result.whsNm);
193
+			$(id).find('.fnDeliTelNo').text(result.deliTelNo);
194
+			$.each(result.invPoInfoList, function (i, item) {
195
+				$('#ITP_LIST_MORDMNG02010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MORDMNG02010_VIEW_ITEM_ROWCOPY').html());
196
+				var $li = $('#ITP_LIST_MORDMNG02010_VIEW_ITEM_AREA .panel-group > .list-row:last');
197
+				$li.find('.fnPchPodrDtlNo').text(item.pchPodrDtlNo);
198
+				$li.find('.fnItemId').text(item.itemId);
199
+				$li.find('.fnItemNm').text(item.itemNm);
200
+				$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
201
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
202
+				$li.find('.fnUnit').text(item.unit);
203
+				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
204
+				$li.find('.fnDlvReqDt').text(item.dlvReqDt);
205
+				_this.rows.push(item);
206
+			});
207
+		},
208
+		add: function() {
209
+			var _this = this;
210
+			var param = {};
211
+			var dlvSchDt = $('#ITP_AJAX_MORDMNG02010_VIEW_CONTAINER #ITP_FORM_MORDMNG02010_VIEW_DLV_SCH_DT').val();
212
+			var dlvMgrNm = $('#ITP_AJAX_MORDMNG02010_VIEW_CONTAINER #ITP_FORM_MORDMNG02010_VIEW_DLV_MGR_NM').val();
213
+			var dlvMgrTelNo = $('#ITP_AJAX_MORDMNG02010_VIEW_CONTAINER #ITP_FORM_MORDMNG02010_VIEW_DLV_MGR_TEL_NO').val();
214
+			if(dlvSchDt.length < 1) {
215
+				alert('납품일자를 입력해 주세요.');
216
+				return false;
217
+			}
218
+			if(dlvMgrNm.length < 1) {
219
+				alert('발주담당자를 입력해 주세요.');
220
+				return false;
221
+			}
222
+			if(dlvMgrTelNo.length < 1) {
223
+				alert('발주담당자 연락처를 입력해 주세요.');
224
+				return false;
225
+			}
226
+			var gridInsertData = [];
227
+			var isValid = false;
228
+			$('#ITP_LIST_MORDMNG02010_VIEW_ITEM_AREA .panel-group > .list-row').each(function(index) {
229
+				var row = _this.rows[index];
230
+				var item = {
231
+					'pchPodrDtlNo': row.pchPodrDtlNo,
232
+					'pchPodrUnqNo': row.pchPodrUnqNo,
233
+					'shmtQty': $(this).find('#ITP_FORM_MORDMNG02010_VIEW_SHMT_QTY').val(),
234
+					'expryDate': $(this).find('#ITP_FORM_MORDMNG02010_VIEW_EXPRY_DATE').val(),
235
+					'deliDesc': $(this).find('#ITP_FORM_MORDMNG02010_VIEW_DELI_DESC').val()
236
+				};
237
+				if(row.expryYn === 'Y' && item.expryDate.length < 1) {
238
+					alert('유통기한을 입력해 주세요.');
239
+					return false;
240
+				}
241
+				if(item.shmtQty.length < 1) {
242
+					alert('납품수량을 입력해 주세요.');
243
+					return false;
244
+				}
245
+				if(row.podrQty < item.shmtQty) {
246
+					alert('납품수량은 발주수량을 초과할 수 없습니다.');
247
+					return false;
248
+				}
249
+				item.expryDate = item.expryDate.replace(/-/g, ".");
250
+				gridInsertData.push(item);
251
+				isValid = true;
252
+			});
253
+			if(isValid) {
254
+				param['viewCd'] = 'C';
255
+				param['brandId'] = fn_make_user_info.get('brandId');
256
+				param['spplyId'] = fn_make_user_info.get('userId');
257
+				param['dlvSchDt'] = dlvSchDt.replace(/-/g, ".");
258
+				param['dlvMgrNm'] = dlvMgrNm;
259
+				param['dlvMgrTelNo'] = dlvMgrTelNo;
260
+				param['gridInsertData'] = gridInsertData;
261
+				console.log(JSON.stringify(param));
262
+				var callbackFn = function(result) {
263
+					console.log(result);
264
+					_this.cancel();
265
+				};
266
+				fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), callbackFn, 'POST');
267
+			}
268
+		},
269
+		cancel: function () {
270
+			var id = '#ITP_AJAX_MORDMNG02010_VIEW_CONTAINER';
271
+			$(id + ' #ITP_FORM_MORDMNG02010_VIEW_DLV_SCH_DT').val('');
272
+			$(id + ' #ITP_FORM_MORDMNG02010_VIEW_DLV_MGR_NM').val('');
273
+			$(id + ' #ITP_FORM_MORDMNG02010_VIEW_DLV_MGR_TEL_NO').val('');
274
+			$(id).find('.fnPchPodrDtlNo').text('');
275
+			$(id).find('.fnItemid').text('');
276
+			$(id).find('.fnItemNm').text('');
277
+			$(id).find('.fnUPodrQty').text('');
278
+			$(id).find('.fnUnitAmt').text('');
279
+			$(id).find('.fnUnit').text('');
280
+			$(id).find('.fnPodrQty').text('');
281
+			$(id).find('.fnPodrAmt').text('');
282
+			$(id).find('.fnDlvReqDt').text('');
283
+			$('#ITP_LIST_MORDMNG02010_VIEW_ITEM_AREA .panel-group').empty();
284
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
285
+		}
286
+	}
287
+};
288
+
289
+let mobPopObj = {
290
+	popWhsNm: {
291
+		popId: 'ITP_POP_MORDMNG02010_WHS_AREA',
292
+		rows: [],
293
+		init: function () {
294
+			this.rows.length = 0;
295
+			mobPopObj.show(this.popId);
296
+			this.search();
297
+			this.action();
298
+		},
299
+		search: function () {
300
+			var _this = this;
301
+			$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .panel-group').empty();
302
+			var callbackFn = function(result) {
303
+				console.log(result);
304
+				_this.view(result.gridRows);
305
+			};
306
+			const param = $('#ITP_FORM_MORDMNG02010_POP_WHS').serializeObject();
307
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
308
+		},
309
+		view: function(gridRows) {
310
+			this.rows = gridRows;
311
+			$.each(gridRows, function (i, item) {
312
+				$('#ITP_LIST_MORDMNG02010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MORDMNG02010_POP_WHS_ROWCOPY').html());
313
+				var $li = $('#ITP_LIST_MORDMNG02010_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);
317
+			});
318
+		},
319
+		choice: function(elem) {
320
+			var _this = this;
321
+			var whsId = $(elem).data('whs-id');
322
+			$.each(this.rows, function (i, item) {
323
+				if(whsId === item.whsId) {
324
+					$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID').val(item.whsId);
325
+					$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_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_MORDMNG02010_POP_WHS"]').off('click').on('click', function() {
334
+				var id = $(this).attr('id');
335
+				switch (id) {
336
+					case 'ITP_BTN_MORDMNG02010_POP_WHS_SEARCH'	: _this.search();			break;
337
+					case 'ITP_BTN_MORDMNG02010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
338
+					case 'ITP_BTN_MORDMNG02010_POP_WHS_CLOSE'	: _this.close(); 			break;
339
+				}
340
+				return false;
341
+			});
342
+		},
343
+		delete: function() {
344
+			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_ID').val('');
345
+			$('#ITP_FORM_MORDMNG02010_LIST_SEARCH #ITP_FORM_MORDMNG02010_LIST_SEARCH_WHS_NM').val('');
346
+		},
347
+		close: function() {
348
+			this.rows.length = 0;
349
+			$('#ITP_POP_MORDMNG02010_LIST_WHS_AREA .panel-group').empty();
350
+			$('#ITP_FORM_MORDMNG02010_POP_WHS #ITP_FORM_MORDMNG02010_POP_WHS_KEYWORD').val('');
351
+			mobPopObj.hide(this.popId);
352
+		}
353
+	},
354
+	show: function(popId) {
355
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
356
+			console.log($(this).attr('id'));
357
+			if($(this).hasClass('btn-pop-close')) {
358
+				mobPopObj.hide(popId);
359
+			}
360
+		});
361
+		$('#' + popId).show();
362
+	},
363
+	hide: function(popId) {
364
+		$('#' + popId).closest('.mobile-pop-close').hide();
365
+	}
366
+};

+ 365 - 0
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG03010.js

@@ -0,0 +1,365 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_GRID_LIST 			= '/api/pomng/inoutmng/spply-deli-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/inoutmng/info-inv';				// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+
13
+const PAGE_MODE_LIST				= "LIST";
14
+const PAGE_MODE_VIEW				= "VIEW";
15
+
16
+let mobPageObj = {
17
+	viewMode: PAGE_MODE_LIST,
18
+	init: function () {
19
+		this.ui.init();
20
+		this.event.init();
21
+		this.ready();
22
+	},
23
+	ui: {
24
+		init: function () {
25
+			this.view();
26
+			this.info();
27
+		},
28
+		view: function() {
29
+			// 공통코드 표시
30
+			$('select').each(function() {
31
+				if($(this).data('select-code')) {
32
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
33
+				}
34
+			});
35
+
36
+			// 조회일자 지정
37
+			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
38
+			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
39
+		},
40
+		info: function() {
41
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
42
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
43
+			$('input:hidden[id$="_SPPLY_ID"]').val(fn_make_user_info.get('userId'));
44
+		}
45
+	},
46
+	event: {
47
+		init: function() {
48
+			this.button();
49
+		},
50
+		button: function() {
51
+			$('button[id^="ITP_BTN_MORDMNG03010_LIST"]').on('click', function() {
52
+				var id = $(this).attr('id');
53
+				switch (id) {
54
+					case 'ITP_BTN_MORDMNG03010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
55
+					case 'ITP_BTN_MORDMNG03010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
56
+					case 'ITP_BTN_MORDMNG03010_LIST_SEARCH'			: mobContentObj.list.search();	break;
57
+				}
58
+				return false;
59
+			});
60
+
61
+			$('button[id^="ITP_BTN_MORDMNG03010_VIEW"]').on('click', function() {
62
+				var id = $(this).attr('id');
63
+				switch (id) {
64
+					case 'ITP_BTN_MORDMNG03010_VIEW_ADD'			: mobContentObj.view.add();	break;
65
+					case 'ITP_BTN_MORDMNG03010_VIEW_CANCEL_LIST'	: mobContentObj.view.cancel();	break;
66
+				}
67
+				return false;
68
+			});
69
+
70
+			$(document).on('click', '#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS li', function() {
71
+				var item = mobContentObj.list.rows[$(this).index()];
72
+				mobContentObj.view.init(item);
73
+			});
74
+
75
+			$(document).on('click', '#ITP_LIST_MORDMNG03010_POP_WHS_ROWS li button', function() {
76
+				mobPopObj.popWhsNm.choice($(this));
77
+			});
78
+		}
79
+	},
80
+	switchScreen: function(mode) {
81
+		$('#ITP_MOBILE_MORDMNG03010').find('div[id$="_CONTAINER"]').each(function(i) {
82
+			$(this).hide();
83
+		});
84
+		if(mode === PAGE_MODE_LIST) {
85
+			$('#ITP_AJAX_MORDMNG03010_LIST_CONTAINER').show();
86
+			this.moreView(true);
87
+		} else if(mode === PAGE_MODE_VIEW) {
88
+			$('#ITP_AJAX_MORDMNG03010_VIEW_CONTAINER').show();
89
+			this.moreView(false);
90
+		}
91
+		this.viewMode = mode;
92
+	},
93
+	moreView: function(isScroll) {
94
+		var _this = this;
95
+		if(isScroll) {
96
+			$('#ITP_LIST_MORDMNG03010_LIST_ITEM_AREA').on('scroll', function () {
97
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
98
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
99
+						if(!mobContentObj.list.isSearch) {
100
+							mobContentObj.list.load();
101
+						}
102
+					}
103
+				}
104
+			});
105
+		} else {
106
+			$('#ITP_LIST_MORDMNG03010_LIST_AREA').off('scroll');
107
+		}
108
+	},
109
+	ready: function() {
110
+		mobContentObj.list.init();
111
+	}
112
+};
113
+
114
+let mobContentObj = {
115
+	list: {
116
+		listSize: 10,
117
+		listPage: 0,
118
+		totPage: 0,
119
+		isSearch: false,
120
+		rows: [],
121
+		init: function() {
122
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
123
+			this.search();
124
+		},
125
+		search: function() {
126
+			this.listPage = 0;
127
+			this.totPage = 0;
128
+			this.rows.length = 0;
129
+			$('#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS').empty();
130
+			this.load();
131
+		},
132
+		load: function() {
133
+			var _this = this;
134
+			this.isSearch = true;
135
+			var callbackFn = function(result) {
136
+				console.log(result);
137
+				_this.isSearch = false;
138
+				_this.totPage = result.gridTotal;
139
+				$.each(result.gridRows, function (i, item) {
140
+					$('#ITP_LIST_MORDMNG03010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWCOPY').html());
141
+					var $li = $('#ITP_LIST_MORDMNG03010_LIST_ITEM_AREA .panel-group > .list-row:last');
142
+					$li.find('.fnBrandNm').text(item.brandNm);
143
+					$li.find('.fnPchPodrUnqNo').text(item.pchPodrUnqNo);
144
+					$li.find('.fnPchPodrDtlNo').text(item.pchPodrDtlNo);
145
+					$li.find('.fnDlvReqDt').text(item.dlvReqDt);
146
+					$li.find('.fnWhsNm').text(item.whsNm);
147
+					$li.find('.fnPodrDt').text(item.podrDt);
148
+					$li.find('.fnItemId').text(item.itemId);
149
+					$li.find('.fnItemNm').text(item.itemNm);
150
+					$li.find('.fnPodrQty').text(CommonObj.currency.add(item.podrQty, '개'));
151
+					$li.find('.fnUnitAmt').text(CommonObj.comma.set(item.unitAmt));
152
+					$li.find('.fnPodrAmt').text(CommonObj.comma.set(item.podrAmt));
153
+					_this.rows.push(item);
154
+				});
155
+			};
156
+			var errFn = function() { _this.isSearch = false;};
157
+			const param = $('#ITP_FORM_MORDMNG03010_LIST_SEARCH').serializeObject();
158
+			param.gridPage = ++this.listPage;
159
+			param.gridSize = this.listSize;
160
+			param.fromDt = param.fromDt.replace(/-/g, ".");
161
+			param.toDt = param.toDt.replace(/-/g, ".");
162
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
163
+		}
164
+	},
165
+	view: {
166
+		rows: [],
167
+		init: function(item) {
168
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
169
+			this.search(item);
170
+		},
171
+		search: function(item) {
172
+			var _this = this;
173
+			var callbackFn = function(result) {
174
+				console.log(result);
175
+				_this.view(result);
176
+			};
177
+			const param = {
178
+				'brandId': fn_make_user_info.get('brandId'),
179
+				'spplyId': fn_make_user_info.get('userId'),
180
+				'pchPodrUnqNo': item.pchPodrUnqNo
181
+			};
182
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
183
+		},
184
+		view: function(result) {
185
+			var _this = this;
186
+			var id = '#ITP_AJAX_MORDMNG03010_VIEW_CONTAINER';
187
+			$(id).find('.fnBrandNm').text(result.brandNm);
188
+			$(id).find('.fnPchPodrUnqNo').text(result.pchPodrUnqNo);
189
+			$(id).find('.fnDlvRegDt').text(result.dlvReqDt);
190
+			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrTotalAmt));
191
+			$(id).find('.fnWhsNm').text(result.whsNm);
192
+			$(id).find('.fnDeliTelNo').text(result.deliTelNo);
193
+			$.each(result.invPoInfoList, function (i, item) {
194
+				$('#ITP_LIST_MORDMNG03010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MORDMNG03010_VIEW_ITEM_ROWCOPY').html());
195
+				var $li = $('#ITP_LIST_MORDMNG03010_VIEW_ITEM_AREA .panel-group > .list-row:last');
196
+				$li.find('.fnPchPodrDtlNo').text(item.pchPodrDtlNo);
197
+				$li.find('.fnItemId').text(item.itemId);
198
+				$li.find('.fnItemNm').text(item.itemNm);
199
+				$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
200
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
201
+				$li.find('.fnUnit').text(item.unit);
202
+				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
203
+				$li.find('.fnDlvReqDt').text(item.dlvReqDt);
204
+				_this.rows.push(item);
205
+			});
206
+		},
207
+		add: function() {
208
+			var _this = this;
209
+			var param = {};
210
+			var dlvSchDt = $('#ITP_AJAX_MORDMNG03010_VIEW_CONTAINER #ITP_FORM_MORDMNG03010_VIEW_DLV_SCH_DT').val();
211
+			var dlvMgrNm = $('#ITP_AJAX_MORDMNG03010_VIEW_CONTAINER #ITP_FORM_MORDMNG03010_VIEW_DLV_MGR_NM').val();
212
+			var dlvMgrTelNo = $('#ITP_AJAX_MORDMNG03010_VIEW_CONTAINER #ITP_FORM_MORDMNG03010_VIEW_DLV_MGR_TEL_NO').val();
213
+			if(dlvSchDt.length < 1) {
214
+				alert('납품일자를 입력해 주세요.');
215
+				return false;
216
+			}
217
+			if(dlvMgrNm.length < 1) {
218
+				alert('발주담당자를 입력해 주세요.');
219
+				return false;
220
+			}
221
+			if(dlvMgrTelNo.length < 1) {
222
+				alert('발주담당자 연락처를 입력해 주세요.');
223
+				return false;
224
+			}
225
+			var gridInsertData = [];
226
+			var isValid = false;
227
+			$('#ITP_LIST_MORDMNG03010_VIEW_ITEM_AREA .panel-group > .list-row').each(function(index) {
228
+				var row = _this.rows[index];
229
+				var item = {
230
+					'pchPodrDtlNo': row.pchPodrDtlNo,
231
+					'pchPodrUnqNo': row.pchPodrUnqNo,
232
+					'shmtQty': $(this).find('#ITP_FORM_MORDMNG03010_VIEW_SHMT_QTY').val(),
233
+					'expryDate': $(this).find('#ITP_FORM_MORDMNG03010_VIEW_EXPRY_DATE').val(),
234
+					'deliDesc': $(this).find('#ITP_FORM_MORDMNG03010_VIEW_DELI_DESC').val()
235
+				};
236
+				if(row.expryYn === 'Y' && item.expryDate.length < 1) {
237
+					alert('유통기한을 입력해 주세요.');
238
+					return false;
239
+				}
240
+				if(item.shmtQty.length < 1) {
241
+					alert('납품수량을 입력해 주세요.');
242
+					return false;
243
+				}
244
+				if(row.podrQty < item.shmtQty) {
245
+					alert('납품수량은 발주수량을 초과할 수 없습니다.');
246
+					return false;
247
+				}
248
+				item.expryDate = item.expryDate.replace(/-/g, ".");
249
+				gridInsertData.push(item);
250
+				isValid = true;
251
+			});
252
+			if(isValid) {
253
+				param['viewCd'] = 'C';
254
+				param['brandId'] = fn_make_user_info.get('brandId');
255
+				param['spplyId'] = fn_make_user_info.get('userId');
256
+				param['dlvSchDt'] = dlvSchDt.replace(/-/g, ".");
257
+				param['dlvMgrNm'] = dlvMgrNm;
258
+				param['dlvMgrTelNo'] = dlvMgrTelNo;
259
+				param['gridInsertData'] = gridInsertData;
260
+				console.log(JSON.stringify(param));
261
+				var callbackFn = function(result) {
262
+					console.log(result);
263
+					_this.cancel();
264
+				};
265
+				fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), callbackFn, 'POST');
266
+			}
267
+		},
268
+		cancel: function () {
269
+			var id = '#ITP_AJAX_MORDMNG03010_VIEW_CONTAINER';
270
+			$(id + ' #ITP_FORM_MORDMNG03010_VIEW_DLV_SCH_DT').val('');
271
+			$(id + ' #ITP_FORM_MORDMNG03010_VIEW_DLV_MGR_NM').val('');
272
+			$(id + ' #ITP_FORM_MORDMNG03010_VIEW_DLV_MGR_TEL_NO').val('');
273
+			$(id).find('.fnPchPodrDtlNo').text('');
274
+			$(id).find('.fnItemid').text('');
275
+			$(id).find('.fnItemNm').text('');
276
+			$(id).find('.fnUPodrQty').text('');
277
+			$(id).find('.fnUnitAmt').text('');
278
+			$(id).find('.fnUnit').text('');
279
+			$(id).find('.fnPodrQty').text('');
280
+			$(id).find('.fnPodrAmt').text('');
281
+			$(id).find('.fnDlvReqDt').text('');
282
+			$('#ITP_LIST_MORDMNG03010_VIEW_ITEM_AREA .panel-group').empty();
283
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
284
+		}
285
+	}
286
+};
287
+
288
+let mobPopObj = {
289
+	popWhsNm: {
290
+		popId: 'ITP_POP_MORDMNG03010_WHS_AREA',
291
+		rows: [],
292
+		init: function () {
293
+			this.rows.length = 0;
294
+			mobPopObj.show(this.popId);
295
+			this.search();
296
+			this.action();
297
+		},
298
+		search: function () {
299
+			var _this = this;
300
+			$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .panel-group').empty();
301
+			var callbackFn = function(result) {
302
+				console.log(result);
303
+				_this.view(result.gridRows);
304
+			};
305
+			const param = $('#ITP_FORM_MORDMNG03010_POP_WHS').serializeObject();
306
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
307
+		},
308
+		view: function(gridRows) {
309
+			this.rows = gridRows;
310
+			$.each(gridRows, function (i, item) {
311
+				$('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MORDMNG03010_POP_WHS_ROWCOPY').html());
312
+				var $li = $('#ITP_LIST_MORDMNG03010_POP_WHS_AREA .panel-group > .list-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);
316
+			});
317
+		},
318
+		choice: function(elem) {
319
+			var _this = this;
320
+			var whsId = $(elem).data('whs-id');
321
+			$.each(this.rows, function (i, item) {
322
+				if(whsId === item.whsId) {
323
+					$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID').val(item.whsId);
324
+					$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_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_MORDMNG03010_POP_WHS"]').off('click').on('click', function() {
333
+				var id = $(this).attr('id');
334
+				switch (id) {
335
+					case 'ITP_BTN_MORDMNG03010_POP_WHS_SEARCH'	: _this.search();			break;
336
+					case 'ITP_BTN_MORDMNG03010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
337
+					case 'ITP_BTN_MORDMNG03010_POP_WHS_CLOSE'	: _this.close(); 			break;
338
+				}
339
+				return false;
340
+			});
341
+		},
342
+		delete: function() {
343
+			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_ID').val('');
344
+			$('#ITP_FORM_MORDMNG03010_LIST_SEARCH #ITP_FORM_MORDMNG03010_LIST_SEARCH_WHS_NM').val('');
345
+		},
346
+		close: function() {
347
+			this.rows.length = 0;
348
+			$('#ITP_POP_MORDMNG03010_LIST_WHS_AREA .panel-group').empty();
349
+			$('#ITP_FORM_MORDMNG03010_POP_WHS #ITP_FORM_MORDMNG03010_POP_WHS_KEYWORD').val('');
350
+			mobPopObj.hide(this.popId);
351
+		}
352
+	},
353
+	show: function(popId) {
354
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
355
+			console.log($(this).attr('id'));
356
+			if($(this).hasClass('btn-pop-close')) {
357
+				mobPopObj.hide(popId);
358
+			}
359
+		});
360
+		$('#' + popId).show();
361
+	},
362
+	hide: function(popId) {
363
+		$('#' + popId).closest('.mobile-pop-close').hide();
364
+	}
365
+};

+ 20 - 78
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG06010.js

@@ -51,20 +51,16 @@ let mobPageObj = {
51 51
 			$('button[id^="ITP_BTN_MPOMNG06010_LIST"]').on('click', function() {
52 52
 				var id = $(this).attr('id');
53 53
 				switch (id) {
54
-					case 'ITP_BTN_MPOMNG06010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
55
-					case 'ITP_BTN_MPOMNG06010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
56
-					case 'ITP_BTN_MPOMNG06010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
57
-					case 'ITP_BTN_MPOMNG06010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
58
-					case 'ITP_BTN_MPOMNG06010_LIST_SEARCH'			: mobContentObj.list.search();	break;
59
-					case 'ITP_BTN_MPOMNG06010_LIST_MODIFY'			: mobContentObj.list.save();	break;
54
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init('WHS'); 		break;
55
+					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete('WHS'); 	break;
56
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM'	: mobPopObj.popWhsNm.init('RTN_WHS'); 	break;
57
+					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_RTN_WHS_NM'	: mobPopObj.popWhsNm.delete('RTN_WHS'); break;
58
+					case 'ITP_BTN_MPOMNG06010_LIST_SEARCH'				: mobContentObj.list.search();	break;
59
+					case 'ITP_BTN_MPOMNG06010_LIST_MODIFY'				: mobContentObj.list.save();	break;
60 60
 				}
61 61
 				return false;
62 62
 			});
63 63
 
64
-			$(document).on('click', '#ITP_POP_MPOMNG06010_LIST_SPPLY_ROWS li button', function() {
65
-				mobPopObj.popSpply.choice($(this));
66
-			});
67
-
68 64
 			$(document).on('click', '#ITP_LIST_MPOMNG06010_POP_WHS_ROWS li button', function() {
69 65
 				mobPopObj.popWhsNm.choice($(this));
70 66
 			});
@@ -189,70 +185,6 @@ let mobContentObj = {
189 185
 };
190 186
 
191 187
 let mobPopObj = {
192
-	popSpply: {
193
-		popId: 'ITP_POP_MPOMNG06010_SPPLY_AREA',
194
-		rows: [],
195
-		init: function() {
196
-			this.rows.length = 0;
197
-			mobPopObj.show(this.popId);
198
-			this.search();
199
-			this.action();
200
-		},
201
-		search: function() {
202
-			var _this = this;
203
-			$('#ITP_POP_MPOMNG06010_LIST_SPPLY_AREA .panel-group').empty();
204
-			var callbackFn = function(result) {
205
-				console.log(result);
206
-				_this.view(result.gridRows);
207
-			};
208
-			let param = $('#ITP_FORM_MPOMNG06010_POP_SPPLY_SEARCH').serializeObject();
209
-			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
210
-		},
211
-		view: function(gridRows) {
212
-			this.rows = gridRows;
213
-			$.each(gridRows, function (i, item) {
214
-				$('#ITP_POP_MPOMNG06010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MPOMNG06010_LIST_SPPLY_ROWCOPY').html());
215
-				var $li = $('#ITP_POP_MPOMNG06010_LIST_SPPLY_AREA .panel-group > .list-row:last');
216
-				$li.find('.fnSpplyNm').text(item.spplyNm);
217
-				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
218
-				$li.find('.fnSpplyId').data('item-key', item.spplyId);
219
-			});
220
-		},
221
-		choice: function(elem) {
222
-			var _this = this;
223
-			var spplyId = $(elem).data('item-key');
224
-			$.each(this.rows, function (i, item) {
225
-				if(spplyId === item.spplyId) {
226
-					$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
227
-					$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
228
-					_this.close();
229
-					return false;
230
-				}
231
-			});
232
-		},
233
-		action: function() {
234
-			var _this = this;
235
-			$('button[id^="ITP_BTN_MPOMNG06010_POP_SPPLY"]').off('click').on('click', function() {
236
-				var id = $(this).attr('id');
237
-				switch (id) {
238
-					case 'ITP_BTN_MPOMNG06010_POP_SPPLY_SEARCH'	: _this.search();			break;
239
-					case 'ITP_BTN_MPOMNG06010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
240
-					case 'ITP_BTN_MPOMNG06010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
241
-				}
242
-				return false;
243
-			});
244
-		},
245
-		delete: function() {
246
-			$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_ID').val('');
247
-			$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_NM').val('');
248
-		},
249
-		close: function() {
250
-			this.rows.length = 0;
251
-			$('#ITP_POP_MPOMNG06010_LIST_SPPLY_AREA .panel-group').empty();
252
-			$('#ITP_FORM_MPOMNG06010_POP_SPPLY_SEARCH #ITP_FORM_MPOMNG06010_POP_SPPLY_KEYWORD').val('');
253
-			mobPopObj.hide(this.popId);
254
-		}
255
-	},
256 188
 	popWhsNm: {
257 189
 		popId: 'ITP_POP_MPOMNG06010_WHS_AREA',
258 190
 		rows: [],
@@ -287,8 +219,13 @@ let mobPopObj = {
287 219
 			var whsId = $(elem).data('whs-id');
288 220
 			$.each(this.rows, function (i, item) {
289 221
 				if(whsId === item.whsId) {
290
-					$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_ID').val(item.whsId);
291
-					$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_NM').val(item.whsNm);
222
+					if(_this.popMode === 'RTN_WHS') {
223
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_ID').val(item.whsId);
224
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM').val(item.whsNm);
225
+					} else {
226
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID').val(item.whsId);
227
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM').val(item.whsNm);
228
+					}
292 229
 					_this.close();
293 230
 					return false;
294 231
 				}
@@ -307,8 +244,13 @@ let mobPopObj = {
307 244
 			});
308 245
 		},
309 246
 		delete: function() {
310
-			$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_ID').val('');
311
-			$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_NM').val('');
247
+			if(_this.popMode === 'RTN_WHS') {
248
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_ID').val('');
249
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM').val('');
250
+			} else {
251
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID').val('');
252
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM').val('');
253
+			}
312 254
 		},
313 255
 		close: function() {
314 256
 			this.rows.length = 0;

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

@@ -0,0 +1,374 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_INIT_INFO	= '/api/rtnmng/init-rtnReq';
10
+const API_MOBILE_SAVE		= '/api/rtnmng/save-rtnReq';
11
+const API_POP_SEARCH_LIST	= '/api/whs/mng/pop-whs-search';
12
+const API_POP_ITEM_LIST 	= '/api/item/pop-grid-list';
13
+
14
+const ID_ITP_POP_MRTNMNG01010_REQ_AREA 		= "ITP_POP_MRTNMNG01010_REQ_AREA";
15
+const ID_ITP_POP_MRTNMNG01010_WHS_AREA 		= "ITP_POP_MRTNMNG01010_WHS_AREA";
16
+const ID_ITP_POP_MRTNMNG01010_ITEM_AREA 	= "ITP_POP_MRTNMNG01010_ITEM_AREA";
17
+
18
+const RTN_REQ_ST_CD_TEMP_SAVE		="PR00";
19
+const RTN_REQ_ST_CD_REQUEST_SAVE	="PR20";
20
+
21
+let mobPageObj = {
22
+	isPrevPage: false,
23
+	pageParam: null,
24
+	init: function () {
25
+		this.ui.init();
26
+		this.event.init();
27
+		this.ready();
28
+	},
29
+	ui: {
30
+		init: function () {
31
+			this.info();
32
+			this.view();
33
+		},
34
+		info: function() {
35
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
36
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
37
+		},
38
+		view: function() {
39
+			// 조회일자 지정
40
+			$('#ITP_FORM_MRTNMNG01010_DETAIL_DLV_REQ_DT').val(itp_fn_date_add('M', 0));
41
+		}
42
+	},
43
+	event: {
44
+		init: function() {
45
+			this.button();
46
+		},
47
+		button: function() {
48
+			$('button[id^="ITP_BTN_MRTNMNG01010_DETAIL"]').on('click', function() {
49
+				if($(this).is('[data-call-popup]')) {
50
+					mobPopObj.show($(this).data('call-popup'), $(this).attr('id'));
51
+				} else {
52
+					var id = $(this).attr('id');
53
+					switch (id) {
54
+						case 'ITP_BTN_MRTNMNG01010_DETAIL_DELROW'		: mobContObj.list.delRow(); 		break;
55
+						case 'ITP_BTN_MRTNMNG01010_DETAIL_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 		break;
56
+						case 'ITP_BTN_MRTNMNG01010_DETAIL_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete();		break;
57
+						case 'ITP_BTN_MRTNMNG01010_DETAIL_CANCEL'		: mobContObj.cancel();				break;
58
+					}
59
+				}
60
+				return false;
61
+			});
62
+		}
63
+	},
64
+	ready: function() {
65
+		mobContObj.init();
66
+	}
67
+};
68
+
69
+let mobContObj = {
70
+	init: function() {
71
+		this.button();
72
+		this.data.load();
73
+	},
74
+	button: function() {
75
+		var _this = this;
76
+		$(document).on('click', '.DETAIL_ITEM_PLUS', function() {
77
+			_this.list.actPlus($(this));
78
+		});
79
+		$(document).on('click', '.DETAIL_ITEM_MINUS', function() {
80
+			_this.list.actMinus($(this));
81
+		});
82
+	},
83
+	data: {
84
+		initPchReq: null,
85
+		load: function() {
86
+			var _this = this;
87
+			var callbackFn = function(result) {
88
+				console.log(result);
89
+				_this.initPchReq = result;
90
+				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_BRAND_ID').val(result.brandId);
91
+				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_STORE_ID').val(result.storeId);
92
+				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_RTN_LOCATION').val(result.rtnLocation);
93
+				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_RTN_WHS_ID').val(result.rtnWhsId);
94
+				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_WHS_DVSN').val(result.whsDvsn);
95
+			};
96
+			const param = {brandId:fn_make_user_info.get('brandId'), storeId:fn_make_user_info.get('storeId')};
97
+			fn_ajax_call(API_MOBILE_INIT_INFO, param, callbackFn, 'GET');
98
+		}
99
+	},
100
+	list: {
101
+		rows: [],
102
+		addRow: function() {
103
+		},
104
+		delRow: function() {
105
+			this.detachRow();
106
+		},
107
+		attachRow: function (item) {
108
+			console.log(item);
109
+			var fnIsExist = function(rows) {
110
+				var isExist = false;
111
+				$.each(rows, function(i, row) {
112
+					if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
113
+						isExist = true;
114
+						return false;
115
+					}
116
+				});
117
+				return isExist;
118
+			};
119
+			if(!fnIsExist(this.rows)) {
120
+				this.rows.push(item);
121
+				$('#ITP_LIST_MRTNMNG01010_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG01010_DETAIL_ROWCOPY').html());
122
+				var $li = $('#ITP_LIST_MRTNMNG01010_ITEM_AREA .panel-group > .row_2:last');
123
+				$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
124
+				$li.find('.fnItemNm').text(item.itemNm);
125
+				$li.find('.fnPchReqQty').text(item.pchReqQty);
126
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
127
+				this.pchReqAmtTot();
128
+			}
129
+		},
130
+		detachRow: function () {
131
+			if($('#ITP_LIST_MRTNMNG01010_ITEM_AREA input:checkbox[name=brandUnitUnqNo]:checked').length > 0) {
132
+				var _this = this;
133
+				$('#ITP_LIST_MRTNMNG01010_DETAIL_ROWS li').each(function(index, elem) {
134
+					var isChecked = $(this).find('input[type="checkbox"]').is(':checked');
135
+					if(isChecked) {
136
+						$(this).remove();_this.rows.splice(index, 1);
137
+					}
138
+				});
139
+				this.pchReqAmtTot();
140
+			}
141
+		},
142
+		actPlus: function(elem) {
143
+			var $div = $(elem).siblings('div');
144
+			var num = Number($div.text());
145
+			$($div).text((num + 1).toString());
146
+			this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
147
+			this.pchReqAmtTot();
148
+		},
149
+		actMinus: function(elem) {
150
+			var $div = $(elem).siblings('div');
151
+			var num = Number($div.text());
152
+			if(num <= 1) {
153
+				alert('주문수량을 확인하세요.');
154
+			} else {
155
+				$($div).text((num - 1).toString());
156
+				this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
157
+				this.pchReqAmtTot();
158
+			}
159
+		},
160
+		pchReqAmtTot: function() {
161
+			var reqAmt = 0;
162
+			$.each(this.rows, function(index, item) {
163
+				var qty = item.pchReqQty;
164
+				var amt = item.unitAmt;
165
+				reqAmt += Number(qty) * amt;
166
+			});
167
+			$('#ITP_AJAX_MRTNMNG01010_VIEW_CONTAINER').find('.fnRtnReqAmt').text(CommonObj.currency.add(reqAmt));
168
+		}
169
+	},
170
+	cancel: function () {
171
+		$(location).attr('href', MOBILE_CONTEXTPATH + '/app/main.html');
172
+	}
173
+};
174
+
175
+let mobPopObj = {
176
+	init: function(popId, parentId) {
177
+		switch (popId) {
178
+			case 'ITP_POP_MRTNMNG01010_REQ_AREA'		: this.popReqConfirm.init(parentId); 	break;
179
+			case 'ITP_POP_MRTNMNG01010_WHS_AREA'		: this.popWhsNm.init(); 				break;
180
+			case 'ITP_POP_MRTNMNG01010_ITEM_AREA'	: this.popItem.init();					break;
181
+		}
182
+	},
183
+	popItem: {
184
+		// rows: null,
185
+		init: function() {
186
+			this.search();
187
+		},
188
+		search: function() {
189
+			$('#ITP_LIST_MRTNMNG01010_POP_ITEM_AREA .panel-group').empty();
190
+			var callbackFn = function(result) {
191
+				console.log(result);
192
+				mobPopObj.popItem.rows = result.gridRows;
193
+				$.each(mobPopObj.popItem.rows, function (i, item) {
194
+					$('#ITP_LIST_MRTNMNG01010_POP_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG01010_POP_ITEM_ROWCOPY').html());
195
+					var $li = $('#ITP_LIST_MRTNMNG01010_POP_ITEM_AREA .panel-group > .row_2:last');
196
+					$li.find('#ITP_FORM_MRTNMNG01010_POP_ITEM_CHECKBOX').val(item.itemId);
197
+					$li.find('.fnItemNm').text(item.itemNm);
198
+					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
199
+				});
200
+				mobPopObj.popItem.addRow.init();
201
+			};
202
+			let param = $('#ITP_FORM_MRTNMNG01010_POPUP_ITEM').serializeObject();
203
+			fn_ajax_call(API_POP_ITEM_LIST, JSON.stringify(param), callbackFn, 'POST');
204
+		},
205
+		addRow: {
206
+			init: function() {
207
+				this.button.init();
208
+			},
209
+			button: {
210
+				init: function() {
211
+					var _this = this;
212
+					$('button[id^="ITP_BTN_MRTNMNG01010_POP_ITEM_"]').off('click').on('click', function() {
213
+						var id = $(this).attr('id');
214
+						switch (id) {
215
+							case 'ITP_BTN_MRTNMNG01010_POP_ITEM_PLUS'	: _this.actPlus($(this)); 		break;
216
+							case 'ITP_BTN_MRTNMNG01010_POP_ITEM_MINUS'	: _this.actMinus($(this)); 		break;
217
+							case 'ITP_BTN_MRTNMNG01010_POP_ITEM_ADD'	: _this.actItemAdd($(this)); 	break;
218
+							case 'ITP_BTN_MRTNMNG01010_POP_ITEM_SEARCH'	: mobPopObj.popItem.search(); 	break;
219
+							case 'ITP_BTN_MRTNMNG01010_POP_ITEM_CLOSE'	: mobPopObj.hide(id); 			break;
220
+						}
221
+						return false;
222
+					});
223
+				},
224
+				actPlus: function(elem) {
225
+					var $div = $(elem).siblings('div');
226
+					var num = Number($div.text());
227
+					$($div).text((num + 1).toString());
228
+				},
229
+				actMinus: function(elem) {
230
+					var $div = $(elem).siblings('div');
231
+					var num = Number($div.text());
232
+					if(num <= 1) {
233
+						alert('주문수량을 확인하세요.');
234
+					} else {
235
+						$($div).text((num - 1).toString());
236
+					}
237
+				},
238
+				actItemAdd: function(elem) {
239
+					var index = $(elem).closest('li').index();
240
+					var item = mobPopObj.popItem.rows[index];
241
+					item['pchReqQty'] = $(elem).closest('li').find('.fnPchReqQty').html();
242
+					mobContObj.list.attachRow(item);
243
+				}
244
+			}
245
+		},
246
+		delRow: function() {
247
+
248
+		}
249
+	},
250
+	popWhsNm: {
251
+		init: function () {
252
+			this.rows.length = 0;
253
+			this.search();
254
+			this.action();
255
+		},
256
+		rows: [],
257
+		search: function () {
258
+			var _this = this;
259
+			$('#ITP_LIST_MRTNMNG01010_POP_WHS_AREA .panel-group').empty();
260
+			var callbackFn = function(result) {
261
+				console.log(result);
262
+				_this.view(result.gridRows);
263
+			};
264
+			const param = $('#ITP_FORM_MRTNMNG01010_POP_WHS').serializeObject();
265
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
266
+		},
267
+		view: function(gridRows) {
268
+			this.rows = gridRows;
269
+			$.each(gridRows, function (i, item) {
270
+				$('#ITP_LIST_MRTNMNG01010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MRTNMNG01010_POP_WHS_ROWCOPY').html());
271
+				var $li = $('#ITP_LIST_MRTNMNG01010_POP_WHS_AREA .panel-group > .row_2:last');
272
+				$li.find('.fnWhsNm').text(item.whsNm);
273
+				$li.find('.fnLocationNm').text(item.locationNm);
274
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
275
+			});
276
+		},
277
+		action: function() {
278
+			var _this = this;
279
+			$('#ITP_LIST_MRTNMNG01010_POP_WHS_AREA button[id$="POP_WHS_CHOICE"]').off('click').on('click', function() {
280
+				var whsId = $(this).data('whs-id');
281
+				$.each(_this.rows, function (i, item) {
282
+					if(whsId === item.whsId) {
283
+						$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_WHS_ID').val(item.whsId);
284
+						$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_WHS_NM').val(item.whsNm);
285
+						$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_LOCATION').val(item.location);
286
+						mobPopObj.hide(ID_ITP_POP_MRTNMNG01010_WHS_AREA);
287
+						itp_fn_form_clear_validate(null, '#ITP_FORM_MRTNMNG01010_DETAIL');
288
+						return false;
289
+					}
290
+				});
291
+			});
292
+			$('#ITP_FORM_MRTNMNG01010_POP_WHS button[id="ITP_BTN_MRTNMNG01010_POP_WHS_SEARCH"]').off('click').on('click', function() {
293
+				_this.search();
294
+			});
295
+		},
296
+		delete: function() {
297
+			$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_WHS_ID').val('');
298
+			$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_WHS_NM').val('');
299
+			$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_LOCATION').val('');
300
+		}
301
+	},
302
+	popReqConfirm: {
303
+		init: function (parentId) {
304
+			this.rtnReqStCd = (parentId === 'ITP_BTN_MRTNMNG01010_DETAIL_RTN_ORDER') ? RTN_REQ_ST_CD_REQUEST_SAVE : RTN_REQ_ST_CD_TEMP_SAVE;
305
+			this.view();
306
+			this.action();
307
+		},
308
+		view: function() {
309
+			if(this.rtnReqStCd === RTN_REQ_ST_CD_REQUEST_SAVE) {
310
+				$('#ITP_POP_MRTNMNG01010_RTN_AREA .msg_save').text('빈품요청 하시겠습니까?');
311
+			} else {
312
+				$('#ITP_POP_MRTNMNG01010_RTN_AREA .msg_save').text('임시저장 하시겠습니까?');
313
+			}
314
+			$('#ITP_POP_MRTNMNG01010_RTN_AREA .fnRtnReqDt').text($('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_DLV_REQ_DT').val());
315
+			$('#ITP_POP_MRTNMNG01010_RTN_AREA .fnItemQty').text(CommonObj.currency.add(mobContObj.list.rows.length, '개'));
316
+			$('#ITP_POP_MRTNMNG01010_RTN_AREA .fnRtnAmt').text(CommonObj.currency.add($('#ITP_FORM_MRTNMNG01010_DETAIL .fnRtnReqAmt').text()));
317
+		},
318
+		action: function() {
319
+			var _this = this;
320
+			$('#ITP_POP_MRTNMNG01010_RTN_AREA button[id="ITP_BTN_MRTNMNG01010_POP_RTN_CONFIRM"]').off('click').on('click', function() {
321
+				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_FORM_MRTNMNG01010_DETAIL_RTN_RTN_ST_CD').val(_this.rtnReqStCd);
322
+				_this.save('#ITP_FORM_MRTNMNG01010_DETAIL');
323
+			});
324
+		},
325
+		save: function(formId) {
326
+			let param = $(formId).serializeObject();
327
+
328
+			if (param.loanDvsn !== 'LD03' && this.rtnReqStCd === RTN_REQ_ST_CD_REQUEST_SAVE ) {
329
+				var pchActAtm = $('#ITP_FORM_POMNG01010_DETAIL .fnPchActAmt').text();
330
+				var pchReqAtm = $('#ITP_FORM_POMNG01010_DETAIL .fnPchReqAmt').text();
331
+
332
+				if (parseInt(pchActAtm) < parseInt(pchReqAtm)) {
333
+					alert(ITP_MSG_LOCALE.message.ajax.lackReqAmt);
334
+					return;
335
+				}
336
+			}
337
+
338
+			$.each(mobContObj.list.rows, function(index, item) {
339
+				item['viewCd'] = 'C';
340
+			});
341
+			param.gridInsertData = mobContObj.list.rows;
342
+			param['colReqDt'] = param.colReqDt.replace(/[^0-9]/g, "");
343
+			console.log(JSON.stringify(param));
344
+			var saveFn = function (result) {
345
+				console.log(result);
346
+				mobPopObj.hide('ITP_POP_MRTNMNG01010_RTN_AREA');
347
+			};
348
+			fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), saveFn, 'POST');
349
+		}
350
+	},
351
+	show: function(popId, parentId) {
352
+		var _this = this;
353
+		$('button[id$="CLOSE"]').off('click').on('click', function() {
354
+			var id = $(this).attr('id');
355
+			if($(this).hasClass('btn-pop-close')) {
356
+				_this.hide(id);
357
+			}
358
+		});
359
+		if(parentId === 'ITP_BTN_MRTNMNG01010_DETAIL_RTN_ORDER' || parentId === 'ITP_BTN_MRTNMNG01010_DETAIL_TEMP_SAVE') {
360
+			var formId = '#ITP_FORM_MRTNMNG01010_DETAIL';
361
+			itp_fn_form_clear_validate(null, formId);
362
+			if (itp_fn_form_event.isValid(formId)) {
363
+				$('#' + popId).show();
364
+				mobPopObj.init(popId, parentId);
365
+			}
366
+		} else {
367
+			$('#' + popId).show();
368
+			mobPopObj.init(popId, parentId);
369
+		}
370
+	},
371
+	hide: function(id) {
372
+		$('#' + id).closest('.mobile-pop-close').hide();
373
+	}
374
+};

+ 593 - 0
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG02010.js

@@ -0,0 +1,593 @@
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/detail-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/rtnmng/info-rtnReq';		// 상세
11
+const API_MOBILE_SAVE 				= '/api/rtnmng/save-rtnReq';		// 저장
12
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
13
+const API_POP_ITEM_LIST 			= '/api/item/pop-grid-list';
14
+
15
+const PCH_REQ_ST_CD_TEMP_SAVE		="PR00";
16
+const PCH_REQ_ST_CD_REQUEST_SAVE	="PR20";
17
+
18
+const VIEW_MODE_LIST				= "LIST";
19
+const VIEW_MODE_DETAIL				= "DETAIL";
20
+const VIEW_MODE_MODIFY				= "MODIFY";
21
+
22
+let mobPageObj = {
23
+	viewMode: VIEW_MODE_LIST,
24
+	init: function () {
25
+		this.ui.init();
26
+		this.event.init();
27
+		this.ready();
28
+	},
29
+	ui: {
30
+		init: function () {
31
+			this.view();
32
+			this.info();
33
+			this.action();
34
+		},
35
+		view: function() {
36
+			// 공통코드 표시
37
+			$('select').each(function() {
38
+				if($(this).data('select-code')) {
39
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
40
+				}
41
+			});
42
+
43
+			// 조회일자 지정
44
+			$('#ITP_FORM_MRTNMNG02010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
45
+			$('#ITP_FORM_MRTNMNG02010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
46
+		},
47
+		info: function() {
48
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
49
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
50
+		},
51
+		action: function() {
52
+		}
53
+	},
54
+	event: {
55
+		init: function() {
56
+			this.button();
57
+		},
58
+		button: function() {
59
+			$('button[id^="ITP_BTN_MRTNMNG02010_LIST"]').on('click', function() {
60
+				var id = $(this).attr('id');
61
+				switch (id) {
62
+					case 'ITP_BTN_MRTNMNG02010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(VIEW_MODE_LIST); 		break;
63
+					case 'ITP_BTN_MRTNMNG02010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(VIEW_MODE_LIST); 	break;
64
+					case 'ITP_BTN_MRTNMNG02010_LIST_SEARCH'			: mobContentObj.list.search();					break;
65
+				}
66
+				return false;
67
+			});
68
+
69
+			$('button[id^="ITP_BTN_MRTNMNG02010_DETAIL"]').on('click', function() {
70
+				var id = $(this).attr('id');
71
+				switch (id) {
72
+					case 'ITP_BTN_MRTNMNG02010_DETAIL_CANCEL_LIST'		: mobContentObj.detail.cancel();	break;
73
+				}
74
+				return false;
75
+			});
76
+
77
+			$('button[id^="ITP_BTN_MRTNMNG02010_MODIFY"]').on('click', function() {
78
+				var id = $(this).attr('id');
79
+				switch (id) {
80
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init(VIEW_MODE_MODIFY); 	break;
81
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete(VIEW_MODE_MODIFY); 	break;
82
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_ADD_ROW'			: mobPopObj.popItem.init();						break;
83
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_DEL_ROW'			: mobContentObj.modify.list.detachRow();		break;
84
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_CANCEL'			: mobContentObj.modify.cancel();				break;
85
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_REQ_ORDER'			: mobPopObj.popReqConfirm.init(PCH_REQ_ST_CD_REQUEST_SAVE);	break;
86
+					case 'ITP_BTN_MRTNMNG02010_MODIFY_TEMP_SAVE'			: mobPopObj.popReqConfirm.init(PCH_REQ_ST_CD_TEMP_SAVE);	break;
87
+				}
88
+				return false;
89
+			});
90
+
91
+			$(document).on('click', '#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li button', function() {
92
+				if($(this).hasClass('DETAIL_ITEM_PLUS')) {
93
+					mobContentObj.modify.list.actPlus($(this));
94
+				} else if($(this).hasClass('DETAIL_ITEM_MINUS')) {
95
+					mobContentObj.modify.list.actMinus($(this));
96
+				}
97
+			});
98
+		}
99
+	},
100
+	switchScreen: function(mode) {
101
+		$('#ITP_MOBILE_MRTNMNG02010').find('div[id$="_CONTAINER"]').each(function(i) {
102
+			$(this).hide();
103
+		});
104
+		if(mode === VIEW_MODE_LIST) {
105
+			$('#ITP_AJAX_MRTNMNG02010_LIST_CONTAINER').show();
106
+			this.moreView(true);
107
+		} else if(mode === VIEW_MODE_DETAIL) {
108
+			$('#ITP_AJAX_MRTNMNG02010_DETAIL_CONTAINER').show();
109
+			this.moreView(false);
110
+		} else if(mode === VIEW_MODE_MODIFY) {
111
+			$('#ITP_AJAX_MRTNMNG02010_MODIFY_CONTAINER').show();
112
+			this.moreView(false);
113
+		}
114
+		this.viewMode = mode;
115
+	},
116
+	moreView: function(isScroll) {
117
+		var _this = this;
118
+		if(isScroll) {
119
+			$('#ITP_LIST_MRTNMNG02010_LIST_AREA').on('scroll', function () {
120
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
121
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
122
+						if(!mobContentObj.list.isSearch) {
123
+							mobContentObj.list.load();
124
+						}
125
+					}
126
+				}
127
+			});
128
+		} else {
129
+			$('#ITP_LIST_MRTNMNG02010_LIST_AREA').off('scroll');
130
+		}
131
+	},
132
+	ready: function() {
133
+		mobContentObj.list.init();
134
+	}
135
+};
136
+
137
+let mobContentObj = {
138
+	list: {
139
+		listSize: 10,
140
+		listPage: 0,
141
+		totPage: 0,
142
+		isSearch: false,
143
+		rows: [],
144
+		init: function() {
145
+			mobPageObj.switchScreen(VIEW_MODE_LIST);
146
+			this.search();
147
+			this.action();
148
+		},
149
+		search: function() {
150
+			this.listPage = 0;
151
+			this.totPage = 0;
152
+			this.rows.length = 0;
153
+			$('#ITP_LIST_MRTNMNG02010_LIST_ROWS').empty();
154
+			this.load();
155
+		},
156
+		load: function() {
157
+			var _this = this;
158
+			this.isSearch = true;
159
+			var callbackFn = function(result) {
160
+				console.log(result);
161
+				_this.isSearch = false;
162
+				_this.totPage = result.gridTotal;
163
+				$.each(result.gridRows, function (i, item) {
164
+					$('#ITP_LIST_MRTNMNG02010_LIST_AREA .panel-group').append($('#ITP_LIST_MRTNMNG02010_LIST_ROWCOPY').html());
165
+					var $li = $('#ITP_LIST_MRTNMNG02010_LIST_AREA .panel-group > .list-row:last');
166
+					$li.find('.fnRtnReqDt').text(item.rtnReqDt);
167
+					$li.find('.fnRtnReqMgrNm').text(item.rtnReqMgrNm);
168
+					$li.find('.fnRtnReqStNm').text(item.rtnReqStNm);
169
+					$li.find('.fnRtnWhsNm').text(item.rtnWhsNm);
170
+					$li.find('.fnRtnReqItemQty').text(CommonObj.comma.set(item.rtnReqItemQty));
171
+					$li.find('.fnRtnReqAmt').text(CommonObj.comma.set(item.rtnReqAmt));
172
+					$li.find('.fnRtnReqRjctNm').text(item.pchReqRjctNm);
173
+					_this.rows.push(item);
174
+				});
175
+			};
176
+			var errFn = function() { _this.isSearch = false;};
177
+			const param = $('#ITP_FORM_MRTNMNG02010_LIST_SEARCH').serializeObject();
178
+			param.gridPage = ++this.listPage;
179
+			param.gridSize = this.listSize;
180
+			param.fromDt = param.fromDt.replace(/-/g, ".");
181
+			param.toDt = param.toDt.replace(/-/g, ".");
182
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
183
+		},
184
+		action: function () {
185
+			var _this = this;
186
+			$(document).on('click', '#ITP_LIST_MRTNMNG02010_LIST_ROWS li', function() {
187
+				var index = $(this).index();
188
+				var item = _this.rows[index];
189
+				(item.pchReqStCd === PCH_REQ_ST_CD_TEMP_SAVE) ? mobContentObj.modify.init(item) : mobContentObj.detail.init(item);
190
+			});
191
+		}
192
+	},
193
+	detail: {
194
+		rows: [],
195
+		init: function(item) {
196
+			mobPageObj.switchScreen(VIEW_MODE_DETAIL);
197
+			this.search(item);
198
+		},
199
+		search: function(item) {
200
+			var _this = this;
201
+			var callbackFn = function(result) {
202
+				console.log(result);
203
+				_this.rows = result.pchReqDtlList;
204
+				_this.view(result);
205
+			};
206
+			const param = {'brandId':fn_make_user_info.get('brandId'), 'pchReqUnqNo': item.pchReqUnqNo};
207
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
208
+		},
209
+		view: function(result) {
210
+			var _this = this;
211
+			var id = '#ITP_AJAX_MRTNMNG02010_DETAIL_CONTAINER';
212
+			$(id).find('.fnDlvReqDt').text(result.dlvReqDt);
213
+			$(id).find('.fnRtnReqTotalAmt').text(CommonObj.currency.add(result.pchReqTotalAmt));
214
+			$(id).find('.fnLocationNm').text(result.locationNm);
215
+			$(id).find('.fnRtnApprNm').text('(' + result.pchApprNm + ')' + CommonObj.currency.add(result.pchApprAmt));
216
+			$.each(result.pchReqDtlList, function (i, item) {
217
+				$('#ITP_LIST_MRTNMNG02010_DETAIL_AREA .panel-group').append($('#ITP_LIST_MRTNMNG02010_DETAIL_ROWCOPY').html());
218
+				var $li = $('#ITP_LIST_MRTNMNG02010_DETAIL_AREA .panel-group > .list-row:last');
219
+				$li.find('.fnItemNm').text(item.itemNm);
220
+				$li.find('.fnUnit').text(item.pchReqQty + item.unit);
221
+				$li.find('.fnRtnReqAmt').text(CommonObj.comma.set(item.pchReqAmt));
222
+				$li.find('.fnRtnReqQty').text(CommonObj.currency.add(item.pchReqQty, ''));
223
+				_this.rows.push(item);
224
+			});
225
+		},
226
+		cancel: function () {
227
+			this.rows.length = 0;
228
+			var id = '#ITP_AJAX_MRTNMNG02010_DETAIL_CONTAINER';
229
+			$(id).find('.fnDlvReqDt').text('');
230
+			$(id).find('.fnRtnReqTotalAmt').text('');
231
+			$(id).find('.fnLocationNm').text('');
232
+			$(id).find('.fnRtnApprNm').text('');
233
+			$('#ITP_LIST_MRTNMNG02010_DETAIL_AREA .panel-group').empty();
234
+			mobPageObj.switchScreen(VIEW_MODE_LIST);
235
+		}
236
+	},
237
+	modify: {
238
+		init: function(item) {
239
+			mobPageObj.switchScreen(VIEW_MODE_MODIFY);
240
+			this.clear();
241
+			this.search(item);
242
+		},
243
+		search: function(item) {
244
+			var _this = this;
245
+			var callbackFn = function(result) {
246
+				console.log(result);
247
+				_this.view(result);
248
+			};
249
+			const param = {'brandId':fn_make_user_info.get('brandId'), 'pchReqUnqNo': item.pchReqUnqNo};
250
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
251
+		},
252
+		view: function(result) {
253
+			var _this = this;
254
+			var id = '#ITP_AJAX_MRTNMNG02010_MODIFY_CONTAINER';
255
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_DLV_REQ_DT').val(result.dlvReqDt.replace(/\./g, "-"));
256
+			$(id).find('.fnRtnReqTotalAmt').text(CommonObj.currency.add(result.pchReqTotalAmt));
257
+			$(id).find('.fnOrdUseAmt').text(CommonObj.currency.add(result.ordUseAmt));
258
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOAN_DVSN').val(result.loanDvsn);
259
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOAN_MGNT_UNQ_NO').val(result.loanMgntUnqNo);
260
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_UNQ_NO').val(result.pchReqUnqNo);
261
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_DVSN').val(result.pchReqDvsn);
262
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_NM').val(result.whsNm);
263
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_ID').val(result.whsId);
264
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOCATION').val(result.location);
265
+			_this.list.init(result.pchReqDtlList);
266
+		},
267
+		list: {
268
+			rows: [],
269
+			init: function(pchReqDtlList) {
270
+				var _this = this;
271
+				$.each(pchReqDtlList, function (i, item) {
272
+					item['viewCd'] = 'U';
273
+					_this.attachRow(item);
274
+				});
275
+			},
276
+			attachRow: function (item) {
277
+				var _this = this;
278
+				var append = function() {
279
+					$('#ITP_LIST_MRTNMNG02010_MODIFY_AREA .panel-group').append($('#ITP_LIST_MRTNMNG02010_MODIFY_ROWCOPY').html());
280
+					var $li = $('#ITP_LIST_MRTNMNG02010_MODIFY_AREA .panel-group > .list-row:last');
281
+					$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
282
+					$li.find('.fnItemNm').text(item.itemNm);
283
+					$li.find('.fnRtnReqQty').text(item.pchReqQty);
284
+					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
285
+					_this.pchReqAmtTot();
286
+				};
287
+				var fnChkExist = function() {
288
+					var isExist = false;
289
+					$.each(_this.rows, function(i, row) {
290
+						if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
291
+							if(row.viewCd === 'D') {
292
+								item.viewCd = _this.rows[i].viewCd;
293
+								_this.rows[i] = item;
294
+								append();
295
+							} else {
296
+								alert('이미 존재하는 품목입니다.');
297
+							}
298
+							isExist = true;
299
+							return false;
300
+						}
301
+					});
302
+					if(!isExist) {
303
+						_this.rows.push(item);
304
+						append();
305
+					}
306
+				};
307
+				fnChkExist();
308
+			},
309
+			detachRow: function () {
310
+				if($('#ITP_LIST_MRTNMNG02010_MODIFY_AREA input:checkbox[name=brandUnitUnqNo]:checked').length > 0) {
311
+					var _this = this;
312
+					$('#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li').each(function(index, elem) {
313
+						var isChecked = $(this).find('input[type="checkbox"]').is(':checked');
314
+						if(isChecked) {
315
+							$(this).remove();
316
+							_this.rows[index].viewCd = 'D';
317
+							// _this.rows.splice(index, 1);
318
+						}
319
+					});
320
+					this.pchReqAmtTot();
321
+				}
322
+			},
323
+			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()]['pchReqQty'] = $($div).text();
328
+				this.pchReqAmtTot();
329
+			},
330
+			actMinus: function(elem) {
331
+				var $div = $(elem).siblings('div');
332
+				var num = Number($div.text());
333
+				if(num <= 1) {
334
+					alert('주문수량을 확인하세요.');
335
+				} else {
336
+					$($div).text((num - 1).toString());
337
+					this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
338
+					this.pchReqAmtTot();
339
+				}
340
+			},
341
+			pchReqAmtTot: function() {
342
+				var reqAmt = 0;
343
+				$.each(this.rows, function(index, item) {
344
+					var qty = item.pchReqQty;
345
+					var amt = item.unitAmt;
346
+					reqAmt += Number(qty) * amt;
347
+				});
348
+				$('#ITP_AJAX_MRTNMNG02010_LIST_CONTAINER').find('.fnRtnReqAmtTot').text(CommonObj.currency.add(reqAmt));
349
+			}
350
+		},
351
+		cancel: function () {
352
+			mobPageObj.switchScreen(VIEW_MODE_LIST);
353
+		},
354
+		clear: function() {
355
+			this.list.rows.length = 0;
356
+			var id = '#ITP_AJAX_MRTNMNG02010_MODIFY_CONTAINER';
357
+			$(id).find('.fnDlvReqDt').val('');
358
+			$(id).find('.fnRtnReqTotalAmt').text('');
359
+			$(id).find('.fnOrdUseAmt').text('');
360
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOAN_DVSN').val('');
361
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOAN_MGNT_UNQ_NO').val('');
362
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_UNQ_NO').val('');
363
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_DVSN').val('');
364
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_NM').val('');
365
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_ID').val('');
366
+			$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOCATION').val('');
367
+			$('#ITP_LIST_MRTNMNG02010_MODIFY_AREA .panel-group').empty();
368
+		}
369
+	}
370
+};
371
+
372
+let mobPopObj = {
373
+	popItem: {
374
+		popId: 'ITP_POP_MRTNMNG02010_ITEM_AREA',
375
+		init: function() {
376
+			mobPopObj.show(this.popId);
377
+			this.search();
378
+		},
379
+		search: function() {
380
+			$('#ITP_LIST_MRTNMNG02010_POP_ITEM_AREA .panel-group').empty();
381
+			var callbackFn = function(result) {
382
+				console.log(result);
383
+				mobPopObj.popItem.rows = result.gridRows;
384
+				$.each(mobPopObj.popItem.rows, function (i, item) {
385
+					$('#ITP_LIST_MRTNMNG02010_POP_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG02010_POP_ITEM_ROWCOPY').html());
386
+					var $li = $('#ITP_LIST_MRTNMNG02010_POP_ITEM_AREA .panel-group > .row_2:last');
387
+					$li.find('#ITP_FORM_MRTNMNG02010_POP_ITEM_CHECKBOX').val(item.itemId);
388
+					$li.find('.fnItemNm').text(item.itemNm);
389
+					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
390
+				});
391
+				mobPopObj.popItem.addRow.init();
392
+			};
393
+			let param = $('#ITP_FORM_MRTNMNG02010_POPUP_ITEM').serializeObject();
394
+			fn_ajax_call(API_POP_ITEM_LIST, JSON.stringify(param), callbackFn, 'POST');
395
+		},
396
+		addRow: {
397
+			init: function() {
398
+				this.button.init();
399
+			},
400
+			button: {
401
+				init: function() {
402
+					var _this = this;
403
+					$('button[id^="ITP_BTN_MRTNMNG02010_POP_ITEM_"]').off('click').on('click', function() {
404
+						var id = $(this).attr('id');
405
+						switch (id) {
406
+							case 'ITP_BTN_MRTNMNG02010_POP_ITEM_PLUS'	: _this.actPlus($(this)); 		break;
407
+							case 'ITP_BTN_MRTNMNG02010_POP_ITEM_MINUS'	: _this.actMinus($(this)); 		break;
408
+							case 'ITP_BTN_MRTNMNG02010_POP_ITEM_ADD'		: _this.actItemAdd($(this)); 	break;
409
+							case 'ITP_BTN_MRTNMNG02010_POP_ITEM_SEARCH'	: mobPopObj.popItem.search(); 	break;
410
+							case 'ITP_BTN_MRTNMNG02010_POP_ITEM_CLOSE'	: mobPopObj.hide(id); 			break;
411
+						}
412
+						return false;
413
+					});
414
+				},
415
+				actPlus: function(elem) {
416
+					var $div = $(elem).siblings('div');
417
+					var num = Number($div.text());
418
+					$($div).text((num + 1).toString());
419
+				},
420
+				actMinus: function(elem) {
421
+					var $div = $(elem).siblings('div');
422
+					var num = Number($div.text());
423
+					if(num <= 1) {
424
+						alert('주문수량을 확인하세요.');
425
+					} else {
426
+						$($div).text((num - 1).toString());
427
+					}
428
+				},
429
+				actItemAdd: function(elem) {
430
+					var index = $(elem).closest('li').index();
431
+					var item = mobPopObj.popItem.rows[index];
432
+					item['pchReqQty'] = $(elem).closest('li').find('.fnRtnReqQty').html();
433
+					mobContentObj.modify.list.attachRow(item);
434
+				}
435
+			}
436
+		},
437
+		delRow: function() {
438
+
439
+		}
440
+	},
441
+	popWhsNm: {
442
+		popId: 'ITP_POP_MRTNMNG02010_WHS_AREA',
443
+		mode: '',
444
+		rows: [],
445
+		init: function (mode) {
446
+			this.mode = mode;
447
+			this.rows.length = 0;
448
+			mobPopObj.show(this.popId);
449
+			this.search();
450
+			this.action();
451
+		},
452
+		search: function () {
453
+			var _this = this;
454
+			$('#ITP_LIST_MRTNMNG02010_POP_WHS_AREA .panel-group').empty();
455
+			var callbackFn = function(result) {
456
+				console.log(result);
457
+				_this.view(result.gridRows);
458
+			};
459
+			const param = $('#ITP_FORM_MRTNMNG02010_POP_WHS').serializeObject();
460
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
461
+		},
462
+		view: function(gridRows) {
463
+			this.rows = gridRows;
464
+			$.each(gridRows, function (i, item) {
465
+				$('#ITP_LIST_MRTNMNG02010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MRTNMNG02010_POP_WHS_ROWCOPY').html());
466
+				var $li = $('#ITP_LIST_MRTNMNG02010_POP_WHS_AREA .panel-group > .row_2:last');
467
+				$li.find('.fnWhsNm').text(item.whsNm);
468
+				$li.find('.fnLocationNm').text(item.locationNm);
469
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
470
+			});
471
+		},
472
+		choice: function(elem) {
473
+			var _this = this;
474
+			var whsId = $(elem).data('whs-id');
475
+			$.each(this.rows, function (i, item) {
476
+				if(whsId === item.whsId) {
477
+					if(_this.mode === VIEW_MODE_LIST) {
478
+						$('#ITP_FORM_MRTNMNG02010_LIST_SEARCH #ITP_FORM_MRTNMNG02010_LIST_SEARCH_WHS_ID').val(item.whsId);
479
+						$('#ITP_FORM_MRTNMNG02010_LIST_SEARCH #ITP_FORM_MRTNMNG02010_LIST_SEARCH_WHS_NM').val(item.whsNm);
480
+					} else if(_this.mode === VIEW_MODE_MODIFY) {
481
+						$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_ID').val(item.whsId);
482
+						$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_NM').val(item.whsNm);
483
+						$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOCATION').val(item.location);
484
+					}
485
+					mobPopObj.hide(_this.popId);
486
+					return false;
487
+				}
488
+			});
489
+		},
490
+		action: function() {
491
+			var _this = this;
492
+			$('button[id^="ITP_BTN_MRTNMNG02010_POP"]').off('click').on('click', function() {
493
+				var id = $(this).attr('id');
494
+				switch (id) {
495
+					case 'ITP_BTN_MRTNMNG02010_POP_WHS_SEARCH'	: _this.search();				break;
496
+					case 'ITP_BTN_MRTNMNG02010_POP_WHS_CHOICE'	: _this.choice($(this)); 		break;
497
+					case 'ITP_BTN_MRTNMNG02010_POP_WHS_CLOSE'	: mobPopObj.hide(_this.popId);	break;
498
+				}
499
+				return false;
500
+			});
501
+		},
502
+		delete: function(mode) {
503
+			if(mode === VIEW_MODE_LIST) {
504
+				$('#ITP_FORM_MRTNMNG02010_LIST_SEARCH #ITP_FORM_MRTNMNG02010_LIST_SEARCH_WHS_ID').val('');
505
+				$('#ITP_FORM_MRTNMNG02010_LIST_SEARCH #ITP_FORM_MRTNMNG02010_LIST_SEARCH_WHS_NM').val('');
506
+			} else if(mode === VIEW_MODE_MODIFY) {
507
+				$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_ID').val('');
508
+				$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_WHS_NM').val('');
509
+				$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_LOCATION').val('');
510
+				mobPopObj.hide(ID_ITP_POP_MRTNMNG02010_WHS_AREA);
511
+			}
512
+		}
513
+	},
514
+	popReqConfirm: {
515
+		popId: 'ITP_POP_MRTNMNG02010_REQ_AREA',
516
+		pchReqStCd: '',
517
+		init: function (pchReqStCd) {
518
+			this.pchReqStCd = pchReqStCd;
519
+			mobPopObj.show(this.popId);
520
+			this.view();
521
+			this.action();
522
+		},
523
+		view: function() {
524
+			if(this.pchReqStCd === PCH_REQ_ST_CD_REQUEST_SAVE) {
525
+				$('#ITP_POP_MRTNMNG02010_REQ_AREA .msg_save').text('구매요청 하시겠습니까?');
526
+			} else {
527
+				$('#ITP_POP_MRTNMNG02010_REQ_AREA .msg_save').text('임시저장 하시겠습니까?');
528
+			}
529
+			$('#ITP_POP_MRTNMNG02010_REQ_AREA .fnPopDlvReqDt').text($('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_DLV_REQ_DT').val());
530
+			$('#ITP_POP_MRTNMNG02010_REQ_AREA .fnItemQty').text(CommonObj.currency.add(mobContentObj.modify.list.rows.length, '개'));
531
+			$('#ITP_POP_MRTNMNG02010_REQ_AREA .fnOrdAmt').text(CommonObj.currency.add($('#ITP_FORM_MRTNMNG02010_MODIFY .fnRtnReqTotalAmt').text()));
532
+		},
533
+		action: function() {
534
+			var _this = this;
535
+			$('#ITP_POP_MRTNMNG02010_REQ_AREA button[id="ITP_BTN_MRTNMNG02010_POP_REQ_CONFIRM"]').off('click').on('click', function() {
536
+				$('#ITP_FORM_MRTNMNG02010_MODIFY #ITP_FORM_MRTNMNG02010_MODIFY_PCH_REQ_ST_CD').val(_this.pchReqStCd);
537
+				_this.save('#ITP_FORM_MRTNMNG02010_MODIFY');
538
+			});
539
+		},
540
+		save: function(formId) {
541
+			var _this = this;
542
+			let param = $(formId).serializeObject();
543
+
544
+			if (param.loanDvsn !== 'LD03' && this.pchReqStCd === PCH_REQ_ST_CD_REQUEST_SAVE ) {
545
+				var ordUseAmt = $('#ITP_FORM_MRTNMNG02010_MODIFY .fnOrdUseAmt').text();
546
+				var pchReqTotalAmt = $('#ITP_FORM_MRTNMNG02010_DETAIL .fnRtnReqTotalAmt').text();
547
+
548
+				if (parseInt(CommonObj.onlyNumber(ordUseAmt)) < parseInt(CommonObj.onlyNumber(pchReqTotalAmt))) {
549
+					alert(ITP_MSG_LOCALE.message.ajax.lackReqAmt);
550
+					return;
551
+				}
552
+			}
553
+
554
+			var gridInsertData = [];
555
+			var gridUpdateData = [];
556
+			var gridDeleteData = [];
557
+			$.each(mobContentObj.modify.list.rows, function(index, item) {
558
+				item['pchReqUnqNo'] = param.pchReqUnqNo;
559
+				if(item.viewCd === 'R' || item.viewCd === 'C' ) {
560
+					item['viewCd'] = 'C';
561
+					gridInsertData.push(item);
562
+				} else if(item.viewCd === 'U') {
563
+					gridUpdateData.push(item);
564
+				} else if(item.viewCd === 'D') {
565
+					gridDeleteData.push(item);
566
+				}
567
+			});
568
+			param['dlvReqDt'] = param.dlvReqDt.replace(/[^0-9]/g, "");
569
+			param.gridInsertData = gridInsertData;
570
+			param.gridUpdateData = gridUpdateData;
571
+			param.gridDeleteData = gridDeleteData;
572
+			console.log(JSON.stringify(param));
573
+			var saveFn = function (result) {
574
+				console.log(result);
575
+				mobPopObj.hide(_this.popId);
576
+				mobContentObj.list.init();
577
+			};
578
+			fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), saveFn, 'POST');
579
+		}
580
+	},
581
+	show: function(popId) {
582
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
583
+			if($(this).hasClass('btn-pop-close')) {
584
+				mobPopObj.hide(popId);
585
+			}
586
+		});
587
+		$('#' + popId).show();
588
+	},
589
+	hide: function(popId) {
590
+		$('#' + popId).hide();
591
+		// $('#' + popId).closest('.mobile-pop-close').hide();
592
+	}
593
+};

+ 361 - 0
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG04010.js

@@ -0,0 +1,361 @@
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/detail-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/rtnmng/rtn/info-rtnOdr';		// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+const API_POP_ITEM_LIST 			= '/api/item/pop-grid-list';
13
+const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
14
+
15
+const PAGE_MODE_LIST				= "LIST";
16
+const PAGE_MODE_VIEW				= "VIEW";
17
+
18
+let mobPageObj = {
19
+	viewMode: PAGE_MODE_LIST,
20
+	init: function () {
21
+		this.ui.init();
22
+		this.event.init();
23
+		this.ready();
24
+	},
25
+	ui: {
26
+		init: function () {
27
+			this.view();
28
+			this.info();
29
+		},
30
+		view: function() {
31
+			// 공통코드 표시
32
+			$('select').each(function() {
33
+				if($(this).data('select-code')) {
34
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
35
+				}
36
+			});
37
+
38
+			// 조회일자 지정
39
+			$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
40
+			$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
41
+		},
42
+		info: function() {
43
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
44
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
45
+		}
46
+	},
47
+	event: {
48
+		init: function() {
49
+			this.button();
50
+		},
51
+		button: function() {
52
+			$('button[id^="ITP_BTN_MRTNMNG04010_LIST"]').on('click', function() {
53
+				var id = $(this).attr('id');
54
+				switch (id) {
55
+					case 'ITP_BTN_MRTNMNG04010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init('WHS'); 			break;
56
+					case 'ITP_BTN_MRTNMNG04010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete('WHS'); 		break;
57
+					case 'ITP_BTN_MRTNMNG04010_LIST_SEARCH_RTN_WHS_NM'	: mobPopObj.popWhsNm.init('RTN_WHS'); 		break;
58
+					case 'ITP_BTN_MRTNMNG04010_LIST_DELETE_RTN_WHS_NM'	: mobPopObj.popWhsNm.delete('RTN_WHS'); 	break;
59
+					case 'ITP_BTN_MRTNMNG04010_LIST_SEARCH'				: mobContentObj.list.search();	break;
60
+				}
61
+				return false;
62
+			});
63
+
64
+			$('button[id^="ITP_BTN_MRTNMNG04010_VIEW"]').on('click', function() {
65
+				var id = $(this).attr('id');
66
+				switch (id) {
67
+					case 'ITP_BTN_MRTNMNG04010_VIEW_CANCEL_LIST'		: mobContentObj.view.cancel();	break;
68
+				}
69
+				return false;
70
+			});
71
+
72
+			$(document).on('click', '#ITP_LIST_MRTNMNG04010_LIST_ITEM_ROWS li', function() {
73
+				var item = mobContentObj.list.rows[$(this).index()];
74
+				mobContentObj.view.init(item);
75
+			});
76
+
77
+			$(document).on('click', '#ITP_LIST_MRTNMNG04010_POP_WHS_ROWS li button', function() {
78
+				mobPopObj.popWhsNm.choice($(this));
79
+			});
80
+		}
81
+	},
82
+	switchScreen: function(mode) {
83
+		$('#ITP_MOBILE_MRTNMNG04010').find('div[id$="_CONTAINER"]').each(function(i) {
84
+			$(this).hide();
85
+		});
86
+		if(mode === PAGE_MODE_LIST) {
87
+			$('#ITP_AJAX_MRTNMNG04010_LIST_CONTAINER').show();
88
+			this.moreView(true);
89
+		} else if(mode === PAGE_MODE_VIEW) {
90
+			$('#ITP_AJAX_MRTNMNG04010_VIEW_CONTAINER').show();
91
+			this.moreView(false);
92
+		}
93
+		this.viewMode = mode;
94
+	},
95
+	moreView: function(isScroll) {
96
+		var _this = this;
97
+		if(isScroll) {
98
+			$('#ITP_LIST_MRTNMNG04010_LIST_ITEM_AREA').on('scroll', function () {
99
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
100
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
101
+						if(!mobContentObj.list.isSearch) {
102
+							mobContentObj.list.load();
103
+						}
104
+					}
105
+				}
106
+			});
107
+		} else {
108
+			$('#ITP_LIST_MRTNMNG04010_LIST_AREA').off('scroll');
109
+		}
110
+	},
111
+	ready: function() {
112
+		mobContentObj.list.init();
113
+	}
114
+};
115
+
116
+let mobContentObj = {
117
+	list: {
118
+		listSize: 10,
119
+		listPage: 0,
120
+		totPage: 0,
121
+		isSearch: false,
122
+		rows: [],
123
+		init: function() {
124
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
125
+			this.search();
126
+		},
127
+		search: function() {
128
+			this.listPage = 0;
129
+			this.totPage = 0;
130
+			this.rows.length = 0;
131
+			$('#ITP_LIST_MRTNMNG04010_LIST_ITEM_ROWS').empty();
132
+			this.load();
133
+		},
134
+		load: function() {
135
+			var _this = this;
136
+			this.isSearch = true;
137
+			var callbackFn = function(result) {
138
+				console.log(result);
139
+				_this.isSearch = false;
140
+				_this.totPage = result.gridTotal;
141
+				$.each(result.gridRows, function (i, item) {
142
+					$('#ITP_LIST_MRTNMNG04010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG04010_LIST_ITEM_ROWCOPY').html());
143
+					var $li = $('#ITP_LIST_MRTNMNG04010_LIST_ITEM_AREA .panel-group > .list-row:last');
144
+					$li.find('.fnRtnOdrRegDt').text(item.rtnOdrRegDt);
145
+					$li.find('.fnRtnOdrMgrNm').text(item.rtnOdrMgrNm);
146
+					$li.find('.fnRtnOdrStNm').text(item.rtnOdrStNm);
147
+					$li.find('.fnWhsNm').text(item.whsNm);
148
+					$li.find('.fnRtnDodrItemQty').text($li.find('.fnRtnDodrItemQty').text().replace('$', item.rtnDodrItemQty));
149
+					$li.find('.fnRtnDodrTotalAmt').text(CommonObj.currency.add(item.rtnDodrTotalAmt));
150
+					$li.find('.fnRtnWhsNm').text(item.rtnWhsNm);
151
+					_this.rows.push(item);
152
+				});
153
+			};
154
+			var errFn = function() { _this.isSearch = false;};
155
+			const param = $('#ITP_FORM_MRTNMNG04010_LIST_SEARCH').serializeObject();
156
+			param.gridPage = ++this.listPage;
157
+			param.gridSize = this.listSize;
158
+			param.fromDt = param.fromDt.replace(/-/g, ".");
159
+			param.toDt = param.toDt.replace(/-/g, ".");
160
+			console.log(JSON.stringify(param));
161
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
162
+		}
163
+	},
164
+	view: {
165
+		init: function(item) {
166
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
167
+			this.search(item);
168
+		},
169
+		search: function(item) {
170
+			var _this = this;
171
+			var callbackFn = function(result) {
172
+				console.log(result);
173
+				_this.view(result);
174
+			};
175
+			const param = {'rtnPodrUnqNo': item.rtnPodrUnqNo};
176
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
177
+		},
178
+		view: function(result) {
179
+			var _this = this;
180
+			var id = '#ITP_AJAX_MRTNMNG04010_VIEW_CONTAINER';
181
+			$(id).find('.fnRtnOdrRegDt').text(result.rtnOdrRegDt);
182
+			$(id).find('.fnRtnDodrTotalAmt').text(CommonObj.currency.add(result.rtnDodrTotalAmt));
183
+			$(id).find('.fnRtnWhsNm').text(result.rtnWhsNm);
184
+			$(id).find('.fnWhsNm').text(result.whsNm);
185
+			$.each(result.rtnOdrDtlList, function (i, item) {
186
+				$('#ITP_LIST_MRTNMNG04010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG04010_VIEW_ITEM_ROWCOPY').html());
187
+				var $li = $('#ITP_LIST_MRTNMNG04010_VIEW_ITEM_AREA .panel-group > .list-row:last');
188
+				console.log(item);
189
+				$li.find('.fnItemNm').text(item.itemNm);
190
+				$li.find('.fnRtnQty').text(item.rtnQty + item.unit);
191
+				$li.find('.fnRtnReqQty').text(CommonObj.comma.set(item.rtnReqQty));
192
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
193
+				$li.find('.fnRtnOdrAmt').text(CommonObj.currency.add(item.rtnOdrAmt));
194
+				$li.find('.fnColReqDt').text(item.colReqDt);
195
+			});
196
+		},
197
+		cancel: function () {
198
+			var id = '#ITP_AJAX_MRTNMNG04010_VIEW_CONTAINER';
199
+			$(id).find('.fnPodrDt').text('');
200
+			$(id).find('.fnPodrTotalAmt').text('');
201
+			$(id).find('.fnShmtWhsDvsnNm').text('');
202
+			$(id).find('.fnSpplyNm').text('');
203
+			$('#ITP_LIST_MRTNMNG04010_VIEW_ITEM_AREA .panel-group').empty();
204
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
205
+		}
206
+	}
207
+};
208
+
209
+let mobPopObj = {
210
+	popSpply: {
211
+		popId: 'ITP_POP_MRTNMNG04010_SPPLY_AREA',
212
+		rows: [],
213
+		init: function() {
214
+			this.rows.length = 0;
215
+			mobPopObj.show(this.popId);
216
+			this.search();
217
+			this.action();
218
+		},
219
+		search: function() {
220
+			var _this = this;
221
+			$('#ITP_POP_MRTNMNG04010_LIST_SPPLY_AREA .panel-group').empty();
222
+			var callbackFn = function(result) {
223
+				console.log(result);
224
+				_this.view(result.gridRows);
225
+			};
226
+			let param = $('#ITP_FORM_MRTNMNG04010_POP_SPPLY_SEARCH').serializeObject();
227
+			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
228
+		},
229
+		view: function(gridRows) {
230
+			this.rows = gridRows;
231
+			$.each(gridRows, function (i, item) {
232
+				$('#ITP_POP_MRTNMNG04010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MRTNMNG04010_LIST_SPPLY_ROWCOPY').html());
233
+				var $li = $('#ITP_POP_MRTNMNG04010_LIST_SPPLY_AREA .panel-group > .list-row:last');
234
+				$li.find('.fnSpplyNm').text(item.spplyNm);
235
+				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
236
+				$li.find('.fnSpplyId').data('item-key', item.spplyId);
237
+			});
238
+		},
239
+		choice: function(elem) {
240
+			var _this = this;
241
+			var spplyId = $(elem).data('item-key');
242
+			$.each(this.rows, function (i, item) {
243
+				if(spplyId === item.spplyId) {
244
+					$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
245
+					$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
246
+					_this.close();
247
+					return false;
248
+				}
249
+			});
250
+		},
251
+		action: function() {
252
+			var _this = this;
253
+			$('button[id^="ITP_BTN_MRTNMNG04010_POP_SPPLY"]').off('click').on('click', function() {
254
+				var id = $(this).attr('id');
255
+				switch (id) {
256
+					case 'ITP_BTN_MRTNMNG04010_POP_SPPLY_SEARCH'	: _this.search();			break;
257
+					case 'ITP_BTN_MRTNMNG04010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
258
+					case 'ITP_BTN_MRTNMNG04010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
259
+				}
260
+				return false;
261
+			});
262
+		},
263
+		delete: function() {
264
+			$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_SPPLY_ID').val('');
265
+			$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_SPPLY_NM').val('');
266
+		},
267
+		close: function() {
268
+			this.rows.length = 0;
269
+			$('#ITP_POP_MRTNMNG04010_LIST_SPPLY_AREA .panel-group').empty();
270
+			$('#ITP_FORM_MRTNMNG04010_POP_SPPLY_SEARCH #ITP_FORM_MRTNMNG04010_POP_SPPLY_KEYWORD').val('');
271
+			mobPopObj.hide(this.popId);
272
+		}
273
+	},
274
+	popWhsNm: {
275
+		popId: 'ITP_POP_MRTNMNG04010_WHS_AREA',
276
+		rows: [],
277
+		init: function (mode) {
278
+			this.popMode = mode;
279
+			this.rows.length = 0;
280
+			mobPopObj.show(this.popId);
281
+			this.search();
282
+			this.action();
283
+		},
284
+		search: function () {
285
+			var _this = this;
286
+			$('#ITP_LIST_MRTNMNG04010_POP_WHS_AREA .panel-group').empty();
287
+			var callbackFn = function(result) {
288
+				console.log(result);
289
+				_this.view(result.gridRows);
290
+			};
291
+			const param = $('#ITP_FORM_MRTNMNG04010_POP_WHS').serializeObject();
292
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
293
+		},
294
+		view: function(gridRows) {
295
+			this.rows = gridRows;
296
+			$.each(gridRows, function (i, item) {
297
+				$('#ITP_LIST_MRTNMNG04010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MRTNMNG04010_POP_WHS_ROWCOPY').html());
298
+				var $li = $('#ITP_LIST_MRTNMNG04010_POP_WHS_AREA .panel-group > .list-row:last');
299
+				$li.find('.fnWhsNm').text(item.whsNm);
300
+				$li.find('.fnLocationNm').text(item.locationNm);
301
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
302
+			});
303
+		},
304
+		choice: function(elem) {
305
+			var _this = this;
306
+			var whsId = $(elem).data('whs-id');
307
+			$.each(this.rows, function (i, item) {
308
+				if(whsId === item.whsId) {
309
+					if(_this.popMode === 'RTN_WHS') {
310
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_WHS_ID').val(item.whsId);
311
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_WHS_NM').val(item.whsNm);
312
+					} else {
313
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_WHS_ID').val(item.whsId);
314
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_WHS_NM').val(item.whsNm);
315
+					}
316
+					_this.close();
317
+					return false;
318
+				}
319
+			});
320
+		},
321
+		action: function() {
322
+			var _this = this;
323
+			$('button[id^="ITP_BTN_MRTNMNG04010_POP_WHS"]').off('click').on('click', function() {
324
+				var id = $(this).attr('id');
325
+				switch (id) {
326
+					case 'ITP_BTN_MRTNMNG04010_POP_WHS_SEARCH'	: _this.search();			break;
327
+					case 'ITP_BTN_MRTNMNG04010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
328
+					case 'ITP_BTN_MRTNMNG04010_POP_WHS_CLOSE'	: _this.close(); 			break;
329
+				}
330
+				return false;
331
+			});
332
+		},
333
+		delete: function(popMode) {
334
+			if(popMode === 'RTN_WHS') {
335
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_WHS_ID').val('');
336
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_RTN_WHS_NM').val('');
337
+			} else {
338
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_WHS_ID').val('');
339
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG04010_LIST_SEARCH_WHS_NM').val('');
340
+			}
341
+		},
342
+		close: function() {
343
+			this.rows.length = 0;
344
+			$('#ITP_POP_MRTNMNG04010_LIST_WHS_AREA .panel-group').empty();
345
+			$('#ITP_FORM_MRTNMNG04010_POP_WHS #ITP_FORM_MRTNMNG04010_POP_WHS_KEYWORD').val('');
346
+			mobPopObj.hide(this.popId);
347
+		}
348
+	},
349
+	show: function(popId) {
350
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
351
+			console.log($(this).attr('id'));
352
+			if($(this).hasClass('btn-pop-close')) {
353
+				mobPopObj.hide(popId);
354
+			}
355
+		});
356
+		$('#' + popId).show();
357
+	},
358
+	hide: function(popId) {
359
+		$('#' + popId).closest('.mobile-pop-close').hide();
360
+	}
361
+};

+ 274 - 0
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG05010.js

@@ -0,0 +1,274 @@
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/detail-grid-list';	// 목록
10
+const API_MOBILE_SAVE 				= '/api/rtnmng/rtn/save-rtnPo';			// 저장
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+
13
+const PAGE_MODE_LIST				= "LIST";
14
+const PAGE_MODE_VIEW				= "VIEW";
15
+
16
+let mobPageObj = {
17
+	viewMode: PAGE_MODE_LIST,
18
+	init: function () {
19
+		this.ui.init();
20
+		this.event.init();
21
+		this.ready();
22
+	},
23
+	ui: {
24
+		init: function () {
25
+			this.view();
26
+			this.info();
27
+		},
28
+		view: function() {
29
+			// 공통코드 표시
30
+			$('select').each(function() {
31
+				if($(this).data('select-code')) {
32
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
33
+				}
34
+			});
35
+
36
+			// 조회일자 지정
37
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', 0));
38
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
39
+		},
40
+		info: function() {
41
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
42
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
43
+		}
44
+	},
45
+	event: {
46
+		init: function() {
47
+			this.button();
48
+		},
49
+		button: function() {
50
+			$('button[id^="ITP_BTN_MRTNMNG05010_LIST"]').on('click', function() {
51
+				var id = $(this).attr('id');
52
+				switch (id) {
53
+					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init('WHS'); 		break;
54
+					case 'ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete('WHS'); 			break;
55
+					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM'	: mobPopObj.popWhsNm.init('RTN_WHS'); 	break;
56
+					case 'ITP_BTN_MRTNMNG05010_LIST_DELETE_RTN_WHS_NM'	: mobPopObj.popWhsNm.delete('RTN_WHS'); 		break;
57
+					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH'				: mobContentObj.list.search();			break;
58
+					case 'ITP_BTN_MRTNMNG05010_LIST_MODIFY'				: mobContentObj.list.save();			break;
59
+				}
60
+				return false;
61
+			});
62
+
63
+			$(document).on('click', '#ITP_LIST_MRTNMNG05010_POP_WHS_ROWS li button', function() {
64
+				mobPopObj.popWhsNm.choice($(this));
65
+			});
66
+		}
67
+	},
68
+	switchScreen: function(mode) {
69
+		$('#ITP_MOBILE_MRTNMNG05010').find('div[id$="_CONTAINER"]').each(function(i) {
70
+			$(this).hide();
71
+		});
72
+		if(mode === PAGE_MODE_LIST) {
73
+			$('#ITP_AJAX_MRTNMNG05010_LIST_CONTAINER').show();
74
+			this.moreView(true);
75
+		}
76
+		this.viewMode = mode;
77
+	},
78
+	moreView: function(isScroll) {
79
+		var _this = this;
80
+		if(isScroll) {
81
+			$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA').on('scroll', function () {
82
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
83
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
84
+						if(!mobContentObj.list.isSearch) {
85
+							mobContentObj.list.load();
86
+						}
87
+					}
88
+				}
89
+			});
90
+		} else {
91
+			$('#ITP_LIST_MRTNMNG05010_LIST_AREA').off('scroll');
92
+		}
93
+	},
94
+	ready: function() {
95
+		mobContentObj.list.init();
96
+	}
97
+};
98
+
99
+let mobContentObj = {
100
+	list: {
101
+		listSize: 10,
102
+		listPage: 0,
103
+		totPage: 0,
104
+		isSearch: false,
105
+		rows: [],
106
+		init: function() {
107
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
108
+			// this.search();
109
+		},
110
+		search: function() {
111
+			var formId = '#ITP_FORM_MRTNMNG05010_LIST_SEARCH';
112
+			if (itp_fn_form_event.isValid(formId)) {
113
+				this.listPage = 0;
114
+				this.totPage = 0;
115
+				this.rows.length = 0;
116
+				$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWS').empty();
117
+				this.load();
118
+			}
119
+		},
120
+		load: function() {
121
+			var _this = this;
122
+			this.isSearch = true;
123
+			var callbackFn = function(result) {
124
+				console.log(result);
125
+				_this.isSearch = false;
126
+				_this.totPage = result.gridTotal;
127
+				$.each(result.gridRows, function (i, item) {
128
+					$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWCOPY').html());
129
+					var $li = $('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group > .list-row:last');
130
+					$li.find('.fnDlvSttmtUnqNo').text(item.dlvSttmtUnqNo);
131
+					$li.find('.fnDlvSchDt').text(item.dlvSchDt);
132
+					$li.find('.fnSpplyNm').text(item.spplyNm);
133
+					$li.find('.fnWhsNm').text(item.whsNm);
134
+					$li.find('.fnItemNm').text(item.itemNm + '(' + item.podrQty + item.unit + ')');
135
+					$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
136
+					$li.find('.fnDlvQty').text(CommonObj.comma.set(item.dlvQty));
137
+					$li.find('.fnWhsQty').val(item.whsQty);
138
+					_this.rows.push(item);
139
+				});
140
+			};
141
+			var errFn = function() { _this.isSearch = false;};
142
+			const param = $('#ITP_FORM_MRTNMNG05010_LIST_SEARCH').serializeObject();
143
+			param.gridPage = ++this.listPage;
144
+			param.gridSize = this.listSize;
145
+			param.fromDt = param.fromDt.replace(/-/g, ".");
146
+			param.toDt = param.toDt.replace(/-/g, ".");
147
+			console.log(JSON.stringify(param));
148
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
149
+		},
150
+		save: function() {
151
+			var _this = this;
152
+			var gridInsertData = [];
153
+			$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWS li').each(function(index) {
154
+				var whsQty = $(this).find('input[name="whsQty"]').val();
155
+				if(whsQty !== '') {
156
+					var item = {
157
+						'dlvSttmtDtlNo'	: _this.rows[index].dlvSttmtDtlNo,
158
+						'dlvSttmtUnqNo'	: _this.rows[index].dlvSttmtUnqNo,
159
+						'itemId'		: _this.rows[index].itemId,
160
+						'whsQty'		: whsQty
161
+					};
162
+					gridInsertData.push(item);
163
+				}
164
+			});
165
+			if(gridInsertData.length > 0) {
166
+				var modalFn = {
167
+					callBack: (args) => {
168
+						let param = {};
169
+						param['viewCd'] = 'C';
170
+						param['brandId'] = $('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID').val();
171
+						param['storeId'] = $('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID').val();
172
+						param['whsId'] = $('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val();
173
+						param['gridInsertData'] = gridInsertData;
174
+						console.log(JSON.stringify(param));
175
+						var saveFn = function () {
176
+						};
177
+						fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), saveFn, 'POST');
178
+					}
179
+				};
180
+				itp_fn_modal_confirm('저장 하시겠습니까?', modalFn);
181
+			}
182
+		}
183
+	}
184
+};
185
+
186
+let mobPopObj = {
187
+	popWhsNm: {
188
+		popId: 'ITP_POP_MRTNMNG05010_WHS_AREA',
189
+		rows: [],
190
+		init: function (mode) {
191
+			this.popMode = mode;
192
+			this.rows.length = 0;
193
+			mobPopObj.show(this.popId);
194
+			this.search();
195
+			this.action();
196
+		},
197
+		search: function () {
198
+			var _this = this;
199
+			$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .panel-group').empty();
200
+			var callbackFn = function(result) {
201
+				console.log(result);
202
+				_this.view(result.gridRows);
203
+			};
204
+			const param = $('#ITP_FORM_MRTNMNG05010_POP_WHS').serializeObject();
205
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
206
+		},
207
+		view: function(gridRows) {
208
+			this.rows = gridRows;
209
+			$.each(gridRows, function (i, item) {
210
+				$('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MRTNMNG05010_POP_WHS_ROWCOPY').html());
211
+				var $li = $('#ITP_LIST_MRTNMNG05010_POP_WHS_AREA .panel-group > .list-row:last');
212
+				$li.find('.fnWhsNm').text(item.whsNm);
213
+				$li.find('.fnLocationNm').text(item.locationNm);
214
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
215
+			});
216
+		},
217
+		choice: function(elem) {
218
+			var _this = this;
219
+			var whsId = $(elem).data('whs-id');
220
+			$.each(this.rows, function (i, item) {
221
+				if(whsId === item.whsId) {
222
+					if(_this.popMode === 'RTN_WHS') {
223
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_ID').val(item.whsId);
224
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM').val(item.whsNm);
225
+					} else {
226
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val(item.whsId);
227
+						$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val(item.whsNm);
228
+					}
229
+					_this.close();
230
+					return false;
231
+				}
232
+			});
233
+		},
234
+		action: function() {
235
+			var _this = this;
236
+			$('button[id^="ITP_BTN_MRTNMNG05010_POP_WHS"]').off('click').on('click', function() {
237
+				var id = $(this).attr('id');
238
+				switch (id) {
239
+					case 'ITP_BTN_MRTNMNG05010_POP_WHS_SEARCH'	: _this.search();			break;
240
+					case 'ITP_BTN_MRTNMNG05010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
241
+					case 'ITP_BTN_MRTNMNG05010_POP_WHS_CLOSE'	: _this.close(); 			break;
242
+				}
243
+				return false;
244
+			});
245
+		},
246
+		delete: function() {
247
+			if(_this.popMode === 'RTN_WHS') {
248
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_ID').val('');
249
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM').val('');
250
+			} else {
251
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val('');
252
+				$('#ITP_FORM_MRTNMNG04010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val('');
253
+			}
254
+		},
255
+		close: function() {
256
+			this.rows.length = 0;
257
+			$('#ITP_POP_MRTNMNG05010_LIST_WHS_AREA .panel-group').empty();
258
+			$('#ITP_FORM_MRTNMNG05010_POP_WHS #ITP_FORM_MRTNMNG05010_POP_WHS_KEYWORD').val('');
259
+			mobPopObj.hide(this.popId);
260
+		}
261
+	},
262
+	show: function(popId) {
263
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
264
+			console.log($(this).attr('id'));
265
+			if($(this).hasClass('btn-pop-close')) {
266
+				mobPopObj.hide(popId);
267
+			}
268
+		});
269
+		$('#' + popId).show();
270
+	},
271
+	hide: function(popId) {
272
+		$('#' + popId).closest('.mobile-pop-close').hide();
273
+	}
274
+};

+ 300 - 0
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG06010.js

@@ -0,0 +1,300 @@
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/inoutmng/warehouse-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/rtnmng/po/info-pchOdr';					// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
13
+
14
+const PAGE_MODE_LIST				= "LIST";
15
+const PAGE_MODE_VIEW				= "VIEW";
16
+
17
+let mobPageObj = {
18
+	viewMode: PAGE_MODE_LIST,
19
+	init: function () {
20
+		this.ui.init();
21
+		this.event.init();
22
+		this.ready();
23
+	},
24
+	ui: {
25
+		init: function () {
26
+			this.view();
27
+			this.info();
28
+		},
29
+		view: function() {
30
+			// 공통코드 표시
31
+			$('select').each(function() {
32
+				if($(this).data('select-code')) {
33
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
34
+				}
35
+			});
36
+
37
+			// 조회일자 지정
38
+			$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
39
+			$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
40
+		},
41
+		info: function() {
42
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
43
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
44
+		}
45
+	},
46
+	event: {
47
+		init: function() {
48
+			this.button();
49
+		},
50
+		button: function() {
51
+			$('button[id^="ITP_BTN_MRTNMNG06010_LIST"]').on('click', function() {
52
+				var id = $(this).attr('id');
53
+				switch (id) {
54
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
55
+					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
56
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
57
+					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
58
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH'			: mobContentObj.list.search();	break;
59
+				}
60
+				return false;
61
+			});
62
+
63
+			$(document).on('click', '#ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWS li', function() {
64
+				var item = mobContentObj.list.rows[$(this).index()];
65
+				mobContentObj.view.init(item);
66
+			});
67
+
68
+			$(document).on('click', '#ITP_POP_MRTNMNG06010_LIST_SPPLY_ROWS li button', function() {
69
+				mobPopObj.popSpply.choice($(this));
70
+			});
71
+
72
+			$(document).on('click', '#ITP_LIST_MRTNMNG06010_POP_WHS_ROWS li button', function() {
73
+				mobPopObj.popWhsNm.choice($(this));
74
+			});
75
+		}
76
+	},
77
+	switchScreen: function(mode) {
78
+		$('#ITP_MOBILE_MRTNMNG06010').find('div[id$="_CONTAINER"]').each(function(i) {
79
+			$(this).hide();
80
+		});
81
+		if(mode === PAGE_MODE_LIST) {
82
+			$('#ITP_AJAX_MRTNMNG06010_LIST_CONTAINER').show();
83
+			this.moreView(true);
84
+		}
85
+		this.viewMode = mode;
86
+	},
87
+	moreView: function(isScroll) {
88
+		var _this = this;
89
+		if(isScroll) {
90
+			$('#ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA').on('scroll', function () {
91
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
92
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
93
+						if(!mobContentObj.list.isSearch) {
94
+							mobContentObj.list.load();
95
+						}
96
+					}
97
+				}
98
+			});
99
+		} else {
100
+			$('#ITP_LIST_MRTNMNG06010_LIST_AREA').off('scroll');
101
+		}
102
+	},
103
+	ready: function() {
104
+		mobContentObj.list.init();
105
+	}
106
+};
107
+
108
+let mobContentObj = {
109
+	list: {
110
+		listSize: 10,
111
+		listPage: 0,
112
+		totPage: 0,
113
+		isSearch: false,
114
+		rows: [],
115
+		init: function() {
116
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
117
+			this.search();
118
+		},
119
+		search: function() {
120
+			this.listPage = 0;
121
+			this.totPage = 0;
122
+			this.rows.length = 0;
123
+			$('#ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWS').empty();
124
+			this.load();
125
+		},
126
+		load: function() {
127
+			var _this = this;
128
+			this.isSearch = true;
129
+			var callbackFn = function(result) {
130
+				console.log(result);
131
+				_this.isSearch = false;
132
+				_this.totPage = result.gridTotal;
133
+				$.each(result.gridRows, function (i, item) {
134
+					$('#ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWCOPY').html());
135
+					var $li = $('#ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA .panel-group > .list-row:last');
136
+					$li.find('.fnPchPodrUnqNo').text(item.pchPodrUnqNo);
137
+					$li.find('.fnDlvCmpltDt').text(item.dlvCmpltDt);
138
+					$li.find('.fnDlvSchDt').text(item.dlvSchDt);
139
+					$li.find('.fnSpplyNm').text(item.spplyNm);
140
+					$li.find('.fnWhsNm').text(item.whsNm);
141
+					$li.find('.fnItemNm').text(item.itemNm);
142
+					$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
143
+					$li.find('.fnDlvQty').text(CommonObj.comma.set(item.dlvQty));
144
+					_this.rows.push(item);
145
+				});
146
+			};
147
+			var errFn = function() { _this.isSearch = false;};
148
+			const param = $('#ITP_FORM_MRTNMNG06010_LIST_SEARCH').serializeObject();
149
+			param.gridPage = ++this.listPage;
150
+			param.gridSize = this.listSize;
151
+			param.fromDt = param.fromDt.replace(/-/g, ".");
152
+			param.toDt = param.toDt.replace(/-/g, ".");
153
+			console.log(JSON.stringify(param));
154
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
155
+		}
156
+	}
157
+};
158
+
159
+let mobPopObj = {
160
+	popSpply: {
161
+		popId: 'ITP_POP_MRTNMNG06010_SPPLY_AREA',
162
+		rows: [],
163
+		init: function() {
164
+			this.rows.length = 0;
165
+			mobPopObj.show(this.popId);
166
+			this.search();
167
+			this.action();
168
+		},
169
+		search: function() {
170
+			var _this = this;
171
+			$('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group').empty();
172
+			var callbackFn = function(result) {
173
+				console.log(result);
174
+				_this.view(result.gridRows);
175
+			};
176
+			let param = $('#ITP_FORM_MRTNMNG06010_POP_SPPLY_SEARCH').serializeObject();
177
+			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
178
+		},
179
+		view: function(gridRows) {
180
+			this.rows = gridRows;
181
+			$.each(gridRows, function (i, item) {
182
+				$('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MRTNMNG06010_LIST_SPPLY_ROWCOPY').html());
183
+				var $li = $('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group > .list-row:last');
184
+				$li.find('.fnSpplyNm').text(item.spplyNm);
185
+				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
186
+				$li.find('.fnSpplyId').data('item-key', item.spplyId);
187
+			});
188
+		},
189
+		choice: function(elem) {
190
+			var _this = this;
191
+			var spplyId = $(elem).data('item-key');
192
+			$.each(this.rows, function (i, item) {
193
+				if(spplyId === item.spplyId) {
194
+					$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
195
+					$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
196
+					_this.close();
197
+					return false;
198
+				}
199
+			});
200
+		},
201
+		action: function() {
202
+			var _this = this;
203
+			$('button[id^="ITP_BTN_MRTNMNG06010_POP_SPPLY"]').off('click').on('click', function() {
204
+				var id = $(this).attr('id');
205
+				switch (id) {
206
+					case 'ITP_BTN_MRTNMNG06010_POP_SPPLY_SEARCH'	: _this.search();			break;
207
+					case 'ITP_BTN_MRTNMNG06010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
208
+					case 'ITP_BTN_MRTNMNG06010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
209
+				}
210
+				return false;
211
+			});
212
+		},
213
+		delete: function() {
214
+			$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_ID').val('');
215
+			$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_NM').val('');
216
+		},
217
+		close: function() {
218
+			this.rows.length = 0;
219
+			$('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group').empty();
220
+			$('#ITP_FORM_MRTNMNG06010_POP_SPPLY_SEARCH #ITP_FORM_MRTNMNG06010_POP_SPPLY_KEYWORD').val('');
221
+			mobPopObj.hide(this.popId);
222
+		}
223
+	},
224
+	popWhsNm: {
225
+		popId: 'ITP_POP_MRTNMNG06010_WHS_AREA',
226
+		rows: [],
227
+		init: function () {
228
+			this.rows.length = 0;
229
+			mobPopObj.show(this.popId);
230
+			this.search();
231
+			this.action();
232
+		},
233
+		search: function () {
234
+			var _this = this;
235
+			$('#ITP_LIST_MRTNMNG06010_POP_WHS_AREA .panel-group').empty();
236
+			var callbackFn = function(result) {
237
+				console.log(result);
238
+				_this.view(result.gridRows);
239
+			};
240
+			const param = $('#ITP_FORM_MRTNMNG06010_POP_WHS').serializeObject();
241
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
242
+		},
243
+		view: function(gridRows) {
244
+			this.rows = gridRows;
245
+			$.each(gridRows, function (i, item) {
246
+				$('#ITP_LIST_MRTNMNG06010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MRTNMNG06010_POP_WHS_ROWCOPY').html());
247
+				var $li = $('#ITP_LIST_MRTNMNG06010_POP_WHS_AREA .panel-group > .list-row:last');
248
+				$li.find('.fnWhsNm').text(item.whsNm);
249
+				$li.find('.fnLocationNm').text(item.locationNm);
250
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
251
+			});
252
+		},
253
+		choice: function(elem) {
254
+			var _this = this;
255
+			var whsId = $(elem).data('whs-id');
256
+			$.each(this.rows, function (i, item) {
257
+				if(whsId === item.whsId) {
258
+					$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID').val(item.whsId);
259
+					$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM').val(item.whsNm);
260
+					_this.close();
261
+					return false;
262
+				}
263
+			});
264
+		},
265
+		action: function() {
266
+			var _this = this;
267
+			$('button[id^="ITP_BTN_MRTNMNG06010_POP_WHS"]').off('click').on('click', function() {
268
+				var id = $(this).attr('id');
269
+				switch (id) {
270
+					case 'ITP_BTN_MRTNMNG06010_POP_WHS_SEARCH'	: _this.search();			break;
271
+					case 'ITP_BTN_MRTNMNG06010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
272
+					case 'ITP_BTN_MRTNMNG06010_POP_WHS_CLOSE'	: _this.close(); 			break;
273
+				}
274
+				return false;
275
+			});
276
+		},
277
+		delete: function() {
278
+			$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID').val('');
279
+			$('#ITP_FORM_MRTNMNG06010_LIST_SEARCH #ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM').val('');
280
+		},
281
+		close: function() {
282
+			this.rows.length = 0;
283
+			$('#ITP_POP_MRTNMNG06010_LIST_WHS_AREA .panel-group').empty();
284
+			$('#ITP_FORM_MRTNMNG06010_POP_WHS #ITP_FORM_MRTNMNG06010_POP_WHS_KEYWORD').val('');
285
+			mobPopObj.hide(this.popId);
286
+		}
287
+	},
288
+	show: function(popId) {
289
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
290
+			console.log($(this).attr('id'));
291
+			if($(this).hasClass('btn-pop-close')) {
292
+				mobPopObj.hide(popId);
293
+			}
294
+		});
295
+		$('#' + popId).show();
296
+	},
297
+	hide: function(popId) {
298
+		$('#' + popId).closest('.mobile-pop-close').hide();
299
+	}
300
+};