marseyes vor 2 Jahren
Ursprung
Commit
b70bf49d21

+ 43 - 41
src/main/webapp/app/settmng/SETTMNG01010.html

@@ -5,7 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>정산요청</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_SETTMNG01010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-					<button type="button" id="ITP_BTN_SETTMNG01010_SRH" class="btn btn-success btn-sm REQ" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;요청&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_SETTMNG01010_REQUEST" class="btn btn-success btn-sm REQ" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;요청&nbsp;&nbsp;</button>
9 9
 					<button type="button" id="ITP_BTN_SETTMNG01010_NEWREG" class="btn btn-primary btn-sm SRQ" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;정산요청&nbsp;&nbsp;</button>
10 10
 					<button type="button" id="ITP_BTN_SETTMNG01010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon"></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
11 11
 				</div>
@@ -16,36 +16,32 @@
16 16
 						<div class="itp_srh_border fix">
17 17
 							<div class="col-xs-12">
18 18
 								<form id="ITP_FORM_SETTMNG01010_SEARCH" class="form-horizontal">
19
+									<input type="hidden" id="ITP_FORM_SETTMNG01010_SEARCH_BRAND_ID" name="sbrandId" value="">
20
+									<input type="hidden" id="ITP_FORM_SETTMNG01010_SEARCH_STORE_ID" name="sstoreId" value="STR221000006">
21
+								
19 22
 									<div class="form-group">
20
-										<div class="col-xs-1 itp_ip itp_noMar">
21
-											<select id="ITP_FORM_SETTMNG01010_SERVICE_COL_DVSN" class="form-control itp_input" name="servicecolDvsn">
22
-												<option value="A"></option>											
23
-											</select>
24
-										</div>
25 23
 										<div class="col-xs-2 itp_ip itp_noMar">
26
-											<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_STORE_NM" class="form-control itp_input" name="sStoreNm" placeholder="매장명" />
24
+											<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_STORE_NM" class="form-control itp_input" name="sstoreNm" placeholder="매장선택" readonly="readonly" value="매장가맹4" />
27 25
 										</div>
28
-										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
29
-											<button type="button" id="ITP_BTN_SETTMNG01010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
30
-											<button type="button" id="ITP_BTN_SETTMNG01010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
31
-						                </div>
32
-										<div class="col-xs-1 itp_ip itp_noMar" style="width:11%; top:3px;" >
33
-											<label>입고/수거일자</label>
26
+										<div class="col-xs-1 itp_ip itp_noMar">
27
+											<button type="button" id="ITP_BTN_SETTMNG01010_STORE_SEARCH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
28
+											<button type="button" id="ITP_BTN_SETTMNG01010_STORE_ERASE" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
34 29
 										</div>
35 30
 										<div class="col-xs-3 itp_ip itp_noMar">
36
-											<div class="input-daterange input-group date">
37
-												<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_" class="form-control itp_input" name="" value="">
38
-												<span class="input-group-addon itp_date_to">~</span>
39
-												<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_COL_DT" class="form-control itp_input" name="colDt" value="">
31
+											<div class="col-xs-4 itp_ip itp_noMar" style="top:2px">
32
+												<label>입고/수거일자</label>
33
+											</div>
34
+											<div class="col-xs-8 itp_ip itp_noMar">
35
+												<div class="input-daterange input-group date">
36
+													<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
37
+													<span class="input-group-addon itp_date_to">~</span>
38
+													<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
39
+												</div>
40 40
 											</div>
41 41
 										</div>
42 42
 										<div class="col-xs-2 itp_ip itp_noMar">
43
-											<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목명" />
43
+											<input type="text" id="ITP_FORM_SETTMNG01010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목명" />
44 44
 										</div>
45
-										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
46
-											<button type="button" id="ITP_BTN_SETTMNG01010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
47
-											<button type="button" id="ITP_BTN_SETTMNG01010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
48
-						                </div>
49 45
 									</div>
50 46
 								</form>
51 47
 							</div>
@@ -65,9 +61,10 @@
65 61
 						<div class="col-xs-12">
66 62
 							<form id="ITP_FORM_SETTMNG01010_DETAIL" class="form-horizontal">
67 63
 								<input type="hidden" id="ITP_FORM_SETTMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
64
+								<input type="hidden" id="ITP_FORM_SETTMNG01010_DETAIL_STTL_MGNT_UNQ_NO" name="sttlMgntUnqNo" value="">
68 65
 					
69 66
 								<section class="itp_form_sec">
70
-									<h4 class="itp_form_tit">정산 상세정보-요청</h4>
67
+									<h4 class="itp_form_tit">정산 상세정보</h4>
71 68
 									<div class="itp_form_in">
72 69
 										<div class="form-group">
73 70
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
@@ -82,37 +79,40 @@
82 79
 											</div>
83 80
 										</div>
84 81
 										<div class="form-group">
85
-											<label class="col-xs-2 itp_lb">정산일자</label>
82
+											<label class="col-xs-2 itp_lb">정산요청일자</label>
86 83
 											<div class="col-xs-4 itp_ip">
87 84
 												<div class="col-xs-5 itp_in">
