Procházet zdrojové kódy

반품관리 작업중

whakdo963 před 2 roky
rodič
revize
2e86d06a6e
27 změnil soubory, kde provedl 2460 přidání a 72 odebrání
  1. 31 1
      bin/src/main/webapp/app/oper/OPER01010.html
  2. 33 29
      bin/src/main/webapp/app/oper/OPER02010.html
  3. 6 7
      bin/src/main/webapp/app/pomng/POMNG01010.html
  4. 47 0
      bin/src/main/webapp/app/popup/biz/BIZPOP_AFFL_BRAND.html
  5. 38 0
      bin/src/main/webapp/app/popup/biz/BIZPOP_AFFL_SHOP.html
  6. 181 0
      bin/src/main/webapp/app/rtnmng/RTNMNG01010.html
  7. 0 0
      bin/src/main/webapp/app/rtnmng/RTNMNG02010.html
  8. 0 0
      bin/src/main/webapp/app/rtnmng/RTNMNG03010.html
  9. 0 0
      bin/src/main/webapp/app/rtnmng/RTNMNG04010.html
  10. 0 0
      bin/src/main/webapp/app/rtnmng/RTNMNG05010.html
  11. 0 0
      bin/src/main/webapp/app/rtnmng/RTNMNG06010.html
  12. 3 0
      bin/src/main/webapp/css/style.css
  13. 45 21
      bin/src/main/webapp/js/app/config.js
  14. 5 3
      bin/src/main/webapp/js/app/locales/locale-ko.js
  15. 138 0
      bin/src/main/webapp/js/app/main.js
  16. 725 0
      bin/src/main/webapp/js/app/oper/ITP_OPER01010.js
  17. 771 0
      bin/src/main/webapp/js/app/oper/ITP_OPER02010.js
  18. 128 0
      bin/src/main/webapp/js/app/popup/biz/ITP_BIZPOP_AFFL_BRAND.js
  19. 116 0
      bin/src/main/webapp/js/app/popup/biz/ITP_BIZPOP_AFFL_SHOP.js
  20. 6 4
      bin/src/main/webapp/main.html
  21. 6 7
      src/main/webapp/app/pomng/POMNG01010.html
  22. 181 0
      src/main/webapp/app/rtnmng/RTNMNG01010.html
  23. 0 0
      src/main/webapp/app/rtnmng/RTNMNG02010.html
  24. 0 0
      src/main/webapp/app/rtnmng/RTNMNG03010.html
  25. 0 0
      src/main/webapp/app/rtnmng/RTNMNG04010.html
  26. 0 0
      src/main/webapp/app/rtnmng/RTNMNG05010.html
  27. 0 0
      src/main/webapp/app/rtnmng/RTNMNG06010.html

+ 31 - 1
bin/src/main/webapp/app/oper/OPER01010.html

@@ -17,7 +17,20 @@
17 17
 					<div class="itp_lg_form itp_type1 fix">
18 18
 						<div class="itp_srh_border fix">
19 19
 							<div class="col-xs-12">
20
-								<form id="ITP_FORM_OPERATION01010_SEARCH" class="form-horizontal">
20
+								<form id="ITP_FORM_OPER01010_SEARCH" class="form-horizontal">
21
+									<input type="hidden" id="ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_ID" name="afflShopId" value="">
22
+									<div class="form-group">
23
+										<div class="col-xs-2 itp_ip itp_noMar">
24
+											<input type="text" name="afflShopNm" id="ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_NM" class="form-control itp_input" placeholder="가맹점명" readonly>
25
+										</div>
26
+										<div class="col-xs-2 itp_ip itp_noMar">
27
+											<button type="button" id="ITP_FORM_OPER01010_SEARCH_AFFL_SHOP" class="btn btn-success btn-sm SEB"><i class="glyphicon glyphicon-search"></i></button>
28
+											<button type="button" id="ITP_FORM_OPER01010_DELETE_AFFL_SHOP" class="btn btn-primary btn-sm SEB"><i class="glyphicon glyphicon-erase"></i></button>
29
+										</div>
30
+										<div class="col-xs-3 itp_ip itp_noMar">
31
+											<select id="ITP_FORM_OPER01010_SEARCH_BRAND_ID" class="form-control itp_input" name="sbrandId"></select>
32
+										</div>
33
+									</div>
21 34
 									<div class="form-group">
22 35
 										<div class="col-xs-2 itp_ip itp_noMar">
23 36
 											<select id="ITP_FORM_OPERATION01010_SERVICE_ST_DT" class="form-control itp_input" name="serviceStDt">
@@ -60,6 +73,23 @@
60 73
 								<section class="itp_form_sec">
61 74
 									<!-- <h4 class="itp_form_tit">사용자정보 현재 테스트중</h4> -->
62 75
 									<div class="itp_form_in">
76
+										<div class="form-group">
77
+											<label class="col-xs-2 itp_lb">가맹점</label>
78
+											<div class="col-xs-4 itp_ip">
79
+												<div class="col-xs-5 itp_in">
80
+													<input type="text" name="afflShopNm" id="ITP_FORM_OPER01010_DETAIL_SEARCH_AFFL_SHOP_NM" class="form-control itp_input" placeholder="가맹점명" readonly>
81
+													<button type="button" id="ITP_FORM_OPER01010_DETAIL_SEARCH_AFFL_SHOP" class="btn btn-success btn-sm SEB"><i class="glyphicon glyphicon-search"></i></button>
82
+													<button type="button" id="ITP_FORM_OPER01010_DETAIL_DELETE_AFFL_SHOP" class="btn btn-primary btn-sm SEB"><i class="glyphicon glyphicon-erase"></i></button>
83
+												</div>
84
+											</div>
85
+											<label class="col-xs-2 itp_lb">브랜드</label>
86
+											<div class="col-xs-4 itp_ip">
87
+												<div class="col-xs-5 itp_in">
88
+													<select id="ITP_FORM_OPER01010_DETAIL_SEARCH_BRAND_ID" class="form-control itp_input" name="brandId">
89
+													</select>
90
+												</div>
91
+											</div>
92
+										</div>
63 93
 										<div class="form-group">
64 94
 											<label class="col-xs-2 itp_lb">사용자명</label>
65 95
 											<div class="col-xs-4 itp_ip">

+ 33 - 29
bin/src/main/webapp/app/oper/OPER02010.html

@@ -18,6 +18,19 @@
18 18
 						<div class="itp_srh_border fix">
19 19
 							<div class="col-xs-12">
20 20
 								<form id="ITP_FORM_OPER02010_SEARCH" class="form-horizontal">
21
+									<input type="hidden" id="ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID" name="afflShopId" value="">
22
+									<div class="form-group">
23
+										<div class="col-xs-2 itp_ip itp_noMar">
24
+											<input type="text" name="afflShopNm" id="ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM" class="form-control itp_input" placeholder="가맹점명" readonly>
25
+										</div>
26
+										<div class="col-xs-2 itp_ip itp_noMar">
27
+											<button type="button" id="ITP_FORM_OPER02010_SEARCH_AFFL_SHOP" class="btn btn-success btn-sm SEB"><i class="glyphicon glyphicon-search"></i></button>
28
+											<button type="button" id="ITP_FORM_OPER02010_DELETE_AFFL_SHOP" class="btn btn-primary btn-sm SEB"><i class="glyphicon glyphicon-erase"></i></button>
29
+										</div>
30
+										<div class="col-xs-3 itp_ip itp_noMar">
31
+											<select id="ITP_FORM_OPER02010_SEARCH_BRAND_ID" class="form-control itp_input" name="sbrandId"></select>
32
+										</div>
33
+									</div>
21 34
 									<div class="form-group">
22 35
 										<div class="col-xs-2 itp_ip itp_noMar">
23 36
 											<select id="ITP_FORM_OPER02010_SERVICE_ST_DT" class="form-control itp_input">
@@ -60,6 +73,7 @@
60 73
 								<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_VIEW_CD" name="viewCd" value="C">
61 74
 								<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_NTICE_NO" name="nticeNo" value="">
62 75
 								<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_FILE_NO" name="fileNo" value="">
76
+								<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_ID" name="afflShopId" value="">
63 77
 
64 78
 								<section class="itp_form_sec">
65 79
 									<!-- <h4 class="itp_form_tit">공지정보</h4> -->
@@ -67,17 +81,16 @@
67 81
 										<div class="form-group">
68 82
 											<label class="col-xs-2 itp_lb">가맹점</label>
69 83
 											<div class="col-xs-5 itp_ip">
70
-												<div class="col-xs-10 itp_in">
71
-													<select id="ITP_FORM_OPER01010_DETAIL_USER_AFFL_SHOP" class="form-control itp_input" name="afflShop">
72
-														<option value=""></option>
73
-													</select>
84
+												<div class="col-xs-8 itp_in">
85
+													<input type="text" name="afflShopNm" id="ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM" class="form-control itp_input" placeholder="가맹점명" readonly>
86
+													<button type="button" id="ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP" class="btn btn-success btn-sm SEB"><i class="glyphicon glyphicon-search"></i></button>
87
+													<button type="button" id="ITP_FORM_OPER02010_DETAIL_DELETE_AFFL_SHOP" class="btn btn-primary btn-sm SEB"><i class="glyphicon glyphicon-erase"></i></button>
74 88
 												</div>
75 89
 											</div>
76 90
 											<label class="col-xs-2 itp_lb">브랜드</label>
77 91
 											<div class="col-xs-5 itp_ip">
78
-												<div class="col-xs-5 itp_in">
79
-													<select id="ITP_FORM_OPER01010_DETAIL_USER_BRAND_NM" class="form-control itp_input" name="brandNm">
80
-														<option value=""></option>
92
+												<div class="col-xs-12 itp_in">
93
+													<select id="ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID" class="form-control itp_input" name="brandId">
81 94
 													</select>
82 95
 												</div>
83 96
 											</div>
@@ -132,12 +145,20 @@
132 145
 												</div>
133 146
 											</div>
134 147
 										</div>
135
-										<div class="form-group border">
148
+										<div class="form-group colspan">
136 149
 											<label class="col-xs-2 itp_lb">공지대상</label>
137
-											<div class="col-xs-10 itp_ip">
150
+											<div class="col-xs-5 itp_ip">
138 151
 												<div class="col-xs-2 itp_in">
139 152
 												<select id="ITP_FORM_OPER02010_DETAIL_TARGET_CD" class="form-control itp_input" name="targetCd"></select>
140 153
 												</div>
154
+												<div class="col-xs-5 itp_in" id="ITP_FORM_OPER02010_TARGET">
155
+													<input id="ITP_FORM_OPER02010_DETAIL_BRAND" type="checkbox" class="itp_check"> 브랜드
156
+													<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_BRAND_CHK" name="brandChk" value="">
157
+													<input id="ITP_FORM_OPER02010_DETAIL_STORE" type="checkbox" class="itp_check"> 매장
158
+													<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_STORE_CHK" name="storeChk" value="">
159
+													<input id="ITP_FORM_OPER02010_DETAIL_SPPLY" type="checkbox" class="itp_check"> 공급사
160
+													<input type="hidden" id="ITP_FORM_OPER02010_DETAIL_SPPLY_CHK" name="spplyChk" value="">
161
+												</div>
141 162
 											</div>
142 163
 										</div>
143 164
 									</div>
@@ -148,10 +169,10 @@
148 169
 
149 170
 					<div class="itp_table fix">
150 171
 						<div class="itp_table_head fix">
151
-							<h4 class="itp_table_tit">* 공지대상이 특정 대상일 경우 추가 버큰을 통해 사용자  등록 함</h4>
172
+							<h4 class="itp_table_tit">* 권한 정보 (* 공지대상이 특정 대상일 경우 추가 버튼 을 통해 사용자 등록 함)</h4>
152 173
 							<div class="pull-right itp_cicon">
153
-								<button type="button" id="ITP_BTN_OPER02010_DETAIL_ADDROW" class="btn btn-primary btn-sm ADB" style="display: inline-block;"><i class="glyphicon glyphicon-plus"></i> 추가</button>
154
-								<button type="button" id="ITP_BTN_OPER02010_DETAIL_DELROW" class="btn btn-danger btn-sm DEB"><i class="glyphicon glyphicon-remove"></i> 삭제</button>
174
+								<button type="button" id="ITP_BTN_OPER02010_DETAIL_ADDROW" class="btn btn-primary btn-sm ADB" style="display: inline-block;" disabled><i class="glyphicon glyphicon-plus"></i> 추가</button>
175
+								<button type="button" id="ITP_BTN_OPER02010_DETAIL_DELROW" class="btn btn-danger btn-sm DEB" disabled><i class="glyphicon glyphicon-remove"></i> 삭제</button>
155 176
 							</div>
156 177
 						</div>
157 178
 
@@ -162,23 +183,6 @@
162 183
 							<div id="ITP_OPER02010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
163 184
 						</div>
164 185
 					</div>
165
-
166
-					<div class="itp_table fix">
167
-						<div class="itp_table_head fix">
168
-							<h4 class="itp_table_tit">* 권한 정보 (* 공지대상이 특정 대상일 일겨웅 추가 버튼 을 통해 사용자 등록 함)</h4>
169
-							<div class="pull-right itp_cicon">
170
-								<button type="button" id="ITP_BTN_OPER02010_BRAND_ADDROW" class="btn btn-primary btn-sm ADB" style="display: inline-block;"><i class="glyphicon glyphicon-plus"></i> 추가</button>
171
-								<button type="button" id="ITP_BTN_OPER02010_BRAND_DELROW" class="btn btn-danger btn-sm DEB"><i class="glyphicon glyphicon-remove"></i> 삭제</button>
172
-							</div>
173
-						</div>
174
-
175
-						<div id="ITP_OPER02010_BRAND_jqGrid_list" class="itp_tb_list">
176
-							<div id="ITP_OPER02010_BRAND_jqGridView" class="itp_views fix"></div>
177
-							<table id="ITP_OPER02010_BRAND_jqGrid"></table>
178
-							<div id="ITP_OPER02010_BRAND_jqGridPager"></div>
179
-							<div id="ITP_OPER02010_BRAND_jqGridEmpty" class="itp_no_data"></div>
180
-						</div>
181
-					</div>
182 186
 				</div>
183 187
 				<div id="ITP_AJAX_OPER02010_VIEW_CONTAINER">
184 188
 					<div class="itp_form itp_type1 fix">

+ 6 - 7
bin/src/main/webapp/app/pomng/POMNG01010.html

@@ -83,10 +83,10 @@
83 83
 														<input type="checkbox" style="width:20px; height:17px;">
84 84
 													</td>
85 85
 													<td>
86
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
86
+								    					<div id="ITP_FORM_POMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
87 87
 													</td>
88 88
 													<td>
89
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_NM" name="ITEM_NM"></div>
89
+								    					<div id="ITP_FORM_POMNG01010_ITEM_NM" name="ITEM_NM"></div>
90 90
 													</td>
91 91
 													<td>
92 92
 														<select id="ITP_FORM_POMNG01010_UNIT" class="form-control itp_input" name="UNIT">
@@ -117,10 +117,10 @@
117 117
 													
118 118
 													</td>
119 119
 													<td>
120
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
120
+								    					<div id="ITP_FORM_POMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
121 121
 													</td>
122 122
 													<td>
123
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_NM" name="ITEM_NM"></div>
123
+								    					<div id="ITP_FORM_POMNG01010_ITEM_NM" name="ITEM_NM"></div>
124 124
 													</td>
125 125
 													<td>
126 126
 																											
@@ -147,10 +147,10 @@
147 147
 													
148 148
 													</td>
149 149
 													<td>
150
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
150
+								    					<div id="ITP_FORM_POMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
151 151
 													</td>
152 152
 													<td>
153
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_NM" name="ITEM_NM"></div>
153
+								    					<div id="ITP_FORM_POMNG01010_ITEM_NM" name="ITEM_NM"></div>
154 154
 													</td>
155 155
 													<td>
156 156
 																											
@@ -181,6 +181,5 @@
181 181
 			</div>
182 182
 		</article>
183 183
 	</div>
184
-	
185 184
 	<div id="ITP_TAP_JS"></div>	
186 185
 </section>

+ 47 - 0
bin/src/main/webapp/app/popup/biz/BIZPOP_AFFL_BRAND.html

@@ -0,0 +1,47 @@
1
+<div id="ITP_BIZPOP_AFFL_BRAND" class="modal itp_modal">
2
+	<div class="modal-dialog">
3
+		<div class="modal-content">
4
+			<form id="ITP_FORM_BIZPOP_AFFL_BRAND">
5
+				<div class="modal-header">
6
+					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
7
+					<h5 class="modal-title">가맹점 검색</h5>
8
+				</div>
9
+				<div class="modal-body">
10
+					<div class="itp_form fix">
11
+						<div class="col-xs-12 itp_form_inline">
12
+							<div class="form-horizontal fix">
13
+								<!--<div class="col-xs-4 itp_ip itp_pr">
14
+									<input type="text" name="scmpyCd" id="ITP_FORM_BIZPOP_AFFL_BRAND_CMPY_CD" class="form-control itp_input" placeholder="가맹점코드">
15
+								</div>-->
16
+								<div class="col-xs-9 itp_ip itp_pr">
17
+									<input type="text" name="afflShopNm" id="ITP_FORM_BIZPOP_AFFL_BRAND_CMPY_NM" class="form-control itp_input" placeholder="가맹점명">
18
+								</div>
19
+								<!--<div class="col-xs-4 itp_ip itp_noMar">
20
+									<select id="ITP_FORM_BIZPOP_AFFL_BRAND_CMPY_TYPE_CD" class="form-control itp_input" name="scmpyTypeCd"></select>
21
+								</div>-->
22
+								<div class="pull-right itp_cicon">
23
+									<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_AFFL_BRAND_BTN_SEARCH" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i> 조회</button>
24
+									<button type="button" class="btn btn-primary btn-sm" id="ITP_BIZPOP_AFFL_BRAND_BTN_SELECT"><i class="glyphicon glyphicon-ok"></i> 선택</button>
25
+								</div>
26
+							</div>
27
+						</div>
28
+					</div>
29
+					<!--<div class="itp_form fix">
30
+						<div class="pull-right itp_cicon">
31
+							<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_AFFL_BRAND_BTN_SEARCH" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i> 조회</button>
32
+							<button type="button" class="btn btn-primary btn-sm" id="ITP_BIZPOP_AFFL_BRAND_BTN_SELECT"><i class="glyphicon glyphicon-ok"></i> 선택</button>
33
+						</div>
34
+					</div>-->
35
+					<div id="ITP_BIZPOP_AFFL_BRAND_jqGrid_list" class="itp_tb_list" data-total-cnt="">
36
+						<div id="ITP_BIZPOP_AFFL_BRAND_jqGridView" class="itp_views fix"></div>
37
+						<table id="ITP_BIZPOP_AFFL_BRAND_jqGrid"></table>
38
+						<div id="ITP_BIZPOP_AFFL_BRAND_jqGridPager"></div>
39
+						<div id="ITP_BIZPOP_AFFL_BRAND_jqGridEmpty" class="itp_no_data"></div>
40
+					</div>
41
+				</div>
42
+			</form>
43
+		</div>
44
+	</div>
45
+
46
+	<div id="ITP_POPUP_JS"></div>
47
+</div>

