Sfoglia il codice sorgente

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

# Conflicts:
#	src/main/webapp/js/app/locales/locale-ko.js
juney 2 anni fa
parent
commit
bcd56f927d

+ 18 - 25
bin/src/main/webapp/app/oper/OPER03010.html

@@ -56,6 +56,7 @@
56 56
 						<div class="col-xs-12">
57 57
 							<form id="ITP_FORM_OPER03010_DETAIL" class="form-horizontal">
58 58
 								<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_VIEW_CD" name="viewCd" value="C">
59
+								<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_AFFL_SHOP_ID" class="form-control itp_input" name="afflShopId">
59 60
 								<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_CMPY_LOCATION" name="cmpyLocation" value="">
60 61
 					
61 62
 								<section class="itp_form_sec">
@@ -76,17 +77,15 @@
76 77
 										<div class="form-group">
77 78
 											<label class="col-xs-2 itp_lb">가맹점 명 *</label>
78 79
 											<div class="col-xs-4 itp_ip">
79
-												<div class="col-xs-7 itp_in">
80
-													<input type="text" id="ITP_FORM_OPER03010_DETAIL_AFFL_SHOP_NM" class="form-control itp_input" name="afflShopNm" value="" maxlength="10">
81
-												</div>
80
+												<div class="col-xs-7 itp_in fnAfflShopNm"></div>
82 81
 											</div>
83 82
 											<label class="col-xs-2 itp_lb">가맹점 KEY *<br>사용자 계정 추가-3자리</label>
84 83
 											<div class="col-xs-4 itp_ip">
85 84
 												<div class="col-xs-4 itp_in">
86 85
 													<div class="input-group">
87
-														<input type="text" id="ITP_FORM_OPER03010_DETAIL_" class="form-control itp_input" name="" value="" maxlength="10" readonly>
86
+														<input type="text" id="ITP_FORM_OPER03010_DETAIL_AFFL_SHOP_KEY" class="form-control itp_input" name="" value="" maxlength="10" readonly>
88 87
 														<span class="input-group-btn">
89
-															<button id="ITP_FORM_OPER03010_DETAIL_" class="btn btn-default btn-sm itp_btn SHOW" type="button" disabled><i class="glyphicon glyphicon-ok"></i></button>
88
+															<button id="ITP_BTN_OPER03010_DETAIL_AFFL_SHOP_KEY" class="btn btn-default btn-sm itp_btn SHOW" type="button" disabled><i class="glyphicon glyphicon-ok"></i></button>
90 89
 														</span>
91 90
 													</div>
92 91
 												</div>
@@ -119,13 +118,13 @@
119 118
 											<label class="col-xs-2 itp_lb">가맹점 구분</label>
120 119
 											<div class="col-xs-4 itp_ip">
121 120
 												<div class="col-xs-7 itp_in">
122
-													<select id="ITP_FORM_OPER03010_DETAIL_" class="form-control itp_input" name=""></select>
121
+													<select id="ITP_FORM_OPER03010_DETAIL_AUTH_TYPE" class="form-control itp_input" name=""></select>
123 122
 												</div>
124 123
 												<!-- <button type="button" id="ITP_BTN_STINFO01010_RESET_PW" class="btn btn-danger btn-xs PWC" style="margin: 3px 0px 0px 3px;">비밀번호 초기화</button> -->
125 124
 											</div>
126 125
 											<label class="col-xs-2 itp_lb"></label>
127 126
 											<div class="col-xs-4 itp_in">
128
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_STINFO01010_DETAIL_ "style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="" >																					
127
+												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_STINFO01010_DETAIL_ "style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="" >
129 128
 											</div>
130 129
 										</div>
131 130
 										<div class="form-group">
@@ -260,8 +259,8 @@
260 259
 					<div class="itp_form itp_type1 fix">
261 260
 						<div class="col-xs-12">
262 261
 							<form id="ITP_FORM_OPER03010_VIEW" class="form-horizontal">
263
-								<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_VIEW_CD" name="viewCd" value="C">
264
-								<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_CMPY_LOCATION" name="cmpyLocation" value="">
262
+								<input type="hidden" id="ITP_FORM_OPER03010_VIEW_VIEW_CD" name="viewCd" value="R">
263
+								<input type="hidden" id="ITP_FORM_OPER03010_VIEW_AFFL_SHOP_ID" name="afflShopId" value="">
265 264
 					
266 265
 								<section class="itp_form_sec">
267 266
 									<h4 class="itp_form_tit">가맹점정보</h4>
@@ -303,7 +302,7 @@
303 302
 											</div>
304 303
 											<label class="col-xs-2 itp_lb"></label>
305 304
 											<div class="col-xs-4 itp_in">
306
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_STINFO01010_DETAIL_ "style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="" >																					
305
+												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_STINFO01010_DETAIL_LOGO "style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="" >
307 306
 											</div>
308 307
 										</div>
309 308
 										<div class="form-group">
@@ -371,30 +370,24 @@
371 370
 													<div class="col-xs-2 itp_in fnLoadAddr"></div>
372 371
 													<div class="col-xs-3 itp_in fnDtlAddr"></div>
373 372
 												</div>
374
-												
373
+
375 374
 												<!-- 주소 맵 -->
376
-												<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_LOTS_ADDRESS" value="" />
377
-												<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_STREET_ADDRESS" value="" />
378
-												<input type="hidden" name="cmpyLat" id="ITP_FORM_OPER03010_DETAIL_LAT" value="" />
379
-												<input type="hidden" name="cmpyLng" id="ITP_FORM_OPER03010_DETAIL_LNG" value="" />
380
-												<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_HJ_DONG" value="" />
381
-												<input type="hidden" id="ITP_FORM_OPER03010_DETAIL_BJ_DONG" value="" />
382
-												<div id="ITP_FORM_OPER03010_DETAIL_MAP" style="width:700px; height:400px;"></div>
375
+												<div id="ITP_FORM_OPER03010_VIEW_MAP" style="width:700px; height:400px;"></div>
383 376
 											</div>
384 377
 										</div>
385 378
 									</div>
386 379
 								</section>								
387 380
 							</form>
388 381
 						</div>
389
-					</div>	
382
+					</div>
390 383
 					<div class="itp_table fix">
391
-						<div id="ITP_OPER03010_DETAIL_jqGrid_list" class="itp_tb_list">
392
-							<div id="ITP_OPER03010_DETAIL_jqGridView" class="itp_views fix"></div>
393
-							<table id="ITP_OPER03010_DETAIL_jqGrid"></table>
394
-							<div id="ITP_OPER03010_DETAIL_jqGridPager"></div>
395
-							<div id="ITP_OPER03010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
384
+						<div id="ITP_OPER03010_VIEW_jqGrid_list" class="itp_tb_list">
385
+							<div id="ITP_OPER03010_VIEW_jqGridView" class="itp_views fix"></div>
386
+							<table id="ITP_OPER03010_VIEW_jqGrid"></table>
387
+							<div id="ITP_OPER03010_VIEW_jqGridPager"></div>
388
+							<div id="ITP_OPER03010_VIEW_jqGridEmpty" class="itp_no_data"></div>
396 389
 						</div>
397
-					</div>				
390
+					</div>
398 391
 				</div>
399 392
 			</div>
400 393
 		</article>

+ 33 - 120
bin/src/main/webapp/app/stockmng/STOCKMNG04010.html

@@ -5,7 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>창고관리</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 				    <button type="button" id="ITP_BTN_STOCKMNG04010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-				    <button type="button" id="ITP_BTN_STOCKMNG04010_MODIFY" class="btn btn-success btn-sm NEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;신규등록&nbsp;&nbsp;</button>
8
+				    <button type="button" id="ITP_BTN_STOCKMNG04010_NEWREG" class="btn btn-success btn-sm NEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;신규등록&nbsp;&nbsp;</button>
9 9
 				    <button type="button" id="ITP_BTN_STOCKMNG04010_SAVE" class="btn btn-success btn-sm SAB"><i class="glyphicon "></i>&nbsp;&nbsp;저장&nbsp;&nbsp;</button>
10 10
 					<button type="button" id="ITP_BTN_STOCKMNG04010_MODIFY" class="btn btn-success btn-sm UPB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수정&nbsp;&nbsp;</button>
11 11
 				    <button type="button" id="ITP_BTN_STOCKMNG04010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i> &nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
@@ -17,16 +17,18 @@
17 17
 						<div class="itp_srh_border fix">
18 18
 							<div class="col-xs-12">
19 19
 								<form id="ITP_FORM_STOCKMNG04010_SEARCH" class="form-horizontal">
20
+									<input type="hidden" id="ITP_FORM_STOCKMNG04010_SEARCH_BRAND_ID" name="sbrandId" value="">
21
+									
20 22
 									<div class="form-group">
21 23
 										<div class="col-xs-10">
22 24
 											<div class="col-xs-2 itp_ip itp_noMar">
23
-												<select id="ITP_FORM_STOCKMNG04010_WHS_DVSN" class="form-control itp_input" name="sWhsDvsn"></select>										
25
+												<select id="ITP_FORM_STOCKMNG04010_WHS_DVSN" class="form-control itp_input" name="swhsDvsn"></select>										
24 26
 											</div>
25 27
 											<div class="col-xs-2 itp_ip itp_noMar">
26
-												<select id="ITP_FORM_STOCKMNG04010_WHS_ST_CD" class="form-control itp_input" name="sWhsStCd"></select>										
28
+												<select id="ITP_FORM_STOCKMNG04010_WHS_ST_CD" class="form-control itp_input" name="swhsStCd"></select>										
27 29
 											</div>
28 30
 											<div class="col-xs-5 itp_ip itp_noMar">
29
-												<input type="text" id="ITP_FORM_STOCKMNG04010_SEARCH_WHS_NM" class="form-control itp_input" name="sWhsNm" placeholder="창고명" />
31
+												<input type="text" id="ITP_FORM_STOCKMNG04010_SEARCH_WHS_NM" class="form-control itp_input" name="swhsNm" placeholder="창고명" />
30 32
 											</div>
31 33
 										</div>
32 34
 									</div>
@@ -48,21 +50,22 @@
48 50
 				        <div class="col-xs-12">
49 51
 				            <form id="ITP_FORM_STOCKMNG04010_DETAIL" class="form-horizontal">
50 52
 				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD" name="viewCd" value="C">
53
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_BRAND_ID" name="brandId" value="">
54
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_STORE_ID" name="storeId" value="">
55
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_ID" name="whsId" value="">
51 56
 				    
52 57
 				                <section class="itp_form_sec">
53 58
 				                    <h4 class="itp_form_tit">브랜드 정보</h4>
54 59
 				                    <div class="itp_form_in">
55 60
 				                        <div class="form-group">
56
-				                            <label class="col-xs-2 itp_lb">브랜드 코드</label>
61
+				                            <label class="col-xs-2 itp_lb">브랜드</label>
57 62
 				                                <div class="col-xs-4 itp_ip">
58
-				                                    <div class="col-xs-9 itp_in fnBrandUnitUnqNo"></div>												
63
+				                                    <div class="col-xs-9 itp_in fnBrandNm"></div>												
59 64
 				                                </div>
60 65
 				                            <label class="col-xs-2 itp_lb">상태*</label>
61 66
 				                            <div class="col-xs-4 itp_ip">
62 67
 				                                <div class="col-xs-8 itp_in">
63
-				                                    <select id="ITP_FORM_STOCKMNG04010_DETAIL_ST_CD" class="form-control itp_input" name="stCd">
64
-				                                    	<option value="">운영/미운영</option>
65
-				                                    </select>
68
+				                                    <select id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_ST_CD" class="form-control itp_input" name="whsStCd"></select>
66 69
 				                                </div>
67 70
 				                            </div>
68 71
 				                        </div>
@@ -74,7 +77,7 @@
74 77
 				                            <label class="col-xs-2 itp_lb">창고명</label>
75 78
 				                            <div class="col-xs-4 itp_ip">
76 79
 				                                <div class="col-xs-8 itp_in">
77
-			                                    	<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="서울 창고" maxlength="20">
80
+			                                    	<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="" maxlength="20">
78 81
 				                                </div>
79 82
 				                            </div>
80 83
 				                        </div>
@@ -82,7 +85,7 @@
82 85
 				                            <label class="col-xs-2 itp_lb">연락처</label>
