瀏覽代碼

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

dwkim 2 年之前
父節點
當前提交
dbf91ec596

+ 42 - 1
src/main/webapp/mobile/app/main.html

@@ -2,9 +2,13 @@
2 2
 <html lang="ko">
3 3
 <head>
4 4
 	<meta charset="UTF-8">
5
+	<meta http-equiv="Content-Type" content="text/html; utf-8">
6
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
5 7
 	<meta http-equiv="X-UA-Compatible" content="IE=edge">
6
-	<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+	<meta name="format-detection" content="telephone=no">
7 9
 	<title>모바일 수발주</title>
10
+	<link rel="stylesheet" href="../../bootstrap/dist/css/bootstrap.min.css" />
11
+	<link rel="stylesheet" href="../../bootstrap-datepicker/css/bootstrap-datepicker3.css" />
8 12
 	<link rel="stylesheet" href="../css/style.css?2011221">
9 13
 
10 14
 	<script>
@@ -182,6 +186,43 @@
182 186
 
183 187
 				</div>
184 188
 			</div>
189
+			<footer id="ITP_FOOTER">
190
+				<div id="ITP_MODAL_ALERT" class="modal itp_modal">
191
+					<div class="modal-dialog modal-sm">
192
+						<div class="modal-content">
193
+							<div class="modal-header">
194
+								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
195
+								<h5 class="modal-title">알림</h5>
196
+							</div>
197
+							<div class="modal-body">
198
+								<div class="text-center itp_alert_txt"></div>
199
+							</div>
200
+							<div class="modal-footer">
201
+								<button type="button" class="btn btn-default" id="ITP_MODAL_ALERT_CANCEL" data-dismiss="modal">취소</button>
202
+								<button type="button" class="btn btn-primary" id="ITP_MODAL_ALERT_CONFIRM">확인</button>
203
+							</div>
204
+						</div>
205
+					</div>
206
+				</div>
207
+
208
+				<div id="ITP_MODAL_ALERT_AJAX" class="modal itp_modal">
209
+					<div class="modal-dialog modal-sm">
210
+						<div class="modal-content">
211
+							<div class="modal-header">
212
+								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
213
+								<h5 class="modal-title">알림</h5>
214
+							</div>
215
+							<div class="modal-body">
216
+								<div class="text-center itp_alert_txt"></div>
217
+							</div>
218
+							<div class="modal-footer">
219
+								<button type="button" class="btn btn-primary" id="ITP_MODAL_ALERT_AJAX_CONFIRM">확인</button>
220
+							</div>
221
+						</div>
222
+					</div>
223
+				</div>
224
+			</footer>
225
+
185 226
 		</div>
186 227
 	</body>
187 228
 </html>

+ 10 - 10
src/main/webapp/mobile/app/mpomng/MPOMNG05010.html

@@ -105,7 +105,7 @@
105 105
 				</div>
106 106
 				<div class="line">
107 107
 					<label>공급업체</label>
108
-					<div class="search_wrap">
108
+					<div class="search_nm">
109 109
 						<div class="float_left">
110 110
 							<input type="text" id="ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="A공급업체명" readonly>
111 111
 							<input type="hidden" id="ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
@@ -148,13 +148,13 @@
148 148
 			</div>
149 149
 			<div id="ITP_LIST_MPOMNG05010_LIST_ITEM_AREA" class="scroll_area row-4">
150 150
 				<ul id="ITP_LIST_MPOMNG05010_LIST_ITEM_ROWS" class="panel-group"></ul>
151
-				<div id="ITP_LIST_MPOMNG05010_LIST_ITEM_ROWCOPY" style="display: block;">
151
+				<div id="ITP_LIST_MPOMNG05010_LIST_ITEM_ROWCOPY" style="display: none;">
152 152
 					<li class="history_list2 list-row">
153 153
 						<div class="left">
154 154
 							<div class="nomal">
155 155
 								<label class="">납품번호 </label>
156 156
 								<div class="history">
157
-									<div class="fnDlvNo">202210010000001-0100</div>
157
+									<div class="fnDlvSttmtUnqNo"></div>
158 158
 								</div>
159 159
 							</div>
160 160
 						</div>
@@ -162,11 +162,11 @@
162 162
 							<div class="nomal">
163 163
 								<label>납품예정일</label>
164 164
 								<div class="history">
165
-									<div class="fnDlvSchDt history_info">2022.10.03</div>
165
+									<div class="fnDlvReqDt history_info"></div>
166 166
 								</div>
167 167
 								<label class="fn sub_info">납품일자</label>
168 168
 								<div class="history">
169
-									<div class="fnDlvDt">2022.10.03</div>
169
+									<div class="fnDlvSchDt"></div>
170 170
 								</div>
171 171
 							</div>
172 172
 						</div>
@@ -174,11 +174,11 @@
174 174
 							<div class="nomal">
175 175
 								<label>공급업체</label>
176 176
 								<div class="history">
177
-									<div class="fnSpplyNm history_info">A공급업체명</div>
177
+									<div class="fnSpplyNm history_info"></div>
178 178
 								</div>
179 179
 								<label class="sub_info">납품장소</label>