+ 38 - 0
bin/src/main/webapp/app/popup/biz/BIZPOP_AFFL_SHOP.html

@@ -0,0 +1,38 @@
1
+<div id="ITP_BIZPOP_AFFL_SHOP" class="modal itp_modal">
2
+	<div class="modal-dialog">
3
+		<div class="modal-content">
4
+			<form id="ITP_FORM_BIZPOP_AFFL_SHOP">
5
+				<div class="modal-header">
6
+					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
7
+					<h5 class="modal-title">가맹점 검색</h5>
8
+				</div>
9
+				<div class="modal-body">
10
+					<div class="itp_form fix">
11
+						<div class="col-xs-12 itp_form_inline">
12
+							<div class="form-horizontal fix">
13
+								<div class="col-xs-9 itp_ip itp_pr">
14
+									<input type="text" name="afflShopNm" id="ITP_FORM_BIZPOP_AFFL_SHOP_CMPY_NM" class="form-control itp_input" placeholder="가맹점명">
15
+								</div>
16
+								<!--<div class="col-xs-4 itp_ip itp_noMar">
17
+									<select id="ITP_FORM_BIZPOP_AFFL_BRAND_CMPY_TYPE_CD" class="form-control itp_input" name="scmpyTypeCd"></select>
18
+								</div>-->
19
+								<div class="pull-right itp_cicon">
20
+									<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_AFFL_SHOP_BTN_SEARCH" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i> 조회</button>
21
+									<button type="button" class="btn btn-primary btn-sm" id="ITP_BIZPOP_AFFL_SHOP_BTN_SELECT"><i class="glyphicon glyphicon-ok"></i> 선택</button>
22
+								</div>
23
+							</div>
24
+						</div>
25
+					</div>
26
+					<div id="ITP_BIZPOP_AFFL_SHOP_jqGrid_list" class="itp_tb_list" data-total-cnt="">
27
+						<div id="ITP_BIZPOP_AFFL_SHOP_jqGridView" class="itp_views fix"></div>
28
+						<table id="ITP_BIZPOP_AFFL_SHOP_jqGrid"></table>
29
+						<div id="ITP_BIZPOP_AFFL_SHOP_jqGridPager"></div>
30
+						<div id="ITP_BIZPOP_AFFL_SHOP_jqGridEmpty" class="itp_no_data"></div>
31
+					</div>
32
+				</div>
33
+			</form>
34
+		</div>
35
+	</div>
36
+
37
+	<div id="ITP_POPUP_JS"></div>
38
+</div>

+ 181 - 0
bin/src/main/webapp/app/rtnmng/RTNMNG01010.html

@@ -0,0 +1,181 @@
1
+<section id="ITP_TAB_RTNMNG01010" class="tab-pane active itp_sec">
2
+	<div class="itp_cont">
3
+		<article class="itp_detail">
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>
6
+				<div class="pull-right itp_cicon">
7
+					<button type="button" id="ITP_BTN_RTNMNG01010_SRH" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;요청&nbsp;&nbsp;</button>
8
+				</div>
9
+			</div>
10
+			<div class="itp_det_in">
11
+				<div id="ITP_AJAX_RTNMNG01010_LIST_CONTAINER">
12
+					<div class="itp_form itp_type1 fix">
13
+						<div class="col-xs-12">
14
+							<form id="ITP_FORM_RTNMNG01010_DETAIL" class="form-horizontal">
15
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
16
+								<section class="itp_form_sec">
17
+									<h4 class="itp_form_tit">반품요청정보</h4>
18
+									<div class="itp_form_in">	
19
+										<div class="form-group">
20
+											<label class="col-xs-2 itp_lb">브랜드 *</label>
21
+											<div class="col-xs-4 itp_ip BRAND_NM"></div>
22
+											<label class="col-xs-2 itp_lb">반품번호</label>
23
+											<div class="col-xs-4 itp_ip PCH_REQ_UNQ_NO"></div>
24
+										</div>
25
+									</div>
26
+									<div class="itp_form_in">	
27
+										<div class="form-group">
28
+											<label class="col-xs-2 itp_lb">반품장소</label>
29
+											<div class="col-xs-4 itp_ip">
30
+												<div class="col-xs-5 itp_in">
31
+													<input type="text" id="ITP_FORM_POMNG04010_SEARCH_DLV_PLACE" class="form-control itp_input" name="DLV_PLACE" value="매장/창고" />
32
+												</div>
33
+												<div class="col-xs-4 itp_in" style="padding-left:3px">
34
+													<button type="button" id="ITP_BTN_POMNG04010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
35
+													<button type="button" id="ITP_BTN_POMNG04010_MODIFY" class="btn btn-success btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-ok"></i></button>
36
+								                </div>
37
+											</div>
38
+											<label class="col-xs-2 itp_lb">수거요청일</label>
39
+											<div class="col-xs-4 itp_ip">
40
+												<div class="col-xs-4 itp_in input-daterange input-group date">
41
+													<input type="text" id="ITP_FORM_POMNG02010_SEARCH_COL_REQ_DT" class="form-control itp_input" name="COL_REQ_DT" value="">
42
+												</div>
43
+											</div>
44
+										</div>
45
+									</div>
46
+									<div class="itp_form_in">
47
+										<div class="form-group">
48
+											<label class="col-xs-2 itp_lb">비고</label>
49
+											<div class="col-xs-10 itp_ip">
50
+												<input type="text" id="ITP_FORM_RTNMNG01010_SEARCH_NOTE" class="form-control itp_input" name="NOTE" value="" />
51
+											</div>
52
+										</div>
53
+									</div>
54
+									<div class="itp_form_in">
55
+										<div class="itp_table_head fix" style="background:#f5f5f5;">
56
+											<h4 class="itp_table_tit">요청 품목</h4>
57
+											<div class="pull-right itp_cicon">
58
+												<button type="button" id="ITP_BTN_RTNMNG01010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
59
+												<button type="button" id="ITP_BTN_RTNMNG01010_DETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon "></i>&nbsp;&nbsp;품목삭제&nbsp;&nbsp;</button>
60
+											</div>
61
+										</div>
62
+										<table class="table order">
63
+											<thead>
64
+												<tr>
65
+													<th style="width:5%;">선택</th>
66
+													<th style="width:17%;">품목번호</th>
67
+													<th style="width:18%;">품목명</th>
68
+													<th style="width:10%;">단위</th>
69
+													<th style="width:10%;">수량</th>
70
+													<th style="width:10%;">예상구매금액</th>
71
+													<th style="width:10%;">납기요청일</th>
72
+													<th style="width:10%;">납품장소</th>
73
+													<th style="width:10%;">납품장소상세</th>
74
+												 </tr>
75
+											 </thead>
76
+											 <tbody class="check">
77
+												 <tr>
78
+													<td>
79
+														<input type="checkbox" style="width:20px; height:17px;">
80
+													</td>
81
+													<td>
82
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
83
+													</td>
84
+													<td>
85
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_NM" name="ITEM_NM"></div>
86
+													</td>
87
+													<td>
88
+														<select id="ITP_FORM_RTNMNG01010_UNIT" class="form-control itp_input" name="UNIT">
89
+														</select>													
90
+													</td>
91
+													<td>
92
+														<input type="text" id="ITP_FORM_RTNMNG01010_STDD_QYT" class="form-control itp_input" name="STDD_QYT" value="">
93
+													</td>
94
+													<td>
95
+														<input type="text" id="ITP_FORM_RTNMNG01010_" class="form-control itp_input" name="" value="">
96
+													</td>
97
+													<td>
98
+														<div class="input-daterange input-group date itp_in">
99
+															<input type="text" id="ITP_FORM_RTNMNG01010_DLV_REQ_DT" class="form-control itp_input" name="DLV_REQ_DT" value="">
100
+														</div>
101
+													<td>
102
+														<select id="ITP_FORM_RTNMNG01010_DETAIL_BNK_CD" class="form-control itp_input" name="BNK_CD">
103
+														</select>
104
+													</td>
105
+													<td>
106
+														<input type="text" id="ITP_FORM_RTNMNG01010_" class="form-control itp_input" name="" value="">
107
+													</td>
108
+												 </tr>
109
+											 </tbody>
110
+											 <tbody class="check">
111
+												 <tr>
112
+													<td>
113
+													
114
+													</td>
115
+													<td>
116
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
117
+													</td>
118
+													<td>
119
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_NM" name="ITEM_NM"></div>
120
+													</td>
121
+													<td>
122
+																											
123
+													</td>
124
+													<td>
125
+													
126
+													</td>
127
+													<td>
128
+													
129
+													</td>
130
+													<td>
131
+													
132
+													<td>
133
+													
134
+													</td>
135
+													<td>
136
+													
137
+													</td>
138
+												 </tr>
139
+											 </tbody>
140
+											 <tbody class="check">
141
+												 <tr>
142
+													<td>
143
+													
144
+													</td>
145
+													<td>
146
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
147
+													</td>
148
+													<td>
149
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_NM" name="ITEM_NM"></div>
150
+													</td>
151
+													<td>
152
+																											
153
+													</td>
154
+													<td>
155
+													
156
+													</td>
157
+													<td>
158
+													
159
+													</td>
160
+													<td>
161
+													
162
+													<td>
163
+													
164
+													</td>
165
+													<td>
166
+													
167
+													</td>
168
+												 </tr>
169
+											 </tbody>
170
+										 </table>
171
+									</div>
172
+								</section>												
173
+							</form>
174
+						</div>
175
+					</div>
176
+				</div>
177
+			</div>
178
+		</article>
179
+	</div>
180
+	<div id="ITP_TAP_JS"></div>	
181
+</section>

+ 0 - 0
bin/src/main/webapp/app/rtnmng/RTNMNG02010.html


+ 0 - 0
bin/src/main/webapp/app/rtnmng/RTNMNG03010.html


+ 0 - 0
bin/src/main/webapp/app/rtnmng/RTNMNG04010.html


+ 0 - 0
bin/src/main/webapp/app/rtnmng/RTNMNG05010.html


+ 0 - 0
bin/src/main/webapp/app/rtnmng/RTNMNG06010.html


+ 3 - 0
bin/src/main/webapp/css/style.css

@@ -121,6 +121,9 @@ a, button {outline:none !important; text-decoration:none !important;}
121 121
 #ITP_HEADER .itp_rt .itp_icon {margin-right:5px;}
122 122
 #ITP_HEADER .itp_logo {margin:0; padding:0; color:#337ab7; float:left; width:30px;}
123 123
 #ITP_HEADER .itp_logo img{width:30px;}
124
+#ITP_HEADER .itp_txt_brand {float:left; margin:4px; padding:0 4px; color:#fff; font-size:18px; text-decoration:none;}
125
+#ITP_HEADER .itp_sch_brand {margin:0 4px; padding:0; color:#337ab7; float:left; width:30px;}
126
+#ITP_HEADER .itp_sch_brand button{width:30px;}
124 127
 #ITP_HEADER .itp_menu {float:left; border:1px solid #ddd; line-height: 24px; background:#eee;margin:4px; border-radius: 2px; padding:0 4px;}
125 128
 #ITP_HEADER .itp_menu a {color:#000; font-size:13px; text-decoration:none;}
126 129
 #ITP_HEADER .itp_out {float:left; border:1px solid #000; line-height: 24px; background:#666; margin:4px; border-radius: 2px; padding:0 4px;}

+ 45 - 21
bin/src/main/webapp/js/app/config.js