88
-													<div class="input-daterange input-group date">
89
-														<input type="text" id="ITP_FORM_SETTMNG01010_DETAIL_STTL_DT" class="form-control itp_input" name="sttlDt" value="">
90
-													</div>										
85
+													<div class="input-group date">
86
+													<input type="text" id="ITP_FORM_SETTMNG01010_DETAIL_STTL_REQ_DT" class="form-control itp_input" name="sttlReqDt" readonly="readonly">
87
+													<span class="input-group-addon itp_input itp_date_to">
88
+														<i class="glyphicon glyphicon-calendar"></i>
89
+													</span>
90
+													</div>
91 91
 												</div>
92 92
 											</div>
93 93
 											<label class="col-xs-2 itp_lb">정산상태</label>
94 94
 											<div class="col-xs-4 itp_ip">
95
-												<div class="col-xs-8 itp_in "></div>
95
+												<div class="col-xs-8 itp_in fnSttlStNm"></div>
96 96
 											</div>
97 97
 										</div>
98 98
 										<div class="form-group">
99
-											<label class="col-xs-2 itp_lb">정산금액</label>
99
+											<label class="col-xs-2 itp_lb">정산요청금액</label>
100 100
 											<div class="col-xs-4 itp_ip">
101
-												<div class="col-xs-10 itp_in "></div>
101
+												<div class="col-xs-10 itp_in fnSttlReqAmt"></div>
102 102
 											</div>
103 103
 											<label class="col-xs-2 itp_lb">잔금</label>
104 104
 											<div class="col-xs-4 itp_ip">
105
-												<div class="col-xs-8 itp_in "></div>
105
+												<div class="col-xs-8 itp_in fnAcctBal"></div>
106 106
 											</div>
107 107
 										</div>
108 108
 										<div class="form-group border">
109 109
 											<label class="col-xs-2 itp_lb">등록일</label>
110 110
 											<div class="col-xs-4 itp_ip">
111
-												<div class="col-xs-10 itp_in fnRegDttm"></div>
111
+												<div class="col-xs-10 itp_in fnSysRegDttm"></div>
112 112
 											</div>
113 113
 											<label class="col-xs-2 itp_lb">등록자</label>
114 114
 											<div class="col-xs-4 itp_ip">
115
-												<div class="col-xs-8 itp_in fnRegId"></div>
115
+												<div class="col-xs-8 itp_in fnSysRegNm"></div>
116 116
 											</div>
117 117
 										</div>
118 118
 									</div>
@@ -120,14 +120,16 @@
120 120
 							</form>
121 121
 						</div>
122 122
 					</div>
123
-				</div>
124
-				<div class="itp_table fix">
125
-					<h4 class="itp_form_tit" style="background:#eee; padding:13px 18px; margin:0; border-left:none;">정산 대상 내역</h4>
126
-					<div id="ITP_SETTMNG01010_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
127
-						<div id="ITP_SETTMNG01010_DETAIL_jqGridView" class="itp_views fix"></div>
128
-						<table id="ITP_SETTMNG01010_DETAIL_jqGrid"></table>
129
-						<div id="ITP_SETTMNG01010_DETAIL_jqGridPager"></div>
130
-						<div id="ITP_SETTMNG01010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
123
+					<div class="itp_table fix">
124
+					    <div class="itp_table_head fix" style="background:#f5f5f5;">
125
+					        <h4 class="itp_table_tit">정산 대상 내역</h4>
126
+					    </div>
127
+					    <div id="ITP_SETTMNG01010_DETAIL_jqGrid_list" class="itp_tb_list">
128
+					        <div id="ITP_SETTMNG01010_DETAIL_jqGridView" class="itp_views fix"></div>
129
+					        <table id="ITP_SETTMNG01010_DETAIL_jqGrid"></table>
130
+					        <div id="ITP_SETTMNG01010_DETAIL_jqGridPager"></div>
131
+					        <div id="ITP_SETTMNG01010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
132
+					    </div>
131 133
 					</div>
132 134
 				</div>
133 135
 			</div>

+ 0 - 7
src/main/webapp/js/app/loanmng/ITP_LOANMNG03010.js

@@ -204,13 +204,6 @@ const gridColModel = {
204 204
 			sortable: false, editable: false, edittype: 'text', 
205 205
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
206 206
 		},
