Bläddra i källkod

운영관리 사용자관리/공지사항관리 수정

juney 2 år sedan
förälder
incheckning
79157e62db

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

@@ -128,7 +128,7 @@
128 128
 
129 129
 					<div class="itp_table fix">
130 130
 						<div class="itp_table_head fix">
131
-							<h4 class="itp_table_tit">* 공지대상이 특정 대상일 경 추가 버큰을 통해 사용자  등록 함</h4>
131
+							<h4 class="itp_table_tit">* 공지대상이 특정 대상일 경 추가 버큰을 통해 사용자  등록 함</h4>
132 132
 							<div class="pull-right itp_cicon">
133 133
 								<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>
134 134
 								<button type="button" id="ITP_BTN_OPER02010_DETAIL_DELROW" class="btn btn-danger btn-sm DEB"><i class="glyphicon glyphicon-remove"></i> 삭제</button>

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

@@ -228,6 +228,7 @@ const ITP_MSG_LOCALE = (function() {
228 228
 			},
229 229
 			"page": {
230 230
 				"noMoreTab": "더는 탭을 열 수 없습니다.",
231
+				"noChoiceBrand": "브랜드가 선택 후 이용 바랍니다.",
231 232
 				"noBack": "뒤로 가기 버튼을 이용할 수 없습니다.",
232 233
 				"allowPop": "이 웹 사이트에 대한 팝업을<br>허용하십시오."
233 234
 			},

+ 17 - 5
src/main/webapp/app/oper/OPER01010.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_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_OPER01010_SERVICE_ST_DT" class="form-control itp_input" name="serviceStDt">
@@ -64,16 +77,15 @@
64 77
 											<label class="col-xs-2 itp_lb">가맹점</label>
65 78
 											<div class="col-xs-4 itp_ip">
66 79
 												<div class="col-xs-5 itp_in">
67
-													<select id="ITP_FORM_OPER01010_DETAIL_USER_AFFL_SHOP" class="form-control itp_input" name="afflShop">
68
-														<option value=""></option>
69
-													</select>
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>
70 83
 												</div>
71 84
 											</div>
72 85
 											<label class="col-xs-2 itp_lb">브랜드</label>
73 86
 											<div class="col-xs-4 itp_ip">
74 87
 												<div class="col-xs-5 itp_in">
75
-													<select id="ITP_FORM_OPER01010_DETAIL_USER_BRAND_NM" class="form-control itp_input" name="brandNm">
76
-														<option value=""></option>
88
+													<select id="ITP_FORM_OPER01010_DETAIL_SEARCH_BRAND_ID" class="form-control itp_input" name="brandId">
77 89
 													</select>
78 90
 												</div>
79 91
 											</div>

+ 33 - 29
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">

+ 47 - 0
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
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>

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

@@ -122,6 +122,9 @@ a, button {outline:none !important; text-decoration:none !important;}
122 122
 #ITP_HEADER .itp_rt .itp_icon {margin-right:5px;}
123 123
 #ITP_HEADER .itp_logo {margin:0; padding:0; color:#337ab7; float:left; width:30px;}
124 124
 #ITP_HEADER .itp_logo img{width:30px;}
125
+#ITP_HEADER .itp_txt_brand {float:left; margin:4px; padding:0 4px; color:#fff; font-size:18px; text-decoration:none;}
126
+#ITP_HEADER .itp_sch_brand {margin:0 4px; padding:0; color:#337ab7; float:left; width:30px;}
127
+#ITP_HEADER .itp_sch_brand button{width:30px;}
125 128
 #ITP_HEADER .itp_menu {float:left; border:1px solid #ddd; line-height: 24px; background:#eee;margin:4px; border-radius: 2px; padding:0 4px;}
126 129
 #ITP_HEADER .itp_menu a {color:#000; font-size:13px; text-decoration:none;}
127 130
 #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
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 - 2
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,6 +241,7 @@ const ITP_MSG_LOCALE = (function() {
239 241
 			},
240 242
 			"page": {
241 243
 				"noMoreTab": "더는 탭을 열 수 없습니다.",
244
+				"noChoiceBrand": "브랜드 선택 후 이용 바랍니다.",
242 245
 				"noBack": "뒤로 가기 버튼을 이용할 수 없습니다.",
243 246
 				"allowPop": "이 웹 사이트에 대한 팝업을<br>허용하십시오."
244 247
 			},

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

@@ -23,7 +23,7 @@ require(['config'], function() {
23 23
 	    	itp_fn_fire_window_resize();
24 24
 	
25 25
 			// 조회
26
-	    	itp_fn_MAIN_NOTICE_search();	
26
+	    	itp_fn_MAIN_NOTICE_search();
27 27
 		}, 100);
28 28
 				
29 29
 	});