83 86
 				                            <div class="col-xs-4 itp_ip">
84 87
 				                                <div class="col-xs-8 itp_in">
85
-				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_TEL_NO" class="form-control itp_input" name="telNo" value="###-####-####" maxlength="20">
88
+				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_MGR_TEL_NO" class="form-control itp_input" name="mgrTelNo" value="" maxlength="20" placeholder="###-####-####">
86 89
 				                                </div>
87 90
 				                            </div>
88 91
 				                            <label class="col-xs-2 itp_lb">담당자명</label>
@@ -96,15 +99,15 @@
96 99
 				                            <label class="col-xs-2 itp_lb">매장명</label>
97 100
 				                            <div class="col-xs-4 itp_ip">
98 101
 				                                <div class="col-xs-5 itp_in">
99
-													<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sSpplyNm" value="공급업체" />
102
+													<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_STORE_NM" class="form-control itp_input" name="storeNm" value="" readonly="readonly" />
100 103
 												</div>
101
-												<div class="col-xs-3 itp_in" style="padding:0px;">
102
-													<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
103
-													<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
104
+												<div class="col-xs-3 itp_in" style="padding:0px; margin-left: 3px;">
105
+													<button type="button" id="ITP_BTN_STOCKMNG04010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
106
+													<button type="button" id="ITP_BTN_STOCKMNG04010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
104 107
 								                </div>
105 108
 				                            </div>
106
-				                            <label class="col-xs-2 itp_lb"></label>
107
-				                            <div class="col-xs-4 itp_ip"></div>
109
+				                            <label class="col-xs-2 itp_lb">등록일시</label>
110
+				                            <div class="col-xs-4 itp_ip fnRegDtm"></div>				                            
108 111
 				                        </div>
109 112
 				                    </div>
110 113
 			                        <div class="itp_form_in">	
@@ -112,16 +115,16 @@
112 115
 			                                <label class="col-xs-2 itp_lb">주소</label>
113 116
 			                                <div class="col-xs-10 itp_ip">
114 117
 			                                    <div class="col-xs-2 itp_in">
115
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" placeholder="우편번호">													
118
+			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" placeholder="우편번호" readonly="readonly">													
116 119
 			                                    </div>
117 120
 			                                    <div class="col-xs-2 itp_in" style="width:10%;">
118
-			                                        <button type="button" id="ITP_FORM_STOCKMNG04010_DETAIL_FILE_SEARCH" class="btn btn-primary btn-sm FILE_SEARCH" style="margin:0 3px;">&nbsp;&nbsp;주소찾기&nbsp;&nbsp;</button>
121
+			                                        <button type="button" id="ITP_FORM_STOCKMNG04010_DETAIL_ADDRESS_SEARCH" class="btn btn-primary btn-sm ADDS" style="margin:0 3px;">&nbsp;&nbsp;주소찾기&nbsp;&nbsp;</button>
119 122
 			                                    </div>
120 123
 			                                    <div class="col-xs-4 itp_in" style="margin:0 5px;">
121
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR" class="form-control itp_input" name="loadAddr" value="" placeholder="기본주소">													
124
+			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR" class="form-control itp_input" name="addr1" value="" placeholder="기본주소" readonly="readonly">													
122 125
 			                                    </div>
123 126
 			                                    <div class="col-xs-4 itp_in">
124
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR" class="form-control itp_input" name="dtlAddr" value="" placeholder="상세주소">													
127
+			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR" class="form-control itp_input" name="addr2" value="" placeholder="상세주소">													
125 128
 			                                    </div>
126 129
 			                                </div>
127 130
 			                            </div>	
@@ -151,14 +154,17 @@
151 154
 				        <div class="col-xs-12">
152 155
 				            <form id="ITP_FORM_STOCKMNG04010_VIEW" class="form-horizontal">
153 156
 				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_VIEW_CD" name="viewCd" value="C">
157
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_BRAND_ID" name="brandId" value="">
158
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_STORE_ID" name="storeId" value="">
159
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_WHS_ID" name="whsId" value="">
154 160
 				    
155 161
 				                <section class="itp_form_sec">
156 162
 				                    <h4 class="itp_form_tit">브랜드 정보</h4>
157 163
 				                    <div class="itp_form_in">
158 164
 				                        <div class="form-group">
159
-				                            <label class="col-xs-2 itp_lb">브랜드 코드</label>
165
+				                            <label class="col-xs-2 itp_lb">브랜드</label>
160 166
 				                                <div class="col-xs-4 itp_ip">
161
-				                                    <div class="col-xs-9 itp_in fnBrandUnitUnqNo"></div>												
167
+				                                    <div class="col-xs-9 itp_in fnBrandNm"></div>												
162 168
 				                                </div>
163 169
 				                            <label class="col-xs-2 itp_lb">상태*</label>
164 170
 				                            <div class="col-xs-4 itp_ip">
@@ -190,18 +196,14 @@
190 196
 				                            <div class="col-xs-4 itp_ip">
191 197
 				                                <div class="col-xs-5 itp_in fnSpplyNm"></div>
192 198
 				                            </div>
193
-				                            <label class="col-xs-2 itp_lb"></label>
194
-				                            <div class="col-xs-4 itp_ip"></div>
199
+				                            <label class="col-xs-2 itp_lb">등록일시</label>
200
+				                            <div class="col-xs-4 itp_ip fnRegDtm"></div>
195 201
 				                        </div>
196 202
 				                    </div>
197 203
 			                        <div class="itp_form_in">	
198 204
 			                            <div class="form-group">
199 205
 			                                <label class="col-xs-2 itp_lb">주소</label>
200
-			                                <div class="col-xs-10 itp_ip">
201
-												<div class="col-xs-1 itp_in fnZipNo"></div>
202
-												<div class="col-xs-2 itp_in fnLoadAddr"></div>
203
-												<div class="col-xs-2 itp_in fnDtlAddr"></div>	
204
-											</div>
206
+			                                <div class="col-xs-10 itp_ip fnAddress"></div>
205 207
 			                            </div>	
206 208
 			                        </div>	
207 209
 				                </section>								
@@ -219,96 +221,7 @@
219 221
 					        <div id="ITP_STOCKMNG04010_VIEW_jqGridEmpty" class="itp_no_data"></div>
220 222
 					    </div>
221 223
 					</div>
222
-				</div>
223
-				<div id="ITP_AJAX_STOCKMNG04010_DETAIL_CONTAINER">
224
-				    <div class="itp_form itp_type1 fix">
225
-				        <div class="col-xs-12">
226
-				            <form id="ITP_FORM_STOCKMNG04010_DETAIL" class="form-horizontal">
227
-				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD" name="viewCd" value="C">
228
-				    
229
-				                <section class="itp_form_sec">
230
-				                    <h4 class="itp_form_tit">브랜드 정보</h4>
231
-				                    <div class="itp_form_in">
232
-				                        <div class="form-group">
233
-				                            <label class="col-xs-2 itp_lb">브랜드 코드</label>
234
-				                                <div class="col-xs-4 itp_ip">
235
-				                                    <div class="col-xs-9 itp_in fnBrandUnitUnqNo"></div>												
236
-				                                </div>
237
-				                            <label class="col-xs-2 itp_lb">상태*</label>
238
-				                            <div class="col-xs-4 itp_ip">
239
-				                                <div class="col-xs-8 itp_in">
240
-				                                    <select id="ITP_FORM_STOCKMNG04010_DETAIL_ST_CD" class="form-control itp_input" name="stCd">
241
-				                                    	<option value="">운영/미운영</option>
242
-				                                    </select>
243
-				                                </div>
244
-				                            </div>
245
-				                        </div>
246
-				                        <div class="form-group">
247
-				                            <label class="col-xs-2 itp_lb">창고코드 </label>
248
-				                            <div class="col-xs-4 itp_ip">
249
-				                                <div class="col-xs-8 itp_in fnWhsId"></div>
250
-				                            </div>
251
-				                            <label class="col-xs-2 itp_lb">창고명</label>
252
-				                            <div class="col-xs-4 itp_ip">
253
-				                                <div class="col-xs-8 itp_in">
254
-			                                    	<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="서울 창고" maxlength="20">
255
-				                                </div>
256
-				                            </div>
257
-				                        </div>
258
-				                        <div class="form-group">
259
-				                            <label class="col-xs-2 itp_lb">연락처</label>
260
-				                            <div class="col-xs-4 itp_ip">
261
-				                                <div class="col-xs-8 itp_in">
262
-				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_TEL_NO" class="form-control itp_input" name="telNo" value="###-####-####" maxlength="20">
263
-				                                </div>
264
-				                            </div>
265
-				                            <label class="col-xs-2 itp_lb">담당자명</label>
266
-				                            <div class="col-xs-4 itp_ip">
267
-				                                <div class="col-xs-8 itp_in">
268
-				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_MGR_NM" class="form-control itp_input" name="mgrNm" value="" maxlength="20">
269
-				                                </div>
270
-				                            </div>
271
-				                        </div>
272
-				                    </div>
273
-			                        <div class="itp_form_in">	
274
-			                            <div class="form-group">
275
-			                                <label class="col-xs-2 itp_lb">주소</label>
276
-			                                <div class="col-xs-10 itp_ip">
277
-			                                    <div class="col-xs-2 itp_in">
278
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" placeholder="우편번호">													
279
-			                                    </div>
280
-			                                    <div class="col-xs-2 itp_in" style="width:10%;">
281
-			                                        <button type="button" id="ITP_FORM_STOCKMNG04010_DETAIL_FILE_SEARCH" class="btn btn-primary btn-sm FILE_SEARCH" style="margin:0 3px;">&nbsp;&nbsp;주소찾기&nbsp;&nbsp;</button>
282
-			                                    </div>
283
-			                                    <div class="col-xs-4 itp_in" style="margin:0 5px;">
284
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR" class="form-control itp_input" name="loadAddr" value="" placeholder="기본주소">													
285
-			                                    </div>
286
-			                                    <div class="col-xs-4 itp_in">
287
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR" class="form-control itp_input" name="dtlAddr" value="" placeholder="상세주소">													
288
-			                                    </div>
289
-			                                </div>
290
-			                            </div>	
291
-			                        </div>	
292
-				                </section>								
293
-				            </form>
294
-				        </div>
295
-				    </div>
296
-				    <div class="itp_table fix">
297
-					    <div class="itp_table_head fix" style="background:#f5f5f5;">
298
-					        <h4 class="itp_table_tit">Location 정보</h4>
299
-					        <div class="pull-right itp_cicon">
300
-					            <button type="button" id="ITP_BTN_STOCKMNG04010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;행추가&nbsp;&nbsp;</button>
301
-					            <button type="button" id="ITP_BTN_STOCKMNG04010_DETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon"></i>&nbsp;&nbsp;행삭제&nbsp;&nbsp;</button>									
302
-					        </div>
303
-					    </div>
304
-					    <div id="ITP_STOCKMNG04010_DETAIL_jqGrid_list" class="itp_tb_list">
305
-					        <div id="ITP_STOCKMNG04010_DETAIL_jqGridView" class="itp_views fix"></div>
306
-					        <table id="ITP_STOCKMNG04010_DETAIL_jqGrid"></table>
307
-					        <div id="ITP_STOCKMNG04010_DETAIL_jqGridPager"></div>
308
-					        <div id="ITP_STOCKMNG04010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
309
-					    </div>
310
-					</div>
311
-				</div>
224
+				</div>				
312 225
 			</div>
313 226
 		</article>
314 227
 	</div>

+ 58 - 118
bin/src/main/webapp/js/app/config.js

@@ -603,7 +603,7 @@ function fn_make_select_upper_menu(options, select_id, all_show_yn, all_name) {
603 603
 		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
604 604
 	}