207
-		{
208
-			index: 'STTL_REQ_AMT', name: 'sttlReqAmt',
209
-			label: "정산금액",
210
-			width: '8', fixed: false, align: 'center',
211
-			sortable: false, editable: false, edittype: 'text', 
212
-			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
213
-		},
214 207
 		{
215 208
 			index: 'STTL_DVSN_NM', name: 'sttlDvsnNm',
216 209
 			label: "정산구분",

+ 685 - 0
src/main/webapp/js/app/settmng/ITP_SETTMNG01010.js

@@ -0,0 +1,685 @@
1
+/********************************************************
2
+ --------------------------------------------------------
3
+ - Object 목록								            -
4
+ --------------------------------------------------------
5
+ * const gridColModel = {}	: 화면 Grid Object			*
6
+ * let pageObj = {}			: 화면공통 Object			*
7
+ * let listObj = {}			: 목록화면 Object			*
8
+ * let modifyObj = {}			: 상세화면 Object			*
9
+ *******************************************************/
10
+
11
+/*화면 변수*/
12
+const SETTMNG01010_GRID_ID = '#ITP_SETTMNG01010_jqGrid';
13
+const SETTMNG01010_GRID_LIST = '#ITP_SETTMNG01010_jqGrid_list';
14
+const SETTMNG01010_GRID_PAGER = '#ITP_SETTMNG01010_jqGridPager';
15
+const SETTMNG01010_GRID_EMPTY = '#ITP_SETTMNG01010_jqGridEmpty';
16
+
17
+const SETTMNG01010_DETAIL_GRID_ID = '#ITP_SETTMNG01010_DETAIL_jqGrid';
18
+const SETTMNG01010_DETAIL_GRID_LIST = '#ITP_SETTMNG01010_DETAIL_jqGrid_list';
19
+const SETTMNG01010_DETAIL_GRID_PAGER = '#ITP_SETTMNG01010_DETAIL_jqGridPager';
20
+const SETTMNG01010_DETAIL_GRID_EMPTY = '#ITP_SETTMNG01010_DETAIL_jqGridEmpty';
21
+
22
+let ITP_FORM_SETTMNG01010_DETAIL_IS_DUPLICATE = false;
23
+let ITP_FORM_SETTMNG01010_DETAIL_IS_WRITING = false;
24
+let SETTMNG01010_DETAIL_GRID_LAST_ROW_ID;
25
+
26
+/*API URL*/
27
+let STTL_REQ_DETAIL_GRID_LIST = '/api/sttl/req/detail-grid-list';
28
+let STTL_REQ_REQUEST_STTL = '/api/sttl/req/request-sttl';
29
+let STTL_REQ_REQUEST_STTL_PROC = '/api/sttl/req/request-sttl-proc';
30
+let STTL_REQ_INFO_STTL = '/api/sttl/req/info-sttl';
31
+let STTL_REQ_STL_GRID_LIST = '/api/sttl/req/stl-grid-list';
32
+
33
+let LOGIN_AUTH_TYPE_CD;
34
+
35
+/*화면 Grid ColModel*/
36
+const gridColModel = {
37
+	list: [
38
+		{
39
+			index: 'VIEW_CD', name: 'viewCd',
40
+			label: ITP_MSG_LOCALE.label.viewCd,
41
+			width: '10', fixed: false, align: 'center',
42
+			sortable: false, hidden: true
43
+		},
44
+		{
45
+			index: 'STTL_MGNT_UNQ_NO', name: 'sttlMgntUnqNo',
46
+			label: "정산관리고유번호", 
47
+			width: '0', fixed: false, align: 'center',
48
+			sortable: false, hidden: true
49
+		},
50
+		{
51
+			index: 'STTL_MGNT_DTL_NO', name: 'sttlMgntDtlNo',
52
+			label: '정산관리상세번호',
53
+			width: '10', fixed: false, align: 'center',
54
+			sortable: false, hidden: true
55
+		},
56
+		{
57
+			index: 'MGNT_UNQ_NO', name: 'mgntUnqNo',
58
+			label: '관리고유번호',
59
+			width: '10', fixed: false, align: 'center',
60
+			sortable: false, hidden: true
61
+		},
62
+		{
63
+			index: 'BRAND_NM', name: 'brandNm',
64
+			label: "브랜드",
65
+			width: '10', fixed: false, align: 'center',
66
+			sortable: false, hidden: true
67
+		},
68
+		{
69
+			index: 'STORE_NM', name: 'storeNm',
70
+			label: "매장명",
71
+			width: '10', fixed: false, align: 'center',
72
+			sortable: false, hidden: false
73
+		},
74
+		{
75
+			index: 'LOAN_DVSN', name: 'loanDvsn',
76
+			label: "정산타입", 
77
+			width: '8', fixed: false, align: 'center',
78
+			sortable: false, hidden: true
79
+		},
80
+		{
81
+			index: 'LOAN_DVSN_NM', name: 'loanDvsnNm',
82
+			label: "정산타입", 
83
+			width: '8', fixed: false, align: 'center',
84
+			sortable: false, hidden: false
85
+		},
86
+		{
87
+			index: 'STTL_ST_CD', name: 'sttlStCd',
88
+			label: "정산상태코드", 
89
+			width: '8', fixed: false, align: 'center',
90
+			sortable: false, hidden: true
91
+		},
92
+		{
93
+			index: 'STTL_ST_NM', name: 'sttlStNm',
94
+			label: "정산상태", 
95
+			width: '8', fixed: false, align: 'center',
96
+			sortable: false, hidden: false
97
+		},		
98
+		{
99
+			index: 'ITEM_ID', name: 'itemId',
100
+			label: "품목코드",
101
+			width: '10', fixed: false, align: 'center',
102
+			sortable: false, editable: false, edittype: 'text'
103
+		},
104
+		{
105
+			index: 'ITEM_NM', name: 'itemNm',
106
+			label: "품목명",
107
+			width: '10', fixed: false, align: 'center',
108
+			sortable: false, editable: false, edittype: 'text'
109
+		},
110
+		{
111
+			index: 'UNIT', name: 'unit',
112
+			label: "단위",
113
+			width: '8', fixed: false, align: 'center',
114
+			sortable: false, editable: false, edittype: 'text'
115
+		},
116
+		{
117
+			index: 'UNIT_AMT', name: 'unitAmt',
118
+			label: "단가",
119
+			width: '8', fixed: false, align: 'center',
120
+			sortable: false, editable: false, edittype: 'text', 
121
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
122
+		},
123
+		{
124
+			index: 'PODR_QTY', name: 'podrQty',
125
+			label: "발주수량",
126
+			width: '8', fixed: false, align: 'center',
127
+			sortable: false, editable: false, edittype: 'text', 
128
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
129
+		},
130
+		{
131
+			index: 'DLV_QTY', name: 'dlvQty',
132
+			label: "납품수량",
133
+			width: '8', fixed: false, align: 'center',
134
+			sortable: false, editable: false, edittype: 'text', 
135
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
136
+		},
137
+		{
138
+			index: 'WHS_COL_QTY', name: 'whsColQty',
139
+			label: "입고/수거수량",
140
+			width: '10', fixed: false, align: 'center',
141
+			sortable: false, editable: false, edittype: 'text', 
142
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
143
+		}, 
144
+		{
145
+			index: 'WHS_COL_DT', name: 'whsColDt',
146
+			label: "입고/수거일자",
147
+			width: '10', fixed: false, align: 'center',
148
+			sortable: false, editable: false, edittype: 'text'
149
+		},
150
+		{
151
+			index: 'WHS_COL_AMT', name: 'whsColAmt',
152
+			label: "입고/수거금액",
153
+			width: '10', fixed: false, align: 'center',
154
+			sortable: false, editable: false, edittype: 'text', 
155
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
156
+		},
157
+		{
158
+			index: 'STTL_DVSN', name: 'sttlDvsn',
159
+			label: "정산구분",
160
+			width: '8', fixed: false, align: 'center',
161
+			sortable: false, hidden: true
162
+		},
163
+		{
164
+			index: 'STTL_DVSN_NM', name: 'sttlDvsnNm',
165
+			label: "정산구분",
166
+			width: '8', fixed: false, align: 'center',
167
+			sortable: false, editable: false, edittype: 'text'
168
+		},
169
+		{
170
+			index: 'PODR_UNQ_NO', name: 'podrUnqNo',
171
+			label: "발주번호",
172
+			width: '8', fixed: false, align: 'center',
173
+			sortable: false, editable: false, edittype: 'text'
174
+		},
175
+		{
176
+			index: 'PODR_DTL_NO', name: 'podrDtlNo',
177
+			label: "발주항번",
178
+			width: '8', fixed: false, align: 'center',
179
+			sortable: false, editable: false, edittype: 'text'
180
+		}	
181
+	],
182
+	view: [
183
+		{
184
+			index: 'VIEW_CD', name: 'viewCd',
185
+			label: ITP_MSG_LOCALE.label.viewCd,
186
+			width: '10', fixed: false, align: 'center',
187
+			sortable: false, hidden: true
188
+		},
189
+		{
190
+			index: 'STTL_MGNT_DTL_NO', name: 'sttlMgntDtlNo',
191
+			label: '정산관리상세번호',
192
+			width: '10', fixed: false, align: 'center',
193
+			sortable: false, hidden: true
194
+		},		
195
+		{
196
+			index: 'BRAND_NM', name: 'brandNm',
197
+			label: "브랜드",
198
+			width: '10', fixed: false, align: 'center',
199
+			sortable: false, hidden: true
200
+		},
201
+		{
202
+			index: 'STORE_NM', name: 'storeNm',
203
+			label: "매장명",
204
+			width: '10', fixed: false, align: 'center',
205
+			sortable: false, hidden: true
206
+		},
207
+		{
208
+			index: 'ITEM_ID', name: 'itemId',
209
+			label: "품목코드",
210
+			width: '10', fixed: false, align: 'center',
211
+			sortable: false, editable: false, edittype: 'text'
212
+		},
213
+		{
214
+			index: 'ITEM_NM', name: 'itemNm',
215
+			label: "품목명",
216
+			width: '10', fixed: false, align: 'center',
217
+			sortable: false, editable: false, edittype: 'text'
218
+		},
219
+		{
220
+			index: 'UNIT', name: 'unit',
221
+			label: "단위",
222
+			width: '8', fixed: false, align: 'center',
223
+			sortable: false, editable: false, edittype: 'text'
224
+		},
225
+		{
226
+			index: 'UNIT_AMT', name: 'unitAmt',
227
+			label: "단가",
228
+			width: '8', fixed: false, align: 'center',
229
+			sortable: false, editable: false, edittype: 'text', 
230
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
231
+		},
232
+		{
233
+			index: 'PODR_QTY', name: 'podrQty',
234
+			label: "발주수량",
235
+			width: '8', fixed: false, align: 'center',
236
+			sortable: false, editable: false, edittype: 'text', 
237
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
238
+		},
239
+		{
240
+			index: 'DLV_QTY', name: 'dlvQty',
241
+			label: "납품수량",
242
+			width: '8', fixed: false, align: 'center',
243
+			sortable: false, editable: false, edittype: 'text', 
244
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
245
+		},
246
+		{
247
+			index: 'WHS_COL_QTY', name: 'whsColQty',
248
+			label: "입고/수거수량",
249
+			width: '8', fixed: false, align: 'center',
250
+			sortable: false, editable: false, edittype: 'text', 
251
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
252
+		}, 
253
+		{
254
+			index: 'WHS_COL_DT', name: 'whsColDt',
255
+			label: "입고/수거일자",
256
+			width: '8', fixed: false, align: 'center',
257
+			sortable: false, editable: false, edittype: 'text'
258
+		},
259
+		{
260
+			index: 'WHS_COL_AMT', name: 'whsColAmt',
261
+			label: "입고/수거금액",
262
+			width: '8', fixed: false, align: 'center',
263
+			sortable: false, editable: false, edittype: 'text', 
264
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
265
+		},
266
+		{
267
+			index: 'STTL_DVSN_NM', name: 'sttlDvsnNm',
268
+			label: "정산구분",
269
+			width: '8', fixed: false, align: 'center',
270
+			sortable: false, editable: false, edittype: 'text'
271
+		},
272
+		{
273
+			index: 'PODR_UNQ_NO', name: 'podrUnqNo',
274
+			label: "발주번호",
275
+			width: '8', fixed: false, align: 'center',
276
+			sortable: false, editable: false, edittype: 'text'
277
+		},
278
+		{
279
+			index: 'PODR_DTL_NO', name: 'podrDtlNo',
280
+			label: "발주항번",
281
+			width: '8', fixed: false, align: 'center',
282
+			sortable: false, editable: false, edittype: 'text'
283
+		}
284
+	]
285
+};
286
+
287
+require(['config'], function() {
288
+	require([
289
+		'kakao.map.util'
290
+	], function($) {
291
+		pageObj.init();
292
+	});
293
+});
294
+
295
+/*화면공통 Object*/
296
+let pageObj = {
297
+	init: function () {
298
+		this.ui.init();
299
+		this.event.init();
300
+	},
301
+	ui: {
302
+		init: function () {
303
+			this.view();
304
+			this.grid();
305
+			this.ready();
306
+		},
307
+		view: function() {
308
+			// 버튼 권한설정
309
+			fn_proc_btn_auth('SETTMNG01010');
310
+			
311
+			// 공통코드 표시
312
+			$('select').each(function() {
313
+		        if($(this).data('select-code')) {
314
+		            fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
315
+		        }
316
+		    });
317
+
318
+			// 조회일자 지정
319
+			var now = new Date();
320
+			$('#ITP_TAB_SETTMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);			
321
+			$('#ITP_FORM_SETTMNG01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
322
+			$('#ITP_FORM_SETTMNG01010_SEARCH_TO_DT').datepicker('setDate', new Date());
323
+			
324
+			// 권한에 따라 매장값 설정
325
+			$('#ITP_FORM_SETTMNG01010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
326
+			LOGIN_AUTH_TYPE_CD = fn_make_user_info.get('authTpCd'); // 권한타입
327
+			if(LOGIN_AUTH_TYPE_CD == '50') {
328
+				$('#ITP_FORM_SETTMNG01010_SEARCH_STORE_ID').val(fn_make_user_info.get('storeId'));
329
+				$('#ITP_FORM_SETTMNG01010_SEARCH_STORE_NM').val(fn_make_user_info.get('storeNm'));	
330
+			}
331
+			
332
+		},
333
+		grid: function() {
334
+			itp_fn_jqgrid_resize(SETTMNG01010_GRID_ID, SETTMNG01010_GRID_LIST, 'lg');
335
+			listObj.empty.init();
336
+			itp_fn_fire_window_resize();
337
+		},
338
+		ready: function() {
339
+			listObj.init();
340
+		}
341
+	},
342
+	event: {
343
+		init: function () {
344
+			this.button();
345
+		},
346
+		button: function () {
347
+			// 버튼 클릭 이벤트
348
+			$('button').each(function() {
349
+				var id = $(this).attr('id');
350
+				$(this).on('click', function() {
351
+					switch (id) {
352
+						case 'ITP_BTN_SETTMNG01010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
353
+						case 'ITP_BTN_SETTMNG01010_CANCELLIST'		: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
354
+						case 'ITP_BTN_SETTMNG01010_NEWREG'			: listObj.button.reqSttl();	break;	// 정산요청 버튼
355
+						case 'ITP_BTN_SETTMNG01010_REQUEST'			: modifyObj.button.request();	break;	// 요청 버튼
356
+					}
357
+				});
358
+			});
359
+
360
+			$('body').on('click', function(e) {
361
+				var gridId = SETTMNG01010_DETAIL_GRID_ID.replace('#', '');
362
+				var rids = $(SETTMNG01010_DETAIL_GRID_ID).jqGrid('getDataIDs');
363
+				var last_row_id = rids[rids.length - 1];
364
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'SETTMNG01010_DETAIL');
365
+			});
366
+
367
+		}
368
+	},
369
+	switchScreen: function(mode) {
370
+		if(mode == 'LIST') { // 목록
371
+			$('#ITP_BTN_SETTMNG01010_MODIFY').hide();
372
+			$('#ITP_BTN_SETTMNG01010_CANCELLIST').hide();
373
+			$('#ITP_BTN_SETTMNG01010_DELETE').hide();
374
+			$('#ITP_BTN_SETTMNG01010_REQUEST').hide();
375
+			
376
+			if(LOGIN_AUTH_TYPE_CD == '50') { // 매장관리자
377
+				$('#ITP_BTN_SETTMNG01010_STORE_SEARCH').hide();
378
+				$('#ITP_BTN_SETTMNG01010_STORE_ERASE').hide();
379
+			} else {
380
+				$('#ITP_BTN_SETTMNG01010_STORE_SEARCH').show();
381
+				$('#ITP_BTN_SETTMNG01010_STORE_ERASE').show();
382
+			}
383
+			
384
+			fn_show_btn_auth('#ITP_BTN_SETTMNG01010_SRH');
385
+			fn_show_btn_auth('#ITP_BTN_SETTMNG01010_NEWREG');
386
+			
387
+			$('#ITP_AJAX_SETTMNG01010_LIST_CONTAINER').show();
388
+			$('#ITP_AJAX_SETTMNG01010_DETAIL_CONTAINER').hide();
389
+			
390
+		} else if(mode == 'DETAIL') { // 보기
391
+			$('#ITP_BTN_SETTMNG01010_SRH').hide();
392
+			$('#ITP_BTN_SETTMNG01010_NEWREG').hide();
393
+			$('#ITP_BTN_SETTMNG01010_DELETE').hide();
394
+			
395
+			fn_show_btn_auth('#ITP_BTN_SETTMNG01010_REQUEST');
396
+			fn_show_btn_auth('#ITP_BTN_SETTMNG01010_CANCELLIST');
397
+
398
+			$('#ITP_AJAX_SETTMNG01010_LIST_CONTAINER').hide();
399
+			$('#ITP_AJAX_SETTMNG01010_DETAIL_CONTAINER').show();
400
+		}
401
+	}
402
+};
403
+
404
+/*목록화면 Object*/
405
+let listObj = {
406
+	init: function () {
407
+		this.grid.init();
408
+	},
409
+	itp_SETTMNG01010_search: false,
410
+	button: {
411
+		search: function() {
412
+			listObj.itp_SETTMNG01010_search = true;
413
+			let param = $('#ITP_FORM_SETTMNG01010_SEARCH').serializeObject();
414
+			param.gridSize = $.jgrid.defaults.rowNum;
415
+			param.gridPage = $.jgrid.defaults.page;
416
+			$(SETTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
417
+		},
418
+		reqSttl: function() { // 정산요청
419
+			// 매장선택 체크
420
+			if($('#ITP_FORM_SETTMNG01010_SEARCH_STORE_ID').val() == '') {
421
+				itp_fn_modal_alert_ajax('정산요청을 위한 매장을 선택하세요.');
422
+				return;
423
+			}
424
+		
425
+			// 그리드에서 최소1개는 선택해야 함
426
+			const rowKey = $(SETTMNG01010_GRID_ID).getGridParam('selrow');
427
+		    if (!rowKey) {
428
+				itp_fn_modal_alert_ajax(ITP_MSG_LOCALE.message.ajax.noData);
429
+		    	return;
430
+		    }
431
+
432
+			var selectedIds = $(SETTMNG01010_GRID_ID).getGridParam('selarrrow');
433
+			let sttlReqDataList = [];			
434
+			var check = true;
435
+			$.each(selectedIds, function(key, value) {
436
+				var sttlMgntUnqNo = $(SETTMNG01010_GRID_ID).jqGrid('getRowData', value).sttlMgntUnqNo;				
437
+				var sttlMgntDtlNo = $(SETTMNG01010_GRID_ID).jqGrid('getRowData', value).sttlMgntDtlNo;
438
+				var loanDvsn = $(SETTMNG01010_GRID_ID).jqGrid('getRowData', value).loanDvsn;		// 여신구분
439
+				var sttlStCd = $(SETTMNG01010_GRID_ID).jqGrid('getRowData', value).sttlStCd;		// 정산상태코드
440
+				var sttlDvsn = $(SETTMNG01010_GRID_ID).jqGrid('getRowData', value).sttlDvsn;		// 정산구분
441
+				var mgntUnqNo = $(SETTMNG01010_GRID_ID).jqGrid('getRowData', value).mgntUnqNo;
442
+								
443
+				if(sttlStCd == 'ST10' || sttlStCd == 'ST20') { // 정산요청 및 정산확정 건은 정산요청이 불가능 
444
+					check = false;	
445
+				}
446
+				let data = {}
447
+				data.sttlMgntUnqNo = sttlMgntUnqNo;
448
+				data.sttlMgntDtlNo = sttlMgntDtlNo;
449
+				data.loanDvsn = loanDvsn;
450
+				data.sttlDvsn = sttlDvsn;
451
+				data.mgntUnqNo = mgntUnqNo;
452
+				sttlReqDataList.push(data);
453
+			});
454
+			if(!check) {
455
+				itp_fn_modal_alert_ajax('정산요청 및 확정된 건은 정산 요청이 불가능합니다.');
456
+				return;
457
+			}
458
+			
459
+			let param = {};
460
+			param.brandId = $('#ITP_FORM_SETTMNG01010_SEARCH_BRAND_ID').val();
461
+			param.storeId = $('#ITP_FORM_SETTMNG01010_SEARCH_STORE_ID').val();
462
+			param.sttlReqDataList = sttlReqDataList;
463
+			fn_ajax_call(STTL_REQ_REQUEST_STTL, JSON.stringify(param), function(result) {
464
+				
465
+				// alert(JSON.stringify(result));
466
+				// $('#ITP_FORM_SETTMNG01010_DETAIL_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
467
+				
468
+				const sttlMgntUnqNoVal = result.sttlMgntUnqNo;
469
+				const key = {sttlMgntUnqNo: sttlMgntUnqNoVal, viewCd: 'R'};
470
+				var param = $.param(key);
471
+				modifyObj.init(param);
472
+				
473
+			}, 'POST');
474
+			
475
+			// pageObj.switchScreen('ADD');			
476
+			// itp_fn_form_clear_validate(null, '#ITP_FORM_SETTMNG01010_DETAIL');						
477
+			// 로케이션 리스트 조회
478
+			// createObj.init();
479
+		}
480
+	},
481
+	empty: {
482
+		init: function() {
483
+			var _this = this;
484
+			this.push();
485
+			$(SETTMNG01010_GRID_EMPTY).on('click', function() {
486
+				_this.back();
487
+				_this.itp_SETTMNG01010_param.gridSize = $.jgrid.defaults.rowNum;
488
+				$(SETTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_SETTMNG01010_param)}).trigger('reloadGrid');
489
+			});
490
+		},
491
+		itp_SETTMNG01010_param: {},
492
+		push: function() {
493
+			let param = $('#ITP_FORM_SETTMNG01010_SEARCH').serializeObject();
494
+			listObj.itp_SETTMNG01010_param = param;
495
+		},
496
+		back: function() {
497
+			$('#ITP_FORM_SETTMNG01010_SEARCH_STORE_ID').val(listObj.itp_SETTMNG01010_param.sstoreId);
498
+			$('#ITP_FORM_SETTMNG01010_SEARCH_STORE_NM').val(listObj.itp_SETTMNG01010_param.sstoreNm);
499
+			$('#ITP_FORM_SETTMNG01010_SEARCH_FROM_DT').val(listObj.itp_SETTMNG01010_param.fromDt);
500
+			$('#ITP_FORM_SETTMNG01010_SEARCH_TO_DT').val(listObj.itp_SETTMNG01010_param.toDt);
501
+			$('#ITP_FORM_SETTMNG01010_SEARCH_ITEM_NM').val(listObj.itp_SETTMNG01010_param.sitemNm);
502
+		}
503
+	},
504
+	grid: {
505
+		init: function () {
506
+			// 데이터 없을때
507
+			listObj.empty.push();
508
+			this.search();
509
+		},
510
+		colModel: gridColModel.list,
511
+		search: function() {
512
+			pageObj.switchScreen('LIST');
513
+			this.unload();
514
+			this.load();
515
+		},
516
+		load: function() {			
517
+			let param = $('#ITP_FORM_SETTMNG01010_SEARCH').serializeObject();
518
+			param.gridSize = $.jgrid.defaults.rowNum;
519
+
520
+			var option = {
521
+				gridId: SETTMNG01010_GRID_ID,
522
+				colModel: gridColModel.list,
523
+				param: param,
524
+				url: DOMAIN + STTL_REQ_DETAIL_GRID_LIST,
525
+				pager: SETTMNG01010_GRID_PAGER,
526
+				multiselect: true, 
527
+				onCellSelect: function(rowId, cellIdx, cellValue) {
528
+					var cm = $(this).jqGrid('getGridParam', 'colModel');
529
+					var colNm = cm[cellIdx].name;
530
+					if (colNm == 'sttlReqDt') {
531
+						const sttlMgntUnqNoVal = $(this).jqGrid('getCell', rowId, 'sttlMgntUnqNo');
532
+						
533
+						const key = {sttlMgntUnqNo: sttlMgntUnqNoVal, viewCd: 'R'};
534
+						var param = $.param(key);
535
+						modifyObj.init(param);
536
+					}
537
+				},
538
+				loadComplete: function(data) {
539
+					console.log(data);
540
+					itp_fn_grid_load_complete(data, SETTMNG01010_GRID_ID, true, 'number', 'SETTMNG01010', listObj.itp_SETTMNG01010_search, listObj.empty, true, data.gridRecords, true);
541
+					var ids = $(SETTMNG01010_GRID_ID).getDataIDs();
542
+					$.each(ids, function(idx, rowId) {
543
+						// $(SETTMNG01010_GRID_ID).jqGrid('setCell', rowId, 'sttlReqDt', '', ITP_GRID_COL_STYLE.link);
544
+					});
545
+				},
546
+				onPaging: function(action) {
547
+					itp_fn_grid_paging(SETTMNG01010_GRID_ID, action, param);
548
+				}
549
+			};
550
+			itp_fn_grid_make_remote(option);
551
+		},
552
+		clearData : function() {
553
+			$(SETTMNG01010_GRID_ID).jqGrid('clearGridData', true);
554
+			$(SETTMNG01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
555
+			$(SETTMNG01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
556
+			$(SETTMNG01010_GRID_EMPTY).show();
557
+		},
558
+		unload : function() {
559
+			$.jgrid.gridUnload(SETTMNG01010_GRID_ID);
560
+		}
561
+	}
562
+};
563
+
564
+/*상세화면 Object*/
565
+let modifyObj = {
566
+	init: function (param) {
567
+		this.load(param);
568
+	},
569
+	button: {
570
+		cancel: function() {
571
+			listObj.grid.search();
572
+		},
573
+		request: function() {
574
+			
575
+			const formId = '#ITP_FORM_SETTMNG01010_DETAIL';
576
+			itp_fn_form_clear_validate(null, formId);
577
+			
578
+			var vali_sttlReqDt = itp_fn_form_validate(formId, formId + '_STTL_REQ_DT', ['empty'], undefined); // 정산요청일자
579
+			
580
+			if (vali_sttlReqDt) {
581
+				let sttlReqDataList = [];
582
+				const rowData = $(SETTMNG01010_DETAIL_GRID_ID).getRowData();
583
+				// const keyValue = $(formId + '_WHS_ID').val();
584
+				$.each(rowData, function(key, value) {
585
+					sttlReqDataList.push(value);
586
+				});
587
+				let param = $(formId).serializeObject();
588
+				param.sttlReqDataList = sttlReqDataList;
589
+				
590
+				// console.log(JSON.stringify(param));
591
+				var confirmFn= {
592
+					callBack: function() {
593
+						//
594
+						var searhFn = function() {
595
+							ITP_FORM_SETTMNG01010_DETAIL_IS_WRITING = false;
596
+							listObj.grid.search();
597
+						};
598
+						fn_ajax_call(STTL_REQ_REQUEST_STTL_PROC, JSON.stringify(param), searhFn, 'POST'); 	
599
+					}
600
+				};
601
+				itp_fn_modal_confirm(ITP_MSG_LOCALE.message.form.procData, confirmFn, null);				
602
+			}
603
+		}
604
+	}, 
605
+	load: function(param) {
606
+		fn_ajax_call(STTL_REQ_INFO_STTL, param, this.callback, 'GET');
607
+	},
608
+	callback: function (result) {
609
+		// console.log(result);
610
+		pageObj.switchScreen('DETAIL');
611
+		$('#ITP_FORM_SETTMNG01010_DETAIL_BRAND_ID').val(result.brandId);
612
+		$('#ITP_FORM_SETTMNG01010_DETAIL_STORE_ID').val(result.storeId);
613
+		$('#ITP_FORM_SETTMNG01010_DETAIL_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
614
+		
615
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnBrandNm').text(result.brandNm);
616
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnStoreNm').text(result.storeNm);
617
+		$('#ITP_FORM_SETTMNG01010_DETAIL_STTL_REQ_DT').val(result.sttlReqDt);
618
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnSttlStNm').text(result.sttlStNm);
619
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnSttlReqAmt').text(itp_fn_number_comma(result.sttlReqAmt));
620
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnAcctBal').text(itp_fn_number_comma(result.acctBal));
621
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnSysRegDttm').text(result.sysRegDttm);
622
+		$('#ITP_FORM_SETTMNG01010_DETAIL .fnSysRegNm').text(result.sysRegNm);
623
+
624
+		// 리스트 조회
625
+		modifyObj.grid.init();
626
+	},
627
+	grid: {
628
+		init: function() {
629
+			this.unload();
630
+			this.load();
631
+		},
632
+		load : function() {
633
+			let param = $('#ITP_FORM_SETTMNG01010_DETAIL').serializeObject();
634
+			param.gridSize = $.jgrid.defaults.rowNum;
635
+			param.pagingYn = false; // 페이징안함
636
+
637
+			var option = {
638
+				gridId: SETTMNG01010_DETAIL_GRID_ID,
639
+				colModel: gridColModel.view,
640
+				param: param,
641
+				url: DOMAIN + STTL_REQ_STL_GRID_LIST,
642
+				pager: SETTMNG01010_DETAIL_GRID_PAGER,
643
+				loadComplete: function(data) {
644
+					itp_fn_grid_load_complete(data, SETTMNG01010_DETAIL_GRID_ID, true, undefined, 'SETTMNG01010_DETAIL');
645
+				},
646
+				onPaging: function(action) {
647
+					var pagingFn = {
648
+						callBack: function(args) {
649
+							$(args).trigger('reloadGrid');
650
+						}
651
+					};
652
+					if (itp_fn_check_grid_is_writing(SETTMNG01010_DETAIL_GRID_ID)) {
653
+						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, SETTMNG01010_DETAIL_GRID_ID);
654
+						return 'stop';
655
+					} else {
656
+						itp_fn_grid_paging(SETTMNG01010_DETAIL_GRID_ID, action, param);
657
+					}
658
+				},
659
+				onSortCol: function(index, columnIndex, sortOrder) {
660
+					var sortingFn = {
661
+						callBack: function(args) {
662
+							$(args).trigger('reloadGrid');
663
+						}
664
+					};
665
+					if (itp_fn_check_grid_is_writing(SETTMNG01010_DETAIL_GRID_ID)) {
666
+						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, SETTMNG01010_DETAIL_GRID_ID);
667
+						return 'stop';
668
+					} else {
669
+						itp_fn_grid_sorting(SETTMNG01010_DETAIL_GRID_ID, index, sortOrder);
670
+					}
671
+				}
672
+			};
673
+			itp_fn_grid_make_remote(option);
674
+		},
675
+		clearData : function() {
676
+			$(SETTMNG01010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
677
+			$(SETTMNG01010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
678
+			$(SETTMNG01010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
679
+			$(SETTMNG01010_DETAIL_GRID_EMPTY).show();
680
+		},
681
+		unload : function() {
682
+			$.jgrid.gridUnload(SETTMNG01010_DETAIL_GRID_ID);
683
+		}
684
+	}
685
+};