180 180
 								<div class="history">
181
-									<div class="fnDlvPlace">A매장내</div>
181
+									<div class="fnWhsNm"></div>
182 182
 								</div>
183 183
 							</div>
184 184
 						</div>
@@ -186,7 +186,7 @@
186 186
 							<div class="nomal">
187 187
 								<label>품목 </label>
188 188
 								<div class="history">
189
-									<div class="fnItemNm">품목명(EA)</div>
189
+									<div class="fnItemNm"></div>
190 190
 								</div>
191 191
 							</div>
192 192
 						</div>
@@ -194,11 +194,11 @@
194 194
 							<div class="nomal">
195 195
 								<label>발주수량</label>
196 196
 								<div class="history">
197
-									<div class="fnPodrQty history_info">10</div>
197
+									<div class="fnPodrQty history_info"></div>
198 198
 								</div>
199 199
 								<label class="sub_info">납품수량</label>
200 200
 								<div class="history">
201
-									<div class="fnDlvQty">10</div>
201
+									<div class="fnDlvQty"></div>
202 202
 								</div>
203 203
 							</div>
204 204
 						</div>

+ 116 - 30
src/main/webapp/mobile/app/mpomng/MPOMNG06010.html

@@ -1,32 +1,114 @@
1
-<section id="ITP_MOBILE_MPOMNG05010">
2
-	<div id="ITP_AJAX_MPOMNG05010_DETAIL_CONTAINER">
3
-		<form id="ITP_FORM_MPOMNG05010_DETAIL" class="form-horizontal" onsubmit="return false;">
4
-			<input type="hidden" id="ITP_FORM_MPOMNG05010_DETAIL_VIEW_CD" name="viewCd" value="C">
1
+<section id="ITP_MOBILE_MPOMNG06010">
2
+	<div id="ITP_POP_MPOMNG06010_SPPLY_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_MPOMNG06010_POP_SPPLY_CLOSE"><img src="../img/close.png"></button>
10
+				</div>
11
+			</div>
12
+			<div class="search_bar">
13
+				<form id="ITP_FORM_MPOMNG06010_POP_SPPLY_SEARCH" class="form-horizontal" onsubmit="return false;">
14
+					<input type="hidden" id="ITP_FORM_MPOMNG06010_POP_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
15
+					<input type="hidden" id="ITP_FORM_MPOMNG06010_PO_PSPPLY_ITEM_STORE_ID" name="sstoreId" value="">
16
+					<input id="ITP_FORM_MPOMNG06010_POP_SPPLY_KEYWORD" type="text" name="sspplyNm" placeholder="공급업체명">
17
+					<button id="ITP_BTN_MPOMNG06010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
18
+				</form>
19
+			</div>
20
+			<div class="search_bar">
21
+				<button id="ITP_BTN_MPOMNG06010_POP_SPPLY_NM" class="btn_blue">공급업체▼</button>
22
+			</div>
23
+			<div id="ITP_POP_MPOMNG06010_LIST_SPPLY_AREA" class="popup_scroll">
24
+				<ul id="ITP_POP_MPOMNG06010_LIST_SPPLY_ROWS" class="panel-group itp_nav"></ul>
25
+				<div id="ITP_POP_MPOMNG06010_LIST_SPPLY_ROWCOPY" style="display: none;">
26
+					<li class="list-row">
27
+						<div class="scroll_left">
28
+							<div class="fnSpplyNm">공급업체 명A</div>
29
+							<div class="fnStNm">($)</div>
30
+						</div>
31
+						<div class="scroll_right">
32
+							<button id="ITP_BTN_MPOMNG06010_POP_SPPLY_CHOICE" class="fnSpplyId" data-item-key="">선택</button>
33
+						</div>
34
+					</li>
35
+				</div>
36
+			</div>
37
+		</div>
38
+	</div>
39
+	<div id="ITP_POP_MPOMNG06010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
40
+		<div class="pop">
41
+			<div class="header">
42
+				<div class="header_left">
43
+					<label>> 납품장소</label>
44
+				</div>
45
+				<div class="header_right">
46
+					<button type="button" id="ITP_BTN_MPOMNG06010_POP_WHS_CLOSE"><img src="../img/close.png"></button>
47
+				</div>
48
+			</div>
49
+			<div class="search_bar">
50
+				<form id="ITP_FORM_MPOMNG06010_POP_WHS" class="form-horizontal" onsubmit="return false;">
51
+					<input type="hidden" id="ITP_FORM_MPOMNG06010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
52
+					<input type="hidden" id="ITP_FORM_MPOMNG06010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
53
+					<input id="ITP_FORM_MPOMNG06010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
54
+					<button id="ITP_BTN_MPOMNG06010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
55
+				</form>
56
+			</div>
57
+			<div class="search_bar">
58
+				<button id="ITP_BTN_MPOMNG06010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
59
+			</div>
60
+			<div id="ITP_LIST_MPOMNG06010_POP_WHS_AREA" class="popup_scroll">
61
+				<ul id="ITP_LIST_MPOMNG06010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
62
+				<div id="ITP_LIST_MPOMNG06010_POP_WHS_ROWCOPY" style="display:none;">
63
+					<li class="list-row">
64
+						<div class="scroll_left">
65
+							<div class="fnWhsNm">브랜드 창고 명A</div>
66
+							<div class="fnLocationNm">(상세위치내용)</div>
67
+						</div>
68
+						<div class="scroll_right">
69
+							<button id="ITP_BTN_MPOMNG06010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
70
+						</div>
71
+					</li>
72
+				</div>
73
+			</div>
74
+		</div>
75
+	</div>
76
+	<div id="ITP_AJAX_MPOMNG06010_LIST_CONTAINER" >
77
+		<form id="ITP_FORM_MPOMNG06010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
78
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
79
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
80
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_IDX" name="sidx" value="0">
5 81
 			<div class="content">