605 605
 	$.each(options, function(key, value) {
606
-		if (value.level == 2) {
606
+		if (value.level == 3) {
607 607
 			$('<option/>', {
608 608
 	            'value': value.menuNo,
609 609
 	            'text': value.menuNm
@@ -634,14 +634,13 @@ function fn_make_select_store(options, select_id, all_show_yn, all_name, all_val
634 634
 	}
635 635
 	$.each(options, function(key, value) {
636 636
 		$('<option/>', {
637
-            'value': value.storeNo,	// 매장번호
638
-            'data-sale-store-no': value.saleStoreNo,	// 판매매장번호
637
+            'value': value.storeId,	// 매장번호
639 638
             'text': value.storeNm	// 매장명
640 639
         }).appendTo($select_id);
641 640
 	});
642 641
 };
643 642
 
644
-function fn_make_select_pos(options, select_id, all_show_yn, all_name) { //포스 셀렉트 박스 만들기
643
+function fn_make_select_whs(options, select_id, all_show_yn, all_name) { //창고 셀렉트 박스 만들기
645 644
 	$select_id = $('#' + select_id);
646 645
 	$select_id.empty();
647 646
 	if(all_show_yn == true) {
@@ -649,67 +648,8 @@ function fn_make_select_pos(options, select_id, all_show_yn, all_name) { //포
649 648
 	}
650 649
 	$.each(options, function(key, value) {
651 650
 		$('<option/>', {
652
-            'value': value.posNo,	// 포스번호
653
-            'text': value.posNo		// 포스명
654
-        }).appendTo($select_id);
655
-	});
656
-};
657
-
658
-function fn_make_select_van(options, select_id, all_show_yn, all_name) { //매장 셀렉트 박스 만들기
659
-	$select_id = $('#' + select_id);
660
-	$select_id.empty();
661
-	if(all_show_yn == true) {
662
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
663
-	}
664
-	$.each(options, function(key, value) {
665
-		$('<option/>', {
666
-            'value': value.vanCd,	// VAN코드
667
-            'text': value.vanNm		// VAN명
668
-        }).appendTo($select_id);
669
-	});
670
-};
671
-
672
-function fn_make_select_class(options, select_id, all_show_yn, all_name) { //카테고리 셀렉트 박스 만들기
673
-	$select_id = $('#' + select_id);
674
-	$select_id.empty();
675
-	if(all_show_yn == true) {
676
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
677
-	}
678
-	if(options == null) {
679
-		return;
680
-	}
681
-	$.each(options, function(key, value) {
682
-		$('<option/>', {
683
-            'value': value.classCd,	
684
-            'text': value.classNm	
685
-        }).appendTo($select_id);
686
-	});
687
-};
688
-
689
-function fn_make_select_corner(options, select_id, all_show_yn, all_name) { //코너 셀렉트 박스 만들기
690
-	$select_id = $('#' + select_id);
691
-	$select_id.empty();
692
-	if(all_show_yn == true) {
693
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
694
-	}
695
-	$.each(options, function(key, value) {
696
-		$('<option/>', {
697
-            'value': value.cornerCd,	
698
-            'text': value.cornerNm	
699
-        }).appendTo($select_id);
700
-	});
701
-};
702
-
703
-function fn_make_select_workplace(options, select_id, all_show_yn, all_name) { //사업장 셀렉트 박스 만들기
704
-	$select_id = $('#' + select_id);
705
-	$select_id.empty();
706
-	if(all_show_yn == true) {
707
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
708
-	}
709
-	$.each(options, function(key, value) {
710
-		$('<option/>', {
711
-            'value': value.wkpeNo,	// 사업장번호
712
-            'text': value.wkpeNm	// 사업장명
651
+            'value': value.whsId,	// 창고아이디
652
+            'text': value.whsNm		// 창고명
713 653
         }).appendTo($select_id);
714 654
 	});
715 655
 };
@@ -722,22 +662,8 @@ function fn_make_select_location(options, select_id, all_show_yn, all_name) { //
722 662
 	}
723 663
 	$.each(options, function(key, value) {
724 664
 		$('<option/>', {
725
-            'value': value.lctnNo,	// 위치번호
726
-            'text': value.lctnNm	// 위치명
727
-        }).appendTo($select_id);
728
-	});
729
-};
730
-
731
-function fn_make_select_category(options, select_id, all_show_yn, all_name) { //카테고리 셀렉트 박스 만들기
732
-	$select_id = $('#' + select_id);
733
-	$select_id.empty();
734
-	if(all_show_yn == true) {
735
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
736
-	}
737
-	$.each(options, function(key, value) {
738
-		$('<option/>', {
739
-            'value': value.cateNo,	// 카테고리번호
740
-            'text': value.cateNm	// 카테고리명
665
+            'value': value.location,	// 로케이션
666
+            'text': value.locationNm	// 로케이션명
741 667
         }).appendTo($select_id);
742 668
 	});
743 669
 };
@@ -871,44 +797,33 @@ function fn_make_input_common_cd(options, code, input_id, all_show_yn) { //HIDDE
871 797
 	});
872 798
 };
873 799
 
874
-function fn_make_input_store_print(options, input_id, all_show_yn) { //HIDDEN 매장프린터 리스트 만들기
875
-	$input_id = $('#' + input_id);
876
-	$input_id.val('');
877
-	let list = '';
878
-	if(all_show_yn == true) {
879
-		list = list + ':';
880
-	}
881
-	$.each(options, function(key, value) {		
882
-		if(key > 0) {
883
-			list = list + ';';
884
-		} else if(key == 0 && all_show_yn == true) {
885
-			list = list + ';';
886
-		}
887
-		list = list + value.printNo;
888
-		list = list + ':';
889
-		list = list + value.printNo;		
890
-	});
891
-	$input_id.val(list);
892
-};
893
-
894
-function fn_make_input_store_kds(options, input_id, all_show_yn) { //HIDDEN 매장KDS 리스트 만들기
895
-	$input_id = $('#' + input_id);
896
-	$input_id.val('');
897
-	let list = '';
898
-	if(all_show_yn == true) {
899
-		list = list + ':';
900
-	}
901
-	$.each(options, function(key, value) {		
902
-		if(key > 0) {
903
-			list = list + ';';
904
-		} else if(key == 0 && all_show_yn == true) {
905
-			list = list + ';';
800
+function fn_make_common_cd_list(options, code, all_show_yn) { // 공통코드 리스트 만들기
801
+	// $input_id = $('#' + input_id);
802
+	// $input_id.val('');
803
+	var return_val;
804
+	$.each(options, function(key, value) {
805
+		if (value.codeCd == code) {
806
+			//예제) :;BN:읽기버튼;BNW:쓰기버튼;LK:링크;MU:메뉴
807
+			let code_list = '';
808
+			if(all_show_yn == true) {
809
+				code_list = code_list + ':';
810
+			}
811
+			$.each(value.codeDtlList, function(k, val) {
812
+				if(k > 0) {
813
+					code_list = code_list + ';';
814
+				} else if(k == 0 && all_show_yn == true) {
815
+					code_list = code_list + ';';
816
+				}
817
+				code_list = code_list + val.codeDtlCd;
818
+				code_list = code_list + ':';
819
+				code_list = code_list + val.codeDtlNm;
820
+			});
821
+			// $input_id.val(code_list);
822
+			// return code_list;
823
+			return_val = code_list;
906 824
 		}
907
-		list = list + value.kdsNo;
908
-		list = list + ':';
909
-		list = list + value.kdsNo;		
910 825
 	});
911
-	$input_id.val(list);
826
+	return return_val;
912 827
 };
913 828
 
914 829
 function fnHashed(code) { //유니코드로 들어오는 해쉬키를 스트링으로 변환
@@ -1676,7 +1591,7 @@ function itp_fn_grid_make_local(option) {
1676 1591
 		multiselect: false,
1677 1592
 		rownumbers: true
1678 1593
 	}, option);
1679
-	$(OPER03010_VIEW_GRID_ID).jqGrid({
1594
+	$(option.gridId).jqGrid({
1680 1595
 		colModel: options.colModel,
1681 1596
 		data: options.data,
1682 1597
 		datatype: 'local',
@@ -1987,6 +1902,31 @@ function itp_fn_grid_add_row(gridId, fn, cm, menuId) {
1987 1902
 	return last_row_id;
1988 1903
 };
1989 1904
 
1905
+function itp_fn_add_grid_row(gridId, fn, cm, menuId) {
1906
+	if (cm !== undefined || typeof cm !== 'undefined') {
1907
+		if (cm !== null) {
1908
+			const cols = $(gridId).jqGrid('getGridParam', 'colModel');
1909
+			for (var i=0; i<cols.length; i++) {
1910
+				for (var j=0; j<cm.length; j++) {
1911
+					if (cols[i].name == cm[j]) {
1912
+						$(gridId).jqGrid('setColProp', cols[i].name, {editable: false});
1913
+					}
1914
+				}
1915
+			}
1916
+		}
1917
+	}
1918
+	$(gridId + '_list').find('.ui-jqgrid-bdiv').css('min-height', 'auto');
1919
+	$('#ITP_' + menuId + '_jqGridEmpty').hide();
1920
+	$(gridId).jqGrid('addRow', {position: 'last'});
1921
+	var rids = $(gridId).jqGrid('getDataIDs');
1922
+	var last_row_id = rids[rids.length - 1];
1923
+	$(gridId).jqGrid('setCell', last_row_id, 'viewCd', 'C');
1924
+	if (fn !== undefined || typeof fn !== 'undefined') {
1925
+		fn(last_row_id, rids.length);
1926
+	}
1927
+	return last_row_id;
1928
+};
1929
+
1990 1930
 function itp_fn_grid_del_row(gridId) {
1991 1931
 	const rowKey = $(gridId).getGridParam('selrow');
1992 1932
     if (!rowKey) {

+ 2 - 1
bin/src/main/webapp/js/app/locales/locale-ko.js

@@ -127,7 +127,8 @@ const ITP_MSG_LOCALE = (function() {
127 127
 			"stNm": "상태",
128 128
 			"ownerNm": "대표자명",
129 129
 			"rprstTelNo": "대표연락처",
130
-			"joinDt": "가입일자"
130
+			"joinDt": "가입일자",
131
+			"writeYn": "쓰기여부"
131 132
 		},
132 133
 		"table": {
133 134
 			"brandId": "브랜드ID",

+ 48 - 73
bin/src/main/webapp/js/app/oper/ITP_OPER03010.js

@@ -260,9 +260,9 @@ let pageObj = {
260 260
 		comCode: function () {
261 261
 			// 공통코드 표시
262 262
 			fn_make_select(CODE_LIST, 'ST_CD', 'ITP_FORM_OPER03010_SEARCH_ST_CD', true, '상태(전체)');
263
-			fn_make_select(CODE_LIST, 'ST_CD', 'ITP_FORM_OPER03010_DETAIL_STAT_CD', true, '선택');
263
+			fn_make_select(CODE_LIST, 'ST_CD', 'ITP_FORM_OPER03010_DETAIL_ST_CD', true, '선택');
264 264
 			fn_make_select(CODE_LIST, 'CMPY_TYPE_CD', 'ITP_FORM_OPER03010_DETAIL_TYPE_CD', true, '선택');
265
-			fn_make_select(CODE_LIST, 'FRCOMP_AUTH_CD', 'ITP_FORM_OPER03010_DETAIL_FRCOMP_AUTH_CD', true, '선택');
265
+			fn_make_select(CODE_LIST, 'AUTH_TYPE', 'ITP_FORM_OPER03010_DETAIL_AUTH_TYPE', true, '선택');
266 266
 		},
267 267
 		ready: function () {
268 268
 			listObj.init();
@@ -475,20 +475,24 @@ let viewObj = {
475 475
 		pageObj.switchScreen('VIEW');
476 476
 		$('#ITP_FORM_OPER03010_VIEW #ITP_FORM_OPER03010_VIEW_AFFL_SHOP_ID').val(result.afflShopId);
477 477
 
478
-		$('#ITP_FORM_OPER03010_VIEW .fnCmpyNm').text(result.afflShopNm);
479
-		$('#ITP_FORM_OPER03010_VIEW .fnCmpyStatCd').text(result.cmpyStatNm);
480
-		$('#ITP_FORM_OPER03010_VIEW .fnCmpyCd').text(result.afflShopId);
478
+		$('#ITP_FORM_OPER03010_VIEW .fnAfflShopId').text(result.afflShopId);
479
+		$('#ITP_FORM_OPER03010_VIEW .fnAfflShopNm').text(result.afflShopNm);
480
+		$('#ITP_FORM_OPER03010_VIEW .fnStCd').text(result.stNm);
481 481
 		$('#ITP_FORM_OPER03010_VIEW .fnCmpyTypeCd').text(result.corpType);
482
-		$('#ITP_FORM_OPER03010_VIEW .fnCmpyRegNum').text(result.corpRegNo);
483
-		$('#ITP_FORM_OPER03010_VIEW .fnFrcompAuthCd').text(result.frcompAuthNm);
484
-		$('#ITP_FORM_OPER03010_VIEW .fnCoptNum').text(result.coptNum);
485
-		$('#ITP_FORM_OPER03010_VIEW .fnBizCate').text(result.bizCate);
486
-		$('#ITP_FORM_OPER03010_VIEW .fnBizType').text(result.bizType);
487
-		$('#ITP_FORM_OPER03010_VIEW .fnBossNm').text(result.ownerNm);
488
-		$('#ITP_FORM_OPER03010_VIEW .fnMainTel').text(result.ownerTelNo);
489
-		$('#ITP_FORM_OPER03010_VIEW .fnMainFax').text(result.mainFax);
490
-		$('#ITP_FORM_OPER03010_VIEW .fnMainEmail').text(result.mainEmail);
491
-		$('#ITP_FORM_OPER03010_VIEW .fnCmpyAddress').text('('+ result.cmpyZipno + ') ' + result.addr1 + ' ' + result.addr2);
482
+		$('#ITP_FORM_OPER03010_VIEW .fnBsnsRegNo').text(result.corpRegNo);
483
+		$('#ITP_FORM_OPER03010_VIEW .fnCorpRegNo').text(result.corpRegNo);
484
+		$('#ITP_FORM_OPER03010_VIEW .fnTelNo').text(result.ownerTelNo);
485
+		$('#ITP_FORM_OPER03010_VIEW .fnFaxNo').text(result.rprstFaxNo);
486
+		$('#ITP_FORM_OPER03010_VIEW .fnEmalAddr').text(result.rprstEmai);
487
+		$('#ITP_FORM_OPER03010_VIEW .fnBsnsCndt').text(result.bsnsCndt);
488
+		$('#ITP_FORM_OPER03010_VIEW .fnOwnerNm').text(result.ownerNm);
489
+		$('#ITP_FORM_OPER03010_VIEW .fnCtgrBsns').text(result.ctgrBsns);
490
+		$('#ITP_FORM_OPER03010_VIEW .fnOwnerTelNo').text(result.ownerTelNo);
491
+		$('#ITP_FORM_OPER03010_VIEW .fnContSttDt').text(result.joinSttDt);
492
+		$('#ITP_FORM_OPER03010_VIEW .fnContEndDt').text(result.joinEndDt);
493
+		$('#ITP_FORM_OPER03010_VIEW .fnZipNo').text(result.zipNo);
494
+		$('#ITP_FORM_OPER03010_VIEW .fnLoadAddr').text(result.addr1);
495
+		$('#ITP_FORM_OPER03010_VIEW .fnDtlAddr').text(result.addr2);
492 496
 
493 497
 		$('#ITP_FORM_OPER03010_VIEW .fnAddDt').text(result.regDt);
494 498
 		$('#ITP_FORM_OPER03010_VIEW .fnChgDt').text(result.chgDt);
@@ -549,23 +553,25 @@ let modifyObj = {
549 553
 		pageObj.switchScreen('MODIFY');
550 554
 		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_VIEW_CD').val('U');
551 555
 
552
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_NM').val(result.afflShopNm);
553
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_STAT_CD').val(result.afflAbbr);
554
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_FRCOMP_AUTH_CD').val(result.frcompAuthCd);
555
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_CD').val(result.afflShopId);
556
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_TYPE_CD').val(result.corpType);
557
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_REG_NUM').val(result.cmpyRegNum);
558
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_COPT_NUM').val(result.coptNum);
559
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BIZ_CATE').val(result.bizCate);
560
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BIZ_TYPE').val(result.bizType);
561
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BOSS_NM').val(result.ownerNm);
562
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_MAIN_TEL').val(result.ownerTelNo);
563
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_MAIN_FAX').val(result.mainFax);
564
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_MAIN_EMAIL').val(result.mainEmail);
565
-
566
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').val(result.cmpyZipno);
567
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val(result.addr1);
568
-		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_ADRES_DTL').val(result.addr2);
556
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_AFFL_SHOP_ID').val(result.afflShopId);
557
+		$('#ITP_FORM_OPER03010_DETAIL .fnAfflShopId').text(result.afflShopId);
558
+		$('#ITP_FORM_OPER03010_DETAIL .fnAfflShopNm').text(result.afflShopNm);
559
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_ST_CD').val(result.stNm);
560
+		// $('#ITP_FORM_OPER03010_DETAIL #fnCmpyTypeCd').text(result.corpType);
561
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BSNS_REG_NO').val(result.corpRegNo);
562
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CORP_REG_NO').val(result.corpRegNo);
563
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_STINFO01010_DETAIL_TEL_NO').val(result.ownerTelNo);
564
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_STINFO01010_DETAIL_FAX_NO').val(result.rprstFaxNo);
565
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_EMAL_ADDR').val(result.rprstEmai);
566
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BSNS_CNDT').val(result.bsnsCndt);
567
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_OWNER_NM').val(result.ownerNm);
568
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CTGR_BSNS').val(result.ctgrBsns);
569
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_OWNER_TEL_NO').val(result.ownerTelNo);
570
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_SEARCH_CONT_STT_DT').val(result.joinSttDt);
571
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_SEARCH_CONT_END_DT').val(result.joinEndDt);
572
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_ZIPNO').val(result.zipNo);
573
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_LOAD_ADDR').val(result.addr1);
574
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_DTL_ADDR').val(result.addr2);
569 575
 
570 576
 		$('#ITP_FORM_OPER03010_DETAIL .fnAddDt').text(result.regDt);
571 577
 		$('#ITP_FORM_OPER03010_DETAIL .fnChgDt').text(result.chgDt);
@@ -573,13 +579,13 @@ let modifyObj = {
573 579
 		kakaoMap.init('ITP_FORM_OPER03010_DETAIL_MAP', $('#ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val());
574 580
 
575 581
 		// 영업담당자 리스트 조회
576
-		modifyObj.grid.load();
582
+		modifyObj.grid.load(result.saleList);
577 583
 	},
578 584
 	grid: {
579 585
 		init: function() {
580 586
 		},
581 587
 		colModel: gridColModel.detail,
582
-		load: function() {
588
+		load: function(gridData) {
583 589
 			let param = $('#ITP_FORM_OPER03010_DETAIL').serializeObject();
584 590
 			param.gridSize = $.jgrid.defaults.rowNum;
585 591
 			param.pagingYn = false; // 페이지안함
@@ -587,40 +593,10 @@ let modifyObj = {
587 593
 			var option = {
588 594
 				gridId: OPER03010_DETAIL_GRID_ID,
589 595
 				colModel: gridColModel.detail,
590
-				param: JSON.stringify(param),
591
-				url: DOMAIN + AFFL_DETAIL_GRID_LIST,
596
+				data: gridData,
592 597
 				pager: OPER03010_DETAIL_GRID_PAGER,
593
-				loadComplete: function(data) {
594
-					itp_fn_grid_load_complete(data, OPER03010_DETAIL_GRID_ID, true, undefined, 'OPER03010_DETAIL');
595
-				},
596
-				onPaging: function(action) {
597
-					var pagingFn = {
598
-						callBack: function(args) {
599
-							$(args).trigger('reloadGrid');
600
-						}
601
-					};
602
-					if (itp_fn_check_grid_is_writing(OPER03010_DETAIL_GRID_ID)) {
603
-						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER03010_DETAIL_GRID_ID);
604
-						return 'stop';
605
-					} else {
606
-						itp_fn_grid_paging(OPER03010_DETAIL_GRID_ID, action, param);
607
-					}
608
-				},
609
-				onSortCol: function(index, columnIndex, sortOrder) {
610
-					var sortingFn = {
611
-						callBack: function(args) {
612
-							$(args).trigger('reloadGrid');
613
-						}
614
-					};
615
-					if (itp_fn_check_grid_is_writing(OPER03010_DETAIL_GRID_ID)) {
616
-						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER03010_DETAIL_GRID_ID);
617
-						return 'stop';
618
-					} else {
619
-						itp_fn_grid_sorting(OPER03010_DETAIL_GRID_ID, index, sortOrder);
620
-					}
621
-				}
622 598
 			};
623
-			itp_fn_grid_make_remote(option);
599
+			itp_fn_grid_make_local(option);
624 600
 		},
625 601
 		clearData : function() {
626 602
 			$(OPER03010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
@@ -704,21 +680,20 @@ let createObj = {
704 680
 				var exists = '';
705 681
 				const rowData = $(OPER03010_DETAIL_GRID_ID).getRowData();
706 682
 				$.each(rowData, function(key, value) {
707
-					exists = exists + value.salesUserId + ';';
683
+					exists = exists + value.saleMgrId + ';';
708 684
 				});
709 685
 
710 686
 				$.each(rowDataPop, function(key, value) {
711
-					if(exists.indexOf(value.salesUserId) < 0) {
687
+					if(exists.indexOf(value.saleMgrId) < 0) {
712 688
 						// 행추가
713 689
 						$(OPER03010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
714 690
 						var rids = $(OPER03010_DETAIL_GRID_ID).jqGrid('getDataIDs');
715 691
 						var last_row_id = rids[rids.length - 1];
716 692
 						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
717
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'salesUserId', value.salesUserId);
718
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'salesUserNm', value.salesUserNm);
719
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'useStatCd', value.useStatCd);
720
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'useStatNm', value.useStatNm);
721
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'cmpyCd', '');
693
+						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'saleMgrId', value.saleMgrId);
694
+						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'saleMgrNm', value.saleMgrNm);
695
+						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'stCd', value.stCd);
696
+						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'stNm', value.stNm);
722 697
 					}
723 698
 				});
724 699
 				$(OPER03010_DETAIL_GRID_EMPTY).hide();

+ 11 - 4
bin/src/main/webapp/js/app/popup/biz/ITP_BIZPOP_NK_SALES_USER_SCH.js

@@ -6,7 +6,8 @@ require(['config'], function() {
6 6
 	});
7 7
 });
8 8
 
9
-let SAUSER_POP_SALEUSER_GRID_LIST = '/api/sauser/pop-saleuser-grid-list';
9
+let SAUSER_POP_SALEUSER_GRID_LIST = '/api/srep/pop-grid-list';
10
+// let SAUSER_POP_SALEUSER_GRID_LIST = '/api/sauser/pop-saleuser-grid-list';
10 11
 
11 12
 function itp_fn_BIZPOP_NK_SALES_USER_SCH(parentPopFn, schParam, returnType) {
12 13
 	
@@ -78,22 +79,28 @@ function itp_fn_BIZPOP_NK_SALES_USER_SCH(parentPopFn, schParam, returnType) {
78 79
 	$(THIS_GIRD_ID).jqGrid({
79 80
 		colModel: [
80 81
 			{
81
-				index: 'SALES_USER_ID', name: 'salesUserId',
82
+				index: 'SALE_MGR__ID', name: 'saleMgrId',
82 83
 				label: '영업담당자ID', 
83 84
 				width: '10', fixed: false, align: 'center',
84 85
 				sortable: false, hidden: false
85 86
 			},
86 87
 			{
87
-				index: 'SALES_USER_NM', name: 'salesUserNm',
88
+				index: 'SALE_MGR_NM', name: 'saleMgrNm',
88 89
 				label: '영업담당자명', // 
89 90
 				width: '10', fixed: false, align: 'center',
90 91
 				sortable: false, hidden: false
91 92
 			},
92 93
 			{
93
-				index: 'USE_STAT_NM', name: 'useStatNm',
94
+				index: 'ST_CD', name: 'stCd',
94 95
 				label: '상태', //
95 96
 				width: '12', fixed: false, align: 'center',
96 97
 				sortable: false, hidden: false
98
+			},
99
+			{
100
+				index: 'ST_NM', name: 'stNm',
101
+				label: '상태', //
102
+				width: '12', fixed: false, align: 'center',
103
+				sortable: false, hidden: true
97 104
 			}
98 105
 		],
99 106
 		loadBeforeSend: function(jqXHR) {

File diff suppressed because it is too large
+ 787 - 312
bin/src/main/webapp/js/app/stockmng/ITP_STOCKMNG04010.js


+ 6 - 6
bin/src/main/webapp/js/app/system/ITP_SYSTEM03010.js

@@ -239,12 +239,12 @@ var itp_fn_SYSTEM03010_detail_grid = {
239 239
 					editoptions: {maxlength: 128}
240 240
 				},
241 241
 				{
242
-					index: 'CONN_URL', name: 'connUrl',
243
-					label: ITP_MSG_LOCALE.label.actionUrl,
244
-					width: '18', fixed: false, align: 'left',
245
-					sortable: false, editable: true, edittype: 'text',
246
-					editrules: {required: false},
247
-					editoptions: {maxlength: 128}
242
+					index: 'WRITE_YN', name: 'writeYn',
243
+					label: ITP_MSG_LOCALE.label.writeYn,
244
+					width: '8', fixed: false, align: 'center',
245
+					sortable: false, editable: true, formatter: 'checkbox', edittype: 'checkbox',
246
+					editoptions: {value: 'Y:N', defaultValue: 'Y'},
247
+					editrules: {required: true}
248 248
 				},
249 249
 				{
250 250
 					index: 'USE_YN', name: 'useYn',

+ 13 - 1
bin/src/main/webapp/js/app/system/ITP_SYSTEM04010.js

@@ -114,10 +114,22 @@ require(['config'], function() {
114 114
 						$.each(rowData, function(key, value) {
115 115
 							if (value.viewCd != 'R') {
116 116
 								value.authNo = keyValue;
117
+								
118
+								if (value.readYn == 'N' && value.writeYn == 'Y') {
119
+									value.readYn = 'Y';
120
+								}
121
+								
117 122
 								if (value.viewCd == 'C') {
118 123
 									gridInsertData.push(value);
119 124
 								} else if (value.viewCd == 'U') {
120
-									gridUpdateData.push(value);
125
+									
126
+									if (value.readYn == 'N' && value.writeYn == 'N') {
127
+										value.viewCd = 'D';
128
+										gridDeleteData.push(value);
129
+									} else {
130
+										gridUpdateData.push(value);
131
+									}
132
+									
121 133
 								}
122 134
 							}
123 135
 						});

+ 32 - 31
src/main/webapp/app/stockmng/STOCKMNG01010.html

@@ -2,7 +2,7 @@
2 2
 	<div class="itp_cont">
3 3
 		<article class="itp_detail">
4 4
 			<div class="itp_det_head fix">
5
-				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>재고 관리-팝업있음</strong></h2>
5
+				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>재고 관리</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_STOCKMNG01010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8 8
 				</div>					
@@ -13,53 +13,54 @@
13 13
 						<div class="itp_srh_border fix">
14 14
 							<div class="col-xs-12">
15 15
 								<form id="ITP_FORM_STOCKMNG01010_SEARCH" class="form-horizontal">
16
+									<input type="hidden" id="ITP_FORM_STOCKMNG01010_SEARCH_BRAND_ID" name="sbrandId" value="">
17
+									<input type="hidden" id="ITP_FORM_STOCKMNG01010_SEARCH_STORE_ID" name="sstoreId" value="">
18
+								
16 19
 									<div class="form-group">
17 20
 										<div class="col-xs-10">
18 21
 											<div class="col-xs-2 itp_ip itp_noMar">
19
-												<select id="ITP_FORM_STOCKMNG01010_SERVICE_WHS_MGNT_BASE_INFO" class="form-control itp_input" name="serviceswhsMgntBaseInfo">
20
-													<option value="">창고</option>											
21
-												</select>	
22
+												<select id="ITP_FORM_STOCKMNG01010_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId"></select>	
22 23
 											</div>
23 24
 											<div class="col-xs-3 itp_ip itp_noMar">
24
-												<select id="ITP_FORM_STOCKMNG01010_SEARCH_WHS_MGNT_BASE_LOC" class="form-control itp_input" name="sWhsMgntBaseLoc">
25
-													<option value="">판매용/B품/폐기품</option>											
26
-												</select>										
25
+												<select id="ITP_FORM_STOCKMNG01010_SEARCH_LOCATION" class="form-control itp_input" name="slocation"></select>										
27 26
 											</div>
28 27
 										</div>
29 28
 									</div>
30 29
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
31
-										<div class="col-xs-1 itp_in" style="width:14%; padding:0px;">
32
-											<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS1" class="form-control itp_input" name="sItemClass1">
33
-												<option value="">품목분류Level1</option>											
34
-											</select>										
35
-										</div>
36
-										<div class="col-xs-1 itp_in" style="width:14%; padding:0px;">
37
-											<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS2" class="form-control itp_input" name="sItemClass2">
38
-												<option value="">품목분류Level2</option>											
39
-											</select>										
40
-										</div>
41
-										<div class="col-xs-1 itp_in" style="width:14%; padding:0px;">
42
-											<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS3" class="form-control itp_input" name="sItemClass3">
43
-												<option value="">품목분류Level3</option>											
44
-											</select>										
45
-										</div>
46
-										<div class="col-xs-1 itp_in" style="width:14%; padding:0px;">
47
-											<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS4" class="form-control itp_input" name="sItemClass4">
48
-												<option value="">품목분류Level4</option>											
49
-											</select>										
50
-										</div>
51
-										<div class="col-xs-4 itp_in">
52
-											<input type="text" id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목번호 or 품목명" />
30
+										<div class="col-xs-10">
31
+											<div class="col-xs-2 itp_ip itp_noMar">
32
+												<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS1" class="form-control itp_input" name="sitemClass1">
33
+													<option value="">품목분류Level1</option>											
34
+												</select>										
35
+											</div>
36
+											<div class="col-xs-2 itp_ip itp_noMar">
37
+												<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS2" class="form-control itp_input" name="sitemClass2">
38
+													<option value="">품목분류Level2</option>											
39
+												</select>										
40
+											</div>
41
+											<div class="col-xs-2 itp_ip itp_noMar">
42
+												<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS3" class="form-control itp_input" name="sitemClass3">
43
+													<option value="">품목분류Level3</option>											
44
+												</select>										
45
+											</div>
46
+											<div class="col-xs-2 itp_ip itp_noMar">
47
+												<select id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_CLASS4" class="form-control itp_input" name="sitemClass4">
48
+													<option value="">품목분류Level4</option>											
49
+												</select>										
50
+											</div>
51
+											<div class="col-xs-4 itp_in itp_noMar">
52
+												<input type="text" id="ITP_FORM_STOCKMNG01010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목번호 or 품목명" />
53
+											</div>
53 54
 										</div>							
54 55
 									</div>
55 56
 								</form>
56 57
 							</div>
57 58
 						</div>
58 59
 					</div>
59
-					<div class="fix" style="padding-right:10px;">
60
+					<div class="fix" style="padding-right:16px;">
60 61
 						<div class="pull-right itp_cicon">
61 62
 							<button type="button" id="ITP_BTN_STOCKMNG01010_ADDROW" class="btn btn-primary btn-sm IPS" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;재고처리&nbsp;&nbsp;</button>
62
-							<button type="button" id="ITP_BTN_STOCKMNG01010_DELROW" class="btn btn-danger btn-sm "><i class="glyphicon"></i>&nbsp;&nbsp;재고이력&nbsp;&nbsp;</button>									
63
+							<button type="button" id="ITP_BTN_STOCKMNG01010_DELROW" class="btn btn-primary btn-sm IPS"><i class="glyphicon"></i>&nbsp;&nbsp;재고이력&nbsp;&nbsp;</button>									
63 64
 						</div>
64 65
 					</div>
65 66
 					<div class="itp_table fix">

+ 33 - 120
src/main/webapp/app/stockmng/STOCKMNG04010.html

@@ -5,7 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>창고관리</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 				    <button type="button" id="ITP_BTN_STOCKMNG04010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-				    <button type="button" id="ITP_BTN_STOCKMNG04010_MODIFY" class="btn btn-success btn-sm NEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;신규등록&nbsp;&nbsp;</button>
8
+				    <button type="button" id="ITP_BTN_STOCKMNG04010_NEWREG" class="btn btn-success btn-sm NEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;신규등록&nbsp;&nbsp;</button>
9 9
 				    <button type="button" id="ITP_BTN_STOCKMNG04010_SAVE" class="btn btn-success btn-sm SAB"><i class="glyphicon "></i>&nbsp;&nbsp;저장&nbsp;&nbsp;</button>
10 10
 					<button type="button" id="ITP_BTN_STOCKMNG04010_MODIFY" class="btn btn-success btn-sm UPB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수정&nbsp;&nbsp;</button>
11 11
 				    <button type="button" id="ITP_BTN_STOCKMNG04010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i> &nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
@@ -17,16 +17,18 @@
17 17
 						<div class="itp_srh_border fix">
18 18
 							<div class="col-xs-12">
19 19
 								<form id="ITP_FORM_STOCKMNG04010_SEARCH" class="form-horizontal">
20
+									<input type="hidden" id="ITP_FORM_STOCKMNG04010_SEARCH_BRAND_ID" name="sbrandId" value="">
21
+									
20 22
 									<div class="form-group">
21 23
 										<div class="col-xs-10">
22 24
 											<div class="col-xs-2 itp_ip itp_noMar">
23
-												<select id="ITP_FORM_STOCKMNG04010_WHS_DVSN" class="form-control itp_input" name="sWhsDvsn"></select>										
25
+												<select id="ITP_FORM_STOCKMNG04010_WHS_DVSN" class="form-control itp_input" name="swhsDvsn"></select>										
24 26
 											</div>
25 27
 											<div class="col-xs-2 itp_ip itp_noMar">
26
-												<select id="ITP_FORM_STOCKMNG04010_WHS_ST_CD" class="form-control itp_input" name="sWhsStCd"></select>										
28
+												<select id="ITP_FORM_STOCKMNG04010_WHS_ST_CD" class="form-control itp_input" name="swhsStCd"></select>										
27 29
 											</div>
28 30
 											<div class="col-xs-5 itp_ip itp_noMar">
29
-												<input type="text" id="ITP_FORM_STOCKMNG04010_SEARCH_WHS_NM" class="form-control itp_input" name="sWhsNm" placeholder="창고명" />
31
+												<input type="text" id="ITP_FORM_STOCKMNG04010_SEARCH_WHS_NM" class="form-control itp_input" name="swhsNm" placeholder="창고명" />
30 32
 											</div>
31 33
 										</div>
32 34
 									</div>
@@ -48,21 +50,22 @@
48 50
 				        <div class="col-xs-12">
49 51
 				            <form id="ITP_FORM_STOCKMNG04010_DETAIL" class="form-horizontal">
50 52
 				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD" name="viewCd" value="C">
53
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_BRAND_ID" name="brandId" value="">
54
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_STORE_ID" name="storeId" value="">
55
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_ID" name="whsId" value="">
51 56
 				    
52 57
 				                <section class="itp_form_sec">
53 58
 				                    <h4 class="itp_form_tit">브랜드 정보</h4>
54 59
 				                    <div class="itp_form_in">
55 60
 				                        <div class="form-group">
56
-				                            <label class="col-xs-2 itp_lb">브랜드 코드</label>
61
+				                            <label class="col-xs-2 itp_lb">브랜드</label>
57 62
 				                                <div class="col-xs-4 itp_ip">
58
-				                                    <div class="col-xs-9 itp_in fnBrandUnitUnqNo"></div>												
63
+				                                    <div class="col-xs-9 itp_in fnBrandNm"></div>												
59 64
 				                                </div>
60 65
 				                            <label class="col-xs-2 itp_lb">상태*</label>
61 66
 				                            <div class="col-xs-4 itp_ip">
62 67
 				                                <div class="col-xs-8 itp_in">
63
-				                                    <select id="ITP_FORM_STOCKMNG04010_DETAIL_ST_CD" class="form-control itp_input" name="stCd">
64
-				                                    	<option value="">운영/미운영</option>
65
-				                                    </select>
68
+				                                    <select id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_ST_CD" class="form-control itp_input" name="whsStCd"></select>
66 69
 				                                </div>
67 70
 				                            </div>
68 71
 				                        </div>
@@ -74,7 +77,7 @@
74 77
 				                            <label class="col-xs-2 itp_lb">창고명</label>
75 78
 				                            <div class="col-xs-4 itp_ip">
76 79
 				                                <div class="col-xs-8 itp_in">
77
-			                                    	<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="서울 창고" maxlength="20">
80
+			                                    	<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="" maxlength="20">
78 81
 				                                </div>
79 82
 				                            </div>
80 83
 				                        </div>
@@ -82,7 +85,7 @@
82 85
 				                            <label class="col-xs-2 itp_lb">연락처</label>
83 86
 				                            <div class="col-xs-4 itp_ip">
84 87
 				                                <div class="col-xs-8 itp_in">
85
-				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_TEL_NO" class="form-control itp_input" name="telNo" value="###-####-####" maxlength="20">
88
+				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_MGR_TEL_NO" class="form-control itp_input" name="mgrTelNo" value="" maxlength="20" placeholder="###-####-####">
86 89
 				                                </div>
87 90
 				                            </div>
88 91
 				                            <label class="col-xs-2 itp_lb">담당자명</label>
@@ -96,15 +99,15 @@
96 99
 				                            <label class="col-xs-2 itp_lb">매장명</label>
97 100
 				                            <div class="col-xs-4 itp_ip">
98 101
 				                                <div class="col-xs-5 itp_in">
99
-													<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sSpplyNm" value="공급업체" />
102
+													<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_STORE_NM" class="form-control itp_input" name="storeNm" value="" readonly="readonly" />
100 103
 												</div>
101
-												<div class="col-xs-3 itp_in" style="padding:0px;">
102
-													<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
103
-													<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
104
+												<div class="col-xs-3 itp_in" style="padding:0px; margin-left: 3px;">
105
+													<button type="button" id="ITP_BTN_STOCKMNG04010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
106
+													<button type="button" id="ITP_BTN_STOCKMNG04010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
104 107
 								                </div>
105 108
 				                            </div>
106
-				                            <label class="col-xs-2 itp_lb"></label>
107
-				                            <div class="col-xs-4 itp_ip"></div>
109
+				                            <label class="col-xs-2 itp_lb">등록일시</label>
110
+				                            <div class="col-xs-4 itp_ip fnRegDtm"></div>				                            
108 111
 				                        </div>
109 112
 				                    </div>
110 113
 			                        <div class="itp_form_in">	
@@ -112,16 +115,16 @@
112 115
 			                                <label class="col-xs-2 itp_lb">주소</label>
113 116
 			                                <div class="col-xs-10 itp_ip">
114 117
 			                                    <div class="col-xs-2 itp_in">
115
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" placeholder="우편번호">													
118
+			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" placeholder="우편번호" readonly="readonly">													
116 119
 			                                    </div>
117 120
 			                                    <div class="col-xs-2 itp_in" style="width:10%;">
118
-			                                        <button type="button" id="ITP_FORM_STOCKMNG04010_DETAIL_FILE_SEARCH" class="btn btn-primary btn-sm FILE_SEARCH" style="margin:0 3px;">&nbsp;&nbsp;주소찾기&nbsp;&nbsp;</button>
121
+			                                        <button type="button" id="ITP_FORM_STOCKMNG04010_DETAIL_ADDRESS_SEARCH" class="btn btn-primary btn-sm ADDS" style="margin:0 3px;">&nbsp;&nbsp;주소찾기&nbsp;&nbsp;</button>
119 122
 			                                    </div>
120 123
 			                                    <div class="col-xs-4 itp_in" style="margin:0 5px;">
121
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR" class="form-control itp_input" name="loadAddr" value="" placeholder="기본주소">													
124
+			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR" class="form-control itp_input" name="addr1" value="" placeholder="기본주소" readonly="readonly">													
122 125
 			                                    </div>
123 126
 			                                    <div class="col-xs-4 itp_in">
124
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR" class="form-control itp_input" name="dtlAddr" value="" placeholder="상세주소">													
127
+			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR" class="form-control itp_input" name="addr2" value="" placeholder="상세주소">													
125 128
 			                                    </div>
126 129
 			                                </div>
127 130
 			                            </div>	
@@ -151,14 +154,17 @@
151 154
 				        <div class="col-xs-12">
152 155
 				            <form id="ITP_FORM_STOCKMNG04010_VIEW" class="form-horizontal">
153 156
 				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_VIEW_CD" name="viewCd" value="C">
157
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_BRAND_ID" name="brandId" value="">
158
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_STORE_ID" name="storeId" value="">
159
+				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_VIEW_WHS_ID" name="whsId" value="">
154 160
 				    
155 161
 				                <section class="itp_form_sec">
156 162
 				                    <h4 class="itp_form_tit">브랜드 정보</h4>
157 163
 				                    <div class="itp_form_in">
158 164
 				                        <div class="form-group">
159
-				                            <label class="col-xs-2 itp_lb">브랜드 코드</label>
165
+				                            <label class="col-xs-2 itp_lb">브랜드</label>
160 166
 				                                <div class="col-xs-4 itp_ip">
161
-				                                    <div class="col-xs-9 itp_in fnBrandUnitUnqNo"></div>												
167
+				                                    <div class="col-xs-9 itp_in fnBrandNm"></div>												
162 168
 				                                </div>
163 169
 				                            <label class="col-xs-2 itp_lb">상태*</label>
164 170
 				                            <div class="col-xs-4 itp_ip">
@@ -190,18 +196,14 @@
190 196
 				                            <div class="col-xs-4 itp_ip">
191 197
 				                                <div class="col-xs-5 itp_in fnSpplyNm"></div>
192 198
 				                            </div>
193
-				                            <label class="col-xs-2 itp_lb"></label>
194
-				                            <div class="col-xs-4 itp_ip"></div>
199
+				                            <label class="col-xs-2 itp_lb">등록일시</label>
200
+				                            <div class="col-xs-4 itp_ip fnRegDtm"></div>
195 201
 				                        </div>
196 202
 				                    </div>
197 203
 			                        <div class="itp_form_in">	
198 204
 			                            <div class="form-group">
199 205
 			                                <label class="col-xs-2 itp_lb">주소</label>
200
-			                                <div class="col-xs-10 itp_ip">
201
-												<div class="col-xs-1 itp_in fnZipNo"></div>
202
-												<div class="col-xs-2 itp_in fnLoadAddr"></div>
203
-												<div class="col-xs-2 itp_in fnDtlAddr"></div>	
204
-											</div>
206
+			                                <div class="col-xs-10 itp_ip fnAddress"></div>
205 207
 			                            </div>	
206 208
 			                        </div>	
207 209
 				                </section>								
@@ -219,96 +221,7 @@
219 221
 					        <div id="ITP_STOCKMNG04010_VIEW_jqGridEmpty" class="itp_no_data"></div>
220 222
 					    </div>
221 223
 					</div>
222
-				</div>
223
-				<div id="ITP_AJAX_STOCKMNG04010_DETAIL_CONTAINER">
224
-				    <div class="itp_form itp_type1 fix">
225
-				        <div class="col-xs-12">
226
-				            <form id="ITP_FORM_STOCKMNG04010_DETAIL" class="form-horizontal">
227
-				                <input type="hidden" id="ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD" name="viewCd" value="C">
228
-				    
229
-				                <section class="itp_form_sec">
230
-				                    <h4 class="itp_form_tit">브랜드 정보</h4>
231
-				                    <div class="itp_form_in">
232
-				                        <div class="form-group">
233
-				                            <label class="col-xs-2 itp_lb">브랜드 코드</label>
234
-				                                <div class="col-xs-4 itp_ip">
235
-				                                    <div class="col-xs-9 itp_in fnBrandUnitUnqNo"></div>												
236
-				                                </div>
237
-				                            <label class="col-xs-2 itp_lb">상태*</label>
238
-				                            <div class="col-xs-4 itp_ip">
239
-				                                <div class="col-xs-8 itp_in">
240
-				                                    <select id="ITP_FORM_STOCKMNG04010_DETAIL_ST_CD" class="form-control itp_input" name="stCd">
241
-				                                    	<option value="">운영/미운영</option>
242
-				                                    </select>
243
-				                                </div>
244
-				                            </div>
245
-				                        </div>
246
-				                        <div class="form-group">
247
-				                            <label class="col-xs-2 itp_lb">창고코드 </label>
248
-				                            <div class="col-xs-4 itp_ip">
249
-				                                <div class="col-xs-8 itp_in fnWhsId"></div>
250
-				                            </div>
251
-				                            <label class="col-xs-2 itp_lb">창고명</label>
252
-				                            <div class="col-xs-4 itp_ip">
253
-				                                <div class="col-xs-8 itp_in">
254
-			                                    	<input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="서울 창고" maxlength="20">
255
-				                                </div>
256
-				                            </div>
257
-				                        </div>
258
-				                        <div class="form-group">
259
-				                            <label class="col-xs-2 itp_lb">연락처</label>
260
-				                            <div class="col-xs-4 itp_ip">
261
-				                                <div class="col-xs-8 itp_in">
262
-				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_TEL_NO" class="form-control itp_input" name="telNo" value="###-####-####" maxlength="20">
263
-				                                </div>
264
-				                            </div>
265
-				                            <label class="col-xs-2 itp_lb">담당자명</label>
266
-				                            <div class="col-xs-4 itp_ip">
267
-				                                <div class="col-xs-8 itp_in">
268
-				                                    <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_MGR_NM" class="form-control itp_input" name="mgrNm" value="" maxlength="20">
269
-				                                </div>
270
-				                            </div>
271
-				                        </div>
272
-				                    </div>
273
-			                        <div class="itp_form_in">	
274
-			                            <div class="form-group">
275
-			                                <label class="col-xs-2 itp_lb">주소</label>
276
-			                                <div class="col-xs-10 itp_ip">
277
-			                                    <div class="col-xs-2 itp_in">
278
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" placeholder="우편번호">													
279
-			                                    </div>
280
-			                                    <div class="col-xs-2 itp_in" style="width:10%;">
281
-			                                        <button type="button" id="ITP_FORM_STOCKMNG04010_DETAIL_FILE_SEARCH" class="btn btn-primary btn-sm FILE_SEARCH" style="margin:0 3px;">&nbsp;&nbsp;주소찾기&nbsp;&nbsp;</button>
282
-			                                    </div>
283
-			                                    <div class="col-xs-4 itp_in" style="margin:0 5px;">
284
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR" class="form-control itp_input" name="loadAddr" value="" placeholder="기본주소">													
285
-			                                    </div>
286
-			                                    <div class="col-xs-4 itp_in">
287
-			                                        <input type="text" id="ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR" class="form-control itp_input" name="dtlAddr" value="" placeholder="상세주소">													
288
-			                                    </div>
289
-			                                </div>
290
-			                            </div>	
291
-			                        </div>	
292
-				                </section>								
293
-				            </form>
294
-				        </div>
295
-				    </div>
296
-				    <div class="itp_table fix">
297
-					    <div class="itp_table_head fix" style="background:#f5f5f5;">
298
-					        <h4 class="itp_table_tit">Location 정보</h4>
299
-					        <div class="pull-right itp_cicon">
300
-					            <button type="button" id="ITP_BTN_STOCKMNG04010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;행추가&nbsp;&nbsp;</button>
301
-					            <button type="button" id="ITP_BTN_STOCKMNG04010_DETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon"></i>&nbsp;&nbsp;행삭제&nbsp;&nbsp;</button>									
302
-					        </div>
303
-					    </div>
304
-					    <div id="ITP_STOCKMNG04010_DETAIL_jqGrid_list" class="itp_tb_list">
305
-					        <div id="ITP_STOCKMNG04010_DETAIL_jqGridView" class="itp_views fix"></div>
306
-					        <table id="ITP_STOCKMNG04010_DETAIL_jqGrid"></table>
307
-					        <div id="ITP_STOCKMNG04010_DETAIL_jqGridPager"></div>
308
-					        <div id="ITP_STOCKMNG04010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
309
-					    </div>
310
-					</div>
311
-				</div>
224
+				</div>				
312 225
 			</div>
313 226
 		</article>
314 227
 	</div>

+ 61 - 81
src/main/webapp/js/app/config.js

@@ -602,7 +602,7 @@ function fn_make_select_upper_menu(options, select_id, all_show_yn, all_name) {
602 602
 		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
603 603
 	}
604 604
 	$.each(options, function(key, value) {
605
-		if (value.level == 2) {
605
+		if (value.level == 3) {
606 606
 			$('<option/>', {
607 607
 	            'value': value.menuNo,
608 608
 	            'text': value.menuNm
@@ -647,14 +647,13 @@ function fn_make_select_store(options, select_id, all_show_yn, all_name, all_val
647 647
 	}
648 648
 	$.each(options, function(key, value) {
649 649
 		$('<option/>', {
650
-            'value': value.storeNo,	// 매장번호
651
-            'data-sale-store-no': value.saleStoreNo,	// 판매매장번호
650
+            'value': value.storeId,	// 매장번호
652 651
             'text': value.storeNm	// 매장명
653 652
         }).appendTo($select_id);
654 653
 	});
655 654
 };
656 655
 
657
-function fn_make_select_pos(options, select_id, all_show_yn, all_name) { //포스 셀렉트 박스 만들기
656
+function fn_make_select_whs(options, select_id, all_show_yn, all_name) { //창고 셀렉트 박스 만들기
658 657
 	$select_id = $('#' + select_id);
659 658
 	$select_id.empty();
660 659
 	if(all_show_yn == true) {
@@ -662,67 +661,8 @@ function fn_make_select_pos(options, select_id, all_show_yn, all_name) { //포
662 661
 	}
663 662
 	$.each(options, function(key, value) {
664 663
 		$('<option/>', {
665
-            'value': value.posNo,	// 포스번호
666
-            'text': value.posNo		// 포스명
667
-        }).appendTo($select_id);
668
-	});
669
-};
670
-
671
-function fn_make_select_van(options, select_id, all_show_yn, all_name) { //매장 셀렉트 박스 만들기
672
-	$select_id = $('#' + select_id);
673
-	$select_id.empty();
674
-	if(all_show_yn == true) {
675
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
676
-	}
677
-	$.each(options, function(key, value) {
678
-		$('<option/>', {
679
-            'value': value.vanCd,	// VAN코드
680
-            'text': value.vanNm		// VAN명
681
-        }).appendTo($select_id);
682
-	});
683
-};
684
-
685
-function fn_make_select_class(options, select_id, all_show_yn, all_name) { //카테고리 셀렉트 박스 만들기
686
-	$select_id = $('#' + select_id);
687
-	$select_id.empty();
688
-	if(all_show_yn == true) {
689
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
690
-	}
691
-	if(options == null) {
692
-		return;
693
-	}
694
-	$.each(options, function(key, value) {
695
-		$('<option/>', {
696
-            'value': value.classCd,	
697
-            'text': value.classNm	
698
-        }).appendTo($select_id);
699
-	});
700
-};
701
-
702
-function fn_make_select_corner(options, select_id, all_show_yn, all_name) { //코너 셀렉트 박스 만들기
703
-	$select_id = $('#' + select_id);
704
-	$select_id.empty();
705
-	if(all_show_yn == true) {
706
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
707
-	}
708
-	$.each(options, function(key, value) {
709
-		$('<option/>', {
710
-            'value': value.cornerCd,	
711
-            'text': value.cornerNm	
712
-        }).appendTo($select_id);
713
-	});
714
-};
715
-
716
-function fn_make_select_workplace(options, select_id, all_show_yn, all_name) { //사업장 셀렉트 박스 만들기
717
-	$select_id = $('#' + select_id);
718
-	$select_id.empty();
719
-	if(all_show_yn == true) {
720
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
721
-	}
722
-	$.each(options, function(key, value) {
723
-		$('<option/>', {
724
-            'value': value.wkpeNo,	// 사업장번호
725
-            'text': value.wkpeNm	// 사업장명
664
+            'value': value.whsId,	// 창고아이디
665
+            'text': value.whsNm		// 창고명
726 666
         }).appendTo($select_id);
727 667
 	});
728 668
 };
@@ -735,22 +675,8 @@ function fn_make_select_location(options, select_id, all_show_yn, all_name) { //
735 675
 	}
736 676
 	$.each(options, function(key, value) {
737 677
 		$('<option/>', {
738
-            'value': value.lctnNo,	// 위치번호
739
-            'text': value.lctnNm	// 위치명
740
-        }).appendTo($select_id);
741
-	});
742
-};
743
-
744
-function fn_make_select_category(options, select_id, all_show_yn, all_name) { //카테고리 셀렉트 박스 만들기
745
-	$select_id = $('#' + select_id);
746
-	$select_id.empty();
747
-	if(all_show_yn == true) {
748
-		$('<option/>', {'value': '', 'text': all_name}).prependTo($select_id);
749
-	}
750
-	$.each(options, function(key, value) {
751
-		$('<option/>', {
752
-            'value': value.cateNo,	// 카테고리번호
753
-            'text': value.cateNm	// 카테고리명
678
+            'value': value.location,	// 로케이션
679
+            'text': value.locationNm	// 로케이션명
754 680
         }).appendTo($select_id);
755 681
 	});
756 682
 };
@@ -884,6 +810,35 @@ function fn_make_input_common_cd(options, code, input_id, all_show_yn) { //HIDDE
884 810
 	});
885 811
 };
886 812
 
813
+function fn_make_common_cd_list(options, code, all_show_yn) { // 공통코드 리스트 만들기
814
+	// $input_id = $('#' + input_id);
815
+	// $input_id.val('');
816
+	var return_val;
817
+	$.each(options, function(key, value) {
818
+		if (value.codeCd == code) {
819
+			//예제) :;BN:읽기버튼;BNW:쓰기버튼;LK:링크;MU:메뉴
820
+			let code_list = '';
821
+			if(all_show_yn == true) {
822
+				code_list = code_list + ':';
823
+			}
824
+			$.each(value.codeDtlList, function(k, val) {
825
+				if(k > 0) {
826
+					code_list = code_list + ';';
827
+				} else if(k == 0 && all_show_yn == true) {
828
+					code_list = code_list + ';';
829
+				}
830
+				code_list = code_list + val.codeDtlCd;
831
+				code_list = code_list + ':';
832
+				code_list = code_list + val.codeDtlNm;
833
+			});
834
+			// $input_id.val(code_list);
835
+			// return code_list;
836
+			return_val = code_list;
837
+		}
838
+	});
839
+	return return_val;
840
+};
841
+
887 842
 function fn_make_input_store_print(options, input_id, all_show_yn) { //HIDDEN 매장프린터 리스트 만들기
888 843
 	$input_id = $('#' + input_id);
889 844
 	$input_id.val('');
@@ -2002,6 +1957,31 @@ function itp_fn_grid_add_row(gridId, fn, cm, menuId) {
2002 1957
 	return last_row_id;
2003 1958
 };
2004 1959
 
1960
+function itp_fn_add_grid_row(gridId, fn, cm, menuId) {
1961
+	if (cm !== undefined || typeof cm !== 'undefined') {
1962
+		if (cm !== null) {
1963
+			const cols = $(gridId).jqGrid('getGridParam', 'colModel');
1964
+			for (var i=0; i<cols.length; i++) {
1965
+				for (var j=0; j<cm.length; j++) {
1966
+					if (cols[i].name == cm[j]) {
1967
+						$(gridId).jqGrid('setColProp', cols[i].name, {editable: false});
1968
+					}
1969
+				}
1970
+			}
1971
+		}
1972
+	}
1973
+	$(gridId + '_list').find('.ui-jqgrid-bdiv').css('min-height', 'auto');
1974
+	$('#ITP_' + menuId + '_jqGridEmpty').hide();
1975
+	$(gridId).jqGrid('addRow', {position: 'last'});
1976
+	var rids = $(gridId).jqGrid('getDataIDs');
1977
+	var last_row_id = rids[rids.length - 1];
1978
+	$(gridId).jqGrid('setCell', last_row_id, 'viewCd', 'C');
1979
+	if (fn !== undefined || typeof fn !== 'undefined') {
1980
+		fn(last_row_id, rids.length);
1981
+	}
1982
+	return last_row_id;
1983
+};
1984
+
2005 1985
 function itp_fn_grid_del_row(gridId) {
2006 1986
 	const rowKey = $(gridId).getGridParam('selrow');
2007 1987
     if (!rowKey) {

+ 301 - 0
src/main/webapp/js/app/stockmng/ITP_STOCKMNG01010.js

@@ -0,0 +1,301 @@
1
+/********************************************************
2
+ --------------------------------------------------------
3
+ - Object 목록								            -
4
+ --------------------------------------------------------
5
+ * const gridColModel = {}	: 화면 Grid Object			*
6
+ * let pageObj = {}			: 화면공통 Object			*
7
+ * let listObj = {}			: 목록화면 Object			*
8
+ * let viewObj = {}			: 상세화면 Object			*
9
+ * let modifyObj = {}		: 수정화면 Object			*
10
+ * let createObj = {}		: 신규화면 Object			*
11
+ * let locInfoObj = {}		: 로케이션정보 Object				*
12
+ *******************************************************/
13
+
14
+/*화면 변수*/
15
+const STOCKMNG01010_GRID_ID = '#ITP_STOCKMNG01010_jqGrid';
16
+const STOCKMNG01010_GRID_LIST = '#ITP_STOCKMNG01010_jqGrid_list';
17
+const STOCKMNG01010_GRID_PAGER = '#ITP_STOCKMNG01010_jqGridPager';
18
+const STOCKMNG01010_GRID_EMPTY = '#ITP_STOCKMNG01010_jqGridEmpty';
19
+
20
+let ITP_FORM_STOCKMNG01010_DETAIL_IS_DUPLICATE = false;
21
+let ITP_FORM_STOCKMNG01010_DETAIL_IS_WRITING = false;
22
+let STOCKMNG01010_DETAIL_GRID_LAST_ROW_ID;
23
+
24
+/*API URL*/
25
+let STOCK_MNG_DETAIL_GRID_LIST = '/api/stock/mng/detail-grid-list';
26
+let WHS_MNG_ADD_WHS = '/api/whs/mng/add-whs';
27
+let WHS_MNG_DETAIL_GRID_LIST = '/api/whs/mng/detail-grid-list';
28
+let WHS_MNG_LOCATION_GRID_LIST = '/api/whs/mng/location-grid-list';
29
+
30
+/*화면 Grid ColModel*/
31
+const gridColModel = {
32
+	list: [
33
+		{
34
+			index: 'BRAND_ID', name: 'brandId',
35
+			label: "브랜드ID", 
36
+			width: '0', fixed: false, align: 'center',
37
+			sortable: false, hidden: true
38
+		},
39
+		{
40
+			index: 'STORE_ID', name: 'storeId',
41
+			label: "매장ID", 
42
+			width: '0', fixed: false, align: 'center',
43
+			sortable: false, hidden: true
44
+		},
45
+		{
46
+			index: 'BRAND_NM', name: 'brandNm',
47
+			label: ITP_MSG_LOCALE.label.brandNm, //브랜드
48
+			width: '13', fixed: false, align: 'center',
49
+			sortable: false, hidden: false
50
+		},
51
+		{
52
+			index: 'STORE_NM', name: 'storeNm',
53
+			label: "매장명", 
54
+			width: '13', fixed: false, align: 'center',
55
+			sortable: false, hidden: false
56
+		},
57
+		{
58
+			index: 'WHS_ID', name: 'whsId',
59
+			label: "창고번호", 
60
+			width: '8', fixed: false, align: 'center',
61
+			sortable: false, hidden: false
62
+		},
63
+		{
64
+			index: 'WHS_NM', name: 'whsNm',
65
+			label: "창고명", 
66
+			width: '13', fixed: false, align: 'center',
67
+			sortable: false, hidden: false
68
+		},
69
+		{
70
+			index: 'WHS_ST_NM', name: 'whsStNm',
71
+			label: ITP_MSG_LOCALE.label.status, //상태
72
+			width: '6', fixed: false, align: 'center',
73
+			sortable: false, hidden: false
74
+		},
75
+		{
76
+			index: 'MGR_NM', name: 'mgrNm',
77
+			label: "담당자명", 
78
+			width: '8', fixed: false, align: 'center',
79
+			sortable: false, hidden: false
80
+		},
81
+		{
82
+			index: 'MGR_TEL_NO', name: 'mgrTelNo',
83
+			label: "연락처", 
84
+			width: '8', fixed: false, align: 'center',
85
+			sortable: false, hidden: false
86
+		}
87
+	]
88
+};
89
+
90
+require(['config'], function() {
91
+	require([
92
+	], function($) {
93
+		pageObj.init();
94
+	});
95
+});
96
+
97
+/*화면공통 Object*/
98
+let pageObj = {
99
+	init: function () {
100
+		this.ui.init();
101
+		this.event.init();
102
+	},
103
+	ui: {
104
+		init: function () {
105
+			this.view();
106
+			this.grid();
107
+			this.ready();
108
+		},
109
+		view: function() {
110
+			// 버튼 권한설정
111
+			fn_proc_btn_auth('STOCKMNG01010');
112
+			
113
+			// 브랜드ID 지정
114
+			var data = JSON.parse(sessionStorage.getItem('itp_manage_brand_cd'));
115
+			$('#ITP_FORM_STOCKMNG01010_SEARCH_BRAND_ID').val(data.brandId);
116
+			
117
+			pageObj.fnWhsList(function() {
118
+				pageObj.fnLocationList();
119
+			}); // 창고리스트
120
+			
121
+			// 공통코드 표시
122
+			// fn_make_select(CODE_LIST, 'WHS_DVSN', 'ITP_FORM_STOCKMNG01010_WHS_DVSN');			
123
+
124
+			// 조회일자 지정
125
+			$('#ITP_TAB_STOCKMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);			
126
+		},
127
+		grid: function() {
128
+			itp_fn_jqgrid_resize(STOCKMNG01010_GRID_ID, STOCKMNG01010_GRID_LIST, 'lg');
129
+			listObj.empty.init();
130
+			itp_fn_fire_window_resize();
131
+		},
132
+		ready: function() {
133
+			listObj.init();
134
+		}
135
+	},
136
+	event: {
137
+		init: function () {
138
+			this.button();
139
+		},
140
+		button: function () {
141
+			// 버튼 클릭 이벤트
142
+			$('button').each(function() {
143
+				var id = $(this).attr('id');
144
+				$(this).on('click', function() {
145
+					switch (id) {
146
+						case 'ITP_BTN_STOCKMNG01010_SRH'		: listObj.button.search();		break;	// 조회 버튼
147
+						case 'ITP_BTN_STOCKMNG01010_ADDROW'		: locInfoObj.button.addRow();	break;	// 재고처리 버튼
148
+						case 'ITP_BTN_STOCKMNG01010_DELROW'		: locInfoObj.button.delRow();	break;	// 재고이력 버튼
149
+					}
150
+				});
151
+			});
152
+
153
+			$('body').on('click', function(e) {
154
+				
155
+			});
156
+
157
+		}
158
+	},
159
+	switchScreen: function(mode) {
160
+		if(mode == 'LIST') { // 목록			
161
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG01010_SRH');
162
+
163
+			$('#ITP_AJAX_STOCKMNG01010_LIST_CONTAINER').show();
164
+		}
165
+	}, 
166
+	fnWhsList: function(fnCall) {
167
+		const brandIdVal = $('#ITP_FORM_STOCKMNG01010_SEARCH_BRAND_ID').val();	
168
+		const param = {sbrandId: brandIdVal, pagingYn: false};
169
+		
170
+		fn_ajax_call(WHS_MNG_DETAIL_GRID_LIST, JSON.stringify(param), function(result) {
171
+			
172
+			fn_make_select_whs(result.gridRows, 'ITP_FORM_STOCKMNG01010_SEARCH_WHS_ID');
173
+			
174
+			if (fnCall !== undefined || typeof fnCall !== 'undefined') fnCall();
175
+					
176
+		}, 'POST');
177
+	}, 
178
+	fnLocationList: function(fnCall) {
179
+		const brandIdVal = $('#ITP_FORM_STOCKMNG01010_SEARCH_BRAND_ID').val();	
180
+		const whsIdVal = $('#ITP_FORM_STOCKMNG01010_SEARCH_WHS_ID').val();	
181
+		const param = {brandId: brandIdVal, whsId: whsIdVal, pagingYn: false};
182
+		
183
+		fn_ajax_call(WHS_MNG_LOCATION_GRID_LIST, JSON.stringify(param), function(result) {
184
+			
185
+			fn_make_select_location(result.gridRows, 'ITP_FORM_STOCKMNG01010_SEARCH_LOCATION');
186
+			
187
+			if (fnCall !== undefined || typeof fnCall !== 'undefined') fnCall();
188
+					
189
+		}, 'POST');
190
+	}
191
+};
192
+
193
+/*목록화면 Object*/
194
+let listObj = {
195
+	init: function () {
196
+		this.grid.init();
197
+	},
198
+	itp_STOCKMNG01010_search: false,
199
+	button: {
200
+		search: function() {
201
+			listObj.itp_STOCKMNG01010_search = true;
202
+			let param = $('#ITP_FORM_STOCKMNG01010_SEARCH').serializeObject();
203
+			param.gridSize = $.jgrid.defaults.rowNum;
204
+			param.gridPage = $.jgrid.defaults.page;
205
+			$(STOCKMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
206
+		},
207
+		create: function() {
208
+			pageObj.switchScreen('ADD');			
209
+			itp_fn_form_clear_validate(null, '#ITP_FORM_STOCKMNG01010_DETAIL');						
210
+			// 로케이션 리스트 조회
211
+			createObj.init();
212
+		}
213
+	},
214
+	empty: {
215
+		init: function() {
216
+			var _this = this;
217
+			this.push();
218
+			$(STOCKMNG01010_GRID_EMPTY).on('click', function() {
219
+				_this.back();
220
+				_this.itp_STOCKMNG01010_param.gridSize = $.jgrid.defaults.rowNum;
221
+				$(STOCKMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_STOCKMNG01010_param)}).trigger('reloadGrid');
222
+			});
223
+		},
224
+		itp_STOCKMNG01010_param: {},
225
+		push: function() {
226
+			let param = $('#ITP_FORM_STOCKMNG01010_SEARCH').serializeObject();
227
+			listObj.itp_STOCKMNG01010_param = param;
228
+		},
229
+		back: function() {
230
+			$('#ITP_FORM_STOCKMNG01010_DEVI_TP_CD').val(this.itp_STOCKMNG01010_param.deviTpCd);
231
+			$('#ITP_FORM_STOCKMNG01010_ORDER_YN').val(this.itp_STOCKMNG01010_param.orderYn);
232
+			$('#ITP_FORM_STOCKMNG01010_ADT_AUTH_CD').val(this.itp_STOCKMNG01010_param.adtAuthCd);
233
+			$('#ITP_FORM_STOCKMNG01010_EMAIL_RCV_YN').val(this.itp_STOCKMNG01010_param.emailRcvYn);
234
+			$('#ITP_FORM_STOCKMNG01010_MEMB_EXIT_DT').val(this.itp_STOCKMNG01010_param.membExitDt);
235
+			$('#ITP_FORM_STOCKMNG01010_FROM_DT').val(this.itp_STOCKMNG01010_param.fromDt);
236
+			$('#ITP_FORM_STOCKMNG01010_TO_DT').val(this.itp_STOCKMNG01010_param.toDt);
237
+			$('#ITP_FORM_STOCKMNG01010_KEYWORD').val(this.itp_STOCKMNG01010_param.keyword);
238
+		}
239
+	},
240
+	grid: {
241
+		init: function () {
242
+			// 데이터 없을때
243
+			listObj.empty.push();
244
+			this.search();
245
+		},
246
+		colModel: gridColModel.list,
247
+		search: function() {
248
+			pageObj.switchScreen('LIST');
249
+			this.unload();
250
+			this.load();
251
+		},
252
+		load: function() {
253
+			var data = JSON.parse(sessionStorage.getItem('itp_manage_brand_cd'));
254
+			$('#ITP_FORM_STOCKMNG01010_SEARCH_BRAND_ID').val(data.brandId);
255
+			
256
+			let param = $('#ITP_FORM_STOCKMNG01010_SEARCH').serializeObject();
257
+			param.gridSize = $.jgrid.defaults.rowNum;
258
+
259
+			var option = {
260
+				gridId: STOCKMNG01010_GRID_ID,
261
+				colModel: gridColModel.list,
262
+				param: JSON.stringify(param),
263
+				url: DOMAIN + STOCK_MNG_DETAIL_GRID_LIST,
264
+				pager: STOCKMNG01010_GRID_PAGER,
265
+				onCellSelect: function(rowId, cellIdx, cellValue) {
266
+					var cm = $(this).jqGrid('getGridParam', 'colModel');
267
+					var colNm = cm[cellIdx].name;
268
+					if (colNm == 'whsNm') {
269
+						const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
270
+						const whsIdVal = $(this).jqGrid('getCell', rowId, 'whsId');
271
+						
272
+						const key = {brandId: brandIdVal, whsId: whsIdVal, viewCd: 'R'};
273
+						var param = $.param(key);
274
+						viewObj.init(param);
275
+					}
276
+				},
277
+				loadComplete: function(data) {
278
+					console.log(data);
279
+					itp_fn_grid_load_complete(data, STOCKMNG01010_GRID_ID, true, 'number', 'STOCKMNG01010', listObj.itp_STOCKMNG01010_search, listObj.empty, true, data.gridRecords, true);
280
+					var ids = $(STOCKMNG01010_GRID_ID).getDataIDs();
281
+					$.each(ids, function(idx, rowId) {
282
+						$(STOCKMNG01010_GRID_ID).jqGrid('setCell', rowId, 'whsNm', '', ITP_GRID_COL_STYLE.link);
283
+					});
284
+				},
285
+				onPaging: function(action) {
286
+					itp_fn_grid_paging(STOCKMNG01010_GRID_ID, action, param);
287
+				}
288
+			};
289
+			itp_fn_grid_make_remote(option);
290
+		},
291
+		clearData : function() {
292
+			$(STOCKMNG01010_GRID_ID).jqGrid('clearGridData', true);
293
+			$(STOCKMNG01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
294
+			$(STOCKMNG01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
295
+			$(STOCKMNG01010_GRID_EMPTY).show();
296
+		},
297
+		unload : function() {
298
+			$.jgrid.gridUnload(STOCKMNG01010_GRID_ID);
299
+		}
300
+	}
301
+};

File diff suppressed because it is too large
+ 777 - 311
src/main/webapp/js/app/stockmng/ITP_STOCKMNG04010.js


+ 6 - 6
src/main/webapp/js/app/system/ITP_SYSTEM03010.js

@@ -239,12 +239,12 @@ var itp_fn_SYSTEM03010_detail_grid = {
239 239
 					editoptions: {maxlength: 128}
240 240
 				},
241 241
 				{
242
-					index: 'CONN_URL', name: 'connUrl',
243
-					label: ITP_MSG_LOCALE.label.actionUrl,
244
-					width: '18', fixed: false, align: 'left',
245
-					sortable: false, editable: true, edittype: 'text',
246
-					editrules: {required: false},
247
-					editoptions: {maxlength: 128}
242
+					index: 'WRITE_YN', name: 'writeYn',
243
+					label: ITP_MSG_LOCALE.label.writeYn,
244
+					width: '8', fixed: false, align: 'center',
245
+					sortable: false, editable: true, formatter: 'checkbox', edittype: 'checkbox',
246
+					editoptions: {value: 'Y:N', defaultValue: 'Y'},
247
+					editrules: {required: true}
248 248
 				},
249 249
 				{
250 250
 					index: 'USE_YN', name: 'useYn',

+ 13 - 1
src/main/webapp/js/app/system/ITP_SYSTEM04010.js

@@ -114,10 +114,22 @@ require(['config'], function() {
114 114
 						$.each(rowData, function(key, value) {
115 115
 							if (value.viewCd != 'R') {
116 116
 								value.authNo = keyValue;
117
+								
118
+								if (value.readYn == 'N' && value.writeYn == 'Y') {
119
+									value.readYn = 'Y';
120
+								}
121
+								
117 122
 								if (value.viewCd == 'C') {
118 123
 									gridInsertData.push(value);
119 124
 								} else if (value.viewCd == 'U') {
120
-									gridUpdateData.push(value);
125
+									
126
+									if (value.readYn == 'N' && value.writeYn == 'N') {
127
+										value.viewCd = 'D';
128
+										gridDeleteData.push(value);
129
+									} else {
130
+										gridUpdateData.push(value);
131
+									}
132
+									
121 133
 								}
122 134
 							}
123 135
 						});