@@ -139,6 +139,10 @@ require([
139 139
 	$('[data-toggle="tooltip"]').tooltip();
140 140
 	$('.modal.itp_modal .modal-content').draggable();
141 141
 
142
+
143
+	itp_fn_set_timeout.init();
144
+
145
+
142 146
 	$('#ITP_BTN_HOME').on('click', function() {
143 147
 		location.replace(ITP_CONTEXTPATH + '/main.html');
144 148
 	});
@@ -185,8 +189,11 @@ require([
185 189
 		if(curIdx === selTabIndex) {
186 190
 			$('#ITP_HEADER .itp_tab_list li').removeClass('active');
187 191
 			$('#ITP_CONTAINER .itp_contents .itp_sec').removeClass('active');
188
-			$('#ITP_HEADER .itp_tab_list li:first-child').addClass('active');
189
-			$('#ITP_CONTAINER .itp_contents .itp_sec:first-child').addClass('active');
192
+			// $('#ITP_HEADER .itp_tab_list li:first-child').addClass('active');
193
+			// $('#ITP_CONTAINER .itp_contents .itp_sec:first-child').addClass('active');
194
+			$('#ITP_HEADER .itp_tab_list li').eq(curIdx - 1).addClass('active');
195
+			$('#ITP_CONTAINER .itp_contents .itp_sec').eq(curIdx - 1).addClass('active');
196
+			itp_fn_fire_window_resize();
190 197
 			selTabIndex = 0;
191 198
 		} else {
192 199
 			selTabIndex = selTabIndex - 1;
@@ -341,8 +348,9 @@ require([
341 348
 					USER_NM = result.userNm;					
342 349
 					USER_TYPE_CD = result.userTypeCd;
343 350
 					AUTH_TYPE_CD = result.authTpCd;
344
-					AFFL_LIST = result.afflList;
345
-					BRAND_LIST = result.brandList;
351
+					AUTH_TYPE_NM = result.authTpNm;
352
+					AFFL_SHOP_LIST = result.afflList;
353
+					AFFL_BRAND_LIST = result.brandList;
346 354
 					/*
347 355
 					if(FRCOMP_LIST.length > 0) {
348 356
 						let itp_manage_cmpy_cd = '';
@@ -367,7 +375,7 @@ require([
367 375
 					// 사용자명
368 376
 					$('#ITP_LOGIN_USER').text(USER_NM);
369 377
 					// 가맹점 만들기
370
-					fn_make_brand_shop.init();
378
+					fn_make_affl_brand.init();
371 379
 					// 왼쪽 메뉴 만들기
372 380
 					fn_make_side_menu();
373 381
 					// 메뉴 요약
@@ -388,33 +396,30 @@ function fn_make_menu_summary() {
388 396
 	
389 397
 }
390 398
 
391
-var fn_make_brand_shop = {
399
+var fn_make_affl_brand = {
392 400
 	init : function() {
393 401
 		this.make();
394 402
 		this.action();
395 403
 	},
396 404
 	make: function () {
397
-		if(BRAND_LIST.length > 1) {
398
-			sessionStorage.setItem('itp_manage_cmpy_cd', JSON.stringify(BRAND_LIST[0]));
399
-			$('#ITP_TXT_MAIN_SHR_CMPY').text(BRAND_LIST[0].brandNm);
400
-		} else {
401
-			if(BRAND_LIST.length === 1) {
402
-				sessionStorage.setItem('itp_manage_cmpy_cd', JSON.stringify(BRAND_LIST[0]));
403
-				$('#ITP_TXT_MAIN_SHR_CMPY').text(BRAND_LIST[0].brandNm);
404
-			}
405
-			$('#ITP_BTN_MAIN_SHR_CMPY').hide();
406
-		}
405
+		sessionStorage.setItem('itp_manage_cmpy_cd', (AFFL_BRAND_LIST.length < 1) ? '' : JSON.stringify(AFFL_BRAND_LIST[0]));
406
+		let authTypeNm = (AUTH_TYPE_NM === undefined) ? '오더퀸' : AUTH_TYPE_NM;
407
+		$('#ITP_TXT_MAIN_SHR_AFFL').text(authTypeNm);
407 408
 	},
408 409
 	action: function () {
409
-		$('#ITP_BTN_MAIN_SHR_CMPY').on('click', function() {
410
+		$('#ITP_BTN_MAIN_SHR_AFFL').on('click', function() {
410 411
 			// 팝업
411 412
 			var popFn = function(rowDataPop) {
413
+				console.log(rowDataPop);
414
+				// sessionStorage.setItem('itp_manage_cmpy_cd', JSON.stringify(AFFL_BRAND_LIST[0]));
415
+				// $('#ITP_TXT_MAIN_SHR_CMPY').text(AFFL_BRAND_LIST[0].brandNm);
412 416
 				$.each(rowDataPop, function(key, value) {
413 417
 					itp_fn_close_other_tab(''); // 다른탭 닫기
414
-					sessionStorage.setItem('itp_manage_cmpy_cd', JSON.stringify(value));
418
+					$('#ITP_TXT_MAIN_SHR_BRAND').text('(' + value.brandNm + ')');
419
+					sessionStorage.setItem('itp_manage_brand_cd', JSON.stringify(value));
415 420
 				});
416 421
 			};
417
-			fn_call_popup('biz', 'BIZPOP_FRCOMP_STORE', '#ITP_ASIDE', popFn, null, 'S');
422
+			fn_call_popup('biz', 'BIZPOP_AFFL_BRAND', '#ITP_ASIDE', popFn, null, 'S');
418 423
 		});
419 424
 	}
420 425
 };
@@ -464,6 +469,11 @@ function fn_make_side_menu() {
464 469
 
465 470
 		console.log('[ITP_NAV_LINK] data-itp-nav-id = ' + id + ', data-conn-url = ' + connUrl + ', tabSize = ' + tabSize);
466 471
 
472
+		if(String(id).indexOf('OPER') === -1 && !sessionStorage.getItem('itp_manage_brand_cd')) {
473
+			itp_fn_modal_alert(ITP_MSG_LOCALE.message.page.noChoiceBrand);
474
+			return false;
475
+		}
476
+
467 477
 		if (tabSize > 10) {
468 478
 			itp_fn_modal_alert(ITP_MSG_LOCALE.message.page.noMoreTab);
469 479
 			return false;
@@ -619,7 +629,7 @@ function fn_make_select_brand(options, select_id, all_show_yn, all_name) { //브
619 629
 	}
620 630
 	$.each(options, function(key, value) {
621 631
 		$('<option/>', {
622
-            'value': value.brandCd,	// 브랜드코드
632
+            'value': value.brandId,	// 브랜드코드
623 633
             'text': value.brandNm	// 브랜드명
624 634
         }).appendTo($select_id);
625 635
 	});
@@ -2855,4 +2865,18 @@ var itp_fn_jqgrid_to_excel = function(gridId, fileName, sheetName){
2855 2865
 		dataList.push(data);
2856 2866
 	});
2857 2867
 	itp_fn_export_excel(dataList, fileName, sheetName);    
2858
-}
2868
+};
2869
+
2870
+var itp_fn_set_timeout = {
2871
+	init: function () {
2872
+		this.action();
2873
+	},
2874
+	action: function () {
2875
+		$(document).on('click', 'button', function() {
2876
+			if(!$(this).hasClass('itp_out')) {
2877
+				//로그인체크
2878
+				itp_fn_logined_check();
2879
+			}
2880
+		});
2881
+	}
2882
+};

+ 5 - 3
bin/src/main/webapp/js/app/locales/locale-ko.js

@@ -106,13 +106,15 @@ const ITP_MSG_LOCALE = (function() {
106 106
 			"numbering": "NO",
107 107
 			"inputSelf": "직접입력",
108 108
 			"active": "활성",
109
-			"afflShop": "가맹점",
110
-			"brandNm": "브랜드",
109
+			"afflShopNm": "가맹점",
110
+			"brandId": "브랜드ID",
111
+			"brandNm": "브랜드명",
111 112
 			"notiNo": "공지번호",
112 113
 			"titlet": "제목",
113 114
 			"targetNm": "대상구분",
114 115
 			"viewDt": "노출일",
115 116
 			"regDt": "등록일",
117
+			"srhResult": "검색결과",
116 118
 		},
117 119
 		"table": {
118 120
 			"brandId": "브랜드ID",
@@ -239,7 +241,7 @@ const ITP_MSG_LOCALE = (function() {
239 241
 			},
240 242
 			"page": {
241 243
 				"noMoreTab": "더는 탭을 열 수 없습니다.",
242
-				"noChoiceBrand": "브랜드 선택 후 이용 바랍니다.",
244
+				"noChoiceBrand": "브랜드 선택 후 이용 바랍니다.",
243 245
 				"noBack": "뒤로 가기 버튼을 이용할 수 없습니다.",
244 246
 				"allowPop": "이 웹 사이트에 대한 팝업을<br>허용하십시오."
245 247
 			},

+ 138 - 0
bin/src/main/webapp/js/app/main.js

@@ -0,0 +1,138 @@
1
+
2
+const MAIN_NOTICE_GRID_ID = '#ITP_MAIN_NOTICE_jqGrid';
3
+const MAIN_NOTICE_GRID_LIST = '#ITP_MAIN_NOTICE_jqGrid_list';
4
+const MAIN_NOTICE_GRID_PAGER = '#ITP_MAIN_NOTICE_jqGridPager';
5
+const MAIN_NOTICE_GRID_EMPTY = '#ITP_MAIN_NOTICE_jqGridEmpty';
6
+
7
+let NTICE_DETAIL_GRID_LIST = '/api/ntice/detail-grid-list';
8
+
9
+require(['config'], function() {
10
+	require([
11
+		'jquery', 
12
+		'jquery.bootstrap.fileUpload' //파일 업로드가 있는 페이지에서 로딩
13
+	], function($) {
14
+		
15
+		setTimeout(function() {
16
+			// 시간지정
17
+			$('#ITP_FORM_MAIN_NOTICE_SEARCH_SCH_DT').val(itp_fn_date_format(new Date(), 2));
18
+			$('#ITP_FORM_MAIN_NOTICE_SEARCH_USER_ID').val(USER_ID);
19
+			
20
+			// 그리드
21
+			itp_fn_jqgrid_resize(MAIN_NOTICE_GRID_ID, MAIN_NOTICE_GRID_LIST, 'lg');
22
+			itp_fn_MAIN_NOTICE_grid.init();
23
+	    	itp_fn_fire_window_resize();
24
+	
25
+			// 조회
26
+	    	itp_fn_MAIN_NOTICE_search();
27
+		}, 100);
28
+				
29
+	});
30
+});
31
+
32
+var itp_fn_MAIN_NOTICE_grid = {
33
+	init: function() {
34
+		// 데이터 없을때
35
+		itp_fn_MAIN_NOTICE_empty.push();
36
+		$(MAIN_NOTICE_GRID_EMPTY).on('click', function() {
37
+			itp_fn_MAIN_NOTICE_empty.back();
38
+			itp_MAIN_NOTICE_param.gridSize = $.jgrid.defaults.rowNum;
39
+			$(MAIN_NOTICE_GRID_ID).setGridParam({'postData': JSON.stringify(itp_MAIN_NOTICE_param)}).trigger('reloadGrid');
40
+		});
41
+	},
42
+	callBack: function() {
43
+		let param = $('#ITP_FORM_MAIN_NOTICE_SEARCH').serializeObject();
44
+		param.gridSize = $.jgrid.defaults.rowNum;
45
+		$(MAIN_NOTICE_GRID_ID).jqGrid({
46
+			colModel: [
47
+				{
48
+					index: 'NTICE_NO', name: 'nticeNo',
49
+					label: ITP_MSG_LOCALE.label.notiNo, //공지번호
50
+					width: '10', fixed: false, align: 'center',
51
+					sortable: false, hidden: false
52
+				},
53
+				{
54
+					index: 'NTICE_TITL', name: 'nticeTitl',
55
+					label: '공지사항', //공지제목
56
+					width: '15', fixed: false, align: 'center',
57
+					sortable: false, hidden: false
58
+				},
59
+				{
60
+					index: 'ADD_DT', name: 'addDt',
61
+					label: ITP_MSG_LOCALE.label.regDt, //등록일
62
+					width: '10', fixed: false, align: 'center',
63
+					sortable: false, hidden: false
64
+				}
65
+			],
66
+			loadBeforeSend: function(jqXHR) {
67
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
68
+			},
69
+			postData: JSON.stringify(param),
70
+			url: DOMAIN + NTICE_DETAIL_GRID_LIST,
71
+			pager: MAIN_NOTICE_GRID_PAGER,
72
+			multiselect: false,
73
+			rownumbers: true,
74
+			onCellSelect: function(rowId, cellIdx, cellValue) {
75
+				var cm = $(this).jqGrid('getGridParam', 'colModel');
76
+				var colNm = cm[cellIdx].name;
77
+				if (colNm == 'nticeTitl') {
78
+					const nticeNoVal = $(this).jqGrid('getCell', rowId, 'nticeNo');
79
+					const key = {nticeNo: nticeNoVal, viewCd: 'R'};
80
+					var param = $.param(key);
81
+					// itp_fn_MAIN_NOTICE_view(param);
82
+					
83
+					fn_call_popup('comm', 'NOTICE_INFO_POPUP', '#ITP_ASIDE', function() {
84
+												
85
+					}, param, 'S');
86
+					$('#ITP_NOTICE_INFO_POPUP > div.modal-dialog').width('500px');
87
+				}
88
+		   	},
89
+			loadComplete: function(data) {
90
+				//console.log(JSON.stringify(data));
91
+				itp_fn_grid_load_complete(data, MAIN_NOTICE_GRID_ID, true, 'number', 'MAIN_NOTICE', itp_MAIN_NOTICE_search, itp_fn_MAIN_NOTICE_empty, false, data.gridRecords, false);
92
+				var ids = $(MAIN_NOTICE_GRID_ID).getDataIDs();
93
+				$.each(ids, function(idx, rowId) {
94
+					$(MAIN_NOTICE_GRID_ID).jqGrid('setCell', rowId, 'nticeTitl', '', ITP_GRID_COL_STYLE.link);
95
+				});
96
+
97
+				if ($('#ITP_CONTAINER').data('openYn') == 'Y') {
98
+					$('#ITP_CONTAINER').data('openYn', 'N');
99
+					const keyNew = {nticeNo: $('#ITP_CONTAINER').data('nticeNo'), viewCd: 'R'};
100
+					var paramNew = $.param(keyNew);
101
+					itp_fn_MAIN_NOTICE_view(paramNew);
102
+				}
103
+		    },
104
+		    loadError: function(jqXHR, textStatus, errorThrown) {
105
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
106
+		    },
107
+		    onPaging: function(action) {
108
+		    	itp_fn_grid_paging(MAIN_NOTICE_GRID_ID, action, param);
109
+		    }
110
+		}).navGrid(MAIN_NOTICE_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
111
+	},
112
+	clearData : function() {
113
+		$(MAIN_NOTICE_GRID_ID).jqGrid('clearGridData', true);
114
+		$(MAIN_NOTICE_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
115
+		$(MAIN_NOTICE_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
116
+		$(MAIN_NOTICE_GRID_EMPTY).show();
117
+	},
118
+	unload : function() {
119
+		$.jgrid.gridUnload(MAIN_NOTICE_GRID_ID);
120
+	}
121
+};
122
+
123
+var itp_fn_MAIN_NOTICE_search = function() {
124
+	itp_fn_MAIN_NOTICE_grid.unload();
125
+	itp_fn_MAIN_NOTICE_grid.callBack();
126
+};
127
+
128
+let itp_MAIN_NOTICE_param = {};
129
+let itp_MAIN_NOTICE_search = false;
130
+var itp_fn_MAIN_NOTICE_empty = {
131
+	push: function() {		
132
+		let param = $('#ITP_FORM_MAIN_NOTICE_SEARCH').serializeObject();
133
+		itp_MAIN_NOTICE_param = param;
134
+	},
135
+	back: function() {
136
+		
137
+	}
138
+};

+ 725 - 0
bin/src/main/webapp/js/app/oper/ITP_OPER01010.js

@@ -0,0 +1,725 @@
1
+
2
+const OPER01010_GRID_ID = '#ITP_OPER01010_jqGrid';
3
+const OPER01010_GRID_LIST = '#ITP_OPER01010_jqGrid_list';
4
+const OPER01010_GRID_PAGER = '#ITP_OPER01010_jqGridPager';
5
+const OPER01010_GRID_EMPTY = '#ITP_OPER01010_jqGridEmpty';
6
+
7
+const OPER01010_VIEW_GRID_ID = '#ITP_OPER01010_VIEW_jqGrid';
8
+const OPER01010_VIEW_GRID_LIST = '#ITP_OPER01010_VIEW_jqGrid_list';
9
+const OPER01010_VIEW_GRID_PAGER = '#ITP_OPER01010_VIEW_jqGridPager';
10
+const OPER01010_VIEW_GRID_EMPTY = '#ITP_OPER01010_VIEW_jqGridEmpty';
11
+
12
+const OPER01010_DETAIL_GRID_ID = '#ITP_OPER01010_DETAIL_jqGrid';
13
+const OPER01010_DETAIL_GRID_LIST = '#ITP_OPER01010_DETAIL_jqGrid_list';
14
+const OPER01010_DETAIL_GRID_PAGER = '#ITP_OPER01010_DETAIL_jqGridPager';
15
+const OPER01010_DETAIL_GRID_EMPTY = '#ITP_OPER01010_DETAIL_jqGridEmpty';
16
+
17
+let ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = false;
18
+let ITP_FORM_OPER01010_DETAIL_IS_WRITING = false;
19
+
20
+let USER_DETAIL_GRID_LIST = '/api/user/detail-grid-list';
21
+let USER_USERAUTH_GRID_LIST = '/api/user/userauth-grid-list';
22
+let USER_INFO_USER = '/api/user/info-user';
23
+let USER_SAVE_USER = '/api/user/save-user';
24
+let USER_CHECK_DUPLICATE = '/api/user/check-duplicate';
25
+let USER_INTI_USERPW = '/api/user/inti-userpw';
26
+
27
+require(['config'], function() {
28
+	require([
29
+		'jquery'
30
+	], function($) {
31
+		// 버튼 권한설정
32
+		fn_proc_btn_auth('OPER01010');
33
+		// 공통코드 표시
34
+		fn_make_select(CODE_LIST, 'USER_STAT_CD', 'ITP_FORM_OPER01010_SEARCH_USER_STAT_CD');
35
+		fn_make_select(CODE_LIST, 'USER_STAT_CD', 'ITP_FORM_OPER01010_DETAIL_USER_STAT_CD', true, '선택');
36
+		
37
+		// 조회일자 지정
38
+		var now = new Date();
39
+		$('#ITP_TAB_OPER01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
40
+		// $('#ITP_FORM_OPER01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
41
+		// $('#ITP_FORM_OPER01010_SEARCH_TO_DT').datepicker('setDate', new Date());
42
+
43
+		// 가맹점 조회
44
+		itp_fn_OPER01010_brand_search.init();
45
+				
46
+		// 그리드				
47
+		itp_fn_jqgrid_resize(OPER01010_GRID_ID, OPER01010_GRID_LIST, 'lg');
48
+		itp_fn_OPER01010_grid.init();
49
+    	itp_fn_fire_window_resize();
50
+
51
+		// 조회    	
52
+    	itp_fn_OPER01010_search();
53
+    	
54
+		// 조회 버튼 클릭
55
+		$('#ITP_BTN_OPER01010_SRH').on('click', function() {
56
+			itp_OPER01010_search = true;
57
+			let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
58
+			param.gridSize = $.jgrid.defaults.rowNum;
59
+			param.gridPage = $.jgrid.defaults.page;
60
+			$(OPER01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
61
+		});
62
+		
63
+		// 수정 버튼
64
+		$('#ITP_BTN_OPER01010_MODIFY').on('click', function() {
65
+			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER01010_DETAIL');			
66
+			const userIdVal = $('#ITP_FORM_OPER01010_VIEW_USER_ID').val();
67
+			const key = {userId: userIdVal, viewCd: 'R'};
68
+			var param = $.param(key);
69
+			itp_fn_OPER01010_detail(param);	
70
+		});
71
+		
72
+		// 신규등록 버튼
73
+		$('#ITP_BTN_OPER01010_NEWREG').on('click', function() {
74
+			itp_fn_OPER01010_switch_screen('ADD');			
75
+			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER01010_DETAIL');				
76
+			// 권한정보 리스트 조회
77
+			itp_fn_OPER01010_detail_grid.unload();
78
+			itp_fn_OPER01010_detail_grid.callBack();
79
+		});
80
+		
81
+		// 취소/목록 버튼
82
+		$('#ITP_BTN_OPER01010_CANCELLIST').on('click', function() {
83
+			itp_fn_OPER01010_search();
84
+    	});
85
+		
86
+		// 삭제 버튼
87
+		$('#ITP_BTN_OPER01010_DELETE').on('click', function() {
88
+			
89
+		});
90
+		
91
+		// 저장 버튼
92
+		$('#ITP_BTN_OPER01010_SAVE').on('click', function() {			
93
+			const formId = '#ITP_FORM_OPER01010_DETAIL';
94
+			itp_fn_form_clear_validate(null, formId);			
95
+			var vali_userId = itp_fn_form_validate(formId, formId + '_USER_ID', ['empty'], undefined);
96
+			var vali_userStatCd = itp_fn_form_validate(formId, formId + '_USER_STAT_CD', ['empty'], undefined);
97
+			var vali_userNm = itp_fn_form_validate(formId, formId + '_USER_NM', ['empty'], undefined);
98
+			var vali_telNo = itp_fn_form_validate(formId, formId + '_TEL_NO', ['empty'], undefined);
99
+			var vali_email = itp_fn_form_validate(formId, formId + '_EMAIL', ['empty'], undefined);
100
+			var vali_userPw = true;
101
+			var vali_userPwConfirm = true;
102
+			if($('#ITP_FORM_OPER01010_DETAIL_VIEW_CD').val() == 'C') { // 신규
103
+				vali_userPw = itp_fn_form_validate(formId, formId + '_USER_PW', ['empty'], undefined);
104
+				vali_userPwConfirm = itp_fn_form_validate(formId, formId + '_USER_PW_CONFIRM', ['empty'], undefined);	
105
+			}
106
+			if (vali_userId && vali_userStatCd && vali_userNm && vali_userPw && vali_userPwConfirm && vali_telNo && vali_email) {
107
+				if (ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE) {
108
+					itp_fn_modal_duplicate(ITP_MSG_LOCALE.label.userId, formId + '_USER_ID');
109
+				} else {
110
+					let gridInsertData = [];
111
+					let gridUpdateData = [];
112
+					let gridDeleteData = [];
113
+					const rowData = $(OPER01010_DETAIL_GRID_ID).getRowData();
114
+					const keyValue = $(formId + '_USER_ID').val();
115
+					$.each(rowData, function(key, value) {
116
+						if (value.viewCd != 'R') {
117
+							value.userId = keyValue;
118
+							if (value.viewCd == 'C') {
119
+								gridInsertData.push(value);
120
+							} else if (value.viewCd == 'U') {
121
+								gridUpdateData.push(value);
122
+							} else if (value.viewCd == 'D') {
123
+								gridDeleteData.push(value);
124
+							}
125
+						}
126
+					});
127
+					let param = $(formId).serializeObject();
128
+					param.gridInsertData = gridInsertData;
129
+					param.gridUpdateData = gridUpdateData;
130
+					param.gridDeleteData = gridDeleteData;
131
+					//console.log(JSON.stringify(param)); 						
132
+					var searhFn = function() {
133
+						ITP_FORM_OPER01010_DETAIL_IS_WRITING = false;
134
+						itp_fn_OPER01010_search();
135
+					};
136
+					fn_ajax_call(USER_SAVE_USER, JSON.stringify(param), searhFn, 'POST');	
137
+				}
138
+			}
139
+		});		
140
+		
141
+		// 중복체크
142
+		$('#ITP_FORM_OPER01010_DETAIL_DUP').on('click', function() {
143
+			const formId = '#ITP_FORM_OPER01010_DETAIL';
144
+			itp_fn_form_clear_validate(null, formId + '_DETAIL');
145
+			var vali_userId = itp_fn_form_validate(formId + '_DETAIL', formId + '_USER_ID', ['empty'], undefined);
146
+			if (vali_userId) {
147
+				var dupFn = function(result) {
148
+					if (result.code == 'N') {
149
+						ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = false;
150
+					} else {
151
+						ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = true;
152
+					}
153
+				};
154
+				const key = {'userId':  $(formId + '_USER_ID').val()};
155
+				const param = $.param(key);
156
+				fn_ajax_call(USER_CHECK_DUPLICATE, param, dupFn, 'GET');
157
+			}
158
+		});
159
+		
160
+		// 상세:비밀번호 초기화
161
+		$('#ITP_BTN_OPER01010_RESET_PW').on('click', function() {
162
+			var resetPwFn = {
163
+				callBack: function(args) {
164
+					const key = {'userId':  $('#ITP_FORM_OPER01010_DETAIL_USER_ID').val()};
165
+					const param = $.param(key);
166
+					fn_ajax_call(USER_INTI_USERPW, param, undefined, 'GET');					
167
+				}
168
+			};
169
+			itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.askResetUserPw, resetPwFn, null);		
170
+		});
171
+		// 상세:추가버튼
172
+		$('#ITP_BTN_OPER01010_DETAIL_ADDROW').on('click', function() {
173
+			// 팝업
174
+			var popFn = function(rowDataPop) {
175
+				// 기존등록 데이터 
176
+				var exists = '';				
177
+				const rowData = $(OPER01010_DETAIL_GRID_ID).getRowData();
178
+				$.each(rowData, function(key, value) {
179
+					exists = exists + value.authNo + ';';
180
+				});
181
+				
182
+				$.each(rowDataPop, function(key, value) {
183
+					if(exists.indexOf(value.authNo) < 0) {
184
+						// 행추가
185
+						$(OPER01010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
186
+						var rids = $(OPER01010_DETAIL_GRID_ID).jqGrid('getDataIDs');
187
+						var last_row_id = rids[rids.length - 1];
188
+						$(OPER01010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
189
+						$(OPER01010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'authNo', value.authNo);
190
+						$(OPER01010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'authNm', value.authNm);	
191
+					}
192
+				});
193
+				$(OPER01010_DETAIL_GRID_EMPTY).hide();
194
+			};
195
+			fn_call_popup('comm', 'AUTH_SCH_POPUP', '#ITP_ASIDE', popFn, null, 'S');
196
+		});
197
+		// 상세:삭제버튼
198
+		$('#ITP_BTN_OPER01010_DETAIL_DELROW').on('click', function() {
199
+			itp_fn_grid_del_row(OPER01010_DETAIL_GRID_ID);
200
+		});
201
+		
202
+		$('body').on('click', function(e) {
203
+			var gridId = OPER01010_DETAIL_GRID_ID.replace('#', '');
204
+			var rids = $(OPER01010_DETAIL_GRID_ID).jqGrid('getDataIDs');
205
+			var last_row_id = rids[rids.length - 1];			
206
+			itp_fn_grid_reset_selection(e, last_row_id, gridId, 'OPER01010_DETAIL');
207
+		});
208
+	});
209
+});
210
+
211
+var itp_fn_OPER01010_switch_screen = function(mode) {
212
+	if(mode == 'LIST') { // 목록
213
+		$('#ITP_BTN_OPER01010_MODIFY').hide();
214
+		$('#ITP_BTN_OPER01010_CANCELLIST').hide();
215
+		$('#ITP_BTN_OPER01010_DELETE').hide();
216
+		$('#ITP_BTN_OPER01010_SAVE').hide();
217
+		fn_show_btn_auth('#ITP_BTN_OPER01010_SRH');
218
+		fn_show_btn_auth('#ITP_BTN_OPER01010_NEWREG');
219
+		
220
+		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').show();
221
+		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').hide();		
222
+		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').hide();
223
+	} else if(mode == 'ADD') { // 등록
224
+		ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = true;
225
+	
226
+		$('#ITP_BTN_OPER01010_SRH').hide();
227
+		$('#ITP_BTN_OPER01010_MODIFY').hide();
228
+		$('#ITP_BTN_OPER01010_NEWREG').hide();
229
+		$('#ITP_BTN_OPER01010_DELETE').hide();
230
+		$('#ITP_BTN_OPER01010_RESET_PW').hide();
231
+		fn_show_btn_auth('#ITP_BTN_OPER01010_CANCELLIST');
232
+		fn_show_btn_auth('#ITP_BTN_OPER01010_SAVE');
233
+		
234
+		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').hide();
235
+		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').show();
236
+		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').hide();		
237
+		$('#ITP_FORM_OPER01010_DETAIL_USER_ID').removeAttr('readonly');
238
+		$('#ITP_FORM_OPER01010_DETAIL_DUP').removeAttr('disabled');
239
+		
240
+		$('#ITP_FORM_OPER01010_DETAIL_VIEW_CD').val('C');
241
+		$('#ITP_FORM_OPER01010_DETAIL_USER_NM').val('');
242
+		$('#ITP_FORM_OPER01010_DETAIL_USER_STAT_CD').val('');
243
+		$('#ITP_FORM_OPER01010_DETAIL_USER_ID').val('');
244
+		$('#ITP_FORM_OPER01010_DETAIL_USER_PW').val('');
245
+		$('#ITP_FORM_OPER01010_DETAIL_TEL_NO').val('');
246
+		$('#ITP_FORM_OPER01010_DETAIL_USER_PW_CONFIRM').val('');
247
+		$('#ITP_FORM_OPER01010_DETAIL_EMAIL').val('');
248
+	} else if(mode == 'MODIFY') { // 수정
249
+		$('#ITP_BTN_OPER01010_SRH').hide();
250
+		$('#ITP_BTN_OPER01010_MODIFY').hide();
251
+		$('#ITP_BTN_OPER01010_NEWREG').hide();		
252
+		$('#ITP_BTN_OPER01010_DELETE').hide();
253
+		fn_show_btn_auth('#ITP_BTN_OPER01010_CANCELLIST');
254
+		fn_show_btn_auth('#ITP_BTN_OPER01010_SAVE');
255
+		fn_show_btn_auth('#ITP_BTN_OPER01010_RESET_PW');	
256
+		
257
+		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').hide();
258
+		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').show();
259
+		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').hide();
260
+		$('#ITP_FORM_OPER01010_DETAIL_USER_ID').attr('readonly', true);
261
+		$('#ITP_FORM_OPER01010_DETAIL_DUP').attr('disabled', true);
262
+	} else if(mode == 'VIEW') { // 보기
263
+		$('#ITP_BTN_OPER01010_SRH').hide();
264
+		$('#ITP_BTN_OPER01010_NEWREG').hide();		
265
+		$('#ITP_BTN_OPER01010_DELETE').hide();
266
+		$('#ITP_BTN_OPER01010_SAVE').hide();
267
+		fn_show_btn_auth('#ITP_BTN_OPER01010_MODIFY');
268
+		fn_show_btn_auth('#ITP_BTN_OPER01010_CANCELLIST');
269
+		
270
+		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').hide();
271
+		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').hide();
272
+		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').show();
273
+	}	
274
+};
275
+
276
+var itp_fn_OPER01010_grid = {
277
+	init: function() {
278
+		// 데이터 없을때
279
+		itp_fn_OPER01010_empty.push();
280
+		$(OPER01010_GRID_EMPTY).on('click', function() {
281
+			itp_fn_OPER01010_empty.back();
282
+			itp_OPER01010_param.gridSize = $.jgrid.defaults.rowNum;
283
+			$(OPER01010_GRID_ID).setGridParam({'postData': JSON.stringify(itp_OPER01010_param)}).trigger('reloadGrid');
284
+		});	
285
+	},
286
+	colModel: [
287
+		{
288
+			index: 'AFFL_SHOP_NM', name: 'afflShopNm',
289
+			label: ITP_MSG_LOCALE.label.afflShopNm, //가맹점
290
+			width: '10', fixed: false, align: 'center',
291
+			sortable: false, hidden: false
292
+		},
293
+		{
294
+			index: 'BRAND_NM', name: 'brandNm',
295
+			label: ITP_MSG_LOCALE.label.brandNm, //브랜드
296
+			width: '13', fixed: false, align: 'center',
297
+			sortable: false, hidden: false
298
+		},
299
+		{
300
+			index: 'USER_ID', name: 'userId',
301
+			label: ITP_MSG_LOCALE.label.userId, //사용자ID
302
+			width: '10', fixed: false, align: 'center',
303
+			sortable: false, hidden: false
304
+		},
305
+		{
306
+			index: 'USER_NM', name: 'userNm',
307
+			label: ITP_MSG_LOCALE.label.userName, //닉네임
308
+			width: '13', fixed: false, align: 'center',
309
+			sortable: false, hidden: false
310
+		},
311
+		{
312
+			index: 'EMAIL', name: 'email',
313
+			label: ITP_MSG_LOCALE.label.idEmail, //아이디(이메일)
314
+			width: '15', fixed: false, align: 'center',
315
+			sortable: false, hidden: false
316
+		},
317
+		{
318
+			index: 'TEL_NO', name: 'telNo',
319
+			label: ITP_MSG_LOCALE.label.telNo, //휴대폰 번호
320
+			width: '10', fixed: false, align: 'center',
321
+			sortable: false, hidden: false
322
+		},
323
+		{
324
+			index: 'USER_STAT_NM', name: 'userStatNm',
325
+			label: ITP_MSG_LOCALE.label.status, //상태
326
+			width: '6', fixed: false, align: 'center',
327
+			sortable: false, hidden: false
328
+		},
329
+		{
330
+			index: 'USER_STAT_DT', name: 'userStatDt',
331
+			label: ITP_MSG_LOCALE.label.statusDt, //상태일시
332
+			width: '10', fixed: false, align: 'center',
333
+			sortable: false, hidden: false
334
+		},
335
+		{
336
+			index: 'ADD_DT', name: 'addDt',
337
+			label: ITP_MSG_LOCALE.label.regDt, //등록일
338
+			width: '10', fixed: false, align: 'center',
339
+			sortable: false, hidden: false
340
+		},
341
+		{
342
+			index: 'LAST_LOGIN_DT', name: 'lastLoginDt',
343
+			label: ITP_MSG_LOCALE.label.lastLogin, //마지막 로그인
344
+			width: '10', fixed: false, align: 'center',
345
+			sortable: false, hidden: false
346
+		}
347
+	],
348
+	callBack: function() {
349
+		let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
350
+		param.gridSize = $.jgrid.defaults.rowNum;	
351
+		$(OPER01010_GRID_ID).jqGrid({
352
+			colModel: this.colModel,
353
+			loadBeforeSend: function(jqXHR) {
354
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
355
+			},
356
+			postData: JSON.stringify(param),
357
+			url: DOMAIN + USER_DETAIL_GRID_LIST,
358
+			pager: OPER01010_GRID_PAGER,
359
+			multiselect: false,
360
+			rownumbers: true, 
361
+			onCellSelect: function(rowId, cellIdx, cellValue) {
362
+				var cm = $(this).jqGrid('getGridParam', 'colModel');
363
+				var colNm = cm[cellIdx].name;
364
+				if (colNm == 'userNm') {
365
+					const userIdVal = $(this).jqGrid('getCell', rowId, 'userId');
366
+					const key = {userId: userIdVal, viewCd: 'R'};
367
+					var param = $.param(key);
368
+					itp_fn_OPER01010_view(param);
369
+				}
370
+		   	},
371
+			loadComplete: function(data) {
372
+				//console.log(JSON.stringify(data));
373
+				itp_fn_grid_load_complete(data, OPER01010_GRID_ID, true, 'number', 'OPER01010', itp_OPER01010_search, itp_fn_OPER01010_empty, true, data.gridRecords, true);
374
+				var ids = $(OPER01010_GRID_ID).getDataIDs();
375
+				$.each(ids, function(idx, rowId) {
376
+					$(OPER01010_GRID_ID).jqGrid('setCell', rowId, 'userNm', '', ITP_GRID_COL_STYLE.link);
377
+				});	
378
+		    },
379
+		    loadError: function(jqXHR, textStatus, errorThrown) {
380
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
381
+		    },
382
+		    onPaging: function(action) {
383
+		    	itp_fn_grid_paging(OPER01010_GRID_ID, action, param);
384
+		    }
385
+		}).navGrid(OPER01010_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
386
+	},
387
+	clearData : function() {
388
+		$(OPER01010_GRID_ID).jqGrid('clearGridData', true);
389
+		$(OPER01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
390
+		$(OPER01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
391
+		$(OPER01010_GRID_EMPTY).show();
392
+	}, 
393
+	unload : function() {
394
+		$.jgrid.gridUnload(OPER01010_GRID_ID); 
395
+	}
396
+};
397
+
398
+var itp_fn_OPER01010_search = function() {
399
+	itp_fn_OPER01010_switch_screen('LIST');	
400
+	itp_fn_OPER01010_grid.unload();
401
+	itp_fn_OPER01010_grid.callBack();
402
+};
403
+
404
+let itp_OPER01010_param = {};
405
+let itp_OPER01010_search = false;
406
+var itp_fn_OPER01010_empty = {
407
+	push: function() {
408
+		let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
409
+		itp_OPER01010_param = param;
410
+	},
411
+	back: function() {
412
+		$('#ITP_FORM_OPER01010_DEVI_TP_CD').val(itp_OPER01010_param.deviTpCd);
413
+		$('#ITP_FORM_OPER01010_ORDER_YN').val(itp_OPER01010_param.orderYn);
414
+		$('#ITP_FORM_OPER01010_ADT_AUTH_CD').val(itp_OPER01010_param.adtAuthCd);
415
+		$('#ITP_FORM_OPER01010_EMAIL_RCV_YN').val(itp_OPER01010_param.emailRcvYn);
416
+		$('#ITP_FORM_OPER01010_MEMB_EXIT_DT').val(itp_OPER01010_param.membExitDt);
417
+		$('#ITP_FORM_OPER01010_FROM_DT').val(itp_OPER01010_param.fromDt);
418
+		$('#ITP_FORM_OPER01010_TO_DT').val(itp_OPER01010_param.toDt);
419
+		$('#ITP_FORM_OPER01010_KEYWORD').val(itp_OPER01010_param.keyword);
420
+	}
421
+};
422
+
423
+var itp_fn_OPER01010_view = function(param) {
424
+	fn_ajax_call(USER_INFO_USER, param, itp_fn_OPER01010_view_callback, 'GET');
425
+};
426
+
427
+var itp_fn_OPER01010_view_callback = function(result) {
428
+	// console.log(result);
429
+	itp_fn_OPER01010_switch_screen('VIEW');
430
+	$('#ITP_FORM_OPER01010_VIEW #ITP_FORM_OPER01010_VIEW_USER_ID').val(result.userId);
431
+	$('#ITP_FORM_OPER01010_VIEW .fnUserNm').text(result.userNm);
432
+	$('#ITP_FORM_OPER01010_VIEW .fnUserStatDt').text(result.userStatDt);
433
+	$('#ITP_FORM_OPER01010_VIEW .fnUserStatNm').text(result.userStatNm);
434
+	$('#ITP_FORM_OPER01010_VIEW .fnUserId').text(result.userId);
435
+	$('#ITP_FORM_OPER01010_VIEW .fnEmail').text(result.email);
436
+	$('#ITP_FORM_OPER01010_VIEW .fnTelNo').text(result.telNo);
437
+	$('#ITP_FORM_OPER01010_VIEW .fnAddDt').text(result.addDt);
438
+	$('#ITP_FORM_OPER01010_VIEW .fnLastLoginDt').text(result.lastLoginDt);
439
+	
440
+	// 권한정보 리스트 조회
441
+	itp_fn_OPER01010_view_grid.unload();
442
+	itp_fn_OPER01010_view_grid.callBack();
443
+};
444
+
445
+var itp_fn_OPER01010_view_grid = {
446
+	init: function() {
447
+	},
448
+	callBack: function() {
449
+		let param = $('#ITP_FORM_OPER01010_VIEW').serializeObject();
450
+		param.gridSize = $.jgrid.defaults.rowNum; 
451
+		param.pagingYn = false; // 페이징안함
452
+		
453
+		$(OPER01010_VIEW_GRID_ID).jqGrid({
454
+			colModel: [
455
+				{
456
+					index: 'VIEW_CD', name: 'viewCd',
457
+					label: ITP_MSG_LOCALE.label.viewCd,
458
+					width: '10', fixed: false, align: 'center',
459
+					sortable: false, hidden: true
460
+				},
461
+				{
462
+					index: 'AUTH_NO', name: 'authNo',
463
+					label: ITP_MSG_LOCALE.label.permitCd,
464
+					width: '20', fixed: false, align: 'center',
465
+					sortable: false, editable: false, edittype: 'text',
466
+					editrules: {required: true}
467
+				},
468
+				{
469
+					index: 'AUTH_NM', name: 'authNm',
470
+					label: ITP_MSG_LOCALE.label.permitName,
471
+					width: '30', fixed: false, align: 'center',
472
+					sortable: true, editable: false, edittype: 'text',
473
+					editrules: {required: true}
474
+				},
475
+				{
476
+					index: 'USE_YN_NM', name: 'useYnNm',
477
+					label: ITP_MSG_LOCALE.label.status,
478
+					width: '10', fixed: false, align: 'center',
479
+					sortable: false, editable: false, edittype: 'text'
480
+				},
481
+				{
482
+					index: 'ADD_DT', name: 'addDt',
483
+					label: ITP_MSG_LOCALE.label.regDt,
484
+					width: '10', fixed: false, align: 'center',
485
+					sortable: false, editable: false, edittype: 'text'
486
+				}
487
+			],
488
+			loadBeforeSend: function(jqXHR) {
489
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
490
+			},
491
+			postData: JSON.stringify(param),
492
+			url: DOMAIN + USER_USERAUTH_GRID_LIST,
493
+			pager: OPER01010_VIEW_GRID_PAGER,
494
+			multiselect: false,
495
+			loadComplete: function(data) {				
496
+				itp_fn_grid_load_complete(data, OPER01010_VIEW_GRID_ID, true, undefined, 'OPER01010_VIEW');
497
+		    },
498
+		    loadError: function(jqXHR, textStatus, errorThrown) {
499
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
500
+		    },
501
+		    onPaging: function(action) {
502
+		    	var pagingFn = {
503
+	    			callBack: function(args) {
504
+	    				$(args).trigger('reloadGrid');
505
+	    			}
506
+	    		};
507
+		    	if (itp_fn_check_grid_is_writing(OPER01010_VIEW_GRID_ID)) {
508
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER01010_VIEW_GRID_ID);
509
+		    		return 'stop';
510
+		    	} else {
511
+		    		itp_fn_grid_paging(OPER01010_VIEW_GRID_ID, action, param);
512
+		    	}
513
+		    },
514
+		    onSortCol: function(index, columnIndex, sortOrder) {
515
+		    	var sortingFn = {
516
+	    			callBack: function(args) {
517
+	    				$(args).trigger('reloadGrid');
518
+	    			}
519
+	    		};
520
+		    	if (itp_fn_check_grid_is_writing(OPER01010_VIEW_GRID_ID)) {
521
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER01010_VIEW_GRID_ID);
522
+		    		return 'stop';
523
+		    	} else {
524
+		    		itp_fn_grid_sorting(OPER01010_VIEW_GRID_ID, index, sortOrder);
525
+		    	}
526
+		    }
527
+		}).navGrid(OPER01010_VIEW_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
528
+	},
529
+	clearData : function() {
530
+		$(OPER01010_VIEW_GRID_ID).jqGrid('clearGridData', true);
531
+		$(OPER01010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
532
+		$(OPER01010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
533
+		$(OPER01010_VIEW_GRID_EMPTY).show();
534
+	}, 
535
+	unload : function() {
536
+		$.jgrid.gridUnload(OPER01010_VIEW_GRID_ID); 
537
+	}
538
+};
539
+
540
+var itp_fn_OPER01010_detail = function(param) {
541
+	fn_ajax_call(USER_INFO_USER, param, itp_fn_OPER01010_detail_callback, 'GET');
542
+};
543
+
544
+var itp_fn_OPER01010_detail_callback = function(result) {
545
+	// console.log(result);
546
+	itp_fn_OPER01010_switch_screen('MODIFY');
547
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_VIEW_CD').val('U');
548
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_NM').val(result.userNm);
549
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_STAT_CD').val(result.userStatCd);
550
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_ID').val(result.userId);
551
+	$('#ITP_FORM_OPER01010_DETAIL .fnUserStatDt').text(result.userStatDt);
552
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_PW').val(result.userPw);
553
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_PW_CONFIRM').val(result.userPw);
554
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_TEL_NO').val(result.telNo);
555
+	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_EMAIL').val(result.email);
556
+	$('#ITP_FORM_OPER01010_DETAIL .fnAddDt').text(result.addDt);
557
+	$('#ITP_FORM_OPER01010_DETAIL .fnLastLoginDt').text(result.lastLoginDt);
558
+	
559
+	// 권한정보 리스트 조회
560
+	itp_fn_OPER01010_detail_grid.unload();
561
+	itp_fn_OPER01010_detail_grid.callBack();
562
+};
563
+
564
+var itp_fn_OPER01010_detail_grid = {
565
+	init: function() {
566
+	},
567
+	callBack: function() {
568
+		let param = $('#ITP_FORM_OPER01010_DETAIL').serializeObject();
569
+		param.gridSize = $.jgrid.defaults.rowNum; 
570
+		param.pagingYn = false; // 페이지안함 
571
+		
572
+		$(OPER01010_DETAIL_GRID_ID).jqGrid({
573
+			colModel: [
574
+				{
575
+					index: 'VIEW_CD', name: 'viewCd',
576
+					label: ITP_MSG_LOCALE.label.viewCd,
577
+					width: '10', fixed: false, align: 'center',
578
+					sortable: false, hidden: true
579
+				},
580
+				{
581
+					index: 'AUTH_NO', name: 'authNo',
582
+					label: ITP_MSG_LOCALE.label.permitCd,
583
+					width: '20', fixed: false, align: 'center',
584
+					sortable: false, editable: false, edittype: 'text',
585
+					editrules: {required: true}
586
+				},
587
+				{
588
+					index: 'AUTH_NM', name: 'authNm',
589
+					label: ITP_MSG_LOCALE.label.permitName,
590
+					width: '30', fixed: false, align: 'center',
591
+					sortable: true, editable: false, edittype: 'text',
592
+					editrules: {required: true}
593
+				},
594
+				{
595
+					index: 'USE_YN_NM', name: 'useYnNm',
596
+					label: ITP_MSG_LOCALE.label.status,
597
+					width: '10', fixed: false, align: 'center',
598
+					sortable: false, editable: false, edittype: 'text'
599
+				},
600
+				{
601
+					index: 'ADD_DT', name: 'addDt',
602
+					label: ITP_MSG_LOCALE.label.regDt,
603
+					width: '10', fixed: false, align: 'center',
604
+					sortable: false, editable: false, edittype: 'text'
605
+				}
606
+			],
607
+			loadBeforeSend: function(jqXHR) {
608
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
609
+			},
610
+			postData: JSON.stringify(param),
611
+			url: DOMAIN + USER_USERAUTH_GRID_LIST,
612
+			pager: OPER01010_DETAIL_GRID_PAGER,
613
+			loadComplete: function(data) {				
614
+				itp_fn_grid_load_complete(data, OPER01010_DETAIL_GRID_ID, true, undefined, 'OPER01010_DETAIL');
615
+		    },
616
+		    loadError: function(jqXHR, textStatus, errorThrown) {
617
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
618
+		    },
619
+		    onPaging: function(action) {
620
+		    	var pagingFn = {
621
+	    			callBack: function(args) {
622
+	    				$(args).trigger('reloadGrid');
623
+	    			}
624
+	    		};
625
+		    	if (itp_fn_check_grid_is_writing(OPER01010_DETAIL_GRID_ID)) {
626
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER01010_DETAIL_GRID_ID);
627
+		    		return 'stop';
628
+		    	} else {
629
+		    		itp_fn_grid_paging(OPER01010_DETAIL_GRID_ID, action, param);
630
+		    	}
631
+		    },
632
+		    onSortCol: function(index, columnIndex, sortOrder) {
633
+		    	var sortingFn = {
634
+	    			callBack: function(args) {
635
+	    				$(args).trigger('reloadGrid');
636
+	    			}
637
+	    		};
638
+		    	if (itp_fn_check_grid_is_writing(OPER01010_DETAIL_GRID_ID)) {
639
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER01010_DETAIL_GRID_ID);
640
+		    		return 'stop';
641
+		    	} else {
642
+		    		itp_fn_grid_sorting(OPER01010_DETAIL_GRID_ID, index, sortOrder);
643
+		    	}
644
+		    }
645
+		}).navGrid(OPER01010_DETAIL_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
646
+	},
647
+	clearData : function() {
648
+		$(OPER01010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
649
+		$(OPER01010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
650
+		$(OPER01010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
651
+		$(OPER01010_DETAIL_GRID_EMPTY).show();
652
+	}, 
653
+	unload : function() {
654
+		$.jgrid.gridUnload(OPER01010_DETAIL_GRID_ID); 
655
+	}
656
+};
657
+
658
+var itp_fn_OPER01010_brand_search = {
659
+	init: function () {
660
+		if(AUTH_TYPE_CD === '10' || AUTH_TYPE_CD === '20') {
661
+			this.action();
662
+		} else {
663
+			this.make();
664
+		}
665
+	},
666
+	make: function() {
667
+		$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP').hide();
668
+		$('#ITP_FORM_OPER01010_DELETE_AFFL_SHOP').hide();
669
+		if(AFFL_SHOP_LIST) {
670
+			$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_ID').val(AFFL_SHOP_LIST[0].afflShopId);
671
+			$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_NM').val(AFFL_SHOP_LIST[0].afflShopNm);
672
+		}
673
+		if(AFFL_BRAND_LIST) {
674
+			fn_make_select_brand(AFFL_BRAND_LIST, 'ITP_FORM_OPER01010_SEARCH_BRAND_ID');
675
+		}
676
+	},
677
+	action: function () {
678
+		var _this = this;
679
+		// 가맹점 조회 버튼 클릭
680
+		$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP').on('click', function() {
681
+			_this.afflShop('L');
682
+		});
683
+		// 가맹점 텍스트 삭제 버튼 클릭
684
+		$('#ITP_FORM_OPER01010_DELETE_AFFL_SHOP').on('click', function() {
685
+			$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_NM').val('');
686
+			$('select#ITP_FORM_OPER01010_SEARCH_BRAND_ID option').remove();
687
+		});
688
+		// 신규등록 가맹점 조회 버튼 클릭
689
+		$('#ITP_FORM_OPER01010_DETAIL_SEARCH_AFFL_SHOP').on('click', function() {
690
+			_this.afflShop('C');
691
+		});
692
+		// 신규등록 가맹점 텍스트 삭제 버튼 클릭
693
+		$('#ITP_FORM_OPER01010_DETAIL_DELETE_AFFL_SHOP').on('click', function() {
694
+			$('#ITP_FORM_OPER01010_DETAIL_SEARCH_AFFL_SHOP_NM').val('');
695
+			$('select#ITP_FORM_OPER01010_DETAIL_SEARCH_BRAND_ID option').remove();
696
+		});
697
+	},
698
+	afflShop: function (view) {
699
+		// 팝업
700
+		var popFn = (view === 'C') ? this.callback.create : this.callback.list;
701
+		fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
702
+	},
703
+	callback: {
704
+		list: function(rowDataPop) {
705
+			console.log(rowDataPop);
706
+			if(rowDataPop.AFFL_SHOP) {
707
+				$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
708
+				$('#ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
709
+			}
710
+			if(rowDataPop.AFFL_BRAND) {
711
+				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER01010_SEARCH_BRAND_ID');
712
+			}
713
+		},
714
+		create: function(rowDataPop) {
715
+			console.log(rowDataPop);
716
+			if(rowDataPop.AFFL_SHOP) {
717
+				$('#ITP_FORM_OPER01010_DETAIL_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
718
+				$('#ITP_FORM_OPER01010_DETAIL_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
719
+			}
720
+			if(rowDataPop.AFFL_BRAND) {
721
+				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER01010_DETAIL_SEARCH_BRAND_ID', true, '선택');
722
+			}
723
+		}
724
+	}
725
+};

+ 771 - 0
bin/src/main/webapp/js/app/oper/ITP_OPER02010.js

@@ -0,0 +1,771 @@
1
+
2
+const OPER02010_GRID_ID = '#ITP_OPER02010_jqGrid';
3
+const OPER02010_GRID_LIST = '#ITP_OPER02010_jqGrid_list';
4
+const OPER02010_GRID_PAGER = '#ITP_OPER02010_jqGridPager';
5
+const OPER02010_GRID_EMPTY = '#ITP_OPER02010_jqGridEmpty';
6
+
7
+const OPER02010_VIEW_GRID_ID = '#ITP_OPER02010_VIEW_jqGrid';
8
+const OPER02010_VIEW_GRID_LIST = '#ITP_OPER02010_VIEW_jqGrid_list';
9
+const OPER02010_VIEW_GRID_PAGER = '#ITP_OPER02010_VIEW_jqGridPager';
10
+const OPER02010_VIEW_GRID_EMPTY = '#ITP_OPER02010_VIEW_jqGridEmpty';
11
+
12
+const OPER02010_DETAIL_GRID_ID = '#ITP_OPER02010_DETAIL_jqGrid';
13
+const OPER02010_DETAIL_GRID_LIST = '#ITP_OPER02010_DETAIL_jqGrid_list';
14
+const OPER02010_DETAIL_GRID_PAGER = '#ITP_OPER02010_DETAIL_jqGridPager';
15
+const OPER02010_DETAIL_GRID_EMPTY = '#ITP_OPER02010_DETAIL_jqGridEmpty';
16
+
17
+const OPER02010_BRAND_GRID_ID = '#ITP_OPER02010_BRAND_jqGrid';
18
+const OPER02010_BRAND_GRID_LIST = '#ITP_OPER02010_BRAND_jqGrid_list';
19
+const OPER02010_BRAND_GRID_PAGER = '#ITP_OPER02010_BRAND_jqGridPager';
20
+const OPER02010_BRAND_GRID_EMPTY = '#ITP_OPER02010_BRAND_jqGridEmpty';
21
+
22
+let ITP_FORM_OPER02010_DETAIL_IS_WRITING = false;
23
+
24
+let NTICE_SAVE_NTICE = '/api/ntice/save-ntice';
25
+let NTICE_DETAIL_GRID_LIST = '/api/ntice/detail-grid-list';
26
+let NTICE_INFO_NTICE = '/api/ntice/info-ntice';
27
+let NTICE_TARGET_GRID_LIST = '/api/ntice/target-grid-list';
28
+
29
+require(['config'], function() {
30
+	require([
31
+		'jquery',
32
+		'jquery.bootstrap.fileUpload' //파일 업로드가 있는 페이지에서 로딩
33
+	], function($) {
34
+		// 버튼 권한설정
35
+		fn_proc_btn_auth('OPER02010');
36
+		// 공통코드 표시
37
+		// fn_make_select(CODE_LIST, 'TARGET_CD', 'ITP_FORM_OPER02010_DETAIL_TARGET_CD');
38
+		fn_make_select(CODE_LIST, 'TARGET_CD', 'ITP_FORM_OPER02010_DETAIL_TARGET_CD', true, '선택');
39
+
40
+		// 조회일자 지정
41
+		var now = new Date();
42
+		$('#ITP_TAB_OPER02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
43
+		$('#ITP_FORM_OPER02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
44
+		$('#ITP_FORM_OPER02010_SEARCH_TO_DT').datepicker('setDate', new Date());
45
+
46
+		// 가맹점 조회
47
+		itp_fn_OPER02010_brand_search.init();
48
+
49
+		// 그리드
50
+		itp_fn_jqgrid_resize(OPER02010_GRID_ID, OPER02010_GRID_LIST, 'lg');
51
+		itp_fn_OPER02010_grid.init();
52
+    	itp_fn_fire_window_resize();
53
+
54
+		// 조회
55
+    	itp_fn_OPER02010_search();
56
+
57
+		// 조회 버튼 클릭
58
+		$('#ITP_BTN_OPER02010_SRH').on('click', function() {
59
+			itp_OPER02010_search = true;
60
+			let param = $('#ITP_FORM_OPER02010_SEARCH').serializeObject();
61
+			param.gridSize = $.jgrid.defaults.rowNum;
62
+			param.gridPage = $.jgrid.defaults.page;
63
+			$(OPER02010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
64
+		});
65
+
66
+		// 수정 버튼
67
+		$('#ITP_BTN_OPER02010_MODIFY').on('click', function() {
68
+			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER02010_DETAIL');
69
+			const nticeNoVal = $('#ITP_FORM_OPER02010_VIEW_USER_ID').val();
70
+			const key = {nticeNo: nticeNoVal, viewCd: 'R'};
71
+			var param = $.param(key);
72
+			itp_fn_OPER02010_detail(param);
73
+		});
74
+
75
+		// 신규등록 버튼
76
+		$('#ITP_BTN_OPER02010_NEWREG').on('click', function() {
77
+			itp_fn_OPER02010_switch_screen('ADD');
78
+			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER02010_DETAIL');
79
+
80
+			//파일업로드(등록화면)
81
+			$('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val('');
82
+			$('#ITP_OPER02010_DETAIL_UPLOAD').empty();
83
+			const fileArgs = {
84
+				'fileNo': $('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(),
85
+				'viewCd': $('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val(),
86
+				'showYn': $('#ITP_OPER02010_DETAIL_UPLOAD').attr('data-show-yn'),
87
+				'fileId': '#ITP_FORM_OPER02010_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
88
+			};
89
+			itp_fn_set_file_upload('ITP_OPER02010_DETAIL_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
90
+
91
+			// 권한정보 리스트 조회
92
+			itp_fn_OPER02010_detail_grid.unload();
93
+			itp_fn_OPER02010_detail_grid.callBack();
94
+		});
95
+
96
+		// 취소/목록 버튼
97
+		$('#ITP_BTN_OPER02010_CANCELLIST').on('click', function() {
98
+			itp_fn_OPER02010_search();
99
+    	});
100
+
101
+		// 삭제 버튼
102
+		$('#ITP_BTN_OPER02010_DELETE').on('click', function() {
103
+
104
+		});
105
+
106
+		// 저장 버튼
107
+		$('#ITP_BTN_OPER02010_SAVE').on('click', function() {
108
+			const formId = '#ITP_FORM_OPER02010_DETAIL';
109
+			itp_fn_form_clear_validate(null, formId);
110
+			var vali_nticeNo = itp_fn_form_validate(formId, formId + '_NTICE_TITL', ['empty'], undefined);
111
+			var vali_nticeDesc = itp_fn_form_validate(formId, formId + '_NTICE_DESC', ['empty'], undefined);
112
+			var vali_targetCd = itp_fn_form_validate(formId, formId + '_TARGET_CD', ['empty'], undefined);
113
+
114
+			if (vali_nticeNo && vali_nticeDesc && vali_targetCd) {
115
+				let gridInsertData = [];
116
+				let gridUpdateData = [];
117
+				let gridDeleteData = [];
118
+				const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
119
+				const keyValue = $(formId + '_USER_ID').val();
120
+				$.each(rowData, function(key, value) {
121
+					if (value.viewCd != 'R') {
122
+						value.nticeNo = keyValue;
123
+						if (value.viewCd == 'C') {
124
+							gridInsertData.push(value);
125
+						} else if (value.viewCd == 'U') {
126
+							gridUpdateData.push(value);
127
+						} else if (value.viewCd == 'D') {
128
+							gridDeleteData.push(value);
129
+						}
130
+					}
131
+				});
132
+				let param = $(formId).serializeObject();
133
+				param.gridInsertData = gridInsertData;
134
+				param.gridUpdateData = gridUpdateData;
135
+				param.gridDeleteData = gridDeleteData;
136
+				// console.log(JSON.stringify(param));
137
+
138
+				var searhFn = function() {
139
+					ITP_FORM_OPER02010_DETAIL_IS_WRITING = false;
140
+					itp_fn_OPER02010_search();
141
+				};
142
+				fn_ajax_call(NTICE_SAVE_NTICE, JSON.stringify(param), searhFn, 'POST');
143
+			}
144
+		});
145
+
146
+		// 상세:추가버튼
147
+		$('#ITP_BTN_OPER02010_DETAIL_ADDROW').on('click', function() {
148
+			// 팝업
149
+			var popFn = function(rowDataPop) {
150
+				// 기존등록 사용자ID
151
+				var exists = '';
152
+				const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
153
+				$.each(rowData, function(key, value) {
154
+					exists = exists + value.brandId + ';';
155
+				});
156
+
157
+				$.each(rowDataPop, function(key, value) {
158
+					console.log(value);
159
+					// console.log(exists.indexOf(value.userId));
160
+					if(exists.indexOf(value.brandId) < 0) {
161
+						// 행추가
162
+						$(OPER02010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
163
+						var rids = $(OPER02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
164
+						var last_row_id = rids[rids.length - 1];
165
+						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
166
+						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'brandId', value.brandId);
167
+						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'brandNm', value.brandNm);
168
+					}
169
+				});
170
+				$(OPER02010_DETAIL_GRID_EMPTY).hide();
171
+			};
172
+			var args = {'brandNm':$('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM').val()};
173
+			fn_call_popup('biz', 'BIZPOP_AFFL_BRAND', '#ITP_ASIDE', popFn, args, 'S');
174
+		});
175
+		// 상세:삭제버튼
176
+		$('#ITP_BTN_OPER02010_DETAIL_DELROW').on('click', function() {
177
+			itp_fn_grid_del_row(OPER02010_DETAIL_GRID_ID);
178
+		});
179
+
180
+		$('body').on('click', function(e) {
181
+			var gridId = OPER02010_DETAIL_GRID_ID.replace('#', '');
182
+			var rids = $(OPER02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
183
+			var last_row_id = rids[rids.length - 1];
184
+			itp_fn_grid_reset_selection(e, last_row_id, gridId, 'OPER02010_DETAIL');
185
+		});
186
+
187
+		// [수발주 추가]
188
+		itp_fn_OPER02010_form_set.init();
189
+	});
190
+});
191
+
192
+var itp_fn_OPER02010_switch_screen = function(mode) {
193
+	if(mode == 'LIST') { // 목록
194
+		$('#ITP_BTN_OPER02010_MODIFY').hide();
195
+		$('#ITP_BTN_OPER02010_CANCELLIST').hide();
196
+		$('#ITP_BTN_OPER02010_DELETE').hide();
197
+		$('#ITP_BTN_OPER02010_SAVE').hide();
198
+		fn_show_btn_auth('#ITP_BTN_OPER02010_SRH');
199
+		fn_show_btn_auth('#ITP_BTN_OPER02010_NEWREG');
200
+		
201
+		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').show();
202
+		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').hide();
203
+		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').hide();
204
+	} else if(mode == 'ADD') { // 등록
205
+		$('#ITP_BTN_OPER02010_SRH').hide();
206
+		$('#ITP_BTN_OPER02010_MODIFY').hide();
207
+		$('#ITP_BTN_OPER02010_NEWREG').hide();
208
+		$('#ITP_BTN_OPER02010_DELETE').hide();
209
+		fn_show_btn_auth('#ITP_BTN_OPER02010_CANCELLIST');
210
+		fn_show_btn_auth('#ITP_BTN_OPER02010_SAVE');
211
+		
212
+		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').hide();
213
+		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').show();
214
+		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').hide();
215
+
216
+		$('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val('C');
217
+		$('#ITP_FORM_OPER02010_DETAIL_NTICE_NO').val('');
218
+		$('#ITP_FORM_OPER02010_DETAIL_NTICE_TITL').val('');
219
+		$('#ITP_FORM_OPER02010_DEL_YN').val('N');
220
+		$('#ITP_FORM_OPER02010_DETAIL_NTICE_DESC').val('');
221
+		// $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').val('');
222
+		$('#ITP_FORM_OPER02010_FROM_DT').datepicker('setDate', new Date());
223
+		$('#ITP_FORM_OPER02010_TO_DT').datepicker('setDate', new Date());
224
+	} else if(mode == 'MODIFY') { // 수정
225
+		$('#ITP_BTN_OPER02010_SRH').hide();
226
+		$('#ITP_BTN_OPER02010_MODIFY').hide();
227
+		$('#ITP_BTN_OPER02010_NEWREG').hide();
228
+		$('#ITP_BTN_OPER02010_DELETE').hide();
229
+		fn_show_btn_auth('#ITP_BTN_OPER02010_CANCELLIST');
230
+		fn_show_btn_auth('#ITP_BTN_OPER02010_SAVE');
231
+		
232
+		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').hide();
233
+		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').show();
234
+		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').hide();
235
+	} else if(mode == 'VIEW') { // 보기
236
+		$('#ITP_BTN_OPER02010_SRH').hide();
237
+		$('#ITP_BTN_OPER02010_NEWREG').hide();
238
+		$('#ITP_BTN_OPER02010_DELETE').hide();
239
+		$('#ITP_BTN_OPER02010_SAVE').hide();
240
+		fn_show_btn_auth('#ITP_BTN_OPER02010_MODIFY');
241
+		fn_show_btn_auth('#ITP_BTN_OPER02010_CANCELLIST');
242
+		
243
+		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').hide();
244
+		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').hide();
245
+		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').show();
246
+	}
247
+};
248
+
249
+var itp_fn_OPER02010_grid = {
250
+	init: function() {
251
+		// 데이터 없을때
252
+		itp_fn_OPER02010_empty.push();
253
+		$(OPER02010_GRID_EMPTY).on('click', function() {
254
+			itp_fn_OPER02010_empty.back();
255
+			itp_OPER02010_param.gridSize = $.jgrid.defaults.rowNum;
256
+			$(OPER02010_GRID_ID).setGridParam({'postData': JSON.stringify(itp_OPER02010_param)}).trigger('reloadGrid');
257
+		});
258
+	},
259
+	callBack: function() {
260
+		let param = $('#ITP_FORM_OPER02010_SEARCH').serializeObject();
261
+		param.gridSize = $.jgrid.defaults.rowNum;
262
+		$(OPER02010_GRID_ID).jqGrid({
263
+			colModel: [
264
+				{
265
+					index: 'NTICE_NO', name: 'nticeNo',
266
+					label: ITP_MSG_LOCALE.label.notiNo, //공지번호
267
+					width: '10', fixed: false, align: 'center',
268
+					sortable: false, hidden: false
269
+				},
270
+				{
271
+					index: 'AFFL_SHOP_NM', name: 'afflShopNm',
272
+					label: ITP_MSG_LOCALE.label.afflShopNm, //가맹점
273
+					width: '10', fixed: false, align: 'center',
274
+					sortable: false, hidden: false
275
+				},
276
+				{
277
+					index: 'BRAND_NM', name: 'brandNm',
278
+					label: ITP_MSG_LOCALE.label.brandNm, //브랜드
279
+					width: '13', fixed: false, align: 'center',
280
+					sortable: false, hidden: false
281
+				},
282
+				{
283
+					index: 'NTICE_TITL', name: 'nticeTitl',
284
+					label: ITP_MSG_LOCALE.label.titlet, //공지제목
285
+					width: '15', fixed: false, align: 'center',
286
+					sortable: false, hidden: false
287
+				},
288
+				{
289
+					index: 'TARGET_NM', name: 'targetNm',
290
+					label: ITP_MSG_LOCALE.label.targetNm, //공지대상
291
+					width: '10', fixed: false, align: 'center',
292
+					sortable: false, hidden: false
293
+				},
294
+				{
295
+					index: 'NTICE_STAT_NM', name: 'nticeStatNm',
296
+					label: ITP_MSG_LOCALE.label.status, //상태
297
+					width: '6', fixed: false, align: 'center',
298
+					sortable: false, hidden: false
299
+				},
300
+				{
301
+					index: 'NOTI_ST_DAY', name: 'notiStDay',
302
+					label: ITP_MSG_LOCALE.label.viewDt, //노출일
303
+					width: '10', fixed: false, align: 'center',
304
+					sortable: false, hidden: false
305
+				},
306
+				{
307
+					index: 'ADD_DT', name: 'addDt',
308
+					label: ITP_MSG_LOCALE.label.regDt, //등록일
309
+					width: '10', fixed: false, align: 'center',
310
+					sortable: false, hidden: false
311
+				}
312
+			],
313
+			loadBeforeSend: function(jqXHR) {
314
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
315
+			},
316
+			postData: JSON.stringify(param),
317
+			url: DOMAIN + NTICE_DETAIL_GRID_LIST,
318
+			pager: OPER02010_GRID_PAGER,
319
+			multiselect: false,
320
+			rownumbers: true,
321
+			onCellSelect: function(rowId, cellIdx, cellValue) {
322
+				var cm = $(this).jqGrid('getGridParam', 'colModel');
323
+				var colNm = cm[cellIdx].name;
324
+				if (colNm == 'nticeTitl') {
325
+					const nticeNoVal = $(this).jqGrid('getCell', rowId, 'nticeNo');
326
+					const key = {nticeNo: nticeNoVal, viewCd: 'R'};
327
+					var param = $.param(key);
328
+					itp_fn_OPER02010_view(param);
329
+				}
330
+		   	},
331
+			loadComplete: function(data) {
332
+				//console.log(JSON.stringify(data));
333
+				itp_fn_grid_load_complete(data, OPER02010_GRID_ID, true, 'number', 'OPER02010', itp_OPER02010_search, itp_fn_OPER02010_empty, true, data.gridRecords, true);
334
+				var ids = $(OPER02010_GRID_ID).getDataIDs();
335
+				$.each(ids, function(idx, rowId) {
336
+					$(OPER02010_GRID_ID).jqGrid('setCell', rowId, 'nticeTitl', '', ITP_GRID_COL_STYLE.link);
337
+				});
338
+
339
+				if ($('#ITP_CONTAINER').data('openYn') == 'Y') {
340
+					$('#ITP_CONTAINER').data('openYn', 'N');
341
+					const keyNew = {nticeNo: $('#ITP_CONTAINER').data('nticeNo'), viewCd: 'R'};
342
+					var paramNew = $.param(keyNew);
343
+					itp_fn_OPER02010_view(paramNew);
344
+				}
345
+		    },
346
+		    loadError: function(jqXHR, textStatus, errorThrown) {
347
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
348
+		    },
349
+		    onPaging: function(action) {
350
+		    	itp_fn_grid_paging(OPER02010_GRID_ID, action, param);
351
+		    }
352
+		}).navGrid(OPER02010_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
353
+	},
354
+	clearData : function() {
355
+		$(OPER02010_GRID_ID).jqGrid('clearGridData', true);
356
+		$(OPER02010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
357
+		$(OPER02010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
358
+		$(OPER02010_GRID_EMPTY).show();
359
+	},
360
+	unload : function() {
361
+		$.jgrid.gridUnload(OPER02010_GRID_ID);
362
+	}
363
+};
364
+
365
+var itp_fn_OPER02010_search = function() {
366
+	itp_fn_OPER02010_switch_screen('LIST');
367
+	itp_fn_OPER02010_grid.unload();
368
+	itp_fn_OPER02010_grid.callBack();
369
+};
370
+
371
+let itp_OPER02010_param = {};
372
+let itp_OPER02010_search = false;
373
+var itp_fn_OPER02010_empty = {
374
+	push: function() {
375
+		let param = $('#ITP_FORM_OPER02010_SEARCH').serializeObject();
376
+		itp_OPER02010_param = param;
377
+	},
378
+	back: function() {
379
+		$('#ITP_FORM_OPER02010_DEVI_TP_CD').val(itp_OPER02010_param.deviTpCd);
380
+		$('#ITP_FORM_OPER02010_ORDER_YN').val(itp_OPER02010_param.orderYn);
381
+		$('#ITP_FORM_OPER02010_ADT_AUTH_CD').val(itp_OPER02010_param.adtAuthCd);
382
+		$('#ITP_FORM_OPER02010_EMAIL_RCV_YN').val(itp_OPER02010_param.emailRcvYn);
383
+		$('#ITP_FORM_OPER02010_SMS_RCV_YN').val(itp_OPER02010_param.smsRcvYn);
384
+		$('#ITP_FORM_OPER02010_MEMB_EXIT_DT').val(itp_OPER02010_param.membExitDt);
385
+		$('#ITP_FORM_OPER02010_FROM_DT').val(itp_OPER02010_param.fromDt);
386
+		$('#ITP_FORM_OPER02010_TO_DT').val(itp_OPER02010_param.toDt);
387
+		$('#ITP_FORM_OPER02010_KEYWORD').val(itp_OPER02010_param.keyword);
388
+	}
389
+};
390
+
391
+var itp_fn_OPER02010_view = function(param) {
392
+	fn_ajax_call(NTICE_INFO_NTICE, param, itp_fn_OPER02010_view_callback, 'GET');
393
+};
394
+
395
+var itp_fn_OPER02010_view_callback = function(result) {
396
+	// console.log(result);
397
+	itp_fn_OPER02010_switch_screen('VIEW');
398
+	$('#ITP_FORM_OPER02010_VIEW #ITP_FORM_OPER02010_VIEW_USER_ID').val(result.nticeNo);
399
+	$('#ITP_FORM_OPER02010_VIEW .fnNticeTitl').text(result.nticeTitl);
400
+	$('#ITP_FORM_OPER02010_VIEW .fnNotiDay').text(result.notiStDay+' ~ '+result.notiEdDay);
401
+	$('#ITP_FORM_OPER02010_VIEW .fnDelYn').text(result.delYn);
402
+	$('#ITP_FORM_OPER02010_VIEW .fnNticeDesc').html(result.nticeDesc.replace(/(\n|\r\n)/g, '<br>'));
403
+	$('#ITP_FORM_OPER02010_VIEW .fnTargetNm').text(result.targetNm);
404
+	$('#ITP_FORM_OPER02010_VIEW_FILE_NO').val(result.fileNo); //파일번호 셋팅
405
+
406
+	//파일업로드(뷰화면)
407
+	$('#ITP_OPER02010_VIEW_UPLOAD').empty();
408
+	const fileArgs = {
409
+		'fileNo': $('#ITP_FORM_OPER02010_VIEW_FILE_NO').val(),
410
+		'viewCd': $('#ITP_FORM_OPER02010_VIEW_VIEW_CD').val()
411
+	};
412
+	itp_fn_set_file_upload('ITP_OPER02010_VIEW_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
413
+
414
+	// 권한정보 리스트 조회
415
+	itp_fn_OPER02010_view_grid.unload();
416
+	itp_fn_OPER02010_view_grid.callBack();
417
+};
418
+
419
+var itp_fn_OPER02010_view_grid = {
420
+	init: function() {
421
+	},
422
+	callBack: function() {
423
+		let param = $('#ITP_FORM_OPER02010_VIEW').serializeObject();
424
+		param.gridSize = $.jgrid.defaults.rowNum;
425
+		param.pagingYn = false; // 페이징안함
426
+
427
+		$(OPER02010_VIEW_GRID_ID).jqGrid({
428
+			colModel: [
429
+				{
430
+					index: 'VIEW_CD', name: 'viewCd',
431
+					label: ITP_MSG_LOCALE.label.viewCd,
432
+					width: '10', fixed: false, align: 'center',
433
+					sortable: false, hidden: true
434
+				},
435
+				{
436
+					index: 'NTICE_NO', name: 'nticeNo',
437
+					label: ITP_MSG_LOCALE.label.notiNo,
438
+					width: '10', fixed: false, align: 'center',
439
+					sortable: false, hidden: true
440
+				},
441
+				{
442
+					index: 'USER_ID', name: 'userId',
443
+					label: ITP_MSG_LOCALE.label.userId,
444
+					width: '20', fixed: false, align: 'center',
445
+					sortable: false, editable: false, edittype: 'text'
446
+				},
447
+				{
448
+					index: 'USER_NM', name: 'userNm',
449
+					label: ITP_MSG_LOCALE.label.userName,
450
+					width: '30', fixed: false, align: 'center',
451
+					sortable: false, editable: false, edittype: 'text'
452
+				}
453
+			],
454
+			loadBeforeSend: function(jqXHR) {
455
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
456
+			},
457
+			postData: JSON.stringify(param),
458
+			url: DOMAIN + NTICE_TARGET_GRID_LIST,
459
+			pager: OPER02010_VIEW_GRID_PAGER,
460
+			multiselect: false,
461
+			loadComplete: function(data) {
462
+				itp_fn_grid_load_complete(data, OPER02010_VIEW_GRID_ID, true, undefined, 'OPER02010_VIEW');
463
+		    },
464
+		    loadError: function(jqXHR, textStatus, errorThrown) {
465
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
466
+		    },
467
+		    onPaging: function(action) {
468
+		    	var pagingFn = {
469
+	    			callBack: function(args) {
470
+	    				$(args).trigger('reloadGrid');
471
+	    			}
472
+	    		};
473
+		    	if (itp_fn_check_grid_is_writing(OPER02010_VIEW_GRID_ID)) {
474
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_VIEW_GRID_ID);
475
+		    		return 'stop';
476
+		    	} else {
477
+		    		itp_fn_grid_paging(OPER02010_VIEW_GRID_ID, action, param);
478
+		    	}
479
+		    },
480
+		    onSortCol: function(index, columnIndex, sortOrder) {
481
+		    	var sortingFn = {
482
+	    			callBack: function(args) {
483
+	    				$(args).trigger('reloadGrid');
484
+	    			}
485
+	    		};
486
+		    	if (itp_fn_check_grid_is_writing(OPER02010_VIEW_GRID_ID)) {
487
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_VIEW_GRID_ID);
488
+		    		return 'stop';
489
+		    	} else {
490
+		    		itp_fn_grid_sorting(OPER02010_VIEW_GRID_ID, index, sortOrder);
491
+		    	}
492
+		    }
493
+		}).navGrid(OPER02010_VIEW_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
494
+	},
495
+	clearData : function() {
496
+		$(OPER02010_VIEW_GRID_ID).jqGrid('clearGridData', true);
497
+		$(OPER02010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
498
+		$(OPER02010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
499
+		$(OPER02010_VIEW_GRID_EMPTY).show();
500
+	},
501
+	unload : function() {
502
+		$.jgrid.gridUnload(OPER02010_VIEW_GRID_ID);
503
+	}
504
+};
505
+
506
+var itp_fn_OPER02010_detail = function(param) {
507
+	fn_ajax_call(NTICE_INFO_NTICE, param, itp_fn_OPER02010_detail_callback, 'GET');
508
+};
509
+
510
+var itp_fn_OPER02010_detail_callback = function(result) {
511
+	// console.log(result);
512
+	itp_fn_OPER02010_switch_screen('MODIFY');
513
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_VIEW_CD').val('U');
514
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_NTICE_NO').val(result.nticeNo);
515
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_NTICE_TITL').val(result.nticeTitl);
516
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_FROM_DT').val(result.notiStDay);
517
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_TO_DT').val(result.notiEdDay);
518
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DEL_YN').val(result.delYn);
519
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_NTICE_DESC').val(result.nticeDesc);
520
+	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_TARGET_CD').val(result.targetCd);
521
+	$('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(result.fileNo); //파일번호 셋팅
522
+
523
+	//파일업로드(수정화면)
524
+	$('#ITP_OPER02010_DETAIL_UPLOAD').empty();
525
+	const fileArgs = {
526
+		'fileNo': $('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(),
527
+		'viewCd': $('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val(),
528
+		'showYn': $('#ITP_OPER02010_DETAIL_UPLOAD').attr('data-show-yn'),
529
+		'fileId': '#ITP_FORM_OPER02010_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
530
+	};
531
+	itp_fn_set_file_upload('ITP_OPER02010_DETAIL_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
532
+
533
+	// 리스트 조회
534
+	itp_fn_OPER02010_detail_grid.unload();
535
+	itp_fn_OPER02010_detail_grid.callBack();
536
+};
537
+
538
+var itp_fn_OPER02010_detail_grid = {
539
+	init: function() {
540
+	},
541
+	callBack: function() {
542
+		let param = $('#ITP_FORM_OPER02010_DETAIL').serializeObject();
543
+		param.gridSize = $.jgrid.defaults.rowNum;
544
+		param.pagingYn = false; // 페이지안함
545
+
546
+		$(OPER02010_DETAIL_GRID_ID).jqGrid({
547
+			colModel: [
548
+				{
549
+					index: 'VIEW_CD', name: 'viewCd',
550
+					label: ITP_MSG_LOCALE.label.viewCd,
551
+					width: '10', fixed: false, align: 'center',
552
+					sortable: false, hidden: true
553
+				},
554
+				{
555
+					index: 'NTICE_NO', name: 'nticeNo',
556
+					label: ITP_MSG_LOCALE.label.notiNo,
557
+					width: '10', fixed: false, align: 'center',
558
+					sortable: false, hidden: true
559
+				},
560
+				{
561
+					index: 'BRAND_ID', name: 'brandId',
562
+					label: ITP_MSG_LOCALE.label.brandId,
563
+					width: '20', fixed: false, align: 'center',
564
+					sortable: false, editable: false, edittype: 'text'
565
+				},
566
+				{
567
+					index: 'BRAND_NM', name: 'brandNm',
568
+					label: ITP_MSG_LOCALE.label.brandNm,
569
+					width: '30', fixed: false, align: 'center',
570
+					sortable: false, editable: false, edittype: 'text'
571
+				}
572
+			],
573
+			loadBeforeSend: function(jqXHR) {
574
+			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
575
+			},
576
+			postData: JSON.stringify(param),
577
+			url: DOMAIN + NTICE_TARGET_GRID_LIST,
578
+			pager: OPER02010_DETAIL_GRID_PAGER,
579
+			loadComplete: function(data) {
580
+				itp_fn_grid_load_complete(data, OPER02010_DETAIL_GRID_ID, true, undefined, 'OPER02010_DETAIL');
581
+		    },
582
+		    loadError: function(jqXHR, textStatus, errorThrown) {
583
+		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
584
+		    },
585
+		    onPaging: function(action) {
586
+		    	var pagingFn = {
587
+	    			callBack: function(args) {
588
+	    				$(args).trigger('reloadGrid');
589
+	    			}
590
+	    		};
591
+		    	if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
592
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_DETAIL_GRID_ID);
593
+		    		return 'stop';
594
+		    	} else {
595
+		    		itp_fn_grid_paging(OPER02010_DETAIL_GRID_ID, action, param);
596
+		    	}
597
+		    },
598
+		    onSortCol: function(index, columnIndex, sortOrder) {
599
+		    	var sortingFn = {
600
+	    			callBack: function(args) {
601
+	    				$(args).trigger('reloadGrid');
602
+	    			}
603
+	    		};
604
+		    	if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
605
+		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_DETAIL_GRID_ID);
606
+		    		return 'stop';
607
+		    	} else {
608
+		    		itp_fn_grid_sorting(OPER02010_DETAIL_GRID_ID, index, sortOrder);
609
+		    	}
610
+		    }
611
+		}).navGrid(OPER02010_DETAIL_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
612
+	},
613
+	clearData : function() {
614
+		$(OPER02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
615
+		$(OPER02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
616
+		$(OPER02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
617
+		$(OPER02010_DETAIL_GRID_EMPTY).show();
618
+	},
619
+	unload : function() {
620
+		$.jgrid.gridUnload(OPER02010_DETAIL_GRID_ID);
621
+	}
622
+};
623
+
624
+var itp_fn_OPER02010_brand_grid = {
625
+	init: function() {
626
+	},
627
+	colModel: [
628
+		{
629
+			index: 'BRAND_ID', name: 'brandId',
630
+			label: ITP_MSG_LOCALE.table.brandId,
631
+			width: '20', fixed: false, align: 'center',
632
+			sortable: false, editable: false, edittype: 'text'
633
+		},
634
+		{
635
+			index: 'BRAND_NM', name: 'brandNm',
636
+			label: ITP_MSG_LOCALE.table.brandNm,
637
+			width: '30', fixed: false, align: 'center',
638
+			sortable: false, editable: false, edittype: 'text'
639
+		}
640
+	],
641
+	callBack: function() {
642
+
643
+	},
644
+	clearData : function() {
645
+		$(OPER02010_BRAND_GRID_ID).jqGrid('clearGridData', true);
646
+		$(OPER02010_BRAND_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
647
+		$(OPER02010_BRAND_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
648
+		$(OPER02010_BRAND_GRID_EMPTY).show();
649
+	},
650
+	unload : function() {
651
+		$.jgrid.gridUnload(OPER02010_BRAND_GRID_ID);
652
+	}
653
+};
654
+
655
+var itp_fn_OPER02010_form_set = {
656
+	init: function () {
657
+		this.selectbox.init();
658
+		this.checkbox.init();
659
+	},
660
+	selectbox: {
661
+		init: function () {
662
+			this.brand();
663
+			this.target();
664
+		},
665
+		brand: function() {
666
+			// 브랜드 selectbox 선택
667
+			$('#ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID').on('change', function() {
668
+				if(this.selectedIndex > 0) {
669
+					$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD option:eq(0)').prop('selected', true);
670
+					$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').attr('disabled', true);
671
+					$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').trigger('change');
672
+				} else {
673
+					$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').attr('disabled', false);
674
+				}
675
+			});
676
+		},
677
+		target: function() {
678
+			// 공지대상 selectbox 선택
679
+			$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').on('change', function() {
680
+				if(this.selectedIndex > 1) {
681
+					$('#ITP_BTN_OPER02010_DETAIL_ADDROW').attr('disabled', false);
682
+					$('#ITP_BTN_OPER02010_DETAIL_DELROW').attr('disabled', false);
683
+				} else {
684
+					$('#ITP_BTN_OPER02010_DETAIL_ADDROW').attr('disabled', true);
685
+					$('#ITP_BTN_OPER02010_DETAIL_DELROW').attr('disabled', true);
686
+					$(OPER02010_DETAIL_GRID_ID).remove();
687
+				}
688
+			});
689
+		}
690
+	},
691
+	checkbox: {
692
+		init: function () {
693
+			this.target();
694
+		},
695
+		target: function() {
696
+			// 공지대상 checkbox 선택
697
+			$('#ITP_FORM_OPER02010_TARGET').find('input:checkbox').on('change', function() {
698
+				$(this).next().val($(this).is(':checked') ? 'Y' : '');
699
+			});
700
+		}
701
+	}
702
+};
703
+
704
+var itp_fn_OPER02010_brand_search = {
705
+	init: function () {
706
+		if(AUTH_TYPE_CD === '10' || AUTH_TYPE_CD === '20') {
707
+			this.action();
708
+		} else {
709
+			this.make();
710
+		}
711
+	},
712
+	make: function() {
713
+		$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP').hide();
714
+		$('#ITP_FORM_OPER02010_DELETE_AFFL_SHOP').hide();
715
+		if(AFFL_SHOP_LIST) {
716
+			$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID').val(AFFL_SHOP_LIST[0].afflShopId);
717
+			$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val(AFFL_SHOP_LIST[0].afflShopNm);
718
+		}
719
+		if(AFFL_BRAND_LIST) {
720
+			fn_make_select_brand(AFFL_BRAND_LIST, 'ITP_FORM_OPER02010_SEARCH_BRAND_ID');
721
+		}
722
+	},
723
+	action: function () {
724
+		var _this = this;
725
+		// 가맹점 조회 버튼 클릭
726
+		$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP').on('click', function() {
727
+			_this.afflShop('L');
728
+		});
729
+		// 가맹점 텍스트 삭제 버튼 클릭
730
+		$('#ITP_FORM_OPER02010_DELETE_AFFL_SHOP').on('click', function() {
731
+			$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val('');
732
+			$('select#ITP_FORM_OPER02010_SEARCH_BRAND_ID option').remove();
733
+		});
734
+		// 신규등록 가맹점 조회 버튼 클릭
735
+		$('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP').on('click', function() {
736
+			_this.afflShop('C');
737
+		});
738
+		// 신규등록 가맹점 텍스트 삭제 버튼 클릭
739
+		$('#ITP_FORM_OPER02010_DETAIL_DELETE_AFFL_SHOP').on('click', function() {
740
+			$('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM').val('');
741
+			$('select#ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID option').remove();
742
+		});
743
+	},
744
+	afflShop: function (view) {
745
+		// 팝업
746
+		var popFn = (view === 'C') ? this.callback.create : this.callback.list;
747
+		fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
748
+	},
749
+	callback: {
750
+		list: function(rowDataPop) {
751
+			console.log(rowDataPop);
752
+			if(rowDataPop.AFFL_SHOP) {
753
+				$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
754
+				$('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
755
+			}
756
+			if(rowDataPop.AFFL_BRAND) {
757
+				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER02010_SEARCH_BRAND_ID');
758
+			}
759
+		},
760
+		create: function(rowDataPop) {
761
+			console.log(rowDataPop);
762
+			if(rowDataPop.AFFL_SHOP) {
763
+				$('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
764
+				$('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
765
+			}
766
+			if(rowDataPop.AFFL_BRAND) {
767
+				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID', true, '선택');
768
+			}
769
+		}
770
+	}
771
+};

+ 128 - 0
bin/src/main/webapp/js/app/popup/biz/ITP_BIZPOP_AFFL_BRAND.js

@@ -0,0 +1,128 @@
1
+require(['config'], function() {
2
+	require([
3
+		'jquery'
4
+	], function($) {
5
+
6
+	});
7
+});
8
+
9
+let FRCOMP_POP_GRID_LIST = '/api/brand/pop-grid-list';
10
+
11
+function itp_fn_BIZPOP_AFFL_BRAND(parentPopFn, args, returnType) {
12
+	// 공통코드
13
+	// fn_make_select(CODE_LIST, 'CMPY_TYPE_CD', 'ITP_FORM_BIZPOP_AFFL_BRAND_CMPY_TYPE_CD', true, '가맹점타입 선택');
14
+	
15
+	let itp_BIZPOP_AFFL_BRAND_param = {};
16
+	let itp_BIZPOP_AFFL_BRAND_search = false;
17
+
18
+	const THIS_FORM_ID = '#ITP_FORM_BIZPOP_AFFL_BRAND';
19
+	const THIS_GIRD_ID = '#ITP_BIZPOP_AFFL_BRAND_jqGrid';
20
+	const THIS_GIRD_PAGER = '#ITP_BIZPOP_AFFL_BRAND_jqGridPager';
21
+
22
+	if(args) {
23
+		$('#ITP_FORM_BIZPOP_AFFL_BRAND_CMPY_NM').val(args.brandNm);
24
+	}
25
+	
26
+	$('#ITP_BIZPOP_AFFL_BRAND').one('shown.bs.modal', function(e) {
27
+		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_AFFL_BRAND_jqGrid_list', '');
28
+		itp_fn_fire_window_resize();
29
+	}).one('hidden.bs.modal', function(e) {
30
+		$('#ITP_BIZPOP_AFFL_BRAND').remove();
31
+	}).modal('show');
32
+
33
+	$('#ITP_BIZPOP_AFFL_BRAND_BTN_SEARCH').on('click', function() {
34
+		itp_BIZPOP_AFFL_BRAND_search = true;
35
+		let param = $(THIS_FORM_ID).serializeObject();
36
+		param.gridSize = 10;
37
+		param.gridPage = $.jgrid.defaults.page;
38
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
39
+	});
40
+	
41
+	$('#ITP_BIZPOP_AFFL_BRAND_BTN_SELECT').on('click', function() {		
42
+		const rowKey = $(THIS_GIRD_ID).getGridParam('selrow');
43
+	    if (!rowKey) {
44
+	    	return;
45
+	    }
46
+
47
+		var list = [];
48
+	    var selectedIds = $(THIS_GIRD_ID).getGridParam('selarrrow');
49
+
50
+		if(selectedIds.length > 1) { // 1개만 선택
51
+			return;
52
+		} 
53
+		
54
+	    for (var i=selectedIds.length-1; i>=0; i--) {
55
+			list.push($(THIS_GIRD_ID).jqGrid('getRowData', selectedIds[i]));	
56
+		}
57
+		parentPopFn(list);
58
+		$('#ITP_BIZPOP_AFFL_BRAND').modal('hide'); // 팝업닫기
59
+	});
60
+
61
+	$('#ITP_BIZPOP_AFFL_BRAND_jqGridEmpty').on('click', function() {
62
+		itp_fn_BIZPOP_AFFL_BRAND_empty.back();
63
+		itp_BIZPOP_AFFL_BRAND_param.gridSize = 10;
64
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_AFFL_BRAND_param)}).trigger('reloadGrid');
65
+	});
66
+
67
+	var itp_fn_BIZPOP_AFFL_BRAND_empty = {
68
+		push: function() {
69
+			let param = $(THIS_FORM_ID).serializeObject();
70
+			itp_BIZPOP_AFFL_BRAND_param = param;
71
+		},
72
+		back: function() {
73
+			$(THIS_FORM_ID + '_CMPY_CD').val(itp_BIZPOP_AFFL_BRAND_param.scmpyCd);
74
+			$(THIS_FORM_ID + '_CMPY_NM').val(itp_BIZPOP_AFFL_BRAND_param.scmpyNm);
75
+			$(THIS_FORM_ID + '_CMPY_TYPE_CD').val(itp_BIZPOP_AFFL_BRAND_param.scmpyTypeCd);
76
+		}
77
+	};
78
+
79
+	itp_fn_BIZPOP_AFFL_BRAND_empty.push();
80
+	let param = $('#ITP_FORM_BIZPOP_AFFL_BRAND').serializeObject();
81
+	param.gridSize = 10;
82
+
83
+	$(THIS_GIRD_ID).jqGrid({
84
+		colModel: [
85
+			{
86
+				index: 'AFFL_SHOP_ID', name: 'afflShopId',
87
+				label: '가맹점ID', //
88
+				width: '0', fixed: false, align: 'center',
89
+				sortable: false, hidden: true
90
+			},
91
+			{
92
+				index: 'AFFL_SHOP_NM', name: 'afflShopNm',
93
+				label: '가맹점명', //
94
+				width: '20', fixed: false, align: 'center',
95
+				sortable: false, hidden: false
96
+			},
97
+			{
98
+				index: 'BRAND_ID', name: 'brandId',
99
+				label: '브랜드ID', //
100
+				width: '10', fixed: false, align: 'center',
101
+				sortable: false, hidden: false
102
+			},
103
+			{
104
+				index: 'BRAND_NM', name: 'brandNm',
105
+				label: '브랜드명', //
106
+				width: '20', fixed: false, align: 'center',
107
+				sortable: false, hidden: false
108
+			}
109
+		],
110
+		loadBeforeSend: function(jqXHR) {
111
+		    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
112
+		},
113
+		postData: JSON.stringify(param),
114
+		url: DOMAIN + FRCOMP_POP_GRID_LIST,
115
+		pager: THIS_GIRD_PAGER,
116
+		multiselect: true,
117
+		loadComplete: function(data) {
118
+			console.log(data);
119
+			itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_AFFL_BRAND', itp_BIZPOP_AFFL_BRAND_search, itp_fn_BIZPOP_AFFL_BRAND_empty, true, data.gridRecords, false);
120
+	    },
121
+	    loadError: function(jqXHR, textStatus, errorThrown) {
122
+	    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
123
+	    },
124
+	    onPaging: function(action) {
125
+	    	itp_fn_grid_paging(THIS_GIRD_ID, action, param);
126
+	    }
127
+	}).navGrid(THIS_GIRD_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
128
+};

+ 116 - 0
bin/src/main/webapp/js/app/popup/biz/ITP_BIZPOP_AFFL_SHOP.js

@@ -0,0 +1,116 @@
1
+require(['config'], function() {
2
+	require([
3
+		'jquery'
4
+	], function($) {
5
+
6
+	});
7
+});
8
+
9
+let AFFL_POP_GRID_LIST = '/api/affl/pop-grid-list';
10
+let BRAND_POP_GRID_LIST = '/api/brand/affl-brand-list';
11
+
12
+function itp_fn_BIZPOP_AFFL_SHOP(parentPopFn, args, returnType) {
13
+	
14
+	let itp_BIZPOP_AFFL_SHOP_param = {};
15
+	let itp_BIZPOP_AFFL_SHOP_search = false;
16
+
17
+	const THIS_FORM_ID = '#ITP_FORM_BIZPOP_AFFL_SHOP';
18
+	const THIS_GIRD_ID = '#ITP_BIZPOP_AFFL_SHOP_jqGrid';
19
+	const THIS_GIRD_PAGER = '#ITP_BIZPOP_AFFL_SHOP_jqGridPager';
20
+	
21
+	$('#ITP_BIZPOP_AFFL_SHOP').one('shown.bs.modal', function(e) {
22
+		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_AFFL_SHOP_jqGrid_list', '');
23
+		itp_fn_fire_window_resize();
24
+	}).one('hidden.bs.modal', function(e) {
25
+		$('#ITP_BIZPOP_AFFL_SHOP').remove();
26
+	}).modal('show');
27
+
28
+	$('#ITP_BIZPOP_AFFL_SHOP_BTN_SEARCH').on('click', function() {
29
+		itp_BIZPOP_AFFL_SHOP_search = true;
30
+		let param = $(THIS_FORM_ID).serializeObject();
31
+		param.gridSize = 10;
32
+		param.gridPage = $.jgrid.defaults.page;
33
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
34
+	});
35
+	
36
+	$('#ITP_BIZPOP_AFFL_SHOP_BTN_SELECT').on('click', function() {		
37
+		const rowKey = $(THIS_GIRD_ID).getGridParam('selrow');
38
+	    if (!rowKey) {
39
+	    	return;
40
+	    }
41
+	    const selRow = $(THIS_GIRD_ID).getRowData(rowKey);
42
+
43
+		var afflData = {};
44
+		var callbackFn = function(result) {
45
+			afflData['AFFL_SHOP'] = selRow;
46
+			afflData['AFFL_BRAND'] = result.searchList;
47
+			parentPopFn(afflData);
48
+			$('#ITP_BIZPOP_AFFL_SHOP').modal('hide'); // 팝업닫기
49
+		};
50
+		console.log(selRow);
51
+		var param = {'afflShopId': selRow.afflShopId};
52
+		console.log('===>', param);
53
+		fn_ajax_call(BRAND_POP_GRID_LIST, param, callbackFn, 'GET');
54
+	});
55
+
56
+	$('#ITP_BIZPOP_AFFL_SHOP_jqGridEmpty').on('click', function() {
57
+		itp_fn_BIZPOP_AFFL_SHOP_empty.back();
58
+		itp_BIZPOP_AFFL_SHOP_param.gridSize = 10;
59
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_AFFL_SHOP_param)}).trigger('reloadGrid');
60
+	});
61
+
62
+	var itp_fn_BIZPOP_AFFL_SHOP_empty = {
63
+		push: function() {
64
+			let param = $(THIS_FORM_ID).serializeObject();
65
+			itp_BIZPOP_AFFL_SHOP_param = param;
66
+		},
67
+		back: function() {
68
+			$(THIS_FORM_ID + '_CMPY_CD').val(itp_BIZPOP_AFFL_SHOP_param.scmpyCd);
69
+			$(THIS_FORM_ID + '_CMPY_NM').val(itp_BIZPOP_AFFL_SHOP_param.scmpyNm);
70
+			$(THIS_FORM_ID + '_CMPY_TYPE_CD').val(itp_BIZPOP_AFFL_SHOP_param.scmpyTypeCd);
71
+		}
72
+	};
73
+
74
+	itp_fn_BIZPOP_AFFL_SHOP_empty.push();
75
+	let param = $('#ITP_FORM_BIZPOP_AFFL_SHOP').serializeObject();
76
+	param.gridSize = 10;
77
+
78
+	$(THIS_GIRD_ID).jqGrid({
79
+		colModel: [
80
+			{
81
+				index: 'AFFL_SHOP_ID', name: 'afflShopId',
82
+				label: '가맹점코드', // 
83
+				width: '10', fixed: false, align: 'center',
84
+				sortable: false, hidden: false
85
+			},
86
+			{
87
+				index: 'AFFL_SHOP_NM', name: 'afflShopNm',
88
+				label: '가맹점명', //
89
+				width: '12', fixed: false, align: 'center',
90
+				sortable: false, hidden: false
91
+			},
92
+			{
93
+				index: 'CMPY_TYPE_NM', name: 'cmpyTypeNm',
94
+				label: '상태', //
95
+				width: '6', fixed: false, align: 'center',
96
+				sortable: false, hidden: false
97
+			}
98
+		],
99
+		loadBeforeSend: function(jqXHR) {
100
+		    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
101
+		},
102
+		postData: JSON.stringify(param),
103
+		url: DOMAIN + AFFL_POP_GRID_LIST,
104
+		pager: THIS_GIRD_PAGER,
105
+		multiselect: false,
106
+		loadComplete: function(data) {
107
+			itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_AFFL_SHOP', itp_BIZPOP_AFFL_SHOP_search, itp_fn_BIZPOP_AFFL_SHOP_empty, true, data.gridRecords, false);
108
+	    },
109
+	    loadError: function(jqXHR, textStatus, errorThrown) {
110
+	    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
111
+	    },
112
+	    onPaging: function(action) {
113
+	    	itp_fn_grid_paging(THIS_GIRD_ID, action, param);
114
+	    }
115
+	}).navGrid(THIS_GIRD_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
116
+};

+ 6 - 4
bin/src/main/webapp/main.html

@@ -48,8 +48,7 @@
48 48
 		<header id="ITP_HEADER">
49 49
 			<div class="itp_head bg-primary">
50 50
 				<h1 class="text-center itp_tit">
51
-					<span>브랜드명</span>
52
-					<button type="button" id="" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
51
+					<span id="ITP_TXT_MAIN_SHR_AFFL">오더퀸</span>
53 52
 					<span style="font-size: 18px; margin-top: -3px">|</span>
54 53
 					<span style="font-size: 14px">수발주시스템</span>
55 54
 				</h1>
@@ -58,8 +57,11 @@
58 57
 					<span class="itp_icon"><a href="javascript:void(0)" id="ITP_BTN_HOME"><i class="glyphicon glyphicon-home"></i></a></span>
59 58
 					<span class="itp_user" id="ITP_LOGIN_USER" style="cursor: pointer;"></span>
60 59
 				</div>
61
-				<div class="itp_rt"> 
62
-					<span class="itp_logo"><img src="/oqpo-view/images/naver.png" alt="로고"></span>
60
+				<div class="itp_rt">
61
+					<!--<span class="itp_logo"><img src="/oqpo-view/images/favicon.ico" alt="로고"></span>-->
62
+					<span class="itp_txt_brand" id="ITP_TXT_MAIN_SHR_TIMEOUT"></span>
63
+					<span class="itp_txt_brand" id="ITP_TXT_MAIN_SHR_BRAND"></span>
64
+					<span class="itp_sch_brand"><button type="button" id="ITP_BTN_MAIN_SHR_AFFL" class="btn btn-success btn-sm SEB"><i class="glyphicon glyphicon-search"></i></button></span>
63 65
 					<span class="itp_menu"><a href="javascript:void(0)" class="">메뉴안내</a></span>
64 66
 					<span class="itp_out"><a href="javascript:void(0)" class="ITP_BTN_LOGOUT">로그아웃</a></span>
65 67
 				</div>

+ 6 - 7
src/main/webapp/app/pomng/POMNG01010.html

@@ -83,10 +83,10 @@
83 83
 														<input type="checkbox" style="width:20px; height:17px;">
84 84
 													</td>
85 85
 													<td>
86
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
86
+								    					<div id="ITP_FORM_POMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
87 87
 													</td>
88 88
 													<td>
89
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_NM" name="ITEM_NM"></div>
89
+								    					<div id="ITP_FORM_POMNG01010_ITEM_NM" name="ITEM_NM"></div>
90 90
 													</td>
91 91
 													<td>
92 92
 														<select id="ITP_FORM_POMNG01010_UNIT" class="form-control itp_input" name="UNIT">
@@ -117,10 +117,10 @@
117 117
 													
118 118
 													</td>
119 119
 													<td>
120
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
120
+								    					<div id="ITP_FORM_POMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
121 121
 													</td>
122 122
 													<td>
123
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_NM" name="ITEM_NM"></div>
123
+								    					<div id="ITP_FORM_POMNG01010_ITEM_NM" name="ITEM_NM"></div>
124 124
 													</td>
125 125
 													<td>
126 126
 																											
@@ -147,10 +147,10 @@
147 147
 													
148 148
 													</td>
149 149
 													<td>
150
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
150
+								    					<div id="ITP_FORM_POMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
151 151
 													</td>
152 152
 													<td>
153
-								    					<div id="ITP_FORM_POMNGO01010_ITEM_NM" name="ITEM_NM"></div>
153
+								    					<div id="ITP_FORM_POMNG01010_ITEM_NM" name="ITEM_NM"></div>
154 154
 													</td>
155 155
 													<td>
156 156
 																											
@@ -181,6 +181,5 @@
181 181
 			</div>
182 182
 		</article>
183 183
 	</div>
184
-	
185 184
 	<div id="ITP_TAP_JS"></div>	
186 185
 </section>

+ 181 - 0
src/main/webapp/app/rtnmng/RTNMNG01010.html

@@ -0,0 +1,181 @@
1
+<section id="ITP_TAB_RTNMNG01010" class="tab-pane active itp_sec">
2
+	<div class="itp_cont">
3
+		<article class="itp_detail">
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>
6
+				<div class="pull-right itp_cicon">
7
+					<button type="button" id="ITP_BTN_RTNMNG01010_SRH" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;요청&nbsp;&nbsp;</button>
8
+				</div>
9
+			</div>
10
+			<div class="itp_det_in">
11
+				<div id="ITP_AJAX_RTNMNG01010_LIST_CONTAINER">
12
+					<div class="itp_form itp_type1 fix">
13
+						<div class="col-xs-12">
14
+							<form id="ITP_FORM_RTNMNG01010_DETAIL" class="form-horizontal">
15
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
16
+								<section class="itp_form_sec">
17
+									<h4 class="itp_form_tit">반품요청정보</h4>
18
+									<div class="itp_form_in">	
19
+										<div class="form-group">
20
+											<label class="col-xs-2 itp_lb">브랜드 *</label>
21
+											<div class="col-xs-4 itp_ip BRAND_NM"></div>
22
+											<label class="col-xs-2 itp_lb">반품번호</label>
23
+											<div class="col-xs-4 itp_ip PCH_REQ_UNQ_NO"></div>
24
+										</div>
25
+									</div>
26
+									<div class="itp_form_in">	
27
+										<div class="form-group">
28
+											<label class="col-xs-2 itp_lb">반품장소</label>
29
+											<div class="col-xs-4 itp_ip">
30
+												<div class="col-xs-5 itp_in">
31
+													<input type="text" id="ITP_FORM_POMNG04010_SEARCH_DLV_PLACE" class="form-control itp_input" name="DLV_PLACE" value="매장/창고" />
32
+												</div>
33
+												<div class="col-xs-4 itp_in" style="padding-left:3px">
34
+													<button type="button" id="ITP_BTN_POMNG04010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
35
+													<button type="button" id="ITP_BTN_POMNG04010_MODIFY" class="btn btn-success btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-ok"></i></button>
36
+								                </div>
37
+											</div>
38
+											<label class="col-xs-2 itp_lb">수거요청일</label>
39
+											<div class="col-xs-4 itp_ip">
40
+												<div class="col-xs-4 itp_in input-daterange input-group date">
41
+													<input type="text" id="ITP_FORM_POMNG02010_SEARCH_COL_REQ_DT" class="form-control itp_input" name="COL_REQ_DT" value="">
42
+												</div>
43
+											</div>
44
+										</div>
45
+									</div>
46
+									<div class="itp_form_in">
47
+										<div class="form-group">
48
+											<label class="col-xs-2 itp_lb">비고</label>
49
+											<div class="col-xs-10 itp_ip">
50
+												<input type="text" id="ITP_FORM_RTNMNG01010_SEARCH_NOTE" class="form-control itp_input" name="NOTE" value="" />
51
+											</div>
52
+										</div>
53
+									</div>
54
+									<div class="itp_form_in">
55
+										<div class="itp_table_head fix" style="background:#f5f5f5;">
56
+											<h4 class="itp_table_tit">요청 품목</h4>
57
+											<div class="pull-right itp_cicon">
58
+												<button type="button" id="ITP_BTN_RTNMNG01010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
59
+												<button type="button" id="ITP_BTN_RTNMNG01010_DETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon "></i>&nbsp;&nbsp;품목삭제&nbsp;&nbsp;</button>
60
+											</div>
61
+										</div>
62
+										<table class="table order">
63
+											<thead>
64
+												<tr>
65
+													<th style="width:5%;">선택</th>
66
+													<th style="width:17%;">품목번호</th>
67
+													<th style="width:18%;">품목명</th>
68
+													<th style="width:10%;">단위</th>
69
+													<th style="width:10%;">수량</th>
70
+													<th style="width:10%;">예상구매금액</th>
71
+													<th style="width:10%;">납기요청일</th>
72
+													<th style="width:10%;">납품장소</th>
73
+													<th style="width:10%;">납품장소상세</th>
74
+												 </tr>
75
+											 </thead>
76
+											 <tbody class="check">
77
+												 <tr>
78
+													<td>
79
+														<input type="checkbox" style="width:20px; height:17px;">
80
+													</td>
81
+													<td>
82
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
83
+													</td>
84
+													<td>
85
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_NM" name="ITEM_NM"></div>
86
+													</td>
87
+													<td>
88
+														<select id="ITP_FORM_RTNMNG01010_UNIT" class="form-control itp_input" name="UNIT">
89
+														</select>													
90
+													</td>
91
+													<td>
92
+														<input type="text" id="ITP_FORM_RTNMNG01010_STDD_QYT" class="form-control itp_input" name="STDD_QYT" value="">
93
+													</td>
94
+													<td>
95
+														<input type="text" id="ITP_FORM_RTNMNG01010_" class="form-control itp_input" name="" value="">
96
+													</td>
97
+													<td>
98
+														<div class="input-daterange input-group date itp_in">
99
+															<input type="text" id="ITP_FORM_RTNMNG01010_DLV_REQ_DT" class="form-control itp_input" name="DLV_REQ_DT" value="">
100
+														</div>
101
+													<td>
102
+														<select id="ITP_FORM_RTNMNG01010_DETAIL_BNK_CD" class="form-control itp_input" name="BNK_CD">
103
+														</select>
104
+													</td>
105
+													<td>
106
+														<input type="text" id="ITP_FORM_RTNMNG01010_" class="form-control itp_input" name="" value="">
107
+													</td>
108
+												 </tr>
109
+											 </tbody>
110
+											 <tbody class="check">
111
+												 <tr>
112
+													<td>
113
+													
114
+													</td>
115
+													<td>
116
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
117
+													</td>
118
+													<td>
119
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_NM" name="ITEM_NM"></div>
120
+													</td>
121
+													<td>
122
+																											
123
+													</td>
124
+													<td>
125
+													
126
+													</td>
127
+													<td>
128
+													
129
+													</td>
130
+													<td>
131
+													
132
+													<td>
133
+													
134
+													</td>
135
+													<td>
136
+													
137
+													</td>
138
+												 </tr>
139
+											 </tbody>
140
+											 <tbody class="check">
141
+												 <tr>
142
+													<td>
143
+													
144
+													</td>
145
+													<td>
146
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_CLASS_MGNT_NO" name="ITEM_CLASS_MGNT_NO"></div>
147
+													</td>
148
+													<td>
149
+								    					<div id="ITP_FORM_RTNMNG01010_ITEM_NM" name="ITEM_NM"></div>
150
+													</td>
151
+													<td>
152
+																											
153
+													</td>
154
+													<td>
155
+													
156
+													</td>
157
+													<td>
158
+													
159
+													</td>
160
+													<td>
161
+													
162
+													<td>
163
+													
164
+													</td>
165
+													<td>
166
+													
167
+													</td>
168
+												 </tr>
169
+											 </tbody>
170
+										 </table>
171
+									</div>
172
+								</section>												
173
+							</form>
174
+						</div>
175
+					</div>
176
+				</div>
177
+			</div>
178
+		</article>
179
+	</div>
180
+	<div id="ITP_TAP_JS"></div>	
181
+</section>

+ 0 - 0
src/main/webapp/app/rtnmng/RTNMNG02010.html


+ 0 - 0
src/main/webapp/app/rtnmng/RTNMNG03010.html


+ 0 - 0
src/main/webapp/app/rtnmng/RTNMNG04010.html


+ 0 - 0
src/main/webapp/app/rtnmng/RTNMNG05010.html


+ 0 - 0
src/main/webapp/app/rtnmng/RTNMNG06010.html