6 82
 				<div class="line">
7 83
 					<label>납품예정일</label>
8
-					<div class="line_right">
9
-						<input id="ITP_FORM_MPOMNG05010_DETAIL_DLV_SCH_DT" name="dlvSchDt" class="date2" type="date" placeholder="">
84
+					<div class="date_to">
85
+						<!--<input type="text" id="ITP_FORM_MPOMNG06010_LIST_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" readonly>
86
+						<span class="input-group-addon itp_date_to">~</span>
87
+						<input type="text" id="ITP_FORM_STINFO02010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" readonly>-->
88
+
89
+						<input id="ITP_FORM_MPOMNG06010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
90
+						<div class="at">~</div>
91
+						<input id="ITP_FORM_MPOMNG06010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
10 92
 					</div>
11 93
 				</div>
12 94
 				<div class="line">
13 95
 					<label>납품서번호</label>
14 96
 					<div class="search_wrap">
15
-						<div class="line_right">
16
-							<select name="dlvNo" id="ITP_FORM_MPOMNG05010_DETAIL_DLV_NO" class="m9">
17
-							</select>
97
+						<div class="float_left">
98
+							<input id="ITP_FORM_MPOMNG06010_LIST_SEARCH_DLV_STTMT_UNQ_NO" name="sdlvSttmtUnqNo" style="width: 262px;" type="text" placeholder="">
18 99
 						</div>
19 100
 					</div>
20 101
 				</div>
21 102
 				<div class="line">
22 103
 					<label>공급업체</label>
23
-					<div class="search_wrap">
104
+					<div class="search_nm">
24 105
 						<div class="float_left">
25
-							<input id="ITP_FORM_MPOMNG05010_DETAIL_SPPLY_NM" type="text" placeholder="A공급업체명">
106
+							<input type="text" id="ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="A공급업체명" readonly>
107
+							<input type="hidden" id="ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
26 108
 						</div>
27 109
 						<div class="float_left_btn">
28
-							<button id="ITP_BTN_MPOMNG05010_DETAIL_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG05010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
29
-							<button id="ITP_BTN_MPOMNG05010_DETAIL_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
110
+							<button id="ITP_BTN_MPOMNG06010_LIST_SEARCH_SPPLY_NM"><img src="../img/search.png" alt=""></button>
111
+							<button id="ITP_BTN_MPOMNG06010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
30 112
 						</div>
31 113
 					</div>
32 114
 				</div>
@@ -34,11 +116,12 @@
34 116
 					<label>납품장소</label>
35 117
 					<div class="search_nm">
36 118
 						<div class="float_left">
37
-							<input type="text" id="ITP_FORM_MPOMNG05010_DETAIL_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
119
+							<input type="text" id="ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_NM" data-check-required="empty" class="" name="swhsNm" placeholder="매장명" readonly />
120
+							<input type="hidden" id="ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_ID" data-check-required="empty" class="" name="swhsId" />
38 121
 						</div>
39 122
 						<div class="float_left_btn">
40
-							<button id="ITP_BTN_MPOMNG05010_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG05010_WHS_AREA"><img src="../img/search.png" alt=""></button>
41
-							<button id="ITP_BTN_MPOMNG05010_DETAIL_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
123
+							<button id="ITP_BTN_MPOMNG06010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
124
+							<button id="ITP_BTN_MPOMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
42 125
 						</div>
43 126
 					</div>
44 127
 				</div>
@@ -46,28 +129,30 @@
46 129
 					<label>품목명</label>
47 130
 					<div class="search_wrap">
48 131
 						<div class="float_left">
49
-							<input id="ITP_FORM_MPOMNG05010_DETAIL_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
132
+							<input id="ITP_FORM_MPOMNG06010_LIST_SEARCH_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="A매장명">
50 133
 						</div>
51 134
 					</div>
52 135
 				</div>
53 136
 				<div class="line" style="height:50px;">
54 137
 					<div class="search">
55
-						<button id="ITP_BTN_MPOMNG05010_DETAIL_SEARCH" class="btn-primary btn-sm ADB">검색</button>
138
+						<button id="ITP_BTN_MPOMNG06010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
56 139
 					</div>
57 140
 				</div>
58 141
 				<div class="table_header">
59 142
 					<h1>> 납품서 내역</h1>
60 143
 				</div>
61 144
 			</div>