+ 74 - 2
src/main/webapp/js/app/oper/ITP_OPER01010.js

@@ -39,6 +39,9 @@ require(['config'], function() {
39 39
 		$('#ITP_TAB_OPER01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
40 40
 		// $('#ITP_FORM_OPER01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
41 41
 		// $('#ITP_FORM_OPER01010_SEARCH_TO_DT').datepicker('setDate', new Date());
42
+
43
+		// 가맹점 조회
44
+		itp_fn_OPER01010_brand_search.init();
42 45
 				
43 46
 		// 그리드				
44 47
 		itp_fn_jqgrid_resize(OPER01010_GRID_ID, OPER01010_GRID_LIST, 'lg');
@@ -282,8 +285,8 @@ var itp_fn_OPER01010_grid = {
282 285
 	},
283 286
 	colModel: [
284 287
 		{
285
-			index: 'AGENCY_NM', name: 'afflShop',
286
-			label: ITP_MSG_LOCALE.label.afflShop, //가맹점
288
+			index: 'AFFL_SHOP_NM', name: 'afflShopNm',
289
+			label: ITP_MSG_LOCALE.label.afflShopNm, //가맹점
287 290
 			width: '10', fixed: false, align: 'center',
288 291
 			sortable: false, hidden: false
289 292
 		},
@@ -650,4 +653,73 @@ var itp_fn_OPER01010_detail_grid = {
650 653
 	unload : function() {
651 654
 		$.jgrid.gridUnload(OPER01010_DETAIL_GRID_ID); 
652 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
+	}
653 725
 };

+ 149 - 11
src/main/webapp/js/app/oper/ITP_OPER02010.js

@@ -34,6 +34,7 @@ require(['config'], function() {
34 34
 		// 버튼 권한설정
35 35
 		fn_proc_btn_auth('OPER02010');
36 36
 		// 공통코드 표시
37
+		// fn_make_select(CODE_LIST, 'TARGET_CD', 'ITP_FORM_OPER02010_DETAIL_TARGET_CD');
37 38
 		fn_make_select(CODE_LIST, 'TARGET_CD', 'ITP_FORM_OPER02010_DETAIL_TARGET_CD', true, '선택');
38 39
 
39 40
 		// 조회일자 지정
@@ -42,6 +43,9 @@ require(['config'], function() {
42 43
 		$('#ITP_FORM_OPER02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
43 44
 		$('#ITP_FORM_OPER02010_SEARCH_TO_DT').datepicker('setDate', new Date());
44 45
 
46
+		// 가맹점 조회
47
+		itp_fn_OPER02010_brand_search.init();
48
+
45 49
 		// 그리드
46 50
 		itp_fn_jqgrid_resize(OPER02010_GRID_ID, OPER02010_GRID_LIST, 'lg');
47 51
 		itp_fn_OPER02010_grid.init();
@@ -147,25 +151,26 @@ require(['config'], function() {
147 151
 				var exists = '';
148 152
 				const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
149 153
 				$.each(rowData, function(key, value) {
150
-					exists = exists + value.userId + ';';
154
+					exists = exists + value.brandId + ';';
151 155
 				});
152 156
 
153 157
 				$.each(rowDataPop, function(key, value) {
154
-					// console.log(JSON.stringify(value));
158
+					console.log(value);
155 159
 					// console.log(exists.indexOf(value.userId));
156
-					if(exists.indexOf(value.userId) < 0) {
160
+					if(exists.indexOf(value.brandId) < 0) {
157 161
 						// 행추가
158 162
 						$(OPER02010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
159 163
 						var rids = $(OPER02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
160 164
 						var last_row_id = rids[rids.length - 1];
161 165
 						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
162
-						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'userId', value.userId);
163
-						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'userNm', value.userNm);
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);
164 168
 					}
165 169
 				});
166 170
 				$(OPER02010_DETAIL_GRID_EMPTY).hide();
167 171
 			};
168
-			fn_call_popup('comm', 'USER_SCH_POPUP', '#ITP_ASIDE', popFn, null, 'S');
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');
169 174
 		});
170 175
 		// 상세:삭제버튼
171 176
 		$('#ITP_BTN_OPER02010_DETAIL_DELROW').on('click', function() {
@@ -178,6 +183,9 @@ require(['config'], function() {
178 183
 			var last_row_id = rids[rids.length - 1];
179 184
 			itp_fn_grid_reset_selection(e, last_row_id, gridId, 'OPER02010_DETAIL');
180 185
 		});
186
+
187
+		// [수발주 추가]
188
+		itp_fn_OPER02010_form_set.init();
181 189
 	});
182 190
 });
183 191
 
@@ -210,7 +218,7 @@ var itp_fn_OPER02010_switch_screen = function(mode) {
210 218
 		$('#ITP_FORM_OPER02010_DETAIL_NTICE_TITL').val('');
211 219
 		$('#ITP_FORM_OPER02010_DEL_YN').val('N');
212 220
 		$('#ITP_FORM_OPER02010_DETAIL_NTICE_DESC').val('');
213
-		$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').val('');
221
+		// $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').val('');
214 222
 		$('#ITP_FORM_OPER02010_FROM_DT').datepicker('setDate', new Date());
215 223
 		$('#ITP_FORM_OPER02010_TO_DT').datepicker('setDate', new Date());
216 224
 	} else if(mode == 'MODIFY') { // 수정
@@ -259,6 +267,18 @@ var itp_fn_OPER02010_grid = {
259 267
 					width: '10', fixed: false, align: 'center',
260 268
 					sortable: false, hidden: false
261 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
+				},
262 282
 				{
263 283
 					index: 'NTICE_TITL', name: 'nticeTitl',
264 284
 					label: ITP_MSG_LOCALE.label.titlet, //공지제목
@@ -538,14 +558,14 @@ var itp_fn_OPER02010_detail_grid = {
538 558
 					sortable: false, hidden: true
539 559
 				},
540 560
 				{
541
-					index: 'USER_ID', name: 'userId',
542
-					label: ITP_MSG_LOCALE.label.userId,
561
+					index: 'BRAND_ID', name: 'brandId',
562
+					label: ITP_MSG_LOCALE.label.brandId,
543 563
 					width: '20', fixed: false, align: 'center',
544 564
 					sortable: false, editable: false, edittype: 'text'
545 565
 				},
546 566
 				{
547
-					index: 'USER_NM', name: 'userNm',
548
-					label: ITP_MSG_LOCALE.label.userName,
567
+					index: 'BRAND_NM', name: 'brandNm',
568
+					label: ITP_MSG_LOCALE.label.brandNm,
549 569
 					width: '30', fixed: false, align: 'center',
550 570
 					sortable: false, editable: false, edittype: 'text'
551 571
 				}
@@ -630,4 +650,122 @@ var itp_fn_OPER02010_brand_grid = {
630 650
 	unload : function() {
631 651
 		$.jgrid.gridUnload(OPER02010_BRAND_GRID_ID);
632 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
+	}
633 771
 };

+ 128 - 0
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
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
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/favicon.ico" 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>