62
-			<div id="ITP_LIST_MPOMNG05010_ITEM_AREA" class="scroll_area row-4">
63
-				<ul id="ITP_LIST_MPOMNG05010_DETAIL_ROWS" class="panel-group"></ul>
64
-				<div id="ITP_LIST_MPOMNG05010_DETAIL_ROWCOPY" style="display: block;">
65
-					<li class="history_list2">
145
+		</form>
146
+		<form id="ITP_FORM_MPOMNG06010_LIST_MODIFY" class="form-horizontal" onsubmit="return false;">
147
+			<div id="ITP_LIST_MPOMNG06010_LIST_ITEM_AREA" class="scroll_area row-4">
148
+				<ul id="ITP_LIST_MPOMNG06010_LIST_ITEM_ROWS" class="panel-group"></ul>
149
+				<div id="ITP_LIST_MPOMNG06010_LIST_ITEM_ROWCOPY" style="display: none;">
150
+					<li class="history_list2 list-row">
66 151
 						<div class="left">
67 152
 							<div class="nomal">
68 153
 								<label>납품번호 </label>
69 154
 								<div class="history">
70
-									<div class="fnDlvNo">202210010000001-0100</div>
155
+									<div class="fnDlvSttmtUnqNo"></div>
71 156
 								</div>
72 157
 							</div>
73 158
 						</div>
@@ -75,7 +160,7 @@
75 160
 							<div class="nomal">
76 161
 								<label class="history_label">납품예정일</label>
77 162
 								<div class="history">
78
-									<div class="fnDlvSchDt history_info">2022.10.03</div>
163
+									<div class="fnDlvSchDt history_info"></div>
79 164
 								</div>
80 165
 							</div>
81 166
 						</div>
@@ -83,11 +168,11 @@
83 168
 							<div class="nomal">
84 169
 								<label>공급업체</label>
85 170
 								<div class="history">
86
-									<div class="fnSpplyNm history_info">A공급업체명</div>
171
+									<div class="fnSpplyNm history_info"></div>
87 172
 								</div>
88 173
 								<label class="sub_info">납품장소</label>
89 174
 								<div class="history">
90
-									<div class="fnDlvPlace">A매장내</div>
175
+									<div class="fnWhsNm"></div>
91 176
 								</div>
92 177
 							</div>
93 178
 						</div>
@@ -95,7 +180,7 @@
95 180
 							<div class="nomal">
96 181
 								<label>품목 </label>
97 182
 								<div class="history">
98
-									<div class="fnItemNm">품목명(EA)</div>
183
+									<div class="fnItemNm">(EA)</div>
99 184
 								</div>
100 185
 							</div>
101 186
 						</div>
@@ -107,7 +192,7 @@
107 192
 								</div>
108 193
 								<label class="sub_info">입고수량</label>
109 194
 								<div class="history">
110
-									<input id="ITP_FORM_MPOMNG05010_DETAIL_WHS_QTY" name="whsQty" type="text" placeholder="10">
195
+									<input id="ITP_FORM_MPOMNG06010_LIST_WHS_QTY" class="fnWhsQty" name="whsQty" type="text" placeholder="10">
111 196
 								</div>
112 197
 							</div>
113 198
 						</div>
@@ -115,9 +200,10 @@
115 200
 				</div>
116 201
 			</div>
117 202
 			<div class="button_bar">
118
-				<button id="ITP_BTN_MPOMNG05010_DETAOL_WHS" class="btn_col_6 btn-primary INPS">입고처리</button>
119
-				<button id="ITP_BTN_MPOMNG05010_DETAIL_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>
203
+				<button id="ITP_BTN_MPOMNG06010_LIST_MODIFY" class="btn_col_6 btn-primary INPS">입고처리</button>
204
+				<!--<button id="ITP_BTN_MPOMNG06010_LIST_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>-->
120 205
 			</div>
121 206
 		</form>
122 207
 	</div>
208
+	<div id="ITP_MOBILE_JS"></div>
123 209
 </section>

+ 25 - 0
src/main/webapp/mobile/css/style.css

@@ -349,3 +349,28 @@ input .day {margin: 18%; width: 45%; height: 80px; float: right;}
349 349
 .scroll_area li .right {margin: 30px 20px 0 0; position: relative; display: flex; font-size: 1.4rem; font-weight: 700; float: right;}
350 350
 .scroll_area li .right .num {margin: 0 25px; width: auto;}
351 351
 .scroll_area li .right button {margin: -6px; padding:0px 7px; font-size: 1.5rem; border-radius: 0px;}
352
+
353
+/* ITP_FOOTER */
354
+#ITP_FOOTER .itp_modal {z-index:10000;}
355
+#ITP_FOOTER .itp_modal .modal-header {padding:12px 15px 12px 15px; background:#337ab7; cursor:move;}
356
+#ITP_FOOTER .itp_modal .modal-header .close {color:#fff; opacity:1;}
357
+#ITP_FOOTER .itp_modal .modal-title {font-size:16px; color:#fff;}
358
+#ITP_FOOTER .itp_modal .itp_alert_txt {font-size:15px; padding:15px 0 10px 0;}
359
+#ITP_FOOTER .itp_modal .itp_form .form-group {margin-bottom:10px;}
360
+#ITP_FOOTER .itp_modal .itp_form .form-control {font-size:13px; color:#333;}
361
+#ITP_FOOTER .itp_modal .itp_form .itp_lb {font-size:13px; padding-top:5px; padding-right:0; color:#333; position:relative;}
362
+#ITP_FOOTER .itp_modal .itp_form .itp_ip {padding-left:0; padding-right:0;}
363
+#ITP_FOOTER .itp_modal .itp_form .itp_ip_offset {padding-left:15px;}
364
+#ITP_FOOTER .itp_modal .itp_form .itp_input {height:28px; padding:3px 9px;}
365
+#ITP_FOOTER .itp_modal .itp_form .itp_check {margin-top:7px;}
366
+#ITP_FOOTER .itp_modal .itp_form select.itp_input  {padding-left:4px;}
367
+#ITP_FOOTER .itp_modal .itp_form .itp_btn {padding:4px 10px; background:#fff;}
368
+#ITP_FOOTER .itp_modal .itp_form .input-daterange .input-group-addon {padding:3px 5px;}
369
+#ITP_FOOTER .itp_modal .itp_form .itp_date_to {background:#fff;}
370
+#ITP_FOOTER .itp_modal .itp_form .itp_lb.itp_required:before {content:'*'; color:#a94442; position:absolute; top:8px; left:8px;}
371
+#ITP_FOOTER .modal.in .modal-dialog {
372
+  -webkit-transform:translate(0, calc(50vh - 50%));
373
+  -ms-transform:translate(0, 50vh) translate(0, -50%);
374
+  -o-transform:translate(0, calc(50vh - 50%));
375
+  transform:translate(0, 50vh) translate(0, -50%);
376
+}

+ 7 - 60
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG05010.js

@@ -60,14 +60,6 @@ let mobPageObj = {
60 60
 				return false;
61 61
 			});
62 62
 
63
-			$('button[id^="ITP_BTN_MPOMNG05010_VIEW"]').on('click', function() {
64
-				var id = $(this).attr('id');
65
-				switch (id) {
66
-					case 'ITP_BTN_MPOMNG05010_VIEW_CANCEL_LIST'		: mobContentObj.view.cancel();	break;
67
-				}
68
-				return false;
69
-			});
70
-
71 63
 			$(document).on('click', '#ITP_LIST_MPOMNG05010_LIST_ITEM_ROWS li', function() {
72 64
 				var item = mobContentObj.list.rows[$(this).index()];
73 65
 				mobContentObj.view.init(item);
@@ -89,9 +81,6 @@ let mobPageObj = {
89 81
 		if(mode === PAGE_MODE_LIST) {
90 82
 			$('#ITP_AJAX_MPOMNG05010_LIST_CONTAINER').show();
91 83
 			this.moreView(true);
92
-		} else if(mode === PAGE_MODE_VIEW) {
93
-			$('#ITP_AJAX_MPOMNG05010_VIEW_CONTAINER').show();
94
-			this.moreView(false);
95 84
 		}
96 85
 		this.viewMode = mode;
97 86
 	},
@@ -144,13 +133,14 @@ let mobContentObj = {
144 133
 				$.each(result.gridRows, function (i, item) {
145 134
 					$('#ITP_LIST_MPOMNG05010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_LIST_ITEM_ROWCOPY').html());
146 135
 					var $li = $('#ITP_LIST_MPOMNG05010_LIST_ITEM_AREA .panel-group > .list-row:last');
147
-					$li.find('.fnPodrDt').text(item.podrDt);
148
-					$li.find('.fnPodrMgrNm').text(item.podrMgrNm);
149
-					$li.find('.fnPchodrStCd').text(item.pchOdrStNm);
150
-					$li.find('.fnLocationNm').text(item.whsNm + ' - ' + item.locationNm);
151
-					$li.find('.fnItemQty').text($li.find('.fnItemQty').text().replace('$', item.podrItemQty));
152
-					$li.find('.fnPodrTotalAmt').text(CommonObj.comma.set(item.podrTotalAmt));
136
+					$li.find('.fnDlvSttmtUnqNo').text(item.dlvSttmtUnqNo);
137
+					$li.find('.fnDlvReqDt').text(item.dlvReqDt);
138
+					$li.find('.fnDlvSchDt').text(item.dlvSchDt);
153 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));
154 144
 					_this.rows.push(item);
155 145
 				});
156 146
 			};
@@ -163,49 +153,6 @@ let mobContentObj = {
163 153
 			console.log(JSON.stringify(param));
164 154
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
165 155
 		}
166
-	},
167
-	view: {
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 = {'pchPodrUnqNo': item.pchPodrUnqNo};
179
-			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
180
-		},
181
-		view: function(result) {
182
-			var _this = this;
183
-			var id = '#ITP_AJAX_MPOMNG05010_VIEW_CONTAINER';
184
-			$(id).find('.fnPodrDt').text(result.podrDt);
185
-			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrTotalAmt));
186
-			$(id).find('.fnShmtWhsDvsnNm').text(result.shmtWhsDvsnNm);
187
-			$(id).find('.fnSpplyNm').text(result.spplyNm);
188
-			$(id).find('.fnDlvReqDt').text(result.dlvReqDt);
189
-			$.each(result.pchOdrDtlList, function (i, item) {
190
-				$('#ITP_LIST_MPOMNG05010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_VIEW_ITEM_ROWCOPY').html());
191
-				var $li = $('#ITP_LIST_MPOMNG05010_VIEW_ITEM_AREA .panel-group > .list-row:last');
192
-				console.log(item);
193
-				$li.find('.fnItemNm').text(item.itemNm);
194
-				$li.find('.fnUnit').text(item.unit);
195
-				$li.find('.fnPodrQty').text(CommonObj.currency.add(item.podrQty));
196
-				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
197
-				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
198
-			});
199
-		},
200
-		cancel: function () {
201
-			var id = '#ITP_AJAX_MPOMNG05010_VIEW_CONTAINER';
202
-			$(id).find('.fnPodrDt').text('');
203
-			$(id).find('.fnPodrTotalAmt').text('');
204
-			$(id).find('.fnShmtWhsDvsnNm').text('');
205
-			$(id).find('.fnSpplyNm').text('');
206
-			$('#ITP_LIST_MPOMNG05010_VIEW_ITEM_AREA .panel-group').empty();
207
-			mobPageObj.switchScreen(PAGE_MODE_LIST);
208
-		}
209 156
 	}
210 157
 };
211 158
 

+ 332 - 0
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG06010.js

@@ -0,0 +1,332 @@
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/warehouse-target-grid-list';	// 목록
10
+const API_MOBILE_SAVE 				= '/api/pomng/inoutmng/save-warehouse';				// 저장
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_MPOMNG06010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', 0));
39
+			$('#ITP_FORM_MPOMNG06010_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_MPOMNG06010_LIST"]').on('click', function() {
52
+				var id = $(this).attr('id');
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;
60
+				}
61
+				return false;
62
+			});
63
+
64
+			$(document).on('click', '#ITP_POP_MPOMNG06010_LIST_SPPLY_ROWS li button', function() {
65
+				mobPopObj.popSpply.choice($(this));
66
+			});
67
+
68
+			$(document).on('click', '#ITP_LIST_MPOMNG06010_POP_WHS_ROWS li button', function() {
69
+				mobPopObj.popWhsNm.choice($(this));
70
+			});
71
+		}
72
+	},
73
+	switchScreen: function(mode) {
74
+		$('#ITP_MOBILE_MPOMNG06010').find('div[id$="_CONTAINER"]').each(function(i) {
75
+			$(this).hide();
76
+		});
77
+		if(mode === PAGE_MODE_LIST) {
78
+			$('#ITP_AJAX_MPOMNG06010_LIST_CONTAINER').show();
79
+			this.moreView(true);
80
+		}
81
+		this.viewMode = mode;
82
+	},
83
+	moreView: function(isScroll) {
84
+		var _this = this;
85
+		if(isScroll) {
86
+			$('#ITP_LIST_MPOMNG06010_LIST_ITEM_AREA').on('scroll', function () {
87
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
88
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
89
+						if(!mobContentObj.list.isSearch) {
90
+							mobContentObj.list.load();
91
+						}
92
+					}
93
+				}
94
+			});
95
+		} else {
96
+			$('#ITP_LIST_MPOMNG06010_LIST_AREA').off('scroll');
97
+		}
98
+	},
99
+	ready: function() {
100
+		mobContentObj.list.init();
101
+	}
102
+};
103
+
104
+let mobContentObj = {
105
+	list: {
106
+		listSize: 10,
107
+		listPage: 0,
108
+		totPage: 0,
109
+		isSearch: false,
110
+		rows: [],
111
+		init: function() {
112
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
113
+			// this.search();
114
+		},
115
+		search: function() {
116
+			var formId = '#ITP_FORM_MPOMNG06010_LIST_SEARCH';
117
+			if (itp_fn_form_event.isValid(formId)) {
118
+				this.listPage = 0;
119
+				this.totPage = 0;
120
+				this.rows.length = 0;
121
+				$('#ITP_LIST_MPOMNG06010_LIST_ITEM_ROWS').empty();
122
+				this.load();
123
+			}
124
+		},
125
+		load: function() {
126
+			var _this = this;
127
+			this.isSearch = true;
128
+			var callbackFn = function(result) {
129
+				console.log(result);
130
+				_this.isSearch = false;
131
+				_this.totPage = result.gridTotal;
132
+				$.each(result.gridRows, function (i, item) {
133
+					$('#ITP_LIST_MPOMNG06010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG06010_LIST_ITEM_ROWCOPY').html());
134
+					var $li = $('#ITP_LIST_MPOMNG06010_LIST_ITEM_AREA .panel-group > .list-row:last');
135
+					$li.find('.fnDlvSttmtUnqNo').text(item.dlvSttmtUnqNo);
136
+					$li.find('.fnDlvSchDt').text(item.dlvSchDt);
137
+					$li.find('.fnSpplyNm').text(item.spplyNm);
138
+					$li.find('.fnWhsNm').text(item.whsNm);
139
+					$li.find('.fnItemNm').text(item.itemNm + '(' + item.podrQty + item.unit + ')');
140
+					$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
141
+					$li.find('.fnDlvQty').text(CommonObj.comma.set(item.dlvQty));
142
+					$li.find('.fnWhsQty').val(item.whsQty);
143
+					_this.rows.push(item);
144
+				});
145
+			};
146
+			var errFn = function() { _this.isSearch = false;};
147
+			const param = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH').serializeObject();
148
+			param.gridPage = ++this.listPage;
149
+			param.gridSize = this.listSize;
150
+			param.fromDt = param.fromDt.replace(/-/g, ".");
151
+			param.toDt = param.toDt.replace(/-/g, ".");
152
+			console.log(JSON.stringify(param));
153
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
154
+		},
155
+		save: function() {
156
+			var _this = this;
157
+			var gridInsertData = [];
158
+			$('#ITP_LIST_MPOMNG06010_LIST_ITEM_ROWS li').each(function(index) {
159
+				var whsQty = $(this).find('input[name="whsQty"]').val();
160
+				if(whsQty !== '') {
161
+					var item = {
162
+						'dlvSttmtDtlNo'	: _this.rows[index].dlvSttmtDtlNo,
163
+						'dlvSttmtUnqNo'	: _this.rows[index].dlvSttmtUnqNo,
164
+						'itemId'		: _this.rows[index].itemId,
165
+						'whsQty'		: whsQty
166
+					};
167
+					gridInsertData.push(item);
168
+				}
169
+			});
170
+			if(gridInsertData.length > 0) {
171
+				var modalFn = {
172
+					callBack: (args) => {
173
+						let param = {};
174
+						param['viewCd'] = 'C';
175
+						param['brandId'] = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID').val();
176
+						param['storeId'] = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID').val();
177
+						param['whsId'] = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_ID').val();
178
+						param['gridInsertData'] = gridInsertData;
179
+						console.log(JSON.stringify(param));
180
+						var saveFn = function () {
181
+						};
182
+						fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), saveFn, 'POST');
183
+					}
184
+				};
185
+				itp_fn_modal_confirm('저장 하시겠습니까?', modalFn);
186
+			}
187
+		}
188
+	}
189
+};
190
+
191
+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
+	popWhsNm: {
257
+		popId: 'ITP_POP_MPOMNG06010_WHS_AREA',
258
+		rows: [],
259
+		init: function () {
260
+			this.rows.length = 0;
261
+			mobPopObj.show(this.popId);
262
+			this.search();
263
+			this.action();
264
+		},
265
+		search: function () {
266
+			var _this = this;
267
+			$('#ITP_LIST_MPOMNG06010_POP_WHS_AREA .panel-group').empty();
268
+			var callbackFn = function(result) {
269
+				console.log(result);
270
+				_this.view(result.gridRows);
271
+			};
272
+			const param = $('#ITP_FORM_MPOMNG06010_POP_WHS').serializeObject();
273
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
274
+		},
275
+		view: function(gridRows) {
276
+			this.rows = gridRows;
277
+			$.each(gridRows, function (i, item) {
278
+				$('#ITP_LIST_MPOMNG06010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MPOMNG06010_POP_WHS_ROWCOPY').html());
279
+				var $li = $('#ITP_LIST_MPOMNG06010_POP_WHS_AREA .panel-group > .list-row:last');
280
+				$li.find('.fnWhsNm').text(item.whsNm);
281
+				$li.find('.fnLocationNm').text(item.locationNm);
282
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
283
+			});
284
+		},
285
+		choice: function(elem) {
286
+			var _this = this;
287
+			var whsId = $(elem).data('whs-id');
288
+			$.each(this.rows, function (i, item) {
289
+				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);
292
+					_this.close();
293
+					return false;
294
+				}
295
+			});
296
+		},
297
+		action: function() {
298
+			var _this = this;
299
+			$('button[id^="ITP_BTN_MPOMNG06010_POP_WHS"]').off('click').on('click', function() {
300
+				var id = $(this).attr('id');
301
+				switch (id) {
302
+					case 'ITP_BTN_MPOMNG06010_POP_WHS_SEARCH'	: _this.search();			break;
303
+					case 'ITP_BTN_MPOMNG06010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
304
+					case 'ITP_BTN_MPOMNG06010_POP_WHS_CLOSE'	: _this.close(); 			break;
305
+				}
306
+				return false;
307
+			});
308
+		},
309
+		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('');
312
+		},
313
+		close: function() {
314
+			this.rows.length = 0;
315
+			$('#ITP_POP_MPOMNG06010_LIST_WHS_AREA .panel-group').empty();
316
+			$('#ITP_FORM_MPOMNG06010_POP_WHS #ITP_FORM_MPOMNG06010_POP_WHS_KEYWORD').val('');
317
+			mobPopObj.hide(this.popId);
318
+		}
319
+	},
320
+	show: function(popId) {
321
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
322
+			console.log($(this).attr('id'));
323
+			if($(this).hasClass('btn-pop-close')) {
324
+				mobPopObj.hide(popId);
325
+			}
326
+		});
327
+		$('#' + popId).show();
328
+	},
329
+	hide: function(popId) {
330
+		$('#' + popId).closest('.mobile-pop-close').hide();
331
+	}
332
+};

+ 300 - 0
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG07010.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/pomng/inoutmng/deli-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/po/info-pchOdr';			// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+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_MPOMNG05010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
39
+			$('#ITP_FORM_MPOMNG05010_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_MPOMNG05010_LIST"]').on('click', function() {
52
+				var id = $(this).attr('id');
53
+				switch (id) {
54
+					case 'ITP_BTN_MPOMNG05010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
55
+					case 'ITP_BTN_MPOMNG05010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
56
+					case 'ITP_BTN_MPOMNG05010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
57
+					case 'ITP_BTN_MPOMNG05010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
58
+					case 'ITP_BTN_MPOMNG05010_LIST_SEARCH'			: mobContentObj.list.search();	break;
59
+				}
60
+				return false;
61
+			});
62
+
63
+			$(document).on('click', '#ITP_LIST_MPOMNG05010_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_MPOMNG05010_LIST_SPPLY_ROWS li button', function() {
69
+				mobPopObj.popSpply.choice($(this));
70
+			});
71
+
72
+			$(document).on('click', '#ITP_LIST_MPOMNG05010_POP_WHS_ROWS li button', function() {
73
+				mobPopObj.popWhsNm.choice($(this));
74
+			});
75
+		}
76
+	},
77
+	switchScreen: function(mode) {
78
+		$('#ITP_MOBILE_MPOMNG05010').find('div[id$="_CONTAINER"]').each(function(i) {
79
+			$(this).hide();
80
+		});
81
+		if(mode === PAGE_MODE_LIST) {
82
+			$('#ITP_AJAX_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_LIST_ITEM_ROWCOPY').html());
135
+					var $li = $('#ITP_LIST_MPOMNG05010_LIST_ITEM_AREA .panel-group > .list-row:last');
136
+					$li.find('.fnDlvSttmtUnqNo').text(item.dlvSttmtUnqNo);
137
+					$li.find('.fnDlvReqDt').text(item.dlvReqDt);
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_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MPOMNG05010_LIST_SPPLY_ROWCOPY').html());
183
+				var $li = $('#ITP_POP_MPOMNG05010_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_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
195
+					$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_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_MPOMNG05010_POP_SPPLY"]').off('click').on('click', function() {
204
+				var id = $(this).attr('id');
205
+				switch (id) {
206
+					case 'ITP_BTN_MPOMNG05010_POP_SPPLY_SEARCH'	: _this.search();			break;
207
+					case 'ITP_BTN_MPOMNG05010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
208
+					case 'ITP_BTN_MPOMNG05010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
209
+				}
210
+				return false;
211
+			});
212
+		},
213
+		delete: function() {
214
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_ID').val('');
215
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_NM').val('');
216
+		},
217
+		close: function() {
218
+			this.rows.length = 0;
219
+			$('#ITP_POP_MPOMNG05010_LIST_SPPLY_AREA .panel-group').empty();
220
+			$('#ITP_FORM_MPOMNG05010_POP_SPPLY_SEARCH #ITP_FORM_MPOMNG05010_POP_SPPLY_KEYWORD').val('');
221
+			mobPopObj.hide(this.popId);
222
+		}
223
+	},
224
+	popWhsNm: {
225
+		popId: 'ITP_POP_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_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_MPOMNG05010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_POP_WHS_ROWCOPY').html());
247
+				var $li = $('#ITP_LIST_MPOMNG05010_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_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_ID').val(item.whsId);
259
+					$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_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_MPOMNG05010_POP_WHS"]').off('click').on('click', function() {
268
+				var id = $(this).attr('id');
269
+				switch (id) {
270
+					case 'ITP_BTN_MPOMNG05010_POP_WHS_SEARCH'	: _this.search();			break;
271
+					case 'ITP_BTN_MPOMNG05010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
272
+					case 'ITP_BTN_MPOMNG05010_POP_WHS_CLOSE'	: _this.close(); 			break;
273
+				}
274
+				return false;
275
+			});
276
+		},
277
+		delete: function() {
278
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_ID').val('');
279
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_NM').val('');
280
+		},
281
+		close: function() {
282
+			this.rows.length = 0;
283
+			$('#ITP_POP_MPOMNG05010_LIST_WHS_AREA .panel-group').empty();
284
+			$('#ITP_FORM_MPOMNG05010_POP_WHS #ITP_FORM_MPOMNG05010_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
+};

+ 3 - 0
src/main/webapp/mobile/js/config.js

@@ -646,6 +646,9 @@ let CommonObj = {
646 646
 		return JSON.stringify(param);
647 647
 	},
648 648
 	init: function() {
649
+
650
+		$('.modal.itp_modal .modal-content').draggable();
651
+
649 652
 		$.fn.serializeObject = function() {
650 653
 			var result = {};
651 654
 			var extend = function(i, element) {